/* GameServerBench. A bench instrument, drawn flat: putty faceplates, silkscreen hairlines, dark inset readouts. */

@font-face { font-family: "B612"; src: url("/assets/fonts/b612-400.woff2") format("woff2"); font-weight: 400; font-display: optional; }
@font-face { font-family: "B612"; src: url("/assets/fonts/b612-700.woff2") format("woff2"); font-weight: 700; font-display: optional; }
@font-face { font-family: "B612 Mono"; src: url("/assets/fonts/b612-mono-400.woff2") format("woff2"); font-weight: 400; font-display: optional; }
@font-face { font-family: "B612 Mono"; src: url("/assets/fonts/b612-mono-700.woff2") format("woff2"); font-weight: 700; font-display: optional; }

:root {
  color-scheme: light;
  --plate: #d8d4c7;
  --panel: #e9e6db;
  --paper: #f6f4ec;
  --ink: #191a16;
  --ink-2: #44453d;
  --ink-3: #56574d;
  --rule: #b4afa0;
  --line: #2a2b25;
  --link: #0b4a5e;
  --focus: #0b4a5e;
  --display: #15160f;
  --display-2: #24251b;
  --display-line: #3f402f;
  --amber: #ffb340;
  --amber-ink: #17170f;
  --display-text: #efe9d8;
  --display-text-2: #b9b39c;
  --display-dim: #8f8a72;
  --hatch: rgba(25, 26, 22, 0.16);
  --hatch-display: rgba(255, 179, 64, 0.16);
  --ok: #17603b;
  --warn: #8a4b00;
  --mono: "B612 Mono", ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  --sans: "B612", "Bahnschrift", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --gut: clamp(16px, 3vw, 32px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --plate: #1b1c15; --panel: #2c2d24; --paper: #26271f;
    --ink: #eee9da; --ink-2: #c4bfae; --ink-3: #a8a392;
    --rule: #45463a; --line: #8c8875; --link: #86cde0; --focus: #ffb340;
    --display: #0d0e08; --display-2: #1c1d13; --display-line: #3a3b2b;
    --hatch: rgba(238, 233, 218, 0.15); --ok: #6fd39c; --warn: #f3b061;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --plate: #1b1c15; --panel: #2c2d24; --paper: #26271f;
  --ink: #eee9da; --ink-2: #c4bfae; --ink-3: #a8a392;
  --rule: #45463a; --line: #8c8875; --link: #86cde0; --focus: #ffb340;
  --display: #0d0e08; --display-2: #1c1d13; --display-line: #3a3b2b;
  --hatch: rgba(238, 233, 218, 0.15); --ok: #6fd39c; --warn: #f3b061;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; background: var(--plate); color: var(--ink); font: 400 16px/1.55 var(--sans); overflow-x: clip; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.shell { display: block; width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--gut); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--amber); color: var(--amber-ink); padding: 10px 14px; font-weight: 700; }
.skip:focus { top: 8px; }
.section { padding-block: clamp(20px, 3vw, 32px); }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px; }

.kicker { font: 400 13px/1.3 var(--mono); letter-spacing: .04em; color: var(--ink-3); margin-bottom: 10px; }
.kicker--dark { color: var(--display-text-2); }
h1 { font: 700 clamp(30px, 4.3vw, 52px)/1.1 var(--sans); letter-spacing: -.02em; text-wrap: balance; }
.lede { font: 400 clamp(17px, 1.6vw, 20px)/1.5 var(--serif); color: var(--ink-2); margin-top: 16px; max-width: 62ch; text-wrap: pretty; }

/* Ledger strip */
.strip { background: var(--display); color: var(--display-text-2); font: 400 12.5px/1.2 var(--mono); }
.strip__row { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 34px; }
.strip__ledger { display: flex; gap: 14px; flex-wrap: nowrap; white-space: nowrap; }
.strip__label { color: var(--display-dim); }
.strip__ledger b { color: var(--amber); font-weight: 700; }
.strip__right { display: flex; align-items: center; gap: 16px; }
.strip a { color: var(--display-text); }
.strip__lamp { background: none; border: 1px solid var(--display-line); border-radius: 2px; padding: 3px 8px; cursor: pointer; color: var(--display-text); font: inherit; }
.strip__lamp:hover { border-color: var(--amber); }
.strip :focus-visible { outline-color: var(--amber); }

/* Masthead */
.masthead { position: sticky; top: 0; z-index: 30; background: var(--panel); border-bottom: 1px solid var(--line); }
.masthead__row { display: flex; align-items: center; gap: 22px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand__mark { flex: none; display: block; }
.brand__word { font: 400 19px/1 var(--sans); letter-spacing: -.01em; }
.brand__word b { font-weight: 700; }
.nav { margin-left: auto; }
.nav__list { display: flex; gap: 2px; }
.nav__item { position: relative; }
.nav__link { display: flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--ink); text-decoration: none; font-size: 15px; border-radius: 3px; }
.nav__link:hover { background: var(--plate); }
.nav__link[aria-current] { box-shadow: inset 0 -2px 0 var(--ink); border-radius: 0; }
.nav__sub { display: none; position: absolute; top: 100%; left: 0; min-width: 400px; grid-template-columns: 1fr 1fr; gap: 0 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 3px; padding: 10px; z-index: 5; }
.nav__item--has-sub:hover .nav__sub, .nav__item.is-open .nav__sub, html:not(.js) .nav__item--has-sub:focus-within .nav__sub { display: grid; }
.nav__item--has-sub { display: flex; align-items: center; }
.nav__item--has-sub .nav__link { padding-right: 2px; }
.nav__open { width: 22px; height: 32px; padding: 0; background: none; border: 0; cursor: pointer; color: var(--ink-2); position: relative; }
.nav__open::after { content: ""; position: absolute; left: 8px; top: 12px; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.nav__open[aria-expanded="true"]::after { top: 15px; transform: rotate(225deg); }
html:not(.js) .nav__open { display: none; }
.nav__sub a { display: block; padding: 7px 8px; color: var(--ink); text-decoration: none; font-size: 14px; border-radius: 2px; }
.nav__sub a:hover { background: var(--plate); }
.nav-toggle { display: none; }
.masthead__method { flex: none; }

/* Keys */
.key { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; background: var(--ink); color: var(--plate); border: 1px solid var(--ink); border-bottom-width: 3px; border-radius: 3px; font: 700 14.5px/1 var(--sans); text-decoration: none; cursor: pointer; }
.key:hover { filter: brightness(1.15); }
.key:active { border-bottom-width: 1px; transform: translateY(2px); }
.key--amber { background: var(--amber); color: var(--amber-ink); border-color: var(--amber-ink); }
.key--ghost { background: transparent; color: var(--ink); border-color: var(--line); }

/* Preview notice */
.preview-note { background: repeating-linear-gradient(135deg, var(--hatch) 0 1px, transparent 1px 7px), var(--panel); border-bottom: 1px solid var(--rule); font: 400 12.5px/1.45 var(--mono); padding-block: 7px; color: var(--ink-2); }

/* Grouping brackets */
.group { position: relative; border: 1px solid var(--line); border-radius: 3px; padding: 26px clamp(14px, 2vw, 22px) 20px; }
.group--plain { padding-top: 26px; }
.group__legend { position: absolute; top: 0; left: 12px; transform: translateY(-50%); background: var(--plate); padding: 0 8px; font: 700 12.5px/1.2 var(--mono); letter-spacing: .05em; color: var(--ink); }
.group__intro { color: var(--ink-2); font-size: 15px; margin-bottom: 16px; max-width: 70ch; }
.group__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 14px; font-size: 14px; }
.empty-line { font: 400 14.5px/1.4 var(--mono); color: var(--ink-2); }
.empty-line--inline { display: inline-block; font-size: 13.5px; }

/* Hero faceplate */
.hero { padding-block: clamp(18px, 3vw, 34px) clamp(26px, 4vw, 44px); }
.faceplate { position: relative; display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: clamp(24px, 4vw, 56px); align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; padding: clamp(24px, 4.5vw, 56px); }
.faceplate--narrow { grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); }
.screw { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--plate); box-shadow: inset 0 0 0 1px var(--line); }
.screw::after { content: ""; position: absolute; left: 2px; right: 2px; top: 5px; height: 1.5px; background: var(--line); transform: rotate(32deg); }
.screw--tl { top: 10px; left: 10px; } .screw--tr { top: 10px; right: 10px; } .screw--bl { bottom: 10px; left: 10px; } .screw--br { bottom: 10px; right: 10px; }
.hero__keys { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* Oscilloscope */
.scope { position: relative; background: var(--display); border-radius: 4px; aspect-ratio: 16 / 10; overflow: hidden; box-shadow: inset 0 0 0 1px #000, inset 0 0 44px rgba(0, 0, 0, .55); color: var(--display-text-2); font: 400 12.5px/1 var(--mono); }
.scope__screen { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scope__grid path { stroke: var(--display-line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.scope__minor path { stroke: var(--display-line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.scope__trace { stroke: var(--amber); stroke-width: 2; fill: none; filter: drop-shadow(0 0 4px rgba(255, 179, 64, .55)); }
.scope p { position: absolute; }
.scope__tl { top: 12px; left: 14px; }
.scope__tr { top: 9px; right: 12px; }
.scope__bl { bottom: 12px; left: 14px; }
.scope__br { bottom: 12px; right: 14px; }
.scope__flag { display: inline-block; background: var(--amber); color: var(--amber-ink); font-weight: 700; padding: 4px 8px; border-radius: 2px; }

/* Readouts */
.channels { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.channels--hero { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 10px; }
.readout { background: var(--display); color: var(--display-text); border-radius: 3px; padding: 11px 13px 12px; box-shadow: inset 0 0 0 1px #000; min-width: 0; }
.readout__name { font: 400 12.5px/1.3 var(--mono); color: var(--display-text-2); min-height: 1.3em; overflow-wrap: anywhere; }
/* Figures are set in B612, not B612 Mono: the mono full stop sits in its own wide cell and reads as "31. 5". */
.readout__value { font: 700 30px/1.2 var(--sans); color: var(--amber); margin-top: 6px; letter-spacing: .02em; white-space: nowrap; }
.readout--large .readout__value { font-size: 38px; }
.readout__unit { font: 400 13px/1 var(--mono); color: var(--display-text-2); margin-left: 8px; letter-spacing: 0; }
.readout--nym .readout__value { color: var(--display-dim); }
.readout__flag { display: inline-block; margin-top: 8px; padding: 3px 7px; background: var(--amber); color: var(--amber-ink); font: 700 12px/1.2 var(--mono); border-radius: 2px; }

/* Method rail */
.rail { background: var(--display); color: var(--display-text); padding-block: clamp(32px, 5vw, 60px); }
.rail h2 { font: 700 clamp(24px, 3vw, 36px)/1.15 var(--sans); letter-spacing: -.015em; max-width: 22ch; text-wrap: balance; }
.rail__intro p:last-child { color: var(--display-text-2); margin-top: 12px; max-width: 58ch; font: 400 17px/1.5 var(--serif); }
.rail__path { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 34px; border-top: 1px solid var(--display-line); }
.rail__node { position: relative; }
.rail__node::before { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; background: var(--amber); border-radius: 50%; }
.rail__node a { display: block; color: inherit; text-decoration: none; padding: 20px 20px 18px 0; height: 100%; }
.rail__node a:hover .rail__name { text-decoration: underline; text-underline-offset: 3px; }
.rail__n { display: block; font: 400 13px/1 var(--mono); color: var(--amber); }
.rail__name { display: block; font: 700 19px/1.2 var(--sans); margin-top: 10px; }
.rail__note { display: block; color: var(--display-text-2); font-size: 14.5px; margin-top: 8px; line-height: 1.45; }
.rail :focus-visible { outline-color: var(--amber); }
.rail__rule { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px 40px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--display-line); align-items: start; }
.rail__rule-text { font-weight: 700; font-size: 16px; }
.rail__fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 16px; font: 400 13.5px/1.3 var(--mono); color: var(--display-text-2); counter-reset: f; }
.rail__fields li { counter-increment: f; }
.rail__fields li::before { content: counter(f) " "; color: var(--amber); margin-right: 6px; }

/* Lists */
.modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.module a { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 96px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--rule); border-radius: 3px; color: var(--ink); text-decoration: none; height: 100%; }
.module a:hover { border-color: var(--line); }
.module__name { font-weight: 700; font-size: 17px; line-height: 1.25; }
.home-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; }
.hostlist { columns: 2; column-gap: 24px; }
.hostlist--single { columns: 1; }
.hostlist li { break-inside: avoid; border-bottom: 1px solid var(--rule); }
.hostlist a { display: block; padding: 10px 2px; color: var(--ink); text-decoration: none; font-size: 15.5px; }
.hostlist a:hover { text-decoration: underline; }
.patch__row { border-bottom: 1px solid var(--rule); }
.patch__row:last-child { border-bottom: 0; }
.patch__row a { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 11px 2px; color: var(--ink); text-decoration: none; min-height: 44px; }
.patch__row a:hover .patch__name { text-decoration: underline; text-underline-offset: 3px; }
.patch__name { font-size: 15.5px; line-height: 1.35; }
.patch__status { flex: none; }

/* Lamps */
.lamp { display: inline-flex; align-items: center; gap: 7px; font: 400 12.5px/1.2 var(--mono); color: var(--ink-2); white-space: nowrap; }
.lamp__dot { width: 9px; height: 9px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.lamp--measured .lamp__dot { background: var(--ok); box-shadow: none; }
.lamp--source .lamp__dot { box-shadow: inset 0 0 0 1.5px var(--link); }
.lamp--policy .lamp__dot { background: var(--ink-3); box-shadow: none; border-radius: 1px; }
.lamp--awaiting .lamp__dot { background: var(--amber); box-shadow: inset 0 0 0 1px var(--ink); }

/* Page head */
.pagehead { padding-block: clamp(16px, 2.5vw, 26px) clamp(20px, 3vw, 30px); border-bottom: 1px solid var(--rule); }
.pagehead__grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: clamp(20px, 3vw, 44px); align-items: start; margin-top: 14px; }
.pagehead__grid:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
.pagehead__plain { max-width: 780px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 2px 8px; font: 400 13px/1.4 var(--mono); color: var(--ink-3); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--rule); }
.crumbs a { color: var(--ink-2); }

/* Calibration sticker */
.sticker { background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 13px 14px; font-size: 13.5px; position: relative; overflow: hidden; }
.sticker::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--ink-3); }
.sticker--source::before { background: var(--link); }
.sticker--awaiting::before { background: repeating-linear-gradient(135deg, var(--amber) 0 7px, var(--ink) 7px 14px); height: 8px; }
.sticker--measured::before { background: var(--ok); }
.sticker__head { margin-top: 5px; }
.sticker__head .lamp { font-weight: 700; color: var(--ink); font-size: 13.5px; }
.sticker__text { margin-top: 8px; line-height: 1.45; color: var(--ink-2); }
.sticker__rows { margin-top: 10px; border-top: 1px solid var(--rule); font: 400 12.5px/1.4 var(--mono); }
.sticker__rows div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--rule); }
.sticker__rows dt { color: var(--ink-3); white-space: nowrap; }
.sticker__rows dd { text-align: right; }
.sticker__link { display: inline-block; margin-top: 9px; font: 400 13px/1.3 var(--sans); padding-block: 3px; }
.sticker-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }

