/* Buzora — site styles. Every colour, face and length goes through a token here. */
:root {
  /* night: the brand navy taken down to the dark it is seen against */
  --night: #050817;
  --night-2: #0a1130;
  --night-rule: #1c2547;
  --night-sep: #3a4670;
  --on-night: #e8ecf7;
  --on-night-2: #8f98b3;
  /* paper: porcelain, a breath of the same blue */
  --paper: #f3f4f7;
  --paper-2: #e9ebf1;
  --rule: #d6d9e2;
  --ink: #0a1024;
  --ink-2: #525b72;
  /* the one signal: the blue node in the logo */
  --signal: #5b8cff;
  --signal-fill: #2457e6;
  --signal-ink: #ffffff;
  --focus: #8fb0ff;

  --sans: "Host Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 40px;
  --s-7: 64px; --s-8: 96px; --s-9: 144px; --s-10: 200px;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --measure: 40rem;
  --nav-h: 68px;

  --t-display: clamp(2.9rem, 7.2vw, 7rem);
  --t-h2: clamp(2.1rem, 4.2vw, 3.9rem);
  --t-h3: clamp(1.35rem, 1.8vw, 1.6rem);
  --t-lead: clamp(1.13rem, 1.35vw, 1.3rem);
  --t-body: 1.0625rem;
  --t-small: 0.875rem;
  --t-mono: 0.72rem;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --grain-opacity: 0.06;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; background: var(--night); scrollbar-color: var(--night-rule) var(--night); }
body {
  margin: 0; overflow-x: clip;
  background: var(--night); color: var(--on-night);
  font-family: var(--sans); font-size: var(--t-body); line-height: 1.6; font-weight: 400;
  font-synthesis: none; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: var(--signal-fill); color: var(--signal-ink); }
img, svg, canvas { display: block; max-width: 100%; }
p { margin: 0 0 1em; text-wrap: pretty; }
h1, h2, h3 { margin: 0; font-weight: 430; text-wrap: balance; overflow-wrap: break-word; min-width: 0; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.paper :focus-visible { outline-color: var(--signal-fill); }
.mono { font-family: var(--mono); font-size: var(--t-mono); letter-spacing: 0; font-weight: 400; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: var(--s-4); top: -60px; z-index: 400; background: var(--paper); color: var(--ink); padding: var(--s-2) var(--s-4); }
.skip:focus { top: var(--s-4); }

/* ---------------------------------------------------------------- type */
.display {
  font-size: var(--t-display); line-height: 0.96; letter-spacing: -0.045em; font-weight: 420;
  margin-left: -0.05em;
}
.display-2 { display: block; color: var(--on-night-2); }
@media (max-width: 760px) { .hero .display { font-size: clamp(2.2rem, 10.6vw, 3rem); } }
.h2 { font-size: var(--t-h2); line-height: 1.02; letter-spacing: -0.035em; font-weight: 430; margin-left: -0.04em; }
.h3 { font-size: var(--t-h3); line-height: 1.2; letter-spacing: -0.015em; font-weight: 500; margin: var(--s-8) 0 var(--s-4); }
.lead { font-size: var(--t-lead); line-height: 1.5; font-weight: 380; }
.note { font-size: var(--t-small); color: var(--ink-2); margin-top: var(--s-3); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 0 var(--s-5);
  background: var(--signal-fill); color: var(--signal-ink);
  font: 500 var(--t-body)/1 var(--sans); letter-spacing: -0.005em; text-decoration: none;
  border-radius: 999px; border: 0;
  transition: transform 0.25s var(--ease-out), background-color 0.25s var(--ease-out);
}
.btn:hover { background: #1d4bd0; }
.btn:active { transform: scale(0.97); }
.btn-small { min-height: 38px; padding: 0 var(--s-4); font-size: var(--t-small); }
.link-quiet { color: var(--on-night); text-decoration: none; border-bottom: 1px solid var(--night-rule); padding-bottom: 2px; transition: border-color 0.25s; }
.link-quiet:hover { border-color: var(--on-night); }

/* ---------------------------------------------------------------- the world */
.world { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: var(--night); }
.world canvas, .world-poster { position: absolute; inset: 0; width: 100%; height: 100%; }
.world-poster { object-fit: cover; opacity: 0; transition: opacity 0.6s; }
.no-js .world-poster, .no-webgl .world-poster { opacity: 1; }
.no-webgl .world canvas { display: none; }
.world canvas { opacity: 0; }
.world-ready .world canvas { opacity: 1; }
.world-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 60% 45%, transparent 55%, rgba(5, 8, 23, 0.65) 100%);
}
.world-labels { position: absolute; inset: 0; overflow: hidden; }
.wl {
  position: absolute; left: 0; top: 0; white-space: nowrap;
  font: 400 0.68rem/1 var(--mono); color: var(--on-night-2);
  opacity: 0; will-change: transform, opacity;
  margin: -0.5em 0 0 0;
}
.wl-today { color: var(--on-night); transform-origin: left; padding-left: 10px; margin-top: -1.4em; }
.wl-day { margin-left: -1.8em; margin-top: 0.6em; }
.wl-mid { color: var(--signal); margin-left: -2em; margin-top: -1.6em; }
.wl-base { margin-left: -6em; }
.wl-note { color: var(--on-night-2); margin-left: -3em; }
.wl-side { margin-left: 0; }

/* ---------------------------------------------------------------- nav */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 300; height: var(--nav-h);
  display: flex; align-items: center; gap: var(--s-6);
  padding: 0 var(--gutter);
  color: var(--on-night);
  transition: background-color 0.4s var(--ease-out), color 0.4s var(--ease-out), border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-solid { background: rgba(5, 8, 23, 0.72); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-color: rgba(28, 37, 71, 0.8); }
html[data-ground="paper"] .nav { background: rgba(243, 244, 247, 0.86); color: var(--ink); border-color: var(--rule); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.brand { display: inline-flex; align-items: center; gap: var(--s-3); text-decoration: none; margin-right: auto; }
.mark { width: 46px; height: auto; color: currentColor; }
.wordmark { font-weight: 400; font-size: 0.95rem; letter-spacing: 0.32em; position: relative; }
.wordmark-a { position: relative; }
.wordmark-a::after { content: ""; position: absolute; left: 0.12em; right: 0.12em; bottom: -0.32em; height: 1.5px; background: var(--signal); }
.nav-links { display: flex; gap: var(--s-5); }
.nav-links a { text-decoration: none; font-size: var(--t-small); color: inherit; opacity: 0.78; transition: opacity 0.2s; }
.nav-links a:hover { opacity: 1; }
.nav-links .nav-demo-link { opacity: 1; color: var(--signal); }
html[data-ground="paper"] .nav-links .nav-demo-link { color: var(--signal-fill); }

/* ---------------------------------------------------------------- scenes */
main { position: relative; z-index: 1; }
section { position: relative; }
.scene-night { color: var(--on-night); }

/* 1 · hero */
.hero {
  min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end; padding: calc(var(--nav-h) + var(--s-7)) var(--gutter) var(--s-7);
  max-width: var(--max); margin: 0 auto; gap: var(--s-6);
}
.hero-copy { grid-column: 1 / span 2; max-width: 62rem; position: relative; }
/* a scrim only where the words sit, so the light behind them never costs legibility */
.hero-copy::before {
  content: ""; position: absolute; z-index: -1; inset: -12% -8% -18% -30%;
  background: radial-gradient(ellipse 62% 58% at 42% 52%, rgba(5, 8, 23, 0.86) 35%, rgba(5, 8, 23, 0) 100%);
  pointer-events: none;
}
.hero-lead { max-width: 34rem; margin-top: var(--s-6); color: var(--on-night); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-5); margin-top: var(--s-5); }
.hero-caption {
  position: absolute; right: var(--gutter); bottom: var(--s-7); max-width: 17rem;
  font-size: 0.8rem; line-height: 1.5; color: var(--on-night-2); margin: 0;
}
.hero-caption .mono { display: block; color: var(--on-night); margin-bottom: var(--s-2); }
.hero-caption .mono::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); margin-right: 8px; vertical-align: 1px; box-shadow: 0 0 0 0 rgba(91, 140, 255, 0.5); animation: live 2.4s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(91,140,255,0.45); } 70% { box-shadow: 0 0 0 7px rgba(91,140,255,0); } 100% { box-shadow: 0 0 0 0 rgba(91,140,255,0); } }

