/* ============================================================
   The Verification Frontier — technical report page

   Three voices, and nothing may speak out of turn:
     interface  Inter      — nav, headings, buttons, chrome
     prose      Literata   — leads, abstract, captions only
     machine    JetBrains Mono — eyebrows, labels, numbers, code

   Light is the default; dark is a toggle on <html data-theme>, not a
   media query, so the choice is the reader's and it persists.

   Two hues carry the whole argument:
     --env  blue    verified / paid for / checked
     --mid  violet  generated / free / unchecked
   ============================================================ */

:root, [data-theme="light"] {
  --bg0:#FFFFFF; --bg1:#FAFAFB; --bg2:#F6F7F9;
  --panel:#FFFFFF;
  --line:#E9EAEE; --line-2:#D7DAE0;
  --ink:#24292F; --ink-2:#4B5158; --ink-3:#6A7079;
  --env:#2F6FD0; --env-deep:#22539F;      /* accent: verified */
  --mid:#7A52C7; --mid-deep:#5E3AA8;      /* second: generated */
  --warm:#8C5310;
  --onenv:#FFFFFF;
  --shadow:0 1px 3px rgba(15,20,30,.05);
  --canvas-ink:34,41,47;
  --canvas-paper:255,255,255;
}

[data-theme="dark"] {
  --bg0:#0D1117; --bg1:#11161D; --bg2:#161B22;
  --panel:#141A21;
  --line:#262C36; --line-2:#39414D;
  --ink:#E6EDF3; --ink-2:#A8B3BF; --ink-3:#7D8794;
  --env:#79A8F5; --env-deep:#4E7FD0;
  --mid:#9E86E8; --mid-deep:#7C63C9;
  --warm:#EFA75B;
  --onenv:#0B1020;
  --shadow:0 1px 3px rgba(0,0,0,.4);
  --canvas-ink:230,237,243;
  --canvas-paper:13,17,23;
}

:root {
  --env-ghost: color-mix(in srgb, var(--env) 9%, transparent);
  --env-line:  color-mix(in srgb, var(--env) 55%, transparent);
  --mid-ghost: color-mix(in srgb, var(--mid) 10%, transparent);

  --display:'Inter','Noto Sans',system-ui,-apple-system,sans-serif;
  --sans:var(--display);
  --read:'Literata','Noto Serif',Georgia,'Times New Roman',serif;
  --mono:'JetBrains Mono',ui-monospace,SFMono-Regular,Menlo,monospace;

  --measure:800px;
  --ease:cubic-bezier(.2,.7,.3,1);
  --t-base:.24s;
}

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

html {
  scroll-behavior: smooth; scroll-padding-top: 84px;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  background: var(--bg0); color: var(--ink);
  font-family: var(--sans); font-size: 16.5px; line-height: 1.7;
  font-optical-sizing: auto; font-synthesis-weight: none;
  overflow-x: hidden;
  transition: background-color .35s, color .35s;
}

img, svg, video, canvas { max-width: 100%; display: block; }
img { height: auto; }

a { color: var(--env); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: color-mix(in srgb, var(--env) 18%, transparent); }

code {
  font-family: var(--mono); font-size: .86em; letter-spacing: -.005em;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 5px;
  padding: 1.5px 6px; color: var(--ink);
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--env); outline-offset: 2px; border-radius: 6px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--bg0); padding: .7rem 1.1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ============================================================
   HUD NAV
   ============================================================ */
.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s, box-shadow .3s;
}
.hud.scrolled { background: var(--bg0); box-shadow: 0 1px 0 var(--line); }
.hud-in {
  max-width: 1240px; margin: 0 auto; padding: 14px 28px;
  display: flex; align-items: center; gap: 26px;
}
.wordmark {
  font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: -.01em;
  color: var(--ink); display: flex; align-items: center; gap: 9px; text-decoration: none;
}
.wordmark:hover { text-decoration: none; }
.wordmark .mark { width: 23px; height: 23px; flex: none; color: var(--env); }

