/* Internal Jeet Service ($IRS). Form J-1040, printed by a machine whose counter has overflowed.
   The page is ONE SHEET on the dark screen of the machine that printed it. Its grammar comes from the
   reference photograph (NOTE.md > Reference teardown): one dominant ink, a double rule with rounded
   elbows, a dot run between the rules, a dark band with two numerals at the top, a readable left
   region against a dense corrupted region at 50..73% of the width, and one strip that carries all
   the colour.

   Rewritten 2026-11-02 to the owner's review:
   ONE TYPE SCALE   16 / 20 / 24 / 32 / 48, and nothing else. His list starts at 12, but the kit's
                    floor is 16 px for anything a visitor reads (RULES/05_TYPE_AND_SURFACES.md), so
                    the scale is his with the bottom two steps dropped instead of used.
   ONE SPACE SCALE  4 / 8 / 12 / 16 / 24 / 32 / 48, and nothing else.
   ONE FACE A ROLE  Public Sans for headings and paragraphs, Overpass Mono for values, addresses and
                    the small print, Press Start 2P for the form's own code in the masthead and
                    nowhere else. */

@font-face { font-family: "Public Sans"; src: url(/fonts/public-sans.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Overpass Mono"; src: url(/fonts/overpass-mono.woff2) format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Press Start 2P"; src: url(/fonts/press-start-2p.woff2) format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --paper: #f4f7fa;
  --paper-2: #e7edf5;
  --ink: #1b3a6b;          /* the state blue of the brief: the only structural ink on the paper */
  --ink-2: #0e2244;
  --ink-soft: #46618f;     /* 5.8:1 on paper */
  --muted: #5d7194;        /* 4.6:1 on paper, the lightest text anywhere */
  --rule: #9db2cf;
  --field: #05070b;
  --field-2: #0b111c;
  --red: #c8102e;
  --red-deep: #8e0b20;
  --green: #2e8b57;        /* the stamp's own ink, a large graphic */
  --green-ink: #1f6b41;    /* the same green as text, 6:1 on paper */
  --amber: #8a4b06;        /* 5.8:1 on the alternate fill, 6.3:1 on paper */
  --amber-dot: #a85c09;    /* the dot run, decoration only, never text */
  --glow: #9ebcff;
  --glow-cream: #f5c7a0;

  /* the two scales, and nothing outside them */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --t-small: 16px; --t-body: 20px; --t-head: 24px; --t-part: 32px; --t-code: 48px;

  --sheet: 1360px;
  --pad: 48px;             /* the sheet's own margin, the same left and right */
  --cell: 300px;           /* every value cell is this wide, so they all end on one line */
  --no: 56px;              /* the numbered box of a form line: 48 plus a step, so "1a" keeps 1 em of air */

  --sans: "Public Sans", system-ui, sans-serif;
  --mono: "Overpass Mono", ui-monospace, monospace;
  --pix: "Press Start 2P", "Overpass Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--field) url(/img/field.png) repeat;
  color: var(--ink-2);
  font: 400 var(--t-body)/1.55 var(--sans);
  font-synthesis: none;
  overflow-x: hidden;
}
/* the tube is alive: the field rolls once every two minutes, on its own clock, never with the pointer */
body::before {
  content: ""; position: fixed; inset: -20% -10%; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 70% 55% at 50% 42%, rgba(70, 110, 190, .22), rgba(5, 7, 11, 0) 70%);
  animation: roll 120s linear infinite;
}
@keyframes roll { from { transform: translateY(0); } to { transform: translateY(6%); } }
@media (prefers-reduced-motion: reduce) { body::before { animation: none; } }

