/* Helivane site, built on the Helivane design system.
   Rules: one page background for every section, header and footer; no dividers between sections;
   no gradients, no transparency effects, no shadows. Depth comes from solid surface steps and the taper.
   Dark ("pre-dawn") is the default; light is opt-in through the header toggle. */

:root {
  --surface: #0E1316;
  --surface-raised: #172026;
  --surface-sunken: #080B0D;
  --ink: #ECEFEA;
  --muted: #A2ADB1;
  --brand: #F0A33B;
  --brand-strong: #FFC36E;
  --on-brand: #1A1206;
  --brand-soft: #33240F;
  --sky: #8CC0DE;
  --sky-soft: #132B39;
  --within: #7DB4F0;
  --within-soft: #14263D;
  --deviation: #FF907A;
  --deviation-soft: #3A1A14;
  --field-border: #6E7B81;
  --focus: #FFC36E;
  --grid: #25313A;

  --font-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --font-text: "Atkinson Hyperlegible Next", "Segoe UI", system-ui, sans-serif;
  --font-data: "Red Hat Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px;
  --space-6: 24px; --space-8: 32px; --space-10: 40px; --space-12: 48px; --space-16: 64px; --space-20: 80px;
  --radius-field: 2px;
  --taper-sm: 4px; --taper-md: 8px; --taper-lg: 16px;
  --max: 1200px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --surface: #F3F4F0; --surface-raised: #FFFFFF; --surface-sunken: #E6E9E3;
  --ink: #151A1C; --muted: #4B5458;
  --brand: #9F5C00; --brand-strong: #844C00; --on-brand: #FFFFFF; --brand-soft: #F6E5CB;
  --sky: #2A5873; --sky-soft: #DCE7EE;
  --within: #1D5A9E; --within-soft: #DFE9F6; --deviation: #AD2A12; --deviation-soft: #F8E1DB;
  --field-border: #737C80; --focus: #1D5A9E; --grid: #D3D8D1;
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--surface); color: var(--ink);
  font-family: var(--font-text); font-size: 17px; line-height: 27px;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--brand-strong); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: var(--space-4); top: var(--space-4); z-index: 100; background: var(--brand); color: var(--on-brand); padding: var(--space-2) var(--space-4); }
code { font-family: var(--font-data); font-size: 0.9em; background: var(--surface-sunken); padding: 1px 5px; }

.wrap {
  width: 100%; max-width: calc(var(--max) + 48px); margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}
@media (max-width: 640px) {
  .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
}

/* Taper: the left edge is shorter than the right, so shapes widen toward the future like the Cone mark */
.taper-sm { clip-path: polygon(0 var(--taper-sm), 100% 0, 100% 100%, 0 calc(100% - var(--taper-sm))); }
.taper-md { clip-path: polygon(0 var(--taper-md), 100% 0, 100% 100%, 0 calc(100% - var(--taper-md))); }
.taper-lg { clip-path: polygon(0 var(--taper-lg), 100% 0, 100% 100%, 0 calc(100% - var(--taper-lg))); }
.taper-sm:focus-visible, .taper-md:focus-visible, .taper-lg:focus-visible, .taper-sm:focus-within, .taper-md:focus-within { clip-path: none; }

/* Band marker: three growing bars (P10, P50, P90) */
.bm { display: inline-grid; gap: 2px; flex: none; }
.bm i { display: block; height: 3px; background: var(--sky); }
.bm i:nth-child(1) { width: 6px; } .bm i:nth-child(2) { width: 10px; } .bm i:nth-child(3) { width: 14px; }