.hud nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.hud nav a {
  position: relative;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .03em; color: var(--ink-2);
}
.hud nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1.5px;
  background: var(--env); transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-base) var(--ease);
}
.hud nav a:hover { color: var(--env); text-decoration: none; }
.hud nav a:hover::after, .hud nav a.is-active::after { transform: scaleX(1); }
.hud nav a.is-active { color: var(--ink); }
.navbtn, .tbtn {
  /* an <a> inherits body's 1.7 leading, a <button> gets the UA's `normal`, so
     the two pills only line up if both are pinned to the same height */
  display: inline-flex; align-items: center; height: 32px;
}
.navbtn {
  border: 1px solid var(--line-2); border-radius: 7px;
  padding: 0 13px; color: var(--ink) !important;
}
.navbtn::after { display: none; }
.navbtn:hover { border-color: var(--env); }
.tbtn {
  cursor: pointer; background: none; border: 1px solid var(--line-2); color: var(--ink-2);
  padding: 0 12px; border-radius: 7px;
  font-family: var(--mono); font-size: 11.5px; transition: all .2s;
}
.tbtn:hover { border-color: var(--env); color: var(--env); }
@media (max-width: 860px) { .hud nav a.hide-s { display: none; } }
@media (max-width: 760px) {
  /* Keep in-page navigation on small screens — the report is very long.
     The links become a horizontally scrollable strip instead of vanishing. */
  .hud-in { padding: 9px 14px; gap: 10px; flex-wrap: wrap; }
  .wordmark { font-size: 15px; }
  .hud nav { width: 100%; margin-left: 0; gap: 0; order: 2;
    overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding-bottom: 2px; }
  .hud nav::-webkit-scrollbar { display: none; }
  .hud nav a[href^="#"] { display: inline-flex; flex: none; font-size: 11.5px;
    padding: 4px 10px 4px 0; white-space: nowrap; }
  .hud nav a.hide-s { display: inline-flex; }
  .hud nav a::after { bottom: 0; right: 10px; }
  .tbtn { position: absolute; top: 9px; right: 14px; height: 28px; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; display: block; padding: 96px 26px 30px; overflow: hidden; }
.hero-in { position: relative; max-width: 1180px; margin: 0 auto; width: 100%; text-align: center; }

.eyebrow {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .15em;
  text-transform: uppercase; color: var(--ink-3);
}
.eyebrow b { color: var(--env); font-weight: 500; }

.papertitle {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(24px, 3.9vw, 36px);
  max-width: 1020px; margin-inline: auto; text-wrap: balance;
  line-height: 1.14; letter-spacing: -.026em; margin-top: 10px;
}
.papertitle .grad { color: var(--env); }

.byline {
  margin: 18px auto 0; max-width: 1040px; text-wrap: balance;
  font-size: 14.5px; line-height: 1.8; color: var(--ink-2);
}
.affils {
  margin: 7px auto 0; font-family: var(--mono); font-size: 11.5px;
  color: var(--ink-3); letter-spacing: .02em; line-height: 1.7;
}
.fnotes {
  margin: 10px auto 0; font-family: var(--mono); font-size: 10.5px;
  color: var(--ink-3); opacity: .92; max-width: 640px;
}

.tagline {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(19px, 1.9vw, 25px); line-height: 1.34;
  margin: 34px auto 0; max-width: 1000px;
  letter-spacing: -.02em; color: var(--ink);
  text-wrap: balance;
}
.tagline .grad { color: var(--env); white-space: nowrap; }
.tagline .s { display: inline-block; }
.tagline .nb { white-space: nowrap; }

.cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.btn-hero {
  display: inline-flex; align-items: center; gap: 9px; line-height: 1;
  font-family: var(--sans); font-size: 13.5px; font-weight: 500;
  padding: 11px 22px; border-radius: 999px;
  border: 1px solid var(--ink); color: var(--bg0); background: var(--ink);
  text-decoration: none; transition: all .2s var(--ease);
}
.btn-hero:hover {
  background: color-mix(in srgb, var(--ink) 82%, var(--bg0));
  border-color: color-mix(in srgb, var(--ink) 82%, var(--bg0));
  color: var(--bg0); text-decoration: none; transform: translateY(-1px);
}
.btn-hero:active { transform: translateY(1px) scale(.995); }
.btn-hero.primary { background: var(--env-deep); border-color: var(--env-deep); color: #fff; font-weight: 600; }
.btn-hero.primary:hover { background: var(--env); border-color: var(--env); color: #fff; }
.bicon { width: 17px; height: 17px; flex: 0 0 auto; display: block;
         fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.herofigs { max-width: 1128px; margin: 44px auto 0; }
.herofigs figcaption { text-align: left; }   /* the hero centres; prose never does */

/* ============================================================
   SECTIONS
   ============================================================ */
.sec {
  max-width: 1180px; margin: 0 auto; padding: 90px 26px 20px;
  border-top: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}
.sec:first-of-type { border-top: 0; }
/* Two measures, one axis. Everything is either reading width (--measure) or
   full width (the .sec box), and BOTH are centred. */
.sec > *, .sec-head { margin-inline: auto; }
.sec-head { max-width: var(--measure); margin-bottom: 38px; }
.secno {
  font-family: var(--mono); font-size: 12px; letter-spacing: .15em;
  text-transform: uppercase; color: var(--env);
  display: inline-flex; align-items: center; gap: 12px;
}
.secno::after {
  content: ""; width: 56px; height: 1px;
  background: linear-gradient(90deg, var(--env), transparent);
}
h2 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(25px, 2.9vw, 35px); line-height: 1.12;
  letter-spacing: -.022em; margin-top: 12px;
}
h3 { font-family: var(--display); font-size: 18px; font-weight: 600; margin: 38px 0 4px; color: var(--ink); }
h4 { font-family: var(--display); font-size: 15px; font-weight: 600; }
/* display type sets its own leading; 1.7 is for reading, not for headings */
h3, h4, .res-h, .kcard h3 { line-height: 1.3; }

/* prose voice: long-form reading only, never UI chrome */
.lead, .abstext, .prose p {
  font-family: var(--read); font-optical-sizing: auto;
  color: var(--ink-2); max-width: var(--measure); margin-inline: auto;
}
.lead { margin-top: 16px; font-size: 17.5px; line-height: 1.72; }
.lead, .prose p, .kcard p, figcaption, .figcap, .tbl-cap, .foot-note { text-wrap: pretty; }
.prose p { font-size: 17px; line-height: 1.8; margin-top: 16px; }
.abstext { font-size: 16px; line-height: 1.85; margin-top: 16px; }
b, strong { color: var(--ink); font-weight: 600; }
em { color: var(--ink); }

.prose ul { max-width: var(--measure); margin: 16px auto 0; padding-left: 22px; }
.prose li {
  font-family: var(--read); font-size: 16.5px; line-height: 1.75;
  color: var(--ink-2); margin-top: 8px;
}
.prose li::marker { color: var(--env); }

/* reveal on scroll */
.rv { opacity: 0; transform: translateY(26px); }
.rv.in { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s var(--ease); }
.rv.d1.in { transition-delay: .08s; } .rv.d2.in { transition-delay: .16s; } .rv.d3.in { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; } }

/* ============================================================
   PANELS, FIGURES, CALLOUTS
   ============================================================ */
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 15px;
  overflow: hidden; box-shadow: var(--shadow);
}
.panel-pad { padding: 20px; }

figure { margin: 38px 0 0; }
/* A caption is as wide as the thing it captions. */
figcaption, .figcap {
  font-family: var(--read); font-size: 13.5px; line-height: 1.65;
  color: var(--ink-3); margin-top: 14px;
}
figcaption b, .figcap b { color: var(--ink-2); }
.fnum {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--env); margin-right: 9px;
}
.figure-narrow { max-width: 660px; }

