/* Envelope Notes (santacruz.top) — "Thermal Envelope" visual.
   Sage-grey paper (#f1f4ef) + forest-green accent (#2e7d51) + deep green-slate ink (#1f2a24).
   Motif: wall assemblies drawn as stacked layers, R-value dimension lines, mono annotations.
   Hard edges only (no border-radius anywhere). Mono labels, humanist sans body. */

:root {
  --bg: #f1f4ef;
  --panel: #ffffff;
  --ink: #1f2a24;
  --muted: #5f6f66;
  --line: #cfdccf;
  --line-2: #e2eae0;
  --accent: #2e7d51;
  --accent-d: #21603d;
  --accent-soft: #e6f0e7;
  --c-roof: #6f7f24;
  --c-wall: #2e7d51;
  --c-win: #1f6f8b;
  --c-seal: #9a6614;
  --mono: "SFMono-Regular", "Consolas", "Liberation Mono", "Menlo", monospace;
  --sans: "Inter", "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.66;
  font-size: 16px;
}
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-d); text-decoration: underline; }
h1, h2, h3 { line-height: 1.18; }

/* ---- the stacked-layer band: a strip of envelope layers ---- */
.env-layers {
  display: block; height: 10px;
  background: linear-gradient(
    to bottom,
    #55605a 0 2px, #8fae8f 2px 4px, #2e7d51 4px 8px, #dfe8df 8px 9px, #b9c6b9 9px 10px);
}

/* ---- header ---- */
.env-header { background: var(--panel); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 15px 22px; }
.env-brand { display: flex; align-items: center; gap: 13px; color: var(--ink); }
.env-mark { display: inline-flex; color: var(--accent); }
.env-titles { display: flex; flex-direction: column; line-height: 1.2; }
.env-name { font-weight: 700; letter-spacing: .1px; font-size: 17px; }
.env-tag {
  font-family: var(--mono); font-size: 10px; color: var(--muted);
  letter-spacing: 1.2px; text-transform: uppercase;
}
.env-nav { display: flex; gap: 24px; }
.env-nav a {
  color: var(--ink); font-size: 14px; font-weight: 600; padding: 3px 0;
  border-bottom: 2px solid transparent;
}
.env-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); text-decoration: none; }