/* sticky stages for the stepped scenes */
.import { height: 420svh; }
.forecast { height: 380svh; }
.sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; }

/* 2 · import */
.steps { list-style: none; margin: var(--s-6) 0 0; padding: 0; display: grid; }
.steps .step { grid-area: 1 / 1; opacity: 0; transform: translateY(14px); transition: opacity 0.6s var(--ease-out), transform 0.8s var(--ease-out); }
.steps .step.is-on { opacity: 1; transform: none; }
.steps .step p { max-width: 30rem; color: var(--on-night-2); }
.step-title { color: var(--on-night) !important; font-size: var(--t-lead); font-weight: 450; letter-spacing: -0.01em; margin-bottom: var(--s-3); }
.step-count { margin-top: var(--s-5); color: var(--on-night-2); }

.sheet {
  margin: 0; border: 1px solid var(--night-rule); border-radius: 14px;
  background: rgba(8, 13, 34, 0.66); backdrop-filter: blur(18px) saturate(1.15); -webkit-backdrop-filter: blur(18px) saturate(1.15);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}
.sheet-bar { display: flex; justify-content: space-between; gap: var(--s-4); padding: var(--s-3) var(--s-5); border-bottom: 1px solid var(--night-rule); color: var(--on-night-2); }
.sheet-file { color: var(--on-night); }
.sheet-body { display: grid; min-height: 340px; }
.sheet-pane { grid-area: 1 / 1; padding: var(--s-5); opacity: 0; transition: opacity 0.6s var(--ease-out); overflow: hidden; }
.sheet-pane.is-on { opacity: 1; }
.raw { margin: 0; color: var(--on-night-2); font-size: 0.7rem; line-height: 2.05; white-space: pre; overflow: hidden; }
.raw .hl { color: var(--on-night); }
.raw .odd { color: var(--on-night); text-decoration: underline dotted var(--signal); text-underline-offset: 0.35em; }
.map { width: 100%; border-collapse: collapse; font-size: var(--t-small); }
.map th { text-align: left; font-weight: 400; color: var(--on-night-2); padding: 0 0 var(--s-3); border-bottom: 1px solid var(--night-rule); }
.map td { padding: 9px 0; border-bottom: 1px solid rgba(28, 37, 71, 0.6); }
.map td:first-child { font-family: var(--mono); font-size: 0.72rem; color: var(--on-night-2); }
.map td:last-child { color: var(--on-night); }
.map td:last-child::before { content: "→"; color: var(--signal); margin-right: var(--s-3); }
.clean-wrap { overflow: hidden; }
.clean { border-collapse: collapse; font-size: 0.68rem; width: 100%; }
.clean th { font-weight: 400; color: var(--on-night-2); text-align: right; padding: 0 0 var(--s-3) var(--s-4); border-bottom: 1px solid var(--night-rule); white-space: nowrap; }
.clean td { text-align: right; padding: 8px 0 8px var(--s-4); border-bottom: 1px solid rgba(28, 37, 71, 0.6); white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--on-night); }
.clean th:first-child, .clean td:first-child { text-align: left; padding-left: 0; }
.sheet-cap { padding: var(--s-3) var(--s-5) var(--s-4); border-top: 1px solid var(--night-rule); font-size: 0.8rem; color: var(--on-night-2); }

/* the importer, live: one pass over the real file, driven by scroll */
.sheet-stage { display: none; }
.sheet-stats { display: none; }
.sheet.is-live .sheet-body { display: block; min-height: 0; }
.sheet.is-live .sheet-pane { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; padding: 0; }
.sheet.is-live .sheet-stage {
  display: block; position: relative; overflow: hidden; margin: var(--s-4) var(--s-5) var(--s-3);
  font-family: var(--mono); font-weight: 400; line-height: 1; font-variant-numeric: tabular-nums;
}
.sheet.is-live .sheet-stats {
  display: flex; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-3) var(--s-5); border-top: 1px solid var(--night-rule); color: var(--on-night-2);
}
.sheet-stats b { font-weight: 400; color: var(--on-night); }
.sheet-stage .more { color: var(--on-night-2); white-space: nowrap; opacity: 0; }
.sheet-stage .cell, .sheet-stage .sep, .sheet-stage .rule, .sheet-stage .flag, .sheet-stage .scan, .sheet-stage .more {
  position: absolute; left: 0; top: 0; will-change: transform, opacity;
}
.sheet-stage .cell { white-space: pre; color: var(--on-night-2); transition: color 0.35s var(--ease-out); }
.sheet-stage .cell.hdr { color: var(--on-night); }
.sheet-stage .cell.is-clean { color: var(--on-night); }
.sheet-stage .cell.hdr.is-clean { color: var(--on-night-2); }
.sheet-stage .cell.is-odd { color: var(--on-night); text-decoration: underline dotted var(--signal); text-underline-offset: 0.45em; }
.sheet-stage .cell.is-dropped { text-decoration: line-through; text-decoration-color: var(--on-night-2); }
.sheet.is-hot .sheet-stage .cell.rev.is-clean { color: var(--signal); }
.sheet.is-hot .sheet-stage .cell.rev.hdr.is-clean { color: var(--signal); }
.sheet-stage .sep { color: var(--night-sep); }
.sheet-stage .rule { height: 1px; background: var(--night-rule); opacity: 0; }
.sheet-stage .scan {
  right: 0; height: 1px; opacity: 0;
  background: linear-gradient(90deg, rgba(91, 140, 255, 0), var(--signal) 18%, var(--signal) 82%, rgba(91, 140, 255, 0));
  box-shadow: 0 0 12px 2px rgba(91, 140, 255, 0.45);
}
.sheet-stage .flag { font-size: 0.82em; color: var(--signal); white-space: nowrap; opacity: 0; background: var(--night-2); padding: 0.15em 0.45em 0.15em 0; border-radius: 3px; }
.sheet-stage .flag::before { content: ""; display: inline-block; width: 1px; height: 0.9em; background: var(--signal); margin-right: 0.5em; vertical-align: -0.1em; opacity: 0.7; }