.callout {
  border-left: 3px solid var(--env);
  background: color-mix(in srgb, var(--env) 5%, var(--bg0));
  padding: 20px 24px; border-radius: 0 12px 12px 0;
  margin-top: 44px; max-width: var(--measure); margin-inline: auto;
}
.callout.warm { border-left-color: var(--warm); background: color-mix(in srgb, var(--warm) 5%, var(--bg0)); }
.callout h4 { margin: 0; }
.callout p { font-family: var(--read); font-size: 14.5px; margin-top: 9px; color: var(--ink-2); }
.callout p + p { margin-top: 12px; }

/* ============================================================
   KEY POINTS + HEADLINE NUMBERS
   ============================================================ */
.kcards {
  list-style: none; display: grid; gap: 14px; margin-top: 34px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.hero-keys { max-width: 1128px; margin: 46px auto 0; text-align: left; }

.kcard {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px; box-shadow: var(--shadow);
}
.kcard .kn {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--env);
}
.kcard h3 { font-size: 15.5px; margin: 12px 0 10px; }
.kcard p { font-family: var(--read); font-size: 14px; line-height: 1.65; color: var(--ink-2); }

.mgrid {
  list-style: none; display: grid; gap: 14px; margin-top: 26px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.mitem {
  background: var(--bg1); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px;
}
.mitem b {
  display: block; font-family: var(--display); font-weight: 700;
  font-size: clamp(22px, 2.2vw, 26px); line-height: 1.1; letter-spacing: -.022em;
  color: var(--env); font-variant-numeric: tabular-nums;
}
.mitem.m2 b { color: var(--mid); }
.mitem span {
  display: block; margin-top: 6px; text-wrap: balance;
  font-family: var(--read); font-size: 13.5px; line-height: 1.6; color: var(--ink-3);
}
.mitem cite {
  display: block; margin-top: 9px; font-style: normal;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; color: var(--ink-3);
}

/* ============================================================
   MATH
   ============================================================ */
mjx-container[display="true"] {
  max-width: var(--measure);
  margin: 26px auto !important; overflow-x: auto; overflow-y: hidden; padding-block: 4px;
}

/* ============================================================
   DEMO FRAME
   ============================================================ */
.screen {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  background: var(--panel); border: 1px solid var(--line); border-radius: 15px;
  overflow: hidden; box-shadow: var(--shadow);
}

/* ============================================================
   TABLES
   ============================================================ */
.res-h { font-family: var(--display); font-size: 18px; font-weight: 600; margin: 50px 0 18px; }
.res-h + figure { margin-top: 0; }
.res-h:first-of-type { margin-top: 34px; }

.table-scroll {
  overflow-x: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 6px 18px 16px; box-shadow: var(--shadow);
}
table { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: 13.5px; }
th, td { padding: 7px 11px; text-align: left; white-space: nowrap; }
thead th {
  position: sticky; top: 0; background: var(--panel);
  font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3);
  border-bottom: 1px solid var(--line-2); padding-block: 14px 8px;
}
tbody th { font-weight: 500; color: var(--ink-2); }
tbody td { color: var(--ink-2); }
tbody tr:not(.grp) + tr:not(.grp) th,
tbody tr:not(.grp) + tr:not(.grp) td { border-top: 1px solid var(--line); }
.grp th {
  font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
  padding-top: 16px; padding-bottom: 2px;
}
.num { text-align: right; font-family: var(--mono); font-size: 12.5px; font-variant-numeric: tabular-nums; }
thead th.num { font-size: 10.5px; }
.num.b { color: var(--ink); font-weight: 500; }
.row-hi th, .row-hi td { background: var(--env-ghost); color: var(--ink); }
.row-hi th[scope="row"] { font-weight: 600; }
.row-hi th:first-child { border-radius: 8px 0 0 8px; }
.row-hi td:last-child { border-radius: 0 8px 8px 0; }
/* the caption sits outside .table-scroll, or it scrolls sideways with the table */
.tbl-cap, .foot-note {
  font-family: var(--read); font-size: 13.5px; line-height: 1.6; color: var(--ink-3);
  margin-top: 14px;
}
.tbl-cap a, .foot-note a { color: var(--env); }
td.tag { font-family: var(--mono); font-size: 11.5px; }
td.tag.cheap { color: var(--env); }
td.tag.dear  { color: var(--warm); }
td.tag.none  { color: var(--mid); }

/* ============================================================
   REFERENCES + CITE + FOOTER
   ============================================================ */
.refs { max-width: var(--measure); margin: 26px auto 0; list-style: none; counter-reset: r; }
/* the corpus list continues the primary-source numbering instead of
   restarting at [1] -- counter-reset on a second .refs would open a new scope */
.refs.refs-cont { counter-reset: none; }
.refs li {
  counter-increment: r; position: relative; padding-left: 34px;
  font-family: var(--read); font-size: 14.5px; line-height: 1.6;
  color: var(--ink-2); margin-top: 14px;
}
.refs li::before {
  content: "[" counter(r) "]"; position: absolute; left: 0; top: 1px;
  font-family: var(--mono); font-size: 11.5px; color: var(--env);
}
.refs .u { display: block; font-family: var(--mono); font-size: 11px; word-break: break-all; margin-top: 3px; }