a { color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
img { display: block; }

.skip {
  position: absolute; left: var(--s3); top: -64px; z-index: 50; background: var(--paper); color: var(--ink);
  padding: var(--s3) var(--s5); font: 700 var(--t-body)/1.2 var(--sans); border-radius: var(--s1);
  text-decoration: none; transition: top .15s;
}
.skip:focus { top: var(--s3); }

:where(a, button, input, [tabindex]):focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.band :where(a, button):focus-visible, .notice :where(a, button):focus-visible { outline-color: var(--glow-cream); }

/* ---------------------------------------------------------------- the sheet */
.sheet {
  width: min(var(--sheet), 100% - var(--s7));
  margin: 96px auto;
  background: var(--paper) url(/img/paper.png) repeat;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 32px 48px rgba(0, 0, 0, .8);
}

/* ---------------------------------------------------------------- the dark band */
.band {
  background: var(--field-2);
  color: var(--paper);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  grid-template-rows: auto 1fr;          /* the slack goes to row 2, so both halves end together */
  gap: var(--s6);
  padding: var(--s6) var(--pad);
  align-items: stretch;
}
.band-id {
  grid-column: 1; grid-row: 1;
  display: flex; flex-direction: column;
}
.band-id .kicker {
  font: 400 var(--t-small)/1 var(--mono); letter-spacing: .24em; text-transform: uppercase; color: var(--rule);
}
.band-id .code {
  font: 400 var(--t-code)/1 var(--pix); color: var(--paper); margin-top: var(--s4); letter-spacing: .01em;
}
.band-id .title { margin-top: var(--s4); font: 700 var(--t-head)/1.2 var(--sans); color: var(--paper); }
.band-id .period { margin-top: var(--s2); font: 400 var(--t-small)/1.4 var(--mono); letter-spacing: .04em; color: var(--glow); }
.band-id .claim-line { margin-top: var(--s5); max-width: 46ch; font: 400 var(--t-body)/1.5 var(--sans); color: #dce6f6; }

/* the two numerals, his score row, set the same way as each other */
.score {
  grid-column: 1; grid-row: 2;
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s6);
  align-self: end; margin-top: var(--s5);
}
.score > div { min-width: 0; }
.score .cap {
  font: 400 var(--t-small)/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--rule);
}
.score .num {
  margin-top: var(--s4);
  display: flex; align-items: baseline; gap: var(--s2);
  font: 700 var(--t-part)/1 var(--mono); color: var(--paper); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.score .num .unit {
  font: 400 var(--t-small)/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--glow);
}
.score .bar {
  margin-top: var(--s3); height: var(--s3);
  background: #16203a; box-shadow: inset 0 0 0 2px #27405f; overflow: hidden;
}
.score .bar i {
  display: block; height: 100%; min-width: var(--s1);      /* a tick at zero, so the track is never blank */
  background: var(--glow-cream); width: var(--s1); transition: width .6s ease;
}
.score .sub { margin-top: var(--s3); font: 400 var(--t-small)/1.5 var(--sans); color: #c7d7ff; }
.score .sub a { color: var(--glow-cream); }

/* the service block: the only piece of paper inside the machine's band */
.service {
  grid-column: 2; grid-row: 1 / 3; align-self: stretch;
  background: var(--paper) url(/img/paper.png) repeat;
  color: var(--ink-2);
  padding: var(--s5);
  box-shadow: inset 0 0 0 2px var(--ink), inset 0 0 0 6px var(--paper), inset 0 0 0 8px var(--ink);
  border-radius: var(--s3);
  display: flex; flex-direction: column;
}
.service .cap {
  font: 700 var(--t-small)/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft);
}
.service .mint-row {
  margin-top: var(--s4); display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3);
  font: 600 var(--t-small)/1.3 var(--sans); color: var(--ink);
}
.service .state { font: 400 var(--t-small)/1.3 var(--mono); color: var(--red); }
.service .state[data-live="1"] { color: var(--green-ink); }
.mint {
  margin-top: var(--s3); padding: var(--s3) var(--s4); background: var(--paper-2);
  box-shadow: inset 0 0 0 2px var(--rule);
  font: 400 var(--t-small)/1.5 var(--mono); color: var(--ink-2);
  overflow-wrap: anywhere; min-width: 0; user-select: all;
}
.mint[data-empty="0"] { word-break: break-all; }
.mint[data-empty="1"] { color: var(--ink-soft); user-select: none; }
.svc-note { margin-top: var(--s4); font: 400 var(--t-small)/1.45 var(--sans); color: var(--ink-soft); }

