/*
THESIS: The catalog rendered as the hobby's data side — the card back, struck in two
inks on stock, where how well the impression registered IS the identity state. Refuses
the category default: a white database grid with thumbnails and green checkmarks.
OWN-WORLD: grey-white card stock (light "Show Floor") / '71 black stock (dark "Sorting
Desk"); two inks only — back-blue states, back-red contests; zero radius; recessed/flat/
raised press depth; crop marks and registration marks only where they work; GC Display +
GC Text + mono for verbatim machine values.
STORY: a collector types what's in their hand, reads a verdict in their own language,
and sees exactly why it can be trusted — including what no source would say.
FIRST VIEWPORT (/resolve): wordmark small, one huge raised resolver field mid-sheet,
covered-world line under it, meta strip at the foot. The field is the primary action.
FORM: press-sheet/registration proof — chosen against parent's "Struck Sheet" (looser
tie, ruled 2026-08-08); staging: two-scheme single-material sheet.
*/

/* ---------- stock + inks ---------- */
:root {
  --stock: #f2f0ea;
  --stock-recessed: #e6e3da;
  --stock-raised: #faf9f5;
  --print: #1d1c18;
  --print-quiet: #57544b;
  --trim: #c9c5b8;
  --ink-blue: #2b4a8b;
  --ink-blue-wash: rgb(43 74 139 / .08);
  --ink-red: #a33327;
  --ink-red-wash: rgb(163 51 39 / .07);
  --deboss-dark: rgb(29 28 24 / .12);
  --deboss-light: rgb(255 255 255 / .75);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --stock: #191916;
    --stock-recessed: #131310;
    --stock-raised: #232320;
    --print: #e8e6df;
    --print-quiet: #a5a297;
    --trim: #3a3831;
    --ink-blue: #7d9bd8;
    --ink-blue-wash: rgb(125 155 216 / .12);
    --ink-red: #d86a5a;
    --ink-red-wash: rgb(216 106 90 / .1);
    --deboss-dark: rgb(0 0 0 / .5);
    --deboss-light: rgb(255 255 255 / .06);
    color-scheme: dark;
  }
}
:root[data-scheme="light"] {
  --stock: #f2f0ea; --stock-recessed: #e6e3da; --stock-raised: #faf9f5;
  --print: #1d1c18; --print-quiet: #57544b; --trim: #c9c5b8;
  --ink-blue: #2b4a8b; --ink-blue-wash: rgb(43 74 139 / .08);
  --ink-red: #a33327; --ink-red-wash: rgb(163 51 39 / .07);
  --deboss-dark: rgb(29 28 24 / .12); --deboss-light: rgb(255 255 255 / .75);
  color-scheme: light;
}
:root[data-scheme="dark"] {
  --stock: #191916; --stock-recessed: #131310; --stock-raised: #232320;
  --print: #e8e6df; --print-quiet: #a5a297; --trim: #3a3831;
  --ink-blue: #7d9bd8; --ink-blue-wash: rgb(125 155 216 / .12);
  --ink-red: #d86a5a; --ink-red-wash: rgb(216 106 90 / .1);
  --deboss-dark: rgb(0 0 0 / .5); --deboss-light: rgb(255 255 255 / .06);
  color-scheme: dark;
}

/* ---------- faces ---------- */
/* PK Display — Big Shoulders (SIL OFL), the condensed press-gothic of card-back
   headlines. Replaced the family's wonky serif on 2026-08-08 by ruling ("this font has
   to go"): the serif carried reading-room voice, and this surface is a desk. */
@font-face { font-family: "PK Display"; src: url(/f/pk-display-700.woff2) format("woff2");
  font-weight: 700; font-style: normal; font-display: block; }
@font-face { font-family: "PK Display"; src: url(/f/pk-display-500.woff2) format("woff2");
  font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "GC Text"; src: url(/f/t.woff2) format("woff2");
  font-weight: 400; font-style: normal; font-display: swap; }