.bib {
  position: relative; margin: 26px auto 0; max-width: var(--measure);
  font-family: var(--mono); font-size: 12.5px; line-height: 1.65; letter-spacing: -.005em;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 22px; color: var(--ink-2); overflow-x: auto;
}
.bib pre, .bib code { font: inherit; color: inherit; background: none; border: 0; padding: 0; white-space: pre; }
.copy {
  position: absolute; top: 12px; right: 12px;
  font-family: var(--mono); font-size: 11.5px;
  padding: 6px 11px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--bg0); color: var(--ink-2); cursor: pointer;
  transition: all .18s var(--ease);
}
.copy:hover { border-color: var(--env); color: var(--env); }
.copy[data-done] { border-color: var(--env); color: var(--env); }

.footer { border-top: 1px solid var(--line); margin-top: 80px; padding: 30px 26px 48px; }
.footer-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between;
  font-family: var(--mono); font-size: 11.5px; color: var(--ink-3);
}
.footer-links span { opacity: .4; margin-inline: 6px; }

@media print {
  .hud, .copy, .skip-link { display: none; }
  body { background: #fff; color: #000; }
  .rv { opacity: 1; transform: none; }
}

/* ============================================================
   THE VERIFICATION GAP — live canvas demo (demo.js)
   Two hues carry it: --mid = generated for free,
   --env = verified and paid for. demo.js reads both off this
   stylesheet, so a theme swap repaints the canvas too.
   ============================================================ */

.dreamer { margin-top: 26px; }

.dr-screen { aspect-ratio: 16 / 8.3; }

.dr-stage {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(210px, 28%, 300px);
}
.dr-canvas-wrap { position: relative; min-width: 0; }
.dr-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.dr-rail {
  position: relative; min-width: 0;
  display: flex; flex-direction: column; gap: 16px;
  padding: 16px 18px 18px;
  border-left: 1px solid var(--line); background: var(--bg1);
}

.dr-act { display: grid; gap: 3px; }
.dr-round {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3);
}
.dr-act strong {
  font-family: var(--display); font-size: 17px; font-weight: 600;
  letter-spacing: -.012em; color: var(--ink); line-height: 1.2;
}

/* the numbers double as the legend: violet is what was generated,
   blue is what survived a check */
.dr-stats { display: grid; gap: 10px; }
.dr-stats > div { min-width: 0; }
.dr-stats dt {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dr-stats dd {
  margin-top: 2px;
  font-family: var(--mono); font-size: 15px; font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.dr-stats dd.real  { color: var(--env); }
.dr-stats dd.dream { color: var(--mid); }

.dr-hist-t {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3);
}
.dr-rounds { display: flex; flex-direction: column; gap: 7px; margin-top: auto; }
.dr-rbars {
  display: flex; align-items: flex-end; gap: 4px; height: 100px;
  border-bottom: 1px solid var(--line-2);
}
.dr-rbars i {                       /* full bar: everything generated */
  position: relative; flex: 1 1 0; min-width: 0; max-width: 22px; height: 3%;
  border-radius: 3px 3px 0 0; background: var(--mid);
  transition: height .3s var(--ease);
}
.dr-rbars i b {                     /* the part that cleared a verifier */
  position: absolute; left: 0; right: 0; bottom: 0;
  border-radius: 0 0 1px 1px; background: var(--env);
}
.dr-rbars i[data-state="live"] { box-shadow: 0 0 0 1px var(--mid); }
.dr-rbars i[data-state="todo"] {
  background: none; height: 100% !important; border-radius: 0;
  border-left: 1px dotted var(--line-2);
}

/* ---------- controls ---------- */
.dr-controls { display: flex; align-items: center; gap: 9px; margin-top: 14px; flex-wrap: wrap; }
.dr-play {
  flex: none; width: 34px; height: 34px; display: grid; place-content: center;
  border-radius: 9px; border: 1px solid var(--line-2);
  background: transparent; color: var(--ink); cursor: pointer;
  transition: all .18s var(--ease);
}
.dr-play:hover { border-color: var(--env); color: var(--env); }
.dr-play svg { width: 16px; height: 16px; fill: currentColor; }
.dreamer[data-playing="true"]  .i-play,
.dreamer[data-playing="false"] .i-pause { display: none; }

.dr-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.dr-chips button {
  font-family: var(--mono); font-size: 11px; letter-spacing: .04em; cursor: pointer;
  padding: 7px 12px; border-radius: 9px;
  border: 1px solid var(--line-2); background: transparent; color: var(--ink-2);
  transition: all .18s var(--ease);
}
.dr-chips button:hover { color: var(--ink); border-color: var(--env); }
.dr-chips button:active { transform: scale(.97); }
.dr-chips button[aria-pressed="true"] {
  border-color: var(--env); color: var(--env); background: var(--env-ghost);
}

.dr-speed {
  margin-left: auto; font-family: var(--mono); font-size: 11px; cursor: pointer;
  padding: 7px 11px; border-radius: 9px;
  border: 1px solid var(--line-2); background: transparent; color: var(--ink-2);
  transition: all .18s var(--ease);
}
.dr-speed:hover { color: var(--env); border-color: var(--env); }

.dr-caption {
  font-family: var(--read); font-size: 13.5px; line-height: 1.65;
  color: var(--ink-3); margin-top: 16px;
}
.dr-caption b { color: var(--ink-2); }

/* ---------- narrow ---------- */
@media (max-width: 900px) {
  .dr-screen { aspect-ratio: auto; }
  .dr-stage { position: static; grid-template-columns: 1fr; }
  .dr-canvas-wrap { aspect-ratio: 5 / 4; }
  .dr-rail { border-left: 0; border-top: 1px solid var(--line); }
  .dr-rounds { margin-top: 4px; }
  .dr-rbars { height: 62px; }
  .dr-chips { order: 3; flex: 1 0 100%; }
  .dr-chips button { flex: 1 1 0; justify-content: center; padding: 7px 8px; font-size: 10.5px; }
}
@media (max-width: 760px) {
  .sec { padding-left: 18px; padding-right: 18px; }
  .hero { padding: 78px 18px 30px; }
  .btn-hero { font-size: 12.5px; padding: 9px 16px; }
  .byline { font-size: 13.5px; }
}
@media (max-width: 430px) {
  .dr-chips button { font-size: 9.5px; padding: 7px 4px; white-space: nowrap; }
}

/* ---------- a11y utility ---------- */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0 0 0 0);white-space:nowrap;border:0}
.bib .copy.ok { border-color: var(--env); color: var(--env); background: var(--env-ghost); }