/* Reading layout */
.reading { display: grid; grid-template-columns: 230px minmax(0, 760px); gap: clamp(22px, 3.5vw, 48px); align-items: start; padding-block: clamp(16px, 2.6vw, 28px) clamp(32px, 5vw, 56px); }
.reading--no-toc { grid-template-columns: minmax(0, 820px); }
.reading__toc { position: sticky; top: 88px; }
.reading__main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px; min-width: 0; }
.toc summary { font: 700 13px/1.3 var(--mono); cursor: pointer; padding: 6px 0; }
.toc__list { margin-top: 6px; border-left: 1px solid var(--line); }
.toc__list a { display: block; padding: 5px 0 5px 12px; color: var(--ink-2); text-decoration: none; font-size: 13.5px; line-height: 1.35; margin-left: -1px; border-left: 2px solid transparent; }
.toc__l3 a { padding-left: 24px; font-size: 13px; }
.toc__list a:hover { color: var(--ink); }
.toc__list a[aria-current] { color: var(--ink); border-left-color: var(--ink); font-weight: 700; }

/* Prose */
.prose { background: var(--paper); border: 1px solid var(--rule); border-radius: 3px; padding: clamp(18px, 3.5vw, 40px); font: 400 18px/1.68 var(--serif); counter-reset: h2; overflow-wrap: break-word; }
.prose--wide { margin-top: 28px; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { font: 700 clamp(22px, 2.4vw, 28px)/1.22 var(--sans); letter-spacing: -.012em; margin-top: 1.9em; scroll-margin-top: 90px; counter-increment: h2; }
.prose h2:first-child { margin-top: 0; }
.prose h2::before { content: counter(h2, decimal-leading-zero); display: block; font: 400 13px/1 var(--mono); color: var(--ink-3); margin-bottom: 8px; letter-spacing: .04em; }
.prose h3 { font: 700 19px/1.3 var(--sans); margin-top: 1.5em; scroll-margin-top: 90px; }
.prose h4 { font: 700 16px/1.3 var(--sans); margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose ul { list-style: square; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--ink-3); }
.prose code { font: 400 .84em/1.4 var(--mono); background: var(--plate); padding: .1em .35em; border-radius: 2px; }
.prose pre { background: var(--display); color: var(--display-text); padding: 14px 16px; border-radius: 3px; overflow-x: auto; font-size: 15px; }
.prose pre code { background: none; color: inherit; padding: 0; }
.prose blockquote { border-left: 3px solid var(--line); padding-left: 16px; color: var(--ink-2); }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin-block: 2em; }
.prose img { height: auto; border-radius: 3px; }
.prose .group__legend { background: var(--paper); }
.prose .chart, .prose .table-wrap, .prose .group { font-family: var(--sans); font-size: 16px; line-height: 1.5; }
.owner-token { background: var(--amber); color: var(--amber-ink); font: 700 .86em/1.3 var(--mono); padding: 0 .35em; border-radius: 2px; outline: 1px solid var(--amber-ink); }

