/* ==========================================================================
   LEAK HUNTER · SITE A · css/base.css — foundation-owned
   Tokens, reset, type, layout, shared components and the finished static
   (no-JS) look of every section. Figure files (css/fig-*.css) load AFTER this
   file and may override inside their own scope (#section or .fig--name).
   ========================================================================== */

/* ---------- 0 · Tokens ---------------------------------------------------- */
:root {
  color-scheme: dark;

  --bg: #0E0E0F;
  --ink: #121213;
  --s1: #1A1A1C;
  --s2: #222225;
  --s3: #38383D;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --line-3: rgba(255, 255, 255, .24);

  --text: #F3F2EE;
  --text-2: rgb(var(--text-rgb) / .74);
  --muted: #8D8C88;
  --muted-2: #A9A8A4;           /* muted that still clears AA on --s2 */
  --dim: rgb(var(--text-rgb) / .5);

  /* Colour roles (the token names are older than the colours):
     --lime                 the accent, bone white: CTAs, highlights, the footer block, "clean" states
     --pink                 bite / alarm, the one signal red: bites, losses, "Simulated" tags
     --blue --amber --ice   quiet data hues: charts, clips, series
     --petrol-1 --petrol-2  the detection-rule banner
     --glow --glow-2        light: the headline glow, streaks, clip lights */
  --lime: #ECEAE3;
  --lime-hi: #FFFFFF;
  --lime-24: rgb(var(--lime-rgb) / .24);
  --lime-12: rgb(var(--lime-rgb) / .12);
  --pink: #FF3B30;
  --pink-24: rgb(var(--pink-rgb) / .24);
  --pink-12: rgb(var(--pink-rgb) / .12);
  --blue: #8FA5BD;
  --amber: #CDB68C;
  --ice: #DADDE3;
  --petrol-1: #17191C;
  --petrol-2: #2D3137;
  --glow: #F1EFE9;
  --glow-2: #B9C2CC;

  /* channel twins for alpha: rgb(var(--lime-rgb) / .24) */
  --bg-rgb: 14 14 15;
  --ink-rgb: 18 18 19;
  --text-rgb: 243 242 238;
  --lime-rgb: 236 234 227;
  --pink-rgb: 255 59 48;
  --blue-rgb: 143 165 189;
  --amber-rgb: 205 182 140;
  --ice-rgb: 218 221 227;
  --petrol-1-rgb: 23 25 28;
  --petrol-2-rgb: 45 49 55;
  --glow-rgb: 241 239 233;
  --glow-2-rgb: 185 194 204;

  --f-display: "Space Grotesk", "Arial Narrow", system-ui, sans-serif;
  --f-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "Space Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --r-xs: 4px;
  --r-sm: 8px;
  --r-btn: 10px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;

  --gutter: max(16px, 1.1vw, env(safe-area-inset-left), env(safe-area-inset-right)); /* notch-safe in landscape */
  --wrap: 1760px;
  --nav-h: 60px;

  --ease-out: cubic-bezier(.16, 1, .3, 1);        /* ≈ expo.out */
  --ease-io: cubic-bezier(.76, 0, .24, 1);        /* ≈ power4.inOut */
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);   /* ≈ back.out(1.7) */

  --sp-xl: clamp(96px, 10vw, 176px);
  --sp-l: clamp(72px, 7.5vw, 128px);
  --sp-m: clamp(48px, 5vw, 88px);
  --sp-s: clamp(24px, 2.6vw, 44px);

  /* shared film grain tile (also used by .media and banners) */
  --grain-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* ---------- 0b · Shell tones, derived from the tokens ----------------------------------
   White lamp light and a silver second light; the signal red stays on bites only. */