/* ---------- contrast corrections (verified with a WCAG harness) ---------- */
[data-theme="dark"] .btn-hero.primary,
[data-theme="dark"] .btn-hero.primary:hover { background:#2B5AA8; border-color:#2B5AA8; color:#fff; }
.dr-hist-t .sw-mid { color: var(--mid); }
.dr-hist-t .sw-env { color: var(--env); }

/* ---------- small-screen hero refinements ---------- */
@media (max-width: 760px) {
  .hero { padding-top: 104px; }
  .affils { font-size: 10.5px; line-height: 1.9; }
  .fnotes { font-size: 10px; line-height: 1.8; }
}
@media (max-width: 430px) {
  .affils { font-size: 10px; }
}

/* the source row is mono with tracking; on narrow screens the tracking is what
   pushes the last word to the edge, so drop it there rather than shrink again */
@media (max-width: 760px) {
  .affils { letter-spacing: 0; max-width: 330px; }
}

/* ============================================================
   TRENCH-RSI — overrides on the Verification Frontier system

   The type system, spacing, theme toggle and demo chrome are
   inherited unchanged (they are already contrast-tested). What
   changes is which hue leads, because the argument is different.

   On /vf/ blue led: the report was about verification being scarce.
   Here the protagonist is the mass that dies, so violet leads the
   page chrome and blue is reserved strictly for "cleared a check".

     --mid   violet   launched / proposed / free        (832,941)
     --env   blue     graduated / survived a verifier   (1,651)
     --warm  amber    the legibility gradient           (Goodhart)
   ============================================================ */

/* page chrome switches to violet */
.wordmark .mark { color: var(--mid); }
.secno { color: var(--mid); }
.secno::after { background: linear-gradient(90deg, var(--mid), transparent); }
.eyebrow b { color: var(--mid); }
.papertitle .grad, .tagline .grad { color: var(--mid); }
.kcard .kn { color: var(--mid); }
.hud nav a::after { background: var(--mid); }
.hud nav a:hover { color: var(--mid); }
.navbtn:hover, .tbtn:hover { border-color: var(--mid); color: var(--mid); }
.tbtn:hover { color: var(--mid); }
.prose li::marker { color: var(--mid); }
.refs li::before { color: var(--mid); }
.btn-hero.primary { background: var(--mid-deep); border-color: var(--mid-deep); }
.btn-hero.primary:hover { background: var(--mid); border-color: var(--mid); }
[data-theme="dark"] .btn-hero.primary,
[data-theme="dark"] .btn-hero.primary:hover { background:#5B3FA0; border-color:#5B3FA0; color:#fff; }
a:focus-visible, button:focus-visible { outline-color: var(--mid); }
::selection { background: color-mix(in srgb, var(--mid) 20%, transparent); }

/* the default callout carries the violet thread; .env marks a verified fact */
.callout { border-left-color: var(--mid); background: color-mix(in srgb, var(--mid) 5%, var(--bg0)); }
.callout.env { border-left-color: var(--env); background: color-mix(in srgb, var(--env) 5%, var(--bg0)); }
.callout.warm { border-left-color: var(--warm); background: color-mix(in srgb, var(--warm) 6%, var(--bg0)); }

/* headline numbers: .m2 is the survivor figure (blue), .m3 the Goodhart figure */
.mitem b { color: var(--mid); }
.mitem.m2 b { color: var(--env); }
.mitem.m3 b { color: var(--warm); }

/* tables: highlight rows in violet, and add a "survived" tag colour */
.row-hi th, .row-hi td { background: var(--mid-ghost); }
td.tag.live { color: var(--env); }
td.tag.dead { color: var(--mid); }
td.tag.proxy { color: var(--warm); }

/* a lower-bound flag, used everywhere the 0.198% is quoted */
.lb {
  font-family: var(--mono); font-size: .78em; letter-spacing: .04em;
  color: var(--warm); white-space: nowrap;
}

/* ============================================================
   DISCOVERY TREE — demo.js
   Generations run left to right. Each surviving node seeds a new
   spray of launches; the market prunes almost all of them.
   ============================================================ */

.tr-legend {
  display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .03em; color: var(--ink-3);
}
.tr-legend span { display: inline-flex; align-items: center; gap: 7px; }
.tr-legend i {
  width: 9px; height: 9px; border-radius: 50%; flex: none; display: block;
}
.tr-legend .sw-mid { background: var(--mid); }
.tr-legend .sw-env { background: var(--env); }

/* the rail's mode line wraps on narrow rails, so it may not be one line */
.dr-act strong { text-wrap: balance; }

/* survivors-per-generation bars, on a FIXED scale.
   The violet ghost is the launch count, identical in every mode; the blue
   bar is survivors. Auto-normalising per mode would erase the 17.4×, which
   is the entire figure. */
.tr-bars {
  display: flex; align-items: flex-end; gap: 4px; height: 100px;
  border-bottom: 1px solid var(--line-2);
}
.tr-bars i {
  position: relative; flex: 1 1 0; min-width: 0; max-width: 22px; height: 100%;
  background: var(--mid-ghost); border-radius: 3px 3px 0 0;
}
.tr-bars i b {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--env); border-radius: 2px 2px 0 0;
  transition: height .3s var(--ease);
}
.tr-bars i[data-state="todo"] {
  background: none; border-left: 1px dotted var(--line-2); border-radius: 0;
}
.tr-scale {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 9px; color: var(--ink-3); margin-top: 4px;
}

/* the rail on this page needs a little more room than /vf/'s */
.tr-screen { aspect-ratio: 16 / 8.6; }
.tr-stage { grid-template-columns: minmax(0, 1fr) clamp(216px, 29%, 310px); }

/* /vf/'s narrow rule sets .dr-stage to one column, but the .tr-stage override
   above is later in the file and would keep two columns on a phone, squeezing
   the canvas to ~136px. Restate the single column here. */
@media (max-width: 900px) {
  .tr-screen { aspect-ratio: auto; }
  .tr-stage { position: static; grid-template-columns: 1fr; }
  .tr-bars { height: 66px; }
}

/* mode chips + play/speed follow the page's violet chrome */
.dr-chips button:hover { border-color: var(--mid); }
.dr-chips button[aria-pressed="true"] {
  border-color: var(--mid); color: var(--mid); background: var(--mid-ghost);
}
.dr-play:hover { border-color: var(--mid); color: var(--mid); }
.dr-speed:hover { border-color: var(--mid); color: var(--mid); }
.dr-stats dd.dream { color: var(--mid); }
.dr-stats dd.real { color: var(--env); }
.copy:hover, .copy[data-done], .bib .copy.ok { border-color: var(--mid); color: var(--mid); }
.bib .copy.ok { background: var(--mid-ghost); }

/* The hero cards on this page lead with a figure, so .kn is a display number
   rather than the small mono label it is on the companion page. */
.kcard .kn {
  font-family: var(--display); font-weight: 700; letter-spacing: -.022em;
  font-size: clamp(24px, 2.4vw, 30px); line-height: 1.08;
  color: var(--mid); font-variant-numeric: tabular-nums;
}
.kcard p { margin-top: 9px; }

/* the 11.9-million framing the tagline used to carry, restated at lead size */
.hero .tagline { max-width: 880px; }

/* ------------------------------------------------------------------
   Tables on a phone. .table-scroll scrolls sideways, but on a touch
   screen the overlay scrollbar is invisible until you already know to
   swipe, so the value column just looked cut off. The fix is a
   permanently visible slim track, which appears only when there is in
   fact something to scroll to. Wrapping the label column instead was
   tried and was worse: the values are nowrap, so the labels collapsed
   into four-line slivers and the values stayed clipped anyway.
   ------------------------------------------------------------------ */
.table-scroll { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.table-scroll::-webkit-scrollbar { height: 7px; }
.table-scroll::-webkit-scrollbar-track { background: transparent; }
.table-scroll::-webkit-scrollbar-thumb {
  background: var(--line-2); border-radius: 4px;
}

@media (max-width: 760px) {
  .table-scroll { padding: 4px 13px 12px; }
  table { font-size: 12.5px; }
  th, td { padding: 6px 8px; }
  /* Desktop keeps every cell on one line, which is right there and wrong on a
     phone: one long value (the observation window) was setting the width for a
     whole two-column table and pushing the numbers off screen. Letting cells
     wrap lets almost every table fit outright; the few genuinely wide ones
     still scroll, and get the edge shadow below. */
  th, td { white-space: normal; }
  td.tag { white-space: nowrap; }
}
@media (max-width: 430px) {
  table { font-size: 11.5px; }
  th, td { padding: 5px 6px; }
}

/* Right-edge shadow that shows only while there is more table to the right,
   and retracts when you reach the end. Two background layers: an opaque panel
   pad attached to the content (`local`) that slides away as you scroll, and
   the shadow attached to the viewport (`scroll`) which it uncovers. Unlike an
   overlay scrollbar this actually paints, so the cue is visible on a phone. */
.table-scroll {
  background-image:
    linear-gradient(to right, var(--panel) 40%, transparent),
    linear-gradient(to left,  var(--panel) 40%, transparent),
    linear-gradient(to right, color-mix(in srgb, var(--ink) 16%, transparent), transparent),
    linear-gradient(to left,  color-mix(in srgb, var(--ink) 16%, transparent), transparent);
  background-position: left center, right center, left center, right center;
  background-repeat: no-repeat;
  background-size: 28px 100%, 28px 100%, 12px 100%, 12px 100%;
  background-attachment: local, local, scroll, scroll;
}

/* ==========================================================================
   Section 07 — the live loop panel
   Reuses the .dreamer / .dr-screen / .dr-rail shell from the figure above so
   the two figures read as siblings. Colour semantics are unchanged: violet is
   a proposal, blue means it cleared the verifier, amber is the legibility
   axis, so the reveal block is the only amber thing here.
   ========================================================================== */

.lv-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 232px;
  gap: 18px;
  align-items: stretch;
  min-height: 340px;
}

.lv-thinkwrap { display: flex; flex-direction: column; min-width: 0; }

.lv-thinkhead {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 8px;
  font-family: var(--mono, "JetBrains Mono", monospace);
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3);
}