/* Callouts */
.callout { border: 1px solid var(--line); border-radius: 3px; padding: 12px 15px; background: var(--panel); font-size: .95em; }
.callout > * + * { margin-top: .6em; }
.callout__label { font: 700 12.5px/1.2 var(--mono); letter-spacing: .05em; }
.callout--warning, .callout--caution { border-left: 5px solid var(--warn); }
.callout--note, .callout--important { border-left: 5px solid var(--link); }
.callout--tip { border-left: 5px solid var(--ok); }

/* Tables */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font: 400 14.5px/1.4 var(--sans); font-variant-numeric: tabular-nums; }
.data-table thead th { text-align: left; font: 700 12.5px/1.3 var(--mono); letter-spacing: .02em; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: bottom; }
.data-table td, .data-table tbody th { padding: 10px; border-bottom: 1px solid var(--rule); vertical-align: top; text-align: left; font-weight: 400; }
.data-table tbody th { font-weight: 700; }
.data-table tbody tr:last-child > * { border-bottom: 0; }
.data-table .num { font-family: var(--sans); }
.data-table td.nym { background: repeating-linear-gradient(135deg, var(--hatch) 0 1px, transparent 1px 7px); color: var(--ink-2); font: 400 12.5px/1.3 var(--mono); }
.slot-note { display: block; font: 400 12.5px/1.3 var(--mono); color: var(--ink-3); margin-top: 2px; }
.slot-name { font-weight: 700; }

/* Chart */
.chart__cap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 10px; }
.chart__title { font-weight: 700; font-size: 16px; }
.chart__meta { font: 400 13px/1.4 var(--mono); color: var(--ink-3); }
.chart__plot { position: relative; height: 200px; background: var(--display); border-radius: 3px; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 16px; }
.chart--short .chart__plot { height: 130px; }
.chart__hatch { position: absolute; inset: 0; background: repeating-linear-gradient(135deg, var(--hatch-display) 0 1px, transparent 1px 8px); }
.chart__flag { position: relative; background: var(--amber); color: var(--amber-ink); font: 700 14px/1.2 var(--mono); padding: 6px 11px; border-radius: 2px; }
.chart__sub { position: relative; font: 400 13px/1.4 var(--mono); color: var(--display-text-2); background: var(--display); padding: 0 6px; }
.chart__axis { position: absolute; left: 16px; right: 16px; bottom: 12px; height: 9px; border-bottom: 1px solid var(--display-line); display: flex; justify-content: space-between; }
.chart__axis i { display: block; width: 1px; height: 9px; background: var(--display-line); }
.chart__row { display: grid; grid-template-columns: minmax(84px, 170px) minmax(0, 1fr); gap: 10px; align-items: center; min-height: 34px; }
.chart__label { font-size: 14px; overflow-wrap: anywhere; }
.chart__track { position: relative; display: block; height: 20px; margin-right: 44px; border-left: 1px solid var(--rule); }
.chart__range { position: absolute; top: 4px; height: 12px; min-width: 3px; background: var(--link); border-radius: 0 4px 4px 0; }
.chart__value { position: absolute; top: 0; margin-left: 6px; font: 400 13px/20px var(--sans); }
.chart__row--axis { min-height: 22px; border-top: 1px solid var(--rule); margin-top: 4px; padding-top: 4px; }
.chart__tick { position: absolute; top: 0; transform: translateX(-50%); font: 400 12px/18px var(--sans); color: var(--ink-3); }
.chart__table { margin-top: 12px; font-size: 14px; }
.chart__table summary { cursor: pointer; font: 400 13px/1.3 var(--mono); padding: 4px 0; }

