/* The two edition faces, shipped with the page (SIL OFL, licences in assets/fonts/): the screen sets
   its own type instead of whatever the buyer's machine has. Subset to Latin,
   Latin Extended-A/B and Cyrillic; local files only, so the offline rule holds. */
@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-400i.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('fonts/plex-mono-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('fonts/plex-mono-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Source Serif 4'; src: url('fonts/source-serif-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Source Serif 4'; src: url('fonts/source-serif-400i.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Source Serif 4'; src: url('fonts/source-serif-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Source Serif 4'; src: url('fonts/source-serif-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

/* Faces for the typed papers and the shell's display type: Special Elite (Apache 2.0) for typed papers, Fraunces
   (SIL OFL, the TraceWall site's display face, variable weight and optical size) for the shell's titles.
   Each is a latin file plus a latin-ext file joined by unicode-range, so Polish letters are covered; see fonts/README.txt. */
@font-face { font-family: 'Special Elite'; src: url('fonts/special-elite-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Special Elite'; src: url('fonts/special-elite-400-ext.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Fraunces'; src: url('fonts/fraunces-opsz-normal.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Fraunces'; src: url('fonts/fraunces-opsz-normal-ext.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Fraunces'; src: url('fonts/fraunces-opsz-italic.woff2') format('woff2'); font-weight: 100 900; font-style: italic; font-display: swap; unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Fraunces'; src: url('fonts/fraunces-opsz-italic-ext.woff2') format('woff2'); font-weight: 100 900; font-style: italic; font-display: swap; unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* ==========================================================================
   THE SIDE DOOR - styling
   The shell wears the TraceWall site's scheme (site fix plan, P4, 2026-11-23; site/app/src/tokens.css):
   near-black, chalk text and one brass accent, set in Fraunces, so the demo reads as part of the site.
   It replaced set B "Lamp left on" (2026-11-19, docs/design.md). The evidence stays on the house papers;
   each document voice (the end of this file) is a paper and a type, so a badge export never reads like
   a person's words.
   ========================================================================== */

html { color-scheme: dark; scroll-padding-top: calc(var(--topbar-h) + 14px); }

:root {
  /* The shell. Every text colour below is checked against the grounds it is set on by
     tests/unit.html (at least 4.5:1), so a change here is measured, not eyeballed. */
  --bg:         #0a0806;   /* the site's near-black; also theme-color in index.html */
  --bg-2:       #050403;   /* deeper: the bar, sealed parts, the case report */
  --bg-2-rgb:   5,4,3;     /* --bg-2 for the translucent bar, hint panel and dimmed backdrops */
  --panel:      #17120d;   /* task, notes and hint panels */
  --panel-2:    #1e1811;   /* the raised panel, the task card */
  --line:       #4a3f33;
  --line-soft:  #2a231c;
  --field:      #120e0a;   /* typed-into fields on the dark shell */
  --glow:       #2a1f14;   /* a warm light at the top of the page */
  --glow-deep:  #070504;   /* the dark corner under it */

  --paper:      #e7e4dc;
  --paper-2:    #dbd6ca;
  --paper-edge: #c3bcab;
  --ink:        #17191a;
  --ink-soft:   #474b4c;
  --ink-label:  #5a5348;   /* printed label grey; was two near-identical literals */

  --accent:     #dfb15b;   /* brass: labels, IDs, the primary button */
  --accent-hi:  #f0cf8a;   /* the accent under the pointer */
  --accent-dim: #8a6a2c;   /* rules and frames only, never for text */
  --accent-rgb: 223,177,91; /* --accent for washes */
  --on-accent:  #1a1205;   /* text on an accent fill */
  --fluor:      #f0e7d6;   /* links */
  --accent-paper: #8a3a0c;      /* the accent on a paper card (6.1:1 on --paper) */
  --accent-paper-deep: #6e2e09; /* the same under the pointer */
  /* A warning must never read as the accent, so it stays a rose, clear of the brass. */
  --danger:     #ffa0b4;
  --danger-rgb: 255,160,180;
  --danger-paper: #9b1c31;      /* an error on a paper card; --danger is made for the dark shell */
  --ok:         #8fdcb6;

  --text:       #f0e7d6;
  --text-dim:   #b9ab92;
  --title:      #f0e7d6;
  --title-lead: #e9d3a8;

  /* The site's focus ring (site/app/src/tokens.css): 2 px chalk with a 3 px offset on the dark shell, ink on a
     paper card. Every :focus-visible rule below draws var(--focus-ring); a paper card swaps it. */
  --focus-on-dark:  #f0e7d6;
  --focus-on-paper: #1c1b17;
  --focus-ring:     var(--focus-on-dark);

  /* Type: the shell's text uses only the TraceWall site's 8 steps (site/app/src/tokens.css), written here as literal
     px: 14 label (the minimum), 16 UI, 18 body, 21 lead, 24, 30, 40 and 56 display. A document's text keeps its
     own size, raised to 14 px where it was smaller (site fix plan, P4). */

  /* Measured heights of the sticky bar; anything that scrolls into view has to
     clear it, and the rail hangs off it too. */
  --topbar-h: 62px;

  /* No web fonts: the app runs from file:// with no network, so these stacks are
     what actually renders. Everything after the first entry is a face that ships
     with a major OS and carries Cyrillic. */
  --mono: 'IBM Plex Mono', Consolas, 'Cascadia Mono', Menlo, 'DejaVu Sans Mono', 'Courier New', monospace;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', 'Liberation Serif', serif;
  --typewriter: 'Special Elite', 'Courier New', monospace;
  --display: 'Fraunces', 'Iowan Old Style', Georgia, 'Times New Roman', serif;   /* the site's display face */
}

* { box-sizing: border-box; }

/* Touch behaviour and motion preferences apply to the whole document. */
button, a, input, select, textarea, summary {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(var(--accent-rgb),.2);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background:
    radial-gradient(1100px 620px at 50% -200px, var(--glow) 0%, transparent 70%),
    radial-gradient(900px 600px at 110% 100%, var(--glow-deep) 0%, transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--display);   /* the shell reads in the site's face; .doc sets the documents' --serif */
  font-size: 18px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--mono); font-weight: 600; letter-spacing: .02em; margin: 0; }
a { color: var(--fluor); }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
/* A paper card (not the dark photo frame) swaps the ring to ink. */
.doc:not(.v-frame) { --focus-ring: var(--focus-on-paper); }
::selection { background: var(--accent); color: var(--on-accent); }

.shell { max-width: 1360px; margin: 0 auto;
  padding: 0 max(28px, env(safe-area-inset-left)) 100px max(28px, env(safe-area-inset-right)); }

/* ---------- Top bar ------------------------------------------------------ */

.topbar { position: sticky; top: 0; z-index: 20; background: rgba(var(--bg-2-rgb),.985);
  backdrop-filter: blur(14px); }
/* The accent double rule under the bar. Drawn outside the box, so the bar's measured height
   (the sweep holds it to one 72px row) does not change. */
.topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -3px;
  border-bottom: 3px double var(--accent-dim); pointer-events: none; }
.topbar-in { max-width: 1360px; margin: 0 auto; padding: 12px 28px;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.brand { font-family: var(--mono); font-size: 14px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--paper); white-space: nowrap; }
.brand b { color: var(--accent); font-weight: 600; }
.brand span { color: var(--text-dim); letter-spacing: .1em; }
.topbar-spacer { flex: 1 1 auto; }
.stat { font-family: var(--mono); font-size: 14px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-dim); white-space: nowrap; }
.stat b { color: var(--paper); font-weight: 500; letter-spacing: .06em; }
.envnav { display: flex; align-items: center; gap: 6px; }
.envnav .envlink { display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 0 6px; font-family: var(--mono); font-size: 14px;
  color: var(--paper); background: none; cursor: pointer; text-decoration: none;
  border: 1px solid var(--line); border-radius: 2px; }
.envnav .envlink:hover { border-color: var(--accent); color: var(--title); }
.envnav .envlink:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }

/* ---------- Buttons ------------------------------------------------------ */

.btn { font-family: var(--mono); font-size: 14px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--paper); background: transparent; border: 1px solid var(--line); border-radius: 2px;
  padding: 10px 18px; min-height: 44px; cursor: pointer;
  transition: border-color .15s, background .15s, color .15s; }
.btn:hover { border-color: var(--accent); color: var(--title); background: rgba(var(--accent-rgb),.12); }
.btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.btn-primary { border-color: var(--accent); background: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn-primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); color: var(--on-accent); }
.btn-ghost { border-color: var(--line-soft); color: var(--text-dim); }
/* The irreversible choice in a confirmation dialog must not be the eye-catching one. */
.btn-danger { border-color: var(--danger); background: transparent; color: var(--danger); }
.btn-danger:hover { background: rgba(var(--danger-rgb),.14); border-color: var(--danger); color: var(--danger); }
.btn-ghost:hover { color: var(--paper); }
.btn-sm { padding: 7px 14px; min-height: 44px; font-size: 14px; letter-spacing: .12em; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- Paper document card ------------------------------------------ */

.doc {
  position: relative;
  color-scheme: light;   /* native dropdowns inside a paper card must not open dark */
  background: linear-gradient(175deg, var(--paper) 0%, var(--paper-2) 100%);
  color: var(--ink);
  padding: 30px;
  border-radius: 1px;
  box-shadow: 0 1px 0 var(--paper-edge), 0 18px 34px -22px rgba(0,0,0,.9), 0 2px 8px rgba(0,0,0,.35);
  font-family: var(--serif);
  font-size: 17px;   /* the body size the documents were set against; the shell's body is now 18 px */
}
.doc + .doc { margin-top: 26px; }
.doc-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  flex-wrap: wrap; border-bottom: 2px solid var(--ink); padding-bottom: 9px; margin-bottom: 16px; }
.doc-title { font-family: var(--mono); font-size: 14.5px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; margin: 0; }
/* Uppercased because the class also carries lowercase labels ("sheet 3", "not graded"), and
   16% tracking spread across lowercase words reads as a defect.
   margin-left keeps it right-aligned when the letterhead row wraps. It may wrap itself: kept on one
   line, "referred to a separate investigation" on the verdict ran 2-68px past a phone in every
   edition (external UI test 2026-10-02, W1). A short id still sits on the title's row, since a
   wrapping flex row moves an item down whole before it breaks its words. */
