/* SOUP. A lab paper around a live micrograph: quiet paper, dark plates, IBM Plex throughout. */

@font-face { font-family: "Plex Serif"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/ibm-plex-serif-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex Serif"; font-weight: 400; font-style: italic; font-display: swap; src: url("/fonts/ibm-plex-serif-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Plex Serif"; font-weight: 500; font-style: normal; font-display: block; src: url("/fonts/ibm-plex-serif-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex Serif"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/ibm-plex-serif-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/ibm-plex-sans-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/ibm-plex-sans-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/ibm-plex-sans-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/ibm-plex-mono-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/ibm-plex-mono-500-normal.woff2") format("woff2"); }

:root {
  color-scheme: light;
  /* paper and ink */
  --paper: #f3f5f2;
  --paper-2: #e8ece8;
  --card: #fbfcfa;
  --ink: #0e1512;
  --ink-2: #414c46;
  --ink-3: #5d6862;
  --rule: #cdd5cf;
  /* the plate (micrograph) */
  --plate: #06090c;
  --plate-ink: #eef3ef;
  --plate-ink-2: #a9b6ae;
  /* states */
  --life: #0a7442;
  --life-lit: #3dff8f;
  --signs: #9a5b00;
  --signs-lit: #ffb84d;
  --sell: #a8401c;
  /* dyes, as in src/site/palette.js */
  --dye-loop: #3dff8f;
  --dye-math: #ffb84d;
  --dye-copy: #ff54d6;
  --dye-h0: #4dd0ff;
  --dye-h1: #9680ff;
  --dye-zero: #5c6878;

  --serif: "Plex Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --t-hero: clamp(2.6rem, 6.4vw, 5.4rem);
  --t-h2: clamp(1.6rem, 2.6vw, 2.2rem);
  --t-lede: clamp(1.02rem, 1.25vw, 1.2rem);
  --gut: clamp(1.1rem, 4vw, 3.5rem);
  /* the left and right edge of the 68rem column, for things that sit outside a .wrap */
  --edge: max(var(--gut), calc((100vw - 68rem) / 2));
  --bar-h: 3.5rem;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 1rem); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.55 var(--sans); overflow-x: hidden; }
img, canvas { max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: .06em; }
::selection { background: var(--life); color: #fff; }
:focus-visible { outline: 2px solid var(--life); outline-offset: 3px; border-radius: 2px; }
.hero :focus-visible, .bar:not(.on-paper) :focus-visible { outline-color: var(--life-lit); }
h1, h2 { font-family: var(--serif); font-weight: 500; text-wrap: balance; margin: 0; }
h2 { font-size: var(--t-h2); line-height: 1.15; letter-spacing: -.012em; margin-bottom: 1.4rem; }
p { margin: 0; }
code, .code { font-family: var(--mono); }
.wrap { width: min(100% - var(--gut) * 2, 68rem); margin-inline: auto; }
.narrow { width: min(100% - var(--gut) * 2, 44rem); }
.skip { position: absolute; left: -999px; top: .5rem; z-index: 60; background: var(--ink); color: var(--paper); padding: .5rem .8rem; border-radius: 3px; }
.skip:focus { left: .5rem; }

/* top bar: over the plate it is clear with light text; over paper it turns solid */
.bar { position: fixed; inset: 0 0 auto 0; z-index: 40; height: var(--bar-h); display: flex; align-items: center; gap: 1.5rem;
  padding: 0 max(var(--edge), env(safe-area-inset-right)) 0 max(var(--edge), env(safe-area-inset-left)); color: var(--plate-ink);
  transition: background-color .25s, color .25s, border-color .25s; border-bottom: 1px solid transparent; }
.bar.on-paper { background: var(--paper); color: var(--ink); border-bottom-color: var(--rule); }
.mark { font: 600 1.05rem/1 var(--sans); letter-spacing: .16em; text-decoration: none; }
.bar-nav { display: flex; gap: 1.5rem; margin-left: auto; font-size: .93rem; }
.bar-nav a { text-decoration: none; opacity: .86; padding: .4rem 0; }
.bar-nav a:hover { opacity: 1; text-decoration: underline; }

/* buttons: flat plates, no glow */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: .55rem 1.15rem; border-radius: 3px;
  font: 600 .95rem/1.1 var(--sans); text-decoration: none; cursor: pointer; border: 1px solid transparent;
  background: var(--life-lit); color: #04140b; transition: transform .15s var(--ease), background-color .15s; }
.btn:hover { transform: translateY(-1px); background: #6bffab; }
.btn:active { transform: translateY(0); }
.btn[aria-disabled="true"] { background: rgba(255, 255, 255, .14); color: var(--plate-ink); cursor: default; transform: none; border-color: rgba(255, 255, 255, .22); }
.btn-small { min-height: 2.25rem; padding: .35rem .85rem; font-size: .86rem; }
.btn-ghost { background: transparent; color: var(--plate-ink); border-color: rgba(255, 255, 255, .45); }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--ink-3); }
.btn-quiet:hover { background: var(--paper-2); }
.on-paper .btn, .coin .btn:not(.btn-quiet) { background: var(--life); color: #fff; }
.on-paper .btn:hover, .coin .btn:not(.btn-quiet):hover { background: #0c8a4f; }
.on-paper .btn[aria-disabled="true"], .coin .btn[aria-disabled="true"] { background: var(--paper-2); color: var(--ink-2); border-color: var(--rule); }

/* the hero is the plate */
.hero { position: relative; height: min(92svh, 56.25vw); min-height: 35rem; background: var(--plate); color: var(--plate-ink); overflow: hidden; isolation: isolate; }
.plate { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: crosshair; }
.hero-shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(6, 9, 12, .94) 0%, rgba(6, 9, 12, .72) 26%, rgba(6, 9, 12, 0) 58%),
    linear-gradient(to bottom, rgba(6, 9, 12, .7) 0, rgba(6, 9, 12, 0) 7rem); }