/* Method strip */
.method-strip { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) auto; gap: 16px 34px; align-items: center; background: var(--display); color: var(--display-text); border-radius: 4px; padding: 18px 20px; }
.method-strip__kicker { font: 400 12.5px/1 var(--mono); color: var(--amber); margin-bottom: 6px; }
.method-strip__rule { font-weight: 700; font-size: 16px; line-height: 1.3; }
.method-strip__fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px 14px; font: 400 13px/1.3 var(--mono); color: var(--display-text-2); }
.method-strip :focus-visible { outline-color: var(--amber); }
.method-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.method-tabs a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 13px; border: 1px solid var(--rule); border-radius: 3px; color: var(--ink); text-decoration: none; font-size: 14.5px; }
.method-tabs a[aria-current] { background: var(--ink); color: var(--plate); border-color: var(--ink); }

/* Sources */
.sources__list { counter-reset: s; }
.sources__list li { counter-increment: s; position: relative; padding: 9px 0 9px 32px; border-bottom: 1px solid var(--rule); font-size: 15px; overflow-wrap: anywhere; }
.sources__list li:last-child { border-bottom: 0; }
.sources__list li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 10px; font: 400 13px/1.4 var(--mono); color: var(--ink-3); }
.sources__meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font: 400 12.5px/1.4 var(--mono); color: var(--ink-3); margin-top: 2px; }
.tag { border: 1px solid var(--rule); padding: 0 5px; border-radius: 2px; }

/* Commercial */
.commercial { border: 1px solid var(--line); border-radius: 3px; padding: 14px 16px; background: var(--panel); display: grid; gap: 10px; }
.commercial__label { font: 700 12.5px/1.2 var(--mono); letter-spacing: .05em; }
.commercial__disclosure { font-size: 14px; color: var(--ink-2); max-width: 74ch; }
.commercial__links { display: flex; flex-wrap: wrap; gap: 10px; }

/* Next step */
.next { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 20px; align-items: center; border-top: 2px solid var(--line); padding-top: 14px; }
.next__kicker { grid-column: 1 / -1; font: 400 12.5px/1.2 var(--mono); color: var(--ink-3); }
.next__why { font-size: 16px; }
.next__link { font-weight: 700; padding-block: 6px; }

/* Tools */
.tool { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.tool__inputs { min-width: 0; display: grid; gap: 18px; justify-items: start; }
.tool__inputs > * { width: 100%; }
.tool__inputs > .key { width: auto; }
.tool__inputs .group__intro { margin-bottom: 0; }
.tool__group { border: 1px solid var(--line); border-radius: 3px; margin: 0; padding: 12px clamp(14px, 2vw, 22px) 18px; min-width: 0; }
.tool__group legend { font: 700 12.5px/1.2 var(--mono); letter-spacing: .05em; padding: 0 8px; margin-left: -8px; }
.tool__group .fields { margin: 6px 0 0; }
.field--check { display: flex; align-items: flex-start; gap: 9px; margin-top: 14px; font-size: 14px; }
.field--check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--ink); }
.result-table { width: 100%; border-collapse: collapse; font: 400 15px/1.3 var(--sans); margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.result-table th, .result-table td { padding: 8px 6px; border-bottom: 1px solid var(--display-line); text-align: right; font-weight: 400; }
.result-table thead th { font: 400 12.5px/1.2 var(--mono); color: var(--display-text-2); }
.result-table tbody th { text-align: left; color: var(--display-text); font-weight: 700; }
.result-table thead th:first-child { text-align: left; }
.result-table td { color: var(--amber); font-weight: 700; }
.result-table output:empty::after { content: ""; }
.readout--text .readout__value { font-size: 20px; white-space: normal; }
.tool__dev { font-size: 14px; line-height: 1.45; color: var(--display-text-2); margin-bottom: 10px; }
.tool__dev b { color: var(--display-text); }
.result-list { margin-top: 8px; }
.result-item { border-top: 1px solid var(--display-line); padding: 10px 0; }
.result-item__head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.result-item__name { font-weight: 700; }
.result-item__name a { color: var(--amber); }
.result-item__value { font-weight: 700; color: var(--amber); white-space: nowrap; }
.result-item__note { font-size: 13px; line-height: 1.4; color: var(--display-text-2); margin-top: 3px; }
.result-item__flag { display: inline-block; margin-top: 5px; font: 400 12px/1.3 var(--mono); padding: 2px 6px; background: var(--display-2); color: var(--display-text); border-radius: 2px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px 16px; margin-bottom: 18px; }
.field label, .field__label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 5px; }
.field__opt { font-weight: 400; color: var(--ink-3); font-size: 13px; }
.field__box { position: relative; display: flex; align-items: center; }
.field input, .field select { width: 100%; height: 46px; padding: 0 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 3px; font: 400 16px/1 var(--sans); }
.field__unit { position: absolute; right: 12px; font: 400 13px/1 var(--mono); color: var(--ink-3); pointer-events: none; }
.field__hint { font-size: 13px; color: var(--ink-3); margin-top: 4px; line-height: 1.35; }
.preset-none { font: 400 13.5px/1.4 var(--mono); padding: 9px 11px; border: 1px solid var(--rule); border-radius: 3px; background: repeating-linear-gradient(135deg, var(--hatch) 0 1px, transparent 1px 7px); margin-bottom: 14px; }
.tool__panel { background: var(--display); color: var(--display-text); border-radius: 4px; padding: 16px; position: sticky; top: 84px; }
.tool__panel-title { font: 400 12.5px/1 var(--mono); color: var(--amber); margin-bottom: 10px; }
.tool__outputs { display: grid; gap: 8px; }
.tool__panel .readout { background: var(--display-2); }
.readout--idle .readout__value { color: var(--display-dim); }
.readout--live .readout__value { color: var(--amber); }
.tool__status { font: 400 13.5px/1.4 var(--mono); margin-top: 12px; color: var(--display-text-2); }
.tool__panel :focus-visible { outline-color: var(--amber); }
.tool__noscript, .tool__missing { font: 400 14px/1.4 var(--mono); grid-column: 1 / -1; }

.plate-figure { margin-bottom: 26px; }
.plate-figure img { display: block; width: 100%; height: auto; max-height: 340px; object-fit: cover; object-position: 50% 45%; border: 1px solid var(--line); border-radius: 4px; }
.plate-figure figcaption { font: 400 12.5px/1.4 var(--mono); color: var(--ink-3); margin-top: 6px; }

.draft-note { border: 1px solid var(--warn); border-left-width: 5px; border-radius: 3px; padding: 10px 14px; font: 400 13.5px/1.4 var(--mono); background: var(--panel); }