.doc-id { font-family: var(--mono); font-size: 14px; letter-spacing: .12em; color: var(--ink-label);
  text-transform: uppercase; overflow-wrap: anywhere; text-align: right; min-width: 0; margin-left: auto; }
.doc-sub { font-family: var(--mono); font-size: 14px; letter-spacing: .05em; color: var(--ink-label);
  margin: -6px 0 16px; text-transform: uppercase; }
/* Measure: uncapped, the evidence ran to ~150 characters a line on a wide window. */
.doc p, .doc li, .doc .memo { max-width: 70ch; }
.doc p { margin: 0 0 12px; font-size: 16px; color: #23262a; }
.doc p:last-child { margin-bottom: 0; }
/* A machine export is a narrow column. Stretched to the card, ~180px of nothing
   opened between a timestamp and its flag — across which stage 1 has to correlate. */
.doc table { width: auto; max-width: 100%; border-collapse: collapse; font-family: var(--mono);
  font-size: 14px; margin: 4px 0 6px; font-variant-numeric: tabular-nums; }
.doc th { text-align: left; padding: 7px 28px 7px 0; border-bottom: 1.5px solid var(--ink);
  font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-label);
  font-weight: 500; }
.doc td { padding: 8px 28px 8px 0; border-bottom: 1px dotted rgba(23,25,26,.28); vertical-align: top; }
.doc tr:last-child td { border-bottom: none; }
.doc th:last-child, .doc td:last-child { padding-right: 0; }
.doc td.t { white-space: nowrap; }
.doc td.t { font-weight: 600; }
.doc td.tm { white-space: nowrap; }
/* E02: the heading row "Round" spans the three time columns; the empty cell above Key and Where has no rule. */
.doc th.grp { text-align: center; padding-right: 0; padding-bottom: 3px; border-bottom: 1px solid var(--ink); }
.doc table.dial thead td { border-bottom: none; padding: 0; }
.doc .memo { font-style: italic; font-size: 14.5px; color: var(--ink-soft);
  border-left: 2px solid rgba(23,25,26,.25); padding-left: 14px; margin: 16px 0 4px; }
.doc .stamp { display: inline-block; margin-top: 16px; font-family: var(--mono); font-size: 14px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--accent-paper);
  border: 1.5px solid currentColor; padding: 5px 10px; transform: rotate(-1.4deg); opacity: .9; }
.doc hr { border: none; border-top: 1px solid rgba(23,25,26,.2); margin: 18px 0; }
.doc ol, .doc ul { margin: 4px 0 0; padding-left: 22px; font-size: 15.5px; }
.doc ul.plain { list-style: none; padding-left: 0; }
/* A note added by hand on a typed or printed paper, in any voice: the engine's hand is the serif italic in ink
   blue; a pencil answer is graphite. A voice with its own hand (the notebook) sets it after this rule. */