/* 3 · forecast */
.forecast-copy {
  position: absolute; left: var(--gutter); bottom: var(--s-8);
  width: min(30rem, 40vw);
}
/* a scrim only where the words sit, so the light behind them never costs legibility */
.forecast-copy::before {
  content: ""; position: absolute; z-index: -1; inset: -30% -40% -30% -30%; pointer-events: none;
  background: radial-gradient(ellipse 60% 55% at 40% 55%, rgba(5, 8, 23, 0.82) 30%, rgba(5, 8, 23, 0) 100%);
}
.steps-forecast { margin: 0; }
.steps-forecast .h2 { font-size: clamp(2rem, 3.1vw, 3rem); margin-bottom: var(--s-5); }
.forecast-fallback { display: none; }
.no-webgl .forecast-fallback, .no-js .forecast-fallback { display: block; }

/* paper scenes */
.paper {
  background: var(--paper); color: var(--ink);
  padding: var(--s-10) var(--gutter);
}
.paper .lead { color: var(--ink); }
.paper p { color: var(--ink); }
.accuracy { border-radius: 28px 28px 0 0; box-shadow: 0 -30px 80px -20px rgba(0, 0, 0, 0.5); }
.column { max-width: var(--measure); margin: 0 auto; }
.column .lead { margin-top: var(--s-6); }

.figure-pair {
  max-width: 64rem; margin: var(--s-9) auto var(--s-8);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-7);
  border-top: 1px solid var(--ink); padding-top: var(--s-6);
}
.big-figure { margin: 0; }
.ruled-real { margin-top: var(--s-7); }
.figure-trio { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: var(--max); }
.figure-trio .numeral { font-size: clamp(3.2rem, 6vw, 6.4rem); }
.figure-trio .big-figure figcaption { font-size: 0.95rem; }
.numeral { white-space: nowrap; font-size: clamp(3.6rem, 8.2vw, 8.4rem); line-height: 0.9; letter-spacing: -0.055em; font-weight: 380; margin: 0 0 var(--s-5) -0.06em; font-variant-numeric: tabular-nums; }
.numeral span { color: var(--ink); }
.numeral { color: var(--ink-2); }
.big-figure figcaption { max-width: 26rem; color: var(--ink-2); font-size: 1rem; }
.big-figure strong { color: var(--ink); font-weight: 500; }

.ruled { width: 100%; border-collapse: collapse; margin: var(--s-5) 0 0; font-size: 1rem; }
.ruled caption { text-align: left; font-size: var(--t-small); color: var(--ink-2); padding-bottom: var(--s-3); }
.ruled th, .ruled td { padding: 14px 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; font-weight: 400; }
.ruled thead th { font-size: var(--t-small); color: var(--ink-2); border-bottom-color: var(--ink); padding-top: 0; }
.ruled .num { text-align: right; font-variant-numeric: tabular-nums; padding-left: var(--s-5); white-space: nowrap; }
.ruled tbody th { padding-right: var(--s-5); }
.grades td:nth-child(4), .grades th:nth-child(4) { color: var(--ink-2); padding-left: var(--s-5); }
.grades td:last-child, .grades th:last-child { padding-left: var(--s-4); }

.lessons { padding: 0; margin: 0; list-style: none; counter-reset: l; }
.lessons li { counter-increment: l; display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); padding: var(--s-4) 0; border-top: 1px solid var(--rule); }
.lessons li::before { content: counter(l); font-family: var(--mono); font-size: var(--t-mono); color: var(--ink-2); padding-top: 0.5em; }
.lessons p { margin: 0; }
.lessons strong { font-weight: 500; }

.screen { max-width: 76rem; margin: var(--s-9) auto; }
.screen-frame {
  border-radius: 12px; overflow: hidden; background: #0d1736;
  box-shadow: 0 1px 0 rgba(10, 16, 36, 0.06), 0 30px 60px -30px rgba(10, 16, 36, 0.35), 0 70px 120px -60px rgba(10, 16, 36, 0.3);
}
.screen img { width: 100%; height: auto; }
.screen figcaption { max-width: var(--measure); margin: var(--s-4) auto 0; color: var(--ink-2); font-size: var(--t-small); }

/* 5 · decisions */
.decisions { padding-top: var(--s-8); }
.decisions-grid {
  max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--s-8); align-items: start; padding-bottom: var(--s-6);
}
.decisions-copy { position: sticky; top: calc(var(--nav-h) + var(--s-6)); }
.decisions-copy .h2 { margin-bottom: var(--s-6); }
.decisions-copy p { max-width: 30rem; }
.instrument {
  margin: 0; background: #fbfbfd; border: 1px solid var(--rule); border-radius: 16px; padding: var(--s-6);
  box-shadow: 0 1px 0 rgba(255,255,255,0.8) inset, 0 30px 60px -40px rgba(10, 16, 36, 0.25);
}
.inst-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); }
.inst-label { font-weight: 500; }
.inst-value { font-size: 1.1rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.inst-scale { display: flex; justify-content: space-between; color: var(--ink-2); margin-top: var(--s-2); }
.inst-scale span:nth-child(2) { opacity: 0.8; }
.lever { width: 100%; margin: var(--s-5) 0 0; accent-color: var(--signal-fill); height: 28px; cursor: pointer; }
.lever::-webkit-slider-runnable-track { height: 2px; background: var(--ink); }
.lever::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--signal-fill); margin-top: -10px; border: 3px solid #fbfbfd; box-shadow: 0 0 0 1px var(--signal-fill); }
.lever::-moz-range-track { height: 2px; background: var(--ink); }
.lever::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--signal-fill); border: 3px solid #fbfbfd; box-shadow: 0 0 0 1px var(--signal-fill); }
.lever { -webkit-appearance: none; appearance: none; background: transparent; }
.sweep { width: 100%; height: auto; margin-top: var(--s-6); overflow: visible; }
.sweep text { font-family: var(--mono); font-size: 10px; fill: var(--ink-2); }
.readout { margin: var(--s-5) 0 0; font-size: 1.05rem; min-height: 4.8em; }
.readout strong { font-weight: 500; }
.readout .verdict { display: block; margin-top: var(--s-2); color: var(--ink-2); }
.inst-cap { margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--rule); font-size: var(--t-small); color: var(--ink-2); }
.loops { padding-top: var(--s-6); }
.loops .h3 { margin-top: var(--s-7); }
.quote { margin: var(--s-7) 0; padding: 0; }
.quote p { font-size: clamp(1.4rem, 2.2vw, 1.9rem); line-height: 1.3; letter-spacing: -0.02em; font-weight: 400; }
.quote footer { font-size: var(--t-small); color: var(--ink-2); }