/* Footer */
.foot { background: var(--display); color: var(--display-text-2); margin-top: 26px; padding-block: 38px 26px; }
.foot .brand { color: var(--display-text); }
.foot__top { display: grid; grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr)); gap: 30px 28px; }
.foot__brand p { margin: 14px 0 16px; max-width: 30ch; font: 400 16px/1.45 var(--serif); }
.foot__legend { font: 700 12.5px/1.2 var(--mono); color: var(--amber); margin-bottom: 10px; }
.foot__col li a { display: block; padding: 4px 0; color: var(--display-text-2); text-decoration: none; font-size: 14px; }
.foot__col li a:hover { color: var(--display-text); text-decoration: underline; }
.foot__base { border-top: 1px solid var(--display-line); margin-top: 30px; padding-top: 14px; font-size: 13.5px; }
.foot__base a { color: var(--display-text); }
.foot :focus-visible { outline-color: var(--amber); }

/* Tablet */
@media (max-width: 999px) {
  .reading { grid-template-columns: minmax(0, 1fr); }
  .reading__toc { position: static; }
  .toc { border: 1px solid var(--rule); border-radius: 3px; padding: 6px 12px; background: var(--panel); }
  .toc__list { margin-bottom: 8px; }
  .pagehead__grid { grid-template-columns: minmax(0, 1fr); }
  .faceplate { grid-template-columns: minmax(0, 1fr); }
  .tool { grid-template-columns: minmax(0, 1fr); }
  .tool__panel { position: static; }
  .foot__top { grid-template-columns: 1fr 1fr; }
  .foot__brand { grid-column: 1 / -1; }
  .method-strip { grid-template-columns: minmax(0, 1fr); }
  .rail__path { grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 0; }
  .rail__node { border-top: 1px solid var(--display-line); }
  .rail__rule { grid-template-columns: minmax(0, 1fr); }
  .home-split { grid-template-columns: minmax(0, 1fr); }
}

/* Navigation collapses below desktop. The dock takes over, in thumb reach. */
@media (max-width: 899px) {
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .masthead__row { min-height: 54px; }
  .brand { margin-right: auto; }
  .brand__word { font-size: 18px; }
  .masthead__method, .masthead__search { display: none; }
  .nav { display: none; position: fixed; inset: 0 0 calc(60px + env(safe-area-inset-bottom)) 0; z-index: 44; margin: 0; background: var(--panel); overflow-y: auto; overscroll-behavior: contain; padding: 18px var(--gut) 24px; }
  html:not(.js) .masthead__row { flex-wrap: wrap; }
  html:not(.js) .nav { display: block; position: static; flex-basis: 100%; padding: 0 0 10px; background: none; }
  html:not(.js) .nav__list { flex-direction: row; flex-wrap: wrap; gap: 0 14px; }
  html:not(.js) .nav__sub { display: none !important; }
  .nav__open { display: none; }
  .nav__item--has-sub { display: block; }
  html.nav-open .nav { display: block; }
  html.nav-open body { overflow: hidden; }
  .nav__list { flex-direction: column; }
  .nav__link { padding: 0 2px; font-weight: 700; font-size: 16px; }
  .nav__link[aria-current] { box-shadow: none; text-decoration: underline; text-underline-offset: 4px; }
  .nav__sub, .nav__item--has-sub:hover .nav__sub { display: grid; position: static; min-width: 0; border: 0; padding: 0 0 8px; background: none; }
  .nav__sub a { padding: 9px 2px; }
}

/* Phone */
@media (max-width: 599px) {
  .strip__label, .strip__right { display: none; }
  .strip__ledger { gap: 3px 10px; font-size: 12px; flex-wrap: wrap; white-space: normal; padding-block: 6px; }
  .faceplate { padding: 34px 18px 28px; }
  h1 { font-size: clamp(28px, 8.2vw, 36px); }
  .hostlist { columns: 1; }
  .modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .module a { min-height: 84px; padding: 10px; }
  .module__name { font-size: 15px; }
  .rail__path { grid-template-columns: minmax(0, 1fr); }
  .rail__fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .method-strip__fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot__top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 16px; }
  .prose { font-size: 17px; }
  .next { grid-template-columns: minmax(0, 1fr); }
  .readout__value { font-size: 26px; }

  .data-table--stack, .data-table--stack tbody, .data-table--stack tr, .data-table--stack tbody th, .data-table--stack td { display: block; width: 100%; }
  .data-table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .data-table--stack tr { border: 1px solid var(--rule); border-radius: 3px; margin-bottom: 10px; overflow: hidden; }
  .data-table--stack tr:last-child { margin-bottom: 0; }
  .data-table--stack tbody th { background: var(--panel); border-bottom: 1px solid var(--rule); }
  .data-table--stack td { display: flex; justify-content: space-between; gap: 14px; text-align: right; }
  .data-table--stack td::before { content: attr(data-label); font: 400 12.5px/1.4 var(--mono); color: var(--ink-3); text-align: left; flex: none; max-width: 55%; }
  .data-table--stack tbody tr:last-child > * { border-bottom: 1px solid var(--rule); }
  .data-table--stack tbody tr > *:last-child { border-bottom: 0; }
}

/* ---------- Composition layer ---------- */

@media (prefers-reduced-motion: no-preference) { @view-transition { navigation: auto; } }

.nb { white-space: nowrap; }
.display { font-size: clamp(38px, 6.2vw, 84px); line-height: 1.02; letter-spacing: -.028em; max-width: 19ch; }
.discl { margin-top: 14px; font-size: 13.5px; line-height: 1.45; color: var(--ink-3); max-width: 76ch; }
.discl__label { font: 700 12.5px/1 var(--mono); color: var(--ink-2); margin-right: 6px; }

/* The graduated scale: a silkscreened rule, every 10 and every 50 */
.scale { height: 11px; background:
  repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 50px) 0 0 / 100% 11px no-repeat,
  repeating-linear-gradient(90deg, var(--rule) 0 1px, transparent 1px 10px) 0 0 / 100% 6px no-repeat; border-top: 1px solid var(--line); }
.scale--plate { margin-block: clamp(16px, 2.4vw, 28px); }
.pagehead { border-bottom: 0; padding-bottom: 0; }
.pagehead__grid { margin-bottom: clamp(18px, 2.6vw, 28px); }

/* Reading progress on the header rule, where the browser supports scroll timelines */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .masthead::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--amber); transform-origin: 0 50%; animation: gsb-progress linear both; animation-timeline: scroll(root); }
    @keyframes gsb-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  }
}

/* Masthead search */
.masthead__search { display: inline-flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 10px 0 13px; background: var(--paper); border: 1px solid var(--line); border-radius: 3px; cursor: pointer; font: 400 14px/1 var(--sans); color: var(--ink-2); }
.masthead__search:hover { color: var(--ink); }
.masthead__search[hidden], .dock [hidden] { display: none; }
kbd { font: 400 12px/1 var(--mono); padding: 3px 6px; border: 1px solid var(--rule); border-radius: 2px; color: var(--ink-3); }
.nav { margin-left: auto; }

/* Home faceplate */
.faceplate--home { display: block; padding: clamp(30px, 4.6vw, 60px); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(22px, 3.6vw, 52px); align-items: start; }
.hero__copy .lede { margin-top: 0; }
.faceplate--home .rack { margin-top: clamp(20px, 2.6vw, 30px); }