.doc .hand { font-family: var(--serif); font-style: italic; font-size: 17px; color: #22324a; }
.doc .pencil { font-family: var(--serif); font-style: italic; font-size: 17px; color: #4b4a47; }
.doc li { margin-bottom: 8px; }

/* ---------- Voice modifiers (section 6a) --------------------------------- */

/* Case 8's own voices (system log, chat, receipts, the two statements) are at the end of this file. */

/* handwriting: ruled paper, slanted face, rotated margin notes */
/* The ruling is offset so the writing sits on it rather than floating between two
   rules, and .hand keeps the 28px pitch instead of inheriting a 12px paragraph gap
   that walked every later line further off the lines. */
.v-notebook { background:
    repeating-linear-gradient(180deg, transparent 0 27px, rgba(40,70,110,.16) 27px 28px),
    linear-gradient(175deg, #edeae0, #e2ddd0);
  background-position: 0 -8px, 0 0; }
.v-notebook .hand { font-family: var(--serif); font-style: italic; font-size: 18.5px;
  color: #22324a; line-height: 28px; margin: 0 0 28px; }
.v-notebook .hand u { text-decoration-thickness: 2px; text-underline-offset: 3px; }
.v-notebook .margin { font-family: var(--serif); font-style: italic; font-size: 14px;
  color: #3a4a66; transform: rotate(-1.2deg); margin: 10px 0 0 18px; }

/* fax cover sheet: header band plus a hurried handwritten line */
.v-fax .band { border: 2px solid var(--ink); padding: 10px 12px; margin-bottom: 14px;
  font-family: var(--mono); font-size: 14px; letter-spacing: .1em; text-transform: uppercase; }
.v-fax .grid { display: grid; grid-template-columns: 110px 1fr; gap: 6px 14px;
  font-family: var(--mono); font-size: 14px; margin-bottom: 14px; }
.v-fax .grid span:nth-child(odd) { color: var(--ink-label); text-transform: uppercase; font-size: 14px; letter-spacing: .1em; }
.v-fax .hand { font-family: var(--serif); font-style: italic; font-size: 17px; color: #22324a;
  transform: rotate(-.6deg); }

/* internal mail: key-value header, quoted body */
.v-email .hdr { font-family: var(--mono); font-size: 14px; border-left: 3px solid rgba(23,25,26,.3);
  padding-left: 12px; margin-bottom: 14px; }
.v-email .hdr b { color: var(--ink-label); font-weight: 500; }

/* the opening brief: same stock as the field notes, with its own sub-headings */
.brief-head { font-family: var(--mono); font-size: 14px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-label); margin: 0 0 10px; }
.brief p + p { margin-top: 12px; }

/* officer's notebook: wider leading, occasional strikethrough */
.v-fieldnotes p { font-size: 16.5px; line-height: 1.85; }
.v-fieldnotes s { color: #6a6559; }

/* corporate form: boxed fields with printed labels */
.v-form .fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.v-form .field { border: 1px solid rgba(23,25,26,.45); padding: 8px 10px; }
.v-form .field span { display: block; font-family: var(--mono); font-size: 14px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-label); margin-bottom: 4px; }
.v-form .field b { font-family: var(--mono); font-size: 15px; font-weight: 600; }

/* technical drawing: white plate, thin rules, dimensions in mono */
.v-drawing { background: #f2f0ea; }
.v-drawing svg { display: block; width: 100%; height: auto; }
/* Scaled to a column card, the section's labels fall to 6-8px. Chromium rounds SVG text to whole pixels
   unless asked for geometric precision, so a label grew past its room as the drawing shrank
   (UI re-check 2026-10-02, W7); the labels now scale exactly with their walls. */
.v-drawing svg text { text-rendering: geometricPrecision; }
/* The section's legend stands below the drawing, never over it. */
.fig-legend { margin-top: 16px; }

/* The document voices. Each document type has one look, so a group sorting 23 sheets can tell a
   laboratory result from a witness's words at a glance. */
/* county laboratory sheet: pale green form paper, a printed header band over the results */
.v-lab { background: #e6ebe4; }
.v-lab .doc-head { border-bottom: 3px double rgba(23,25,26,.55); }
.v-lab table { font-size: 14px; }
.v-lab thead th { background: rgba(23,25,26,.08); }
.v-lab td:first-child { font-family: var(--mono); font-size: 14px; white-space: nowrap; }
/* Warren's notebook: aged cream, the year in the margin, one line in his hand */
.v-diary { background: linear-gradient(175deg, #efe6d2, #e3d7bd); }
.v-diary p { display: grid; grid-template-columns: 3.4em 1fr; gap: 12px; align-items: baseline; margin: 0 0 10px; }
.v-diary .year { font-family: var(--serif); font-size: 14px; color: #7a6a4c; }
.v-diary .hand { font-family: var(--serif); font-style: italic; font-size: 17.5px; color: #2a2a3a; }
.v-diary p.margin { display: block; font-family: var(--serif); font-style: italic; font-size: 14px; color: #5a4a30;
  border-left: 2px solid rgba(90,74,48,.4); padding-left: 12px; margin: 14px 0; }
/* Claire's pamphlet: printed local history, justified, a drop cap to open it */
.v-pamphlet p { font-family: var(--serif); font-size: 16.5px; line-height: 1.7; text-align: justify; hyphens: auto; }
.v-pamphlet .evidence-photo + p::first-letter, .v-pamphlet .doc-sub + p::first-letter {
  float: left; font-size: 3.1em; line-height: .9; padding: 4px 8px 0 0; font-weight: 600; }
/* the band leader's list: a yellow legal pad with its red margin line */
.v-showbiz { background: linear-gradient(90deg, transparent 0 40px, rgba(190,60,50,.5) 40px 41px, transparent 41px), #f0e6a8;
  padding-left: 58px; }
.v-showbiz table { font-family: var(--mono); font-size: 14px; }
.v-showbiz tbody tr:nth-child(odd) { background: transparent; }
/* a letter: laid cream paper, the letterhead set apart */
.v-letter { background: repeating-linear-gradient(90deg, rgba(23,25,26,.018) 0 2px, transparent 2px 6px), #f2ede1; }
.v-letter p { font-family: var(--serif); font-size: 16.5px; line-height: 1.7; }
.v-letter .letterhead { font-family: var(--serif); font-size: 14px; letter-spacing: .06em; font-variant: small-caps;
  color: var(--ink-label); border-bottom: 1px solid rgba(23,25,26,.3); padding-bottom: 8px; margin-bottom: 16px;
  text-align: center; }
/* the deputy's list of those present (E01): names in columns */
.doc .doc-sub-head { font-family: var(--mono); font-size: 14px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-label); margin: 18px 0 8px; }
.doc .name-list { columns: 3 12em; column-gap: 24px; font-family: var(--mono); font-size: 14px; padding-left: 28px; }
.doc .name-list li { margin-bottom: 4px; break-inside: avoid; }
.plan-legend { font-family: var(--mono); font-size: 14px; line-height: 1.75; list-style: none; padding: 0; margin: 14px 0 0; }

/* camera still: black plate, white caption strip, stamp block */
/* Its own border: at 1.13:1 against the page the card read as a hole rather than
   as a sheet, and the paper-edge hairline showed under it as a stray line. */
.v-frame { background: #14161a; color: #e7e4dc; color-scheme: dark;
  border: 1px solid var(--line); box-shadow: 0 18px 34px -22px rgba(0,0,0,.9); }
.v-frame .doc-head { border-bottom-color: #e7e4dc; }
.v-frame .doc-title, .v-frame .doc-id, .v-frame .doc-sub { color: #e7e4dc; }
.v-frame svg { display: block; width: 100%; height: auto; }
.v-frame .caption { background: #e7e4dc; color: var(--ink); font-family: var(--mono);
  font-size: 14px; letter-spacing: .1em; padding: 10px 12px; margin-top: 12px; text-transform: uppercase; }
.v-frame .memo { color: #b9bcbe; border-left-color: rgba(231,228,220,.3); }

/* ---------- Evidence photographs and lightbox ---------------------------- */

.evidence-photo { margin: 4px 0 16px; }
/* By section 6b.2 no photograph carries case information, so uncapped they made
   the least informative elements the largest on the page — up to 1149px tall. */
.evidence-photo img { display: block; width: 100%; height: auto; max-height: 360px;
  object-fit: cover; object-position: center; border: 1px solid rgba(23,25,26,.35);
  background: #d5d1c6; }
.photo-zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.photo-zoom:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.evidence-photo figcaption { font-family: var(--mono); font-size: 14px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-label); margin-top: 6px; }
/* Centring by flex clips whatever is taller than the viewport at BOTH ends, with
   no way to scroll to either: the magnified plan lost its title block and its
   clearance table — the numbers stage 3 runs on. Auto margins centre what fits
   and scroll what does not. */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(var(--bg-2-rgb),.96);
  display: flex; align-items: flex-start; justify-content: flex-start; padding: 28px;
  cursor: zoom-out; overflow: auto; overscroll-behavior: contain; }
.lightbox > * { margin: auto; }
.lightbox img { max-width: 100%; max-height: 92vh; width: auto; height: auto; }
.lightbox .close { position: fixed; top: 18px; right: 20px; }
/* The zoom (external UI test 2026-10-02, W2): the Close button stood as light text on no ground over
   the light paper of a drawing (about 1.1:1), and on a phone it is the only way out. It takes the top
   bar's ground and a ring that shows on paper and on the dark backdrop alike. The top padding keeps a
   band for it, so the drawing or the photograph starts below it. */
.lightbox-zoom { padding-top: 74px; }
.lightbox-zoom .close { z-index: 1; background: var(--bg-2); color: var(--text); border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(0,0,0,.45); }
.lightbox-zoom .close:hover { background: var(--panel); color: var(--title); border-color: var(--accent-hi); }
.lightbox-zoom .close:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--bg-2); }
/* A photograph and its caption fit the window under that band. */
.zoom-photo { margin: auto; text-align: center; }
.zoom-photo img { display: block; margin: 0 auto; max-height: calc(100vh - 160px); }

/* ---------- Page header, stage sections ---------------------------------- */

.page-head { padding: 48px 0 26px; border-bottom: 1px solid var(--line-soft); margin-bottom: 32px; }
.page-title { font-family: var(--display); font-size: 40px; line-height: 1.05;
  color: var(--title); font-weight: 700; letter-spacing: .005em; text-wrap: balance; }
/* A stage sits inside an envelope, so it cannot render at the size of the case
   title: the page read 50 / 25 / 50 down the hierarchy. */
.stage .page-title, .env-docs .page-title { font-size: 30px; }
.page-tags { display: flex; gap: 8px 22px; flex-wrap: wrap; margin-top: 16px; font-family: var(--mono);
  font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.lede { font-size: 21px; color: var(--text); max-width: 760px; }
.stage-grid { display: grid; grid-template-columns: minmax(0, 1fr) 352px; gap: 30px; align-items: start; }
.stage-grid > * { min-width: 0; }
/* A wide document stands in its numeric place, so narrow documents can follow it (W7, 2026-10-02). */
.wide-docs + .stage-grid { margin-top: 26px; }
/* Anything scrolled to by script lands under the sticky bar without this. */
.envelope, .stage, .envelope h2 { scroll-margin-top: calc(var(--topbar-h) + 14px); }
/* The rail is taller than a laptop viewport once hints are open, so it scrolls
   within itself instead of pinning its own foot below the fold. */
.rail { position: sticky; top: calc(var(--topbar-h) + 12px); display: flex; flex-direction: column;
  gap: 20px; max-height: calc(100vh - var(--topbar-h) - 24px); overflow-y: auto;
  overscroll-behavior: contain; }
@media (max-width: 1100px) { .stage-grid { grid-template-columns: minmax(0, 1fr); } .rail { position: static; } }

/* ---------- Task panel, worksheet, hints --------------------------------- */

.task { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); padding: 22px 24px 24px; }
.task h3, .task h4 { font-size: 14px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px; }
.task p { margin: 0 0 14px; color: var(--paper); font-size: 16px; }
.note-field { width: 100%; font-family: var(--mono); font-size: 14px; background: var(--field);
  color: var(--text); border: 1px solid var(--line); border-radius: 2px; padding: 9px 11px; }
/* A real outline, not a box-shadow: forced-colors drops box-shadows, and a field with no visible focus is unusable
   there. */
.note-field:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px;
  border-color: var(--accent); }
.note-label { display: block; font-family: var(--mono); font-size: 14px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-dim); margin: 14px 0 5px; }
.note-hint { display: block; font-family: var(--mono); font-size: 14px; color: var(--text-dim);
  margin: 4px 0 0; }

/* The theory card is paper: a black terminal field in the middle of a cream sheet
   was the sharpest metaphor collision in the app, and its label sat at 2.7:1. */
.doc .note-label { color: var(--ink-label); }
.doc .note-hint { color: rgba(23,25,26,.55); }
.doc .note-field { background: rgba(255,255,255,.62); color: var(--ink);
  border-color: rgba(23,25,26,.42); }
.doc .note-field::placeholder { color: rgba(23,25,26,.4); }
.doc .note-field:focus-visible { border-color: var(--accent-paper); background: #fff; }

/* A pre-printed working blank (section 9.5), so it lives on paper: dark ink,
   light fields. It used to carry the dark-chrome tokens and the route column
   rendered at 1.00 contrast against the card. */
.worksheet { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 14px;
  font-variant-numeric: tabular-nums; color: var(--ink); }
.worksheet th { text-align: left; padding: 8px 8px 8px 0; border-bottom: 1.5px solid var(--ink);
  font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-label);
  font-weight: 500; vertical-align: bottom; }
.worksheet td { padding: 6px 8px 6px 0; border-bottom: 1px dotted rgba(23,25,26,.28);
  vertical-align: middle; }
.worksheet tbody tr:nth-child(odd) { background: rgba(23,25,26,.035); }
.worksheet td.t { font-weight: 700; }
/* nowrap forced 20 route labels onto one line each, which pushed all four input
   columns off a 768px screen. Wrapping the prose column fits the table exactly. */
.worksheet .path { color: var(--ink); }
/* Totals and arrival times are compared against each other down the column. */
.worksheet td:nth-child(4) input, .worksheet td:nth-child(5) input { text-align: right; }
.worksheet input, .worksheet select { font-family: var(--mono); font-size: 14px;
  background: rgba(255,255,255,.62); color: var(--ink); border: 1px solid rgba(23,25,26,.42);
  border-radius: 2px; padding: 6px; width: 100%; min-height: 34px; }
.worksheet input::placeholder { color: rgba(23,25,26,.4); }
.worksheet input:focus-visible, .worksheet select:focus-visible {
  outline: 2px solid var(--focus-ring); outline-offset: 3px;
  border-color: var(--accent-paper); background: #fff; }
.worksheet-wrap { overflow-x: auto; }

.hints { border: 1px solid var(--line-soft); background: rgba(var(--bg-2-rgb),.6); padding: 16px 18px 18px; }
.hints h3, .hints h4 { font-size: 14px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 12px; }
.hint { border-top: 1px dotted var(--line); padding: 10px 0 2px; }
.hint:first-of-type { border-top: none; }
.hint-btn { width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 10px 0; min-height: 44px;
  font-family: var(--mono); font-size: 14px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-dim); display: flex; justify-content: space-between; gap: 12px; align-items: center; }
button.hint-btn:hover { color: var(--accent); }
/* The second-press warning is a sentence, not a label (design audit, plan 2 Task 9): the text face, sentence case. */
button.hint-btn[data-armed] { font-family: var(--serif); font-size: 16px; line-height: 1.45; letter-spacing: 0;
  text-transform: none; color: var(--accent); }
div.hint-btn { cursor: default; }
div.hint-btn[aria-disabled="true"] { cursor: not-allowed; }
/* The locked rows used to be dimmed with opacity .55 on top of --text-dim, which
   computes to 2.45:1. The word "locked" already carries the state. */
.hint-btn .lvl { color: var(--accent); }
div.hint-btn[aria-disabled="true"] .lvl { color: var(--text-dim); font-style: italic; }
.hint-btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.hint-text { font-size: 16px; color: var(--paper); padding: 4px 0 8px; }

/* ---------- Envelopes ----------------------------------------------------- */

.envelope { border: 1px solid var(--line); background: var(--panel); padding: 22px 24px; margin-bottom: 16px; }
.envelope.sealed { background: var(--bg-2); border-color: var(--line-soft); }
.envelope.sealed h2 { color: var(--text-dim); }
.envelope.sealed .warn { color: var(--text-dim); }
/* The markup has always emitted h2 here; these rules named h3 and matched nothing,
   so the five envelope titles were the only headings in the app with no treatment. */
.envelope h2 { font-size: 21px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--paper); }
/* The heading wraps the toggle; the button does not inherit type, so the title carries it. */
.envelope .env-h { margin: 0; }
.env-toggle { font: inherit; letter-spacing: inherit; text-transform: inherit; }
.env-name { display: block; font-family: var(--mono); font-weight: 600; }
.envelope .sub { font-family: var(--mono); font-size: 14px; letter-spacing: .1em; color: var(--text-dim);
  margin: 6px 0 14px; text-transform: uppercase; }

/* An opened envelope is a fold: one is on the table, the rest are one click away.
   The whole header is the control, so the hit area is the whole row. */
.env-toggle { display: flex; align-items: center; justify-content: space-between; gap: 18px;
  width: 100%; padding: 0; background: none; border: 0; cursor: pointer; text-align: left;
  color: inherit; min-height: 44px; }
/* A long one-word title ("Abschlussbericht") and the mark do not share a 320px row: the mark drops below. */
.env-toggle { flex-wrap: wrap; row-gap: 6px; }
.env-toggle .env-titles { display: block; }
.env-toggle .sub { display: block; margin: 6px 0 0; }
.env-mark { font-family: var(--mono); font-size: 14px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); white-space: nowrap; }
.env-toggle:hover .env-mark { color: var(--accent-hi); }
.env-toggle:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
/* Review mode disables the fold toggles (UI test 1, №9); the heading keeps its own colour, not the browser's grey. */
.env-toggle:disabled { color: inherit; opacity: 1; cursor: default; }
.envelope.is-folded { background: var(--bg-2); }
.envelope.is-folded h2, .envelope.is-folded .env-name { color: var(--text-dim); }
.env-body { margin-bottom: 16px; }

/* The handoff: notes plus the only trigger in the run. */
.handoff { border: 1px solid var(--line); border-left: 3px solid var(--accent-dim);
  background: var(--panel); padding: 22px 24px 24px; margin: 26px 0 0; }
.handoff h4 { font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 12px; }
.handoff p { font-size: 16px; color: var(--text-dim); margin: 0 0 14px; max-width: 70ch; }
.handoff .warn { color: var(--text-dim); }

.notes-sheet { width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto; }
.journal-row { margin-bottom: 16px; }
.journal-row .note-label { color: var(--ink-label); }
.envelope .warn { font-size: 16px; color: var(--text-dim); margin-bottom: 14px; }

/* ---------- Misc ---------------------------------------------------------- */

.muted { color: var(--text-dim); font-size: 16px; max-width: 760px; }
/* The shop line under the stamp (title and verdict screens) is set in the .licence type. */
.licence { color: var(--text-dim); font-size: 14px; line-height: 1.5; max-width: 760px; margin-top: 28px; }
.shopmark { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.shopmark img { flex: none; width: 88px; height: 88px; }
.shopmark .licence.shop { margin: 0; }
/* The next case (SCENARIO Decisions 2): three covers cropped to one shape, titles under them. */
.next-case { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line-soft); }
.next-case .page-title { font-size: 30px; }
.next-case .lede { margin-top: 8px; }
/* Design audit (plan 2 Task 9): the second paragraph ran to ~150 characters a line at 1280 px. */
.next-case p { max-width: 68ch; }
.next-case .row { max-width: none; }
a.btn { text-decoration: none; }
.next-case .covers { display: grid; grid-template-columns: repeat(3, minmax(0, 220px)); gap: 20px; margin-top: 18px; }
.next-case figure { margin: 0; }
.next-case img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover;
  border: 1px solid var(--line-soft); }
.next-case figcaption { margin-top: 8px; font-size: 16px; line-height: 1.35; color: var(--text); }
@media (max-width: 560px) {
  .next-case .covers { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .next-case figure { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; align-items: center; }
  .next-case figcaption { margin-top: 0; }
}
.center { text-align: center; }
.mt { margin-top: 26px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row.center { justify-content: center; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .doc { font-size: 16px; }
  /* The phone steps of the shell's headings (the site's type scale, see :root). */
  .page-title { font-size: 30px; }
  .stage .page-title, .env-docs .page-title, .next-case .page-title { font-size: 24px; }
  .envelope h2 { font-size: 18px; }
  .shell { padding: 0 16px 70px; }
  .topbar-in { padding: 10px 16px; gap: 12px 16px; }
  .doc { padding: 22px 16px 24px; }
  .doc table { font-size: 14px; }
  /* A document table should fit the card at 320px (UI re-test 2026-10-02, R1); one that cannot scrolls and says
     so (markScrollables). Cells wrap between words and the padding between columns narrows. Neither a heading
     (archive check 2026-10-04, A2: "SCHLÜS/SEL") nor a cell breaks inside a word, a number or a time: plan 2's
     final review found job "0412" printed as "041" over "2" and "17:53" as "17:" over "53". */
  .doc table th, .doc table td { padding-right: 4px; letter-spacing: 0; }
  .doc table th, .doc table td { overflow-wrap: normal; -webkit-hyphens: manual; hyphens: manual; }
  .doc table th:last-child, .doc table td:last-child { padding-right: 0; }
}

/* A 320px window with a desktop scrollbar leaves a card 241px: one more pixel off each gap. */
@media (max-width: 340px) {
  .doc table th, .doc table td { padding-right: 3px; }
  .doc table th:last-child, .doc table td:last-child { padding-right: 0; }
}

/* ---------- Suspect dossier ----------------------------------------------- */

.person { display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: start;
  padding: 16px 0; border-bottom: 1px dotted rgba(23,25,26,.25); }
.person:last-child { border-bottom: none; }
.person h3, .person h5 { font-size: 15px; letter-spacing: .04em; margin-bottom: 2px; }
/* A dossier entry whose portrait has not been built yet takes the whole width. */
.person.no-pic { grid-template-columns: 1fr; }
.person .role { font-family: var(--mono); font-size: 14px; letter-spacing: .08em;
  text-transform: uppercase; color: #5a5348; margin-bottom: 10px; }
.person p { font-size: 15.5px; margin-bottom: 8px; }
/* The portraits are engravings on paper, not photographs: multiply drops their
   near-white ground into the card so only the ink shows, the way a print glued to
   a file would read. The blank stays opaque — it is a missing photo, not a print. */
.badge, .badge-blank { width: 96px; height: 128px; object-fit: cover;
  border: 1px solid rgba(23,25,26,.45); filter: grayscale(1) contrast(1.05); }
.badge { mix-blend-mode: multiply; }
.badge-blank { background: #d5d1c6; }
.badge-blank { display: flex; align-items: center; justify-content: center; text-align: center;
  font-family: var(--mono); font-size: 14px; letter-spacing: .1em; text-transform: uppercase;
  color: #8a8271; }
@media (max-width: 560px) { .person { grid-template-columns: 72px 1fr; gap: 12px; }
  .badge, .badge-blank { width: 72px; height: 96px; } }
/* Below this the two-column split left the biography 28 characters wide. */
@media (max-width: 420px) { .person { grid-template-columns: 1fr; gap: 10px; }
  .badge, .badge-blank { width: 96px; height: 128px; } }

/* ---------- Title screen: the shop window (direction B) ------------------- */

/* The fascia runs edge to edge, so the screen leaves the shell's measure and sets its own.
   On a phone the window comes first as a band of lit glass and the accent rule turns horizontal;
   from 1024px the lettering takes the left half and the window the right, as in the mock-up. */
.title-screen.shell { max-width: none; padding: 0; }
.title-screen .cover { margin: 0; background: var(--panel);
  padding: 18px max(16px, env(safe-area-inset-right)) 22px max(16px, env(safe-area-inset-left));
  border-bottom: 6px double var(--accent); }
.title-screen .cover picture { display: block; }
/* The frame is the accent with a dark reveal and a second, finer accent line: a shop window's moulding. */
.title-screen .cover img { display: block; width: 100%; height: auto; max-height: 42vh; object-fit: cover;
  object-position: 50% 62%; border: 2px solid var(--accent);
  box-shadow: 0 0 0 5px var(--panel), 0 0 0 6px var(--accent-dim); }

.title-screen .title-text { display: flex; flex-direction: column; gap: 22px;
  max-width: 720px; padding: 40px max(16px, env(safe-area-inset-right)) 56px max(16px, env(safe-area-inset-left)); }
.title-screen .title-text > * { margin: 0; }
.title-screen .title-head { display: flex; flex-direction: column; gap: 22px; padding: 0; border: 0; }
.title-screen .page-tags { margin: 0; gap: 6px 20px; letter-spacing: .12em; }
/* Line-height 1.15 on the lead-in: German, Polish and Italian set descenders (bei, Wigilia, Vigilia). */
.title-sign { display: flex; flex-direction: column; gap: 6px; font-family: var(--display);
  color: var(--title); letter-spacing: 0; line-height: 1; }
.title-sign .title-lead { font-style: italic; font-weight: 500; font-size: 24px;
  line-height: 1.15; color: var(--title-lead); text-wrap: balance; }
.title-sign .title-main { font-weight: 700; font-size: 56px; line-height: .95;
  letter-spacing: .005em; }
.title-screen .lede { font-size: 18px; line-height: 1.5; max-width: 32em; text-wrap: pretty; }
.title-screen .muted { font-size: 16px; line-height: 1.55; max-width: 38em; text-wrap: pretty; }
/* Six editions as a three-by-two panel of equal cells: a wrapping row left four over two. */
.title-screen .langpick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
  max-width: 420px; }
.title-screen .langpick .langbtn { font-size: 14px; padding: 0 8px; color: var(--text); text-align: center; }
.title-screen .langpick .langbtn.is-on { color: var(--accent); }
.title-screen .row { gap: 12px; }
.title-screen .btn-primary { min-height: 52px; padding: 0 24px; font-size: 16px; letter-spacing: .12em; }
.title-screen .large-toggle { min-height: 52px; margin-left: 0; padding: 0 18px; }
.title-screen .licence { margin-top: 10px; max-width: 62ch; line-height: 1.55; }
.title-screen .shopmark { margin: 0; }

@media (min-width: 561px) {
  .title-screen .lede { font-size: 21px; }
  .title-screen .cover { padding: 28px max(32px, env(safe-area-inset-right)) 32px max(32px, env(safe-area-inset-left)); }
  .title-screen .title-text { padding: 52px max(32px, env(safe-area-inset-right)) 64px max(32px, env(safe-area-inset-left)); }
}
@media (min-width: 1024px) {
  .title-screen { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 100vh; min-height: 100dvh; }
  .title-screen .title-text { grid-column: 1; grid-row: 1; max-width: none; justify-content: center;
    padding: 64px clamp(40px, 4.4vw, 64px) 56px clamp(40px, 5.6vw, 88px);
    border-right: 6px double var(--accent); }
  .title-screen .cover { grid-column: 2; grid-row: 1; position: sticky; top: 0; height: 100vh; height: 100dvh;
    border-bottom: 0; padding: clamp(32px, 3.8vw, 56px); display: flex; align-items: center; justify-content: center; }
  .title-screen .cover picture { display: flex; justify-content: center; height: 100%; max-width: 100%; }
  .title-screen .cover img { width: auto; height: 100%; max-width: 100%; max-height: none;
    aspect-ratio: 2 / 3; object-position: 30% 50%; }
  .title-sign .title-main { font-size: 56px; }
  /* Large text zooms the body by 1.25, and Chromium scales viewport units with it. */
  html.is-large .title-screen { min-height: 80vh; min-height: 80dvh; }
  html.is-large .title-screen .cover { height: 80vh; height: 80dvh; }
  html.is-large .title-sign .title-main { font-size: 56px; }
}

/* ---------- Verdict ------------------------------------------------------- */

.verdict-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px;
  border: 1px solid var(--line); background: var(--panel); padding: 24px; margin-top: 32px; }
.verdict-stats .val { font-family: var(--mono); font-weight: 600; font-size: 30px; line-height: 1.1;
  color: var(--paper); }

/* ---------- Wide working material ----------------------------------------- */

/* The floor plan and the route worksheet are the working surface of stage 3:
   inside the 644px column their type fell to 5-7px and 40% of the table was
   hidden behind a scrollbar. They get the full shell width instead. */
.wide-docs { margin-top: 26px; }
/* The plan and the route blank are the working surface, not reading matter. */
.wide-docs .doc p, .wide-docs .doc li { max-width: none; }
/* Zoom must magnify on every screen: without a min-width the dialog merely
   restated the width the card already had. */
.zoom-figure { width: 100%; max-width: 1500px; background: #f2f0ea; padding: 12px;
  overflow-x: auto; }
.zoom-figure svg { width: 100%; height: auto; min-width: 1800px; max-height: none; }

/* ---------- Evidence picker ------------------------------------------------ */

.ev-picker { border: 1px solid var(--line); background: var(--field); padding: 12px 14px; border-radius: 2px; }
/* Four nested scroll regions on one screen, each a 260px window onto a longer
   list, fought the page scroll for the finger and hid a third of the documents. */
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px 16px; }
.ev-item { display: flex; gap: 9px; align-items: center; padding: 7px 4px; min-height: 44px;
  font-family: var(--mono); font-size: 14px; color: var(--text); cursor: pointer; border-radius: 2px; }
.ev-item:hover { background: rgba(var(--accent-rgb),.1); }
.ev-item b { color: var(--paper); font-weight: 600; }
.ev-item span { color: var(--text-dim); }
.ev-item input { accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.ev-item:focus-within { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.ev-count { font-family: var(--mono); font-size: 14px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-dim); margin: 10px 0 0; }
/* Not green: it is a completeness count, but green is read as "correct". */
.ev-count.ok { color: var(--paper); }
.ev-count.over { color: var(--danger); }

/* ---------- Submit review and read-only mode ------------------------------- */

/* It declares role="alertdialog" aria-modal="true", so it is one. Inline it could
   not be scrolled into view at all: it is the last thing in the document, and on a
   390px phone its buttons stayed 87px below the fold with the page already at the
   end. The list of gaps scrolls inside; heading and buttons never move. */
.review-panel { position: fixed; z-index: 55; left: 50%; top: 50%;
  transform: translate(-50%, -50%); width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  border: 1px solid var(--accent); background: var(--bg-2); padding: 18px 20px;
  box-shadow: 0 0 0 100vmax rgba(var(--bg-2-rgb),.8), 0 24px 60px -20px rgba(0,0,0,.9); }
.review-panel .gap-list { overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
.review-panel .row { flex: none; }
.review-panel h4 { font-size: 14px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px; }
.review-panel p { font-size: 16px; color: var(--paper); margin: 0 0 12px; }
.gap-list { margin: 0 0 14px; padding-left: 20px; font-size: 16px; color: var(--text); }
.gap-list li { margin-bottom: 4px; }
.review-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; border: 1px solid var(--line); background: var(--panel); padding: 12px 16px;
  margin: 18px 0 0; font-family: var(--mono); font-size: 14px; letter-spacing: .06em; color: var(--text); }
.doc .note-field.invalid { border-color: var(--danger-paper); box-shadow: 0 0 0 3px rgba(155,28,49,.25); }
.note-field.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(var(--danger-rgb),.25); }

/* Written by ui.js in five places and styled in none: both error messages used to
   render as ordinary body copy under the button that had just refused to act. */
.entry-msg { font-family: var(--mono); font-size: 14px; line-height: 1.5; margin: 10px 0 0;
  color: var(--text-dim); }
.entry-msg:empty { margin: 0; }
.entry-msg.bad { color: var(--danger); border-left: 3px solid var(--danger); padding: 4px 0 4px 12px; }
.doc .entry-msg.bad { color: var(--danger-paper); border-left-color: var(--danger-paper); }

/* ---------- Skip link ------------------------------------------------------ */

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 60; }
/* The site's skip link (site/app/src/style.css): chalk ground, ink text, the shell's focus ring. */
.skip-link:focus { left: 12px; top: 12px; position: fixed; background: #f0e7d6; color: #1c1b17;
  font-family: var(--mono); font-size: 14px; min-height: 44px; padding: 12px 16px; border-radius: 2px; outline: 2px solid var(--focus-ring); outline-offset: 3px; }

/* ---------- The site around the demo (site fix plan, P4) -------------------------- */

/* The strip above the app: the TraceWall name, a link to the site's home page. It sits in normal flow above the
   sticky top bar and scrolls away, so the bar's measured height (--topbar-h) does not change. */
.site-strip { max-width: 1360px; margin: 0 auto;
  padding: 0 max(28px, env(safe-area-inset-right)) 0 max(28px, env(safe-area-inset-left)); }
.site-home { display: inline-flex; align-items: center; min-height: 44px; color: var(--text);
  font-family: var(--display); font-size: 18px; font-weight: 600; letter-spacing: .02em; text-decoration: none; }
.site-home:hover { color: var(--accent-hi); text-decoration: underline; text-underline-offset: 4px; }

/* The stamp and the shop line link to the site's home page too; the link keeps their look. */
a.shopmark { color: inherit; text-decoration: none; align-self: flex-start; }
a.shopmark:hover .licence.shop { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }

/* The footer every site page shares; copied from site/app/src/site-footer.css (the dark-desk defaults). */
.site-foot { display: grid; gap: 4px 24px; max-width: 1360px; margin: 0 auto;
  padding: 14px max(28px, env(safe-area-inset-right)) 28px max(28px, env(safe-area-inset-left));
  border-top: 1px solid rgb(185 171 146 / .35); color: #b9ab92; font-family: var(--mono);
  font-size: 14px; line-height: 1.4; text-align: left; }
.site-foot p { margin: 0; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 0 4px; }
.site-foot a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; padding-right: 12px;
  color: #f0e7d6; text-underline-offset: 4px; }
@media (min-width: 720px) {
  .site-foot { grid-template-columns: 1fr auto; align-items: center; }
  .site-foot-who { grid-column: 1 / -1; }
}

/* ---------- Controls on paper cards ---------------------------------------- */

/* .btn is built for the dark chrome; on a paper card its light text vanished. */
.doc:not(.v-frame) .btn {
  color: var(--ink);
  border-color: rgba(23,25,26,.45);
  background: rgba(23,25,26,.04);
}
.doc:not(.v-frame) .btn:hover {
  color: #14100a;
  border-color: var(--accent-paper);
  background: rgba(var(--accent-rgb),.22);
}
/* The rule above is 0,3,0 and .btn-primary is 0,1,0, so every primary button on a
   paper card was silently demoted — including the one that opens envelope 4. */
.doc:not(.v-frame) .btn-primary { color: var(--paper); border-color: var(--accent-paper); background: var(--accent-paper); }
.doc:not(.v-frame) .btn-primary:hover { color: #fff; border-color: var(--accent-paper-deep); background: var(--accent-paper-deep); }

/* ---------- Accusation form ------------------------------------------------ */

/* This used to compute byte-identical to .task, so the irreversible artefact of
   the whole run looked exactly like the scratch pad beside it. It stays dark on
   purpose — the form is the system speaking, not an evidence document — but it is
   now a flat, ruled official blank rather than a panel. */
.form-line { background: var(--bg-2); border: 1px solid var(--line);
  border-left: 4px solid var(--accent-dim); border-top: 1px solid var(--line);
  padding: 22px 24px 24px; margin-bottom: 20px; }
.form-line-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  border-bottom: 3px double var(--line); padding-bottom: 10px; margin-bottom: 16px; }
.form-line-head h3 { font-size: 14px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--paper); margin: 0; }
.form-line-id { font-family: var(--mono); font-size: 14px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-dim); white-space: nowrap; }
.form-line .muted { color: var(--text-dim); }
/* A line's question is a sentence and runs to two lines on a phone: the text face, sentence case (design audit,
   plan 2 Task 9). The short field label ("Proof") keeps the mono capitals. */
.form-line .note-label.form-q { max-width: 64ch; margin: 0 0 8px; font-family: var(--serif); font-size: 18px;
  line-height: 1.5; letter-spacing: 0; text-transform: none; color: var(--text); }
.form-line .note-label.form-q + .opt-group { margin-top: 0; }
/* P21: under the one-word proof label, the instruction in sentence case, in the text face (the picker's description). */
.form-line .proof-hint { max-width: 64ch; margin: 0 0 12px; font-family: var(--serif); font-size: 16px;
  line-height: 1.55; color: var(--text-dim); }

.opt-group { display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; }
/* baseline floats a radio above the optical centre of its label. */
.opt { display: flex; gap: 10px; align-items: center; padding: 9px 8px; min-height: 44px;
  border-radius: 2px; cursor: pointer; font-size: 16px; color: var(--text); }
.opt:hover { background: rgba(var(--accent-rgb),.1); }
.opt:focus-within { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.opt input { accent-color: var(--accent); width: 17px; height: 17px; flex: none; }
.opt span { color: var(--paper); font-variant-numeric: tabular-nums; }

.form-line select.note-field { max-width: 560px; }
/* While the confirmation is up the form beneath it cannot be edited. */
#accusation[data-locked] .form-line { pointer-events: none; opacity: .55; }

/* ---------- Narrow screens: scroll instead of shrink ----------------------- */

.table-wrap, .fig-wrap { max-width: 100%; }
/* A touch device hides its scrollbars, so a container wider than the screen looks
   like a cropped picture. The class is set by ui.js only when it really scrolls. */
.is-scrollable { position: relative; }
.is-scrollable::after { content: attr(data-scroll-hint); display: block;
  font-family: var(--mono); font-size: 14px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-label); padding: 6px 0 2px; position: sticky; left: 0; }
.v-frame .is-scrollable::after { color: #9aa0a4; }
.is-scrollable.on-dark::after { color: var(--text-dim); }

@media (max-width: 1100px) and (min-width: 561px) {
  .shell { padding-left: 22px; padding-right: 22px; }
}

/* The case number plus the chips made the bar wrap between 900 and 1100, so the
   tablet width measured taller than the phone one. */
@media (max-width: 1100px) {
  .brand span { display: none; }
  /* Dropping the case number alone was not enough: at 1024px the row came to 954px inside a
     953px content box and the Reset button fell to a second line, leaving a 135px sticky bar on a laptop.
     The items that already drop out below 900px now drop out across the whole band, so the row
     stays single from 320px to 1100px. Reset is still reachable: the journal, the title and the
     verdict screens all carry a New investigation button. The hint counter never drops out; it
     shrinks to its mark and number, and its word stays for screen readers. */
  .stat-hints .stat-word { position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; }
  .stat-hints .stat-icon { display: inline-block; }
  .topbar [data-act="reset"] { display: none; }
  /* flex: 1 1 auto in a wrapping row swallowed the free space and pushed everything
     after it onto lines of its own. */
  .topbar-spacer { display: none; }
}

/* Set by ui.js when the row would wrap: a long edition needs the room before English does. */
.topbar.is-crowded .brand span,
.topbar.is-crowded [data-act="reset"], .topbar.is-crowded .topbar-spacer { display: none; }
.topbar.is-crowded .stat-hints .stat-word { position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; }
.topbar.is-crowded .stat-hints .stat-icon { display: inline-block; }
/* The next step when that is not enough. Clipped rather than removed, so a screen reader still
   hears which envelope the group is on. */
.topbar.is-packed .envnav .stat { position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; }
/* The last step: the chips take their phone size. */
.topbar.is-tight .envnav { gap: 4px; }
.topbar.is-tight .envnav .envlink { min-width: 36px; padding: 0 4px; }

@media (max-width: 900px) {
  /* A shrunk plan is unreadable; a scrolled one is merely inconvenient. */
  .table-wrap { overflow-x: auto; }
  /* The section is scaled to its column card, never wider than it (UI re-check 2026-10-02, W7): the
     full-size view is its zoom button; below 560px the card shows the stub and the button only. */
  .fig-wrap { overflow-x: auto; }
  .worksheet-wrap { overflow-x: auto; }
  .lightbox { padding: 12px; }
  .lightbox-zoom { padding-top: 74px; }
  .zoom-figure { padding: 8px; }
  /* The bar wrapped to two rows at this width and three below it — a fifth of a
     phone viewport, permanently, for a timer and two counters. The items themselves
     drop out in the 1100px block above; here the row just tightens. */
  .topbar-in { gap: 10px 14px; }
  /* The densest control surface in the run: 20 rows by four fields. */
  .worksheet input, .worksheet select { min-height: 44px; }
}

.fig-stub { display: none; }

@media (max-width: 420px) {
  /* The case title is the h1 directly below; the chrome need not repeat it. */
  .brand { display: none; }
}

@media (max-width: 560px) {
  /* The plan stays whole in its card on a phone, scaled to the card: the group needs the layout at a glance, and
     the full-size view reads the small labels (author's decision after the UI test, 2026-10-13). */
  .fig-inline .fig-wrap { overflow-x: visible; }
  .fig-inline .fig-wrap svg { min-width: 0; width: 100%; height: auto; }
  /* Chips stay — with the case number, the hint counter and the Reset button gone there is
     room for them, and on a long page they are the only way back to an envelope. */
  .envnav .envlink { min-width: 36px; padding: 0 4px; }
  .envnav .stat { display: none; }
  .fig-wrap svg { min-width: 900px; }
  .form-line { padding: 18px 16px 20px; }
  .ev-grid { grid-template-columns: 1fr; }
  .review-panel { padding: 16px; }
}

/* ---------- Language picker (title screen only) --------------------------- */
.langpick { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; }
.langpick .langbtn { min-height: 44px; padding: 0 14px; font-family: var(--mono); font-size: 14px;
  letter-spacing: .06em; color: var(--paper); background: none; cursor: pointer;
  border: 1px solid var(--line); border-radius: 2px; }
.langpick .langbtn:hover { border-color: var(--accent); color: var(--title); }
.langpick .langbtn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.langpick .langbtn.is-on { border-color: var(--accent); color: var(--accent); }

/* Text the group types is shown back as-is; an unbroken string (a pasted link, a held key)
   widened the whole page to thousands of pixels. */
.doc p, .memo, .lede, .muted, .gap-list li, .hint-text, .note-field { overflow-wrap: anywhere; }

/* ---------- Plan round, 2026-09-24 ----------------------------------------- */

/* The hint counter's mark, shown only when its word has made room. */
.stat-hints { white-space: nowrap; }
.stat-icon { display: none; vertical-align: -2px; margin-right: 5px; color: var(--paper); }

/* Segment times copied from E15: data, not an entry, so it reads as printed text. */
.worksheet td.legs { font-weight: 400; white-space: nowrap; padding-right: 14px; color: var(--ink); }

/* The accused's exclusion block folds to its heading and one line. */
.excl-skip { margin: 4px 0 0; font-family: var(--mono); font-size: 14px; color: var(--text-dim); }
.excl.is-accused .note-label { opacity: .75; }

/* The account after the verdict: the timeline and the five links read as lists. */
.epilogue ul, .epilogue ol { margin: 0 0 14px; padding-left: 22px; }
.epilogue li { margin: 0 0 6px; overflow-wrap: anywhere; }
.epilogue li b { font-family: var(--mono); font-weight: 600; margin-right: 6px; }

.confirm-sheet { width: min(520px, calc(100vw - 32px)); }

/* the zoomed Polaroid keeps its back line (W3) */
.lightbox .zoom-caption { margin: 10px auto 0; max-width: 90vw; text-align: center; color: #e7e4dc;
  font-family: var(--serif); font-style: italic; font-size: 16px; }
/* the language picker in the case log (W1). The journal is a paper sheet, so its buttons take ink:
   the shell's cream lettering on cream paper was invisible. */
.notes-sheet .langpick { margin: 0 0 14px; }
.doc .langpick .langbtn { color: var(--ink); border-color: rgba(23,25,26,.45); }
.doc .langpick .langbtn:hover { color: var(--ink); border-color: var(--accent-paper); background: rgba(var(--accent-rgb),.22); }
.doc .langpick .langbtn.is-on { color: var(--accent-paper); border-color: var(--accent-paper); background: rgba(var(--accent-rgb),.18); }


/* ======================================================================== */
/* Design pass 2026-09-29                                                    */
/* ======================================================================== */

/* Large text for play on a television: everything a quarter larger, layout included. */
html.is-large body { zoom: 1.25; }
.large-toggle { margin-left: 0; }   /* it always sits in a .row, whose gap spaces it */
/* Pressed reads as pressed (UI test 1, No. 12): the accent, as case 7's toggle. */
.large-toggle[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.doc .large-toggle[aria-pressed="true"] { border-color: var(--accent-paper); color: var(--accent-paper); }


/* The verdict as a rubber stamp. */
.verdict-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  border-bottom: 3px double var(--accent-dim); }
/* The outcome heads are set in capitals: capitals need their tracking. */
.verdict-head .page-title { letter-spacing: .03em; }
.verdict-stamp { display: inline-flex; align-items: center; gap: 12px; padding: 12px 20px;
  border: 5px double currentColor; border-radius: 6px; transform: rotate(-6deg);
  font-family: var(--mono); font-weight: 600; font-size: 21px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); opacity: .92; }
/* The shop mark is light line art (the title screen shows it as drawn). Inverted and tinted for case 6's brass, it
   turned into a dark smudge on the dark ground (design audit, plan 2 Task 9), so it is drawn as it is. */
.verdict-stamp img { opacity: .8; }
.verdict-stamp.stamp-closed { color: var(--ok); }
.verdict-stamp.stamp-not-confirmed { color: var(--danger); }
.verdict-stamp.stamp-insufficient-empty { color: var(--text-dim); }
@media (max-width: 560px) { .verdict-stamp { font-size: 18px; padding: 8px 14px; } }
/* A capitalised long word ("ZUSAMMENGESTELLT", Polish "not confirmed") ran past a 320px screen at 28px. */
.verdict-head > div { min-width: 0; }
@media (max-width: 560px) { .verdict-head .page-title { font-size: 21px; } }

/* The epilogue: the evening as a ribbon, times in the margin. */
.epilogue ol { list-style: none; padding: 0; margin: 14px 0; border-left: 2px solid rgba(23,25,26,.35); }
.epilogue ol li { display: grid; grid-template-columns: 8.5em 1fr; gap: 14px; padding: 6px 0 10px 16px;
  position: relative; }
.epilogue ol li::before { content: ''; position: absolute; left: -7px; top: 13px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--paper); border: 2px solid rgba(23,25,26,.55); }
.epilogue ol li > b:first-child { font-family: var(--mono); font-size: 14px; letter-spacing: .04em; }
@media (max-width: 560px) { .epilogue ol li { grid-template-columns: 1fr; gap: 2px; } }
.epilogue-plan { margin: 18px 0 0; }
.epilogue-plan svg { display: block; width: 100%; height: auto; border: 1px solid rgba(23,25,26,.3); }

/* The document picker: chips, a folded list grouped by envelope, a search. */
.ev-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ev-chips:not(:empty) { margin-bottom: 10px; }
.ev-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 12px;
  border: 1px solid var(--accent); background: rgba(var(--accent-rgb),.12); color: var(--paper); border-radius: 22px;
  font-family: var(--mono); font-size: 14px; cursor: pointer; max-width: 100%; }
.ev-chip span:not([aria-hidden]) { color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  min-width: 0; }
.ev-chip:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.ev-list > summary { display: inline-flex; list-style: none; }
.ev-list > summary::-webkit-details-marker { display: none; }
.ev-list[open] > summary { margin-bottom: 10px; }
.ev-filter { width: 100%; min-height: 44px; margin: 0 0 10px; padding: 8px 12px; font: inherit; font-size: 16px;
  background: var(--field); color: var(--text); border: 1px solid var(--line); }
/* UI test 2, №2: below 360 px the field leaves about 165 px for text beside its clear button. Only the hint steps
   down; typed text keeps 16 px. Site fix plan, P4, stop rule: at the site's 14 px floor the en and it hints need
   166.2 and 167.9 px of 165.3 at 320 px, so this one hint stays at 13 px (an exception to the 14 px floor). */
@media (max-width: 359.98px) { .ev-filter::placeholder { font-size: 13px; } }
.ev-group-head { font-family: var(--mono); font-size: 14px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-dim); margin: 10px 0 4px; }
.ev-item[hidden] { display: none; }

/* ---- document voices, each its own paper ---- */

/* Laboratory sheets: graph paper, a coloured head band and a round receiving stamp. */
.v-lab { background:
    linear-gradient(rgba(60,110,80,.08) 1px, transparent 1px) 0 0 / 100% 22px,
    linear-gradient(90deg, rgba(60,110,80,.08) 1px, transparent 1px) 0 0 / 22px 100%, #eaf0e8;
  border-top: 10px solid #5d7a66; }
.v-lab::after { content: none; position: absolute; right: 30px; top: 96px; width: 78px; height: 78px; border-radius: 50%;
  border: 3px solid rgba(150,40,40,.5); box-shadow: inset 0 0 0 5px transparent, inset 0 0 0 7px rgba(150,40,40,.4);
  transform: rotate(-14deg); pointer-events: none; }
@media (max-width: 560px) { .v-lab::after { width: 52px; height: 52px; right: 12px; top: 12px; } }

/* Hand-written pages: a spiral edge on the notebooks, blue rules and a red margin in the diary. */
.v-notebook { padding-left: 52px; }
.v-notebook::before { content: ''; position: absolute; left: 14px; top: 16px; bottom: 16px; width: 14px;
  background: radial-gradient(circle at 7px 7px, #1b1d20 0 5px, transparent 5.5px) 0 0 / 14px 28px repeat-y; opacity: .75; }
.v-diary { background:
    linear-gradient(90deg, transparent 0 calc(3.4em + 20px), rgba(190,60,50,.45) calc(3.4em + 20px) calc(3.4em + 21px), transparent 0),
    linear-gradient(175deg, #efe6d2, #e3d7bd); }
.v-diary p:not(.margin) { line-height: 30px; margin: 0 0 6px;
  background: repeating-linear-gradient(180deg, transparent 0 25px, rgba(50,80,140,.2) 25px 26px, transparent 26px 30px); }
.v-diary .hand, .v-diary .year { line-height: 30px; }

/* The coat-check list: a ruled sheet with a red margin. */
.v-ruled { background: linear-gradient(90deg, transparent 0 22px, rgba(190,60,50,.45) 22px 23px, transparent 23px), #f4f2ea; }
.v-ruled table { border-collapse: collapse; }
.v-ruled td, .v-ruled th { border-bottom: 1px solid rgba(50,80,140,.3); }
.v-ruled tbody tr:nth-child(odd) { background: transparent; }
.v-ruled td:nth-child(2) { font-family: var(--serif); font-style: italic; font-size: 16px; color: #22324a; }

/* Evidence seals as manila tags with a punched hole. */
.seals td:first-child { position: relative; font-family: var(--mono); font-weight: 600; white-space: nowrap;
  background: #d9c79c; padding-left: 24px; border-radius: 3px 12px 12px 3px; }
.seals td:first-child::before { content: ''; position: absolute; left: 8px; top: 50%; width: 8px; height: 8px;
  margin-top: -4px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 1px rgba(23,25,26,.4); }
.seals tbody tr:nth-child(odd) { background: transparent; }
.seals td { border-bottom: 4px solid transparent; }

/* N1: large text is for a television; on a phone it only pushed the page wider than the screen. */
/* Rule 13: hidden below 700 px, so 700 px itself shows it (UI test 1, No. 16). */
@media (max-width: 699.98px) { .large-toggle { display: none; } html.is-large body { zoom: 1; } }
/* N3: a heading that takes focus after a re-render is a landmark, not a control: no stepped ring. */
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus { outline: none; }

/* ---- Working papers: each voice is a paper and a type (the faces are declared at the top of this file,
   the art comes from the case images). ---- */

/* Police papers: buff report form, typed, a rule under the printed head. */
.v-police { background: #efe9da; }
.v-police .doc-head { border-bottom: 3px double rgba(23,25,26,.55); }
.v-police p, .v-police li, .v-police td { font-family: var(--typewriter); font-size: 15px; line-height: 1.75; }

/* Switchboard docket: a narrow printed slip with ruled columns. */
.v-docket { background: #f3eedf; max-width: 720px; }
.v-docket table { font-size: 14px; }
.v-docket td, .v-docket th { border-bottom: 1px solid rgba(23,25,26,.25); }
.v-docket tbody tr:nth-child(odd) { background: transparent; }

/* The note: a small typed slip, the ink a pencil grey. */
.v-note { background: #f6f3ea; max-width: 520px; }
.v-note p { font-family: var(--typewriter); font-size: 15px; line-height: 1.8; color: #4a4d52; }

/* A typed list: one column of entries on plain office paper. */
.v-typed-list { background: #f4f1e8; }
.v-typed-list p, .v-typed-list li, .v-typed-list td { font-family: var(--typewriter); font-size: 15px; }

/* The goods-lift book: a bound ledger, green-ruled columns. */
.v-ledger { background: linear-gradient(90deg, transparent 0 30px, rgba(60,110,80,.35) 30px 31px, transparent 31px), #eef0e4; }
.v-ledger table { font-size: 14px; }
.v-ledger td, .v-ledger th { border-bottom: 1px solid rgba(60,110,80,.3); }
.v-ledger tbody tr:nth-child(odd) { background: transparent; }

/* The dossier: a manila folder sheet. */
.v-dossier { background: #ecdfbf; }
.v-dossier p { font-size: 16px; }

/* A supplier's invoice: printed white form, a strong rule over the totals. */
.v-invoice { background: #f8f6f0; }
.v-invoice table { font-size: 14px; }
.v-invoice .doc-title { font-family: var(--typewriter); font-weight: 400; }
.v-invoice tfoot td { border-top: 1.5px solid var(--ink); font-weight: 600; }

/* Time-clock cards: buff card stock, the punches in the machine's face. */
.v-cards { background: #e9dcc0; }
.v-cards table { font-family: var(--mono); font-size: 14px; }
.v-cards tbody tr:nth-child(odd) { background: transparent; }

/* Only the weights that ship (external UI test 2026-10-02, W6): IBM Plex Mono stops at 600 and Special
   Elite has 400 alone, so a <b> in a document (700 by default) and a typed heading at 600 were drawn
   as faux bold. A bold word takes 600, which every text face of the edition ships; on a typewriter,
   which has one weight, it stays 400. */
.doc b, .doc strong { font-weight: 600; }
.v-police b, .v-police strong, .v-note b, .v-note strong,
.v-typed-list b, .v-typed-list strong { font-weight: 400; }

.doc .plan-labels li { margin-bottom: 6px; }

/* ---- Case 8's document voices (plan 2 Task 9; docs/design.md, "Document voices") ----
   Each voice is a paper and a type: the machines' exports are mono on plain or white stock, a person's words are
   the text face. e2e.html reads two computed facts per voice, so a change here that blurs two voices goes red. */

/* System log (E01 side door, E02 safe keypad): a console export on plain laser paper. The export's header line
   prints as a dark band; the rows are tight and every other one is shaded, so a minute is followed across. */
.v-log { background: #f0efeb; }
.v-log table { font-size: 14px; }
.v-log td { padding: 5px 10px 5px 0; border-bottom: none; }
.v-log th:first-child, .v-log td:first-child { padding-left: 6px; }
.v-log tbody tr:nth-child(odd) { background: rgba(23,25,26,.06); }
/* On a phone the cells close to 4 px; the folded span "8:40 AM - 6:40 PM" then touched its count. */
@media (max-width: 560px) { .v-log td.t { padding-right: 8px; } }
/* The folded span is two times that may wrap at the dash, but never inside a time (UI test 1, No. 13). */
.v-log .nw { white-space: nowrap; }
.v-log tr.fold td.t { white-space: normal; }
.v-log .log-head { max-width: none; margin: 0 0 14px; padding: 7px 10px; background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: 14px; line-height: 1.55; letter-spacing: .06em; }

/* Chat (E03, the #office export): a chat app's page, round avatars, names and times, a day between rules. */
.v-transcript { background: #f7f6f3; }
.v-transcript ul.chat { list-style: none; padding-left: 0; margin: 0 0 6px; }
.v-transcript .chat-day { display: flex; align-items: center; gap: 12px; text-align: center; margin: 20px 0 12px;
  font-family: var(--mono); font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-label); }
.v-transcript .chat-day:first-child { margin-top: 0; }
.v-transcript .chat-day::before, .v-transcript .chat-day::after { content: ''; flex: 1 1 0; min-width: 16px;
  border-top: 1px solid rgba(23,25,26,.2); }
.v-transcript li.chat-msg { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start;
  max-width: none; margin: 0 0 12px; }
.v-transcript .chat-av { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 50%; background: #5a6168; color: #fff; font-family: var(--mono); font-size: 14px; font-weight: 600;
  letter-spacing: .02em; }
.v-transcript .chat-msg b { font-weight: 600; }
.v-transcript .chat-t { margin-left: 8px; font-family: var(--mono); font-size: 14px; color: var(--ink-label); }
.v-transcript .chat-msg p { margin: 2px 0 0; font-size: 15.5px; line-height: 1.5; }

/* Receipts (E07's till slip, E09's taxi receipt): one element, one look. Thermal white, a narrow mono column,
   torn (dashed) edges, the shop's name centred over a dashed rule. */
.doc .slip { max-width: 34em; margin: 0 0 18px; padding: 14px 16px 12px; background: #fff; color: #2b2d2e;
  border: 1px dashed rgba(23,25,26,.5); box-shadow: 0 1px 4px rgba(0,0,0,.12);
  font-family: var(--mono); font-size: 14px; }
.doc .slip p { max-width: none; margin: 0 0 8px; font-family: var(--mono); font-size: 14px; line-height: 1.6;
  color: #2b2d2e; }
.doc .slip p:last-child { margin-bottom: 0; }
.doc .slip .slip-head { padding-bottom: 8px; border-bottom: 1px dashed rgba(23,25,26,.4); text-align: center;
  font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.doc .slip-line { display: flex; justify-content: space-between; gap: 16px; }

/* E07's email, printed: a white sheet with a header block, the message in the text face. */
.doc .email { max-width: 70ch; margin-top: 18px; padding: 14px 18px 16px; background: #fff;
  border: 1px solid rgba(23,25,26,.16); border-top: 3px solid #5a6168; }
.doc .email p { font-size: 15.5px; line-height: 1.6; }
.doc .email p:first-child { max-width: none; padding-bottom: 10px; margin-bottom: 12px;
  border-bottom: 1px solid rgba(23,25,26,.14);
  font-size: 14.5px; line-height: 1.7; color: var(--ink-soft); }
.doc .email p:first-child b { font-family: var(--mono); font-size: 14px; font-weight: 500; letter-spacing: .04em;
  color: var(--ink-label); }

/* Account statement (E08, the scooter firm's portal): a printed table, a shaded header row, solid hairlines. */
.v-printout { background: #f7f7f5; }
.v-printout .log-head { max-width: none; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 2px solid var(--ink);
  font-family: var(--mono); font-size: 14px; line-height: 1.6; letter-spacing: .04em; color: var(--ink); }
.v-printout table { font-size: 14px; }
.v-printout thead th { padding: 7px 18px 7px 8px; background: #e1e3e5; border-bottom: 1px solid var(--ink);
  color: var(--ink); }
.v-printout tbody td { padding: 7px 18px 7px 8px; border-bottom: 1px solid rgba(23,25,26,.2); }
.v-printout thead th:last-child, .v-printout tbody td:last-child { padding-right: 8px; }
@media (max-width: 560px) {
  .v-printout thead th, .v-printout tbody td { padding-left: 5px; padding-right: 6px; }
}

/* Typed statement (E09, Lind's words): written in a word processor and printed. The text face, a double rule
   under the letterhead. Scoped to the card's own paragraphs, so the taxi receipt above keeps the receipt's look. */
.v-statement { background: #f1efea; }
.v-statement .doc-head { border-bottom: 3px double var(--ink); }
.v-statement > p:not(.hand) { max-width: 64ch; font-family: var(--serif); font-size: 16.5px; line-height: 1.62;
  color: #23262a; }