.hero-copy { position: absolute; left: max(var(--edge), env(safe-area-inset-left)); right: max(var(--edge), env(safe-area-inset-right)); bottom: clamp(1.5rem, 5vh, 3.2rem);
  max-width: 43rem; pointer-events: none; }
.hero-copy a { pointer-events: auto; }
.tag { display: inline-flex; align-items: center; gap: .55rem; font: 500 .86rem/1 var(--sans); color: var(--plate-ink-2); margin-bottom: 1rem; }
.pulse { width: .5rem; height: .5rem; border-radius: 50%; background: var(--life-lit); box-shadow: 0 0 0 0 rgba(61, 255, 143, .6); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 .55rem rgba(61, 255, 143, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 255, 143, 0); } }
h1 { font-size: var(--t-hero); line-height: 1.02; letter-spacing: -.022em; }
.lede { font-size: var(--t-lede); line-height: 1.5; color: var(--plate-ink); max-width: 36rem; margin-top: 1.1rem; }
.cta { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.5rem; }
.pilot { margin-top: 1rem; font-size: .86rem; color: var(--signs-lit); }

.plate-tools { position: absolute; right: max(var(--edge), env(safe-area-inset-right)); bottom: clamp(1.5rem, 5vh, 3.2rem); display: flex; gap: .6rem; align-items: center; }
.ponds, .zoom { display: flex; border: 1px solid rgba(255, 255, 255, .28); border-radius: 3px; background: rgba(6, 9, 12, .78); overflow: hidden; }
.ponds button, .zoom button { appearance: none; border: 0; background: transparent; color: var(--plate-ink-2); font: 600 .9rem/1 var(--sans);
  min-width: 2.75rem; min-height: 2.75rem; padding: 0 .7rem; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; cursor: pointer; }
