/* ==========================================================================
   MeDu — Custom Shed Homes
   Design tokens: Colorbond-derived. Monument charcoal, zinc paper,
   eucalypt accent. One typeface (Archivo) worked across its width axis.
   ========================================================================== */

:root {
  /* --- colour --- */
  --paper:       #E7E9E6;
  --panel:       #F4F5F3;
  --panel-2:     #DDE1DD;
  --ink:         #1B1F1E;
  --ink-2:       #47514E;
  --muted:       #5F6A66;
  --rule:        #C6CCC8;
  --rule-soft:   #D6DBD7;
  --accent:      #2E5943;
  --accent-hi:   #234634;
  --accent-wash: #DFE8E2;
  --on-dark:     #F2F4F2;
  /* Inverted band. Kept separate from --ink because --ink flips with the
     theme, which would turn this band light-on-light in dark mode. */
  --invert-bg:   #1B1F1E;
  --invert-fg:   #F2F4F2;
  --invert-fg-2: #C3CBC7;
  --invert-fg-3: #8A9591;
  --invert-line: #4A5450;
  --shadow:      0 1px 2px rgba(27,31,30,.06), 0 8px 24px -12px rgba(27,31,30,.18);

  /* --- type --- */
  --sans: "Archivo", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  /* --- metrics --- */
  --measure: 64ch;
  --gutter: clamp(1.15rem, 4vw, 3.5rem);
  --max: 1240px;
  --band: clamp(3.5rem, 8vw, 7rem);
  --radius: 2px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:       #141817;
    --panel:       #1D2221;
    --panel-2:     #262C2A;
    --ink:         #E8ECEA;
    --ink-2:       #B4BFBA;
    --muted:       #94A19C;
    --rule:        #2E3634;
    --rule-soft:   #242B29;
    --accent:      #7FB496;
    --accent-hi:   #9AC8AC;
    --accent-wash: #1B2A22;
    --on-dark:     #F2F4F2;
    --invert-bg:   #242B29;
    --invert-fg:   #E8ECEA;
    --invert-fg-2: #AFBBB6;
    --invert-fg-3: #8C9A95;
    --invert-line: #4E5A55;
    --shadow:      0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.7);
  }
}

:root[data-theme="dark"] {
  --paper:#141817; --panel:#1D2221; --panel-2:#262C2A;
  --ink:#E8ECEA; --ink-2:#B4BFBA; --muted:#94A19C;
  --rule:#2E3634; --rule-soft:#242B29;
  --accent:#7FB496; --accent-hi:#9AC8AC; --accent-wash:#1B2A22;
  --invert-bg:#242B29; --invert-fg:#E8ECEA; --invert-fg-2:#AFBBB6; --invert-fg-3:#8C9A95; --invert-line:#4E5A55;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.7);
}
:root[data-theme="light"] {
  --paper:#E7E9E6; --panel:#F4F5F3; --panel-2:#DDE1DD;
  --ink:#1B1F1E; --ink-2:#47514E; --muted:#5F6A66;
  --rule:#C6CCC8; --rule-soft:#D6DBD7;
  --accent:#2E5943; --accent-hi:#234634; --accent-wash:#DFE8E2;
  --invert-bg:#1B1F1E; --invert-fg:#F2F4F2; --invert-fg-2:#C3CBC7; --invert-fg-3:#8A9591; --invert-line:#4A5450;
  --shadow: 0 1px 2px rgba(27,31,30,.06), 0 8px 24px -12px rgba(27,31,30,.18);
}

/* ==========================================================================
   Reset
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 6.5rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius);
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--paper);
  padding: .7rem 1.1rem; font-weight: 600;
}
.skip:focus { left: .5rem; top: .5rem; }

.sr {
  position: absolute; width: 1px; height: 1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   Type scale
   ========================================================================== */

h1, h2, h3, h4 { text-wrap: balance; line-height: 1.06; letter-spacing: -.032em; font-weight: 700; }

.display {
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  font-stretch: 112%;
  font-weight: 700;
  line-height: .98;
  letter-spacing: -.04em;
}
.h2 { font-size: clamp(1.7rem, 4vw, 2.75rem); font-stretch: 106%; }
.h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); letter-spacing: -.02em; }

