/* ── tvf galleries: the shared stylesheet ─────────────────────────────────
   One file for every page in gallery/ that shows tiles. It used to be eleven
   kilobytes repeated verbatim in each page's <style>, which is seven places to
   make one change and seven chances to make it differently. A page now keeps
   only what is its own: its fonts link, and nothing else.

   The cost is that a page copied out of this folder on its own arrives
   unstyled; it still works, and it is legible, but it needs this file beside it
   to look right. */
/* ── THE CATALOGUE ─────────────────────────────────────────────────────────
   Restyled onto the Loop pane's system: the dark slate ground, the panel cards
   at 14px radius, the system sans for prose, uppercase letter-spaced headings
   for anything that names a group, tabular numerals for anything measured, and
   violet for everything you can push. Same page, same behaviour — the tokens
   below and the two canvas colours are the whole of the change. */
html{
  /* NATIVE CONTROLS FOLLOW THE PAGE. accent-color paints the FILLED half of a range
     and nothing else — the empty half, the select's popup, the scrollbars and the
     focus rings all come from the UA's light default, which on this ground read as
     three bright white bars per card. One declaration turns the whole set over. */
  color-scheme: dark;
}
:root{
  --bg:#0c0f16; --panel:#141926; --stage:#0e131d;
  --ink:#e8ecf5; --ink-2:#c3ccdf; --dim:#8b95ab; --line:#1e2637; --line-2:#2a3348;
  --curv:#7c5cff; --A:#f2c14e; --ok:#4ade80; --bad:#ef4444; --mob:#ffb547;
  --mono:'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0; background:var(--bg); color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  font-size:13px; -webkit-font-smoothing:antialiased;
}

/* ── MASTHEAD ── */
header{max-width:1360px;margin:0 auto;padding:26px 20px 4px}
h1{font-size:20px;font-weight:650;margin:0 0 2px;letter-spacing:-.01em}
h1 em{font-style:normal;font-weight:650;color:var(--curv)}
.pill{display:inline-block;font-size:11px;color:var(--curv);border:1px solid rgba(124,92,255,.4);
  border-radius:999px;padding:1px 9px;margin-left:6px;vertical-align:middle}
header p.lede{max-width:78ch;margin:12px 0 0;color:var(--dim);font-size:13.5px;line-height:1.55}
header p.lede b{color:var(--ink-2);font-weight:600}
header p.sub{margin:8px 0 0;font-size:12.5px;color:var(--dim);line-height:1.6;max-width:78ch}
header code, footer code, .sec-note code{font-family:var(--mono);font-size:.92em;color:var(--ink-2)}