.ponds button + button, .zoom button + button { border-left: 1px solid rgba(255, 255, 255, .18); }
.ponds button[aria-pressed="true"] { background: var(--plate-ink); color: var(--plate); }
.ponds button:hover:not([aria-pressed="true"]), .zoom button:hover { color: var(--plate-ink); background: rgba(255, 255, 255, .08); }
.zoom button { font-size: 1.2rem; font-weight: 400; }
.state { width: .5rem; height: .5rem; border-radius: 50%; background: #5d6a63; }
.state[data-state="signs"] { background: var(--signs-lit); }
.state[data-state="alive"] { background: var(--life-lit); }
.ponds button[aria-pressed="true"] .state[data-state="barren"] { background: #8b968f; }
.ponds button[aria-pressed="true"] .state[data-state="alive"] { background: var(--life); }
.ponds button[aria-pressed="true"] .state[data-state="signs"] { background: var(--signs); }

/* the inspector: one program, read out */
.inspect { position: absolute; z-index: 5; top: calc(var(--bar-h) + .75rem); right: max(var(--edge), env(safe-area-inset-right)); width: min(22rem, calc(100% - var(--gut) * 2));
  background: rgba(8, 12, 15, .95); border: 1px solid rgba(255, 255, 255, .22); border-radius: 4px; padding: 1rem 1rem 1.1rem; font-size: .88rem; color: var(--plate-ink); }
.inspect-close { position: absolute; top: .2rem; right: .2rem; width: 2.5rem; height: 2.5rem; border: 0; background: none; color: var(--plate-ink-2); font-size: 1.3rem; cursor: pointer; }
.inspect-where { font-weight: 600; margin-bottom: .7rem; padding-right: 2rem; }
#inspect-cell { width: 6rem; height: 6rem; image-rendering: pixelated; float: left; margin: 0 .9rem .4rem 0; border: 1px solid rgba(255, 255, 255, .18); }
.inspect .code { font-size: .78rem; line-height: 1.5; word-break: break-all; color: #7d8a83; min-height: 6rem; }
.code b { font-weight: 500; }
.code .k1 { color: var(--dye-loop); } .code .k3 { color: var(--dye-math); } .code .k5 { color: var(--dye-copy); }
.code .k7 { color: var(--dye-h0); } .code .k9 { color: var(--dye-h1); } .code .k11 { color: #93a0b3; }
.inspect dl { clear: both; margin: .8rem 0 0; display: grid; gap: .3rem; }
.inspect dl div { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: .35rem; }
.inspect dt { color: var(--plate-ink-2); }
.inspect dd { margin: 0; font-weight: 600; }
.inspect-verdict { margin-top: .7rem; color: var(--life-lit); font-weight: 500; }
.inspect-verdict:empty { display: none; }

/* figure caption and the key to the dyes */
.caption { border-bottom: 1px solid var(--rule); background: var(--card); font-size: .9rem; color: var(--ink-2); }
.caption-in { display: flex; flex-wrap: wrap; gap: .7rem 2rem; align-items: baseline; justify-content: space-between; padding-block: .95rem; }
.caption-in p { max-width: 46rem; }
.caption b, figcaption b, caption b { color: var(--ink); font-weight: 600; }
.dyes { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; margin: 0; padding: 0; font-size: .84rem; }
.dyes li { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }
.dyes code { color: var(--ink-3); font-size: .8rem; }
.dye { width: .7rem; height: .7rem; border-radius: 2px; background: var(--plate); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.dye[data-dye="1"] { background: var(--dye-loop); } .dye[data-dye="3"] { background: var(--dye-math); } .dye[data-dye="5"] { background: var(--dye-copy); }
.dye[data-dye="7"] { background: var(--dye-h0); } .dye[data-dye="9"] { background: var(--dye-h1); } .dye[data-dye="11"] { background: var(--dye-zero); }

/* sections */
.band { padding-block: clamp(3rem, 7vw, 5.5rem); }
.band-alt { background: var(--paper-2); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem 4rem; }
.empty { color: var(--ink-3); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem 2.5rem; counter-reset: none; }
.steps li { display: grid; gap: .75rem; align-content: start; border-top: 2px solid var(--ink); padding-top: 1rem; }
.steps .n { font: 500 1.6rem/1 var(--serif); color: var(--life); }
.steps p { font-size: 1.06rem; line-height: 1.5; max-width: 22rem; }
.aside { margin-top: 2rem; padding-left: 1rem; border-left: 3px solid var(--signs); color: var(--ink-2); max-width: 46rem; }
.source { margin-top: 1.2rem; color: var(--ink-3); font-size: .93rem; max-width: 46rem; }
.source cite { font-style: italic; }

.stats { display: flex; flex-wrap: wrap; gap: 1.2rem 3.5rem; margin: 0 0 2.2rem; }
.stats dt { font-size: .86rem; color: var(--ink-3); }
.stats dd { margin: .15rem 0 0; font: 500 clamp(1.7rem, 3vw, 2.3rem)/1.1 var(--serif); letter-spacing: -.01em; }
.stats dd[data-state="signs"] { color: var(--signs); }
.stats dd[data-state="alive"] { color: var(--life); }
.measures { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: 1.1rem 2rem; margin: 0 0 1rem; padding-top: 1.1rem; border-top: 1.5px solid var(--ink); }
.measures dt { font-size: .86rem; color: var(--ink-3); }
.measures dd { margin: .2rem 0 0; font: 500 1.3rem/1.2 var(--serif); }
.figure { margin: 0 0 2.4rem; }
.chart { background: var(--card); border: 1px solid var(--rule); border-radius: 4px; padding: .75rem .5rem .25rem; position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font: 400 12px var(--sans); fill: var(--ink-3); }
.chart .lab { font-weight: 600; fill: var(--ink); }
.chart .grid { stroke: #e3e8e4; stroke-width: 1; }
.chart .axis { stroke: var(--ink-3); stroke-width: 1; }
.chart .threshold { stroke: var(--ink); stroke-width: 1; }
.chart .cross { stroke: var(--ink-3); stroke-width: 1; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { stroke: var(--card); stroke-width: 2; }
.chart .line.s0 { stroke: #2a78d6; } .chart .dot.s0 { fill: #2a78d6; } .chart i.s0 { background: #2a78d6; }
.chart .line.s1 { stroke: #eb6834; } .chart .dot.s1 { fill: #eb6834; } .chart i.s1 { background: #eb6834; }
.chart .line.s2 { stroke: #1baf7a; } .chart .dot.s2 { fill: #1baf7a; } .chart i.s2 { background: #1baf7a; }
.chart .line.s3 { stroke: #7a3fb0; } .chart .dot.s3 { fill: #7a3fb0; } .chart i.s3 { background: #7a3fb0; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; margin: .1rem .5rem .5rem; padding: 0; font-size: .86rem; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: .45rem; }
.legend .key { width: 1.1rem; height: 2px; border-radius: 1px; }
.chart .tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--paper); font-size: .8rem; line-height: 1.5; padding: .45rem .65rem; border-radius: 3px; white-space: nowrap; transform: translateX(-50%); }
.chart .tip b { display: block; font-weight: 600; }
.chart .tip i { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; margin-right: .4rem; }
figcaption, caption { font-size: .9rem; color: var(--ink-2); margin-top: .7rem; max-width: 50rem; text-align: left; }
caption { caption-side: top; margin: 0 0 .7rem; }
.table-scroll { overflow-x: auto; }
.ponds-table { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: .95rem; }
.ponds-table th, .ponds-table td { text-align: right; padding: .6rem .8rem; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.ponds-table th:first-child, .ponds-table td:nth-child(2), .ponds-table th:nth-child(2) { text-align: left; }
.ponds-table thead th { font-weight: 500; color: var(--ink-3); font-size: .86rem; border-bottom: 1.5px solid var(--ink); }
.ponds-table tbody th { font: 500 1.05rem var(--serif); }
.pill { display: inline-flex; align-items: center; gap: .4rem; font-weight: 500; }
.pill::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: #98a39d; }
.pill[data-state="signs"] { color: var(--signs); } .pill[data-state="signs"]::before { background: var(--signs); }
.pill[data-state="alive"] { color: var(--life); } .pill[data-state="alive"]::before { background: var(--life); }
.replay-link { margin-left: .9rem; font-size: .88rem; color: var(--ink-2); }
.shield { font-size: .78rem; color: var(--ink-3); margin-left: .45rem; font-family: var(--sans); font-weight: 400; }

.species { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.species li { background: var(--plate); color: var(--plate-ink); border-radius: 4px; padding: 1rem 1.1rem; display: grid; grid-template-columns: auto 1fr; gap: .3rem 1.2rem; align-items: baseline; }
.species .no { font: 500 1.15rem var(--serif); }
.species .code { font-size: .82rem; word-break: break-all; color: #76837c; grid-column: 1 / -1; }
.species .meta { color: var(--plate-ink-2); font-size: .88rem; }

.events, .stirs { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.events li, .stirs li { padding: .7rem 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 5.2rem 1fr; gap: .2rem 1rem; font-size: .95rem; }
.events li.empty, .stirs li.empty { display: block; }
.events time, .stirs time { color: var(--ink-3); font-size: .84rem; padding-top: .1rem; }
.events .what b { font-weight: 600; }
.stirs .side { font-weight: 600; }
.stirs .side[data-side="sell"] { color: var(--sell); }
.stirs .side[data-side="buy"] { color: var(--life); }
.stirs a { color: var(--ink-3); font-family: var(--mono); font-size: .82rem; }
.stirs .rad { color: var(--signs); font-size: .84rem; }

.coin { background: var(--card); border: 1px solid var(--rule); border-radius: 4px; padding: clamp(1.2rem, 3vw, 2rem); display: grid; gap: 1.2rem; max-width: 46rem; }
.label { font-size: .86rem; color: var(--ink-3); display: flex; align-items: center; gap: .6rem; }
.chip { border: 1px solid var(--rule); border-radius: 99px; padding: .05rem .55rem; font-size: .76rem; color: var(--ink-2); }
.ca { font: 500 clamp(.95rem, 2.4vw, 1.25rem)/1.4 var(--mono); word-break: break-all; margin-top: .45rem; }
.ca.pending { font-family: var(--sans); font-weight: 400; color: var(--ink-2); }
.coin-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }
.fine { font-size: .86rem; color: var(--ink-3); margin-top: .9rem; }
.coin-pair { border-top: 1px solid var(--rule); padding-top: 1rem; color: var(--ink-2); }

.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 1rem 2rem 1rem 0; font: 500 1.1rem/1.3 var(--serif); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .2rem; top: .85rem; font: 400 1.3rem var(--sans); color: var(--ink-3); }
.faq details[open] summary::after { content: "−"; }
.faq p { padding: 0 0 1.2rem; color: var(--ink-2); max-width: 40rem; }

.foot { background: var(--plate); color: var(--plate-ink-2); padding-block: 2.8rem calc(2.8rem + env(safe-area-inset-bottom)); font-size: .9rem; }
.foot-in { display: grid; gap: 1.2rem; }
.foot .mark { color: var(--plate-ink); }
.foot nav { display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; }
.foot nav a { color: var(--plate-ink); }
.legal { max-width: 52rem; font-size: .84rem; line-height: 1.55; }

/* the sub-pages: method and verify */
.page { background: var(--paper); }
.doc { padding-top: calc(var(--bar-h) + clamp(2rem, 5vw, 3.5rem)); padding-bottom: clamp(3rem, 7vw, 5rem); }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.doc .lede { color: var(--ink-2); max-width: 42rem; margin-top: 1rem; }
.doc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem 4rem; margin-top: clamp(2.5rem, 6vw, 4rem); }
.doc-cols h2 { font-size: 1.45rem; }
.plain { margin: 0; padding-left: 1.2rem; display: grid; gap: .6rem; color: var(--ink-2); }
.plain li::marker { color: var(--ink-3); }
.bar-nav a[aria-current="page"] { opacity: 1; text-decoration: underline; }

.replay-form { display: flex; flex-wrap: wrap; gap: 1rem 1.2rem; align-items: end; margin: 2.2rem 0 1.4rem; }
.replay-form label { display: grid; gap: .3rem; font-size: .86rem; color: var(--ink-3); }
.replay-form select, .replay-form input[type="number"] { font: 400 1rem var(--sans); color: var(--ink); background: var(--card); border: 1px solid var(--ink-3); border-radius: 3px; min-height: 2.75rem; padding: .3rem .6rem; max-width: 100%; }
.replay-form input[type="number"] { width: 7rem; }
.replay-form .check { display: flex; align-items: center; gap: .5rem; min-height: 2.75rem; color: var(--ink-2); font-size: .95rem; }
.replay-form .check input { width: 1.1rem; height: 1.1rem; accent-color: var(--life); }
.replay-go { display: flex; gap: .6rem; }
.page .btn:not(.btn-quiet) { background: var(--life); color: #fff; }
.page .btn:not(.btn-quiet):hover { background: #0c8a4f; }
.replay-plate { background: var(--plate); border-radius: 4px; overflow: hidden; aspect-ratio: 16 / 9; }
.replay-plate canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; }
.replay figcaption { font-variant-numeric: tabular-nums; }
.tally { margin: 0 0 1.2rem; padding: .8rem 1rem; border-left: 3px solid var(--sell); background: var(--card); font-weight: 500; }
.tally[data-ok="true"] { border-left-color: var(--life); }
.checks { font-size: .9rem; }
.checks th, .checks td { text-align: left; }
.checks td:nth-child(3) { text-align: right; }
.checks tbody th { font: 500 .95rem var(--sans); }
.checks .mono { font-family: var(--mono); font-size: .82rem; color: var(--ink-2); }
.checks tr.bad td { color: var(--sell); }

/* the method page reads like a paper */
.paper { width: min(100% - var(--gut) * 2, 44rem); margin-inline: auto; font: 400 1.08rem/1.65 var(--serif); }
.paper h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); line-height: 1.1; }
.paper .byline { font: 400 .93rem/1.5 var(--sans); color: var(--ink-3); margin-top: 1rem; }
.paper .abstract { margin: 2rem 0; padding: 1.2rem 1.4rem; background: var(--card); border: 1px solid var(--rule); border-radius: 4px; font-size: 1rem; }
.paper .abstract b { font-family: var(--sans); font-weight: 600; }
.paper h2 { font-size: 1.5rem; margin: 2.6rem 0 .8rem; }
.paper h3 { font: 600 1.02rem/1.3 var(--sans); margin: 1.7rem 0 .4rem; }
.paper p + p { margin-top: .9rem; }
.paper ul, .paper ol { padding-left: 1.3rem; display: grid; gap: .45rem; margin: .8rem 0; }
.paper code { font-size: .86em; background: var(--paper-2); padding: .08em .3em; border-radius: 2px; }
.paper pre { font: 400 .84rem/1.55 var(--mono); background: var(--plate); color: var(--plate-ink); padding: 1rem 1.1rem; border-radius: 4px; overflow-x: auto; margin: 1rem 0; }
.paper .table-scroll { margin: 1rem 0; }
.paper table { border-collapse: collapse; width: 100%; font: 400 .92rem/1.4 var(--sans); }
.paper th, .paper td { text-align: left; padding: .5rem .7rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.paper thead th { border-bottom: 1.5px solid var(--ink); font-weight: 600; }
.paper .refs { font-size: .95rem; }
.paper .note { font: 400 .93rem/1.55 var(--sans); color: var(--ink-2); border-left: 3px solid var(--signs); padding-left: 1rem; margin: 1.2rem 0; }

.toast { position: fixed; left: 50%; bottom: calc(1.2rem + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 70; background: var(--ink); color: var(--paper);
  padding: .65rem 1rem; border-radius: 3px; font-size: .92rem; max-width: calc(100% - 2rem); box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }

@media (max-width: 900px) {
  .bar:not(.on-paper) .bar-nav a:nth-child(n+3), #bar .bar-nav a:nth-child(n+3) { display: none; }
  .two, .doc-cols { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 1.4rem; }
  .steps li { grid-template-columns: 2.2rem 1fr; align-items: baseline; }
  .steps p { max-width: none; }
  .hero { height: auto; min-height: 0; display: grid; grid-template-rows: 1fr auto; }
  .hero .plate { position: relative; height: 62svh; min-height: 22rem; }
  .hero-shade { background: linear-gradient(to bottom, rgba(6, 9, 12, .7) 0, rgba(6, 9, 12, 0) 6rem); }
  .hero-copy { position: static; padding: 1.4rem var(--gut) 2rem; max-width: none; background: var(--plate); }
  .plate-tools { top: calc(var(--bar-h) + .5rem); bottom: auto; }
  .inspect { top: auto; bottom: .75rem; left: var(--gut); right: var(--gut); width: auto; position: fixed; z-index: 50; }
}
@media (max-width: 560px) {
  .bar { gap: .8rem; }
  .bar-nav { display: none; }
  .bar .btn-small { margin-left: auto; }
  .events li, .stirs li { grid-template-columns: 4.4rem 1fr; }
  .cta .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse { animation: none; }
  .btn { transition: none; }
}