/* 6 · ask */
.ask { padding: var(--s-10) var(--gutter); }
.ask::before { content: ""; position: absolute; inset: 0 0 auto; height: 160px; background: linear-gradient(var(--paper), transparent); opacity: 0; }
.ask-grid { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s-8); align-items: start; }
.ask-notes .h2 { margin-bottom: var(--s-6); }
.ask-notes p { color: var(--on-night-2); max-width: 30rem; }
.ask-notes p:first-of-type { color: var(--on-night); }
.note-night { font-size: var(--t-small); border-left: 1px solid var(--night-rule); padding-left: var(--s-4); }
.convo { display: grid; gap: var(--s-4); padding-top: var(--s-3); }
.msg { margin: 0; max-width: 34rem; padding: var(--s-4) var(--s-5); border-radius: 16px; line-height: 1.5; }
.msg-you { justify-self: end; background: var(--on-night); color: var(--ink); border-bottom-right-radius: 4px; }
.msg-buzora { background: rgba(10, 17, 48, 0.72); border: 1px solid var(--night-rule); border-bottom-left-radius: 4px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.call { border-left: 1px solid var(--signal); padding: var(--s-1) 0 var(--s-1) var(--s-4); color: var(--on-night-2); }
.call p { margin: 0 0 4px; }
.call span { color: var(--on-night); }
.call-name { color: var(--signal) !important; }
.call-result { border-collapse: collapse; width: min(100%, 26rem); margin-left: var(--s-4); color: var(--on-night-2); }
.call-result th { font-weight: 400; text-align: left; padding: 0 0 6px; border-bottom: 1px solid var(--night-rule); }
.call-result td { padding: 5px 0; border-bottom: 1px solid rgba(28, 37, 71, 0.55); font-variant-numeric: tabular-nums; }
.call-result .num { text-align: right; }
.call-result td.num:last-child { color: var(--on-night); }

/* 7 · door */
.door { min-height: 100svh; display: grid; align-items: center; padding: var(--s-9) var(--gutter); }
.door-copy { max-width: var(--max); margin: 0 auto; width: 100%; }
.door-title { font-size: clamp(1.95rem, 6.2vw, 6rem); }
.door-title .display-1 { display: block; color: var(--on-night-2); }
.door .lead { max-width: 34rem; margin-top: var(--s-6); color: var(--on-night); }
.door-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-5); margin-top: var(--s-6); }
.slot { font-size: var(--t-small); color: var(--on-night-2); border: 1px dashed var(--night-rule); border-radius: 8px; padding: var(--s-2) var(--s-3); }

/* footer */
.footer { position: relative; z-index: 1; padding: var(--s-8) var(--gutter) var(--s-6); border-top: 1px solid var(--night-rule); background: var(--night); }
.footer-mark {
  font-size: clamp(4rem, 17.5vw, 17rem); line-height: 0.8; letter-spacing: 0.06em; font-weight: 300;
  margin: 0 0 var(--s-7) -0.04em; color: var(--on-night); white-space: nowrap;
}
.footer-mark .wordmark-a::after { height: 0.022em; bottom: 0.06em; left: 0.16em; right: 0.16em; }
.footer-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto; gap: var(--s-6); font-size: var(--t-small); color: var(--on-night-2); max-width: var(--max); }
.tagline { color: var(--on-night); letter-spacing: 0.02em; }
.footer-note { max-width: 36rem; }

/* ---------------------------------------------------------------- phones */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .decisions-copy { position: static; }
  .forecast-copy { top: auto; bottom: var(--s-6); transform: none; width: auto; right: var(--gutter); }
  .steps-forecast .h2 { font-size: 1.9rem; margin-bottom: var(--s-3); }
  .figure-pair, .figure-trio { grid-template-columns: minmax(0, 1fr); }
  .footer-row { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
}
@media (max-width: 760px) {
  :root { --nav-h: 60px; }
  .wordmark { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); padding-bottom: var(--s-6); }
  .hero-copy { grid-column: 1; }
  .hero-caption { position: static; grid-row: 1; align-self: start; max-width: none; display: none; }
  .hero-lead { margin-top: var(--s-5); }
  .import { height: 380svh; }
  .sheet { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  .sheet-body { flex: 1 1 auto; min-height: 0; overflow: hidden; }
  .sheet-cap { display: none; }
  .sheet.is-live .sheet-stage { margin: var(--s-3) var(--s-3); }
  .sheet.is-live .sheet-stats { padding: var(--s-2) var(--s-4); }
  .sheet-stats .long { display: none; }
  .sheet-meta { display: none; }
  .map td { padding: 6px 0; font-size: 0.82rem; }
  .map td:first-child { white-space: nowrap; padding-right: var(--s-3); font-size: 0.64rem; }
  .sweep text { font-size: 19px; }
  .inst-scale span:nth-child(2) { display: none; }
  .steps { margin-top: var(--s-4); }
  .steps .step p:not(.step-title) { font-size: 0.95rem; }
  .sheet-body { min-height: 300px; }
  .raw { font-size: 0.6rem; }
  .clean { font-size: 0.62rem; }
  .forecast { height: 340svh; }
  .steps-forecast p { font-size: 0.95rem; }
  .paper { padding: var(--s-8) var(--gutter); }
  .accuracy { border-radius: 20px 20px 0 0; }
  .figure-pair { margin: var(--s-8) auto var(--s-7); gap: var(--s-6); }
  .instrument { padding: var(--s-5); }
  .ruled { font-size: 0.92rem; }
  .grades td:nth-child(4), .grades th:nth-child(4) { display: none; }
  .ask { padding: var(--s-8) var(--gutter); }
  .call-result { margin-left: 0; }
}

/* ---------------------------------------------------------------- reduced motion: the same film, as stills */
@media (prefers-reduced-motion: reduce) {
  .import, .forecast { height: auto; }
  .sticky { position: relative; height: auto; overflow: visible; }
  .steps { display: block; }
  .steps .step { opacity: 1; transform: none; margin-bottom: var(--s-5); }
  .sheet-body { display: block; }
  .sheet-pane { opacity: 1; border-bottom: 1px solid var(--night-rule); }
  .forecast .sticky { min-height: 100svh; }
  .forecast-copy { position: relative; top: auto; left: auto; transform: none; width: auto; max-width: 30rem; padding: var(--s-9) var(--gutter); }
  .hero-caption .mono::before { animation: none; }
  .btn, .steps .step { transition: none; }
}

/* without scripts every step is simply there */
html:not(.js) .import, html:not(.js) .forecast { height: auto; }
html:not(.js) .sticky { position: relative; height: auto; }
html:not(.js) .steps .step { opacity: 1; transform: none; grid-area: auto; margin-bottom: var(--s-5); }
html:not(.js) .steps { display: block; }
html:not(.js) .sheet-body { display: block; }
html:not(.js) .sheet-pane { opacity: 1; }
html:not(.js) .forecast-copy { position: relative; transform: none; top: auto; left: auto; padding: var(--s-9) var(--gutter); width: auto; }
html:not(.js) .world-poster { opacity: 1; }