/* ---------- Type ---------- */
.display-xl, .display, .h1, .h2, .brand span { font-family: var(--font-display); font-stretch: 118%; }
.display-xl { font-weight: 760; font-size: clamp(38px, 5.4vw, 64px); line-height: 1.02; letter-spacing: -0.02em; text-wrap: balance; }
.display { font-weight: 720; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.015em; text-wrap: balance; }
.h1 { font-weight: 700; font-size: clamp(24px, 2.8vw, 30px); line-height: 1.2; text-wrap: balance; }
.h2 { font-weight: 680; font-size: 21px; line-height: 28px; text-wrap: balance; }
.lead { font-size: 20px; line-height: 31px; color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }
.small { font-size: 15px; line-height: 23px; }
.label { font-family: var(--font-data); font-size: 12px; line-height: 16px; font-weight: 550; letter-spacing: 0.08em; text-transform: uppercase; }
.eyebrow { color: var(--sky); display: inline-flex; align-items: center; gap: var(--space-2); }
.mono { font-family: var(--font-data); font-variant-numeric: tabular-nums; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--surface); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--surface); }
.nav { display: flex; align-items: center; gap: var(--space-5); height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: none; }
.brand svg { width: 30px; height: 30px; color: var(--brand); }
.brand span { font-weight: 720; font-size: 23px; letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }
.nav > nav { margin-left: auto; }
.nav-links { display: flex; align-items: center; gap: var(--space-1); }
.nav-links > li { position: relative; }
.nav-link, .nav-menu-btn {
  font: inherit; font-size: 15px; font-weight: 700; color: var(--ink); text-decoration: none;
  background: var(--surface); border: 0; cursor: pointer; padding: var(--space-2) var(--space-3);
  display: inline-flex; align-items: center; gap: 6px;
}
.nav-link:hover, .nav-menu-btn:hover, .nav-menu-btn.is-active { color: var(--brand-strong); }
.nav-link[aria-current="page"] { color: var(--brand-strong); text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 2px; }
.nav-menu-btn svg { width: 10px; height: 10px; transition: transform 160ms ease-out; }
.nav-menu-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-menu {
  position: absolute; top: calc(100% + 8px); left: 0; width: 360px; background: var(--surface-raised);
  padding: var(--space-3); display: grid; gap: 2px; z-index: 70;
}
.nav-menu[hidden] { display: none; }
.nav-menu a { display: grid; gap: 2px; padding: var(--space-3); color: var(--ink); text-decoration: none; }
.nav-menu a:hover, .nav-menu a[aria-current="page"] { background: var(--brand-soft); }
.nav-menu a strong { font-family: var(--font-display); font-stretch: 118%; font-weight: 700; font-size: 17px; }
.nav-menu a span { font-size: 14px; line-height: 20px; color: var(--muted); }
.nav-menu-item-cta { display: none; }
.theme-toggle, .nav-toggle {
  width: 44px; height: 44px; display: inline-grid; place-items: center; flex: none;
  background: var(--surface-raised); color: var(--ink); border: 0; cursor: pointer;
}
.theme-toggle svg, .nav-toggle svg { width: 20px; height: 20px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun { display: block; }
:root[data-theme="light"] .theme-toggle .i-moon { display: none; }
.nav-toggle { display: none; }
.site-header .nav-cta-item, .site-header .nav-account-item { display: none; }
.nav-account { flex: none; font-size: 15px; font-weight: 700; color: var(--ink); text-decoration: none; padding: var(--space-2) var(--space-1); white-space: nowrap; }
.nav-account:hover { color: var(--brand-strong); text-decoration: underline; text-underline-offset: 6px; }
.nav-account[aria-current="page"] { color: var(--brand-strong); text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 2px; }
.nav-cta, .nav-link, .nav-menu-btn { white-space: nowrap; }
/* Mid widths: tighten the bar, then drop the header account link (still in the footer and the mobile menu). */
@media (max-width: 1400px) { .nav { gap: var(--space-4); } .nav-link, .nav-menu-btn { padding-inline: var(--space-2); } }
@media (min-width: 1081px) and (max-width: 1260px) { .site-header .nav > .nav-account { display: none; } }

@media (max-width: 1080px) {
  .nav { height: 64px; gap: var(--space-3); }
  .nav > nav { margin-left: 0; position: absolute; left: 0; right: 0; top: 64px; background: var(--surface); display: none; }
  .site-header.open .nav > nav { display: block; max-height: calc(100vh - 64px); overflow-y: auto; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; padding: var(--space-2) max(16px, env(safe-area-inset-left, 0px)) var(--space-8) max(16px, env(safe-area-inset-right, 0px)); }
  .nav-link, .nav-menu-btn { width: 100%; justify-content: space-between; padding: var(--space-4) 0; font-size: 18px; }
  .nav-menu { position: static; width: auto; padding: 0 0 var(--space-3); background: var(--surface); }
  .nav-menu a { padding: var(--space-3) var(--space-4); background: var(--surface-raised); }
  .site-header .nav > .nav-account { display: none; }
  .site-header .nav-links .nav-account-item { display: block; }
  .site-header .nav-links .nav-cta-item { display: block; padding-top: var(--space-4); }
  .site-header .nav-cta-item .btn { width: 100%; justify-content: center; }
  .theme-toggle { margin-left: auto; }
  .nav-toggle { display: inline-grid; }
}
@media (max-width: 480px) { .site-header .nav > .nav-cta { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px;
  padding: var(--space-3) var(--space-5) var(--space-3) var(--space-6); border: 0; cursor: pointer;
  font-family: var(--font-text); font-size: 15px; font-weight: 700; line-height: 20px; letter-spacing: 0.01em;
  text-decoration: none; transition: background-color 180ms ease-out, color 180ms ease-out;
  clip-path: polygon(0 var(--taper-sm), 100% 0, 100% 100%, 0 calc(100% - var(--taper-sm)));
}
.btn:focus-visible { clip-path: none; }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-strong); color: var(--on-brand); }
.btn-secondary { background: var(--surface-raised); color: var(--ink); }
.btn-secondary:hover { background: var(--sky-soft); color: var(--ink); }
.card .btn-secondary, .panel .btn-secondary, .form .btn-secondary { background: var(--surface-sunken); }
.btn-ghost { background: var(--surface); color: var(--brand-strong); padding-left: 0; padding-right: 0; text-decoration: underline; clip-path: none; }
.btn-ghost:hover { color: var(--ink); }
.btn-sm { min-height: 40px; padding: var(--space-2) var(--space-4) var(--space-2) var(--space-5); font-size: 14px; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); align-items: center; }

