/* Frankenfly: design tokens, layout, components. Dark mad-science lab; colour = meaning (go, stop, jump, tongue,
   inputs), hazard stripes = our code. */
:root {
  --bg: #06080b;
  --bg-2: #0a0e13;
  --panel: #0d1218;
  --panel-2: #121922;
  --line: #1d2631;
  --line-2: #2a3542;
  --text: #e7eef5;
  --text-2: #a3b0bd;
  --text-3: #7d8a98;
  --volt: #c6ff4a;          /* reanimate / live */
  --volt-dim: #6f8f2a;
  --hazard: #ffb020;        /* our code */
  --hazard-ink: #1a1203;
  --fly: #5fe3c6;           /* the fly's own neurons */
  --fly-ink: #062019;
  --luck: #8a96a3;
  --go: #7fd59b;
  --stop: #c49af2;
  --jump: #ef7462;
  --tongue: #f6c34e;
  --input: #7bc7ec;
  --map: #93a2b5;
  --radius: 10px;
  --radius-s: 6px;
  --font: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --focus: 0 0 0 2px var(--bg), 0 0 0 4px var(--volt);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { height: 100%; }
/* min-height, not height: a body fixed at one window tall carried the sticky nav off the top of every long page
   once you scrolled past that height */
body { margin: 0; min-height: 100%; }
/* the two glows sit on a fixed layer: as the body's own background they tiled once per window height and left a seam
   across long pages at every tile edge */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(1200px 700px at 70% -10%, #12202b 0%, transparent 60%),
              radial-gradient(900px 600px at -10% 110%, #0f1a14 0%, transparent 55%);
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--fly); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #9ff2df; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--volt); outline-offset: 2px; }   /* an outline: no component box-shadow can hide it */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  height: 56px; padding: 0 20px;
  background: rgba(6, 8, 11, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo svg { width: 28px; height: 28px; }
.logo b { font-size: 18px; letter-spacing: 0.14em; font-weight: 700; }
.logo b i { font-style: normal; color: var(--volt); }
.nav { display: flex; gap: 4px; }
.nav a {
  padding: 7px 12px; border-radius: 8px; color: var(--text-2); text-decoration: none; font-weight: 500; font-size: 14px;
}
@media (hover: hover) { .nav a:hover { color: var(--text); background: var(--panel); } }   /* a tap left it "selected" on a phone */
.nav a[aria-current='page'] { color: var(--text); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.top .credit { margin-left: auto; font-size: 12px; color: var(--text-3); }
.top .credit a { color: var(--text-2); }

/* ---------- chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
}
.chip.fly { background: var(--fly); color: var(--fly-ink); }
.chip.ours {
  color: var(--hazard-ink);
  background: repeating-linear-gradient(-45deg, var(--hazard) 0 7px, #e09312 7px 14px);
}
.chip.both { background: linear-gradient(90deg, var(--fly) 50%, var(--hazard) 50%); color: #0b0b0b; }
.chip.luck { background: transparent; color: var(--luck); box-shadow: inset 0 0 0 1px var(--luck); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------- Lab layout ---------- */
.lab {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 30vw);
  grid-template-areas:
    'arena jar'
    'timeline switch'
    'score score';
  gap: 14px;
  padding: 14px 20px 28px;
  max-width: 2200px; margin: 0 auto;
}
.panel {
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  min-width: 0;
}
.panel-h {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px 0;
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3);
}
.panel-h .sub { font-weight: 500; letter-spacing: 0.02em; text-transform: none; color: var(--text-3); }
.panel-h .listen { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12px; letter-spacing: 0.02em; text-transform: none; color: var(--text-2); }
.panel-h .listen svg { width: 15px; height: 15px; }
@media (max-width: 640px) { .panel-h { flex-wrap: wrap; row-gap: 6px; } .panel-h .listen { margin-left: 0; } }
.panel-h .listen select { font: inherit; font-weight: 500; color: var(--text); background: var(--panel-2, #10161d); border: 0; border-radius: 7px; padding: 4px 6px; box-shadow: inset 0 0 0 1px var(--line-2); }

/* arena */
.arena-wrap { grid-area: arena; display: flex; flex-direction: column; overflow: hidden; }
.arena-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #0a1016; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
/* end of a replay: what that run showed, and the next cut along the tour's path */
.endcard { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 3; width: min(620px, calc(100% - 28px)); padding: 14px 16px; border-radius: 12px; background: rgba(6, 8, 11, 0.9); box-shadow: inset 0 0 0 1px var(--line-2), 0 18px 40px rgba(0, 0, 0, 0.45); }
.endcard p { margin: 0 0 10px; font-size: 14px; line-height: 1.45; color: var(--text-2); }
.endcard p em { font-style: normal; font-weight: 700; color: var(--text); }
.endcard .endgo { display: flex; flex-wrap: wrap; gap: 8px; }
.endcard #endNext { color: #0b1003; background: var(--volt); box-shadow: none; text-decoration: none; }
/* the replay ends with the fly at the flagpole, low in the frame: the card sits above it, clear of the captions */
@media (max-width: 640px) { .endcard { padding: 10px 12px; } .endcard p { font-size: 13px; margin-bottom: 8px; } }
.arena-wrap > .endcard { position: static; transform: none; width: auto; border-radius: 0; background: var(--panel-2); box-shadow: inset 0 -1px 0 var(--line); }
.arena-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.arena-frame .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(0.55) brightness(0.55); }
.intro {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  padding: clamp(18px, 5%, 64px);
  background: linear-gradient(90deg, rgba(5, 8, 11, 0.92) 0%, rgba(5, 8, 11, 0.72) 48%, rgba(5, 8, 11, 0.15) 100%);
}
.intro h1 { margin: 0 0 10px; font-size: clamp(26px, 3.4vw, 54px); line-height: 1.04; letter-spacing: -0.01em; max-width: 15ch; }
.intro h1 em { font-style: normal; color: var(--volt); }
.intro p { margin: 0 0 8px; max-width: 54ch; color: var(--text-2); font-size: clamp(13px, 1.05vw, 17px); }
.intro .facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 20px; }
.intro .facts b { color: var(--text); font-weight: 600; }
.intro .facts span { font-size: 12px; color: var(--text-2); padding: 4px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px var(--line-2); }
.loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px;
  background: rgb(4, 6, 9); font-family: var(--mono); color: var(--volt); font-size: 13px; letter-spacing: 0.08em;
}
.loading canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.loading .msg { position: relative; text-transform: uppercase; }
.loading .bar { position: relative; width: min(320px, 60%); height: 3px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.loading .bar i { position: absolute; inset: 0 auto 0 0; width: 30%; background: var(--volt); animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { 0% { left: -30%; } 100% { left: 100%; } }

.player {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 10px; border-top: 1px solid var(--line);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 34px; min-width: 34px; padding: 0 12px; border: 0; border-radius: 8px;
  background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2);
  font-size: 13px; font-weight: 600; cursor: pointer; transition: background 0.15s, box-shadow 0.15s, transform 0.08s;
}
@media (hover: hover) { .btn:hover { background: #18212c; box-shadow: inset 0 0 0 1px #3a4757; } }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.45; cursor: default; }
.btn svg { width: 16px; height: 16px; }
.btn.icon { padding: 0; width: 34px; }
.seg { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg button { height: 30px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: var(--text-2); font-size: 12px; font-weight: 600; cursor: pointer; font-family: var(--mono); }
.seg button[aria-pressed='true'] { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.player .time { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--text-2); white-space: nowrap; }
/* phones: the replay's labels, read from the replay and shown under it (its frame is too small to hold them) */
.phone-caps { display: grid; align-content: center; gap: 4px; min-height: 70px; padding: 7px 12px; border-top: 1px solid var(--line); background: var(--panel-2); font-size: 12.5px; line-height: 1.35; color: var(--text); }
.phone-caps .pc-line { display: flex; gap: 8px; align-items: baseline; }
.phone-caps i { flex: none; width: 7px; height: 7px; border-radius: 50%; transform: translateY(-1px); }
.player .runlabel { flex: 1 1 0; min-width: 0; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 38ch; }   /* takes what room is left: the time stays on its line */

/* reanimate */
.reanimate {
  position: relative; display: inline-flex; align-items: center; gap: 10px; align-self: flex-start;
  height: 52px; padding: 0 26px 0 20px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--volt); color: #0b1200; font-size: 17px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  box-shadow: 0 0 0 1px #e8ffad inset, 0 10px 40px rgba(198, 255, 74, 0.28);
  transition: transform 0.1s, box-shadow 0.2s;
}
.reanimate:hover { box-shadow: 0 0 0 1px #f3ffd3 inset, 0 12px 50px rgba(198, 255, 74, 0.45); }
.reanimate:active { transform: translateY(1px) scale(0.99); }
.reanimate svg { width: 22px; height: 22px; }
.reanimate.small { height: 40px; font-size: 14px; padding: 0 18px 0 14px; border-radius: 10px; }
.reanimate.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 1px #e8ffad inset, 0 0 0 0 rgba(198, 255, 74, 0.5); } 50% { box-shadow: 0 0 0 1px #e8ffad inset, 0 0 0 10px rgba(198, 255, 74, 0); } }

/* brain jar */
.jar-wrap { grid-area: jar; display: flex; flex-direction: column; overflow: hidden; min-height: 420px; }
/* canvases sit absolutely inside a flex stage, so their drawing-buffer size can never feed back into the layout */
.stage { position: relative; flex: 1 1 0; min-height: 0; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.jar-wrap .stage canvas { cursor: grab; }
.jar-wrap .stage canvas:active { cursor: grabbing; }
.jar-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 6px 14px 4px; pointer-events: none; }
.jar-legend div { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-2); white-space: nowrap; }
.jar-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; box-shadow: 0 0 8px currentColor; }
.jar-legend .cable i { border-radius: 2px; width: 14px; height: 6px; background: repeating-linear-gradient(-45deg, var(--hazard) 0 3px, #2a1d05 3px 6px); box-shadow: none; }
.jar-credit { position: absolute; right: 12px; bottom: 10px; font-size: 10.5px; color: var(--text-3); pointer-events: none; }
#jarWrap .jar-credit { right: auto; left: 12px; }   /* the Lab's cables come in from the right: keep the credit clear of their tags */
.jar-hint { position: absolute; right: 12px; top: 10px; font-size: 11px; color: var(--text-3); pointer-events: none; }
.jar-tags { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.jar-tag {
  position: absolute; transform: translate(-50%, -100%); white-space: nowrap;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 2px 6px; border-radius: 4px; background: rgba(6, 8, 11, 0.8); box-shadow: inset 0 0 0 1px var(--line-2);
  transition: opacity 0.3s;
}
.jar-tag.ours { color: var(--hazard); }
.jar-tag.fly { color: var(--fly); }
.jar-tag.cut { color: var(--text-3); text-decoration: line-through; }
.jar-tag.fire { background: rgba(6, 8, 11, 0.55); box-shadow: inset 0 0 0 1px currentColor; text-transform: none; letter-spacing: 0.02em; font-size: 11px; transition: none; }

/* timeline */
.timeline-wrap { grid-area: timeline; overflow: hidden; display: flex; flex-direction: column; min-height: 250px; }
.timeline-wrap .stage { min-height: 214px; }
.timeline-wrap .stage canvas { cursor: pointer; }

/* switchboard */
.switch { grid-area: switch; padding-bottom: 14px; }
.switch .rows { display: flex; flex-direction: column; gap: 10px; padding: 10px 14px 0; }
.sw { display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: start; }
.sw-name { padding-top: 6px; font-size: 13px; font-weight: 700; letter-spacing: 0.1em; }
.sw-name small { display: block; font-size: 10.5px; font-weight: 500; letter-spacing: 0.02em; color: var(--text-3); }
.knife { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.knife button {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border: 0; border-radius: 7px;
  background: transparent; color: var(--text-2); cursor: pointer; font-size: 13px; font-weight: 600;
}
.knife button[aria-pressed='true'] { color: var(--text); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.knife button.plug[aria-pressed='true'] { color: var(--hazard-ink); background: repeating-linear-gradient(-45deg, var(--hazard) 0 7px, #e09312 7px 14px); box-shadow: none; }
.knife button.cut[aria-pressed='true'] { color: var(--fly-ink); background: var(--fly); box-shadow: none; }
.knife button.real[aria-pressed='true'] { color: #071a10; background: var(--go); box-shadow: none; }
.knife button.scr[aria-pressed='true'] { color: #1a1030; background: var(--stop); box-shadow: none; }
.knife svg { width: 15px; height: 15px; }
.sw-desc { grid-column: 2; margin: 6px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--text-2); min-height: 3em; }
.switch .go { display: flex; align-items: center; gap: 12px; padding: 14px 14px 0; flex-wrap: wrap; }
.switch .go .note { font-size: 12px; color: var(--text-3); max-width: 34ch; }

/* scoreboard */
.score { grid-area: score; padding-bottom: 12px; }
.score .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); gap: 10px; padding: 10px 14px 0; }
.card {
  position: relative; padding: 12px 12px 10px; border-radius: 9px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line);
  display: flex; flex-direction: column; gap: 8px; min-height: 150px;
}
.card.flash { animation: flash 0.9s ease-out; }
@keyframes flash { 0% { box-shadow: inset 0 0 0 1px var(--volt), 0 0 0 4px rgba(198, 255, 74, 0.25); } 100% { box-shadow: inset 0 0 0 1px var(--line); } }
.card .lbl { font-size: 13px; font-weight: 600; line-height: 1.3; }
.card .vals { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.card .v { padding: 6px 8px; border-radius: 7px; background: rgba(255, 255, 255, 0.03); }
.card .v small { display: block; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.card .v b { font-family: var(--mono); font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.card .v.real b { color: var(--go); }
.card .v.scr b { color: var(--stop); }
.card .v .na { font-family: var(--font); font-size: 12px; font-weight: 500; color: var(--text-3); line-height: 1.3; display: block; padding-top: 3px; }
.card .meter { height: 4px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 4px; }
.card .meter i { display: block; height: 100%; border-radius: 3px; }
.card .v.real .meter i { background: var(--go); }
.card .v.scr .meter i { background: var(--stop); }
.card .note { font-size: 11.5px; line-height: 1.4; color: var(--text-3); margin: 0; }
.card .chip { align-self: flex-start; }
.score .foot { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 14px 0; font-size: 11.5px; color: var(--text-3); }
.score .verdict { padding: 8px 14px 0; font-size: 15px; font-weight: 600; color: var(--text); }
.score .verdict em { font-style: normal; color: var(--volt); }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50;
  padding: 10px 16px; border-radius: 10px; background: #2a1414; color: #ffd9d4; box-shadow: var(--shadow), inset 0 0 0 1px #5a2626;
  font-size: 13px; display: flex; gap: 12px; align-items: center;
}

/* ---------- document views (Evidence, How it works) ---------- */
.doc { max-width: 1100px; margin: 0 auto; padding: 28px 20px 60px; }
.doc h1 { font-size: clamp(28px, 3.2vw, 44px); line-height: 1.08; margin: 8px 0 10px; letter-spacing: -0.01em; }
.doc h2 { font-size: 22px; margin: 40px 0 10px; }
.doc h3 { font-size: 16px; margin: 22px 0 6px; }
.doc p, .doc li { color: var(--text-2); max-width: 72ch; }
.doc .lede { font-size: 17px; color: var(--text-2); max-width: 64ch; }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13.5px; }
.doc th, .doc td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); font-weight: 700; }
.doc td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.doc td.real { color: var(--go); }
.doc td.scr { color: var(--stop); }
/* phones: wide data tables become one card per row, each value under its column's name */
@media (max-width: 640px) {
  .doc table.stack thead { display: none; }
  .doc table.stack, .doc table.stack tbody, .doc table.stack tr, .doc table.stack td { display: block; width: 100%; }
  .doc table.stack tr { padding: 12px 0; border-bottom: 1px solid var(--line-2); }
  .doc table.stack td { border: 0; padding: 3px 0; white-space: normal; }
  .doc table.stack td.na { display: none; }
  .doc table.stack td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 1px; font-size: 10.5px;
    letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); font-weight: 700; font-family: var(--font); }
}
.doc .callout { padding: 14px 16px; border-radius: 10px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); margin: 16px 0; }
.doc .callout strong { color: var(--text); }
.doc .callout.answer { color: var(--text); font-size: 15.5px; line-height: 1.55; box-shadow: inset 3px 0 0 var(--volt), inset 0 0 0 1px var(--line); }
.doc .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.doc .cols.two { grid-template-columns: repeat(2, 1fr); }
.doc .stat-note { margin: 8px 0 0; font-size: 12.5px; color: var(--text-3); }
@media (max-width: 600px) { .doc .cols.two { grid-template-columns: 1fr; } }
.doc .stat { padding: 14px; border-radius: 10px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.doc .stat b { display: block; font-family: var(--mono); font-size: 30px; letter-spacing: -0.02em; }
.doc .stat span { font-size: 13px; color: var(--text-2); }
.doc figure { margin: 18px 0; }
.doc figcaption { font-size: 12.5px; color: var(--text-3); margin-top: 6px; }
.doc code { font-family: var(--mono); font-size: 0.92em; color: #d7e3ee; background: rgba(255, 255, 255, 0.05); padding: 1px 5px; border-radius: 4px; }
.pipe-cap { margin: 18px 0 0; font-size: 13.5px; color: var(--text-2); }
.pipeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0 16px; }
@media (max-width: 760px) { .pipeline { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px) { .pipeline { grid-template-columns: 1fr; } }
.pipeline .step { padding: 12px; border-radius: 10px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); position: relative; }
.pipeline .step b { display: block; font-size: 14px; margin-bottom: 4px; }
.pipeline .step span:not(.chip) { font-size: 12.5px; color: var(--text-2); }
.pipeline .step .chip { margin-top: 8px; }
#scramble { width: 100%; height: 420px; display: block; border-radius: 10px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }

footer.foot { padding: 18px 20px 30px; color: var(--text-3); font-size: 12px; text-align: center; }
footer.foot a { color: var(--text-2); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  /* one column: the jar right under the replay, so the fly and its neurons are watched together */
  .lab { grid-template-columns: 1fr; grid-template-areas: 'arena' 'jar' 'switch' 'score' 'timeline'; padding: 10px 12px 24px; }
  .jar-wrap { min-height: 380px; height: 70vw; max-height: 560px; }
  .top .credit { display: none; }
}
@media (max-width: 640px) {
  .jar-hint { display: none; }
  .nav a { white-space: nowrap; }
  .top { gap: 10px; padding: 0 12px; }
  .logo b { font-size: 15px; }
  .nav a { padding: 6px 8px; font-size: 13px; }
  .intro { background: rgba(5, 8, 11, 0.86); }
  .intro p:not(.keep) { display: none; }
  .intro .facts { display: none; }
  /* a phone's 16:9 frame is too short for the intro: while it shows, the frame grows to fit it (back to 16:9 on run) */
  .arena-frame:has(> .intro:not([hidden])) { aspect-ratio: auto; }
  .arena-frame:has(> .intro:not([hidden])) .intro { position: relative; inset: auto; }
  .intro h1 { font-size: 28px; }
  .to-table { font-size: 13px; padding: 8px 11px; }
  .sw { grid-template-columns: 1fr; }
  .sw-desc { grid-column: 1; }
  .reanimate { height: 46px; font-size: 15px; }
  .player .runlabel, .player .lab-share { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reanimate.pulse, .loading .bar i, .card.flash { animation: none; }
}

@media (max-width: 420px) {
  .logo b { font-size: 13px; letter-spacing: 0.1em; }
  .logo svg { width: 22px; height: 22px; }
  .nav { gap: 0; }
  .nav a { padding: 6px 7px; font-size: 12.5px; }
}
@media (max-width: 380px) { .logo b { display: none; } }   /* the five views fit on a 360 px phone; the mark stays */

/* ============================== Operating table (live brain) ============================== */
.nav .live-dot { display: inline-block; width: 7px; height: 7px; margin-left: 3px; border-radius: 50%; background: var(--volt); box-shadow: 0 0 8px var(--volt); vertical-align: 1px; animation: liveblink 2.2s ease-in-out infinite; }
.nav .short { display: none; }
@keyframes liveblink { 50% { opacity: 0.35; } }
.chip.live { background: transparent; color: var(--volt); box-shadow: inset 0 0 0 1px var(--volt); }
.optable { padding: 14px; }
.tgate { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(20px, 3vw, 48px); align-items: center; min-height: min(78vh, 640px); padding: clamp(22px, 4.5vw, 64px);
  background: radial-gradient(120% 90% at 85% 40%, rgba(198, 255, 74, 0.07), transparent 60%), linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%); }
.tgate canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tgate-in { position: relative; max-width: 660px; }
.tgate h1 { margin: 8px 0 12px; font-size: clamp(30px, 4.2vw, 60px); line-height: 1.02; letter-spacing: -0.01em; }
.tgate h1 em { font-style: normal; color: var(--volt); }
.tgate p { margin: 0 0 10px; max-width: 58ch; color: var(--text-2); font-size: clamp(14px, 1.1vw, 17px); }
.tgate .facts { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 24px; }
.tgate .facts li { font-size: 12px; color: var(--text-2); padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px var(--line-2); }
.gate-progress { display: flex; flex-direction: column; gap: 9px; max-width: 440px; }
.gate-progress .msg { font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--volt); }
.gbar { height: 4px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.gbar i { display: block; height: 100%; width: 0; background: var(--volt); box-shadow: 0 0 12px var(--volt); transition: width 0.25s ease; }
.gate-note { margin-top: 14px !important; font-size: 13px !important; color: var(--text-3) !important; }
.gate-note a { color: var(--fly); }

.tlive { display: grid; gap: 14px; grid-template-columns: minmax(0, 1.55fr) minmax(330px, 1fr); grid-template-areas: 'left controls' 'exps exps' 'screen screen'; align-items: start; max-width: 2200px; margin: 0 auto; }
/* a wide monitor: the controls column stops growing (toggles and sliders 900 px apart were hard to scan) */
@media (min-width: 1800px) { .tlive { grid-template-columns: minmax(0, 1fr) minmax(420px, 640px); } }
/* the jar and its read-outs: one column with its own height, so the read-out lanes sit right under the jar on a
   768-px-high laptop screen (the tall controls column no longer stretches them) */
.tleft-cell { grid-area: left; align-self: stretch; min-width: 0; }
.tleft { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
/* the controls column is the taller one: while it scrolls (surgery, the run buttons), the jar and its read-outs stay in
   view, so every cut is seen as it happens. Sticky inside the cell, which ends with the row: a sticky grid item itself
   would slide on over the experiments in Chrome. */
@media (min-width: 1101px) and (min-height: 760px) { .tleft { position: sticky; top: 66px; } }
/* a short laptop window (650 to 750 px) cannot hold the whole column under the header: the read-outs alone stick,
   whole, and the jar scrolls away as usual (a jar tucked half under the header looked broken) */
@media (min-width: 1101px) and (max-height: 759.98px) { .tleft { height: 100%; } .tscope { position: sticky; top: 66px; } }
.tjar-wrap { grid-area: tjar; display: flex; flex-direction: column; overflow: hidden; height: clamp(320px, calc(100vh - 440px), 640px); }
.tcontrols { grid-area: controls; display: flex; flex-direction: column; padding-bottom: 12px; }
.tscope { grid-area: scope; display: flex; flex-direction: column; }
.scope-stage { min-height: 236px; }
/* no input on, and it keeps firing: why (the stripes start a circuit that keeps itself going) */
.persist-note { margin: 0 14px 8px; padding: 8px 11px; border-radius: 8px; font-size: 12.5px; line-height: 1.45; color: var(--text-2); background: rgba(127, 213, 155, 0.07); box-shadow: inset 2px 0 0 var(--go); }
.texps { grid-area: exps; padding-bottom: 14px; }
.table-hint { position: absolute; left: 50%; bottom: 32px; transform: translateX(-50%); width: min(500px, 88%); text-align: center; font-size: 13px; line-height: 1.4; color: var(--text-2); background: rgba(6, 8, 11, 0.78); padding: 9px 13px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line-2); pointer-events: none; }
.stripes-again { position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 10px; max-width: calc(100% - 24px); padding: 7px 8px 7px 13px; border-radius: 10px; font-size: 13px; white-space: nowrap; color: var(--text-2); background: rgba(6, 8, 11, 0.82); box-shadow: inset 0 0 0 1px var(--line-2); }
.stripes-again .btn { font-size: 12.5px; padding: 6px 11px; color: #0b1003; background: var(--volt); box-shadow: none; white-space: nowrap; }
@media (max-width: 640px) { .stripes-again span { display: none; } }
.skipnote { bottom: 18px; z-index: 3; }   /* the Lab's replay: a run with nothing left to happen */
.texps, .tscreen, #scrPick, #tjarWrap, #arenaFrame { scroll-margin-top: 72px; }   /* below the sticky header when a button scrolls to them */
.table-hint .hint-go { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.table-hint .hint-go .btn { pointer-events: auto; font-size: 12.5px; padding: 6px 11px; }
.table-hint .hint-go .btn[data-exp] { color: #0b1003; background: var(--volt); box-shadow: none; }
/* a wide jar (a laptop's short window): the brain fills the jar's height and leaves its sides empty, so the hint and the
   stripes prompt sit in the bottom-left corner, beside the brain, not over its lower half (at 1281x743 the hint covered
   the nerve cord and met the credit). The brain is at most ~0.9 jar heights wide: the corner gets what is left of the half. */
#tjarWrap .stage { container: tjar / size; }
@container tjar (min-width: 700px) and (min-aspect-ratio: 23 / 10) {
  #tableHint, #stripesAgain { left: 14px; bottom: 14px; transform: none; max-width: min(300px, calc(50cqw - 45cqh - 24px)); }
  #tableHint { width: auto; text-align: left; }
  #tableHint .hint-go { justify-content: flex-start; }
  #stripesAgain { flex-wrap: wrap; row-gap: 8px; white-space: normal; }
}

.electrodes { display: flex; flex-direction: column; gap: 6px; padding: 8px 14px 12px; }
.erow { display: grid; grid-template-columns: 40px minmax(0, 1fr) 104px 52px; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 10px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow 0.2s, background 0.2s; }
.erow.on { background: linear-gradient(90deg, rgba(255, 176, 32, 0.12), transparent 65%), var(--bg-2); box-shadow: inset 0 0 0 1px rgba(255, 176, 32, 0.55); }
.etog { position: relative; width: 40px; height: 22px; border: 0; border-radius: 999px; background: #1b2430; box-shadow: inset 0 0 0 1px var(--line-2); cursor: pointer; }
.etog i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #5b6876; transition: transform 0.18s ease, background 0.18s; }
.etog[aria-pressed='true'] { background: repeating-linear-gradient(-45deg, var(--hazard) 0 5px, #e09312 5px 10px); box-shadow: none; }
.etog[aria-pressed='true'] i { transform: translateX(18px); background: #1b1203; }
.elabel { min-width: 0; }
.elabel b { display: block; font-size: 13px; }
.elabel span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; font-size: 11px; line-height: 1.35; color: var(--text-3); overflow: hidden; }   /* two lines: the point of each electrode used to be cut off */
.erow input[type='range'] { width: 100%; accent-color: var(--hazard); }
.erow output { font-family: var(--mono); font-size: 12px; color: var(--text-2); text-align: right; white-space: nowrap; }
.surgery { display: flex; flex-direction: column; gap: 10px; padding: 8px 14px 4px; }
.srow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.srow.stack { align-items: flex-start; }
.tcontrols > * { flex-shrink: 0; }
.slabel { flex: 0 0 84px; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); padding-top: 2px; }
.srow .knife button { height: 30px; padding: 0 12px; font-size: 12.5px; }
.chk { display: inline-flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; line-height: 1.35; }
.chk input { flex: 0 0 auto; width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--fly); }
.chks { display: flex; flex: 1; flex-direction: column; gap: 6px; }
.snip-count { font-size: 12px; color: var(--hazard); }
.snote { margin: 0; font-size: 11.5px; color: var(--text-3); }
.btn.small { height: 28px; padding: 0 10px; font-size: 12px; }
.trun { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: auto; padding: 14px 14px 0; }
.tstatus { min-height: 18px; margin: 0; padding: 6px 14px 0; font-family: var(--mono); font-size: 12px; color: var(--volt); }
.tstats { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 8px 14px 12px; font-size: 12px; color: var(--text-3); }
.tstats b { color: var(--text); font-weight: 600; }
.exp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 10px 14px 4px; }   /* 8 cards: 4 + 4 */
@media (max-width: 1100px) { .exp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .exp-grid { grid-template-columns: minmax(0, 1fr); } }
.exp { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 12px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow 0.25s; }
.exp.active { box-shadow: inset 0 0 0 1px var(--volt), 0 0 28px rgba(198, 255, 74, 0.12); }
.exp header { display: flex; align-items: center; gap: 10px; }
.exp .n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-family: var(--mono); font-size: 12px; font-weight: 700; color: #0b1003; background: var(--volt); }
.exp h3 { margin: 0; font-size: 15px; }
.exp p { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--text-2); }
.exp .watch b { color: var(--text); }
.exp .btn { align-self: flex-start; margin-top: auto; }
.exp-note { max-width: 110ch; margin: 0; padding: 8px 14px 0; font-size: 12px; color: var(--text-3); }

/* one column: the read-outs right under the jar, so the jar and the numbers are seen together when an experiment
   starts (it scrolls to the jar); the controls column is too narrow beside them below 1100 px */
@media (max-width: 1100px) {
  .tlive { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'tjar' 'scope' 'controls' 'exps' 'screen'; }
  .tleft-cell, .tleft { display: contents; }
  .tjar-wrap { height: min(70vw, calc(100vh - 440px)); max-height: 560px; min-height: 380px; }   /* a landscape tablet: room for the first read-outs */
}
@media (max-width: 640px) {
  .nav .long { display: none; }
  .nav .short { display: inline; }
  .optable { padding: 10px; }
  .erow { grid-template-columns: 40px minmax(0, 1fr) 52px; }
  .erow output { grid-row: 1; grid-column: 3; }
  .erow input[type='range'] { grid-row: 2; grid-column: 1 / -1; }
  .slabel { flex-basis: 100%; }
}
.intro-go { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.to-table { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); text-decoration: none; padding: 10px 14px; border-radius: 10px; background: rgba(6, 8, 11, 0.55); box-shadow: inset 0 0 0 1px var(--line-2); }
.to-table:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--volt); }
.to-table b { color: var(--volt); font-weight: 700; }
.to-table .live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--volt); box-shadow: 0 0 8px var(--volt); animation: liveblink 2.2s ease-in-out infinite; }
.eprog { height: 5px; border-radius: 5px; background: var(--line-2); overflow: hidden; }
.eprog i { display: block; width: 0; height: 100%; background: repeating-linear-gradient(-45deg, var(--hazard) 0 5px, #e09312 5px 10px); transition: width 0.1s linear; }
@media (max-width: 640px) { .erow .eprog { grid-row: 2; grid-column: 1 / -1; } }
.anytype { padding-bottom: 8px; }
.arow { display: grid; grid-template-columns: 84px minmax(0, 1fr) 40px 96px 52px; align-items: center; gap: 10px; padding: 6px 14px 0; }
.arow.watch { grid-template-columns: 84px minmax(0, 1fr) auto; }   /* label, input, Screen it */
.tinput { min-width: 0; height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: var(--bg-2); color: var(--text); font: inherit; font-size: 13px; box-shadow: inset 0 0 0 1px var(--line-2); }
.tinput:focus { outline: none; box-shadow: inset 0 0 0 1px var(--fly); }
.tinput::placeholder { color: var(--text-3); }
.arow input[type='range'] { width: 100%; accent-color: var(--hazard); }
.arow output { font-family: var(--mono); font-size: 12px; color: var(--text-2); text-align: right; white-space: nowrap; }
.anote { min-height: 15px; margin: 4px 14px 0 108px; font-size: 11.5px; color: var(--text-3); }
.anote-wide { margin: 6px 14px 0; }
.anote .sugg { font: inherit; color: var(--fly); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.etog[disabled] { opacity: 0.4; cursor: default; }
.scope-stage { min-height: 280px; }
.tscope.has-note .scope-stage { min-height: 218px; }
/* the note slides in (table.js animates it to its own height) while the lanes make room over the same 0.4 s; they
   jumped 89 px at once. Only on the way in: the transition belongs to the has-note state, so the note going away is
   the single step it always was */
.persist-note { overflow: hidden; }
.tscope.has-note .scope-stage { transition: min-height 0.4s ease-out; }
@media (prefers-reduced-motion: reduce) { .tscope.has-note .scope-stage { transition: none; } }
@media (max-width: 640px) {
  .arow { grid-template-columns: 40px minmax(0, 1fr) 52px; }
  .arow .slabel, .arow .tinput { grid-column: 1 / -1; }
  .arow.watch { grid-template-columns: minmax(0, 1fr); }
  .anote { margin-left: 14px; }
}
/* a narrow controls column (a 1100 to 1250 px window): the Drive name gets its own line, the switch and rate go under it
   (the name box was 66 px wide and cut its own example off) */
.tcontrols { container: tctl / inline-size; }
@media (min-width: 641px) {
  @container tctl (max-width: 470px) {
    .arow:not(.watch) { grid-template-columns: 84px 40px minmax(0, 1fr) 52px; row-gap: 8px; }
    .arow:not(.watch) .tinput { grid-column: 2 / -1; }
    .arow:not(.watch) .etog { grid-column: 2; }
  }
}

/* the silencing screen */
.tscreen { grid-area: screen; padding-bottom: 14px; }
.scr-lede { max-width: 96ch; margin: 8px 14px 0; font-size: 13px; color: var(--text-2); }
.scr-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; padding: 12px 14px 4px; }
.scr-card { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 0; border-radius: 12px; text-align: left; cursor: pointer; color: var(--text); font: inherit; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow 0.2s; }
.scr-card:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.scr-card.active { box-shadow: inset 0 0 0 1px var(--volt), 0 0 28px rgba(198, 255, 74, 0.12); }
.scr-card b { font-size: 14px; }
.scr-card span { font-size: 12.5px; line-height: 1.45; color: var(--text-2); }
.scr-card[disabled] { opacity: 0.5; cursor: default; }
.scr-status { display: flex; align-items: center; gap: 12px; padding: 12px 14px 0; font-size: 12px; color: var(--volt); }
.scr-status .gbar { flex: 1; max-width: 420px; }
.scr-out { padding: 10px 14px 0; }
.scr-head, .scr-row { display: grid; grid-template-columns: minmax(120px, 1.1fr) 44px minmax(0, 3fr) 44px 72px; align-items: center; gap: 10px; }
.scr-take { margin: 4px 0 12px; padding: 10px 12px; border-radius: 10px; font-size: 14px; line-height: 1.45; color: var(--text-2); background: rgba(198, 255, 74, 0.06); box-shadow: inset 0 0 0 1px rgba(198, 255, 74, 0.25); }
.scr-take b { color: var(--text); }
.scr-head { padding: 0 8px 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.scr-head .scr-key { display: inline-block; width: 0; height: 11px; margin: 0 4px -1px 8px; border-left: 2px dashed var(--text-2); }
.scr-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.scr-row { padding: 5px 8px; border-radius: 8px; font-size: 13px; }
.scr-row:hover { background: rgba(255, 255, 255, 0.04); }
.scr-row .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.scr-row .nm em { font-style: normal; font-weight: 500; font-size: 11px; color: var(--text-3); margin-left: 6px; }
.scr-head .r, .scr-row .r { text-align: right; }
.scr-row .mono { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.scr-track { position: relative; height: 12px; border-radius: 3px; background: rgba(255, 255, 255, 0.04); }
.scr-track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; min-width: 2px; }
.scr-track b { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 2px dashed rgba(231, 238, 245, 0.55); }
.scr-row.ctrl .nm { color: var(--text-2); }
.scr-out > .btn { margin: 8px 8px 0; }
.xsil { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--hazard); }
.screening .tcontrols, .screening .texps { opacity: 0.55; pointer-events: none; }
/* room for the ranked results while they fill in, so the screen's cards can scroll to the top of the window (the panel is
   the last on the page: with its results still empty, the page ended just below the cards) */
.screening #scrOut { min-height: calc(100vh - 250px); }
@media (max-width: 640px) {
  .scr-head, .scr-row { grid-template-columns: minmax(84px, 1fr) minmax(0, 1fr) 30px 62px; gap: 8px; }
  .scr-head > :nth-child(2), .scr-row > :nth-child(2) { display: none; }   /* the cell count: in the tooltip */
}
/* assembling: the live layout opens at once; the jar fills with neurons as the wiring downloads */
.tveil { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 26px; pointer-events: none; }
.tveil .tbolt { position: absolute; inset: 0; width: 100%; height: 100%; }
.tveil-in { position: relative; width: min(470px, 88%); padding: 12px 16px; border-radius: 12px; text-align: center; background: rgba(6, 8, 11, 0.62); box-shadow: inset 0 0 0 1px var(--line-2); }
.tveil-in .msg { margin-bottom: 8px; font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--volt); }
.tveil-in p { margin: 7px 0 0; font-size: 12px; color: var(--text-2); }
.assembling .tcontrols, .assembling .texps, .assembling .tscreen, .assembling .tscope { opacity: 0.4; pointer-events: none; transition: opacity 0.4s; }
/* the tour */
.tour { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; max-width: 860px; }
.tour > li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; padding: 16px 18px; border-radius: 12px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.tour .n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-family: var(--mono); font-size: 13px; font-weight: 700; color: #0b1003; background: var(--volt); }
.tour h2 { margin: 3px 0 6px; font-size: 17px; }
.tour p { margin: 0 0 12px; font-size: 14px; color: var(--text-2); max-width: 70ch; }
.tour .btn { margin-right: 8px; text-decoration: none; }
.tour > li { max-width: none; }                  /* the cards and the class questions share one column */
.tour + .callout { max-width: 860px; }
.intro-tour { margin: 14px 0 0 !important; font-size: 13.5px !important; color: var(--text-2); }
.intro-tour a { color: var(--volt); font-weight: 600; }
.to-live { display: inline-flex; align-items: center; gap: 8px; margin: 10px 14px 12px; padding: 8px 12px; border-radius: 10px; font-size: 13px; color: var(--text-2); text-decoration: none; background: rgba(198, 255, 74, 0.05); box-shadow: inset 0 0 0 1px rgba(198, 255, 74, 0.35); }
.to-live:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--volt); }
.to-live .live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--volt); box-shadow: 0 0 8px var(--volt); animation: liveblink 2.2s ease-in-out infinite; }