/* ---------------------------------------------------------------- 1 · hero: a real business, and the week Buzora sees ahead */
.hero.hero-photo { display: block; max-width: none; min-height: 100svh; padding: 0; margin: 0; isolation: isolate; }
/* the hero holds for one more screen on wide screens (hero.js); the stage is what stays put */
.hero-stage { position: relative; min-height: 100svh; overflow: hidden; isolation: isolate; }
@media (min-width: 761px) and (prefers-reduced-motion: no-preference) {
  /* one continuous shot: the file scene is pinned over the hero's last screen, so the two dissolve in place (hero.js) */
  .film .hero.hero-photo { height: 400svh; }
  .film .hero-stage { position: sticky; top: 0; height: 100svh; }
  .film .wall { height: 460svh; margin-top: -200svh; }
  .film .scene-anchor { top: 100svh; }
}
.hero-media { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: var(--night); will-change: transform; }
.hero-img { width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 62% 46%; transform-origin: 72% 48%; filter: saturate(0.92) contrast(1.04); }
/* the night closes in where the words sit, and under the nav; the owner and her counter stay lit */
.hero-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, var(--night) 0%, rgba(5, 8, 23, 0.86) 20%, rgba(5, 8, 23, 0.25) 52%, rgba(5, 8, 23, 0) 66%),
    linear-gradient(to right, rgba(5, 8, 23, 0.8) 0%, rgba(5, 8, 23, 0.42) 34%, rgba(5, 8, 23, 0) 58%),
    linear-gradient(to bottom, rgba(5, 8, 23, 0.55) 0%, rgba(5, 8, 23, 0) 20%);
}
.hero-inner {
  position: relative; min-height: 100svh; max-width: var(--max); margin: 0 auto;
  padding: calc(var(--nav-h) + var(--s-7)) var(--gutter) var(--s-8);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 23.5rem); align-items: end; gap: var(--s-7);
  will-change: transform, opacity;
}
.hero-photo .hero-copy { grid-column: auto; max-width: none; }
.hero-photo .hero-copy::before { display: none; }
.hero-title {
  font-size: clamp(3.1rem, 8.4vw, 8.8rem); line-height: 0.9; letter-spacing: -0.052em; font-weight: 400;
  max-width: 7.4em; margin: 0 0 0 -0.05em;
}
.hero-photo .hero-lead { max-width: 31rem; margin-top: var(--s-6); color: var(--on-night); }
.hero-photo .hero-actions { margin-top: var(--s-6); }
.hero-credit {
  position: absolute; left: 0; right: 0; bottom: var(--s-5); max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
  font-size: 0.72rem; line-height: 1.4; color: var(--on-night-2); text-align: right;
}

/* the product, on the counter: a Buzora forecast card drawn from the engine's real output */
.hero-card {
  position: relative; padding: var(--s-3) var(--s-4) var(--s-4); margin-bottom: calc(var(--s-5) * -1); border-radius: 16px;
  background: rgba(9, 14, 36, 0.8); border: 1px solid rgba(232, 236, 247, 0.1);
  backdrop-filter: blur(22px) saturate(1.3); -webkit-backdrop-filter: blur(22px) saturate(1.3);
  box-shadow: 0 50px 90px -40px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.hc-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding-bottom: var(--s-3); border-bottom: 1px solid rgba(232, 236, 247, 0.08); }
.hc-app { display: inline-flex; align-items: center; gap: var(--s-2); font-size: 0.8rem; font-weight: 500; }
.hc-mark { width: 26px; height: auto; }
.hc-src { color: var(--on-night-2); font-size: 0.62rem; }
.hc-title { margin: 0; font-size: 0.9rem; font-weight: 500; letter-spacing: -0.01em; }
.hc-dates { display: block; color: var(--on-night-2); font-weight: 400; font-size: 0.8rem; margin-top: 2px; }
.hc-chart { width: 100%; height: auto; margin: var(--s-3) 0 var(--s-2); overflow: visible; }
.hc-grid { stroke: rgba(232, 236, 247, 0.07); stroke-width: 1; }
.hc-tick, .hc-day { font: 400 10.5px var(--mono); fill: var(--on-night-2); }
.hc-day-now { fill: var(--on-night); }
.hc-ahead { fill: rgba(91, 140, 255, 0.05); }
.hc-band { fill: rgba(91, 140, 255, 0.24); }
.hc-hist { fill: none; stroke: var(--on-night); stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.hc-mid { fill: none; stroke: var(--signal); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.hc-today { fill: var(--on-night); stroke: var(--night); stroke-width: 2; }
.hc-peak { fill: var(--signal); stroke: var(--night); stroke-width: 2; }
.hc-top { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s-4); margin-top: var(--s-3); }
.hc-top .hc-title { margin: 0; }
.hc-peakline { margin: 0; text-align: right; font-size: 0.72rem; color: var(--on-night-2); line-height: 1.3; }
.hc-peakline b { display: block; font-size: 1.35rem; font-weight: 430; letter-spacing: -0.02em; color: var(--on-night); font-variant-numeric: tabular-nums; }
.hc-foot { margin: 0; color: var(--on-night-2); font-size: 0.62rem; }

/* arrival: the shop comes up out of the dark, the words rise, then the card is set down and the week draws itself */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-img { opacity: 0; transform: scale(1.14); }
  .js .hero.is-in .hero-img { animation: hero-push 3.4s var(--ease-out) forwards, hero-breathe 26s 3.4s ease-in-out infinite alternate; }
  .js .hero-photo .hero-lead, .js .hero-photo .hero-actions, .js .hero-card, .js .hero-credit { opacity: 0; }
  .js .hero.is-in .hero-lead { animation: rise 1.1s 0.75s var(--ease-out) both; }
  .js .hero.is-in .hero-actions { animation: rise 1.1s 0.9s var(--ease-out) both; }
  .js .hero.is-in .hero-credit { animation: fade 1.2s 2.4s ease both; }
  .js .hero.is-in .hero-card { animation: card-in 1.3s 1.05s var(--ease-out) both; }
  .js .hc-hist, .js .hc-mid { stroke-dasharray: 1; stroke-dashoffset: 1; }
  .js .hero.is-in .hc-hist { animation: draw 1.3s 1.5s cubic-bezier(0.45, 0, 0.2, 1) forwards; }
  .js .hc-band, .js .hc-ahead { clip-path: inset(0 100% 0 0); }
  .js .hero.is-in .hc-band, .js .hero.is-in .hc-ahead { animation: wipe 1.1s 2.75s var(--ease-out) forwards; }
  .js .hero.is-in .hc-mid { animation: draw 1.1s 2.75s var(--ease-out) forwards; }
  .js .hc-today, .js .hc-peak { transform-box: fill-box; transform-origin: center; transform: scale(0); }
  .js .hero.is-in .hc-today { animation: pop 0.6s 2.6s var(--ease-out) forwards, beat 2.8s 3.6s ease-out infinite; }
  .js .hero.is-in .hc-peak { animation: pop 0.6s 3.5s var(--ease-out) forwards; }
  .js .hc-peakline, .js .hc-foot { opacity: 0; }
  .js .hero.is-in .hc-peakline { animation: rise 0.9s 3.45s var(--ease-out) both; }
  .js .hero.is-in .hc-foot { animation: fade 0.9s 3.7s ease both; }
}
@keyframes hero-push { 0% { opacity: 0; transform: scale(1.14); } 35% { opacity: 1; } 100% { opacity: 1; transform: scale(1); } }
@keyframes hero-breathe { from { opacity: 1; transform: scale(1); } to { opacity: 1; transform: scale(1.045); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes card-in { from { opacity: 0; transform: translateY(36px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes wipe { to { clip-path: inset(0 0 0 0); } }
@keyframes pop { to { transform: scale(1); } }
@keyframes beat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.45); } 30% { transform: scale(1); } }

@media (max-width: 760px) {
  .hero-media { bottom: auto; height: 68svh; }
  .hero-img { object-position: 77% 40%; transform-origin: 77% 40%; }
  .hero-media::after {
    background:
      linear-gradient(to top, var(--night) 0%, rgba(5, 8, 23, 0.7) 24%, rgba(5, 8, 23, 0) 55%),
      linear-gradient(to bottom, rgba(5, 8, 23, 0.6) 0%, rgba(5, 8, 23, 0) 22%);
  }
  .hero-inner { display: block; min-height: 0; padding: calc(68svh - 7.2rem) var(--gutter) var(--s-6); }
  .hero-title { font-size: clamp(2.9rem, 14.6vw, 4.6rem); }
  .hero-photo .hero-lead { margin-top: var(--s-5); }
  .hero-photo .hero-actions { margin-top: var(--s-5); }
  .hero-card { margin-top: var(--s-7); padding: var(--s-3) var(--s-4) var(--s-4); }
  .hero-credit { position: static; text-align: left; padding: 0 var(--gutter) var(--s-6); }
}

/* wide screens: the headline holds the top of the frame, the pitch and the card share its foot, the owner keeps the middle */
@media (min-width: 761px) {
  .hero-inner { grid-template-rows: auto 1fr auto; row-gap: 0; }
  .hero-photo .hero-copy { display: contents; }
  .hero-title { grid-column: 1 / -1; grid-row: 1; align-self: start; }
  .hero-photo .hero-lead { grid-column: 1; grid-row: 2; align-self: end; margin: 0; }
  .hero-photo .hero-actions { grid-column: 1; grid-row: 3; }
  .hero-card { grid-column: 2; grid-row: 2 / 4; align-self: end; margin-bottom: 0; }
  .hero-media::after {
    background:
      linear-gradient(to top, var(--night) 0%, rgba(5, 8, 23, 0.8) 18%, rgba(5, 8, 23, 0) 46%),
      linear-gradient(to bottom, rgba(5, 8, 23, 0.82) 0%, rgba(5, 8, 23, 0.5) 30%, rgba(5, 8, 23, 0) 52%),
      linear-gradient(to right, rgba(5, 8, 23, 0.6) 0%, rgba(5, 8, 23, 0.2) 36%, rgba(5, 8, 23, 0) 54%);
  }
}
@media (min-width: 761px) {
  /* the photo spends its spare height below the counter, so the owner sits higher than the card */
  .hero-img { object-position: 62% 90%; }
}
@media (min-width: 761px) and (max-height: 820px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 21rem); padding-bottom: var(--s-7); }
  .hc-foot { display: none; }
  .hc-chart { margin-bottom: 0; }
  .hc-head { padding-bottom: var(--s-2); }
}
@media (max-width: 760px) {
  .ruled-real { font-size: 0.82rem; }
  .ruled-real .num { padding-left: 12px; }
  .ruled-real th:nth-child(3), .ruled-real td:nth-child(3) { display: none; }
}