/* ---------- Tags ---------- */
.tag {
  display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-1) var(--space-3);
  font-family: var(--font-data); font-size: 12px; line-height: 16px; font-weight: 550; letter-spacing: 0.08em; text-transform: uppercase;
  clip-path: polygon(0 var(--taper-sm), 100% 0, 100% 100%, 0 calc(100% - var(--taper-sm)));
  background: var(--surface-sunken); color: var(--ink); white-space: nowrap;
}
.tag-brand { background: var(--brand-soft); color: var(--brand-strong); }
.tag-sky { background: var(--sky-soft); color: var(--sky); }
.tag-within { background: var(--within-soft); color: var(--within); }
.tag-deviation { background: var(--deviation-soft); color: var(--deviation); }

/* ---------- Sections and grid ---------- */
section { padding-block: var(--space-20); }
main > section:first-child { padding-top: var(--space-12); }
@media (max-width: 640px) { section { padding-block: var(--space-16); } main > section:first-child { padding-top: var(--space-8); } }
.sec-head { display: grid; gap: var(--space-4); max-width: 760px; margin-bottom: var(--space-10); }
.grid { display: grid; gap: var(--space-6); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1080px) { .cols-4, .cols-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cols-2, .cols-3, .cols-4, .cols-6 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Hero: example panel on the left, thesis on the right ---------- */
.hero { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-10) var(--space-8); align-items: center; }
.hero-panel { grid-column: 1 / span 7; min-width: 0; }
.hero-copy { grid-column: 8 / span 5; display: grid; gap: var(--space-5); min-width: 0; }
.hero-copy .lead { font-size: 18px; line-height: 28px; }
.hero-note { font-size: 14px; line-height: 20px; color: var(--muted); }
.hero-strip { grid-column: 1 / -1; }
.hero-solo .hero-copy { grid-column: 1 / span 8; }
@media (max-width: 960px) {
  .hero-panel, .hero-copy, .hero-solo .hero-copy { grid-column: 1 / -1; }
  .hero-copy { order: -1; }
}