/* every key in the block is one width, one height, with its mark in the same place */
.keys { margin-top: var(--s4); display: grid; gap: var(--s2); align-content: start; }
.key {
  min-height: 48px; display: grid; grid-template-columns: var(--s5) 1fr; align-items: center;
  gap: var(--s3); padding: var(--s3) var(--s4);
  background: var(--ink); color: var(--paper);
  font: 700 var(--t-small)/1.2 var(--sans); letter-spacing: .06em; text-transform: uppercase;
  border: 0; border-radius: var(--s2); cursor: pointer; text-decoration: none; text-align: left;
  box-shadow: 0 3px 0 var(--ink-2);
}
.key .t { min-width: 0; overflow-wrap: anywhere; }
.key:hover { background: var(--ink-2); }
.key:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink-2); }
.key img { width: var(--s5); height: var(--s5); object-fit: contain; filter: invert(1); }
.key.ghost { background: var(--paper-2); color: var(--ink); box-shadow: 0 3px 0 var(--rule); }
.key.ghost img { filter: none; }
.key.ghost:hover { background: #dbe4f0; }
.key.go { background: var(--green-ink); box-shadow: 0 3px 0 #17502f; }
.key.go:hover { background: #185234; }
.key.burn { background: var(--red); box-shadow: 0 3px 0 #92091f; }
.key.burn:hover { background: #a80d26; }
/* a shut key looks shut whatever colour it would be open: this block comes last on purpose, or a
   disabled green key keeps its green ground and its grey label, which measured 1.04:1 */
.key[aria-disabled="true"], .key:disabled {
  background: var(--paper-2); color: var(--ink-soft); box-shadow: 0 3px 0 var(--rule); cursor: not-allowed;
}
.key[aria-disabled="true"] img, .key:disabled img { filter: none; opacity: .5; }
/* a key that stands alone under a form line carries no mark slot */
.key.plain { grid-template-columns: 1fr; justify-items: center; text-align: center; }

/* ---------------------------------------------------------------- the body of the return */
.part { padding: var(--s6) var(--pad) 0; }
.part-head { display: flex; align-items: baseline; gap: var(--s4); flex-wrap: wrap; }
.part-head h2 { font: 800 var(--t-part)/1.1 var(--sans); color: var(--ink); letter-spacing: -.01em; }
.part-head .hint { font: 400 var(--t-small)/1.4 var(--sans); color: var(--ink-soft); }
.rule { height: var(--s2); margin-top: var(--s4); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }

.body2 {
  display: grid; grid-template-columns: minmax(0, 1fr) 392px; gap: var(--s6);
  padding: 0 var(--pad) var(--s6); align-items: start;
}
/* The rows of the form share whatever height the sheet has: the notice column is usually the taller
   of the two, and without this the paper under the last line stood empty by a fifth of a screen. */
.lines {
  position: relative; min-width: 0; padding-top: var(--s5); align-self: stretch;
  display: flex; flex-direction: column; justify-content: space-between;
}

/* one line of the form: the number, the label, the dot run, the cell */
.line {
  position: relative;
  display: grid; grid-template-columns: var(--no) minmax(0, 1fr) 96px var(--cell);
  align-items: center; gap: 0 var(--s4); padding: var(--s3) 0;
}
.line::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; border-bottom: 1px dashed #c3d0e2;
}
.line:last-child::after { display: none; }
.line .no {
  width: var(--no); height: var(--no); display: grid; place-items: center; border-radius: var(--s2);
  background: var(--ink); color: var(--paper);
  font: 700 var(--t-small)/1 var(--mono); letter-spacing: .04em;
}
.line .txt { min-width: 0; }
.line .lbl { font: 400 var(--t-body)/1.45 var(--sans); color: var(--ink-2); }
.line .lbl b { font-weight: 700; color: var(--ink); }
/* the dot run: one pitch everywhere, anchored right so every leader reads the same */
.line .dots {
  width: 96px; height: var(--s4); align-self: center;
  background-image: radial-gradient(circle at center, var(--amber-dot) 2px, rgba(0, 0, 0, 0) 2.5px);
  background-size: var(--s4) var(--s4); background-position: left center; background-repeat: repeat-x;
  opacity: .6;
}
.cell {
  width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: flex-end;
  padding: var(--s3) var(--s5); background: #fff; box-shadow: inset 0 0 0 2px var(--ink);
  border-radius: var(--s1);
  font: 600 var(--t-body)/1.2 var(--mono); color: var(--ink-2); text-align: right;
  overflow-wrap: break-word; min-width: 0; font-variant-numeric: tabular-nums;
}
/* an unfilled box on a form is empty, not a dash: a faint writing line says where the answer goes */
.cell.empty { color: transparent; justify-content: stretch; align-items: flex-end; }
.cell.empty::after {
  content: ""; display: block; width: 100%; height: 2px; background: var(--rule); opacity: .6;
}
.cell .unit { font-size: var(--t-small); color: var(--ink-soft); margin-left: var(--s2); }
.cell.good { color: var(--green-ink); }
.cell.bad { color: var(--red); }
/* the cell and the key under it share the third column, so the right edge never moves */
.line .end { display: grid; gap: var(--s2); }

/* line 1: the wallet box */
.enter { padding: var(--s5) var(--pad) 0; }
.enter .row { display: grid; grid-template-columns: var(--no) minmax(0, 1fr); gap: var(--s4); align-items: start; padding: var(--s3) 0; }
.enter .no {
  width: var(--no); height: var(--no); display: grid; place-items: center; border-radius: var(--s2);
  background: var(--ink); color: var(--paper); font: 700 var(--t-small)/1 var(--mono); letter-spacing: .04em;
}
.enter label { display: block; font: 700 var(--t-body)/1.3 var(--sans); color: var(--ink); }
.enter input {
  width: 100%; margin-top: var(--s3); padding: var(--s4); background: #fff;
  box-shadow: inset 0 0 0 2px var(--ink), inset 0 0 0 6px #fff, inset 0 0 0 8px var(--ink);
  border: 0; border-radius: var(--s2); font: 400 var(--t-body)/1.3 var(--mono); color: var(--ink-2); min-width: 0;
}
.enter input::placeholder { color: var(--muted); }
.enter input[data-ok="1"] { box-shadow: inset 0 0 0 2px var(--green-ink), inset 0 0 0 6px #fff, inset 0 0 0 8px var(--green-ink); }
.enter input[data-ok="0"] { box-shadow: inset 0 0 0 2px var(--red), inset 0 0 0 6px #fff, inset 0 0 0 8px var(--red); }
.enter .acts { margin-top: var(--s3); display: flex; flex-wrap: wrap; gap: var(--s3); align-items: stretch; }
.enter .acts .key { min-height: 48px; }
.enter .note { margin-top: var(--s3); font: 400 var(--t-small)/1.5 var(--sans); color: var(--ink-soft); max-width: 62ch; }
.enter .say { margin-top: var(--s2); font: 600 var(--t-small)/1.5 var(--sans); min-height: var(--s5); color: var(--ink-soft); }
.enter .say[data-tone="bad"] { color: var(--red); }
.enter .say[data-tone="good"] { color: var(--green-ink); }

/* ---------------------------------------------------------------- the inverse block */
/* align-self:start, so a notice shorter than the column beside it ends on its last line instead of
   standing as a tall empty dark box */
.notice {
  background: var(--field-2); color: #d7e2f5; border-radius: var(--s3);
  padding: var(--s5); align-self: start;
  box-shadow: inset 0 0 0 2px #2b4066, inset 0 0 0 6px var(--field-2), inset 0 0 0 8px #2b4066;
}
.notice h3 {
  font: 400 var(--t-small)/1.5 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--glow-cream);
}
/* his review: a paragraph set entirely in mono is heavy going, so the prose is the grotesk and the
   mono is kept for what it is for, the values and the tickers */
.notice .rules { margin-top: var(--s4); font: 400 var(--t-small)/1.6 var(--sans); color: #d7e2f5; }
.notice .rules p + p { margin-top: var(--s3); }
.notice .rules b { font: 700 var(--t-small)/1.6 var(--mono); color: #fff; }
.notice .integ {
  position: relative; margin-top: var(--s5); padding-top: var(--s4);
  font: 400 var(--t-small)/1.5 var(--sans); color: #c7d7ff;
}
.notice .integ b { font-family: var(--mono); color: var(--glow-cream); font-weight: 700; }
.notice .integ a { color: var(--glow-cream); }
.notice .integ::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px;
  border-top: 2px solid #2b4066; border-bottom: 2px solid #2b4066;
}
.notice .cap {
  margin-top: var(--s5); font: 700 var(--t-small)/1.2 var(--sans); letter-spacing: .16em;
  text-transform: uppercase; color: var(--glow);
}
/* the overflow's own inks, used only on the garbage glyphs */
.g { color: var(--glow); } .g1 { color: var(--glow-cream); } .g2 { color: #ff8e9e; } .g3 { color: #fff; }

/* the four attachments */
.plates { margin-top: var(--s4); display: grid; gap: var(--s2); }
/* two to a row: five stacked plates made the notice column so much taller than the form beside it
   that the paper under the form stood empty */
.plates { grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; }
.plates > :first-child { grid-column: 1 / -1; }
.plate {
  display: grid; grid-template-rows: auto auto auto; gap: var(--s1); align-content: center;
  padding: var(--s4); border-radius: var(--s2); text-decoration: none;
  background: #14203a; box-shadow: inset 0 0 0 2px #2b4066; color: #d7e2f5;
  min-height: 72px;
}
.plate:hover { background: #1b2b4d; box-shadow: inset 0 0 0 2px var(--glow); }
.plate:active { transform: translateY(2px); }
.plate:focus-visible { outline: 3px solid var(--glow-cream); outline-offset: 3px; }
.plate .code {
  font: 700 var(--t-small)/1 var(--mono); letter-spacing: .18em; color: var(--glow-cream); white-space: nowrap;
}
.plate .nm { display: block; font: 700 var(--t-small)/1.25 var(--sans); color: #fff; }
.plate .ct { display: block; margin-top: var(--s1); font: 400 var(--t-small)/1.3 var(--mono); color: var(--glow); }
.plate[aria-current="page"] { background: var(--paper); box-shadow: inset 0 0 0 2px var(--paper); }
.plate[aria-current="page"] .code { color: var(--amber); }
.plate[aria-current="page"] .nm { color: var(--ink); }
.plate[aria-current="page"] .ct { color: var(--ink-soft); }

/* ---------------------------------------------------------------- the stamp */
/* No reserved band: an empty one left a hole a fifth of a screen tall on a form nobody had filled in
   yet. The block appears with the stamp, and nothing above it moves. */
.stampwrap { display: none; margin: var(--s4) 0; }
.stampwrap.on { display: block; }
.stamp { width: min(420px, 100%); height: auto; }
.stampwrap.on .stamp { animation: drop .42s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes drop {
  0% { opacity: 0; transform: scale(1.55) rotate(2deg); }
  55% { opacity: 1; transform: scale(.955) rotate(0deg); }
  78% { transform: scale(1.022); }
  100% { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) { .stampwrap.on .stamp { animation: none; } }

/* ---------------------------------------------------------------- the status ladder */
.ladder { padding: var(--s4) 0 0; }
.ladder .cap {
  font: 700 var(--t-small)/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft);
}
.rung-row { margin-top: var(--s3); display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); }
.rung {
  padding: var(--s5); border-radius: var(--s2); background: var(--paper-2);
  box-shadow: inset 0 0 0 2px var(--rule); min-width: 0;
  display: grid; grid-template-rows: auto auto 1fr; gap: var(--s2);   /* one reserved height for the text */
}
.rung .n { font: 700 var(--t-small)/1 var(--mono); letter-spacing: .14em; color: var(--ink-soft); white-space: nowrap; }
.rung .s { font: 800 var(--t-body)/1.2 var(--sans); color: var(--ink-2); }
.rung .w { font: 400 var(--t-small)/1.3 var(--mono); color: var(--ink-soft); }
.rung[data-on="1"] { background: #fff; }
.rung[data-tone="green"][data-on="1"] { box-shadow: inset 0 0 0 3px var(--green-ink); }
.rung[data-tone="green"][data-on="1"] .s { color: var(--green-ink); }
.rung[data-tone="red"][data-on="1"] { box-shadow: inset 0 0 0 3px var(--red); }
.rung[data-tone="red"][data-on="1"] .s { color: var(--red); }
.rung[data-tone="deep"][data-on="1"] { box-shadow: inset 0 0 0 3px var(--red-deep); }
.rung[data-tone="deep"][data-on="1"] .s { color: var(--red-deep); }
.rung[data-tone="amber"][data-on="1"] { box-shadow: inset 0 0 0 3px var(--amber); }
.rung[data-tone="amber"][data-on="1"] .s { color: var(--amber); }

/* ---------------------------------------------------------------- tables */
.tablewrap { padding: 0 var(--pad) var(--s7); }
.tablewrap.flush { padding: var(--s5) 0 0; }
table { width: 100%; border-collapse: collapse; }
caption {
  text-align: left; padding-bottom: var(--s3);
  font: 700 var(--t-small)/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft);
}
th, td {
  padding: var(--s3) var(--s4); text-align: left; font: 400 var(--t-small)/1.4 var(--sans);
  border-bottom: 1px solid var(--rule); vertical-align: top;
}
th {
  font: 700 var(--t-small)/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--paper);
  background: var(--ink); border-bottom: 0;
}
th:first-child { border-radius: var(--s1) 0 0 0; }
th:last-child { border-radius: 0 var(--s1) 0 0; }
td.m { font-family: var(--mono); white-space: nowrap; }
td.r { text-align: right; font-family: var(--mono); font-weight: 600; font-variant-numeric: tabular-nums; }
tbody tr:nth-child(even) { background: rgba(155, 178, 207, .13); }
td .tag {
  display: inline-block; padding: var(--s3) var(--s5); border-radius: var(--s1);
  font: 700 var(--t-small)/1.3 var(--sans); letter-spacing: .05em; text-transform: uppercase;
}
.tag[data-tone="green"] { background: #dff0e6; color: #1f6b41; }
.tag[data-tone="amber"] { background: #f7e7cf; color: #8a4b06; }
.tag[data-tone="red"] { background: #fadfe3; color: #a80d26; }
.tag[data-tone="deep"] { background: #f1d2d7; color: var(--red-deep); }
/* the empty state belongs to the table, so it sits under the middle of it */
.empty-row td { color: var(--ink-soft); text-align: center; padding: var(--s6) var(--s4); }
.empty-row td b { display: block; margin-bottom: var(--s2); color: var(--ink); font: 700 var(--t-body)/1.3 var(--sans); }

.pager { margin-top: var(--s4); display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.pager .at { font: 700 var(--t-small)/1 var(--mono); letter-spacing: .12em; color: var(--ink); white-space: nowrap; }

/* ---------------------------------------------------------------- prose */
.prose { padding: var(--s5) 0 0; max-width: 72ch; }
.prose h3 { margin-top: var(--s5); font: 800 var(--t-head)/1.25 var(--sans); color: var(--ink); }
.prose p { margin-top: var(--s3); font: 400 var(--t-body)/1.6 var(--sans); color: var(--ink-2); }
.prose ul { margin-top: var(--s3); padding-left: var(--s5); }
.prose li { margin-top: var(--s2); font: 400 var(--t-body)/1.6 var(--sans); }
.prose code { font: 700 var(--t-small)/1.4 var(--mono); color: var(--amber); white-space: nowrap; }
.intro { font: 400 var(--t-body)/1.6 var(--sans); color: var(--ink-2); max-width: 70ch; padding-top: var(--s5); }
.tablenote { margin-top: var(--s4); font: 400 var(--t-small)/1.5 var(--sans); color: var(--ink-soft); }
.closing { margin-top: var(--s5); padding-top: var(--s5); position: relative; max-width: 72ch; }
.closing::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px;
  border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
}
.closing .cap { font: 700 var(--t-small)/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.closing p:last-child { margin-top: var(--s3); font: 400 var(--t-body)/1.6 var(--sans); color: var(--ink-2); }

.steps { padding: var(--s5) var(--pad) 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s4); }
.step {
  padding: var(--s5); background: var(--paper-2); border-radius: var(--s2);
  box-shadow: inset 0 0 0 2px var(--ink), inset 0 0 0 6px var(--paper-2), inset 0 0 0 8px var(--ink);
  display: grid; grid-template-rows: auto auto 1fr; gap: var(--s3);
}
.step .n { font: 700 var(--t-head)/1 var(--mono); color: var(--amber); }
.step h3 { font: 800 var(--t-body)/1.25 var(--sans); color: var(--ink); }
.step p { font: 400 var(--t-small)/1.55 var(--sans); color: var(--ink-2); }

/* ---------------------------------------------------------------- state helpers */
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.live { font-variant-numeric: tabular-nums; }
.typing::after { content: "_"; color: var(--amber); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .typing::after { animation: none; } }

.msg {
  margin: 0 var(--pad) var(--s5); padding: var(--s4); border-radius: var(--s2);
  background: #fff; box-shadow: inset 0 0 0 2px var(--ink);
  font: 400 var(--t-small)/1.55 var(--sans); color: var(--ink-2);
}
.msg b { color: var(--ink); }
.msg[data-tone="bad"] { box-shadow: inset 0 0 0 2px var(--red); color: var(--red); }
.msg[data-tone="good"] { box-shadow: inset 0 0 0 2px var(--green-ink); color: var(--green-ink); }

/* ---------------------------------------------------------------- widths */
@media (max-width: 1440px) {
  :root { --cell: 260px; }
  .body2 { grid-template-columns: minmax(0, 1fr) 360px; }
  .band { grid-template-columns: minmax(0, 1fr) 360px; }
}
@media (max-width: 1280px) {
  :root { --pad: 32px; --cell: 240px; }
  .body2 { grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s5); }
  .band { grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s5); }
}
@media (max-width: 1024px) {
  .sheet { width: min(var(--sheet), 100% - var(--s6)); margin: 48px auto; }
  .band { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
  .band-id, .band .score, .band .service { grid-column: 1; grid-row: auto; }
  .band .score { margin-top: 0; }
  .body2 { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  :root { --cell: 220px; }
  .rung-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  :root { --pad: 24px; }
  .sheet { width: 100%; margin: 0 0 var(--s6); }
  .band-id .code { font-size: var(--t-part); }
  .band-id .title { font-size: var(--t-body); }
  .score { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
  .score .num { font-size: var(--t-head); }
  .part-head h2 { font-size: var(--t-head); }
  .line { grid-template-columns: var(--no) minmax(0, 1fr); row-gap: var(--s3); }
  .line .txt { grid-column: 2; }
  .line .dots { display: none; }
  .line .end, .line > .cell { grid-column: 2; }
  .enter .row { grid-template-columns: var(--no) minmax(0, 1fr); }
  .steps, .rung-row { grid-template-columns: minmax(0, 1fr); }
  .tablewrap { overflow-x: auto; }
  table { min-width: 560px; }
  .plates { grid-template-columns: 1fr; }
}
.keys.two { grid-template-columns: 1fr 1fr; margin-top: var(--s2); }
@media (max-width: 1440px) { .keys.two { grid-template-columns: 1fr; } }