/* ---------------------------------------------------------------- depth: the scrub marker on the card and the hero (hero.js) */
.hc-scrub { opacity: 0; transition: opacity 0.3s, transform 0.5s var(--ease-out); pointer-events: none; }
.hc-scrub.is-on { opacity: 1; }
.hc-scrub line { stroke: rgba(232, 236, 247, 0.35); stroke-width: 1; stroke-dasharray: 2 3; }
.hc-scrub circle { cx: 0; fill: var(--signal); stroke: var(--on-night); stroke-width: 2; transition: cy 0.5s var(--ease-out); }
.hc-scrub.is-past circle { fill: var(--on-night); stroke: var(--night); }
.hc-chart { cursor: crosshair; }
/* the hero's foot always melts into the night, however far the camera has pushed the photograph */
.hero-stage::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 32%; z-index: 0; pointer-events: none; background: linear-gradient(to top, var(--night) 0%, rgba(5, 8, 23, 0.6) 45%, rgba(5, 8, 23, 0) 100%); }
.hero-photo .hero-inner { z-index: 1; }
.hero-photo .hero-credit { z-index: 1; }
@media (max-width: 760px) { .hero-stage::after { display: none; } }

/* ---------------------------------------------------------------- the montage (hero.js) */
.hero-shot {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0;
  filter: brightness(0.7) saturate(0.92) contrast(1.06); transition: opacity 0.9s var(--ease-out);
}
.hero-shot.is-shot { opacity: 1; animation: shot-push 5.6s linear both; }
@keyframes shot-push { from { transform: scale(1.1); } to { transform: scale(1); } }
.hero-dim { position: absolute; inset: 0; background: var(--night); opacity: 0; pointer-events: none; }
.hero-media::after { z-index: 1; }
[data-credit-who] { transition: opacity 0.35s; }
[data-credit-who].is-swap { opacity: 0; }
.hero-card { transition: box-shadow 0.6s var(--ease-out); }
.hero-card.is-centre { box-shadow: 0 60px 140px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(91, 140, 255, 0.22), 0 0 90px -20px rgba(91, 140, 255, 0.35); }
.hero-photo .hero-inner { height: 100%; }
@media (min-width: 761px) { .hero-photo .hero-inner { min-height: 100svh; } }

/* ---------------------------------------------------------------- one record, handed on */
.scene-anchor { position: absolute; top: 0; left: 0; width: 1px; height: 1px; pointer-events: none; }
.hero-inner { perspective: 1600px; }
.hero-bridge {
  position: absolute; left: 0; right: 0; z-index: 2; margin: 0 auto; padding: 0 var(--gutter); text-align: center; pointer-events: none;
  font-size: var(--t-lead); color: var(--on-night); text-wrap: balance; opacity: 0;
}
@media (max-width: 760px), (prefers-reduced-motion: reduce) {
  /* no turn to narrate: the same line simply leads on to the next scene */
  .hero-bridge { position: static; opacity: 1; text-align: left; padding: var(--s-5) var(--gutter) var(--s-6); font-size: var(--t-lead); }
}
html:not(.js) .hero-bridge { position: static; opacity: 1; padding-block: var(--s-5); }

/* the file falls away, all but the revenue column, which is what the next scene draws */
.sheet.is-leaving .sheet-stage .cell:not(.rev), .sheet.is-leaving .sheet-stage .rule, .sheet.is-leaving .sheet-stage .more { filter: opacity(calc(1 - var(--gone, 0))); }
.sheet.is-leaving .sheet-bar, .sheet.is-leaving .sheet-stats, .sheet.is-leaving .sheet-cap { opacity: calc(1 - var(--gone, 0)); }
.sheet.is-leaving .sheet-stage .cell.rev { color: var(--signal); text-shadow: 0 0 calc(var(--gone, 0) * 14px) rgba(91, 140, 255, 0.9); }
/* the line each section ends on, which the next one answers */
.handoff {
  max-width: 44rem; margin: var(--s-9) 0 0; font-size: clamp(1.7rem, 3vw, 2.7rem); line-height: 1.14; letter-spacing: -0.03em; font-weight: 400;
}
.paper p.handoff { color: var(--ink); }
.loops .handoff { margin-bottom: 0; }
.handoff-night { max-width: var(--max); margin: var(--s-9) auto 0; grid-column: 1 / -1; color: var(--on-night); }
.handoff .w { transition: opacity 0.2s linear; }

/* no seam between two sheets of paper, even at fractional scroll */
.paper + .paper { margin-top: -1px; }

/* between pages: the site dissolves into itself and the nav stays put, where the browser can do it */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .nav { view-transition-name: site-nav; }
}

