/* ============================================================
   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; }
.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; }
}