/* Sweep: the scope is scanning and finding nothing */
.scope__sweep { position: absolute; top: 50%; left: 0; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: #fff3d6; box-shadow: 0 0 10px 3px rgba(255, 179, 64, .75); opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .scope__sweep { animation: gsb-sweep 5.5s linear infinite; }
  @keyframes gsb-sweep { 0% { left: 0; opacity: 0; } 4% { opacity: 1; } 96% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
}

/* One bank, one flag */
.rack { background: var(--display); color: var(--display-text); border-radius: 4px; padding: 12px; }
.rack__head, .console__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 2px 2px 10px; }
.rack__title, .console__title { font: 700 13px/1.2 var(--mono); letter-spacing: .03em; color: var(--display-text); }
.rack__flag { flex: none; background: var(--amber); color: var(--amber-ink); font: 700 12.5px/1 var(--mono); padding: 5px 8px; border-radius: 2px; white-space: nowrap; }
.rack__cells { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--display-line); border: 1px solid var(--display-line); border-radius: 2px; overflow: hidden; }
.readout--cell { background: var(--display); border-radius: 0; box-shadow: none; padding: 10px 12px 12px; }
.readout--cell .readout__value { font-size: 24px; margin-top: 8px; }
.rack__link { display: inline-block; margin-top: 9px; font-size: 13.5px; color: var(--display-text-2); padding-block: 3px; }
.rack :focus-visible, .console :focus-visible { outline-color: var(--amber); }

/* Benchmark console */
.console { background: var(--display); color: var(--display-text); border-radius: 5px; padding: clamp(12px, 1.6vw, 18px); }
.console__body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 14px; align-items: stretch; }
.console__scope .scope { aspect-ratio: auto; height: 100%; min-height: 176px; box-shadow: inset 0 0 0 1px var(--display-line); }
.console__body .rack__cells { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.console__foot { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px 22px; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--display-line); }
.console__rule { font-weight: 700; font-size: 14.5px; }
.console__fields { display: flex; flex-wrap: wrap; gap: 4px 18px; font: 400 13px/1.3 var(--mono); color: var(--display-text-2); }
.console__more { margin-top: 10px; border-top: 1px solid var(--display-line); padding-top: 4px; }
.console__more summary { cursor: pointer; font: 400 13.5px/1.3 var(--mono); color: var(--display-text-2); padding: 9px 0; }
.console__sheet { background: var(--plate); color: var(--ink); border-radius: 3px; padding: 14px; display: grid; gap: 18px; margin: 4px 0 6px; }

/* Published facts plate */
.review-top { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 22px; align-items: start; }
.spec { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 14px 18px 12px; }
.spec__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.spec__title { font: 700 13px/1.2 var(--mono); letter-spacing: .03em; }
.spec__head a { font-size: 13.5px; padding-block: 3px; }
.spec__rows { margin-top: 8px; }
.spec__rows div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-top: 1px solid var(--rule); font-size: 14.5px; line-height: 1.4; }
.spec__rows dt { font: 400 12.5px/1.5 var(--mono); color: var(--ink-3); }
.spec__note { font: 400 12.5px/1.4 var(--mono); color: var(--ink-3); border-top: 1px solid var(--rule); padding-top: 8px; }
.review-top .rack__cells { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Game modules, in two tiers */
.tier + .tier { margin-top: 22px; }
@media (min-width: 900px) { .tier .modules { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.prose :not(pre) > code { display: inline-block; max-width: 100%; overflow-wrap: anywhere; line-height: 1.3; }
.tier__label { font: 400 13px/1.3 var(--mono); color: var(--ink-3); margin-bottom: 10px; }
.module a { position: relative; gap: 12px; }
.module__note { font-size: 13.5px; color: var(--ink-2); margin-top: -6px; flex: 1; }
.module a:hover { background: var(--paper); }
.module a:hover .module__name { text-decoration: underline; text-underline-offset: 3px; }

/* Host directory */
.ledger__bar { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 12px; }
.ledger__title { font: 700 clamp(20px, 2.2vw, 26px)/1.2 var(--sans); letter-spacing: -.01em; }
.ledger__sub { font: 400 13px/1.3 var(--mono); color: var(--ink-3); }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.chips[hidden] { display: none; }
.chips__label { font: 400 12.5px/1 var(--mono); color: var(--ink-3); margin-right: 4px; }
.chip { min-height: 36px; padding: 0 12px; background: transparent; border: 1px solid var(--line); border-radius: 18px; font: 400 14px/1 var(--sans); color: var(--ink); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--plate); }
.data-table--ledger tbody th a { color: var(--ink); text-decoration-thickness: 1px; }
.data-table--ledger tr[hidden] { display: none; }
.data-table--versus thead a { color: var(--ink); }

/* Guides index */
.index { columns: 2 430px; column-gap: 26px; }
.index__group { break-inside: avoid; border-top: 2px solid var(--line); padding: 10px 0 20px; }
.index__title { font: 700 18px/1.25 var(--sans); margin-bottom: 4px; }
.index__title a { color: var(--ink); }
.index__list li { border-bottom: 1px solid var(--rule); }
.index__list li:last-child { border-bottom: 0; }
.index__list a { display: block; padding: 9px 0; color: var(--ink); text-decoration: none; font-size: 15px; line-height: 1.35; }
.index__list a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Tool tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 12px; }
.tile a { display: flex; flex-direction: column; height: 100%; padding: 16px; background: var(--display); color: var(--display-text); border-radius: 4px; text-decoration: none; }
.tile__readout { font: 700 26px/1 var(--sans); color: var(--display-dim); letter-spacing: .04em; }
.tile a:hover .tile__readout { color: var(--amber); }
.tile__name { font: 700 18px/1.25 var(--sans); margin-top: 16px; }
.tile__desc { font-size: 14px; line-height: 1.45; color: var(--display-text-2); margin-top: 8px; }
.tile a:focus-visible { outline-color: var(--amber); }

.rail--flush { margin-top: 0; }

/* Three-column reading */
.reading { grid-template-columns: 200px minmax(0, 1fr) 248px; gap: clamp(22px, 2.8vw, 38px); }
.reading--no-toc { grid-template-columns: minmax(0, 1fr) 248px; }
.reading--no-rail { grid-template-columns: 200px minmax(0, 1fr); }
.reading--no-toc.reading--no-rail { grid-template-columns: minmax(0, 860px); }
.reading__rail { display: grid; gap: 14px; align-content: start; min-width: 0; }
.railbox { border-top: 2px solid var(--line); padding-top: 8px; }
.railbox__legend { font: 700 12.5px/1.3 var(--mono); letter-spacing: .03em; margin-bottom: 4px; }
.railbox__list li { border-bottom: 1px solid var(--rule); }
.railbox__list li:last-child { border-bottom: 0; }
.railbox__list a { display: block; padding: 7px 0; color: var(--ink); text-decoration: none; font-size: 14px; line-height: 1.35; }
.railbox__list a:hover { text-decoration: underline; text-underline-offset: 3px; }
.railbox__note { font-size: 12.5px; line-height: 1.4; color: var(--ink-3); margin-top: 5px; }
.reading__rail .next { grid-template-columns: minmax(0, 1fr); border-top-width: 2px; padding-top: 8px; }
.reading__rail .next__why { font-size: 14px; line-height: 1.4; }
.reading__rail .next__link { font-size: 14px; }

/* Keep long pre lines inside the column */
.prose pre { max-width: 100%; }

/* Search palette */
.palette { width: min(620px, calc(100vw - 24px)); margin: 10vh auto auto; padding: 0; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 5px; }
.palette::backdrop { background: rgba(10, 11, 7, .62); }
.palette__bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.palette__input { flex: 1; min-width: 0; height: 42px; background: transparent; border: 0; font: 400 18px/1 var(--sans); color: var(--ink); }
.palette__input:focus { outline: 0; }
.palette__list { max-height: min(52vh, 460px); overflow-y: auto; padding: 6px; }
.palette__list a { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 10px; color: var(--ink); text-decoration: none; border-radius: 3px; }
.palette__list [aria-selected="true"] a { background: var(--display); color: var(--display-text); }
.palette__list [aria-selected="true"] .palette__tag { color: var(--amber); }
.palette__name { font-size: 15.5px; line-height: 1.3; }
.palette__tag { flex: none; font: 400 12.5px/1 var(--mono); color: var(--ink-3); }
.palette__none { padding: 14px 10px; color: var(--ink-2); }
.palette__hint { font: 400 12.5px/1 var(--mono); color: var(--ink-3); padding: 10px 14px; border-top: 1px solid var(--rule); }

/* Thumb dock */
.dock { display: none; }
.tool-dock { display: none; }
@media (max-width: 899px) {
  .masthead__search { display: none; }
  .dock { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: var(--display); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--display-line); }
  .dock a, .dock button { display: flex; align-items: center; justify-content: center; height: 59px; background: none; border: 0; color: var(--display-text); text-decoration: none; font: 700 13.5px/1 var(--sans); cursor: pointer; }
  .dock [hidden] { display: none; }
  .dock__method { color: var(--amber-ink) !important; background: var(--amber) !important; }
  .dock :focus-visible { outline-color: var(--amber); outline-offset: -3px; }
  .tool-dock:not([hidden]) { display: flex; justify-content: space-between; align-items: center; gap: 12px; position: fixed; left: 10px; right: 10px; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 43; min-height: 50px; padding: 0 14px; background: var(--display-2); color: var(--display-text); border: 1px solid var(--amber); border-radius: 4px; cursor: pointer; font: inherit; }
  .tool-dock__name { font: 400 13px/1.2 var(--mono); text-align: left; }
  .tool-dock__value { font: 700 18px/1 var(--sans); color: var(--amber); white-space: nowrap; }
}