/* ================================================================ the file, in three scenes (scenes.js) */
/* every scene reads as plain stacked content until .film says the scroll engine is here */
.wall, .columns { position: relative; }
.wall-stage { position: relative; padding: var(--s-9) var(--gutter); overflow: hidden; background: var(--night); }
.wall-video, .wall-bands, .wall-beam { display: none; }
.wall-title { font-size: clamp(2.9rem, 8.4vw, 8.8rem); line-height: 0.92; letter-spacing: -0.05em; font-weight: 400; max-width: 10em; }
.wall-foot { max-width: 34rem; margin-top: var(--s-6); position: relative; color: var(--on-night); }
.wall-credit { font-size: 0.72rem; color: var(--on-night-2); margin: var(--s-3) 0 0; }
.toks { list-style: none; margin: var(--s-6) 0 0; padding: 0; display: grid; gap: var(--s-4); }
.tok { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); align-items: baseline; border-top: 1px solid var(--night-rule); padding-top: var(--s-3); }
.tok-v { font: 300 clamp(1.3rem, 3vw, 2.4rem)/1.1 var(--mono); }
.tok-to { color: var(--signal); font: 400 var(--t-small)/1.3 var(--mono); }
.tok-l { color: var(--on-night-2); font-size: var(--t-small); }

.columns-track { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: var(--s-6); padding: var(--s-8) var(--gutter); max-width: var(--max); margin: 0 auto; }
.col-intro p { color: var(--on-night-2); margin-top: var(--s-5); max-width: 30rem; }
.col { margin: 0; position: relative; }
.col-raw { margin: 0 0 var(--s-3); color: var(--on-night-2); font-size: clamp(0.72rem, 0.95vw, 0.9rem); }
.col-photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 14px; background: var(--night-2); }
.col-photo img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.88) saturate(0.94); will-change: transform; }
.col-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(5, 8, 23, 0.82) 0%, rgba(5, 8, 23, 0.1) 48%, rgba(5, 8, 23, 0) 100%); }
.col figcaption { position: absolute; left: var(--s-5); right: var(--s-5); bottom: var(--s-5); z-index: 1; }
.col-means { display: block; font-size: clamp(1.8rem, 3.3vw, 3.3rem); line-height: 1; letter-spacing: -0.035em; font-weight: 400; color: #fff; }
.col-who { display: block; margin-top: var(--s-2); font-size: 0.68rem; color: rgba(232, 236, 247, 0.72); }
.col-outro { align-self: center; }
.col-gone { font-size: clamp(1rem, 1.6vw, 1.5rem); text-decoration: line-through; text-decoration-color: var(--signal); }
.col-outro-text { font-size: var(--t-lead); max-width: 22rem; margin-top: var(--s-5); }

.read .sheet-stats { display: none !important; }
.read-grid { position: relative; max-width: var(--max); margin: 0 auto; padding: calc(var(--nav-h) + var(--s-6)) var(--gutter) var(--s-6); }
.read-copy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-6); align-items: end; margin-bottom: var(--s-6); }
.read-copy p { margin: 0; color: var(--on-night-2); max-width: 34rem; }
.read-sheet { background: none; border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; overflow: visible; }
.read-sheet .sheet-bar { padding-inline: 0; }
.read-sheet .sheet-cap { padding-inline: 0; }
.read-sheet.is-live .sheet-stage { margin-inline: 0; }
.ledger { display: none; }

