/* ═══════════════════════════════════════════════════════════════════════════
   CERBERUS // PUBLIC TERMINAL — page styles.

   The system is the one in src/tokens.json: black canvas, P1 phosphor, IBM blue,
   VT323 for display, IBM Plex Mono for everything that has to be read, a 13px
   terminal base rather than a 16px web base.

   Two treatments, not one inverted twice. Dark is a phosphor tube: additive
   glow, scanlines, content sitting in panes cut out of the black. Light is a
   blueprint: ink on a gridded sheet, ruled frames, no scanlines, no glow — a
   CRT rendered on white paper reads as a printing fault, not as a monitor.

   Contrast was measured, not assumed. Every colour used for text clears 4.5:1
   against the worst case its pane can composite to; the numbers are recorded
   beside each token.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Fonts ─────────────────────────────────────────────────────────────────
   Local subsets, swap so the first paint is never blocked on a face. */

@font-face {
  font-family: "VT323";
  src: url("fonts/vt323-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/plex-mono-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ── Tokens ───────────────────────────────────────────────────────────────── */

:root {
  color-scheme: dark;

  --bg:        #000000;
  --bg-soft:   #050906;

  /* Text. Every ratio below is the WORST case, measured not assumed: the 0.93
     pane scrim over the brightest colour the scene can emit (#7dffa8), with the
     scanline grille composited on top. On plain black each is ~15% higher. */
  --ink:       #d3ecdb;   /* body, lede           12.71:1 */
  --ink-2:     #94b8a2;   /* meta, captions        7.39:1 — the dimmest text shipped */

  --acc:       #00ff66;   /* links, figures       11.73:1 */
  --acc-dim:   #00a846;   /* kickers, years        5.19:1 — the phosphor floor */
  --acc-dark:  #003b16;   /* 1.6:1 — FILLS ONLY, never text */
  --acc-bright:#7dffa8;
  --blue:      #4589ff;   /* numeric heads, axis   4.88:1 */
  --warn:      #ffb000;   /* focus ring            8.75:1 */

  --rule:      #123a20;
  --rule-soft: #0c2415;
  --track:     #062112;

  --pane:      rgb(0 0 0 / 93%);
  --pane-edge: var(--acc-dim);
  --chrome:    rgb(0 0 0 / 94%);
  --sel:       #071b0f;
  --focus:     #ffb000;
  --rail-ink:  #2f5f8f;

  --grid-a:    transparent;
  --grid-b:    transparent;

  --font-mono: "IBM Plex Mono", "Berkeley Mono", Menlo, "Courier New", monospace;
  --font-disp: "VT323", "IBM Plex Mono", monospace;

  --t-2xs: 10px;
  --t-xs:  11px;
  --t-sm:  12px;
  --t-base: 13px;

  --rail: 5.5rem;
  --gutter: clamp(1.15rem, 3.5vw, 3rem);
  --pad: clamp(1.5rem, 3.4vw, 3rem);
  --chrome-h: 3.25rem;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;

    --bg:        #eef2f7;
    --bg-soft:   #e7edf6;

    --ink:       #0b1a2b;   /* 15.6:1 on the sheet */
    --ink-2:     #3c5068;   /*  7.4:1 on the sheet */

    --acc:       #002d9c;   /* 10.1:1 — links, kickers, figures */
    --acc-dim:   #0f62fe;   /*  4.5:1 — rules, fills, large type only */
    --acc-dark:  #b6c6dc;
    --acc-bright:#002d9c;
    --blue:      #002d9c;
    --warn:      #7a5c00;   /*  5.6:1 */

    --rule:      #b6c6dc;
    --rule-soft: #d3ddea;
    --track:     #dbe3ee;

    --pane:      rgb(248 250 253 / 94%);
    --pane-edge: #0f62fe;
    --chrome:    rgb(238 242 247 / 96%);
    --sel:       #dfe8f8;
    --focus:     #002d9c;
    --rail-ink:  #7d93b3;

    /* Blueprint ruling: a 24px field with a 120px major division. */
    --grid-a:    rgb(15 98 254 / 7%);
    --grid-b:    rgb(15 98 254 / 13%);
  }
}

/* ── Reset & base ─────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--chrome-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-mono);
  font-size: var(--t-base);
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-b) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-b) 1px, transparent 1px),
    linear-gradient(var(--grid-a) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-a) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, p, ul, ol, dl, dd, figure, table { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: var(--acc); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.25em; }

strong { font-weight: 700; color: var(--ink); }

:where(a, button, [tabindex], summary):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.tablewrap:focus-visible, .systems__panel:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

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

.skip {
  position: fixed;
  top: 0.5rem; left: 0.5rem;
  z-index: 200;
  transform: translateY(-200%);
  padding: 0.6rem 1rem;
  background: var(--bg);
  color: var(--acc);
  border: 1px solid var(--acc);
  font-size: var(--t-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.skip:focus { transform: none; }

/* ── Scene layer ──────────────────────────────────────────────────────────── */

.scene {
  position: fixed;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  display: block;
  pointer-events: none;
}

/* Aperture grille, kept faint. Measured: it costs the body colour about 6% of
   its luminance, which leaves every token above its target ratio. */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgb(0 0 0 / 26%) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}