/* ---------- Forecast panel and chart ---------- */
.panel { background: var(--surface-raised); padding: var(--space-6) var(--space-6) var(--space-5) var(--space-8); display: grid; gap: var(--space-4); min-width: 0; }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-2) var(--space-4); }
.panel-title { font-family: var(--font-display); font-stretch: 118%; font-weight: 700; font-size: 20px; line-height: 26px; }
.panel-foot { font-size: 14px; line-height: 20px; color: var(--muted); }
.chart { width: 100%; height: auto; }
.chart .g { stroke: var(--grid); stroke-width: 1; }
.chart .band { fill: var(--brand-soft); }
.chart .p50 { fill: none; stroke: var(--brand); stroke-width: 3; stroke-linejoin: round; }
.chart .real { fill: var(--ink); }
.chart .now { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 4; }
.chart .t { fill: var(--muted); font-family: var(--font-data); font-size: 12px; }
.chart .tb { fill: var(--brand-strong); font-family: var(--font-data); font-size: 12px; font-weight: 600; }
.chart .bar-p { fill: var(--brand); } .chart .bar-s { fill: var(--sky); } .chart .bar-q { fill: var(--surface-sunken); }
.legend { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); font-size: 14px; line-height: 20px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: var(--space-2); }
.legend i { display: inline-block; width: 14px; height: 10px; }
.legend .l-band { background: var(--brand-soft); } .legend .l-p50 { background: var(--brand); height: 3px; } .legend .l-real { background: var(--ink); width: 8px; height: 8px; }
.legend .l-sky { background: var(--sky); }
.readouts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
.readouts div { background: var(--surface-sunken); padding: var(--space-3) var(--space-4); display: grid; gap: 2px; min-width: 0; }
.readouts strong { font-family: var(--font-data); font-weight: 500; font-size: 20px; line-height: 26px; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .readouts { grid-template-columns: minmax(0, 1fr); } }
.panel dl { display: grid; grid-template-columns: auto 1fr; gap: 0; }
.panel dt, .panel dd { padding: var(--space-2) var(--space-3); font-size: 15px; line-height: 22px; }
.panel dt { color: var(--muted); }
.panel dd { font-family: var(--font-data); font-variant-numeric: tabular-nums; text-align: right; }
.panel dt:nth-of-type(odd), .panel dd:nth-of-type(odd) { background: var(--surface-sunken); }
.panel-action { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); justify-content: space-between; align-items: center; background: var(--brand-soft); padding: var(--space-3) var(--space-4); font-size: 15px; line-height: 22px; }

/* ---------- Cards, steps, metrics ---------- */
.card { background: var(--surface-raised); padding: var(--space-6) var(--space-6) var(--space-6) var(--space-8); display: grid; gap: var(--space-3); align-content: start; color: var(--ink); min-width: 0; }
.card p { color: var(--muted); font-size: 16px; line-height: 25px; }
.card-link { text-decoration: none; transition: background-color 180ms ease-out; }
.card-link:hover { background: var(--sky-soft); color: var(--ink); }
.card-link .more { color: var(--brand-strong); font-weight: 700; font-size: 15px; }
.card-sunken { background: var(--surface-sunken); }
.ticks { display: grid; gap: var(--space-2); }
.ticks li { display: grid; grid-template-columns: 14px 1fr; gap: var(--space-3); align-items: baseline; }
.ticks li::before { content: ""; width: 10px; height: 10px; background: var(--brand); clip-path: polygon(0 2px, 100% 0, 100% 100%, 0 8px); transform: translateY(1px); }
.steps { counter-reset: s; }
.step { background: var(--surface-raised); padding: var(--space-6) var(--space-6) var(--space-6) var(--space-8); display: grid; gap: var(--space-3); align-content: start; min-width: 0; }
.step p { color: var(--muted); font-size: 16px; line-height: 25px; }
.step .label { color: var(--sky); }
.metric { background: var(--surface-raised); padding: var(--space-5) var(--space-5) var(--space-5) var(--space-6); display: grid; gap: var(--space-1); align-content: start; min-width: 0; }
.metric .label { color: var(--muted); }
.metric-value { font-family: var(--font-data); font-weight: 500; font-size: 30px; line-height: 36px; font-variant-numeric: tabular-nums; }
.metric-value small { font-size: 15px; color: var(--muted); margin-left: var(--space-1); }
.metric p { font-size: 14px; line-height: 20px; color: var(--muted); }

/* ---------- Split ---------- */
.split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-10) var(--space-8); align-items: center; }
.split > .split-panel { grid-column: 1 / span 6; min-width: 0; }
.split > .split-copy { grid-column: 7 / span 6; display: grid; gap: var(--space-4); min-width: 0; }
.split.flip > .split-panel { grid-column: 7 / span 6; grid-row: 1; }
.split.flip > .split-copy { grid-column: 1 / span 6; grid-row: 1; }
.split.split-top { align-items: start; }
@media (max-width: 960px) { .split > .split-panel, .split > .split-copy, .split.flip > .split-panel, .split.flip > .split-copy { grid-column: 1 / -1; grid-row: auto; } }