.lv-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--line-2); flex: none;
}
[data-running] .lv-dot { background: var(--mid); animation: lv-pulse 1.4s var(--ease) infinite; }
@keyframes lv-pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* The reasoning stream. Fixed height on purpose: the text arrives faster than
   anyone reads it, and letting the box grow made the whole page jump on every
   token. Scrolls itself, and rsi-live.js stops following the tail the moment
   the reader scrolls up to re-read something. */
.lv-think {
  flex: 1 1 auto;
  height: 300px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg1);
  font-family: var(--mono, "JetBrains Mono", monospace);
  font-size: 12.5px;
  line-height: 1.62;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
}
.lv-think:empty::before {
  content: "The model's reasoning appears here, token by token, once you press run.";
  color: var(--ink-3);
  font-style: italic;
}

/* Structural markers the client injects between stretches of reasoning. */
.lv-marker {
  margin: 14px 0 10px;
  padding: 7px 10px;
  border-left: 2px solid var(--line-2);
  background: var(--bg2);
  border-radius: 0 4px 4px 0;
  font-size: 11.5px;
  letter-spacing: .02em;
  color: var(--ink-2);
  white-space: normal;
}
.lv-marker.is-gen {
  border-left-color: var(--mid);
  color: var(--ink);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  font-size: 11px;
}
.lv-marker.is-commit { border-left-color: var(--mid); }
.lv-marker.is-verdict { border-left-color: var(--env); color: var(--ink); }
.lv-marker.is-note { border-left-color: var(--warm); }
.lv-marker.is-error { border-left-color: #c0392b; color: #c0392b; }

.lv-rail { min-width: 0; }

.lv-bars {
  display: flex; align-items: flex-end; gap: 5px;
  height: 84px; margin-top: 8px;
}
.lv-bar {
  position: relative;
  flex: 1 1 0; min-width: 0;
  height: 100%;
  display: flex; align-items: flex-end;
  background: var(--bg2);
  border-radius: 2px;
}
.lv-bar span {
  display: block; width: 100%;
  background: var(--env);
  border-radius: 2px;
  transition: height .45s var(--ease);
}
.lv-bar em {
  position: absolute; left: 0; right: 0; top: -15px;
  text-align: center;
  font-family: var(--mono, "JetBrains Mono", monospace);
  font-size: 9.5px; font-style: normal;
  color: var(--ink-3);
}

/* controls */

.lv-controls { flex-wrap: wrap; gap: 14px; }

.lv-run {
  flex: none;
  padding: 10px 22px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: var(--bg0);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease), opacity .18s var(--ease);
}
.lv-run:hover:not(:disabled) { background: var(--ink-2); border-color: var(--ink-2); }
.lv-run:focus-visible { outline: 2px solid var(--env); outline-offset: 2px; }
.lv-run:disabled { opacity: .5; cursor: not-allowed; }