.eyebrow {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.lede { font-size: clamp(1.02rem, 1.6vw, 1.16rem); color: var(--ink-2); max-width: var(--measure); }
p { max-width: var(--measure); }
.figure { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Layout
   ========================================================================== */

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.band { padding-block: var(--band); }
.band + .band { padding-top: 0; }
.stack { display: flex; flex-direction: column; }
.stack-sm { gap: .75rem; } .stack-md { gap: 1.4rem; } .stack-lg { gap: 2.5rem; } .stack-xl { gap: 3.5rem; }
.rule-top { border-top: 1px solid var(--rule); }

.sec-head { display: flex; flex-direction: column; gap: .8rem; max-width: 46ch; }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  max-width: var(--max); margin-inline: auto; padding: .7rem var(--gutter);
  display: flex; align-items: center; gap: 1.5rem;
}

/* --- the wordmark: text only --- */
.logo { display: inline-flex; flex-direction: column; text-decoration: none; line-height: 1; }
.logo-mark {
  font-stretch: 125%;
  font-weight: 800;
  font-size: 1.62rem;
  letter-spacing: -.045em;
  color: var(--ink);
}
.logo-sub {
  font-family: var(--mono);
  font-size: .53rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: .28rem;
  padding-left: .1em;
}

.nav { display: flex; align-items: center; gap: 1.6rem; margin-left: auto; }
.nav a {
  text-decoration: none; font-size: .9rem; font-weight: 550;
  color: var(--ink-2); padding-block: .3rem;
  border-bottom: 1.5px solid transparent;
  transition: color .15s, border-color .15s;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

.nav-tools { display: flex; align-items: center; gap: .7rem; }
.phone {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .02em;
  text-decoration: none; color: var(--ink-2); white-space: nowrap;
}
.phone:hover { color: var(--accent); }

.burger {
  display: none; background: none; border: 1px solid var(--rule);
  padding: .5rem .7rem; cursor: pointer; border-radius: var(--radius);
  font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
}

@media (max-width: 940px) {
  .nav { display: none; }
  .burger { display: block; margin-left: auto; }
  .nav.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: .2rem;
    position: absolute; inset: 100% 0 auto 0;
    background: var(--panel); border-bottom: 1px solid var(--rule);
    padding: 1rem var(--gutter) 1.4rem;
  }
  .nav.open a { width: 100%; padding: .6rem 0; border-bottom: 1px solid var(--rule-soft); }
  .nav-tools { display: none; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .82rem 1.5rem;
  font-size: .9rem; font-weight: 600; letter-spacing: -.005em;
  text-decoration: none; cursor: pointer;
  border: 1.5px solid var(--ink); border-radius: var(--radius);
  background: var(--ink); color: var(--paper);
  transition: background .16s, color .16s, border-color .16s, transform .16s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--on-dark); }
:root[data-theme="dark"] .btn:hover, :root:not([data-theme="light"]) .btn:hover { color: #141817; }
.btn:active { transform: translateY(1px); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { background: transparent; border-color: var(--ink); color: var(--ink); }

.btn-sm { padding: .55rem 1rem; font-size: .82rem; }
.btn-block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

.link-arrow {
  font-weight: 600; font-size: .9rem; text-decoration: none;
  color: var(--accent); display: inline-flex; align-items: center; gap: .4rem;
  border-bottom: 1.5px solid transparent; align-self: flex-start;
}
.link-arrow::after { content: "→"; transition: transform .18s; }
.link-arrow:hover { border-bottom-color: var(--accent); }
.link-arrow:hover::after { transform: translateX(3px); }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero { position: relative; border-bottom: 1px solid var(--rule); }
.hero-media { position: relative; height: clamp(26rem, 76vh, 46rem); overflow: hidden; background: var(--panel-2); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 55%; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12,16,15,.62) 0%, rgba(12,16,15,.30) 38%, rgba(12,16,15,.78) 100%);
}
.hero-body {
  position: absolute; inset: auto 0 0 0; z-index: 2;
  padding-block: clamp(2rem, 5vw, 3.5rem);
}
.hero-body .wrap { display: flex; flex-direction: column; gap: 1.2rem; }
.hero-body .eyebrow { color: rgba(255,255,255,.78); }
.hero-body h1 { color: #fff; max-width: 15ch; }
.hero-body .lede { color: rgba(255,255,255,.88); max-width: 46ch; }
.hero-body .btn { border-color: #fff; background: #fff; color: #16211B; }
.hero-body .btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.hero-body .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.hero-body .btn-ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; color: #fff; }

/* --- hero filter --- */
.hero-filter {
  background: var(--panel);
  border-bottom: 1px solid var(--rule);
}
.hero-filter form {
  max-width: var(--max); margin-inline: auto; padding: 1rem var(--gutter);
  display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: .8rem; align-items: end;
}
@media (max-width: 860px) {
  .hero-filter form { grid-template-columns: 1fr 1fr; }
  .hero-filter form .btn { grid-column: 1 / -1; }
}

/* ==========================================================================
   Forms
   ========================================================================== */

.field { display: flex; flex-direction: column; gap: .32rem; min-width: 0; }
.field label {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); font-weight: 500;
}
.field input, .field select, .field textarea {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: .62rem .7rem;
  font-size: .92rem;
  width: 100%;
  transition: border-color .15s;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--muted); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-wash); }