@media (prefers-color-scheme: light) { .scanlines { display: none; } }
/* Two ways to end up without a scene: this page decided not to start one, or
   src/main.mjs started one and gave up. `no-webgl` is the class it sets on
   <html> in that case; both paths must leave a complete document behind. */
[data-mode="plain"] .scene,
[data-mode="plain"] .scanlines,
.no-webgl .scene,
.no-webgl .scanlines { display: none; }

/* ── Chrome (header) ──────────────────────────────────────────────────────── */

.chrome {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--chrome-h);
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 2vw, 2rem);
  padding-inline: var(--gutter);
  background: var(--chrome);
  border-bottom: 1px solid var(--rule);
  font-size: var(--t-xs);
}

.chrome__brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4em;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
.chrome__brand:hover { text-decoration: none; }
.chrome__mark { font-weight: 700; color: var(--acc); }
.chrome__slash { color: var(--acc-dim); }
.chrome__sub { color: var(--ink-2); }

.chrome__nav { margin-inline-start: auto; }
.chrome__nav ul { display: flex; gap: 0.15rem; }
.chrome__nav a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45em;
  padding: 0.3rem 0.55rem;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  border-bottom: 2px solid transparent;
}
.chrome__nav a:hover { color: var(--ink); text-decoration: none; }
.chrome__nav a i { font-style: normal; font-size: var(--t-2xs); color: var(--acc-dim); }
.chrome__nav a[aria-current="true"] {
  color: var(--acc);
  border-bottom-color: var(--acc);
}
.chrome__nav a[aria-current="true"] i { color: var(--acc); }