.lv-status {
  margin: 0; min-width: 0; flex: 1 1 240px;
  font-family: var(--mono, "JetBrains Mono", monospace);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-3);
}
.lv-status.is-busy { color: var(--mid); }
.lv-status.is-done { color: var(--env); }
.lv-status.is-error { color: #c0392b; }

/* results table */

.lv-tablewrap { margin-top: 4px; }

.lv-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.lv-table th {
  font-family: var(--mono, "JetBrains Mono", monospace);
  font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3); text-align: right;
  padding: 8px 10px; border-bottom: 1px solid var(--line-2);
}
.lv-table th:first-child, .lv-table th:nth-child(2),
.lv-table th:nth-child(3), .lv-table th:nth-child(4) { text-align: center; }
.lv-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
.lv-table tbody tr.is-best td { background: var(--bg2); color: var(--ink); font-weight: 600; }
.lv-c-gen { text-align: center !important; color: var(--ink-3) !important; font-weight: 400 !important; }
.lv-c-flag { text-align: center !important; }
.lv-c-dial { font-family: var(--mono, "JetBrains Mono", monospace); }
.lv-c-acc { font-weight: 600; }
.lv-c-rate { color: var(--env) !important; font-family: var(--mono, "JetBrains Mono", monospace); }

/* A filled square is 1, a hollow one is 0 — quicker to scan down a column
   than a field of ones and zeroes. */
.lv-flag {
  display: inline-block; width: 10px; height: 10px;
  border: 1.5px solid var(--line-2); border-radius: 2px;
  background: transparent;
}
.lv-flag.on { background: var(--mid); border-color: var(--mid); }

/* the reveal, shown only after a run finishes */