.gate-rec { position: relative; margin: 0; }
.gate-rec video { display: block; width: 100%; aspect-ratio: 1280 / 752;   /* the recording, cropped below the nav it showed then */ border-radius: 12px; background: #000; box-shadow: 0 0 0 1px var(--line-2), 0 24px 60px rgba(0, 0, 0, 0.5); }
.gate-rec figcaption { margin-top: 10px; font-size: 12.5px; color: var(--text-3); }
.gate-rec.no-gpu video { box-shadow: 0 0 0 1px var(--volt), 0 24px 60px rgba(0, 0, 0, 0.5); }
@media (max-width: 1100px) { .tgate { grid-template-columns: minmax(0, 1fr); } }
.reanimate[disabled] { opacity: 0.38; cursor: not-allowed; box-shadow: none; filter: grayscale(0.7); transform: none; }

/* phones: finger-sized controls on the table (16 px boxes in 23 px rows were hard to hit), the jar's tags smaller so they
   do not cover the brain, and the poster behind the intro too dim for its own chips to show through the text */
@media (max-width: 640px) {
  .chk { min-height: 38px; align-items: center; }
  .chk input { width: 22px; height: 22px; margin-top: 0; }
  .etog { width: 52px; height: 30px; }
  .etog i { top: 4px; left: 4px; width: 22px; height: 22px; }
  .etog[aria-pressed='true'] i { transform: translateX(22px); }
  .panel-h .listen select { min-height: 36px; font-size: 14px; }
  .jar-tag { font-size: 9px; padding: 2px 5px; }
  .jar-tag.fire { font-size: 9.5px; }
  .arena-frame .poster { filter: saturate(0.4) brightness(0.32) blur(3px); }
}

/* phones and tablets: the read-outs' rates pinned to the bottom of the screen while their panel is out of view (the
   controls sit 1,000 to 2,000 px below it, so a tap showed nothing); desktops keep the jar column in view instead */
.mini-ro { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 9px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)); background: rgb(6, 8, 11); box-shadow: 0 -1px 0 var(--line-2); font: 600 11px/1.3 var(--mono); color: var(--text-3); }
.mini-ro[hidden] { display: none; }
.mini-ro span { white-space: nowrap; }
.mini-ro b { color: var(--text); font-weight: 700; }
.mini-ro .off { text-decoration: line-through; opacity: 0.55; }
@media (min-width: 1101px) { .mini-ro { display: none !important; } }
@media (max-width: 1100px) { .optable { padding-bottom: 64px; } }

