:root {
  color-scheme: light dark;
  --bg: #f8f7f3;
  --bg-sunk: #efede7;
  --ink: #18201f;
  --ink-soft: #586360;
  --ink-faint: #8b928e;
  --rule: #d8dad5;
  --scenario: #d76a3a;
  --global: #315c72;
  --regional: #397d76;
  --eqm: #88733d;
  --ours: #684b8d;
  --reference: #202b29;
  --dur: 620ms;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141817;
    --bg-sunk: #1d2321;
    --ink: #edf0ed;
    --ink-soft: #b2bbb7;
    --ink-faint: #7f8984;
    --rule: #343c39;
    --scenario: #ef9169;
    --global: #72acc7;
    --regional: #72baae;
    --eqm: #d3b96d;
    --ours: #b092d5;
    --reference: #edf0ed;
  }
}

* { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.62 Lato, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--global); text-underline-offset: 0.18em; }
code { font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, monospace; }

.masthead {
  max-width: 760px;
  margin: 0 auto;
  padding: 22vh 24px 17vh;
}
.eyebrow, .part, .boundary-label {
  margin: 0 0 12px;
  color: var(--ink-faint);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.masthead h1 {
  margin: 0 0 20px;
  max-width: 10ch;
  font-size: clamp(42px, 7.5vw, 72px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.98;
}
.standfirst { margin: 0; max-width: 59ch; color: var(--ink-soft); font-size: 19px; }
.scroll-hint { margin-top: 58px; color: var(--ink-faint); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; }
.scroll-hint::after { content: ""; display: block; width: 1px; height: 44px; margin-top: 10px; background: linear-gradient(var(--ink-faint), transparent); }

.scrolly {
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  gap: 42px;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px;
  align-items: start;
}
.prose, .stage-wrap, .stage { min-width: 0; }
.step {
  display: flex;
  min-height: 84vh;
  flex-direction: column;
  justify-content: center;
  opacity: 0.38;
  transition: opacity 260ms ease;
}
.step.is-active { opacity: 1; }
.step h2 { margin: 0 0 16px; font-size: clamp(27px, 3vw, 38px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.08; }
.step p { margin: 0 0 16px; }
.aside { padding-left: 15px; border-left: 2px solid var(--rule); color: var(--ink-soft); font-size: 14px; }

.stage-wrap { position: sticky; top: var(--story-header-height, 72px); height: calc(100vh - var(--story-header-height, 72px)); height: calc(100svh - var(--story-header-height, 72px)); display: grid; place-items: center; }
.stage { width: min(100%, 820px); }
#stage { display: block; width: 100%; overflow: visible; }
.stage-caption { min-height: 1.7em; margin: 8px 0 0; color: var(--ink-faint); font-size: 12px; letter-spacing: 0.05em; text-align: center; }

#marks > * { transition: opacity var(--dur) ease, transform var(--dur) cubic-bezier(.35,.05,.2,1); }
.axis, .hairline { stroke: var(--rule); stroke-width: 1.5; fill: none; }
.arrow { stroke: var(--ink-faint); stroke-width: 1.7; fill: none; marker-end: url(#arrow); }
#arrow path { fill: var(--ink-faint); }
.label { fill: var(--ink-soft); font-size: 15px; }
.label-small { fill: var(--ink-faint); font-size: 12px; }
.label-tiny { fill: var(--ink-faint); font-size: 10px; letter-spacing: .08em; }
.label-pill { letter-spacing: .015em; }
.label-strong { fill: var(--ink); font-size: 17px; font-weight: 700; }
.scenario { fill: var(--scenario); stroke: var(--scenario); }
.global { fill: var(--global); stroke: var(--global); }
.regional { fill: var(--regional); stroke: var(--regional); }
.eqm { fill: var(--eqm); stroke: var(--eqm); }
.ours { fill: var(--ours); stroke: var(--ours); }
.reference { fill: var(--reference); stroke: var(--reference); }
.soft-fill { fill: var(--bg-sunk); stroke: var(--rule); stroke-width: 1.5; }
.outline { fill: none; stroke-width: 2; }
.model-line { fill: none; stroke: var(--global); stroke-width: 2; opacity: 0.65; }
.model-dot { fill: var(--global); }
.distribution { fill: none; stroke-width: 3; }
.chain-box { fill: var(--bg-sunk); stroke: var(--rule); }
.chain-text { fill: var(--ink-soft); font-size: 12px; }
.diagram-panel, .boundary-node { fill: color-mix(in srgb, var(--bg-sunk) 60%, var(--bg)); stroke: var(--rule); stroke-width: 1.4; }
.diagram-pill { fill: var(--bg-sunk); stroke: var(--rule); stroke-width: 1; }
.muted-pill { fill: color-mix(in srgb, var(--bg-sunk) 74%, var(--bg)); }
.trend-pill { fill: color-mix(in srgb, var(--scenario) 10%, var(--bg)); stroke: color-mix(in srgb, var(--scenario) 35%, var(--rule)); }
.eqm-pill { fill: color-mix(in srgb, var(--eqm) 12%, var(--bg)); stroke: color-mix(in srgb, var(--eqm) 38%, var(--rule)); }
.reference-pill { fill: color-mix(in srgb, var(--reference) 9%, var(--bg)); }
.future-pill { fill: color-mix(in srgb, var(--global) 10%, var(--bg)); }
.handoff-pill { fill: var(--bg); stroke: var(--eqm); }
.scenario-stroke { stroke: var(--scenario); }
.global-stroke { stroke: var(--global); }
.regional-stroke { stroke: var(--regional); }
.eqm-stroke { stroke: var(--eqm); }
.reference-stroke { stroke: var(--reference); }
.uncertainty-muted { fill: none; stroke: var(--rule); stroke-width: 2; }
.uncertainty-highlight { fill: none; stroke-width: 3; stroke-linecap: round; }
.uncertainty-baseline, .zero-line { fill: none; stroke: var(--rule); stroke-width: 1.2; stroke-dasharray: 4 5; }
.series-line { fill: none; stroke-width: 2.7; stroke-linecap: round; stroke-linejoin: round; }
.trend-line { fill: none; stroke: var(--scenario); stroke-width: 1.8; stroke-dasharray: 6 5; }
.distribution-muted { opacity: .62; }
.target-overlay { stroke-width: 2; stroke-dasharray: 4 5; }
.grid-cool { fill: color-mix(in srgb, var(--global) 18%, var(--bg)); stroke: var(--bg); stroke-width: 2; }
.grid-mid { fill: color-mix(in srgb, var(--regional) 24%, var(--bg)); stroke: var(--bg); stroke-width: 2; }
.grid-warm { fill: color-mix(in srgb, var(--scenario) 18%, var(--bg)); stroke: var(--bg); stroke-width: 2; }
.fine-cell { stroke-width: 1; }
.selected-cell { stroke: var(--ink); stroke-width: 3; }
.selected-cell-outline { fill: none; stroke: var(--ink); stroke-width: 3; }
.upstream-zone { fill: color-mix(in srgb, var(--eqm) 6%, var(--bg)); stroke: color-mix(in srgb, var(--eqm) 28%, var(--rule)); stroke-width: 1.5; }
.framklim-zone { fill: color-mix(in srgb, var(--ours) 6%, var(--bg)); stroke: color-mix(in srgb, var(--ours) 28%, var(--rule)); stroke-width: 1.5; }
.handoff-line { fill: none; stroke: var(--eqm); stroke-width: 1.5; stroke-dasharray: 6 6; }
.period-axis { fill: none; stroke: var(--rule); stroke-width: 2; }
.period-span { fill: none; stroke-width: 12; stroke-linecap: round; }
.period-cap { fill: none; stroke-width: 2; }
.period-gap { fill: none; stroke: var(--ink-faint); stroke-width: 2; stroke-dasharray: 3 7; }

.colophon { max-width: 940px; margin: 6vh auto 0; padding: 11vh 24px 12vh; border-top: 1px solid var(--rule); }
.colophon h2 { margin: 34px 0 12px; font-size: 20px; }
.colophon p { color: var(--ink-soft); }
.boundary { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.boundary > div { padding: 20px; }
.boundary > div + div { border-left: 1px solid var(--rule); }
.boundary p { margin: 0; }
.boundary-label { margin-bottom: 7px !important; }
.generated { margin-top: 32px; font-size: 12px; color: var(--ink-faint) !important; }

@media (max-width: 820px) {
  .masthead { padding-top: 14vh; }
  .scrolly { grid-template-columns: 1fr; gap: 0; padding: 0; }
  .stage-wrap { grid-row: 1; height: calc(56vh - var(--story-header-height, 72px)); top: var(--story-header-height, 72px); z-index: 2; background: var(--bg); border-bottom: 1px solid var(--rule); }
  .stage { width: 100%; padding: 0 8px; }
  .prose { grid-row: 2; }
  .step { min-height: 78vh; padding: 8vh 24px; opacity: 1; }
  .step h2, .step p { max-width: 620px; }
  .boundary { grid-template-columns: 1fr; }
  .boundary > div + div { border-left: 0; border-top: 1px solid var(--rule); }
}

@media (prefers-reduced-motion: reduce) {
  #marks > *, .step { transition: none; }
}