/* ---------- Loop ---------- */
.loop { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-2); }
.loop-item { background: var(--surface-raised); padding: var(--space-5) var(--space-4) var(--space-5) var(--space-5); display: grid; gap: var(--space-2); align-content: start; text-decoration: none; color: var(--ink); min-width: 0; transition: background-color 180ms ease-out; }
.loop-item:hover { background: var(--sky-soft); color: var(--ink); }
.loop-item .label { color: var(--sky); }
.loop-item strong { font-family: var(--font-display); font-stretch: 118%; font-size: 19px; font-weight: 700; }
.loop-item p { font-size: 14px; line-height: 21px; color: var(--muted); }
.loop-item.is-active { background: var(--brand); color: var(--on-brand); }
.loop-item.is-active .label, .loop-item.is-active p { color: var(--on-brand); }
.loop-return { margin-top: var(--space-2); background: var(--surface-sunken); padding: var(--space-4) var(--space-5); display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); align-items: baseline; color: var(--muted); }
.loop-return .label { color: var(--brand-strong); }
@media (max-width: 1080px) { .loop { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .loop { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Autonomy ladder ---------- */
.ladder { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2); align-items: end; }
.rung { background: var(--surface-raised); padding: var(--space-5); display: grid; gap: var(--space-2); align-content: start; min-width: 0; }
.rung:nth-child(1) { min-height: 180px; } .rung:nth-child(2) { min-height: 210px; } .rung:nth-child(3) { min-height: 240px; } .rung:nth-child(4) { min-height: 270px; }
.rung .label { color: var(--brand-strong); }
.rung strong { font-family: var(--font-display); font-stretch: 118%; font-size: 19px; }
.rung p { font-size: 15px; line-height: 22px; color: var(--muted); }
@media (max-width: 960px) { .ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rung { min-height: 0 !important; } }
@media (max-width: 640px) { .ladder { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Stack chips ---------- */
.stack { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-2); }
.stack-item { background: var(--surface-raised); padding: var(--space-4) var(--space-4) var(--space-4) var(--space-5); display: grid; gap: 2px; min-width: 0; }
.stack-item strong { font-size: 16px; }
.stack-item span { font-size: 14px; line-height: 20px; color: var(--muted); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 15px; line-height: 22px; }
caption { text-align: left; color: var(--muted); padding-bottom: var(--space-3); }
th, td { text-align: left; padding: var(--space-3) var(--space-4); vertical-align: top; }
thead th { font-family: var(--font-data); font-size: 12px; line-height: 16px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 550; background: var(--surface); }
tbody tr:nth-child(odd) { background: var(--surface-raised); }
tbody tr:nth-child(even) { background: var(--surface-sunken); }
tbody th { font-weight: 700; }
td.yes { color: var(--within); font-weight: 700; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: var(--space-2); max-width: 880px; }
.faq details { background: var(--surface-raised); }
.faq summary { cursor: pointer; padding: var(--space-4) var(--space-5); font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: var(--space-4); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-data); color: var(--brand-strong); flex: none; }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 var(--space-5) var(--space-5); color: var(--muted); max-width: 70ch; }

/* ---------- CTA slab ---------- */
.cta { background: var(--brand); color: var(--on-brand); padding: var(--space-12) var(--space-10) var(--space-12) var(--space-12); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-6) var(--space-10); align-items: center; }
.cta p { max-width: 58ch; margin-top: var(--space-3); }
.cta .btn-primary { background: var(--on-brand); color: var(--brand); }
.cta .btn-primary:hover { background: var(--surface); color: var(--ink); }
.cta .btn-ghost { background: var(--brand); color: var(--on-brand); }
.cta :focus-visible { outline-color: var(--on-brand); }
@media (max-width: 800px) { .cta { grid-template-columns: minmax(0, 1fr); padding: var(--space-8) var(--space-6) var(--space-8) var(--space-8); } }

/* ---------- Code ---------- */
.code { background: var(--surface-sunken); min-width: 0; }
.code-bar { display: flex; justify-content: space-between; align-items: center; padding: var(--space-3) var(--space-4) var(--space-3) var(--space-6); background: var(--surface-raised); }
.code-bar .label { color: var(--muted); }
.copy-btn { font-family: var(--font-text); font-size: 14px; font-weight: 700; background: var(--surface-sunken); color: var(--ink); border: 0; padding: var(--space-2) var(--space-3); cursor: pointer; min-height: 36px; }
.copy-btn:hover { background: var(--sky-soft); }
.code pre { margin: 0; padding: var(--space-5) var(--space-6); overflow-x: auto; font-family: var(--font-data); font-size: 14px; line-height: 22px; color: var(--ink); }
.code .k { color: var(--sky); } .code .s { color: var(--brand-strong); } .code .c { color: var(--muted); }