:root {
  --text-hi: var(--text);                                      /* brightest text: figures, active nav, button faces */
  --text-hi-rgb: var(--text-rgb);                              /* text tiers: rgb(var(--text-hi-rgb) / .72) */
  --glow-core: #FFFFFF;                                        /* hot core of the headline light */
  --light-2-rgb: var(--ice-rgb);                               /* secondary corner light (menu, hero floor, chrome stage) */
  --pink-text: color-mix(in srgb, var(--pink) 62%, #fff);      /* bite text on dark (ledger rows, loss line) */
  --pink-text-2: color-mix(in srgb, var(--pink) 30%, #fff);    /* body text inside the Simulated banner */
  --sb-thumb: var(--s3);                                       /* scrollbar thumb (standard / webkit) */
  --sb-thumb-2: color-mix(in srgb, var(--s2) 50%, var(--s3));
  --btn-dark-hi: color-mix(in srgb, var(--ink) 30%, var(--s1));  /* .btn--dark hover */
  --deep: color-mix(in srgb, var(--bg) 70%, #000);             /* ledger well */
  --studio-1: color-mix(in srgb, var(--bg) 88%, #000);         /* .media backdrop, top → bottom */
  --studio-2: color-mix(in srgb, var(--bg) 55%, #000);
  --stage: color-mix(in srgb, var(--bg) 30%, #000);            /* chrome stage */
  --fact-a: color-mix(in srgb, var(--s1) 94%, transparent);    /* fact-card glass, top → bottom */
  --fact-b: rgb(var(--ink-rgb) / .94);
  --flip-1: color-mix(in srgb, var(--glow) 10%, #0C0C0D);      /* flip-digit leaves, tinted by the light */
  --flip-2: color-mix(in srgb, var(--glow) 6%, #09090A);
  --flip-3: color-mix(in srgb, var(--glow) 5%, #070708);
  --flip-4: color-mix(in srgb, var(--glow) 8%, #0A0A0B);
  --banner-0: color-mix(in srgb, var(--petrol-1) 90%, #000);   /* detection-rule banner: stops around --petrol-1 / --petrol-2 */
  --banner-mid: color-mix(in srgb, var(--petrol-1) 45%, var(--petrol-2));
  --banner-light-rgb: var(--ice-rgb);
  --banner-shade-rgb: var(--bg-rgb);
}

/* ---------- 1 · Reset ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
  color: var(--text);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--sb-thumb) var(--bg);
}
body {
  margin: 0;
  min-height: 100vh;
  font: 400 15px/1.55 var(--f-ui);
  font-feature-settings: "cv11", "ss01";
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
h1, h2, h3, h4, p, ol, ul, dl, dd, figure, blockquote { margin: 0; }
:where(ul[role="list"], ol[role="list"]) { list-style: none; padding: 0; }
img, svg, canvas, video { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
table { border-collapse: collapse; }
code { font-family: var(--f-mono); font-size: .92em; }
sup { line-height: 0; }
:where(h1, h2, h3, h4) { text-wrap: balance; }
p { text-wrap: pretty; }
[hidden] { display: none !important; }
[tabindex="-1"]:focus { outline: none; }

::selection { background: var(--lime); color: var(--ink); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 6px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--sb-thumb-2); border: 2px solid var(--bg); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--lime); }

/* ---------- 2 · Utilities --------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 16px; height: 16px; flex: none; }
/* Labels: Inter 600, sentence case. Space Mono is for data only (slots, base58, amounts, code). */
.label { font: 600 12.5px/1.3 var(--f-ui); letter-spacing: 0; text-transform: none; color: var(--muted-2); }
.num, .tnum { font-variant-numeric: tabular-nums; }
/* Case-sensitive identifiers (base58, arXiv ids, SWQoS, TKN) survive any uppercase/tracked parent. */
.id { text-transform: none; letter-spacing: 0; }

.skip {
  position: fixed; left: 12px; top: 12px; z-index: 400;
  padding: 10px 14px; border-radius: var(--r-btn);
  background: var(--lime); color: var(--ink); font-weight: 600; text-decoration: none;
  transform: translateY(-160%); transition: transform .3s var(--ease-out);
}
.skip:focus { transform: none; }
.noscript { /* pinned to the bottom edge, so it never sits on top of the fixed nav */
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 120; margin: 0; padding: 10px var(--gutter) max(10px, env(safe-area-inset-bottom));
  background: var(--s1); color: var(--text-2); font: 500 14px/1.45 var(--f-ui); text-align: center;
  border-top: 1px solid var(--line);
}

/* film grain over everything — compositor-only shift, ~7 fps */
.grain {
  position: fixed; inset: -120px; z-index: 300; pointer-events: none;
  background-image: var(--grain-img); background-size: 220px 220px;
  opacity: .05;
  animation: grain-shift .9s steps(1) infinite;
  will-change: transform;
}
@keyframes grain-shift {
  0%   { transform: translate3d(0, 0, 0); }
  16%  { transform: translate3d(-62px, 38px, 0); }
  33%  { transform: translate3d(48px, -71px, 0); }
  50%  { transform: translate3d(-93px, -17px, 0); }
  66%  { transform: translate3d(71px, 84px, 0); }
  83%  { transform: translate3d(-29px, 104px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* ---------- 3 · Type ----------------------------------------------------------- */
.sec-title {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(30px, 2vw + 14px, 48px); line-height: .95; letter-spacing: -0.04em;
  text-transform: uppercase; color: var(--lime);
}
.sec-sub { margin-top: 10px; font-size: 15px; line-height: 1.5; color: var(--muted-2); max-width: 64ch; }
.sec-head { margin-bottom: clamp(20px, 2vw, 28px); }

/* ---------- 4 · Components ------------------------------------------------------- */
/* Buttons — accent primary (10px radius, 14px/600), glassless secondaries */
.btn {
  --h: 40px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 16px; border-radius: var(--r-btn);
  font: 600 14px/1 var(--f-ui); letter-spacing: -0.005em; white-space: nowrap; text-decoration: none;
  color: var(--text); background: rgba(255, 255, 255, .05);
  box-shadow: inset 0 0 0 1px var(--line-2);
  cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none;
  transition: background-color .25s ease, color .25s ease, box-shadow .35s var(--ease-out), filter .2s ease;
}
.btn .i { width: 15px; height: 15px; transition: transform .45s var(--ease-out); }
.btn__label { display: inline-block; }
.btn:active { filter: brightness(.94); }
.btn--sm { --h: 36px; padding: 0 14px; }
.btn--lg { --h: 48px; padding: 0 20px; font-size: 15px; }
.btn--round { border-radius: 999px; }
.btn--lime {
  background: var(--lime); color: var(--ink);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .16), 0 0 0 0 var(--lime-24);
}
.btn--ghost { background: rgba(255, 255, 255, .05); }
.btn--white { background: var(--text-hi); color: var(--ink); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12); }
.btn--dark { background: var(--ink); color: var(--text-hi); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); }
.btn--ink { background: var(--ink); color: var(--lime); box-shadow: inset 0 -3px 0 rgba(255, 255, 255, .06); }

.iconbtn {
  position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-btn);
  background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text-hi);
  transition: background-color .25s, box-shadow .25s, color .25s;
}
.iconbtn::after { content: ""; position: absolute; inset: -2px; } /* 44 × 44 hit area around the 40px face */
.iconbtn:disabled { opacity: .35; pointer-events: none; }

/* Pills (nav) */
.pill {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 8px 0 12px; border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .24);
  font: 600 14px/1 var(--f-ui); color: var(--text); text-decoration: none; white-space: nowrap;
  transition: background-color .25s, box-shadow .25s;
}
/* touch: 44px tap targets around the 34–36px nav pills and the small nav button, no layout change */
html.is-touch .pill::after, html.is-touch .btn--sm::after { content: ""; position: absolute; left: 0; right: 0; top: -5px; bottom: -5px; }
html.is-touch .btn--sm::after { top: -4px; bottom: -4px; }
.badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 6px;
  background: var(--lime); color: var(--ink); font: 700 12px/1 var(--f-ui); font-variant-numeric: tabular-nums;
}

/* Honesty tags — one component. Red "Sim"/"Simulated" on synthetic numbers, muted "Illustration" on
   example ledgers, slots, addresses and diagrams; accent only for our own status ("Building").
   Space Grotesk 700 caps, 11px minimum, never truncated. */
.tag {
  display: inline-flex; align-items: center; min-height: 18px; padding: 0 6px; border-radius: var(--r-xs);
  font: 700 11px/1 var(--f-display); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
  vertical-align: middle; flex: none;
}
.tag--lime { background: var(--lime); color: var(--ink); }
.tag--pink { background: var(--pink); color: var(--ink); }
.tag--muted { background: rgba(255, 255, 255, .07); color: rgb(var(--text-hi-rgb) / .82); box-shadow: inset 0 0 0 1px var(--line-2); }
/* status chip (not an honesty tag): Inter, sentence case, accent dot */
.tag--queued { background: rgba(10, 11, 12, .72); color: var(--text-hi); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); gap: 6px; font: 600 12px/1 var(--f-ui); letter-spacing: .01em; text-transform: none; min-height: 22px; padding: 0 8px; }
.tag--queued::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.tag--skew { font-style: italic; transform: skewX(-8deg); }
.tag--lg { min-height: 24px; padding: 0 9px; font-size: 13px; border-radius: 6px; }
.tag--xs { min-height: 18px; padding: 0 6px; font-size: 11px; }
.tag--hang { position: absolute; right: 2px; bottom: -11px; min-height: 18px; padding: 0 6px; font-size: 11px; }

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.dot--lime { background: var(--lime); box-shadow: 0 0 10px rgb(var(--lime-rgb) / .7); }
.dot--pink { background: var(--pink); box-shadow: 0 0 10px rgb(var(--pink-rgb) / .8); }
.dot--pulse { animation: dot-pulse 2.4s var(--ease-io) infinite; }
html.is-poster .dot--pulse { animation: none; } /* the share-card still catches the dot lit */
@keyframes dot-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* Media frame — shared "studio" look for every procedural clip.
   Canvas children paint above ::before (grain) and below ::after (inner hairline). */
.media { /* poster colours come from --c / --c2 set on a parent (card, route, step) */
  position: relative; overflow: hidden; isolation: isolate; border-radius: var(--r-md);
  background:
    radial-gradient(70% 60% at 28% 82%, color-mix(in srgb, var(--c, var(--lime)) 20%, transparent), transparent 70%),
    radial-gradient(55% 50% at 82% 18%, color-mix(in srgb, var(--c2, var(--blue)) 14%, transparent), transparent 70%),
    radial-gradient(130% 100% at 50% 50%, transparent 50%, rgba(0, 0, 0, .55)),
    linear-gradient(180deg, var(--studio-1), var(--studio-2));
}
.media::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: var(--grain-img); background-size: 220px 220px; opacity: .08; mix-blend-mode: screen;
}
.media::after {
  content: ""; position: absolute; inset: 0; z-index: 6; pointer-events: none; border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.media > canvas, .media > .lh-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }

.fig { position: relative; }
main > section { position: relative; } /* contains abspos helpers (.sr-only) so they never widen the page */

/* Decorative hovers only where a hover exists — touch taps never leave a stuck state.
   (Colour, shadow and transform only: nothing here moves layout.) */
@media (hover: hover) and (pointer: fine) {
  .btn:hover .i { transform: translateX(3px); }
  .btn--lime:hover { background: var(--lime-hi); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .16), 0 0 0 5px var(--lime-24), 0 10px 40px -8px rgb(var(--lime-rgb) / .45); }
  .btn--ghost:hover { background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px var(--line-3); }
  .btn--white:hover { background: var(--text-hi); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12), 0 0 0 5px rgba(255, 255, 255, .14); }
  .btn--dark:hover { background: var(--btn-dark-hi); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
  .btn--ink:hover { background: #000; box-shadow: inset 0 -3px 0 rgba(255, 255, 255, .06), 0 0 0 5px rgb(var(--ink-rgb) / .16); }
  .iconbtn:hover { background: var(--lime); color: var(--ink); box-shadow: none; }
  .pill:hover { background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .36); }
  .brand:hover .logo { transform: rotate(-9deg) scale(1.05); }
  .nav__link:hover { color: var(--text-hi); }
  .pop__link:hover { text-decoration: underline; }
  .menu__list a:hover .menu__txt { color: var(--lime); }
  .foot__col a:hover::after { transform: scaleX(1); transform-origin: 0 50%; }
  .hero__scroll:hover { color: var(--text-hi); }
  .reel-card__link:hover .reel-card__arrow { opacity: 1; transform: none; }
  .fnref a:hover { text-decoration: underline; }
  .footnote__back:hover { color: var(--lime); }
}

/* ---------- 5 · Nav ------------------------------------------------------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: transform .6s var(--ease-out), border-color .4s ease;
}
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s ease;
  background: rgb(var(--bg-rgb) / .76);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav.is-scrolled::before { opacity: 1; }
/* over the accent footer the bar normally steps aside; if it must stay (keyboard focus in it), it stays
   solid ink — a translucent blur over it would read murky grey */
.nav.is-over-foot::before { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
.nav.is-hidden { transform: translate3d(0, -101%, 0); }
html.js-intro .nav { transform: translate3d(0, -101%, 0); }
/* the share-card still (?poster=1 → assets/og.jpg): brand and status only, no links or buttons */
html.is-poster .nav__links, html.is-poster .nav__cta, html.is-poster .notes, html.is-poster .burger { display: none; }
html.menu-open .nav { transform: none; border-bottom-color: transparent; }
html.menu-open .nav::before { opacity: 0; }

.nav__in {
  position: relative; height: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter);
  display: flex; align-items: center; gap: 10px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding-right: 4px; border-radius: var(--r-btn); text-decoration: none; flex: none; }
.logo { width: 32px; height: 32px; transition: transform .7s var(--ease-back); }
.brand__word { font: 700 17px/1 var(--f-display); letter-spacing: -0.035em; white-space: nowrap; }

.notes { position: relative; margin-left: 6px; }
.pop {
  position: absolute; top: calc(100% + 12px); left: 0; z-index: 5; width: 304px; padding: 16px;
  border-radius: var(--r-md); background: var(--s1);
  box-shadow: 0 0 0 1px var(--line-2), 0 30px 60px -12px rgba(0, 0, 0, .7);
}
.pop__label { font: 600 12.5px/1 var(--f-ui); color: var(--lime); }
.pop__big { margin-top: 12px; font: 700 44px/.9 var(--f-display); letter-spacing: -0.05em; }
.pop__big span { font: 500 14px/1 var(--f-ui); letter-spacing: 0; color: var(--muted-2); margin-left: 4px; }
.pop__text { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.pop__link { margin-top: 14px; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; font-weight: 600; font-size: 14px; color: var(--lime); text-decoration: none; }

.nav__links { position: relative; display: flex; align-items: center; gap: 2px; margin-left: 12px; }
.nav__link {
  position: relative; z-index: 1; display: inline-flex; align-items: center; height: 34px; padding: 0 11px;
  border-radius: var(--r-sm); font: 600 15px/1 var(--f-ui); color: var(--dim); text-decoration: none;
  transition: color .25s ease;
}
.nav__link.is-active { color: var(--text-hi); } /* scrollspy only: at the top nothing is current, so nothing is white */
.nav__ink {
  position: absolute; z-index: 0; left: 0; top: 50%; width: 10px; height: 34px; margin-top: -17px;
  border-radius: var(--r-sm); background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05);
  opacity: 0; pointer-events: none;
  transition: transform .6s var(--ease-out), width .6s var(--ease-out), opacity .3s ease;
}
.nav__ink::after {
  content: ""; position: absolute; left: 50%; bottom: -8px; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime);
}
.nav__links.has-active .nav__ink { opacity: 1; }

.nav__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.pill--phase { padding-right: 12px; }
.burger {
  display: none; position: relative; width: 44px; height: 44px; border-radius: var(--r-btn);
  background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--line-2);
}
.burger span {
  position: absolute; left: 13px; right: 13px; height: 2px; border-radius: 2px; background: var(--text-hi);
  transition: transform .55s var(--ease-out), top .55s var(--ease-out);
}
.burger span:nth-child(1) { top: 17px; }
.burger span:nth-child(2) { top: 25px; right: 18px; transition: transform .55s var(--ease-out), top .55s var(--ease-out), right .55s var(--ease-out); }
.burger[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { top: 21px; right: 13px; transform: rotate(-45deg); }

/* Full-screen menu (mobile) */
.menu {
  position: fixed; inset: 0; z-index: 95; display: flex; flex-direction: column; overflow-y: auto;
  padding: calc(var(--nav-h) + 20px) var(--gutter) max(24px, env(safe-area-inset-bottom));
  background: var(--bg);
}
.menu__glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(70% 40% at 100% 0%, rgb(var(--light-2-rgb) / .09), transparent 70%),
    radial-gradient(60% 40% at 0% 100%, rgb(var(--glow-rgb) / .08), transparent 70%);
}
.menu__list { position: relative; list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.menu__list li { overflow: hidden; border-bottom: 1px solid var(--line); }
.menu__list a { display: flex; align-items: baseline; gap: 16px; padding: 14px 0 12px; text-decoration: none; }
.menu__no { width: 26px; font: 600 13px/1 var(--f-ui); font-variant-numeric: tabular-nums; color: var(--lime); }
.menu__txt { font: 700 clamp(40px, 12vw, 76px)/.92 var(--f-display); letter-spacing: -0.045em; text-transform: uppercase; }
.menu__list a:focus-visible .menu__txt { color: var(--lime); }
.menu__foot { position: relative; margin-top: auto; padding-top: 28px; display: grid; gap: 14px; }
.menu__status, .menu__notes { display: flex; align-items: center; gap: 10px; font: 600 13px/1.4 var(--f-ui); color: var(--text-2); }
.menu__foot .btn { width: 100%; }

/* ---------- 6 · Preloader (visible only while html.js-intro) --------------------- */
.preloader { display: none; }
html.js-intro, html.js-intro body { overflow: hidden; }
html.js-intro .preloader {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 200; background: var(--bg);
}
/* .preloader__in / __head / __label / __count and the shutters are laid out by fig-hero.css */
.preloader__bar { display: block; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.preloader__fill { display: block; height: 100%; background: var(--lime); box-shadow: 0 0 12px var(--lime); transform-origin: 0 50%; transform: scaleX(0); }

/* Landing cover: a #hash visit or a mid-page back visit paints this from the first frame; main.js lands on
   the target once the layout is final, then lifts it — no hero flash, no section blanking and replaying. */
html.is-landing::after {
  content: ""; position: fixed; inset: 0; z-index: 150; background: var(--bg);
  transition: opacity .2s ease;
}
html.is-landed::after { opacity: 0; pointer-events: none; }
/* a landing that takes a moment shows the mark, breathing — never for a quick one (350 ms delay) */
html.is-landing body::before {
  content: ""; position: fixed; left: 50%; top: 50%; z-index: 151; width: 36px; height: 36px; margin: -18px 0 0 -18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='8' fill='%23F3F2EE'/%3E%3Cg transform='translate(13.6 18.4) rotate(-38)'%3E%3Cpath d='M13 0 3.77 5.9A7 7 0 1 1 3.77-5.9Z' fill='%23121213'/%3E%3Ccircle cx='2.6' cy='-2.3' r='1.45' fill='%23F3F2EE'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  opacity: .8; pointer-events: none;
  animation: land-in .6s var(--ease-out) .35s both, land-breathe 1.6s ease-in-out .95s infinite alternate;
  transition: opacity .2s ease;
}
html.is-landed body::before { opacity: 0; animation: none; }
@keyframes land-in { from { opacity: 0; transform: scale(.86); } to { opacity: .8; transform: none; } }
@keyframes land-breathe { from { opacity: .8; } to { opacity: .4; } }

/* ---------- 7 · Hero (static stand-in; owned and refined by fig-hero) ------------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column;
  background: var(--bg);
}
.fig--hero {
  position: absolute; inset: 0; z-index: -1; overflow: hidden;
  background:
    radial-gradient(40% 34% at 50% 38%, rgb(var(--glow-rgb) / .28), rgb(var(--glow-rgb) / 0) 72%),
    radial-gradient(70% 50% at 50% 110%, rgb(var(--light-2-rgb) / .07), transparent 62%),
    var(--bg);
}
.fig--hero::before { /* perspective tile wall (static) */
  content: ""; position: absolute; left: -30%; right: -30%; top: -12%; height: 118%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Crect x='5' y='5' width='110' height='110' rx='16' fill='%23ffffff' fill-opacity='.018' stroke='%23ffffff' stroke-opacity='.075' stroke-width='1.5'/%3E%3C/svg%3E");
  background-size: 120px 120px; background-position: 50% 50%;
  transform: perspective(1000px) rotateX(16deg) scale(1.08);
  -webkit-mask-image: radial-gradient(58% 56% at 50% 42%, #000 28%, transparent 78%);
  mask-image: radial-gradient(58% 56% at 50% 42%, #000 28%, transparent 78%);
}
.fig--hero::after { content: ""; position: absolute; inset: auto 0 0; height: 38%; background: linear-gradient(to bottom, rgb(var(--bg-rgb) / 0), var(--bg)); }

.hero__in {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: calc(var(--nav-h) + 28px) var(--gutter) 28px;
}
.hero__kicker {
  display: inline-flex; align-items: center; gap: 12px; margin-bottom: clamp(14px, 1.8vw, 24px);
  font: 600 13px/1 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: rgb(var(--text-hi-rgb) / .72);
}
.hero__kicker::before, .hero__kicker::after { content: ""; width: 22px; height: 1px; background: var(--lime); opacity: .8; }
.hero__title {
  font: 700 clamp(68px, 10.6vw, 178px)/.84 var(--f-display); letter-spacing: -0.055em; text-transform: uppercase;
  color: var(--glow-core);
  text-shadow: 0 0 18px rgb(var(--glow-rgb) / .6), 0 0 54px rgb(var(--glow-rgb) / .38), 0 0 120px rgb(var(--glow-rgb) / .2);
}
.hero__line { display: block; }
.hero__clock { margin-top: clamp(22px, 2.6vw, 38px); display: grid; justify-items: center; gap: 12px; }
.hero__clock-label { font: 600 12.5px/1 var(--f-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--glow); }
.flips { display: flex; gap: 10px; }
.flip { display: grid; justify-items: center; gap: 8px; }
.flip__d {
  position: relative; display: grid; place-items: center; overflow: hidden;
  width: clamp(66px, 6.2vw, 92px); aspect-ratio: 1; border-radius: var(--r-md);
  font: 700 clamp(36px, 3.5vw, 54px)/1 var(--f-display); letter-spacing: -0.04em; color: var(--text-hi);
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, var(--flip-1) 0%, var(--flip-2) 50%, var(--flip-3) 50%, var(--flip-4) 100%);
  box-shadow:
    inset 0 0 0 1px rgb(var(--glow-rgb) / .5),
    inset 0 1px 0 rgba(255, 255, 255, .08),
    0 0 22px rgb(var(--glow-rgb) / .35),
    0 0 70px rgb(var(--glow-rgb) / .16);
}
.flip__d::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0, 0, 0, .6); }
.flip__u { font: 500 12px/1 var(--f-ui); color: rgb(var(--text-hi-rgb) / .5); }
.hero__sim {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 2px;
  font: 500 13px/1.3 var(--f-ui); letter-spacing: 0; color: rgb(var(--text-hi-rgb) / .8);
}
.hero__cta { margin-top: clamp(20px, 2.4vw, 30px); display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.hero__foot {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  padding: 0 var(--gutter) 22px; max-width: var(--wrap); width: 100%; margin-inline: auto;
}
.hero__scroll { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font: 600 12px/1 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: rgb(var(--text-hi-rgb) / .64); text-decoration: none; }
.hero__scroll i { position: relative; width: 1px; height: 28px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.hero__scroll i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--lime); animation: scroll-cue 2.6s var(--ease-io) infinite; }
@keyframes scroll-cue { 0% { transform: translateY(0); } 60%, 100% { transform: translateY(350%); } }

/* ---------- 8 · Reel (static) ----------------------------------------------------- */
.reel { padding-top: var(--sp-s); }
.reel__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 22px; }
.reel__title {
  font: 700 clamp(26px, 1.6vw + 14px, 40px)/.96 var(--f-display); letter-spacing: -0.04em; text-transform: uppercase;
  max-width: 22ch;
}
.reel__pitch { margin-top: 14px; max-width: 76ch; font-size: 15px; line-height: 1.6; color: var(--muted-2); }
.reel__ctrl { display: flex; align-items: center; gap: 8px; flex: none; }
.reel__count { margin-right: 6px; font: 600 13px/1 var(--f-ui); font-variant-numeric: tabular-nums; color: var(--muted-2); }
.reel__count b { color: var(--text-hi); font-weight: 700; }
.fig--reel { position: relative; }
.reel__track {
  position: relative; list-style: none; margin: 0;
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(280px, 35.4vw, 660px); gap: 16px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  padding: 0 var(--gutter) 6px;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}
.reel__track::-webkit-scrollbar { display: none; }
.reel-card { scroll-snap-align: start; min-width: 0; }
.reel-card__link { position: relative; display: block; color: inherit; text-decoration: none; border-radius: var(--r-md); }
.reel-card__media { aspect-ratio: 16 / 9; }
.reel-card__meta { padding: 14px 36px 0 0; display: grid; gap: 5px; }
.reel-card__title {
  display: flex; align-items: center; gap: 8px;
  font: 700 16px/1.1 var(--f-display); letter-spacing: -0.02em; text-transform: uppercase;
}
.reel-card__line { font-size: 14px; line-height: 1.45; color: var(--muted); }
.reel-card__arrow {
  position: absolute; right: 2px; bottom: 6px; display: grid; place-items: center; width: 28px; height: 28px;
  border-radius: 8px; background: var(--lime); color: var(--ink);
  opacity: 0; transform: translateX(-10px); transition: opacity .3s ease, transform .5s var(--ease-out);
}
.reel-card__link:focus-visible .reel-card__arrow { opacity: 1; transform: none; }
.reel-card[data-card="index"] { --c: var(--lime); --c2: var(--pink); }
.reel-card[data-card="anatomy"] { --c: var(--pink); --c2: var(--lime); }
.reel-card[data-card="routes"] { --c: var(--blue); --c2: var(--lime); }
.reel-card[data-card="safesend"] { --c: var(--ice); --c2: var(--amber); }

/* ---------- 9 · Problem / chrome stage (static) ------------------------------------ */
.problem { padding-top: var(--sp-m); }
.problem__stage {
  position: relative; isolation: isolate; overflow: hidden; border-radius: var(--r-xl);
  background: var(--stage); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
  padding: clamp(56px, 7vw, 116px) clamp(12px, 1.6vw, 24px) 0;
}
.fig--chrome {
  position: absolute; inset: 0; z-index: -1; overflow: hidden;
  background:
    radial-gradient(42% 34% at 20% 18%, rgba(255, 255, 255, .15), transparent 70%),
    radial-gradient(38% 30% at 84% 26%, rgba(200, 210, 220, .11), transparent 70%),
    radial-gradient(60% 36% at 50% 0%, rgba(255, 255, 255, .07), transparent 70%),
    radial-gradient(30% 24% at 12% 60%, rgb(var(--glow-rgb) / .06), transparent 70%),
    radial-gradient(30% 24% at 90% 64%, rgb(var(--light-2-rgb) / .045), transparent 70%),
    var(--stage);
}
.problem__head { position: relative; display: grid; justify-items: center; text-align: center; gap: 14px; padding-bottom: clamp(44px, 5vw, 80px); }
.problem__kicker {
  font: 700 clamp(18px, .9vw + 12px, 28px)/1 var(--f-display); letter-spacing: -0.03em; text-transform: uppercase;
  background: linear-gradient(180deg, #F1F3F5 0%, #9AA0A7 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.problem__title { display: grid; justify-items: center; gap: 12px; font-weight: 400; }
.problem__num {
  display: block; padding: 0 .04em;
  font: 700 clamp(92px, 14.5vw, 232px)/.84 var(--f-display); letter-spacing: -0.065em;
  background: linear-gradient(180deg, #FFFFFF 6%, #DCE0E4 28%, #7B828A 49%, #ECEFF2 64%, #A3AAB1 82%, #5B6168 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 12px 32px rgba(0, 0, 0, .55));
}
.problem__sub { font: 500 clamp(16px, .4vw + 13px, 20px)/1.4 var(--f-ui); letter-spacing: -0.01em; color: var(--text-hi); }
.problem__lede { margin-top: -6px; font-size: clamp(15px, .3vw + 12px, 18px); color: rgb(var(--text-hi-rgb) / .72); }
.problem__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; }
.fnref a { margin-left: 2px; font: 700 .62em/1 var(--f-ui); color: var(--lime); text-decoration: none; vertical-align: super; }

.problem__facts { position: relative; padding-bottom: 0; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.fact {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px;
  min-height: 0; padding: 18px 18px 24px; border-radius: var(--r-md);
  background: linear-gradient(180deg, var(--fact-a), var(--fact-b));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
  transition: box-shadow .4s ease, transform .6s var(--ease-out);
}
.fact__label { font: 600 12.5px/1.2 var(--f-ui); color: var(--lime); }
.fact__title { font: 700 21px/1.02 var(--f-display); letter-spacing: -0.03em; text-transform: uppercase; }
.fact__text { font-size: 14px; line-height: 1.55; color: rgb(var(--text-hi-rgb) / .7); }
/* (cards end at their content: no ghost numerals, no fade, no overlay button — fig-chrome.css) */
.footnote {
  display: flex; align-items: baseline; gap: 8px; margin-top: 14px; padding-inline: 4px;
  font: 400 13px/1.5 var(--f-ui); color: var(--muted-2);
}
.footnote__n { color: var(--lime); font-weight: 700; }
.footnote__back { color: var(--muted-2); text-decoration: none; padding: 0 4px; }

/* ---------- 10 · Routes (static) ---------------------------------------------------- */
.routes { padding-top: var(--sp-l); }
.routes__grid {
  position: relative; list-style: none; margin: 0 auto; max-width: var(--wrap); padding: 0 var(--gutter);
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px;
}
.route { position: relative; aspect-ratio: 9 / 16; border-radius: var(--r-md); overflow: hidden; isolation: isolate; }
.route__media { position: absolute; inset: 0; border-radius: inherit; }
/* route colours are keyed by data-key in fig-routes.css (no numbering, no bite red on a route category) */
.route__tag { position: absolute; top: 10px; left: 10px; z-index: 8; }
.route__name { font: 700 clamp(16px, .5vw + 11px, 20px)/1.02 var(--f-display); letter-spacing: -0.025em; text-transform: uppercase; }
.route__alt { display: block; margin-top: 5px; font: 600 12px/1.2 var(--f-ui); letter-spacing: 0; text-transform: none; color: rgb(var(--text-hi-rgb) / .64); }
.route__line { font-size: 13px; line-height: 1.42; color: rgb(var(--text-hi-rgb) / .74); }
.route__line code { color: var(--text-hi); font-size: 12px; }
.route__stats { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; }
.stat { display: inline-flex; align-items: center; gap: 5px; font: 600 12px/1 var(--f-ui); color: rgb(var(--text-hi-rgb) / .86); }
.stat .i { width: 13px; height: 13px; color: rgb(var(--text-hi-rgb) / .7); }
.stat__k { color: rgb(var(--text-hi-rgb) / .55); font-weight: 500; }
.stat--bite .i { color: var(--pink); }

/* ---------- 11 · How a canary works (static grid; fig-how pins it) ------------------- */
.how { padding-top: var(--sp-l); padding-bottom: var(--sp-s); }
.how__head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 0 24px; margin-bottom: clamp(20px, 2vw, 28px); }
.how__count { font: 600 13px/1 var(--f-ui); font-variant-numeric: tabular-nums; color: var(--muted-2); }
.how__count b { color: var(--text-hi); }
.how__bar { grid-column: 1 / -1; height: 2px; margin-top: 20px; border-radius: 2px; background: var(--line); overflow: hidden; }
.how__fill { display: block; width: 100%; height: 100%; background: var(--lime); transform-origin: 0 50%; transform: scaleX(0); box-shadow: 0 0 10px var(--lime); }
.how__track {
  list-style: none; margin: 0 auto; max-width: var(--wrap); padding: 0 var(--gutter);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
}
.step {
  display: flex; flex-direction: column; gap: 22px; padding: 14px 14px 26px; border-radius: var(--r-lg);
  background: var(--s1); box-shadow: inset 0 0 0 1px var(--line);
}
/* poster tints: accent / ice / blue only — red is a bite and amber an auction, never decoration */
.step:nth-child(1) { --c: var(--lime); --c2: var(--ice); }
.step:nth-child(2) { --c: var(--ice); --c2: var(--lime); }
.step:nth-child(3) { --c: var(--blue); --c2: var(--lime); }
.step:nth-child(4) { --c: var(--lime); --c2: var(--ice); }
.step:nth-child(5) { --c: var(--blue); --c2: var(--ice); }
.step:nth-child(6) { --c: var(--lime); --c2: var(--ice); }
.step__vis { aspect-ratio: 16 / 10; }
.step__body { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; align-items: start; padding: 0 8px; }
.step__no {
  grid-row: span 2; font: 700 clamp(54px, 4.6vw, 84px)/.8 var(--f-display); letter-spacing: -0.05em;
  color: var(--lime); font-variant-numeric: tabular-nums;
}
.step__verb { font: 700 clamp(28px, 2.2vw, 40px)/.9 var(--f-display); letter-spacing: -0.045em; text-transform: uppercase; }
.step__text { font-size: 15px; line-height: 1.55; color: var(--text-2); max-width: 48ch; }

/* ---------- 12 · Anatomy banner (static) --------------------------------------------- */
.anatomy { padding-top: var(--sp-l); }
.banner {
  position: relative; isolation: isolate; overflow: hidden; border-radius: var(--r-xl);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); min-height: clamp(420px, 34vw, 560px);
  background:
    radial-gradient(60% 80% at 92% 8%, rgb(var(--banner-light-rgb) / .16), transparent 62%),
    radial-gradient(50% 70% at 0% 100%, rgb(var(--banner-shade-rgb) / .7), transparent 70%),
    linear-gradient(112deg, var(--banner-0) 0%, var(--petrol-1) 34%, var(--banner-mid) 68%, var(--petrol-2) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.banner::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--grain-img); background-size: 220px 220px; opacity: .1; mix-blend-mode: overlay;
}
.banner__copy { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 16px; padding: clamp(28px, 3.4vw, 56px); }
.banner__label { font: 600 13px/1 var(--f-ui); letter-spacing: .24em; text-transform: uppercase; color: rgb(var(--text-hi-rgb) / .88); }
.banner__title {
  max-width: 11ch; font: 700 clamp(38px, 3.4vw + 6px, 58px)/.93 var(--f-display); letter-spacing: -0.045em;
  text-transform: uppercase; color: var(--text-hi);
}
.banner__line { max-width: 42ch; font-size: 16px; line-height: 1.55; color: rgb(var(--text-hi-rgb) / .8); }
.banner__btn { margin-top: 8px; }
.fig--anatomy { position: relative; min-height: 380px; } /* the collage (.an-*) is drawn by fig-anatomy.css */

.rule-detail {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; margin-top: 16px;
}
.legs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; align-content: start; }
.leg {
  display: grid; grid-template-columns: 36px 1fr; gap: 2px 14px; align-items: start;
  padding: 18px 18px 18px 16px; border-radius: var(--r-md); background: var(--s1); box-shadow: inset 0 0 0 1px var(--line);
}
.leg__mark {
  grid-row: span 2; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  font: 700 14px/1 var(--f-ui); color: var(--ink);
}
.leg--front .leg__mark, .leg--back .leg__mark { background: var(--pink); }
.leg--canary .leg__mark { background: var(--lime); }
.leg--canary .leg__mark .i { width: 20px; height: 20px; color: var(--ink); }
.leg__name { font: 700 18px/1.1 var(--f-display); letter-spacing: -0.025em; text-transform: uppercase; }
.leg__text { font-size: 14px; line-height: 1.5; color: var(--muted-2); }
.ledger { border-radius: var(--r-md); background: var(--deep); box-shadow: inset 0 0 0 1px var(--line); padding: 16px 0 14px; min-width: 0; }
.ledger__cap { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 18px 12px; font: 600 12.5px/1.45 var(--f-ui); color: var(--muted-2); }
.ledger__scroll { position: relative; overflow-x: auto; } /* positioned: keeps abspos children (sr-only) inside the clip */
.ledger__table { width: 100%; font: 400 12.5px/1 var(--f-mono); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ledger__table th { padding: 8px 18px; text-align: left; font: 600 12.5px/1 var(--f-ui); color: var(--muted-2); border-bottom: 1px solid var(--line); }
.ledger__table td { padding: 9px 18px; color: rgb(var(--text-hi-rgb) / .55); border-bottom: 1px solid rgba(255, 255, 255, .04); }
.ledger__table tr.is-front td, .ledger__table tr.is-back td { color: var(--pink-text); background: rgb(var(--pink-rgb) / .07); }
.ledger__table tr.is-canary td { color: var(--lime); background: rgb(var(--lime-rgb) / .07); }
.ledger__table td:last-child { font-weight: 700; }
.ledger__loss { padding: 14px 18px 0; font: 400 12px/1.4 var(--f-mono); color: var(--muted-2); }
.ledger__loss b { color: var(--pink-text); }
.rule-note { grid-column: 1 / -1; max-width: 92ch; padding: 4px 2px 0; font-size: 14px; line-height: 1.6; color: var(--muted); }

/* ---------- 13 · Leak Index (static) -------------------------------------------------- */
.index { padding-top: var(--sp-l); }
.index__titlerow { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.sim-banner {
  display: inline-flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 14px; padding: 10px 14px; border-radius: var(--r-sm);
  font: 500 14px/1.55 var(--f-ui); color: var(--pink-text-2); background: var(--pink-12); box-shadow: inset 0 0 0 1px rgb(var(--pink-rgb) / .35);
}
.sim-banner b { color: var(--pink); }
.dash { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.kpis { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi {
  position: relative; display: grid; align-content: space-between; gap: 18px; min-height: 152px; padding: 18px 18px 16px;
  border-radius: var(--r-md); background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden;
}
.kpi__label { font: 600 12.5px/1.2 var(--f-ui); color: var(--muted-2); }
.kpi__value { font: 700 clamp(44px, 3.6vw, 68px)/.85 var(--f-display); letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.kpi__foot { font: 500 12.5px/1.35 var(--f-ui); color: var(--muted-2); }
.kpi--bite .kpi__value { color: var(--pink); }
.kpi--bite { background: linear-gradient(180deg, rgb(var(--pink-rgb) / .1), rgb(var(--pink-rgb) / 0) 70%), var(--s1); }

.panel { border-radius: var(--r-md); background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.panel__title { font: 700 15px/1 var(--f-display); letter-spacing: -0.01em; text-transform: uppercase; }
.table-wrap { position: relative; overflow-x: auto; }
/* (table, feed and guide are laid out by fig-index.css: .ix-*) */

html.menu-open, html.menu-open body { overflow: hidden; }

/* ---------- 17 · Footer (shell) ------------------------------------------------------ */
.foot { position: relative; overflow: hidden; background: var(--lime); color: var(--ink); }
.foot ::selection { background: var(--ink); color: var(--lime); }
.foot :focus-visible { outline-color: var(--ink); }
.foot__in { padding-top: clamp(48px, 6vw, 104px); }
.foot__top {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px 48px; align-items: end;
  padding-bottom: clamp(32px, 3.4vw, 48px); border-bottom: 1px solid rgb(var(--ink-rgb) / .2);
}
.foot__title { max-width: 14ch; font: 700 clamp(40px, 5.2vw, 96px)/.86 var(--f-display); letter-spacing: -0.05em; text-transform: uppercase; }
.foot__cta { display: grid; justify-items: start; gap: 16px; }
.foot__line { font: 600 18px/1.3 var(--f-ui); letter-spacing: -0.01em; }
.foot__cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; padding-block: clamp(28px, 3vw, 44px); }
.foot__h { margin-bottom: 14px; font: 700 12px/1 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: rgb(var(--ink-rgb) / .66); }
/* 44px link rows (touch-sized everywhere); the list pulls up by the row's top air so the first word
   still sits 14–16px under its heading, like the paragraphs in the other columns */
.foot__col ul { list-style: none; margin: -11px 0 0; padding: 0; display: grid; }
.foot__col a {
  position: relative; display: flex; align-items: center; width: fit-content; max-width: 100%; min-height: 44px;
  font-weight: 600; font-size: 15px; line-height: 1.25; text-decoration: none;
}
.foot__col a::after { /* underline draws in from the left on hover, leaves to the right */
  content: ""; position: absolute; left: 0; right: 0; bottom: 11px; height: 1.5px; background: currentColor;
  transform: scaleX(0); transform-origin: 100% 50%; transition: transform .5s var(--ease-out);
}
.foot__col p { max-width: 36ch; font-size: 14px; line-height: 1.55; color: rgb(var(--ink-rgb) / .84); }
/* byline (main.js shows it once LINKS.handle is set): an inline link inside the sentence */
.foot__col .foot__by { margin-top: 10px; }
.foot__col .foot__by a {
  display: inline; min-height: 0; font-size: inherit;
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px;
}
.foot__col .foot__by a::after { content: none; }
.foot__legal {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding-bottom: 20px;
  font-size: 14px; line-height: 1.5; color: rgb(var(--ink-rgb) / .8);
}
.foot__legal p:first-child { max-width: 82ch; }
.foot__copy { font: 600 13px/1.4 var(--f-ui); white-space: nowrap; }
.foot__word { overflow: hidden; height: .66em; font: 700 16.2vw/.8 var(--f-display); letter-spacing: -0.065em; text-transform: uppercase; white-space: nowrap; text-align: center; user-select: none; }
.foot__word-in { display: inline-block; padding-right: .065em; transform: translateY(-.035em); } /* padding = trailing tracking, keeps the ink centred */

/* ---------- 18 · Toast ------------------------------------------------------------ */
.toast {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 160;
  max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: var(--r-btn);
  background: var(--s2); box-shadow: inset 0 0 0 1px var(--line-2), 0 20px 50px -10px rgba(0, 0, 0, .7);
  font: 500 14px/1.35 var(--f-ui); color: var(--text);
  transform: translate(-50%, calc(100% + 40px)); transition: transform .55s var(--ease-out);
  pointer-events: none;
}
.toast::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 10px; border-radius: 50%; background: var(--lime); vertical-align: 1px; }
.toast.is-on { transform: translate(-50%, 0); }
.toast:empty { visibility: hidden; }

/* ---------- 19 · Responsive ---------------------------------------------------------- */
@media (min-width: 1680px) {
  body { font-size: 16px; }
  .sec-sub, .reel__pitch { font-size: 16px; }
}
@media (max-width: 1279px) {
  .notes { display: none; }
}
@media (max-width: 1199px) {
  .routes__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .route { aspect-ratio: 9 / 14; }
  .how__track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .nav__links { display: none; }  /* the Phase 0 pill stays: the status is visible at every width */
  .burger { display: inline-block; }
  .banner { grid-template-columns: minmax(0, 1fr); }
  .fig--anatomy { min-height: 340px; }
  .rule-detail { grid-template-columns: minmax(0, 1fr); }
  .reel__head { flex-direction: column; align-items: flex-start; gap: 18px; }
  .foot__top { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  :root { --nav-h: 56px; }
  body { font-size: 15px; }
  .nav__cta { display: none; }
  .hero__in { padding-top: calc(var(--nav-h) + 24px); }
  .hero__kicker { letter-spacing: .12em; font-size: 11px; }
  .hero__kicker::before, .hero__kicker::after { width: 14px; }
  .hero__foot { justify-content: center; }
  .flips { gap: 8px; }
  .reel__track { grid-auto-columns: 84vw; gap: 12px; }
  .problem__stage { border-radius: var(--r-lg); padding-top: 64px; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .fact { min-height: 0; padding-bottom: 24px; }
  .routes__grid {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 64vw; gap: 12px;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); padding-bottom: 6px;
    scrollbar-width: none; overscroll-behavior-x: contain;
  }
  .routes__grid::-webkit-scrollbar { display: none; }
  .route { aspect-ratio: 9 / 16; scroll-snap-align: start; }
  .how__track { grid-template-columns: minmax(0, 1fr); }
  .how__count { display: none; }
  .banner { border-radius: var(--r-lg); }
  .kpis { gap: 10px; }
  .kpi { min-height: 128px; padding: 14px; }
  .foot__cols { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .foot__legal { flex-direction: column; align-items: flex-start; gap: 12px; font-size: 14px; }
  .foot__word { font-size: 16.4vw; }
  .grain { opacity: .04; }
}
/* phones and tablets: the clips carry their own grain; a fixed full-screen layer is pure compositing cost */
@media (pointer: coarse) {
  .grain { display: none; }
}
@media (max-width: 420px) {
  .flip__d { width: 64px; }
  .problem__cta .btn, .hero__cta .btn { --h: 46px; }
}

/* ---------- 20 · Reduced motion ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
html.is-reduced *, html.is-reduced *::before, html.is-reduced *::after { animation: none !important; transition-duration: .001ms !important; }
html.is-reduced .grain { animation: none; }
html.is-reduced::after { transition: none; } /* the landing cover just goes */