@media (max-width: 1179px) {
  .reading { grid-template-columns: 200px minmax(0, 1fr); }
  .reading__rail { grid-column: 2; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
  .reading--no-toc { grid-template-columns: minmax(0, 1fr); }
  .reading--no-toc .reading__rail { grid-column: 1; }
}
@media (max-width: 999px) {
  .reading, .reading--no-rail { grid-template-columns: minmax(0, 1fr); }
  .reading__rail { grid-column: 1; }
  .hero__grid, .review-top, .console__body { grid-template-columns: minmax(0, 1fr); }
  .console__foot { grid-template-columns: minmax(0, 1fr); }
  .console__scope .scope { width: 100%; height: 140px; min-height: 0; aspect-ratio: auto; }
  .display { max-width: none; }
}
@media (max-width: 599px) {
  .faceplate--home { padding: 34px 16px 18px; }
  .display { font-size: clamp(34px, 10.6vw, 44px); }
  .rack__cells { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec__rows div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .index { columns: 1; }
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .module__note { font-size: 13px; }
  .palette { margin-top: 8px; }
  .scale { background:
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 50px) 0 0 / 100% 11px no-repeat,
    repeating-linear-gradient(90deg, var(--rule) 0 1px, transparent 1px 10px) 0 0 / 100% 6px no-repeat; }
}

/* ---------- Instrument interactions ---------- */

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Controls that need script are shown by the head script's class, before first paint, so nothing shifts */
html:not(.js) .masthead__search, html:not(.js) .strip__lamp, html:not(.js) .dock .dock__js, html:not(.js) .chips, html:not(.js) .clock, html:not(.js) .ledger__pick, html:not(.js) .ledger__hint, html:not(.js) .tool__share, html:not(.js) .chan__key, html:not(.js) .console__note { display: none; }
html:not(.js) .strip__count { pointer-events: none; }

/* Ledger strip */
.strip__ledger { align-items: center; }
.strip__count { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 4px 2px; font: inherit; color: var(--display-text-2); cursor: pointer; }
.strip__count:hover { color: var(--display-text); }
.strip__count b { color: var(--amber); font-weight: 700; }
.strip__count .lamp__dot { box-shadow: inset 0 0 0 1.5px var(--display-dim); }
.lamp__dot--measured { background: transparent; }
.lamp__dot--source { box-shadow: inset 0 0 0 1.5px #86cde0 !important; }
.lamp__dot--awaiting { background: var(--amber); box-shadow: none !important; }
.strip__lamp { display: inline-flex; align-items: center; gap: 7px; }
.strip__bulb { width: 9px; height: 9px; border-radius: 50%; background: var(--display-line); }
.strip__lamp[aria-pressed="true"] .strip__bulb { background: var(--amber); box-shadow: 0 0 7px 2px rgba(255, 179, 64, .6); }

/* Hardware */
.screw { width: 16px; height: 16px; background: radial-gradient(circle at 35% 30%, var(--panel), var(--rule)); box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 rgba(255, 255, 255, .25); }
.screw::after { left: 2px; right: 2px; top: 7px; height: 2px; }
.faceplate, .spec { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07); }

/* Tiers no longer repeat the same lamp on every card */
.module__note { flex: 1; margin-top: -4px; }
.module a { min-height: 86px; }
.tier--held .module a { background: repeating-linear-gradient(135deg, var(--hatch) 0 1px, transparent 1px 7px), var(--panel); border-top: 3px solid var(--line); }
.tier--held .module__note { color: var(--ink-3); }

/* Sticker folds on phones, and can expire */
.sticker__fold > summary { list-style: none; cursor: default; }
.sticker__fold > summary::-webkit-details-marker { display: none; }
.sticker__fold[open] > summary { pointer-events: none; }
.sticker__due { margin-top: 7px; font: 700 12.5px/1.3 var(--mono); color: var(--warn); }
.sticker--lapsed { outline: 2px solid var(--amber); outline-offset: 1px; }

/* Console channels */
.chan { position: relative; display: grid; background: var(--display); }
.chan__key { position: absolute; inset: 0; background: none; border: 0; cursor: pointer; }
.chan__key:hover { background: rgba(255, 179, 64, .06); }
.chan__key[aria-pressed="true"] { box-shadow: inset 0 -2px 0 var(--amber); background: rgba(255, 179, 64, .08); }
.chan__key:focus-visible { outline-offset: -3px; }
.console__note { margin-top: 10px; min-height: 1.4em; font-size: 14px; line-height: 1.4; color: var(--display-text-2); }
.console__note a { color: var(--amber); margin-left: 4px; }

/* Evidence tables use the whole sheet */
.prose .table-wrap--evidence { margin-inline: calc(-1 * clamp(18px, 3.5vw, 40px)); padding-inline: clamp(10px, 1.6vw, 18px); background: var(--paper); }
.data-table--evidence { font-size: 14px; }
@media (min-width: 600px) { .data-table--evidence tbody th { position: sticky; left: 0; background: var(--paper); } }
.data-table td.unk { background: repeating-linear-gradient(135deg, var(--hatch) 0 1px, transparent 1px 9px); color: var(--ink-3); font-size: 13.5px; }

/* Refund windows on one shared scale, unknown ones hatched */
.refund { display: block; height: 7px; margin: 3px 0 7px; max-width: 170px; border: 1px solid var(--line); border-radius: 1px; }
.refund > span { display: block; height: 100%; background: var(--ink); }
.refund--unknown { background: repeating-linear-gradient(135deg, var(--hatch) 0 1px, transparent 1px 5px); border-color: var(--rule); }
.refund__clock { display: block; font: 400 13px/1.4 var(--sans); color: var(--ink-3); margin-top: 4px; }
.scope__top { font: 400 12.5px/1 var(--sans); color: var(--display-text-2); }
.clock { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 12px; }
.clock label { font-size: 14px; font-weight: 700; }
.clock input { min-height: 40px; padding: 0 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 3px; font: 400 14.5px/1 var(--sans); color: var(--ink); }
.clock__note { font-size: 13px; color: var(--ink-3); }
.spec .clock { border-top: 1px solid var(--rule); padding-top: 10px; margin: 0 0 8px; }

/* Compare picker */
.ledger__pick { display: inline-flex; vertical-align: -4px; margin-right: 9px; }
.ledger__pick input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
.ledger__hint { font: 400 13px/1.4 var(--mono); color: var(--ink-3); margin-top: 8px; }
.compare { background: var(--display); color: var(--display-text); border-radius: 4px; padding: 14px 16px; margin-bottom: 14px; overflow-x: auto; }
.compare__title { font: 400 13px/1.3 var(--mono); color: var(--amber); margin-bottom: 8px; }
.compare__table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.4; }
.compare__table th, .compare__table td { padding: 8px 10px; border-bottom: 1px solid var(--display-line); text-align: left; vertical-align: top; }
.compare__table thead th { font-weight: 700; }
.compare__table thead a { color: var(--amber); }
.compare__table tbody th { color: var(--display-text-2); font: 400 12.5px/1.4 var(--mono); }
.compare :focus-visible { outline-color: var(--amber); }