/* ---------------------------------------------------------------- with the scroll engine: scene one, the wall */
@media (prefers-reduced-motion: no-preference) {
  .film .wall-sticky { position: sticky; top: 0; height: 100svh; perspective: 1600px; overflow: hidden; }
  .film .wall-stage { height: 100%; padding: 0; perspective: 1400px; will-change: transform, clip-path; }
  .film .wall-video { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.42) saturate(0.8) contrast(1.05); }
  .film .wall-stage::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(ellipse 72% 70% at 50% 50%, rgba(5, 8, 23, 0.1) 0%, rgba(5, 8, 23, 0.72) 100%), linear-gradient(to top, rgba(5, 8, 23, 0.82) 0%, rgba(5, 8, 23, 0) 34%); }
  .film .wall-bands { display: flex; flex-direction: column; justify-content: space-around; position: absolute; inset: -18% -12%; z-index: 1; transform-origin: 50% 50%; }
  .band { display: flex; width: max-content; white-space: nowrap; font-family: var(--mono); will-change: transform; }
  .band span { padding-right: 0.8em; }
  .band i { font-style: normal; color: var(--signal); }
  .band-far { font-size: clamp(0.8rem, 1.5vw, 1.6rem); font-weight: 300; color: rgba(232, 236, 247, 0.26); }
  .band-mid { font-size: clamp(1.5rem, 3.6vw, 3.8rem); font-weight: 300; color: rgba(232, 236, 247, 0.34); }
  .band-near { font-size: clamp(3rem, 9.5vw, 10.5rem); font-weight: 300; letter-spacing: -0.04em; color: rgba(232, 236, 247, 0.5); }
  .film .wall-beam { display: block; position: absolute; top: 0; bottom: 0; left: 0; width: 24vw; z-index: 1; pointer-events: none; mix-blend-mode: screen; background: linear-gradient(90deg, rgba(91, 140, 255, 0) 0%, rgba(91, 140, 255, 0.2) 48%, rgba(190, 212, 255, 0.34) 50%, rgba(91, 140, 255, 0.2) 52%, rgba(91, 140, 255, 0) 100%); will-change: transform; }
  .film .wall-head { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; text-align: center; padding: 0 var(--gutter); pointer-events: none; will-change: transform, opacity; }
  .film .wall-title { opacity: var(--wall-open, 1); text-shadow: 0 0 80px rgba(5, 8, 23, 0.85); }
  .film .wall-foot { position: absolute; left: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter))); bottom: var(--s-6); z-index: 3; margin: 0; }
  .film .wall-foot::before { content: ""; position: absolute; z-index: -1; inset: -45% -25%; pointer-events: none; background: radial-gradient(ellipse 60% 56% at 42% 55%, rgba(5, 8, 23, 0.9) 36%, rgba(5, 8, 23, 0) 100%); }
  .film .toks { position: absolute; inset: 0; z-index: 3; margin: 0; display: block; pointer-events: none; }
  .film .tok { position: absolute; left: 50%; top: 46%; display: block; border: 0; padding: 0; text-align: center; white-space: nowrap; visibility: hidden; will-change: transform, opacity; }
  .film .tok-to { display: none; }
  .film .tok-v { display: block; font: 300 clamp(3rem, 11.5vw, 12rem)/1 var(--mono); letter-spacing: -0.05em; color: #fff; text-shadow: 0 0 60px rgba(5, 8, 23, 0.9); font-variant-numeric: tabular-nums; }
  .film .tok.is-read .tok-v { color: var(--signal); }
  .film .tok-l { display: block; margin-top: var(--s-3); font-size: var(--t-lead); color: var(--on-night); text-shadow: 0 0 24px rgba(5, 8, 23, 1); }

  /* scene two, the columns: the page turns sideways */
  .film .columns { height: 440svh; background: var(--night); }
  .film .columns-sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; }
  .film .columns-track { display: flex; align-items: center; gap: clamp(2.4rem, 5vw, 6rem); width: max-content; max-width: none; height: 100%; margin: 0; padding: calc(var(--nav-h) * 0.6) 8vw 0; will-change: transform; }
  .film .col-intro { flex: none; width: clamp(19rem, 38vw, 40rem); }
  .film .col { flex: none; width: clamp(16.5rem, 29vw, 28rem); transform: scale(calc(0.9 + 0.1 * var(--near, 0))); transition: none; }
  .film .col:nth-of-type(even) { margin-top: 7svh; }
  .film .col:nth-of-type(odd) { margin-top: -5svh; }
  .film .col-photo { aspect-ratio: auto; height: min(66svh, 36vw * 1.45); will-change: clip-path; }
  .film .col-outro { flex: none; width: clamp(16rem, 26vw, 26rem); }

  /* scene three, the read and the ledger */
  .film .read { height: 480svh; }
  .film .forecast { margin-top: -100svh; }
  .film .ledger { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: var(--s-6); position: absolute; inset: 0; padding: var(--nav-h) var(--gutter) 0; visibility: hidden; opacity: 0; }
  .ledger-count b { display: block; font-size: clamp(5rem, 15.5vw, 16rem); line-height: 0.9; letter-spacing: -0.06em; font-weight: 380; font-variant-numeric: tabular-nums; margin-left: -0.05em; }
  .ledger-count span { display: block; margin-top: var(--s-4); font-size: var(--t-lead); color: var(--on-night-2); }
  .ledger-count, .lr:not(.is-now) { opacity: calc(1 - var(--gone, 0)); }
  .ledger-count { margin: 0; }
  .ledger-roll { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 34%, #000 66%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 34%, #000 66%, transparent); will-change: transform; }
  .lr { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-5); padding: 0.14em 0; font-size: clamp(1.4rem, 3.3vw, 3.4rem); line-height: 1.16; color: var(--on-night-2); border-bottom: 1px solid rgba(28, 37, 71, 0.5); }
  .lr span { font: 300 0.42em/1 var(--mono); }
  .lr b { font: 300 1em/1.16 var(--mono); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
  .lr.is-now { color: #fff; }
  .lr.is-now b { color: var(--signal); }
  .ledger.is-today .lr.is-now b { text-shadow: 0 0 34px rgba(91, 140, 255, 0.85); }
  .ledger.is-today .lr.is-now span::after { content: ", today"; color: var(--signal); }

  /* the forecast: the world holds still and the words travel past it, no more swapping in place */
  .film .forecast { height: auto; padding-bottom: 50svh; }
  .film .forecast .sticky { position: static; height: auto; overflow: visible; }
  .film .forecast-copy { position: relative; left: auto; right: auto; bottom: auto; width: auto; max-width: var(--max); margin: 0 auto; padding: 146svh var(--gutter) 0; }
  .film .forecast-copy::before { display: none; }
  .film .steps-forecast { display: block; }
  .film .steps-forecast .step { position: relative; opacity: 1; transform: none; max-width: 31rem; margin-bottom: 84svh; transition: none; }
  .film .steps-forecast .step:nth-child(2) { margin-left: auto; }
  .film .steps-forecast .step:last-child { margin-bottom: 0; }
  .film .steps-forecast .step::before { content: ""; position: absolute; z-index: -1; inset: -24% -16%; pointer-events: none; background: radial-gradient(ellipse 58% 56% at 50% 50%, rgba(5, 8, 23, 0.72) 30%, rgba(5, 8, 23, 0) 100%); }
  .film .steps-forecast .step p { color: var(--on-night); }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 760px) {
  .film .wall { margin-top: 0; height: 360svh; }
  .film .wall-foot { right: var(--gutter); bottom: var(--s-5); font-size: 0.92rem; }
  .film .tok-v { font-size: clamp(2.4rem, 15vw, 5rem); }
  .film .col { width: 78vw; }
  .film .col-intro { width: 84vw; }
  .film .col-outro { width: 70vw; }
  .film .col-photo { height: 58svh; }
  .read-copy { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); margin-bottom: var(--s-4); }
  .read-copy p { font-size: 0.9rem; }
  .film .ledger { grid-template-columns: minmax(0, 1fr); align-content: center; gap: var(--s-5); }
  .ledger-count b { font-size: 26vw; }
  .lr { font-size: 7.4vw; }
  .film .forecast-copy { padding-top: 130svh; }
  .film .steps-forecast .step, .film .steps-forecast .step:nth-child(2) { margin-left: 0; max-width: none; margin-bottom: 72svh; }
}

/* the fan runs behind the conversation; the working stays on its own ground */
.convo .call, .convo .call-result { background: rgba(5, 8, 23, 0.72); border-radius: 10px; padding: var(--s-3) var(--s-4); }

/* scripts ran but the scroll engine did not: no tall empty stages, every step simply there */
html.js:not(.film) .import, html.js:not(.film) .forecast { height: auto; }
html.js:not(.film) .sticky { position: relative; height: auto; overflow: visible; }
html.js:not(.film) .steps { display: block; }
html.js:not(.film) .steps .step { opacity: 1; transform: none; grid-area: auto; margin-bottom: var(--s-5); }
html.js:not(.film) .sheet-body { display: block; }
html.js:not(.film) .sheet-pane { opacity: 1; }
html.js:not(.film) .forecast-copy { position: relative; left: auto; bottom: auto; width: auto; max-width: 34rem; padding: var(--s-9) var(--gutter); }

/* ---------------------------------------------------------------- the contact bar that opens the footer */
.contact-bar {
  max-width: var(--max); margin: 0 auto var(--s-8); padding: 0 0 var(--s-7); border-bottom: 1px solid var(--night-rule);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "k btn" "mail btn" "who btn"; align-items: end; gap: var(--s-2) var(--s-6);
}
.contact-k { grid-area: k; margin: 0; color: var(--on-night-2); }
.contact-mail { grid-area: mail; justify-self: start; font-size: clamp(1.8rem, 4.6vw, 4.4rem); line-height: 1.05; letter-spacing: -0.04em; font-weight: 400; color: var(--on-night); text-decoration: none; background: linear-gradient(var(--signal), var(--signal)) no-repeat 0 100% / 0% 2px; transition: background-size 0.5s var(--ease-out); padding-bottom: 0.06em; overflow-wrap: anywhere; }
.contact-mail:hover, .contact-mail:focus-visible { background-size: 100% 2px; }
.contact-who { grid-area: who; margin: var(--s-3) 0 0; font-size: var(--t-small); color: var(--on-night-2); }
.contact-who a { color: var(--on-night); }
.contact-actions { grid-area: btn; align-self: end; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); justify-content: flex-end; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: var(--s-2); min-height: 48px; padding: 0 var(--s-5); border-radius: 999px;
  border: 1px solid var(--night-sep); color: var(--on-night); text-decoration: none; font-size: var(--t-small); font-weight: 450;
  transition: border-color 0.25s, background-color 0.25s;
}
.btn-ghost:hover, .btn-ghost:focus-visible { border-color: var(--on-night); background: rgba(232, 236, 247, 0.06); }
.btn-ghost:active { transform: scale(0.97); }
.ig-glyph { width: 18px; height: 18px; flex: none; }
.ig-handle { color: var(--on-night-2); }
@media (max-width: 760px) {
  .contact-bar { grid-template-columns: minmax(0, 1fr); grid-template-areas: "k" "mail" "who" "btn"; }
  .contact-actions { justify-content: flex-start; margin-top: var(--s-4); }
}