/* ---------- sheet ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--stock);
  color: var(--print);
  font-family: "GC Text", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
main { width: min(64rem, 100% - 44px); margin: 0 auto; flex: 1; }

a { color: var(--ink-blue); text-decoration-color: color-mix(in srgb, var(--ink-blue) 45%, transparent); text-underline-offset: 2px; }
a:hover { text-decoration-color: var(--ink-blue); }
:focus-visible { outline: 2px solid var(--ink-blue); outline-offset: 2px; }
::selection { background: var(--ink-blue); color: var(--stock); }

h1, h2 { font-family: "PK Display", "Arial Narrow", sans-serif; font-weight: 700; letter-spacing: .005em; }
h1 { font-size: clamp(2.6rem, 9vw, 4.2rem); line-height: .95; margin: 0 0 .25em; text-transform: uppercase; }
h2 { font-size: clamp(1.35rem, 4vw, 1.9rem); line-height: 1.05; margin: 2em 0 .5em; text-transform: uppercase; letter-spacing: .02em; }
p { margin: 0 0 1em; }
.quiet { color: var(--print-quiet); }
.small { font-size: .85rem; }

/* the masthead: wordmark + route back */
.mast { display: flex; align-items: baseline; gap: 14px; padding: 26px 0 0; width: min(64rem, 100% - 44px); margin: 0 auto; }
.mast .mark { font-family: "PK Display", "Arial Narrow", sans-serif; font-weight: 700; font-size: 1.5rem;
  letter-spacing: .04em; color: var(--print); text-decoration: none; }
.mast nav { margin-left: auto; display: flex; gap: 18px; font-size: .9rem; }
.mast nav a { color: var(--print-quiet); text-decoration: none; }
.mast nav a[aria-current="page"] { color: var(--print); border-bottom: 2px solid var(--ink-blue); }
.mast nav a:hover { color: var(--print); }

/* verbatim machine values */
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .85em; letter-spacing: 0; }
.tabular { font-variant-numeric: tabular-nums; }

/* ---------- press depth ---------- */
/* struck INTO the sheet: reading wells */
.struck {
  background: var(--stock-recessed);
  border: 1px solid var(--trim);
  box-shadow: inset 1px 1px 2px var(--deboss-dark), inset -1px -1px 1px var(--deboss-light);
  padding: 18px 20px;
}
/* raised OFF the sheet: controls only */
.raised {
  background: var(--stock-raised);
  border: 1px solid var(--print);
}

/* crop-marked region: the working corner furniture */
.proof {
  position: relative;
  padding: 26px 24px;
  margin: 26px 0;
}
.proof::before, .proof::after,
.proof > .cut::before, .proof > .cut::after {
  content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none;
}
.proof::before { top: 0; left: 0; border-top: 1px solid var(--print); border-left: 1px solid var(--print); }
.proof::after { top: 0; right: 0; border-top: 1px solid var(--print); border-right: 1px solid var(--print); }
.proof > .cut::before { bottom: 0; left: 0; border-bottom: 1px solid var(--print); border-left: 1px solid var(--print); }
.proof > .cut::after { bottom: 0; right: 0; border-bottom: 1px solid var(--print); border-right: 1px solid var(--print); }

/* ---------- state chips: the four press conditions ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .8rem; letter-spacing: .02em;
  padding: 3px 10px 4px;
  border: 1px solid;
  white-space: nowrap;
  vertical-align: middle;
}
.chip::before { content: ""; width: 8px; height: 8px; flex: none; }
.chip-complete { color: var(--ink-blue); border-color: var(--ink-blue); background: var(--ink-blue-wash); }
.chip-complete::before { background: var(--ink-blue); }
.chip-degraded {
  color: var(--print-quiet); border-color: var(--trim);
  background: var(--stock-recessed);
  box-shadow: inset 1px 1px 2px var(--deboss-dark), inset -1px -1px 1px var(--deboss-light);
}
.chip-degraded::before { background: transparent; border: 1px solid var(--print-quiet); }
.chip-contested { color: var(--ink-red); border-color: var(--ink-red); background: var(--ink-red-wash); }
.chip-contested::before {
  background: var(--ink-red);
  box-shadow: 3px 3px 0 0 color-mix(in srgb, var(--ink-red) 45%, transparent);
}
.chip-refused { color: var(--print-quiet); border-color: var(--print-quiet); background: transparent; }
.chip-refused::before { background: transparent; border: 1px dashed var(--print-quiet); }

/* ---------- the identity tuple ---------- */
.tuple {
  display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 14px; row-gap: 6px;
  font-size: clamp(1.25rem, 4vw, 1.7rem); line-height: 1.35;
  font-variant-numeric: tabular-nums;
  margin: .2em 0 .5em;
}
.tuple .comp { position: relative; padding-right: 16px; }
.tuple .comp:not(:last-child)::after { content: ""; position: absolute; right: 0; top: .95em;
  bottom: .1em; border-right: 1px solid var(--trim); }