/* Guide index */
.chips { margin-bottom: 14px; }
.index__list li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.index__list li[hidden], .index__group[hidden], .data-table--ledger tr[hidden] { display: none; }
.index__list a { flex: 1; }
.index__game { flex: none; font: 400 12.5px/1 var(--mono); color: var(--ink-3); }

/* Rail */
.railbox__list li { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.railbox__list li > a:first-child { flex: 1; }
.railbox__buy { flex: none; font: 400 12.5px/1 var(--mono); color: var(--link) !important; padding: 6px 0 !important; }
@media (min-width: 1180px) { .reading__rail { position: sticky; top: 84px; max-height: calc(100vh - 96px); overflow-y: auto; scrollbar-width: thin; } }

/* Scope plotting the reader's own numbers */
.scope--plot { margin-bottom: 8px; }
.trace { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.trace--rent { stroke: #2d9cc4; }
.trace--vps { stroke: #6ea52e; }
.trace--home { stroke: #cf8c22; }
.scope__flag[hidden] { display: none; }
.plot-key { display: flex; gap: 14px; margin: 0 0 10px; font: 400 12.5px/1 var(--mono); color: var(--display-text-2); }
.plot-key li { display: inline-flex; align-items: center; gap: 6px; }
.plot-key li::before { content: ""; width: 16px; height: 2px; background: currentColor; }
.plot-key--rent::before { background: #2d9cc4 !important; }
.plot-key--vps::before { background: #6ea52e !important; }
.plot-key--home::before { background: #cf8c22 !important; }

/* Published figures as named brackets */
.spread { margin-top: 12px; border-top: 1px solid var(--display-line); padding-top: 10px; }
.spread[hidden] { display: none; }
.spread__title { font: 400 12.5px/1.4 var(--mono); color: var(--amber); margin-bottom: 10px; }
.spread__row { display: grid; grid-template-columns: minmax(0, 104px) minmax(0, 1fr) 64px; align-items: center; gap: 8px; min-height: 24px; }
.spread__name { font-size: 13px; color: var(--display-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spread__track { position: relative; display: block; height: 18px; border-left: 1px solid var(--display-line); }
.spread__bracket { position: absolute; top: 4px; height: 10px; min-width: 3px; border: 1.5px solid var(--display-text); border-bottom: 0; }
.spread__bracket--loose { border-color: var(--display-dim); }
.spread__plan { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 1.5px solid var(--amber); }
.spread__val { font-size: 12.5px; color: var(--display-text); text-align: right; white-space: nowrap; }
.spread__scale { position: relative; height: 18px; margin: 4px 72px 0 112px; border-top: 1px solid var(--display-line); }
.spread__tick { position: absolute; top: 3px; transform: translateX(-50%); font-size: 11.5px; color: var(--display-dim); }

.tool__share { margin-top: 10px; min-height: 40px; padding: 0 10px; background: none; border: 1px solid var(--display-line); border-radius: 3px; color: var(--display-text-2); font: 400 13px/1 var(--mono); cursor: pointer; }
.tool__share:hover { color: var(--amber); border-color: var(--amber); }

/* Palette */
.palette__input::placeholder { color: var(--ink-3); opacity: 1; }
.palette__scope { font: 400 13px/1 var(--mono); padding: 10px 14px 0; color: var(--ink-3); }
.palette__scope[hidden] { display: none; }
.palette__list [role="option"] { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 10px; border-radius: 3px; cursor: pointer; }
.palette__list [aria-selected="true"] { background: var(--display); color: var(--display-text); }

/* Touch targets */
@media (max-width: 899px) {
  .crumbs a, .sources__list a, .sticker__link, .spec__head a, .rack__link, .discl a { display: inline-block; padding-block: 6px; }
  .foot__col li a { padding: 9px 0; }
  .ledger__pick input, .field--check input { width: 24px; height: 24px; }
  .chip { min-height: 40px; }
}

/* Phones: the instrument straight after the headline, the sticker folded to its status */
@media (max-width: 999px) { .hero__instrument { order: -1; } }
@media (max-width: 599px) {
  .sticker__fold > summary { cursor: pointer; pointer-events: auto; display: flex; justify-content: space-between; align-items: center; }
  .sticker__fold > summary::after { content: "Details"; font: 400 12.5px/1 var(--mono); color: var(--link); }
  .sticker__fold[open] > summary::after { content: "Hide"; }
  .sticker__fold[open] > summary { pointer-events: auto; }
  .spread__row { grid-template-columns: minmax(0, 76px) minmax(0, 1fr) 68px; }
  .spread__scale { margin: 4px 76px 0 84px; }
  .console__fields { font-size: 12.5px; }
}

@media print {
  .strip, .masthead, .foot, .toc, .preview-note, .key, .dock, .tool-dock, .reading__rail { display: none !important; }
  body { background: #fff; }
}