.chrome__telemetry {
  font-size: var(--t-2xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.chrome__toggle {
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--acc-dim);
  color: var(--acc);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: var(--t-2xs);
  white-space: nowrap;
}
.chrome__toggle:hover { background: var(--sel); text-decoration: none; }

/* ── Rail ─────────────────────────────────────────────────────────────────── */

.rail {
  position: fixed;
  left: 0; top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  align-items: center;
  padding-block: 1rem;
  font-size: var(--t-2xs);
  letter-spacing: 0.14em;
  color: var(--rail-ink);
  border-inline-end: 1px solid var(--rule-soft);
}
.rail__tick { position: relative; transition: color 0.25s linear; }
.rail__tick[data-active] { color: var(--acc); }
.rail__tick[data-active]::before {
  content: "";
  position: absolute;
  left: -1.6rem; top: 50%;
  width: 1.25rem; height: 1px;
  background: currentColor;
}

/* ── Sections ─────────────────────────────────────────────────────────────── */

main { position: relative; z-index: 10; }
main:focus { outline: none; }

.sec {
  padding-block: clamp(6rem, 14vh, 11rem);
  padding-inline: var(--gutter) var(--gutter);
  padding-inline-start: calc(var(--rail) + var(--gutter));
  min-height: 100vh;
  display: flex;
  align-items: center;
}
.sec--intro { padding-block-start: calc(var(--chrome-h) + 5vh); }

/* The measure is set on the pane, not on the paragraphs inside it, and it is set
   in `ch` plus the padding it will lose. A max-width of 70ch on a pane with 3rem
   of padding is a 58ch measure, which in a monospace face is a stack of short
   choppy lines — the first draft of this page made exactly that mistake. */
.pane {
  position: relative;
  width: 100%;
  max-width: calc(76ch + 2 * var(--pad));
  padding: var(--pad);
  background: var(--pane);
  border-inline-start: 2px solid var(--pane-edge);
  border-block-start: 1px solid var(--rule);
  border-block-end: 1px solid var(--rule);
}
.pane--wide { max-width: calc(102ch + 2 * var(--pad)); }

@media (prefers-color-scheme: light) {
  .pane {
    border: 1px solid var(--rule);
    border-inline-start: 2px solid var(--pane-edge);
    background-color: var(--pane);
    background-image:
      linear-gradient(var(--grid-a) 1px, transparent 1px),
      linear-gradient(90deg, var(--grid-a) 1px, transparent 1px);
    background-size: 24px 24px;
  }
}

/* Corner registration mark: a drawing frame, not a rounded card. IBM blue is
   the instrument colour throughout — rails, axes, registration, numeric column
   heads — so the phosphor stays reserved for the account's own figures. */
.pane::after {
  content: "";
  position: absolute;
  inset-block-start: -1px;
  inset-inline-end: -1px;
  width: 1.1rem; height: 1.1rem;
  border-block-start: 1px solid var(--blue);
  border-inline-end: 1px solid var(--blue);
}

/* ── Typography ───────────────────────────────────────────────────────────── */

.kicker {
  display: flex;
  align-items: center;
  gap: 0.7em;
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--acc-dim);
  margin-block-end: clamp(1.25rem, 3vw, 2.25rem);
}
.kicker__idx {
  font-family: var(--font-disp);
  font-size: 1.35rem;
  line-height: 1;
  padding: 0.05em 0.35em 0;
  color: var(--acc);
  border: 1px solid var(--rule);
  background: var(--sel);
}

.display {
  font-family: var(--font-disp);
  font-weight: 400;
  font-size: clamp(2.9rem, 7.6vw, 5.6rem);
  line-height: 0.86;
  letter-spacing: 0.005em;
  color: var(--acc);
  margin-block-end: 1.15rem;
}
.display--sm {
  font-size: clamp(2.2rem, 5.2vw, 3.5rem);
  line-height: 0.92;
  margin-block-end: 1.5rem;
}

.role {
  font-size: var(--t-sm);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--ink);
  padding-block-end: 1.75rem;
  border-block-end: 1px solid var(--rule);
  margin-block-end: 1.75rem;
}
.role .sep { color: var(--acc-dim); padding-inline: 0.35em; }

.lede {
  font-size: 14px;
  line-height: 1.9;
  max-width: 70ch;
  color: var(--ink);
}

.prose {
  font-size: var(--t-base);
  line-height: 1.9;
  max-width: 76ch;
  color: var(--ink);
  margin-block-end: 1.6rem;
}
.prose--tight { color: var(--ink-2); }
.prose--tight strong { color: var(--acc); }

.sub {
  font-family: var(--font-disp);
  font-weight: 400;
  font-size: 2rem;
  line-height: 1;
  color: var(--acc);
  margin-block: 3rem 1.25rem;
}

.code {
  font-size: var(--t-sm);
  color: var(--acc);
  background: var(--sel);
  border: 1px solid var(--rule);
  padding: 0.05em 0.4em;
  white-space: nowrap;
}
code { font-family: inherit; color: var(--acc); font-size: var(--t-sm); }

.note {
  font-size: var(--t-xs);
  line-height: 1.8;
  color: var(--ink-2);
  max-width: 58ch;
}
.note--scroll {
  margin-block-start: 2.25rem;
  padding-inline-start: 1rem;
  border-inline-start: 1px solid var(--rule);
}

.fail {
  position: fixed;
  inset-block-end: 0; inset-inline: 0;
  z-index: 150;
  margin: 0;
  padding: 0.75rem var(--gutter);
  background: #1a0008;
  border-block-start: 1px solid #ff3366;
  color: #ff8fa8;
  font-size: var(--t-xs);
}

/* ── Intro links ──────────────────────────────────────────────────────────── */