/* keyboard: a skip link to the current view's content */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 9px 14px; border-radius: 8px; background: var(--volt); color: #0b1003; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 10px; }

/* Evidence: a row header looks like the cell it replaced */
.doc table th[scope="row"] { text-align: left; text-transform: none; letter-spacing: 0; font-size: inherit; font-weight: inherit; color: inherit; vertical-align: top; }

.persist-note .persist-watch { margin-left: 4px; vertical-align: baseline; }

/* the first screen answers its own question in one line (a cold judge found the answer three clicks in) */
.intro .intro-answer { margin: 10px 0 0; max-width: 56ch; padding: 8px 12px; border-radius: 8px; font-size: 14.5px; line-height: 1.45; color: var(--text); background: rgba(6, 8, 11, 0.55); box-shadow: inset 3px 0 0 var(--volt); }
.intro .intro-answer a { color: var(--volt); }

/* the long pages: an On this page row under the intro */
.doc-toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 18px; }
.doc-toc button { font: inherit; font-size: 12.5px; color: var(--text-2); background: var(--panel); border: 0; border-radius: 999px; padding: 5px 11px; box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
@media (hover: hover) { .doc-toc button:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); } }
.doc h2, .view h1, .view [role="heading"] { scroll-margin-top: 72px; }   /* clear of the sticky nav (the skip link and "On this page" scroll here) */