/* ---------- Filter chips and scenario library ---------- */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-6); }
.chip { font-family: var(--font-text); font-size: 15px; font-weight: 700; padding: var(--space-2) var(--space-4); min-height: 40px; border: 0; background: var(--surface-raised); color: var(--ink); cursor: pointer; }
.chip:hover { background: var(--sky-soft); }
.chip[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); }
.filter-count { margin-bottom: var(--space-4); }
.scen { background: var(--surface-raised); padding: var(--space-5) var(--space-5) var(--space-5) var(--space-6); display: grid; gap: var(--space-3); align-content: start; min-width: 0; }
.scen[hidden] { display: none; }
.scen-head { display: flex; justify-content: space-between; gap: var(--space-3); align-items: baseline; flex-wrap: wrap; }
.scen strong { font-family: var(--font-display); font-stretch: 118%; font-size: 18px; }
.scen p { font-size: 15px; line-height: 22px; color: var(--muted); }
.scen dl { display: grid; grid-template-columns: auto 1fr; gap: 2px var(--space-3); font-size: 14px; line-height: 20px; }
.scen dt { color: var(--muted); } .scen dd { font-family: var(--font-data); text-align: right; }

/* ---------- Estimator ---------- */
.est { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-6); }
.est-inputs { grid-column: 1 / span 7; background: var(--surface-raised); padding: var(--space-6) var(--space-6) var(--space-6) var(--space-8); display: grid; gap: var(--space-5); min-width: 0; }
.est-out { grid-column: 8 / span 5; display: grid; gap: var(--space-2); align-content: start; min-width: 0; }
.range { display: grid; gap: var(--space-2); }
.range-top { display: flex; justify-content: space-between; gap: var(--space-3); font-weight: 700; }
.range output { font-family: var(--font-data); font-weight: 500; color: var(--brand-strong); }
input[type=range] { width: 100%; accent-color: var(--brand); min-height: 32px; }
.est-assume { font-size: 14px; line-height: 20px; color: var(--muted); }
@media (max-width: 960px) { .est-inputs, .est-out { grid-column: 1 / -1; } }

/* ---------- Forms ---------- */
.form { background: var(--surface-raised); padding: var(--space-8) var(--space-8) var(--space-8) var(--space-10); display: grid; gap: var(--space-5); min-width: 0; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); }
@media (max-width: 640px) { .form { padding: var(--space-6); } .form-row { grid-template-columns: minmax(0, 1fr); } }
.field { display: grid; gap: var(--space-2); min-width: 0; }
.field label, .field legend { font-weight: 700; font-size: 15px; line-height: 20px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 44px; padding: var(--space-2) var(--space-3); font: inherit; font-size: 16px;
  color: var(--ink); background: var(--surface); border: 1px solid var(--field-border); border-radius: var(--radius-field);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.hint { font-size: 14px; line-height: 20px; color: var(--muted); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--deviation); }
.field.invalid .hint, .check.invalid .hint { color: var(--deviation); }
.check { display: grid; grid-template-columns: 24px 1fr; gap: var(--space-3); align-items: start; font-size: 15px; line-height: 22px; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--brand); }
.check .hint { grid-column: 2; }
.form-status { padding: var(--space-4) var(--space-5); background: var(--within-soft); color: var(--ink); font-size: 15px; line-height: 22px; }
.form-status.err { background: var(--deviation-soft); }
.form-status[hidden] { display: none; }
.emails { display: grid; gap: var(--space-2); }
.email-row { background: var(--surface-raised); padding: var(--space-4) var(--space-5); display: grid; gap: 2px; }
.email-row .mono { font-size: 17px; user-select: all; color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); padding-block: var(--space-16) var(--space-10); }
.foot { display: grid; grid-template-columns: 2fr repeat(4, minmax(0, 1fr)); gap: var(--space-8); }
.foot-brand { display: grid; gap: var(--space-4); align-content: start; max-width: 340px; }
.foot-brand p { font-size: 15px; line-height: 23px; color: var(--muted); }
.foot h2 { font-family: var(--font-data); font-size: 12px; line-height: 16px; font-weight: 550; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--space-3); }
.foot ul { display: grid; gap: var(--space-2); }
.foot ul a { color: var(--ink); text-decoration: none; font-size: 15px; }
.foot ul a:hover { color: var(--brand-strong); text-decoration: underline; }
.foot-base { margin-top: var(--space-12); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); font-size: 14px; color: var(--muted); }
@media (max-width: 960px) { .foot { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .foot { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