.links {
  margin-block-start: 2.25rem;
  border-block-start: 1px solid var(--rule);
}
.links a {
  display: grid;
  grid-template-columns: 10ch 1fr;
  gap: 1rem;
  align-items: baseline;
  padding: 0.7rem 0;
  border-block-end: 1px solid var(--rule-soft);
  color: var(--ink);
}
.links a:hover { text-decoration: none; background: var(--sel); }
.links a:hover .links__v { text-decoration: underline; text-underline-offset: 0.25em; }
.links__k {
  font-size: var(--t-2xs);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--ink-2);
}
.links__v { font-size: var(--t-sm); color: var(--acc); overflow-wrap: anywhere; }

/* ── Ledger (key figures) ─────────────────────────────────────────────────── */

.ledger {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1px;
  margin-block: 2rem;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.ledger > div {
  background: var(--bg);
  padding: 0.9rem 1rem 1rem;
}
@media (prefers-color-scheme: light) { .ledger > div { background: var(--pane); } }
.ledger dt {
  font-size: var(--t-2xs);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--ink-2);
}
.ledger dd {
  font-family: var(--font-disp);
  font-size: 2.4rem;
  line-height: 1.05;
  color: var(--acc);
  font-variant-numeric: tabular-nums;
}
.ledger dd small {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--t-2xs);
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: var(--ink-2);
}

/* ── Tables ───────────────────────────────────────────────────────────────── */

.tablewrap {
  overflow-x: auto;
  /* Makes the wrapper a query container so the caption can size against the
     column it actually sits in, not the viewport. Deriving it from 100vw was
     still ~20px too wide, because the content panel is narrower than the window. */
  container-type: inline-size;
  margin-block: 2rem 0;
  border-block-start: 1px solid var(--rule);
}
.data {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t-sm);
  font-variant-numeric: tabular-nums;
}
.data caption {
  text-align: start;
  font-size: var(--t-xs);
  line-height: 1.75;
  padding-block: 1rem 1.25rem;
  color: var(--ink-2);
  /* A caption box is as wide as its table, and the rig table is deliberately
     wider than a phone. Without this cap the caption is dragged off the right
     edge of its own scroll container and half of it is unreadable until you
     scroll a table you have not read yet. */
  /* `width`, not `max-width`: a table-caption box sizes from the table, and
     several engines ignore max-width on it entirely — which is why this caption
     was still being cut mid-word at 390px. */
  width: min(62ch, 100cqw);
  box-sizing: border-box;
}
.data caption .cap-note { display: block; color: var(--ink-2); }
.data th, .data td {
  text-align: start;
  padding: 0.5rem 0.9rem 0.5rem 0;
  white-space: nowrap;
}
.data thead th {
  font-size: var(--t-2xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--ink-2);
  border-block-end: 1px solid var(--acc-dim);
  padding-block-end: 0.6rem;
}
.data thead th.num { color: var(--blue); }
.data tbody td { border-block-end: 1px solid var(--rule-soft); color: var(--ink); }
.data tbody th {
  border-block-end: 1px solid var(--rule-soft);
  font-weight: 400;
  color: var(--ink);
}
/* Right-aligned columns previously had padding-inline-end: 0 AND inherited a zero
   inline-start padding, so adjacent numeric headers butted together and read as one
   word: "CONTRIBUTIONSACTIVE DAYSPEAK DAY". The gutter has to live on the leading
   edge for end-aligned cells. */