.tuple .comp small { display: block; font-size: .58rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--print-quiet); line-height: 1.2; }
/* a blind (unstated) component: inkless, struck, holds its place */
.blind {
  color: var(--print-quiet);
  background: var(--stock-recessed);
  box-shadow: inset 1px 1px 2px var(--deboss-dark), inset -1px -1px 1px var(--deboss-light);
  border: 1px solid var(--trim);
  padding: 0 10px 2px;
  font-style: normal;
}
/* the contested double impression */
.double {
  color: var(--print);
  text-shadow: 2px 2px 0 color-mix(in srgb, var(--ink-red) 55%, transparent);
}
.regmark { color: var(--ink-red); font-size: .75em; vertical-align: super; }

/* ---------- resolver ---------- */
.resolver { display: flex; gap: 10px; margin: 1.1em 0 .5em; }
.resolver input {
  flex: 1; min-width: 0;
  font: inherit; font-size: clamp(1.05rem, 3vw, 1.3rem);
  color: var(--print);
  background: var(--stock-raised);
  border: 2px solid var(--print);
  padding: 15px 16px;
  border-radius: 0;
}
.resolver input::placeholder { color: var(--print-quiet); opacity: 1; }
.resolver input:focus { outline: 2px solid var(--ink-blue); outline-offset: 1px; }
.resolver button {
  flex: none;
  font: inherit; font-size: 1.05rem;
  color: var(--stock); background: var(--ink-blue);
  border: 2px solid var(--ink-blue); border-radius: 0;
  padding: 0 26px; min-height: 52px;
  cursor: pointer;
}
.resolver button:hover { background: color-mix(in srgb, var(--ink-blue) 86%, var(--print)); }
.resolver button:disabled { opacity: .55; cursor: default; }