/* ── STICKY BAR ── */
.bar{position:sticky;top:0;z-index:50;margin-top:18px;
  background:rgba(12,15,22,.9);backdrop-filter:blur(9px);
  border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.bar-in{max-width:1360px;margin:0 auto;padding:9px 20px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.bar .spacer{flex:1}
.bar .count{font-size:11px;color:var(--dim);letter-spacing:.09em;text-transform:uppercase}

button,select{
  font:inherit;font-size:12.5px;color:var(--ink);
  background:#1c2333;border:1px solid var(--line-2);border-radius:8px;
  padding:6px 12px;cursor:pointer;transition:background .13s,color .13s,border-color .13s;
  white-space:nowrap;
}
button:hover,select:hover{background:#232c42}
button.on{background:var(--curv);border-color:var(--curv);color:#fff}
button.ghost{background:transparent;color:var(--dim)}
button.ghost:hover{background:#1c2333;color:var(--ink)}
a.jump{font-size:11px;letter-spacing:.09em;text-transform:uppercase;color:var(--dim);
  text-decoration:none;padding:5px 7px;border-bottom:1px solid transparent}
a.jump:hover{color:var(--curv);border-bottom-color:var(--curv)}

/* ── SECTIONS ── */
main{max-width:1360px;margin:0 auto;padding:0 20px 100px}
section{padding-top:34px;scroll-margin-top:52px}
.sec-head{display:flex;align-items:center;gap:14px;margin-bottom:8px}
.sec-head h2{font-size:12px;text-transform:uppercase;letter-spacing:.09em;color:var(--dim);
  margin:0;font-weight:650}
.sec-head .rule{flex:1;height:1px;background:var(--line)}
.sec-head .n{font-size:11px;color:var(--dim);font-variant-numeric:tabular-nums}
.sec-note{font-size:12.5px;color:var(--dim);line-height:1.6;max-width:86ch;margin:0 0 18px}
.sec-note b{color:var(--ink-2);font-weight:600}

.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(330px,1fr));gap:18px}

/* ── TILE = CARD ── */
.tile{background:var(--panel);border:1px solid var(--line);border-radius:14px;
  padding:10px;display:flex;flex-direction:column;gap:12px;
  transition:border-color .16s,box-shadow .16s}
.tile:hover{border-color:var(--line-2);box-shadow:0 2px 22px rgba(0,0,0,.35)}
.tile.wide{grid-column:1 / -1}
.tile .stage{position:relative;background:var(--stage);border:1px solid var(--line);border-radius:8px;overflow:hidden}
.tile canvas{display:block;width:100%;height:236px;border-radius:8px}
.tile.wide canvas{height:300px}
.tile.tall canvas{height:340px}
.tile .stage .badge{position:absolute;top:8px;right:10px;font-size:11px;letter-spacing:.09em;
  color:var(--dim);text-transform:uppercase}
/* THE TILE'S BUTTONS SIT UNDER THE PICTURE, NOT ON IT. They used to float over the bottom
   right of the canvas, appearing on hover, and covered whatever the shape put there; a wide
   composition reaches the corners, and a chart puts its axis labels exactly there. A row
   of their own costs one line of height and hides nothing, and with the picture clear of
   them there is no reason to hide them until hover, which touch screens never had anyway. */
.tile .tools{display:flex;justify-content:flex-end;gap:6px;margin:-4px 0 -2px}
.tile .tools button{padding:3px 10px;font-size:11.5px;border-radius:7px}
.tile .tools button[hidden]{display:none}
.tile .tools:not(:has(button:not([hidden]))){display:none}   /* a chart tile with no curve to hand on */
.tile .tools .edit{background:var(--curv);border-color:var(--curv);color:#fff}
.tile .tools .edit:hover{background:#8d72ff}
.tile .tools .tvf.done,.tile .tools .save.done{background:var(--ok);border-color:var(--ok);color:#0c0f16}

.tile .body{padding:0 5px 4px;display:flex;flex-direction:column;gap:10px}
.tile h3{font-size:14px;font-weight:650;margin:0;letter-spacing:-.005em}
.tile .note{font-size:12.5px;line-height:1.55;color:var(--dim);margin:-4px 0 0}
.tile code.src{
  display:block;font-family:var(--mono);font-size:11.5px;color:#b9a6ff;
  background:rgba(124,92,255,.10);border:1px solid rgba(124,92,255,.22);border-radius:8px;
  padding:7px 10px;line-height:1.55;overflow-x:auto;white-space:pre;cursor:copy}
.tile code.src:hover{background:rgba(124,92,255,.17)}
.tile code.src.copied{color:var(--ok);border-color:rgba(74,222,128,.4);background:rgba(74,222,128,.10)}

/* ── THE COURSE ── where this page sits among the seven; gallery/index.html is the front */
.crumbs{font-size:11px;letter-spacing:.09em;text-transform:uppercase;color:var(--dim);margin:0 0 10px}
.crumbs a,.next a{color:#b9a6ff;text-decoration:none}
.crumbs a:hover,.next a:hover{text-decoration:underline}
.next{margin-top:14px;padding-top:12px;border-top:1px solid var(--line);font-size:13.5px;color:var(--ink-2)}

/* ── TILE LINKS AND PREDICT MODE ── */
.tile.flash{animation:flash 2.4s ease-out}
@keyframes flash{0%,30%{border-color:var(--curv);box-shadow:0 0 0 2px rgba(124,92,255,.55)}100%{}}
.tile .predict{font-size:12.5px;color:var(--ink-2);background:rgba(124,92,255,.07);border:1px dashed rgba(124,92,255,.35);
  border-radius:8px;padding:9px 11px;display:flex;flex-wrap:wrap;gap:6px 14px;align-items:center}
.tile .predict[hidden]{display:none}
.tile .predict .q{flex-basis:100%;color:var(--ink);font-weight:600}
.tile .predict label{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.tile .predict input[type=number]{width:62px;font:inherit;font-size:12.5px;color:var(--ink);background:#10151f;
  border:1px solid var(--line-2);border-radius:6px;padding:3px 6px}
.tile .predict .hint-in{color:var(--dim);font-size:11.5px}
.tile .predict .hint{display:block;font-weight:400;color:var(--dim);font-size:11.5px;margin-top:2px}
.tile .predict .reveal{margin-left:auto;background:var(--curv);border-color:var(--curv);color:#fff;padding:4px 12px}
.tile .spec-cap .ok{color:var(--ok);font-weight:700}
.tile .spec-cap .no{color:var(--bad);font-weight:700}
#predict-score{font-size:11px;color:var(--A);letter-spacing:.09em;text-transform:uppercase;font-variant-numeric:tabular-nums}

/* ── SPECTRUM STRIP ── under every live tile; see drawSpectrum */
.tile canvas.spec{height:64px;border-radius:0;margin:-2px 0 -6px}
.tile .spec-cap{font-size:11.5px;color:var(--dim);font-variant-numeric:tabular-nums;line-height:1.4}
.tile .spec-cap b{color:#b9a6ff;font-weight:600}

/* ── ROUND-TRIP TILE ── */
.pastebox{width:100%;min-height:84px;resize:vertical;font-family:var(--mono);font-size:11.5px;
  line-height:1.5;color:var(--ink-2);background:#10151f;
  border:1px solid var(--line-2);border-radius:8px;padding:8px 10px}
.pastebox::placeholder{color:#5c6680}
.paste-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.paste-row .stat{font-size:12px;color:var(--dim);font-variant-numeric:tabular-nums}
.paste-row .stat b{color:var(--ok);font-weight:600}
.paste-row .stat i{color:var(--bad);font-style:normal;font-weight:600}

/* ── TOAST ── */
#toast{position:fixed;left:50%;bottom:26px;transform:translateX(-50%) translateY(14px);
  background:var(--panel);color:var(--ink);border:1px solid var(--line-2);
  font-size:12.5px;padding:9px 15px;border-radius:9px;opacity:0;pointer-events:none;
  transition:opacity .18s,transform .18s;z-index:900;max-width:80vw;
  box-shadow:0 6px 26px rgba(0,0,0,.5)}
#toast.on{opacity:1;transform:translateX(-50%) translateY(0)}

/* ── DIALS = the pane's .ctl ── */
.dials{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:2px 16px}
.dial label{display:flex;justify-content:space-between;align-items:baseline;
  font-size:12.5px;color:var(--ink-2);margin-bottom:3px}
.dial .val{color:var(--A);font-variant-numeric:tabular-nums;font-weight:600}
/* AMBER, NOT VIOLET, AND THE REASON IS THE GROOVE. accent-color paints the filled half;
   the unfilled half is the UA's, and Chromium picks it to contrast with the accent — a
   violet accent gets a near-white groove, an amber one gets a recessed charcoal groove.
   Measured on the Loop pane itself, which has both: its three amber twist sliders sit
   quietly, its violet spread slider draws a white bar. One slider on a pane is a
   flourish; five per card across forty cards is a page of white bars. So the dials take
   the amber, which they were already labelled in — the value and its slider now agree. */
input[type=range]{width:100%;accent-color:var(--A);height:19px;cursor:ew-resize;display:block;margin:0}
.dial select{width:100%;padding:4px 8px;font-size:12.5px}

/* ── REPORT TILE ── */
.report{padding:2px 5px 4px;font-size:12.5px;line-height:1.6;color:var(--dim)}
.report table{border-collapse:collapse;width:100%;margin:10px 0 4px;font-size:13px}
.report th{text-align:right;font-weight:400;font-size:11px;letter-spacing:.06em;text-transform:uppercase;
  color:var(--dim);border-bottom:1px solid var(--line-2);padding:4px 8px 6px}
.report th:first-child,.report td:first-child{text-align:left}
.report td{padding:4px 8px;border-bottom:1px solid #1c2333;font-variant-numeric:tabular-nums;
  text-align:right;color:var(--ink-2)}
.report tr:last-child td{border-bottom:none}
.report td.ok{color:var(--ok);font-weight:600}
.report td.bad{color:var(--bad);font-weight:700}
.report p{margin:0 0 4px}
.report p.foot{font-size:12px;margin-top:12px;line-height:1.6;border-top:1px solid #1c2333;padding-top:12px}

footer{max-width:1360px;margin:0 auto;padding:22px 20px 60px;
  border-top:1px solid var(--line);font-size:12.5px;color:var(--dim);line-height:1.6}
footer b{color:var(--ink-2);font-weight:600}

@media(max-width:640px){
  header{padding:20px 14px 4px} main{padding:0 14px 70px} .bar-in{padding:8px 14px}
  .grid{grid-template-columns:1fr}
}

/* ── CHART PAGES ── (the spiral, the menagerie, shape space, where it breaks) tiles that draw a measurement rather than a list of
   loops: a chart beside the curve, a verdict line saying what the chart shows, and no
   spectrum strip, because the curve is not the thing being measured. body.page-chart. */
.tile.tall.wide canvas{height:400px}
.tile .verdict{font-size:12px;line-height:1.5;padding:7px 10px;border-radius:8px;font-variant-numeric:tabular-nums;
  border:1px solid rgba(74,222,128,.28);background:rgba(74,222,128,.07);color:var(--ink-2)}
/* "bad" is the failing case the tile exists to show, not an error in the page, so it
   reads as a warning in amber rather than an alarm in red */
.tile .verdict.bad{border-color:rgba(242,193,78,.38);background:rgba(242,193,78,.08);color:#f6d68a}
.page-chart .tile code.src{white-space:pre-wrap}
.page-chart .tile > .report{border-top:1px solid var(--line);margin:0 -10px -10px;padding:12px 15px 12px}
/* a number the page is pointing at as wrong: the amber of a failing verdict, underlined */
.page-chart .wrong{color:#f6d68a;border-bottom:1px dotted rgba(242,193,78,.55)}
.page-chart .sec-head .n{font-style:italic;font-variant-numeric:normal}

/* ── ANIMATED PAGES ── (the loop, composed) every tile runs; the scrub control is a ring,
   because the domain is a circle, and composed adds a strip under some tiles */
.page-motion .phase{display:flex;align-items:center;gap:9px}
.page-motion .phase svg{width:26px;height:26px;flex:none}
.page-motion .phase input[type=range]{flex:1}
.page-motion .phase .t{font-size:11.5px;color:var(--A);font-weight:600;font-variant-numeric:tabular-nums;width:46px;text-align:right}
.bar .speed,.bar .vol{display:flex;align-items:center;gap:7px;font-size:11.5px;color:var(--dim)}
.bar .speed input,.bar .vol input{width:96px}
.tile canvas.aux{height:54px;margin:-2px 0 2px}
.tile canvas.wt{height:44px}

/* ── HEARD ── (sound) click a tile to play it; the one sounding keeps a lit rim, because on a
   page about audio the thing that must never be ambiguous is which one you are hearing */
#gate{position:fixed;inset:0;z-index:800;background:rgba(12,15,22,.86);backdrop-filter:blur(3px);
  display:flex;align-items:center;justify-content:center;cursor:pointer}
#gate div{text-align:center}
#gate b{font-size:22px;font-weight:650;display:block;margin-bottom:8px;color:var(--ink)}
#gate span{font-size:12.5px;color:var(--dim)}
.page-sound .tile{cursor:pointer}
.page-sound .tile.wide{cursor:default}
.page-sound .tile > canvas{display:block;width:100%;height:auto;background:var(--stage);border:1px solid var(--line);border-radius:8px}
.page-sound .tile.playing{border-color:var(--curv);box-shadow:0 0 0 1px var(--curv),0 2px 22px rgba(124,92,255,.28)}
.page-sound .tile .meta{font-size:11.5px;color:var(--dim);display:flex;gap:12px;flex-wrap:wrap}
.page-sound .tile .meta b{color:var(--A);font-weight:600;font-variant-numeric:tabular-nums}
.page-sound .row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}

/* ── THE BENCH ── not tiles but numbered steps, read in order: each a panel with its picture,
   its controls and a readout line of the numbers as they happen */
.page-bench .step{padding-top:40px;scroll-margin-top:54px}
.page-bench .step-head{display:flex;align-items:center;gap:12px;margin-bottom:8px}
.page-bench .step-head .num{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;flex:none;
  border-radius:50%;background:rgba(124,92,255,.16);color:#b9a6ff;font-weight:650;font-size:13px}
.page-bench .step-head h2{font-size:16px;font-weight:650;margin:0;letter-spacing:-.005em}
.page-bench .step-head .rule{flex:1;height:1px;background:var(--line)}
.page-bench .step > p.say{font-size:13px;color:var(--dim);line-height:1.6;max-width:84ch;margin:0 0 16px 40px}
.page-bench .step > p.say b{color:var(--ink-2);font-weight:600}
.page-bench .step > p.say em{color:#b9a6ff;font-style:normal}
.page-bench .panel{margin-left:40px;background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:10px}
.page-bench .panel canvas{display:block;width:100%;background:var(--stage);border:1px solid var(--line);border-radius:8px}
.page-bench .ctl{padding:12px 4px 2px;display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:6px 18px;align-items:end}
.page-bench .toggle{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--ink-2)}
.page-bench .read{border-top:1px solid var(--line);margin-top:10px;padding:10px 4px 2px;font-size:12px;color:var(--dim);line-height:1.7}
.page-bench .read b{color:var(--ink-2);font-weight:600}
.page-bench .read .ok{color:var(--ok);font-weight:600;font-variant-numeric:tabular-nums}
.page-bench .read .bad{color:#f6d68a;font-weight:600;font-variant-numeric:tabular-nums}
.page-bench .after{font-size:12.5px;color:var(--dim);line-height:1.6;max-width:84ch;margin:14px 0 0 40px}
.page-bench .after b{color:var(--ink-2);font-weight:600}
@media(max-width:640px){.page-bench .step > p.say,.page-bench .panel,.page-bench .after{margin-left:0}}

/* ── THE PLAYGROUND ── a workbench rather than a page: the controls in a rail on the left,
   the clay in the middle, and underneath it the transcript of what your hands just wrote,
   as the calls that would have written it. It fills the window, so nothing scrolls but
   the rail and the transcript. */
body.page-playground{height:100vh;overflow:hidden}
.page-playground .bench{display:grid;grid-template-columns:268px 1fr;height:100vh}
.page-playground .rail{border-right:1px solid var(--line);background:var(--panel);padding:18px 18px 16px;
  overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;gap:18px}
.page-playground .rail::-webkit-scrollbar{width:8px}
.page-playground .rail::-webkit-scrollbar-thumb{background:var(--line-2);border-radius:4px}
.page-playground .mark h1{font-size:20px;font-weight:650;margin:0;letter-spacing:-.01em}
.page-playground .mark h1 em{font-style:normal;color:var(--curv)}
.page-playground .mark p{margin:7px 0 0;font-size:12.5px;line-height:1.55;color:var(--dim)}
.page-playground section.group{padding:0}
.page-playground .legend{font-size:11px;letter-spacing:.09em;text-transform:uppercase;color:var(--dim);font-weight:600;
  display:flex;align-items:center;gap:9px;margin-bottom:10px}
.page-playground .legend::after{content:'';flex:1;height:1px;background:var(--line)}
.page-playground .chips{display:flex;flex-wrap:wrap;gap:5px}
.page-playground .chips button{padding:4px 9px;font-size:12px}
.page-playground button.ghost{border-style:dashed}
.page-playground button:disabled{opacity:.35;cursor:default}
.page-playground .dial{margin-bottom:12px}
.page-playground .dial:last-child{margin-bottom:0}
.page-playground .readout{font-size:12px;color:var(--dim);line-height:1.8;display:grid;grid-template-columns:auto 1fr;gap:0 12px}
.page-playground .readout b{font-weight:600;color:var(--A);font-variant-numeric:tabular-nums;text-align:right}
.page-playground main.stage{position:relative;display:flex;flex-direction:column;min-width:0;max-width:none;margin:0;padding:0;background:var(--stage)}
.page-playground .slab{position:relative;flex:1;min-height:0}
.page-playground .slab > canvas{display:block;width:100%;height:100%;touch-action:none;cursor:crosshair}
.page-playground .hud{position:absolute;left:24px;top:20px;pointer-events:none;font-size:11px;letter-spacing:.09em;text-transform:uppercase;color:var(--dim)}
.page-playground .hud b{color:#b9a6ff;font-weight:600}
.page-playground .spectrum{position:absolute;right:24px;top:18px;width:190px;height:54px;margin:0;pointer-events:none}
.page-playground .spectrum canvas{display:block}
.page-playground .spectrum figcaption{font-size:10px;letter-spacing:.09em;text-transform:uppercase;color:var(--dim);margin:4px 0 0;text-align:right}
.page-playground .transcript{border-top:1px solid var(--line);background:var(--panel);padding:12px 24px 14px;height:158px;
  display:flex;flex-direction:column;gap:7px}
.page-playground .transcript .legend{margin-bottom:0}
.page-playground .tape{flex:1;overflow-y:auto;font-family:var(--mono);font-size:12px;line-height:1.75;color:var(--ink-2);white-space:pre;scrollbar-width:thin}
.page-playground .tape .ln{opacity:0;animation:tape .3s ease both}
@keyframes tape{from{opacity:0;transform:translateX(-4px)}to{opacity:1;transform:none}}
.page-playground .tape .kw{color:#b9a6ff}
.page-playground .tape .fn{color:var(--ink);font-weight:600}
.page-playground .tape .num{color:var(--A)}
.page-playground .tape .cm{color:var(--dim);font-style:italic}
.page-playground .tape .cursor{color:#b9a6ff;animation:blink 1.1s steps(2) infinite}
@keyframes blink{50%{opacity:0}}
.page-playground .toast{position:absolute;left:50%;bottom:178px;transform:translateX(-50%) translateY(6px);background:var(--panel);
  color:var(--ink);border:1px solid var(--line-2);font-size:12px;padding:7px 13px;border-radius:8px;opacity:0;pointer-events:none;
  transition:opacity .2s,transform .2s}
.page-playground .toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
@media(max-width:820px){
  .page-playground .bench{grid-template-columns:1fr;grid-template-rows:1fr auto}
  .page-playground .rail{order:2;border-right:none;border-top:1px solid var(--line);max-height:46vh}
  .page-playground .transcript{height:108px}
  .page-playground .spectrum{display:none}
}

/* ── LABS ── (labs.html, at the repo root) the lab drawer as a page: a heading per drawer
   group with its note, and under it a row per lab — code, name as the link that runs it,
   and what it does */
.page-labs .bar input[type=search]{font:inherit;font-size:13px;color:var(--ink);background:#10151f;border:1px solid var(--line-2);
  border-radius:8px;padding:6px 11px;width:min(360px,60vw)}
.page-labs .sec-note details{display:inline}
.page-labs .sec-note summary{display:inline;cursor:pointer;color:#b9a6ff;margin-left:4px;list-style:none}
.page-labs .sec-note summary::-webkit-details-marker{display:none}
.page-labs .sec-note details[open] summary{display:none}
.page-labs .sec-note details[open]::before{content:' '}
.page-labs ul.labs{list-style:none;margin:0;padding:0;background:var(--panel);border:1px solid var(--line);border-radius:14px}
.page-labs li.lab{display:grid;grid-template-columns:minmax(180px,260px) 1fr;gap:4px 18px;padding:11px 14px;border-top:1px solid #1c2333}
.page-labs li.lab:first-child{border-top:none}
.page-labs li.lab[hidden],.page-labs section[hidden]{display:none}
.page-labs a.run{color:var(--ink);font-weight:600;text-decoration:none;display:flex;align-items:baseline;gap:9px}
.page-labs a.run:hover{color:#b9a6ff}
.page-labs a.run .code{font-family:var(--mono);font-size:11.5px;font-weight:500;color:#b9a6ff;background:rgba(124,92,255,.12);
  border:1px solid rgba(124,92,255,.3);border-radius:6px;padding:1px 6px;flex:none}
.page-labs li.lab p{margin:0;color:var(--dim);font-size:12.5px;line-height:1.55}
.page-labs .none{color:var(--dim);padding:30px 0;text-align:center}
@media(max-width:640px){.page-labs li.lab{grid-template-columns:1fr}}

/* ── THE FRONT PAGE ── (index.html) its own layout, scoped to body.page-index so the shared
   rules above cannot reach in and these cannot leak out */
body.page-index{margin:0;background:var(--bg);color:var(--ink); font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; font-size:14px;-webkit-font-smoothing:antialiased}
.page-index header,.page-index main,.page-index footer{max-width:1100px;margin:0 auto;padding-left:20px;padding-right:20px}
.page-index header{padding-top:34px;padding-bottom:0}
.page-index h1{font-size:22px;font-weight:650;margin:0 0 4px;letter-spacing:-.01em}
.page-index h1 em{font-style:normal;color:var(--curv)}
.page-index .lede{max-width:72ch;color:var(--dim);font-size:14.5px;line-height:1.6;margin:12px 0 0}
.page-index .lede b{color:var(--ink-2);font-weight:600}
.page-index .how{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px 22px; margin:22px 0 0;padding:14px 16px;background:var(--panel);border:1px solid var(--line);border-radius:12px; font-size:12.5px;line-height:1.55;color:var(--dim)}
.page-index .how b{color:var(--ink-2);font-weight:600}
.page-index .how .k{display:inline-block;font-size:11px;padding:0 7px;border-radius:6px;border:1px solid var(--line-2);color:var(--ink)}
.page-index .how .k.v{background:var(--curv);border-color:var(--curv);color:#fff}
.page-index main{display:flex;flex-direction:column;gap:14px;padding-top:26px;padding-bottom:30px}
.page-index .card{display:grid;grid-template-columns:300px 1fr;gap:20px;align-items:center; background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:12px; color:inherit;text-decoration:none;transition:border-color .15s,box-shadow .15s}
.page-index .card.after{grid-template-columns:1fr;border-style:dashed;border-color:var(--line-2)}
.page-index .card:hover,.page-index .card:focus-visible{border-color:var(--curv);box-shadow:0 2px 22px rgba(0,0,0,.35);outline:none}
.page-index .thumb{background:var(--stage);border:1px solid var(--line);border-radius:9px;height:176px; display:flex;align-items:center;justify-content:center;color:var(--ink);overflow:hidden}
.page-index .thumb svg{width:100%;height:100%;padding:8px}
.page-index .thumb svg path{stroke-width:1.1px;vector-effect:non-scaling-stroke}
.page-index .step{font-size:11px;letter-spacing:.09em;text-transform:uppercase;color:var(--dim);display:flex;align-items:center;gap:8px}
.page-index .num{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%; background:rgba(124,92,255,.16);color:#b9a6ff;font-weight:650;letter-spacing:0}
.page-index .count{margin-left:auto;font-variant-numeric:tabular-nums}
.page-index h2{font-size:17px;font-weight:650;margin:6px 0 6px;letter-spacing:-.005em}
.page-index .card p{margin:0;color:var(--dim);line-height:1.6;font-size:13.5px;max-width:68ch}
.page-index .card p b{color:var(--ink-2);font-weight:600}
.page-index footer{border-top:1px solid var(--line);padding-top:18px;padding-bottom:50px;color:var(--dim);font-size:12.5px;line-height:1.6}
.page-index footer a{color:#b9a6ff}
@media(max-width:720px){
.page-index header,.page-index main,.page-index footer{padding-left:16px;padding-right:16px}
.page-index .card{grid-template-columns:1fr;gap:12px}
.page-index .thumb{height:150px}
}

/* ── THE INSPECTOR ── (inspect.html) its own layout, scoped to body.page-inspect so the shared
   rules above cannot reach in and these cannot leak out */
body.page-inspect{margin:0;background:var(--bg);color:var(--ink); font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; font-size:13.5px;-webkit-font-smoothing:antialiased}
.page-inspect header,.page-inspect main{max-width:1240px;margin:0 auto;padding-left:20px;padding-right:20px}
.page-inspect header{padding-top:26px;padding-bottom:0}
.page-inspect .crumbs{font-size:11px;letter-spacing:.09em;text-transform:uppercase;color:var(--dim);margin:0 0 10px}
.page-inspect a{color:#b9a6ff;text-decoration:none}
.page-inspect a:hover{text-decoration:underline}
.page-inspect h1{font-size:20px;font-weight:650;margin:0 0 2px;letter-spacing:-.01em}
.page-inspect h1 em{font-style:normal;color:var(--curv)}
.page-inspect .lede{max-width:80ch;color:var(--dim);font-size:13.5px;line-height:1.6;margin:10px 0 0}
.page-inspect .lede b{color:var(--ink-2);font-weight:600}
.page-inspect main{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:18px;padding-top:20px;padding-bottom:60px}
.page-inspect .panel{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:12px}
.page-inspect #stage{display:block;width:100%;height:420px;background:var(--stage);border:1px solid var(--line);border-radius:9px;cursor:pointer}
.page-inspect #spec{display:block;width:100%;height:76px;margin-top:10px}
.page-inspect .cap{font-size:11.5px;color:var(--dim);line-height:1.45;font-variant-numeric:tabular-nums;margin-top:2px}
.page-inspect .cap b{color:#b9a6ff;font-weight:600}
.page-inspect .row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:10px}
.page-inspect button{font:inherit;font-size:12.5px;color:var(--ink);background:#1c2333;border:1px solid var(--line-2);border-radius:8px; padding:5px 11px;cursor:pointer}
.page-inspect button:hover{background:#232c42}
.page-inspect button.v{background:var(--curv);border-color:var(--curv);color:#fff}
.page-inspect .which{font-size:12px;color:var(--dim);font-variant-numeric:tabular-nums}
.page-inspect textarea{width:100%;min-height:86px;resize:vertical;font-family:var(--mono);font-size:11.5px;line-height:1.5;color:var(--ink-2); background:#10151f;border:1px solid var(--line-2);border-radius:8px;padding:8px 10px;margin-top:10px}
.page-inspect textarea::placeholder{color:#5c6680}
.page-inspect h2{font-size:11px;letter-spacing:.09em;text-transform:uppercase;color:var(--dim);font-weight:600;margin:4px 2px 10px}
.page-inspect .fact{border-top:1px solid #1c2333;padding:11px 2px}
.page-inspect .fact:first-of-type{border-top:none;padding-top:2px}
.page-inspect .fact .k{font-size:11px;letter-spacing:.07em;text-transform:uppercase;color:var(--dim)}
.page-inspect .fact .v{font-size:15px;font-weight:650;margin:3px 0 4px;color:var(--ink)}
.page-inspect .fact .v .yes{color:var(--ok)}
.page-inspect .fact .v .no{color:var(--dim)}
.page-inspect .fact p{margin:0;color:var(--dim);line-height:1.55;font-size:12.5px}
.page-inspect .fact p b{color:var(--ink-2);font-weight:600}
.page-inspect .empty{color:var(--dim);padding:30px 4px;text-align:center}
@media(max-width:860px){
.page-inspect header,.page-inspect main{padding-left:16px;padding-right:16px}
.page-inspect main{grid-template-columns:1fr}
.page-inspect #stage{height:300px}
}

/* ── THE PAPERS (papers.html, at the root beside labs.html) ──────────────────
   An index of numbered cards, then a reader for one paper at a time. The reader
   sets prose at a reading measure, not the gallery's full width: these are long
   arguments, and a line of 200 characters loses the reader at every return. */
.page-papers main{max-width:1360px;margin:0 auto;padding:6px 20px 30px}
.page-papers ol.papers{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.page-papers .card{display:grid;grid-template-columns:44px 1fr;gap:4px 14px;background:var(--panel);border:1px solid var(--line);
  border-radius:14px;padding:16px 18px}
.page-papers .card .num{width:30px;height:30px;border-radius:50%;background:rgba(124,92,255,.16);color:#b9a6ff;font-weight:650;
  display:flex;align-items:center;justify-content:center;font-variant-numeric:tabular-nums}
.page-papers .card .kind{font-size:10.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--dim)}
.page-papers .card h2{font-size:16px;margin:4px 0 2px;font-weight:650}
.page-papers .card h2 a{color:var(--ink);text-decoration:none}
.page-papers .card h2 a:hover{color:#b9a6ff}
.page-papers .card .subt{color:var(--ink-2);font-style:italic;font-size:12.5px}
.page-papers .card p{color:var(--dim);font-size:13px;line-height:1.6;margin:8px 0 10px;max-width:880px}
.page-papers .card code,.page-papers .md code{font-family:var(--mono);font-size:.92em;color:#d9cfff;background:rgba(124,92,255,.10);
  padding:1px 4px;border-radius:4px}
.page-papers .links{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px 16px;font-size:12.5px}
.page-papers .links a{color:#b9a6ff;text-decoration:none}
.page-papers .links a:hover{text-decoration:underline}
.page-papers .links a.read{background:var(--curv);color:#fff;padding:4px 14px;border-radius:999px;font-weight:600}
.page-papers .links a.read:hover{text-decoration:none;filter:brightness(1.1)}
.page-papers .links .shows{color:var(--dim)}
.page-papers .bar .count{color:var(--ink-2);font-size:12.5px;font-weight:600}
.page-papers article.paper{max-width:860px;margin:0 auto}
.page-papers .loading{color:var(--dim);padding:30px 0;line-height:1.6}
.page-papers .loading a{color:#b9a6ff}
.page-papers .toc{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:10px 16px;margin:6px 0 18px}
.page-papers .toc summary{cursor:pointer;color:#b9a6ff;font-size:12px;letter-spacing:.08em;text-transform:uppercase}
.page-papers .toc ol{margin:10px 0 4px;padding-left:20px;columns:2;column-gap:28px;font-size:12.5px;line-height:1.7}
.page-papers .toc a{color:var(--ink-2);text-decoration:none}
.page-papers .toc a:hover{color:#b9a6ff}
.page-papers .md{font-size:14.5px;line-height:1.7;color:var(--ink-2)}
.page-papers .md h1{font-size:24px;color:var(--ink);margin:10px 0 6px;line-height:1.25}
.page-papers .md h2{font-size:18px;color:var(--ink);margin:34px 0 8px;padding-top:12px;border-top:1px solid var(--line)}
.page-papers .md h3{font-size:15.5px;color:var(--ink);margin:24px 0 6px}
.page-papers .md h4{font-size:14px;color:var(--ink);margin:18px 0 4px}
.page-papers .md h1+h3{font-weight:400;font-size:15px;color:var(--dim);margin-top:0;border:none}
.page-papers .md b{color:var(--ink)}
.page-papers .md a{color:#b9a6ff}
.page-papers .md hr{border:none;border-top:1px solid var(--line-2);margin:26px 0}
.page-papers .md blockquote{margin:14px 0;padding:4px 16px;border-left:3px solid var(--curv);background:rgba(124,92,255,.06);border-radius:0 8px 8px 0}
.page-papers .md pre{background:#10151f;border:1px solid var(--line);border-radius:10px;padding:12px 14px;overflow-x:auto;font-size:12.5px;line-height:1.5}
.page-papers .md pre code{background:none;padding:0;color:var(--ink-2)}
.page-papers .md .table{overflow-x:auto;margin:12px 0}
.page-papers .md table{border-collapse:collapse;font-size:13px;font-variant-numeric:tabular-nums}
.page-papers .md th,.page-papers .md td{border-bottom:1px solid var(--line);padding:5px 10px;text-align:left;vertical-align:top}
.page-papers .md th{color:var(--ink);font-weight:600;border-bottom-color:var(--line-2)}
.page-papers .md .display{overflow-x:auto;margin:12px 0;text-align:center}
.page-papers .md .math:not(.katex-rendered){font-family:var(--mono);font-size:.9em;color:#d9cfff}
.page-papers .md .katex{font-size:1.05em;color:var(--ink)}
.page-papers .md .katex-display{margin:0}
.page-papers [hidden]{display:none !important}
@media(max-width:640px){.page-papers .card{grid-template-columns:1fr}.page-papers .toc ol{columns:1}}
.page-papers .md hr+h2{border-top:none;padding-top:0;margin-top:0}
.page-papers .md h2,.page-papers .md h3,.page-papers .md h4{scroll-margin-top:64px}

/* ── A LINK TO THE PAPER ─────────────────────────────────────────────────────
   Where a tile or a section states a result one of the papers proves or measures, it
   carries a small pill naming the section, linked into papers.html's reader. Small and
   quiet on purpose: the page is the demonstration, the paper is where the argument is. */
a.paper{display:inline-block;font-family:var(--mono);font-size:10.5px;font-weight:500;letter-spacing:.02em;white-space:nowrap;
  color:#b9a6ff;background:rgba(124,92,255,.12);border:1px solid rgba(124,92,255,.28);border-radius:999px;
  padding:0 7px;margin-left:2px;line-height:17px;text-decoration:none;vertical-align:1px}
a.paper::before{content:'¶ ';opacity:.7}
a.paper:hover{background:rgba(124,92,255,.22);color:#d9cfff}

/* ── THE LEVELS ── (levels) one wide chart per section, square enough for the rings, which are
   circles and read wrong squashed: the levels tile at 460px, the shape tile at 620px */
.page-levels .tile.wide canvas{height:460px}
.page-levels .tile.tall.wide canvas{height:620px}

/* ── ANIMATED ── (animated.html) animations for the leaf editor: tiles like the chart pages', the stage
   holding the example's drawing as SVG, and an "open in draw" button where the others have edit */
.page-animated .tile .stage svg{display:block;width:100%;height:236px;padding:20px}
.page-animated .tile .tools .open{background:var(--curv);border-color:var(--curv);color:#fff}
.page-animated .tile .tools .open:hover{background:#8d72ff}
.page-animated .tile .tools .link.done{background:var(--ok);border-color:var(--ok);color:#0c0f16}
.page-animated .tile code.src{cursor:default}
/* a tile playing: the leaf editor itself over the drawing, faded in once its example runs */
.page-animated .tile .stage{position:relative;cursor:pointer}
.page-animated .tile.playing .stage{cursor:default}
.page-animated .tile .stage iframe.player{position:absolute;inset:0;width:100%;height:100%;border:0;opacity:0;transition:opacity .3s;pointer-events:none}
.page-animated .tile .stage iframe.player.on{opacity:1}
.page-animated .tile .tools .play.on{background:var(--ok);border-color:var(--ok);color:#0c0f16}
.page-animated .tile .tools .live.on{background:var(--ok);border-color:var(--ok);color:#0c0f16}
.page-animated .tile .stage svg.anim{padding:6px}
.page-animated .tile.svg .stage svg:not(.anim){display:none}

/* ── EMBEDDED ── (embedded.html) every tile the leaf editor itself, playing in an iframe over its drawing */
.page-embedded .tile .stage{position:relative}
.page-embedded .tile .stage svg{display:block;width:100%;height:236px;padding:20px}
.page-embedded .tile .stage svg.anim{padding:6px}
.page-embedded iframe.host{position:absolute;left:-9999px;top:0;width:480px;height:320px;border:0;visibility:hidden}
.page-embedded .tile .tools .live.on{background:var(--ok);border-color:var(--ok);color:#0c0f16}
.page-embedded .tile .tools .svgcopy{background:var(--curv);border-color:var(--curv);color:#fff}
.page-embedded .tile .tools .svgcopy.done{background:var(--ok);border-color:var(--ok);color:#0c0f16}
.page-embedded .tile .tools .svgcopy:disabled{opacity:.45}
.page-embedded .tile .stage iframe.player{position:absolute;inset:0;width:100%;height:100%;border:0;opacity:0;transition:opacity .3s;pointer-events:none}
.page-embedded .tile .stage iframe.player.on{opacity:1}
.page-embedded .tile .tools .copy.done{background:var(--ok);border-color:var(--ok);color:#0c0f16}
.page-embedded .tile code.src{cursor:default;word-break:break-all}

/* ── PLAYED ── (played.html) every tile a canvas of the TVF player's; the how-to's cards and code above them */
.page-played .tile .stage canvas{cursor:pointer}
.page-played .tile.held .stage{outline:1px dashed var(--line-2);outline-offset:-4px}
.page-played .tile .tools a, .page-played .tile .tools label.file{font-size:11.5px;color:var(--ink);background:#1c2333;
  border:1px solid var(--line-2);border-radius:7px;padding:3px 10px;text-decoration:none;cursor:pointer;white-space:nowrap}
.page-played .tile .tools a:hover, .page-played .tile .tools label.file:hover{background:#232c42}
.page-played .tile .tools .copy{background:var(--curv);border-color:var(--curv);color:#fff}
.page-played .tile .tools .copy.done{background:var(--ok);border-color:var(--ok);color:#0c0f16}
.page-played .tile.failed .stage{border-color:var(--bad)}
.page-played .tile.yours .tools{justify-content:flex-start;align-items:center}
.page-played .tile.yours .tools input[type=range]{flex:1;max-width:420px}
.page-played .tile.yours.over .stage{border-color:var(--curv)}
.page-played .tile.yours canvas{height:360px}
.page-played .tile .stage .drop{position:absolute;inset:0;display:grid;place-items:center;color:var(--dim);pointer-events:none}
.page-played .howto{display:grid;align-items:start;grid-template-columns:repeat(auto-fill,minmax(420px,1fr));gap:18px}
.page-played .step-card{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:14px 16px;
  display:flex;flex-direction:column;gap:10px;min-width:0}
.page-played .step-card h3{margin:0;font-size:13px;font-weight:650;letter-spacing:.06em;text-transform:uppercase}
.page-played .step-card h3 .num{display:inline-grid;place-items:center;width:20px;height:20px;border-radius:50%;
  background:var(--curv);color:#fff;font-size:11px;margin-right:6px;letter-spacing:0}
.page-played .step-card p{margin:0;line-height:1.6;color:var(--ink-2)}
.page-played .step-card p.dim{color:var(--dim);font-size:12px}
.page-played .step-card a{color:#a993ff}
.page-played .step-card code{font-family:var(--mono);font-size:.92em;color:var(--ink)}
.page-played pre.code{margin:0;padding:10px 12px;background:var(--stage);border:1px solid var(--line);border-radius:8px;
  font-family:var(--mono);font-size:11.5px;line-height:1.55;color:var(--ink-2);overflow:auto;white-space:pre}
.page-played .step-card .tools{display:flex;justify-content:flex-end;margin-top:-4px}
.page-played .step-card .tools button{padding:3px 10px;font-size:11.5px;border-radius:7px}

/* ── LOTTIE ── (lottie.html, on the played page's cards and tile buttons) two benches: the Lottie's frame as exact
   paths beside the scene the player plays, the strip of kept keys under them, the knobs, the numbers */
.page-lottie .bench{display:flex;flex-direction:column;gap:12px}
.page-lottie .bench-bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.page-lottie .bench-bar .sep{flex:1}
.page-lottie .bench-bar .picker{display:inline-flex;gap:6px;flex-wrap:wrap}
.page-lottie .bench-bar button, .page-lottie .bench-bar label.file{font-size:11.5px;color:var(--ink);background:#1c2333;
  border:1px solid var(--line-2);border-radius:7px;padding:4px 11px;cursor:pointer;white-space:nowrap}
.page-lottie .bench-bar button:hover:not(:disabled), .page-lottie .bench-bar label.file:hover{background:#232c42}
.page-lottie .bench-bar button.on{background:var(--curv);border-color:var(--curv);color:#fff}
.page-lottie .bench-bar button.go{background:var(--curv);border-color:var(--curv);color:#fff}
.page-lottie .bench-bar button:disabled, .page-lottie .bench input:disabled{opacity:.45;cursor:default}
.page-lottie .bench-bar input[type=range].fr{width:min(300px,40vw)}
.page-lottie .bench-bar .frl{font-size:11.5px;color:var(--dim);font-variant-numeric:tabular-nums;min-width:11ch}
.page-lottie .status{font-family:var(--mono);font-size:11.5px;color:var(--dim);min-height:1.5em;line-height:1.5}
.page-lottie .bench-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:14px}
.page-lottie .bench figure{margin:0;display:flex;flex-direction:column;gap:6px;min-width:0}
.page-lottie .bench figure canvas{width:100%;height:300px;display:block;background:var(--stage);border:1px solid var(--line);border-radius:8px}
.page-lottie .bench figcaption{font-size:12px;color:var(--dim);line-height:1.5}
.page-lottie .bench figcaption b{color:var(--ink-2);font-weight:600}
.page-lottie .keys canvas{width:100%;height:140px;display:block;border:1px solid var(--line);border-radius:8px}
.page-lottie .legend{display:flex;flex-wrap:wrap;gap:6px 16px;font-size:11.5px;color:var(--dim);margin-top:6px}
.page-lottie .legend i{display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:5px;vertical-align:-1px}
.page-lottie .knobs{display:flex;flex-wrap:wrap;gap:8px 24px;align-items:center;font-size:12px;color:var(--ink-2)}
.page-lottie .knobs label{display:inline-flex;gap:8px;align-items:center}
.page-lottie .knobs b{font-variant-numeric:tabular-nums;color:var(--ink);min-width:7ch}
.page-lottie .read{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px 22px;font-variant-numeric:tabular-nums}
.page-lottie .read div{display:flex;flex-direction:column;gap:1px;min-width:0}
.page-lottie .read span{font-size:10.5px;text-transform:uppercase;letter-spacing:.08em;color:var(--dim)}
.page-lottie .read b{font-weight:550;color:var(--ink);overflow-wrap:anywhere}
.page-lottie .bench.over{outline:2px dashed var(--curv);outline-offset:-2px}
.page-lottie table.sizes{border-collapse:collapse;font-variant-numeric:tabular-nums;font-size:12.5px}
.page-lottie table.sizes th{font-size:10.5px;text-transform:uppercase;letter-spacing:.08em;color:var(--dim);text-align:right;font-weight:500;padding:2px 10px 4px}
.page-lottie table.sizes th:first-child, .page-lottie table.sizes td:first-child{text-align:left}
.page-lottie table.sizes td{padding:3px 10px;border-top:1px solid var(--line);text-align:right;color:var(--ink-2)}

.page-played .step-card .tools .copy.done{background:var(--ok);border-color:var(--ok);color:#0c0f16}
.page-played .demo{display:flex;align-items:center;gap:12px;color:var(--dim);font-size:12px}
.page-played .demo canvas{width:160px;height:110px;background:var(--stage);border:1px solid var(--line);border-radius:8px;flex:none}
@media (max-width:520px){ .page-played .howto{grid-template-columns:1fr} }

/* ── EXPLAINED ── (explained.html) beats of text down the left, the scene pinned on the right, its clock the reading */
.page-explained main.explainer{max-width:1360px;margin:0 auto;padding:0 20px 40px;display:grid;grid-template-columns:minmax(280px,500px) 1fr;gap:44px;align-items:start}
.page-explained .beats{display:flex;flex-direction:column}
.page-explained .beat{min-height:88vh;padding:26vh 0 0;opacity:.42;transition:opacity .25s}
.page-explained .beat:first-child{padding-top:10vh}
.page-explained .beat.on,.page-explained .beat.last{opacity:1}
.page-explained .beat.last{min-height:60vh}
.page-explained .beat .num{display:inline-grid;place-items:center;width:26px;height:26px;border-radius:50%;background:var(--curv);color:#fff;font-size:12px;font-weight:650;margin-bottom:10px}
.page-explained .beat h2{font-size:22px;font-weight:650;margin:0 0 12px;letter-spacing:-.01em}
.page-explained .beat p{font-size:15px;line-height:1.7;color:var(--ink-2);margin:0 0 16px}
.page-explained .beat p b{color:var(--ink);font-weight:600}
.page-explained .beat a:not(.paper){color:#a993ff}
.page-explained .beat p em{font-style:italic;color:var(--ink)}
.page-explained .beat p a.paper{margin-left:4px;vertical-align:1px}
.page-explained nav.xs{font:12px var(--mono);color:var(--dim);margin-top:6px}
.page-explained nav.xs a{color:inherit;text-decoration:none;border-bottom:1px dotted currentColor}
.page-explained nav.xs a.on{color:var(--ink);border-bottom:2px solid var(--curv)}
.page-explained .beat .go{font-size:12px;padding:5px 12px}
.page-explained .watchbar{margin:10px 0 0;display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.page-explained .watchbar .hint{font:12px var(--mono);color:var(--dim)}
.page-explained .beat .dial{margin:4px 0 18px;padding:10px 12px;border:1px solid var(--line);border-radius:10px}
.page-explained .beat .dial label{display:flex;gap:10px;align-items:center;font:600 14px var(--mono);color:var(--ink)}
.page-explained .beat .dial input{flex:1}
.page-explained .beat .dial output{display:block;margin-top:6px;font:12px var(--mono);color:var(--ink-2)}
.page-explained .stage-wrap{position:sticky;top:7vh;height:86vh}
.page-explained .stage{position:relative;height:100%;background:var(--stage);border:1px solid var(--line);border-radius:14px;overflow:hidden}
.page-explained .stage canvas{display:block;width:100%;height:100%}
.page-explained .clock{position:absolute;right:12px;bottom:10px;font:11px var(--mono);color:#6b7280;background:rgba(244,241,234,.8);padding:2px 8px;border-radius:6px}
@media (max-width:820px){
  .page-explained main.explainer{grid-template-columns:1fr;gap:0}
  .page-explained .stage-wrap{order:-1;top:0;height:44vh;z-index:5;background:var(--bg);padding:8px 0}
  .page-explained .beat{min-height:70vh;padding-top:12vh}
}
/* a phrase in a beat that lights its part of the picture (explained.html, 2 Nov 2026) */
.page-explained .beat .lit { border-bottom: 2px dotted #d69c12; cursor: help; border-radius: 2px; }
.page-explained .beat .lit:hover, .page-explained .beat .lit:focus { background: rgba(214, 156, 18, 0.18); outline: none; }