.field textarea { min-height: 7rem; resize: vertical; }
.field .hint { font-size: .76rem; color: var(--muted); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }

.check { display: flex; align-items: flex-start; gap: .6rem; font-size: .86rem; color: var(--ink-2); }
.check input { width: 1.05rem; height: 1.05rem; margin-top: .2rem; accent-color: var(--accent); flex: none; }

.form-note { font-size: .78rem; color: var(--muted); max-width: 52ch; }

/* ==========================================================================
   Persona router
   ========================================================================== */

.router { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
@media (max-width: 860px) { .router { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .router { grid-template-columns: 1fr; } }
.router a {
  background: var(--panel); padding: 1.5rem 1.4rem 1.3rem;
  text-decoration: none; display: flex; flex-direction: column; gap: .45rem;
  transition: background .16s;
}
.router a:hover { background: var(--accent-wash); }
.router .n { font-family: var(--mono); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.router h3 { font-size: 1.05rem; letter-spacing: -.02em; }
.router p { font-size: .86rem; color: var(--ink-2); }

/* ==========================================================================
   Design cards
   ========================================================================== */

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
@media (max-width: 700px) { .card-grid { grid-template-columns: 1fr; } }

.card {
  background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius);
  display: flex; flex-direction: column; overflow: hidden;
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.card:hover { border-color: var(--muted); transform: translateY(-2px); box-shadow: var(--shadow); }

.card-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--panel-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-media img { transform: scale(1.035); }

.badges { position: absolute; inset: .6rem .6rem auto .6rem; display: flex; gap: .35rem; flex-wrap: wrap; }
.badge {
  font-family: var(--mono); font-size: .58rem; letter-spacing: .12em; text-transform: uppercase;
  padding: .28rem .5rem; border-radius: var(--radius); font-weight: 500;
  background: rgba(20,24,23,.82); color: #fff; backdrop-filter: blur(4px);
}
.badge-range { position: absolute; right: .6rem; bottom: .6rem; background: rgba(255,255,255,.92); color: #1B1F1E; }

.card-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .85rem; flex: 1; }
.card-title { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; }
.card-title h3 { font-size: 1.28rem; font-stretch: 106%; letter-spacing: -.03em; }
.card-title h3 a { text-decoration: none; }
.card-title h3 a:hover { color: var(--accent); }
.price { font-family: var(--mono); font-size: .92rem; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.price small { display: block; font-size: .58rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; text-align: right; }

/* --- in-card size variant toggle --- */
.sizes { display: flex; flex-direction: column; gap: .35rem; }
.sizes > span { font-family: var(--mono); font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; align-self: flex-start; }
.seg button {
  background: transparent; border: 0; cursor: pointer;
  padding: .32rem .68rem; font-family: var(--mono); font-size: .76rem; font-variant-numeric: tabular-nums;
  color: var(--ink-2); border-right: 1px solid var(--rule); transition: background .14s, color .14s;
}
.seg button:last-child { border-right: 0; }
.seg button:hover { background: var(--accent-wash); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.specs { display: flex; flex-wrap: wrap; gap: .3rem .95rem; margin-top: auto; padding-top: .3rem; }
.spec { display: inline-flex; align-items: center; gap: .3rem; font-size: .82rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.spec svg { width: 1.05rem; height: 1.05rem; flex: none; stroke: var(--muted); fill: none; stroke-width: 1.5; }

/* ==========================================================================
   Catalogue filters
   ========================================================================== */

.filters {
  background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .85rem; align-items: end;
}
.filters .reset { align-self: end; }
.result-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding-block: .3rem;
}
.result-count { font-family: var(--mono); font-size: .82rem; color: var(--muted); letter-spacing: .04em; }
.result-count b { color: var(--ink); font-weight: 600; }
.empty { padding: 3rem 1rem; text-align: center; color: var(--muted); border: 1px dashed var(--rule); border-radius: var(--radius); }

/* ==========================================================================
   Design detail
   ========================================================================== */

.anchor-bar {
  position: sticky; top: 4.05rem; z-index: 90;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(12px);
  border-block: 1px solid var(--rule);
  overflow-x: auto; scrollbar-width: thin;
}
.anchor-bar ul {
  max-width: var(--max); margin-inline: auto; padding: 0 var(--gutter);
  display: flex; gap: 1.6rem; list-style: none;
}
.anchor-bar a {
  display: block; padding: .8rem 0; text-decoration: none; white-space: nowrap;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); border-bottom: 2px solid transparent;
}
.anchor-bar a:hover, .anchor-bar a.active { color: var(--ink); border-bottom-color: var(--accent); }

.gallery { display: grid; grid-template-columns: 2fr 1fr; gap: .5rem; }
.gallery figure { position: relative; overflow: hidden; background: var(--panel-2); margin: 0; }
.gallery .lead { grid-row: span 2; aspect-ratio: 4/3; }
.gallery .lead img, .gallery figure img { width: 100%; height: 100%; object-fit: cover; }
.gallery .side { aspect-ratio: 16/10; }
.gallery figcaption {
  position: absolute; left: 0; bottom: 0; right: 0;
  font-family: var(--mono); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase;
  color: #fff; background: linear-gradient(transparent, rgba(12,16,15,.8)); padding: 1.6rem .7rem .5rem;
}
@media (max-width: 700px) { .gallery { grid-template-columns: 1fr; } .gallery .lead { grid-row: auto; } }

.spec-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1px; background: var(--rule); border: 1px solid var(--rule);
}
.spec-strip > div { background: var(--panel); padding: .95rem 1rem; }
.spec-strip dt { font-family: var(--mono); font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.spec-strip dd { font-size: 1.15rem; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin-top: .15rem; }

/* --- floorplan --- */
.plan-wrap { border: 1px solid var(--rule); background: var(--panel); border-radius: var(--radius); overflow: hidden; }
.plan-toolbar {
  display: flex; gap: .5rem; flex-wrap: wrap; align-items: center;
  padding: .7rem .9rem; border-bottom: 1px solid var(--rule); background: var(--panel-2);
}
.plan-toolbar .spacer { flex: 1; }
.plan-stage { padding: 1.2rem; overflow-x: auto; background: var(--panel); }
.plan-stage svg { margin-inline: auto; transition: transform .3s ease; min-width: 460px; }
.plan-stage.flipped svg { transform: scaleX(-1); }
.plan-stage.flipped svg text { transform: scaleX(-1); transform-origin: center; transform-box: fill-box; }
.fp-wall { stroke: var(--ink); stroke-width: 2.4; fill: none; }
.fp-int  { stroke: var(--muted); stroke-width: 1.2; fill: none; }
.fp-fill { fill: var(--accent-wash); stroke: none; }
.fp-lbl  { font-family: var(--mono); font-size: 8.5px; letter-spacing: .09em; fill: var(--ink-2); text-transform: uppercase; }
.fp-dim  { font-family: var(--mono); font-size: 7.5px; fill: var(--muted); }

.dim-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.dim-table caption {
  text-align: left; font-family: var(--mono); font-size: .62rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted); padding-bottom: .55rem;
}
.dim-table th, .dim-table td { text-align: left; padding: .5rem .7rem; border-bottom: 1px solid var(--rule-soft); }
.dim-table th { font-weight: 550; color: var(--ink-2); }
.dim-table td { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: .84rem; }
.dim-table tr:last-child th, .dim-table tr:last-child td { border-bottom: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 3rem; align-items: start; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

.opt-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .5rem; }
.opt-list li {
  display: flex; justify-content: space-between; gap: .8rem; align-items: baseline;
  border: 1px solid var(--rule); border-radius: var(--radius); padding: .6rem .8rem;
  background: var(--panel); font-size: .88rem;
}
.opt-list .figure { font-size: .82rem; color: var(--accent); font-weight: 600; }

/* ==========================================================================
   Feature bands
   ========================================================================== */

.split-band { display: grid; grid-template-columns: 1fr 1fr; gap: 0; align-items: stretch; border: 1px solid var(--rule); }
.split-band .media { min-height: 22rem; background: var(--panel-2); }
.split-band .media img { width: 100%; height: 100%; object-fit: cover; }
.split-band .content { padding: clamp(1.6rem, 4vw, 3.2rem); display: flex; flex-direction: column; gap: 1.1rem; justify-content: center; background: var(--panel); }
@media (max-width: 800px) { .split-band { grid-template-columns: 1fr; } .split-band .media { min-height: 15rem; } }

/* Column counts are pinned per item-count so the last row is never a part-row
   with an empty tinted cell hanging off the end. --4 divides by 2 and 4,
   --6 divides by 2 and 3. */
.pillars { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
@media (min-width: 620px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .pillars--4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px)  { .pillars--6 { grid-template-columns: repeat(3, 1fr); } }
.pillars > div { background: var(--panel); padding: 1.5rem 1.4rem; display: flex; flex-direction: column; gap: .5rem; }
.pillars .figure { font-size: 1.9rem; font-weight: 700; letter-spacing: -.04em; color: var(--accent); line-height: 1; }
.pillars h3 { font-size: .98rem; }
.pillars p { font-size: .85rem; color: var(--ink-2); }

.steps { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.step {
  display: grid; grid-template-columns: 4.5rem 1fr; gap: 0 1.6rem;
  padding: 1.3rem 0; border-bottom: 1px solid var(--rule-soft); align-items: start;
}
.step .num { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; color: var(--accent); padding-top: .3rem; }
.step h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.step p { font-size: .92rem; color: var(--ink-2); }
@media (max-width: 620px) { .step { grid-template-columns: 1fr; gap: .35rem; } }

.quote-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.quote {
  border: 1px solid var(--rule); background: var(--panel); border-radius: var(--radius);
  padding: 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .9rem;
}
.quote blockquote { font-size: 1.02rem; line-height: 1.5; letter-spacing: -.012em; }
.quote .who { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.quote .who b { color: var(--ink); font-weight: 600; }

/* --- estimator --- */
.est-layout { display: grid; grid-template-columns: 1.15fr .85fr; gap: 2rem; align-items: start; }
@media (max-width: 860px) { .est-layout { grid-template-columns: 1fr; } }
.est-panel { border: 1px solid var(--rule); background: var(--panel); border-radius: var(--radius); padding: 1.5rem; display: flex; flex-direction: column; gap: 1.2rem; }
.est-out { position: sticky; top: 6rem; border: 1.5px solid var(--ink); background: var(--panel); border-radius: var(--radius); }
.est-total { padding: 1.5rem; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: .3rem; }
.est-total .figure { font-size: clamp(2rem, 5vw, 2.9rem); font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.est-lines { list-style: none; padding: 1.1rem 1.5rem; display: flex; flex-direction: column; gap: .55rem; }
.est-lines li { display: flex; justify-content: space-between; gap: 1rem; font-size: .88rem; align-items: baseline; }
.est-lines li span:first-child { color: var(--ink-2); }
.est-lines li span:last-child { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: .84rem; }
.est-lines li.sub { border-top: 1px solid var(--rule-soft); padding-top: .55rem; font-weight: 650; }
.est-lines li.sub span:first-child { color: var(--ink); }
.est-foot { padding: 0 1.5rem 1.5rem; display: flex; flex-direction: column; gap: .8rem; }

input[type="range"] { width: 100%; accent-color: var(--accent); }
.range-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.range-head output { font-family: var(--mono); font-size: .84rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* --- callout --- */
.callout {
  border-left: 3px solid var(--accent); background: var(--accent-wash);
  padding: 1.1rem 1.3rem; border-radius: 0 var(--radius) var(--radius) 0;
  display: flex; flex-direction: column; gap: .4rem;
}
.callout h3 { font-size: 1rem; }
.callout p { font-size: .89rem; color: var(--ink-2); }
.callout--error { border-left-color: #B4462A; background: color-mix(in srgb, #B4462A 12%, var(--panel)); }
:root[data-theme="dark"] .callout--error,
:root:not([data-theme="light"]) .callout--error { border-left-color: #E8825F; }

/* honeypot — off-screen, never focusable, never announced */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- faq --- */
.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule-soft); }
.faq summary {
  cursor: pointer; padding: 1.05rem 2rem 1.05rem 0; position: relative;
  font-weight: 600; font-size: 1rem; letter-spacing: -.015em; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: .3rem; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); color: var(--accent); font-size: 1.2rem;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 1.1rem; color: var(--ink-2); font-size: .93rem; }

/* ==========================================================================
   CTA + footer
   ========================================================================== */

.cta-band { background: var(--invert-bg); color: var(--invert-fg); border-block: 1px solid var(--rule); }
.cta-band .wrap { padding-block: var(--band); display: flex; flex-direction: column; gap: 1.3rem; align-items: flex-start; }
.cta-band h2 { color: var(--invert-fg); }
.cta-band p { color: var(--invert-fg-2); }
.cta-band .eyebrow { color: var(--invert-fg-3); }
.cta-band .btn { background: var(--invert-fg); border-color: var(--invert-fg); color: #141817; }
.cta-band .btn:hover { background: var(--accent); border-color: var(--accent); color: #101614; }
.cta-band .btn-ghost { background: transparent; color: var(--invert-fg); border-color: var(--invert-line); }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,.1); color: var(--invert-fg); border-color: var(--invert-fg); }

.site-footer { border-top: 1px solid var(--rule); background: var(--panel); }
.footer-inner {
  max-width: var(--max); margin-inline: auto; padding: 3rem var(--gutter) 2rem;
  display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2.5rem 2rem;
}
@media (max-width: 820px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-col { display: flex; flex-direction: column; gap: .55rem; }
.footer-col h4 { font-family: var(--mono); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: .2rem; }
.footer-col a { text-decoration: none; font-size: .88rem; color: var(--ink-2); }
.footer-col a:hover { color: var(--accent); }
.footer-legal {
  max-width: var(--max); margin-inline: auto; padding: 1.2rem var(--gutter) 2.5rem;
  border-top: 1px solid var(--rule-soft);
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
  font-size: .76rem; color: var(--muted);
}
.footer-legal p { max-width: 62ch; }

.theme-toggle {
  background: none; border: 1px solid var(--rule); border-radius: var(--radius);
  padding: .4rem .55rem; cursor: pointer; line-height: 1;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2);
}
.theme-toggle:hover { border-color: var(--ink); color: var(--ink); }

/* ==========================================================================
   Reveal on scroll
   ========================================================================== */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* --- page intro --- */
.page-head { border-bottom: 1px solid var(--rule); background: var(--panel); }
.page-head .wrap { padding-block: clamp(2.5rem, 6vw, 4.5rem); display: flex; flex-direction: column; gap: .9rem; }
.crumbs { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