/* ---------- result rows: tuple entries on the sheet ---------- */
.rows { list-style: none; margin: 1.2em 0; padding: 0; border-top: 1px solid var(--trim); }
.rows li { border-bottom: 1px solid var(--trim); }
.rows a.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline; gap: 2px 16px;
  padding: 9px 10px;
  color: inherit; text-decoration: none;
}
.rows a.row:hover { background: var(--ink-blue-wash); }
.rows .line1 { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.rows .line1 b { font-weight: 400; color: var(--ink-blue); }
.rows .line2 { grid-column: 1; color: var(--print-quiet); font-size: .9rem; }
.rows .chip { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
@media (max-width: 560px) {
  .rows a.row { grid-template-columns: 1fr; }
  .rows .chip { grid-column: 1; grid-row: auto; justify-self: start; }
}

/* ---------- row v2 (restructure S1, CARD-R1): the version row ----------
   die | difference line / subject / quiet pedigree | exception chip.
   The die is a 63:88 stamp slot — letterpress furniture, the permanent
   design (no imagery source exists on any track). Target ≤72px @375. */
.rows a.row.v2 {
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center; gap: 1px 12px; padding: 7px 10px 7px 7px;
}
.rows .v2 .die {
  grid-column: 1; grid-row: 1 / span 3; align-self: center;
  width: 44px; aspect-ratio: 63 / 88; box-sizing: border-box;
  border: 1px solid var(--trim); background: var(--stock-recessed);
  box-shadow: inset 1px 1px 2px var(--deboss-dark), inset -1px -1px 1px var(--deboss-light);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; overflow: hidden; text-align: center;
}
.rows .v2 .die b {
  font-family: "PK Display", "Arial Narrow", sans-serif; font-weight: 700;
  font-size: .84rem; line-height: 1; color: var(--ink-red);
  font-variant-numeric: tabular-nums;
}
.rows .v2 .die i {
  font-style: normal; font-size: .48rem; line-height: 1.15; letter-spacing: .03em;
  text-transform: uppercase; color: var(--print-quiet); max-width: 40px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.rows .v2 .die.base { color: var(--trim); font-size: 1.05rem; }
.rows .v2 .line1 { grid-column: 2; font-size: .98rem; line-height: 1.3; }
.rows .v2 .line1 b { font-weight: 700; color: var(--print); }
/* .run is also the year-strip component's class (display:flex + margins);
   inside a row it must be an inline mark — reset the leak explicitly */
.rows .line1 .run, .rows .line2 .run { display: inline; margin: 0 0 0 4px; gap: 0; }
.rows .v2 .line1 .run { color: var(--ink-red); font-variant-numeric: tabular-nums; }
.rows .v2 .line2 { grid-column: 2; color: var(--print); font-size: .92rem; line-height: 1.3; }
.rows .v2 .line3 { grid-column: 2; color: var(--print-quiet); font-size: .76rem; line-height: 1.3; }
.rows .v2 .chip { grid-column: 3; grid-row: 1 / span 3; align-self: center; }
@media (max-width: 560px) {
  .rows a.row.v2 { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .rows .v2 .die { width: 38px; grid-column: 1; grid-row: 1 / span 3; }
  .rows .v2 .chip { grid-column: 3; grid-row: 1 / span 3; justify-self: end; }
}

/* ---------- field tables (attributes, evidence) ---------- */
.fields { width: 100%; border-collapse: collapse; margin: .8em 0 1.4em; }
.fields th, .fields td { text-align: left; vertical-align: baseline;
  padding: 9px 14px 9px 0; border-bottom: 1px solid var(--trim); }
.fields th { font-weight: 400; color: var(--print-quiet); font-size: .85rem;
  letter-spacing: .02em; white-space: nowrap; width: 11rem; }
.fields td { font-variant-numeric: tabular-nums; }
.fields .reason { color: var(--print-quiet); font-size: .88rem; }
.wrap-any { overflow-wrap: anywhere; }

/* refusals: red-inked, they are evidence */
.refusal { border-left: 1px solid var(--ink-red); padding-left: 14px; margin: .6em 0; }
.refusal .who { color: var(--ink-red); }

/* ---------- details (Matching details) ---------- */
details.machine { margin: 1em 0; border: 1px solid var(--trim); }
details.machine > summary {
  cursor: pointer; padding: 11px 16px; list-style: none;
  color: var(--ink-blue); font-size: .95rem;
}
details.machine > summary::-webkit-details-marker { display: none; }
details.machine > summary::before { content: "+ "; }
details.machine[open] > summary::before { content: "− "; }
details.machine > .body { padding: 4px 16px 14px; border-top: 1px solid var(--trim); }

/* ---------- notices ---------- */
.beta-line { border-top: 1px solid var(--trim); border-bottom: 1px solid var(--trim);
  padding: 8px 2px; font-size: .85rem; color: var(--print-quiet); margin: 1.2em 0; }
.error-well { border: 1px solid var(--ink-red); background: var(--ink-red-wash);
  padding: 14px 18px; margin: 1.2em 0; }
.error-well b { color: var(--ink-red); font-weight: 400; }
/* P8b: the engine between builds is a press notice, not a red fault. Ink-blue,
   the same register as the site's own voice, so a re-index does not read as
   "this site is broken". */
.maint-band { border: 1px solid var(--ink-blue); background: var(--ink-blue-wash);
  padding: 14px 18px; margin: 1.2em 0; }
.maint-band b { color: var(--ink-blue); font-weight: 400; display: block; margin-bottom: .25em; }
.maint-band span { display: block; font-size: .9rem; }
.maint-band small { display: block; margin-top: .5em; font-size: .74rem; }
/* P8g: the way out of a maintenance state, not just a description of it. */
.pk-retry { margin-top: .7em; font: inherit; font-size: .84rem; cursor: pointer;
  color: var(--ink-blue); background: transparent; border: 1px solid var(--ink-blue);
  padding: 5px 14px; min-height: 34px; }
.pk-retry:hover { background: var(--ink-blue); color: var(--stock); }
.pk-retry[disabled] { opacity: .55; cursor: default; }
.fixture-flag { background: var(--ink-red); color: var(--stock); font-size: .78rem;
  padding: 2px 10px 3px; display: inline-block; }

/* loading is a press state */
.pulling { color: var(--print-quiet); }
.pulling::after { content: "…"; animation: pk-pull 1.2s steps(4) infinite; }
@keyframes pk-pull { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "…"; } }
@media (prefers-reduced-motion: reduce) { .pulling::after { animation: none; content: "…"; } }

/* ---------- footer: the color bar is the scheme switch ---------- */
footer.bar {
  margin-top: 56px; padding: 18px 0 calc(20px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--trim);
}
footer.bar .inner { width: min(64rem, 100% - 44px); margin: 0 auto;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  font-size: .85rem; color: var(--print-quiet); }
.colorbar { display: inline-flex; border: 1px solid var(--trim); cursor: pointer;
  padding: 0; background: none; }
.colorbar i { width: 16px; height: 16px; display: block; }
.colorbar:hover { border-color: var(--print); }
footer.bar a { color: var(--print-quiet); }

/* ---------- the dig: dollar-box dividers ---------- */
.dividers { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-end;
  border-bottom: 2px solid var(--print); margin: 1.3em 0 0; }
.dividers button {
  font: inherit; font-size: .92rem;
  color: var(--print-quiet);
  background: var(--stock-recessed);
  border: 1px solid var(--trim); border-bottom: none; border-radius: 0;
  padding: 7px 16px 6px;
  cursor: pointer;
  position: relative; top: 0;
}
.dividers button:hover { color: var(--print); background: var(--stock-raised); }
.dividers button[aria-pressed="true"] {
  color: var(--stock); background: var(--ink-blue); border-color: var(--ink-blue);
  padding-top: 10px;      /* the pulled-up divider stands taller in the box */
}
/* the handwritten tabs: active filters pulled from the box */
.pulled { display: flex; gap: 8px; flex-wrap: wrap; margin: .9em 0 .2em; }
.pulled .tab {
  font-size: .9rem;
  border: 1px solid var(--print); background: var(--stock-raised);
  padding: 4px 8px 4px 12px;
  display: inline-flex; align-items: center; gap: 8px;
}
.pulled .tab small { text-transform: uppercase; letter-spacing: .05em;
  font-size: .62rem; color: var(--print-quiet); }
.pulled .tab button { font: inherit; border: 0; background: none; cursor: pointer;
  color: var(--ink-red); padding: 0 2px; font-size: 1rem; line-height: 1; }
/* a group in the box */
.boxrow { margin: 1.6em 0; }
.boxrow header { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  border-bottom: 1px solid var(--print); padding-bottom: 5px; }
.boxrow header .name { font-size: 1.12rem; }
.boxrow header .name a { color: inherit; text-decoration: none; border-bottom: 1px dashed var(--trim); }
.boxrow header .name a:hover { border-bottom-color: var(--ink-blue); color: var(--ink-blue); }
.boxrow header .count { color: var(--print-quiet); font-size: .88rem; }
.boxrow header .hunt { margin-left: auto; font-size: .9rem; white-space: nowrap; }
.hunt-all { display: inline-block; font-size: 1rem; color: var(--stock);
  background: var(--ink-blue); border: 2px solid var(--ink-blue);
  padding: 10px 20px; text-decoration: none; margin: .4em 0; }
.hunt-all:hover { background: color-mix(in srgb, var(--ink-blue) 86%, var(--print)); }
.disclosure { font-size: .8rem; color: var(--print-quiet); }

/* ---------- the register run: years as cells, held or blind ---------- */
.run { display: flex; flex-wrap: wrap; gap: 6px; margin: 1em 0 1.4em; }
.run a, .run span.gap {
  display: block; padding: 8px 12px; font-variant-numeric: tabular-nums;
  border: 1px solid var(--trim); text-decoration: none; color: var(--print);
  font-size: .95rem;
}
.run a { background: var(--stock-raised); border-color: var(--print); }
.run a:hover { background: var(--ink-blue); color: var(--stock); border-color: var(--ink-blue); }
.run span.gap {
  color: var(--print-quiet);
  background: var(--stock-recessed);
  box-shadow: inset 1px 1px 2px var(--deboss-dark), inset -1px -1px 1px var(--deboss-light);
  border-style: dashed;
}
.run.mini { gap: 4px; margin: .45em 0 .2em; }
.run.mini a, .run.mini span.gap { padding: 3px 7px; font-size: .8rem; }

/* a lineage entry: register name + its run + its weight */
.lineage { margin: 1.1em 0 1.4em; }
.lineage .head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.lineage .head a.name { font-size: 1.05rem; color: inherit; text-decoration: none;
  border-bottom: 1px dashed var(--trim); }
.lineage .head a.name:hover { color: var(--ink-blue); border-bottom-color: var(--ink-blue); }
.lineage .head .w { color: var(--print-quiet); font-size: .85rem; }

/* press-log entries: the diff, materially */
.logentry { border-left: 1px solid var(--trim); padding: 2px 0 2px 16px; margin: 1.1em 0; }
.logentry .when { font-size: .8rem; color: var(--print-quiet); letter-spacing: .04em; }
.logentry .delta { font-variant-numeric: tabular-nums; }
.logentry .up { color: var(--ink-blue); }
.logentry .down { color: var(--ink-red); }

/* ---------- the desk register: tape, depth, tickets ---------- */
/* the tape: a strip of readouts. Label whispers, figure shouts. */
.tape { display: flex; flex-wrap: wrap; border: 1px solid var(--print); margin: 1.1em 0; }
.tape .cell { flex: 1 1 auto; min-width: 7.5rem; padding: 10px 16px 12px;
  border-right: 1px solid var(--trim); }
.tape .cell:last-child { border-right: 0; }
.tape .cell small { display: block; font-size: .62rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--print-quiet); margin-bottom: 2px; }
.tape .cell .v { font-size: clamp(1.3rem, 3vw, 1.8rem); line-height: 1.1;
  font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.tape .cell .v .unit { font-size: .58em; color: var(--print-quiet); letter-spacing: 0; }
.tape .cell.blue .v { color: var(--ink-blue); }
.tape .cell.red .v { color: var(--ink-red); }

/* depth: each group's share of the population in hand, like depth of book */
.depth { position: relative; height: 4px; background: var(--stock-recessed);
  box-shadow: inset 1px 1px 1px var(--deboss-dark); margin-top: 6px; }
.depth i { position: absolute; inset: 0 auto 0 0; background: var(--ink-blue); display: block; }

/* the order ticket: a hunt is an action, set like one */
.hunt, .hunt-all { text-transform: uppercase; letter-spacing: .07em; font-size: .78rem; }
a.hunt { color: var(--ink-blue); text-decoration: none; border: 1px solid var(--ink-blue);
  padding: 5px 10px; white-space: nowrap; }
a.hunt:hover { background: var(--ink-blue); color: var(--stock); }
.hunt-all { font-size: .95rem; padding: 12px 26px; }

/* deltas read at a glance: direction is typography, not just colour */
.logentry { padding: 6px 0 6px 16px; }
.logentry .delta { font-size: 1.15rem; }
.logentry .up::before { content: "▲ "; font-size: .8em; }
.logentry .down::before { content: "▼ "; font-size: .8em; }

/* group headers carry their weight like a book row */
.boxrow { margin: 1.15em 0; }
.boxrow header .count { font-size: 1.05rem; color: var(--print); }

/* ---------- small screens: the box still reads like a box ---------- */
@media (max-width: 640px) {
  .pitch { font-size: 1rem; }

  main, .mast, footer.bar .inner { width: calc(100% - 28px); }
  .mast { flex-wrap: wrap; row-gap: 2px; padding-top: 18px; }
  .mast .mark { flex: 1 1 100%; }
  /* Wrapping was fine when the nav had four items; the sixth strands itself on a
     line of its own. One scrolling row instead - nothing hidden, nothing orphaned. */
  .mast nav { margin-left: 0; gap: 16px; font-size: .85rem; flex-wrap: nowrap;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    padding-bottom: 2px; }
  .mast nav::-webkit-scrollbar { display: none; }
  .mast nav a { white-space: nowrap; }
  /* A nav item clipped at the edge looks like a bug; a fade looks like a scroll. */
  .mast nav { -webkit-mask-image: linear-gradient(to right, #000 88%, transparent);
              mask-image: linear-gradient(to right, #000 88%, transparent); }
  .proof { padding: 18px 14px; margin: 18px 0; }
  h1 { font-size: clamp(2.4rem, 12vw, 3.2rem); }
  .tape .cell { min-width: 0; flex: 1 1 40%; padding: 8px 12px 10px; }
  .tape .cell .v { font-size: 1.35rem; }
  .resolver { flex-wrap: wrap; }
  .resolver input { flex: 1 1 100%; }
  .resolver button { flex: 1 1 100%; }
  .dividers button { padding: 6px 11px 5px; font-size: .85rem; }
  .boxrow header { row-gap: 2px; }
  .boxrow header .hunt { margin-left: 0; }
  .rows a.row { padding: 10px 6px; }
  .fields th { width: 7.5rem; font-size: .78rem; }
  .run a, .run span.gap { padding: 6px 9px; font-size: .85rem; }
  .doors { grid-template-columns: 1fr; }
}

/* Row marks: what separates two rows that otherwise print the same words. */
.rows .line2 .par, .rows .line1 .par { border: 1px solid var(--trim); padding: 0 5px; margin-left: 6px;
  font-size: .72rem; color: var(--print); }
.rows .line2 .run { margin-left: 5px; font-size: .74rem; font-variant-numeric: tabular-nums;
  color: var(--ink-red); }

/* ---------- the shell (restructure S3): slim mast + phone thumb bar ------ */
.mast-here { display: none; }
.bbar { display: none; }
@media (max-width: 640px) {
  .mast nav.mast-nav { display: none; }
  .mast .mast-ask { display: none; }   /* the thumb bar carries Ask on phones —
     the orphan button under the wordmark read as debris (Kendall) */
  .mast .mast-here {
    display: inline; margin-left: auto; color: var(--print-quiet);
    font-size: .82rem; letter-spacing: .06em; text-transform: uppercase;
    font-family: "PK Display", "Arial Narrow", sans-serif;
  }
  body { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
  .bbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: flex; align-items: stretch;
    background: var(--stock); border-top: 2px solid var(--print);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .bbar a, .bbar .bbar-more {
    flex: 1 1 0; min-width: 0; text-align: center; padding: 8px 3px 9px;
    font: inherit; font-size: .7rem; line-height: 1.15; letter-spacing: .01em;
    text-decoration: none; color: var(--print-quiet);
    background: none; border: 0; border-radius: 0; border-left: 1px solid var(--trim);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
  }
  .bbar > :first-child { border-left: 0; }
  .bbar a[aria-current="page"] { color: var(--print); box-shadow: inset 0 3px 0 var(--ink-blue); }
  #bbar-sheet {
    position: fixed; right: 8px; bottom: calc(56px + env(safe-area-inset-bottom) + 6px);
    display: flex; flex-direction: column; min-width: 11.5rem; z-index: 61;
    background: var(--stock-raised); border: 1px solid var(--print);
    box-shadow: 3px 4px 0 var(--deboss-dark);
  }
  #bbar-sheet a {
    padding: 12px 15px; text-decoration: none; color: var(--print);
    border-bottom: 1px solid var(--trim); font-size: .92rem;
  }
  #bbar-sheet a:last-child { border-bottom: 0; }
  #bbar-sheet a[aria-current="page"] { color: var(--ink-blue); }
  #bbar-sheet[hidden] { display: none; }
}

/* ---------- the clerk's drawer (C4): the counter, over any page ---------- */
.mast-ask {
  font: inherit; font-size: .85rem; margin-left: 18px; cursor: pointer;
  background: var(--stock-raised); border: 1px solid var(--ink-blue);
  color: var(--ink-blue); border-radius: 0; padding: 3px 12px;
}
.mast-ask:hover { background: var(--ink-blue); color: var(--stock); }
.bbar-ask { color: var(--ink-blue) !important; }
#clerk-drawer {
  position: fixed; z-index: 80; display: flex; flex-direction: column;
  background: var(--stock); border: 2px solid var(--print);
  box-shadow: 4px 5px 0 var(--deboss-dark);
  right: 12px; bottom: 12px; width: min(420px, calc(100vw - 24px));
  max-height: min(560px, 78vh);
  /* arrive like a drawer, not a teleport (C6: "disorienting") */
  transition: transform .22s ease, opacity .18s ease;
}
#clerk-drawer[hidden] { display: none; }
#clerk-drawer.cd-closed { transform: translateY(14px); opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { #clerk-drawer { transition: none; } }
#clerk-scrim {
  position: fixed; inset: 0; z-index: 79; background: rgb(0 0 0 / .35);
}
#clerk-scrim[hidden] { display: none; }
.cd-head {
  display: flex; align-items: baseline; gap: 10px; padding: 9px 12px;
  border-bottom: 2px solid var(--print); background: var(--stock-raised);
}
.cd-head b {
  font-family: "PK Display", "Arial Narrow", sans-serif; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
}
.cd-head .small { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#cd-close {
  font: inherit; font-size: 1.1rem; line-height: 1; cursor: pointer;
  background: none; border: 0; color: var(--print-quiet); padding: 0 2px;
}
#cd-close:hover { color: var(--ink-red); }
#cd-log { overflow-y: auto; padding: 10px 12px; flex: 1; min-height: 120px; }
.cd-q {
  margin: 6px 0 6px 14%; padding: 8px 11px; font-size: .92rem;
  background: var(--ink-blue-wash); border: 1px solid var(--trim);
}
.cd-a {
  margin: 6px 14% 6px 0; padding: 8px 11px; font-size: .92rem; line-height: 1.45;
  background: var(--stock-raised); border: 1px solid var(--trim);
}
/* the clerk's rendered markdown (P8h): its lists sit inside the answer's own
   padding, and its inline links read as links without stealing the receipts'
   button treatment below */
.cd-a ul { margin: 5px 0; padding-left: 1.15em; }
.cd-a li { margin: 2px 0; }
.cd-a > a, .cd-a li a { color: var(--ink-blue); text-decoration: underline; }
.cd-r { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 5px; }
.cd-r a {
  font-size: .74rem; text-decoration: none; border: 1px solid var(--ink-blue);
  color: var(--ink-blue); padding: 2px 8px;
}
.cd-r a:hover { background: var(--ink-blue); color: var(--stock); }
#cd-form { display: flex; border-top: 2px solid var(--print); }
#cd-in {
  /* 16px is load-bearing: any smaller and iOS Safari zooms the whole page
     on focus (Kendall's phone, 2026-08-30) */
  flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 10px 12px;
  border: 0; background: var(--stock); color: var(--print);
}
#cd-in:focus-visible { outline: none; box-shadow: inset 0 -2px 0 var(--ink-blue); }
#cd-form button {
  font: inherit; font-size: .9rem; padding: 0 16px; cursor: pointer;
  background: var(--ink-blue); color: var(--stock); border: 0; border-radius: 0;
}
@media (max-width: 640px) {
  #clerk-drawer {
    left: 0; right: 0; bottom: calc(52px + env(safe-area-inset-bottom));
    width: auto; border-left: 0; border-right: 0; border-bottom: 0;
    max-height: 66vh; box-shadow: 0 -3px 0 var(--deboss-dark);
  }
}

/* ---------- live eBay listings: the merchandise leads ---------------------
   A listing row is a shop shelf, not a ledger line: the card photo at real
   size, the price in ink, the classifier's verdict as the small print. */
.lrows { list-style: none; margin: .4em 0 0; padding: 0; }
.lrows li { border-top: 1px solid var(--trim); }
.lrows li:first-child { border-top: 2px solid var(--print); }
a.litem {
  display: flex; gap: 14px; padding: 12px 0; align-items: flex-start;
  text-decoration: none; color: var(--print);
}
a.litem:hover .li-title, a.litem:focus-visible .li-title { text-decoration: underline; }
.li-img {
  flex: 0 0 104px; width: 104px; aspect-ratio: 63/88; object-fit: contain;
  background: var(--stock-recessed); border: 1px solid var(--trim);
  box-shadow: inset 1px 1px 2px var(--deboss-dark);
}
.li-noimg {
  display: flex; align-items: center; justify-content: center;
  color: var(--trim); font-size: 1.6rem;
}
.li-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.li-title {
  font-size: .92rem; line-height: 1.32;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.li-price { font-size: .88rem; }
.li-price b { font-size: 1.12rem; letter-spacing: .01em; }
.li-why {
  font-size: .74rem; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