.data .num { text-align: end; padding-inline: 1.5rem 0; }
.data th.num { text-align: end; }
.data tbody tr:hover td, .data tbody tr:hover th { background: var(--sel); }
.data tbody th .u-part {
  font-size: var(--t-2xs);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.data .lang-swatch {
  display: inline-block;
  width: 0.6em; height: 0.6em;
  margin-inline-end: 0.6em;
  vertical-align: 0.02em;
  border: 1px solid var(--rule);
}
.data--rig td { white-space: normal; min-width: 12rem; }
.data--rig tbody th { white-space: nowrap; color: var(--acc); }

/* ── Language bars ────────────────────────────────────────────────────────── */

.bars { margin-block: 2rem 0.5rem; }
.bar {
  display: grid;
  grid-template-columns: minmax(7.5rem, 9rem) minmax(0, 1fr) 8.5rem;
  gap: 0.9rem;
  align-items: center;
  padding-block: 0.28rem;
}
.bar__name {
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar__track {
  position: relative;
  height: 0.7rem;
  background-color: var(--track);
  /* Decade ticks. --tick is set per row by hud.mjs from the actual log span, so
     the ruling on the track is the ruling on the axis and not a decoration that
     happens to look like one. */
  background-image: repeating-linear-gradient(90deg, var(--rule) 0 1px, transparent 1px var(--tick, 20%));
}
.bar__fill { height: 100%; background: var(--acc-dim); }
.bar__meta {
  font-size: var(--t-2xs);
  letter-spacing: 0.05em;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  text-align: end;
}
/* The axis legend spans the whole row, not just the track column: squeezed into
   the track it wrapped every label onto two lines. */
.bars__axis {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-block-start: 0.75rem;
  padding-block-start: 0.6rem;
  border-block-start: 1px solid var(--rule);
  font-size: var(--t-2xs);
  letter-spacing: 0.08em;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}
.bars__axis span { white-space: nowrap; }

/* ── Systems ──────────────────────────────────────────────────────────────── */

.systems {
  display: grid;
  grid-template-columns: minmax(13.5rem, 18rem) minmax(0, 1fr);
  margin-block-start: 2rem;
  border: 1px solid var(--rule);
}
.systems__list { border-inline-end: 1px solid var(--rule); }

.sysbtn {
  display: block;
  width: 100%;
  text-align: start;
  padding: 0.95rem 1.1rem;
  background: transparent;
  border: 0;
  border-block-end: 1px solid var(--rule-soft);
  border-inline-start: 3px solid transparent;
  color: var(--ink-2);
  font: inherit;
  cursor: pointer;
}
.sysbtn:last-child { border-block-end: 0; }
.sysbtn:hover { background: var(--sel); color: var(--ink); }
.sysbtn__idx {
  font-size: var(--t-2xs);
  letter-spacing: 0.12em;
  color: var(--acc-dim);
}
.sysbtn__name {
  display: block;
  font-size: var(--t-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}
.sysbtn__kind {
  display: block;
  font-size: var(--t-2xs);
  letter-spacing: 0.06em;
  color: var(--ink-2);
}
/* --hue is the system's own colour, set from src/systems.mjs. It is used for a
   3px edge and for display-sized type only, both of which clear their contrast
   floor on black — and it is dropped entirely on the blueprint, where phosphor
   green and magenta on white paper would be unreadable. */
.sysbtn[aria-selected="true"] {
  background: var(--sel);
  border-inline-start-color: var(--hue, var(--acc));
}
.sysbtn[aria-selected="true"] .sysbtn__name { color: var(--hue, var(--acc)); }

.systems__panel { padding: clamp(1.25rem, 2.6vw, 2rem); }
/* No `:focus { outline: none }` here. The panel carries tabindex="0", so it is a
   keyboard stop, and an equal-specificity `:focus` rule declared after the
   `:focus-visible` block above wins on source order and silently removes the
   only focus indicator on that stop. `:focus-visible` already withholds the ring
   from a mouse click, which is all that rule was ever for. */
.sysdet__name {
  font-family: var(--font-disp);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1;
  color: var(--hue, var(--acc));
}

@media (prefers-color-scheme: light) {
  .sysbtn[aria-selected="true"] { border-inline-start-color: var(--acc); }
  .sysbtn[aria-selected="true"] .sysbtn__name,
  .sysdet__name { color: var(--acc); }
}
.sysdet__kind {
  font-size: var(--t-2xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-2);
  padding-block: 0.5rem 1.25rem;
  border-block-end: 1px solid var(--rule);
  margin-block-end: 1.25rem;
}
.sysdet__summary {
  font-size: var(--t-base);
  line-height: 1.85;
  max-width: 56ch;
  color: var(--ink);
}
.sysdet__metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6rem, 1fr));
  gap: 1.25rem 1.5rem;
  margin-block: 1.75rem;
  padding-block: 1.25rem;
  border-block: 1px solid var(--rule);
}
.sysdet__metrics dt {
  font-size: var(--t-2xs);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--ink-2);
}
.sysdet__metrics dd {
  font-family: var(--font-disp);
  font-size: 1.7rem;
  line-height: 1.1;
  color: var(--ink);
}
.sysdet__stacklabel {
  font-size: var(--t-2xs);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--ink-2);
  margin-block-end: 0.65rem;
}
.stack { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.stack li {
  font-size: var(--t-2xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  border: 1px solid var(--rule);
  padding: 0.22rem 0.55rem;
  background: var(--sel);
}

/* ── Timeline ─────────────────────────────────────────────────────────────── */

.timeline { border-block-start: 1px solid var(--rule); }
.timeline li {
  display: grid;
  grid-template-columns: 5.5ch minmax(0, 1fr);
  gap: 1.25rem;
  align-items: baseline;
  padding-block: 0.85rem;
  border-block-end: 1px solid var(--rule-soft);
}
.timeline__year {
  font-family: var(--font-disp);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--acc-dim);
  font-variant-numeric: tabular-nums;
}
.timeline__label { font-size: var(--t-base); color: var(--ink); }
.timeline__org {
  display: block;
  font-size: var(--t-xs);
  letter-spacing: 0.06em;
  color: var(--ink-2);
}

/* ── Footer ───────────────────────────────────────────────────────────────── */

.foot {
  position: relative;
  z-index: 10;
  padding: 0 var(--gutter) clamp(3rem, 8vh, 6rem);
  padding-inline-start: calc(var(--rail) + var(--gutter));
}
.pane--foot { max-width: calc(76ch + 2 * var(--pad)); }
.foot__gen {
  font-family: var(--font-disp);
  font-size: 1.7rem;
  line-height: 1.15;
  color: var(--acc);
  margin-block-end: 1rem;
}
.foot__gen span {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  line-height: 1.8;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  margin-block-start: 0.5rem;
}
.foot__src { font-size: var(--t-sm); color: var(--ink-2); overflow-wrap: anywhere; }
.foot__note {
  margin-block-start: 1rem;
  padding-block-start: 1rem;
  border-block-start: 1px solid var(--rule);
  font-size: var(--t-xs);
  line-height: 1.8;
  color: var(--ink-2);
  max-width: 54ch;
}

/* ── Narrow ───────────────────────────────────────────────────────────────── */

@media (max-width: 60rem) {
  :root { --rail: 0rem; }
  .rail { display: none; }
  .systems { grid-template-columns: minmax(0, 1fr); }
  .systems__list { border-inline-end: 0; border-block-end: 1px solid var(--rule); }
  .bar { grid-template-columns: minmax(6rem, 7.5rem) minmax(0, 1fr); }
  .bar__meta { grid-column: 2; text-align: start; padding-block-end: 0.35rem; }
}

@media (max-width: 46rem) {
  :root { --chrome-h: 3rem; }
  .chrome { gap: 0.5rem; }
  .chrome__sub, .chrome__slash, .chrome__telemetry { display: none; }
  .chrome__nav a { padding: 0.3rem 0.35rem; }
  .chrome__nav a span { display: none; }
  .chrome__nav a i { font-size: var(--t-xs); }
  .sec { min-height: 0; padding-block: clamp(4rem, 9vh, 7rem); }
  .sec--intro { padding-block-start: calc(var(--chrome-h) + 3.5rem); }
  .pane { padding-inline: clamp(1rem, 4vw, 1.5rem); }
  .display { font-size: clamp(2.9rem, 13vw, 4.5rem); }
  .ledger { grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); }
  .ledger dd { font-size: 2rem; }
}

/* ── Plain mode ───────────────────────────────────────────────────────────── */

[data-mode="plain"] body { background-color: var(--bg); }
[data-mode="plain"] .pane { background: var(--bg); }
@media (prefers-color-scheme: light) {
  [data-mode="plain"] .pane { background: var(--pane); }
}

/* ── Print ────────────────────────────────────────────────────────────────── */

@media print {
  .scene, .scanlines, .rail, .chrome, .skip { display: none !important; }
  body { background: #fff; color: #000; }
  .pane { background: #fff; border: 1px solid #999; break-inside: avoid; }
  .sec { min-height: 0; padding: 1.5rem 0; }
  a { color: #000; text-decoration: underline; }
  .display, .sub, .foot__gen, .sysdet__name, .ledger dd { color: #000; }
}