.lv-reveal {
  margin-top: 20px;
  padding: 18px 20px;
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--warm);
  border-radius: 0 8px 8px 0;
  background: var(--bg1);
  animation: lv-in .5s var(--ease) both;
}
@keyframes lv-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.lv-revhead {
  margin: 0 0 12px;
  font-family: var(--mono, "JetBrains Mono", monospace);
  font-size: 11px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--warm);
}
.lv-revlist { margin: 0 0 14px; padding-left: 20px; }
.lv-revlist li { margin-bottom: 6px; font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.lv-revlist b { color: var(--ink); font-variant-numeric: tabular-nums; }
.lv-revnote {
  margin: 0;
  font-family: var(--serif, Literata, Georgia, serif);
  font-size: 15px; line-height: 1.7; color: var(--ink-2);
}

@media (prefers-reduced-motion: reduce) {
  .lv-reveal, .lv-bar span { animation: none; transition: none; }
  [data-running] .lv-dot { animation: none; }
}

/* Single column below the same breakpoint the figure above uses, and restated
   rather than inherited — source order means a later .lv-stage rule would
   otherwise lose to /vf/'s narrow .dr-stage rule. */
@media (max-width: 900px) {
  .lv-stage { grid-template-columns: 1fr; gap: 16px; min-height: 0; }
  .lv-think { height: 260px; }
  .lv-bars { height: 70px; }
}
@media (max-width: 600px) {
  .lv-think { height: 230px; font-size: 12px; padding: 12px 13px; }
  .lv-table { font-size: 11.5px; }
  .lv-table th, .lv-table td { padding: 6px 6px; }
  .lv-run { width: 100%; }
  .lv-status { flex-basis: 100%; }
}

/* /vf/'s .dr-screen carries aspect-ratio:16/8.3, which is right for a canvas
   and wrong for a text panel: it forced 585px of box around 340px of content
   and left a dead field under the reasoning stream. This panel sizes to its
   content instead. */
.lv-screen { aspect-ratio: auto; height: auto; }
.lv-stage { min-height: 0; }
.lv-think { height: 340px; }
@media (max-width: 900px) { .lv-think { height: 260px; } }
@media (max-width: 600px) { .lv-think { height: 230px; } }

/* resting state for the live panel */
.lv-idle {
  margin: 0;
  font-family: var(--sans, inherit);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-3);
  max-width: 52ch;
}

/* ============================================================
   HERO CHAIN — one batch of 3,000 launches walked through the loop.
   Pixel sprites are flat single-colour PNGs, so they read on both
   themes; the tombstone is the only one that needs lifting in dark.
   ============================================================ */
.chain { margin: 52px auto 0; max-width: 1128px; }

.chain-row {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 0 18px; align-items: start;
  grid-template-columns: 1fr auto 1fr auto 1fr 1fr;
}

.cnode { text-align: center; padding: 0 4px; }
.cnode img {
  display: block; width: 76px; height: 76px; margin: 0 auto 14px;
  image-rendering: pixelated;            /* keep the pixels hard, never smoothed */
  opacity: .92;
}
.cn-k {
  font-family: var(--mono); font-size: 21px; font-weight: 500;
  letter-spacing: -.02em; color: var(--mid); line-height: 1.1;
}
.cn-l {
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  color: var(--ink); margin-top: 5px; letter-spacing: -.01em;
}
.cn-s {
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-3);
  margin-top: 4px; line-height: 1.5;
}
.cnode.dim .cn-k { color: var(--ink-3); }
.cnode.dim img { opacity: .62; }
.cnode.env .cn-k { color: var(--env); }

/* the connectors: a hairline with a small monospace verb sitting on it */
.clink { position: relative; align-self: start; padding-top: 36px; min-width: 74px; }
.cl-line {
  display: block; height: 1px; background: var(--line-2);
  position: relative;
}
.cl-line::after {                        /* arrowhead */
  content: ""; position: absolute; right: -1px; top: -3px;
  width: 6px; height: 6px; border-right: 1px solid var(--line-2);
  border-top: 1px solid var(--line-2); transform: rotate(45deg);
}
.cl-t {
  display: block; text-align: center; margin-top: 9px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3);
}
/* The verdict connector used to draw a fork with two stacked pseudo-elements;
   they overlapped exactly and rendered as one stray tick, so the fork is gone.
   The two outcome nodes sitting side by side already say "one in, two out". */

/* the return leg — this is the part that makes it a loop and not a funnel */
.chain-back {
  display: flex; align-items: center; gap: 14px;
  max-width: 1128px; margin: 26px auto 0;
}
.cb-arrow {
  flex: 1 1 auto; height: 1px; background: var(--line-2); position: relative;
}
.cb-arrow::before {
  content: ""; position: absolute; left: -1px; top: -3px;
  width: 6px; height: 6px; border-left: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2); transform: rotate(45deg);
}
.cb-t {
  flex: 0 0 auto; font-family: var(--mono); font-size: 10.5px;
  color: var(--ink-3); letter-spacing: .01em;
}

/* the field: 3,000 cells, six of them lit. one screen = one batch. */
.field-wrap { margin: 30px auto 0; max-width: 1128px; }
#field {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg1);
}
.field-l {
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-3);
  margin-top: 9px; text-align: center; letter-spacing: .01em;
}
.field-l .fl-b { color: var(--env); }

.chain figcaption {
  font-family: var(--mono); font-size: 10.5px; line-height: 1.65;
  color: var(--ink-3); max-width: 760px; margin: 22px auto 0; text-align: center;
}

[data-theme="dark"] .cnode.dim img { opacity: .8; filter: brightness(1.45); }
[data-theme="dark"] .cnode img { opacity: 1; }

@media (max-width: 900px) {
  .chain-row { grid-template-columns: 1fr 1fr; gap: 30px 14px; }
  .clink { display: none; }              /* arrows mean nothing once it wraps */
  .cnode img { width: 62px; height: 62px; margin-bottom: 11px; }
  .cn-k { font-size: 19px; }
  .chain-back { display: none; }
}
@media (max-width: 600px) {
  .chain { margin-top: 40px; }
  .chain-row { gap: 26px 10px; }
  .cnode img { width: 54px; height: 54px; }
  .cn-k { font-size: 17px; }
  .cn-s { font-size: 9.5px; }
}
@media (prefers-reduced-motion: reduce) {
  #field { }                              /* the script checks this and draws one static batch */
}