/* ---- hero with a drawn wall section ---- */
.env-hero { background: var(--panel); border-bottom: 1px solid var(--line); padding: 44px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero-eyebrow {
  font-family: var(--mono); color: var(--accent); font-size: 11px;
  letter-spacing: 3px; font-weight: 700; margin-bottom: 14px;
}
.env-hero h1 { font-size: 36px; font-weight: 700; margin-bottom: 15px; max-width: 620px; letter-spacing: -.3px; }
.hero-lede { max-width: 620px; color: var(--muted); font-size: 17px; }
.hero-art { display: flex; justify-content: center; }
.hero-figure { width: 100%; max-width: 360px; height: auto; border: 1px solid var(--line); background: #fafcf8; }

/* ---- section: assembly of categories ---- */
section { padding: 28px 0; }
.assembly-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 2.4px; text-transform: uppercase;
  color: var(--muted); font-weight: 700; margin-bottom: 14px;
}
.assembly-rail { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.assembly-chip {
  display: flex; flex-direction: column; gap: 5px; color: var(--ink);
  background: var(--panel); border: 1px solid var(--line); border-top: 4px solid var(--accent);
  padding: 15px 16px 14px;
}
.assembly-chip:hover { text-decoration: none; border-color: var(--accent); }
.assembly-chip .chip-count {
  font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .4px;
}
.assembly-chip .chip-name { font-weight: 700; font-size: 16px; }
.assembly-chip.c-roof { border-top-color: var(--c-roof); }
.assembly-chip.c-win { border-top-color: var(--c-win); }
.assembly-chip.c-seal { border-top-color: var(--c-seal); }
.assembly-inline { padding-top: 4px; }

/* ---- a layer section (one category) ---- */
.layer-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.layer-head h2 { font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.layer-bar { display: inline-block; width: 22px; height: 6px; background: var(--accent); }
.layer-bar.c-roof { background: var(--c-roof); }
.layer-bar.c-win { background: var(--c-win); }
.layer-bar.c-seal { background: var(--c-seal); }
.layer-more { font-size: 13px; font-weight: 600; font-family: var(--mono); letter-spacing: .3px; }

/* ---- the measure wall of tiles ---- */
.measure-wall { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.measure-tile {
  display: flex; flex-direction: column; color: var(--ink);
  background: var(--panel); border: 1px solid var(--line);
}
.measure-tile:hover { border-color: var(--accent); text-decoration: none; }
.tile-band { display: block; height: 5px; background: var(--accent); }
.tile-band.c-roof { background: var(--c-roof); }
.tile-band.c-win { background: var(--c-win); }
.tile-band.c-seal { background: var(--c-seal); }
.measure-body { display: flex; flex-direction: column; gap: 10px; padding: 15px 15px 16px; }
.measure-cat {
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--accent);
}
.measure-cat.c-roof { color: var(--c-roof); }
.measure-cat.c-win { color: var(--c-win); }
.measure-cat.c-seal { color: var(--c-seal); }
.measure-title { font-weight: 700; font-size: 16px; line-height: 1.32; }
.measure-spec {
  display: flex; flex-direction: column; gap: 6px;
  border-top: 1px solid var(--line-2); padding-top: 10px;
}
.spec-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 12.5px; }
.spec-key {
  flex: 0 0 auto; font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: .4px; text-transform: uppercase; color: var(--muted);
}
.spec-val { text-align: right; color: var(--ink); }
.measure-note { font-size: 13px; color: var(--muted); }

/* ---- sheet head ---- */
.sheet-head { padding: 34px 0 10px; }
.crumb { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 10px; letter-spacing: .3px; }
.crumb a { color: var(--muted); }
.sheet-head h1 { font-size: 30px; font-weight: 700; }
.lede { color: var(--muted); margin-top: 8px; }

/* ---- entry layout: measure sheet + notes ---- */
.sheet-grid { display: grid; grid-template-columns: 318px 1fr; gap: 26px; padding-top: 22px; padding-bottom: 44px; }
.measure-doc { align-self: start; background: var(--panel); border: 1px solid var(--line); border-top: 4px solid var(--accent); }
.doc-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 14px; border-bottom: 1px solid var(--line-2);
}
.doc-cat {
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--accent);
}
.doc-cat.c-roof { color: var(--c-roof); }
.doc-cat.c-win { color: var(--c-win); }
.doc-cat.c-seal { color: var(--c-seal); }
.doc-title { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.doc-art { padding: 12px 14px 4px; }
.doc-figure { width: 100%; height: auto; max-width: 210px; display: block; }
.doc-spec { border-top: 1px solid var(--line-2); }
.doc-row { display: flex; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.doc-row:last-child { border-bottom: 0; }
.doc-key {
  flex: 0 0 42%; padding: 9px 14px; color: var(--muted); border-right: 1px solid var(--line-2);
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
}
.doc-val { flex: 1; padding: 9px 14px; }
.doc-row.is-legend { background: var(--accent-soft); box-shadow: inset 4px 0 0 var(--accent); }
.doc-row.is-legend .doc-val { font-weight: 600; }

.notes { background: var(--panel); border: 1px solid var(--line); padding: 26px 30px; }
.notes-legal h2 { font-size: 18px; font-weight: 700; margin: 18px 0 8px; }
.notes-legal p { margin-bottom: 12px; }
.note { margin-bottom: 24px; }
.note:last-child { margin-bottom: 0; }
.note h2 { display: flex; align-items: baseline; gap: 10px; font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.note-flag {
  font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--accent);
  border: 1px solid var(--accent); padding: 1px 6px;
}
.notes p { margin-bottom: 12px; color: #2c3530; }
.notes p:last-child { margin-bottom: 0; }
.related-list { list-style: none; }
.related-list li { padding: 7px 0; border-bottom: 1px solid var(--line-2); }
.related-list li:last-child { border-bottom: 0; }

/* ---- footer ---- */
.env-footer { background: var(--panel); border-top: 1px solid var(--line); margin-top: 24px; }
.foot-inner { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; padding: 28px 22px; }
.foot-brand { flex: 1 1 340px; }
.foot-brand p { color: var(--muted); font-size: 14px; margin-top: 6px; }
.foot-nav { display: flex; gap: 16px; }
.foot-nav a { color: var(--ink); font-size: 14px; font-weight: 600; }
.copyright { flex: 1 1 100%; font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 8px; letter-spacing: .2px; }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .measure-wall { grid-template-columns: repeat(2, 1fr); }
  .assembly-rail { grid-template-columns: repeat(2, 1fr); }
  .sheet-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .measure-wall, .assembly-rail { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; gap: 10px; align-items: flex-start; }
  .env-nav { gap: 14px; }
  .env-hero h1 { font-size: 27px; }
  .notes { padding: 20px 18px; }
}
