/* ============================================================================
   ProofJudge — The Settlement Desk
   A dark slate instrument room. Everything is cool glass except the receipt:
   the one lit, physical, paper object in the scene.

   Sections:
     01 Tokens & base
     02 Atmosphere
     03 Primitives (type, buttons, chips, tabs, fields, glass)
     04 Threshold (entry)
     05 Ticker
     06 Topbar
     07 Console layout
     08 Docket
     09 Bench
     10 Ledger & Trust panels
     11 Paper & receipt states (the hero)
     12 Verify readout
     13 Cinema
     14 Toast
     15 Keyframes
     16 Reduced motion
     17 Responsive
   ========================================================================== */

/* ── 01 · Tokens & base ──────────────────────────────────────────────────── */

:root {
  color-scheme: dark;

  --bg0: #05080d;
  --bg1: #0a0f16;
  --bg2: #0f1620;
  --glass: rgba(15, 22, 32, 0.6);
  --glass-strong: rgba(11, 17, 25, 0.82);
  --edge: rgba(148, 170, 197, 0.14);
  --edge-lit: rgba(196, 219, 240, 0.26);

  --text: #e9eef6;
  --muted: #a4b3c5;
  --dim: #7b8a9d;

  --green: #3ddc8a;
  --green-bright: #72f3b3;
  --sky: #4dc3ff;
  --amber: #f5b855;
  --violet: #b98bff;
  --red: #ff5d55;

  --tint-code: #3ddc8a;
  --tint-research: #4dc3ff;
  --tint-negotiation: #f5b855;
  --tint-governance: #b98bff;
  --tint-code-rgb: 61, 220, 138;
  --tint-research-rgb: 77, 195, 255;
  --tint-negotiation-rgb: 245, 184, 85;
  --tint-governance-rgb: 185, 139, 255;

  --accent: var(--green);
  --accent-rgb: 61, 220, 138;
  --accent-ink: #06120b;

  --paper: #f4f0e5;
  --paper-deep: #e7e1d0;
  --ink: #181d1b;
  --ink-soft: #6a6f64;
  --ink-pass: #136f43;
  --ink-revise: #93630e;
  --ink-fail: #b3261e;

  --display: "Bricolage Grotesque", "Avenir Next", ui-sans-serif, sans-serif;
  --serif: "Newsreader", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --fast: 140ms;
  --base: 240ms;
  --slow: 460ms;
  --ease: cubic-bezier(0.21, 1, 0.32, 1);
  --ease-stamp: cubic-bezier(0.34, 1.4, 0.45, 1);

  --radius: 14px;
  --radius-sm: 9px;
  --topbar-h: 62px;
  --shadow-deep: 0 30px 70px -20px rgba(1, 4, 9, 0.75);
  /* full-bleed workspace: the tool owns the screen, columns scale with it */
  --console-gutter: clamp(14px, 1.6vw, 26px);
}

html[data-judge="research"] { --accent: var(--sky); --accent-rgb: 77, 195, 255; --accent-ink: #051420; }
html[data-judge="negotiation"] { --accent: var(--amber); --accent-rgb: 245, 184, 85; --accent-ink: #1d1204; }
html[data-judge="governance"] { --accent: var(--violet); --accent-rgb: 185, 139, 255; --accent-ink: #140a22; }

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

html, body { min-height: 100%; margin: 0; }

body {
  background: var(--bg0);
  color: var(--text);
  font-family: var(--display);
  font-size: 14.5px;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.entry-open { overflow: hidden; }

button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

::selection { background: rgba(var(--accent-rgb), 0.3); }

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.3) rgba(5, 8, 13, 0.9);
}
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: rgba(5, 8, 13, 0.9); }
*::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: rgba(var(--accent-rgb), 0.28);
  border: 2px solid rgba(5, 8, 13, 0.9);
}

:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb), 0.85);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── 02 · Atmosphere ─────────────────────────────────────────────────────── */

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.atmo-key {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(46% 38% at 50% -6%, rgba(var(--accent-rgb), 0.14), transparent 70%),
    radial-gradient(34% 30% at 84% 16%, rgba(77, 140, 195, 0.1), transparent 70%),
    radial-gradient(40% 36% at 8% 86%, rgba(var(--accent-rgb), 0.05), transparent 70%),
    radial-gradient(58% 30% at 50% 104%, rgba(var(--accent-rgb), 0.08), transparent 72%);
  transition: background var(--slow) var(--ease);
}

.atmo-floor {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(2, 4, 8, 0.7) 100%);
}

/* two lattice planes drifting apart — depth you feel, not see.
   GPU-composited transforms; both die under reduced motion. */
.atmo-grid {
  position: absolute;
  inset: -64px;
  background-image: radial-gradient(circle, rgba(165, 190, 215, 0.055) 1px, transparent 1.5px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, black 30%, transparent 100%);
  animation: lattice-drift 110s linear infinite;
}

.atmo-grid-far {
  position: absolute;
  inset: -96px;
  background-image: radial-gradient(circle, rgba(165, 190, 215, 0.038) 1.4px, transparent 2px);
  background-size: 96px 96px;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 36%, black 24%, transparent 100%);
  animation: lattice-drift-far 180s linear infinite;
}

@keyframes lattice-drift {
  to { transform: translate3d(32px, 32px, 0); }
}

@keyframes lattice-drift-far {
  to { transform: translate3d(-96px, 96px, 0); }
}

/* the seal watermark — the brand motif living faintly in the room,
   re-tinting with the seated judge */
.atmo-seal {
  position: absolute;
  top: -14vmin;
  right: -10vmin;
  width: 52vmin;
  height: 52vmin;
  color: rgba(var(--accent-rgb), 0.05);
  transition: color var(--slow) var(--ease);
  animation: seal-slow-spin 360s linear infinite;
}
.atmo-seal svg { width: 100%; height: 100%; }

@keyframes seal-slow-spin {
  to { transform: rotate(360deg); }
}

/* film grain — static, painted once */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── 03 · Primitives ─────────────────────────────────────────────────────── */

.mono { font-family: var(--mono); }

.eyebrow {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(var(--accent-rgb), 0.9);
  display: flex;
  align-items: center;
  gap: 10px;
}

.glass {
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0) 34%),
    var(--glass);
  border: 1px solid var(--edge);
  border-top-color: var(--edge-lit);
  border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  box-shadow: var(--shadow-deep);
}

.empty-note {
  margin: 0;
  padding: 18px 16px;
  border: 1px dashed rgba(148, 170, 197, 0.22);
  border-radius: var(--radius-sm);
  color: var(--dim);
  font-size: 13px;
  font-style: italic;
  font-family: var(--serif);
  letter-spacing: 0.01em;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-family: var(--display);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition:
    transform var(--fast) var(--ease),
    box-shadow var(--base) var(--ease),
    background-color var(--base) var(--ease),
    border-color var(--base) var(--ease),
    color var(--base) var(--ease),
    opacity var(--base) var(--ease);
}

.btn:disabled { opacity: 0.38; cursor: not-allowed; }
.btn:not(:disabled):active { transform: translateY(1px) scale(0.99); }

.btn-primary {
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 1), rgba(var(--accent-rgb), 0.78));
  color: var(--accent-ink);
  border-color: rgba(var(--accent-rgb), 0.6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 8px 26px -8px rgba(var(--accent-rgb), 0.55);
}
.btn-primary:not(:disabled):hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 12px 34px -8px rgba(var(--accent-rgb), 0.7);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(151, 178, 207, 0.06);
  border-color: var(--edge);
  color: var(--text);
}
.btn-ghost:not(:disabled):hover {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: rgba(var(--accent-rgb), 0.08);
}

.btn-danger {
  background: rgba(255, 93, 85, 0.05);
  border-color: rgba(255, 93, 85, 0.4);
  color: #ff9d97;
}
.btn-danger:not(:disabled):hover {
  background: rgba(255, 93, 85, 0.14);
  border-color: rgba(255, 93, 85, 0.7);
  color: #ffc4c0;
}

.btn-quiet {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.btn-quiet:not(:disabled):hover { color: var(--text); background: rgba(151, 178, 207, 0.08); }

.btn-compact { padding: 7px 13px; font-size: 12.5px; border-radius: 9px; }

.btn-marquee { padding: 13px 22px; border-radius: 13px; }
.btn-glyph { font-size: 11px; transform: translateY(-0.5px); }
.btn-stack { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.btn-stack b { font-weight: 650; }
.btn-stack small { font-weight: 500; font-size: 11px; opacity: 0.74; }

/* Judge chips */

.judge-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 99px;
  border: 1px solid var(--edge);
  background: rgba(151, 178, 207, 0.05);
  color: var(--muted);
  font-family: var(--display);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    border-color var(--base) var(--ease),
    background-color var(--base) var(--ease),
    color var(--base) var(--ease),
    box-shadow var(--base) var(--ease);
}

.judge-chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--chip-tint, var(--green));
  box-shadow: 0 0 8px 0 var(--chip-tint, var(--green));
  transition: box-shadow var(--base) var(--ease);
}

.judge-chip[data-judge="code"], .judge-chip[data-entry-judge="code"] { --chip-tint: var(--tint-code); }
.judge-chip[data-judge="research"], .judge-chip[data-entry-judge="research"] { --chip-tint: var(--tint-research); }
.judge-chip[data-judge="negotiation"], .judge-chip[data-entry-judge="negotiation"] { --chip-tint: var(--tint-negotiation); }
.judge-chip[data-judge="governance"], .judge-chip[data-entry-judge="governance"] { --chip-tint: var(--tint-governance); }

.judge-chip:hover { color: var(--text); border-color: rgba(196, 219, 240, 0.3); }

.judge-chip.active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--chip-tint) 60%, transparent);
  background: color-mix(in srgb, var(--chip-tint) 13%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Dock rail — the cartridge bay on the left edge of the canvas */

.console-frame {
  /* deterministic height so every column reliably touches the floor */
  height: calc(100svh - var(--topbar-h));
  display: flex;
}

.console-main {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative; /* hosts the canvas-wide dock ghost */
}

.dock-rail {
  flex-shrink: 0;
  width: 92px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  padding: 14px 10px 12px;
  border-right: 1px solid var(--edge);
  background: rgba(6, 10, 15, 0.66);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow-y: auto;
}

.dock-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 16px 4px 9px;
  border-radius: 10px;
  border: 1px solid rgba(148, 170, 197, 0.1);
  background:
    linear-gradient(176deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0) 42%),
    rgba(13, 19, 28, 0.6);
  box-shadow: 0 6px 14px -8px rgba(1, 4, 9, 0.7);
  color: var(--muted);
  font-family: var(--display);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition:
    color var(--base) var(--ease),
    border-color var(--base) var(--ease),
    background var(--base) var(--ease),
    box-shadow var(--base) var(--ease),
    transform var(--fast) var(--ease);
}

/* the cartridge label band across the top of the tile */
.dock-slot::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 13px;
  right: 13px;
  height: 3.5px;
  border-radius: 99px;
  background: var(--chip-tint, var(--dim));
  opacity: 0.35;
  transition: opacity var(--base) var(--ease), left var(--base) var(--ease), right var(--base) var(--ease), box-shadow var(--base) var(--ease);
}

.dock-slot[data-judge="code"] { --chip-tint: var(--tint-code); --chip-rgb: var(--tint-code-rgb); }
.dock-slot[data-judge="research"] { --chip-tint: var(--tint-research); --chip-rgb: var(--tint-research-rgb); }
.dock-slot[data-judge="negotiation"] { --chip-tint: var(--tint-negotiation); --chip-rgb: var(--tint-negotiation-rgb); }
.dock-slot[data-judge="governance"] { --chip-tint: var(--tint-governance); --chip-rgb: var(--tint-governance-rgb); }

/* the glyph IS the cartridge face — no box around it */
.dock-glyph {
  display: grid;
  place-items: center;
  height: 24px;
  color: color-mix(in srgb, var(--chip-tint, var(--muted)) 65%, var(--muted));
  font-size: 15px;
  font-weight: 700;
  transition: color var(--base) var(--ease), transform var(--base) var(--ease);
}
.dock-glyph svg { width: 16px; height: 16px; }

.dock-label { line-height: 1.1; }

.dock-slot:hover {
  color: var(--text);
  border-color: rgba(196, 219, 240, 0.24);
  transform: translateY(-1px);
}
.dock-slot:active { transform: translateY(0) scale(0.97); }
.dock-slot:hover::before { opacity: 0.7; }
.dock-slot:hover .dock-glyph { transform: translateY(-1px); }

/* seated cartridge: tint floods the tile, the label band glows wide */
.dock-slot.active {
  color: var(--text);
  border-color: rgba(var(--chip-rgb, var(--accent-rgb)), 0.55);
  background:
    linear-gradient(180deg, rgba(var(--chip-rgb, var(--accent-rgb)), 0.2), rgba(var(--chip-rgb, var(--accent-rgb)), 0.04) 72%),
    rgba(13, 19, 28, 0.7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 26px -10px rgba(var(--chip-rgb, var(--accent-rgb)), 0.65);
}
.dock-slot.active::before {
  opacity: 1;
  left: 9px;
  right: 9px;
  box-shadow: 0 0 10px rgba(var(--chip-rgb, var(--accent-rgb)), 0.8);
}
.dock-slot.active .dock-glyph { color: var(--chip-tint, var(--accent)); }

.station-slot { --chip-rgb: var(--accent-rgb); --chip-tint: var(--accent); }
.station-slot::before {
  background: linear-gradient(90deg, var(--tint-code), var(--tint-research), var(--tint-negotiation), var(--tint-governance));
}

.dock-rule { height: 1px; margin: 4px 8px; background: var(--edge); }
.dock-spacer { flex: 1; }

/* aux drawers: quieter, bandless */
.dock-aux { padding-top: 10px; font-size: 10px; background: transparent; border-color: transparent; box-shadow: none; }
.dock-aux::before { display: none; }
.dock-aux .dock-glyph { height: 20px; font-size: 13px; color: var(--muted); }
.dock-aux:hover { background: rgba(151, 178, 207, 0.07); border-color: transparent; }
.dock-aux .tab-badge { position: absolute; top: 4px; right: 7px; }

/* Station — the overview floor */

.station {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
}

.station-inner {
  margin: auto;
  width: 100%;
  max-width: 1560px;
  padding: clamp(22px, 3.5vh, 48px) clamp(20px, 3vw, 48px);
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3.2vh, 38px);
}

/* stepping off the chamber floor: contents dim before the lift */
.console-body.floor-exit .docket { animation: floor-out 0.2s ease both; }
.console-body.floor-exit .bench { animation: floor-out 0.2s ease 0.03s both; }
.console-body.floor-exit .desk { animation: floor-out 0.2s ease 0.06s both; }

@keyframes floor-out {
  to { opacity: 0; transform: translateY(10px) scale(0.995); }
}

/* arriving on the floor: it assembles piece by piece */
.station.arriving .station-head > * { animation: rise-in 0.55s var(--ease) both; }
.station.arriving .station-head > *:nth-child(2) { animation-delay: 0.08s; }
.station.arriving .station-head > *:nth-child(3) { animation-delay: 0.16s; }
.station.arriving .station-head > *:nth-child(4) { animation-delay: 0.24s; }
.station.arriving .judge-cartridge { animation: dock-in 0.6s var(--ease) both; }
.station.arriving .judge-cartridge:nth-child(1) { animation-delay: 0.3s; }
.station.arriving .judge-cartridge:nth-child(2) { animation-delay: 0.38s; }
.station.arriving .judge-cartridge:nth-child(3) { animation-delay: 0.46s; }
.station.arriving .judge-cartridge:nth-child(4) { animation-delay: 0.54s; }
.station.arriving .station-recent { animation: rise-in 0.55s var(--ease) 0.68s both; }

@keyframes dock-in {
  from { opacity: 0; transform: translateY(20px) scale(0.965); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.station-head { max-width: 880px; }
.station-head h1 {
  margin: 10px 0 12px;
  font-size: clamp(30px, 3.4vw, 50px);
  font-weight: 740;
  line-height: 1.04;
  letter-spacing: -0.022em;
}
.station-sub {
  margin: 0;
  max-width: 60ch;
  font-size: 14.5px;
  color: var(--muted);
}

.station-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}
.station-stats span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--edge);
  border-radius: 99px;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}
.station-stats b { color: var(--muted); font-weight: 600; }
.station-stats .stat-ok b { color: var(--green-bright); }

.station-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.judge-cartridge {
  --jc: var(--green);
  --jc-rgb: var(--accent-rgb);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 20px 20px 17px;
  text-align: left;
  border-radius: var(--radius);
  border: 1px solid var(--edge);
  border-top: none;
  background:
    linear-gradient(180deg, rgba(var(--jc-rgb), 0.07), rgba(var(--jc-rgb), 0.015) 42%),
    var(--glass);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: var(--shadow-deep);
  cursor: pointer;
  transition:
    transform var(--base) var(--ease),
    border-color var(--base) var(--ease),
    box-shadow var(--base) var(--ease);
}

/* cartridge spine */
.judge-cartridge::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, rgba(var(--jc-rgb), 0.95), rgba(var(--jc-rgb), 0.35));
}

.judge-cartridge[data-station-judge="code"] { --jc: var(--tint-code); --jc-rgb: var(--tint-code-rgb); }
.judge-cartridge[data-station-judge="research"] { --jc: var(--tint-research); --jc-rgb: var(--tint-research-rgb); }
.judge-cartridge[data-station-judge="negotiation"] { --jc: var(--tint-negotiation); --jc-rgb: var(--tint-negotiation-rgb); }
.judge-cartridge[data-station-judge="governance"] { --jc: var(--tint-governance); --jc-rgb: var(--tint-governance-rgb); }

.judge-cartridge:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--jc-rgb), 0.5);
  box-shadow:
    var(--shadow-deep),
    0 18px 50px -16px rgba(var(--jc-rgb), 0.4);
}

.jc-head { display: flex; align-items: center; gap: 12px; }
.jc-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 10px;
  border: 1px solid rgba(var(--jc-rgb), 0.4);
  background: rgba(var(--jc-rgb), 0.1);
  color: var(--jc);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
}
.jc-head strong { display: block; font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; }
.jc-head small {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.jc-problem {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.jc-rows {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 11px;
  border-top: 1px solid rgba(148, 170, 197, 0.1);
}
.jc-rows > div { display: flex; justify-content: space-between; gap: 10px; }
.jc-rows dt {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}
.jc-rows dd { margin: 0; font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.jc-rows dd .table-verdict { font-size: 9px; padding: 1px 6px; }

.jc-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}
.jc-enter {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--jc);
  transition: transform var(--base) var(--ease);
}
.judge-cartridge:hover .jc-enter { transform: translateX(3px); }
.jc-verify {
  font-size: 11px;
  font-weight: 600;
  color: var(--dim);
}
.jc-verify:hover { color: var(--muted); }

.station-recent header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}
.station-recent h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.station-recent header small { font-family: var(--mono); font-size: 10px; color: var(--dim); }

.recent-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  padding: 9px 14px;
  border: none;
  border-radius: 8px;
  background: rgba(151, 178, 207, 0.04);
  color: var(--muted);
  font-size: 12.5px;
  cursor: pointer;
  transition: background-color var(--base) var(--ease), color var(--base) var(--ease);
}
.recent-row + .recent-row { margin-top: 5px; }
.recent-row:hover { background: rgba(151, 178, 207, 0.09); color: var(--text); }
.recent-row .rr-time { font-family: var(--mono); font-size: 10.5px; color: var(--dim); white-space: nowrap; }
.recent-row .rr-judge { font-weight: 600; white-space: nowrap; }
.recent-row .rr-hash { font-family: var(--mono); font-size: 10.5px; color: var(--dim); margin-left: auto; }
.recent-row .rr-open { font-size: 11px; color: var(--dim); white-space: nowrap; }
.recent-row:hover .rr-open { color: rgba(var(--accent-rgb), 1); }

/* Topbar badges */

.tab-badge {
  display: inline-block;
  min-width: 17px;
  padding: 1px 5px;
  margin-left: 2px;
  border-radius: 99px;
  background: rgba(var(--accent-rgb), 0.16);
  color: rgba(var(--accent-rgb), 1);
  font-family: var(--mono);
  font-size: 10px;
  text-align: center;
}

/* Drawer (Ledger / Trust) */

.drawer-veil {
  position: fixed;
  inset: 0;
  z-index: 54;
  background: rgba(3, 5, 9, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--slow) var(--ease);
}
.drawer-veil.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  width: min(940px, 94vw);
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0) 34%),
    var(--glass-strong);
  border-left: 1px solid var(--edge-lit);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  box-shadow: -40px 0 90px -30px rgba(1, 4, 9, 0.8);
  transform: translateX(103%);
  visibility: hidden;
  transition: transform var(--slow) var(--ease), visibility 0s var(--slow);
}
.drawer.open {
  transform: translateX(0);
  visibility: visible;
  transition: transform var(--slow) var(--ease);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px 14px;
  border-bottom: 1px solid var(--edge);
}
.drawer-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 720;
  letter-spacing: 0.01em;
}

.drawer-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px 28px;
}

.drawer-panel { display: none; }
.drawer-panel.active { display: block; animation: panel-in var(--slow) var(--ease) both; }

/* Fields */

.field textarea,
.field input,
.submitter-field input {
  width: 100%;
  background: rgba(5, 9, 14, 0.55);
  border: 1px solid var(--edge);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 11px 13px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  resize: vertical;
  transition: border-color var(--base) var(--ease), box-shadow var(--base) var(--ease);
}

.field textarea:focus,
.field input:focus,
.submitter-field input:focus {
  outline: none;
  border-color: rgba(var(--accent-rgb), 0.55);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}

.doc { display: block; }

.doc-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}
.doc-label b {
  font-size: 12.5px;
  font-weight: 680;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.doc-label small {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 460;
  font-size: 13px;
  color: var(--dim);
}

/* ── 04 · Threshold ──────────────────────────────────────────────────────── */

.threshold {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  /* deep veil: the console behind reads as depth, never as a second UI */
  background:
    radial-gradient(60% 50% at 50% -10%, rgba(var(--accent-rgb), 0.1), transparent 70%),
    linear-gradient(180deg, rgba(4, 7, 11, 0.82), rgba(4, 7, 11, 0.96));
  backdrop-filter: blur(16px) saturate(0.85);
  -webkit-backdrop-filter: blur(16px) saturate(0.85);
  opacity: 1;
  transition: opacity var(--slow) var(--ease);
}

.threshold.leaving { opacity: 0; pointer-events: none; }

.threshold-stage {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  /* the specimen's halo/tilt poke past the column — never let that
     manifest as a horizontal scrollbar */
  overflow-x: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(24px, 5vw, 90px);
  max-width: 1380px;
  width: 100%;
  margin: 0 auto;
  padding: clamp(20px, 4vh, 48px) clamp(20px, 4vw, 56px) 16px;
}

.threshold-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  animation: rise-in 0.7s var(--ease) both;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px 1px rgba(61, 220, 138, 0.8);
  animation: pulse-dot 2.6s ease-in-out infinite;
}

.threshold-title {
  margin: 0;
  font-size: clamp(40px, 5.4vw, 68px);
  font-weight: 750;
  line-height: 1.0;
  letter-spacing: -0.025em;
  animation: rise-in 0.7s var(--ease) 0.1s both;
}

.threshold-question {
  margin: 18px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 450;
  font-size: clamp(24px, 2.8vw, 38px);
  line-height: 1.15;
  color: var(--green-bright);
  text-shadow: 0 0 34px rgba(61, 220, 138, 0.35);
  animation: rise-in 0.7s var(--ease) 0.22s both;
}

.threshold-line {
  margin: 20px 0 0;
  max-width: 520px;
  font-size: 15.5px;
  font-weight: 400;
  color: var(--muted);
  animation: rise-in 0.7s var(--ease) 0.34s both;
}
.threshold-line b { color: var(--text); font-weight: 600; }

.threshold-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
  animation: rise-in 0.7s var(--ease) 0.46s both;
}

.threshold-judges {
  margin-top: 34px;
  animation: rise-in 0.7s var(--ease) 0.58s both;
}

.threshold-judges-label {
  display: block;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}

.threshold-judge-row { display: flex; flex-wrap: wrap; gap: 8px; }

.threshold-receipt {
  position: relative;
  margin: 0;
  perspective: 1100px;
  animation:
    drift-in 0.9s var(--ease) 0.5s both,
    spec-float 7.5s ease-in-out 2.2s infinite;
}

/* breathing halo behind the specimen — "actively verifying" */
.threshold-receipt::before {
  content: "";
  position: absolute;
  inset: -12% -18%;
  z-index: -1;
  background: radial-gradient(48% 44% at 55% 46%, rgba(var(--accent-rgb), 0.16), transparent 70%);
  animation: halo-breathe 8s ease-in-out infinite;
}

@keyframes spec-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

@keyframes halo-breathe {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.threshold-receipt .paper {
  transform: rotate(2.6deg);
  transition: transform var(--slow) var(--ease), box-shadow var(--slow) var(--ease);
}

.threshold-receipt:hover .paper {
  transform: rotate(1.2deg) translateY(-6px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 46px 80px -24px rgba(0, 0, 0, 0.78),
    0 0 60px -12px rgba(var(--accent-rgb), 0.2);
}

/* ── 05 · Ticker ─────────────────────────────────────────────────────────── */

.ticker {
  display: flex;
  align-items: stretch;
  border-top: 1px solid var(--edge);
  background: rgba(5, 8, 13, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  min-height: 42px;
}

.ticker-tag {
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-right: 1px solid var(--edge);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}

.ticker-viewport { flex: 1; overflow: hidden; display: flex; align-items: center; }

/* driven by JS so hover eases to a halt instead of freezing */
.ticker-track {
  display: flex;
  gap: 34px;
  padding-left: 24px;
  white-space: nowrap;
  width: max-content;
  will-change: transform;
}

.tick {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.tick i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--tick-tint, var(--green));
}
.tick[data-verdict="pass"] { --tick-tint: var(--green); }
.tick[data-verdict="revise"] { --tick-tint: var(--amber); }
.tick[data-verdict="fail"] { --tick-tint: var(--red); }
.tick b { color: var(--text); font-weight: 500; }
.tick .tick-verdict { color: var(--tick-tint); font-weight: 700; letter-spacing: 0.06em; }
.tick small { color: var(--dim); }

/* ── 06 · Topbar ─────────────────────────────────────────────────────────── */

.console {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100svh;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 22px;
  height: var(--topbar-h);
  padding: 0 var(--console-gutter);
  border-bottom: 1px solid var(--edge);
  background: rgba(7, 11, 17, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.brand { display: flex; align-items: center; gap: 11px; }

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(170deg, #f6f2e8, #ddd6c2);
  color: #f4f0e5;
  box-shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.brand-mark svg { width: 24px; height: 24px; color: #11161d; }

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; }
.brand-text small { font-size: 10.5px; color: var(--dim); font-family: var(--mono); letter-spacing: 0.04em; }

.topbar-actions { display: flex; align-items: center; gap: 14px; }

.runtime-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 99px;
  border: 1px solid var(--edge);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.runtime-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--dim); }
.runtime-pill.online { color: var(--green-bright); border-color: rgba(61, 220, 138, 0.35); }
.runtime-pill.online i { background: var(--green); box-shadow: 0 0 8px rgba(61, 220, 138, 0.9); }
.runtime-pill.offline { color: #ff9d97; border-color: rgba(255, 93, 85, 0.4); }
.runtime-pill.offline i { background: var(--red); }

.top-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--display);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  transition: color var(--base) var(--ease);
}
.top-link:hover { color: var(--text); }

.topbar-rule {
  width: 1px;
  height: 20px;
  background: var(--edge);
}

/* ── 07 · Console layout ─────────────────────────────────────────────────── */

.console-body {
  flex: 1;
  min-height: 0;
  position: relative;
  display: grid;
  /* proportional columns: wide screens widen everything, laptops keep the bench roomy */
  grid-template-columns: minmax(238px, 0.85fr) minmax(0, 2.3fr) minmax(330px, 1.08fr);
  gap: 18px;
  padding: 18px var(--console-gutter) 22px;
}

/* ── cartridge swap: ghost wipe ──
   On swap, each shell gets a GHOST — an opaque snapshot of its old content —
   while the real data changes invisibly beneath. The ghost wipes away top to
   bottom with the scan line riding its clip edge: old content visibly becomes
   new content under the line. Nothing resets; clicking another judge mid-wipe
   only redirects what the wipe reveals. */

.docket, .bench, #view-bench, .desk { position: relative; }

.swap-ghost {
  position: absolute;
  margin: 0;
  z-index: 6;
  pointer-events: none;
  overflow: hidden;
  /* opaque base coat beneath the atmosphere copy — together they reproduce the
     exact backdrop, so the snapshot is indistinguishable from the live surface */
  background: var(--bg0);
  animation: ghost-wipe 0.95s cubic-bezier(0.52, 0, 0.16, 1) both;
  animation-delay: var(--ghost-delay, 0ms);
}

/* the atmosphere copy: pinned to where the fixed layer sits in the viewport */
.swap-ghost .ghost-backdrop {
  position: absolute;
  right: auto;
  bottom: auto;
}

/* the snapshot keeps its own glass, borders, and shadows untouched; only the
   backdrop blur is dropped — it would sample the fresh content beneath the
   ghost instead of the backdrop copy (which, being smooth gradients, looks
   the same unblurred) */
.swap-ghost .ghost-shell {
  position: absolute;
  inset: 0;
}
.swap-ghost .ghost-shell,
.swap-ghost .ghost-shell .glass {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* a snapshot doesn't animate: hold cloned ambience (pulse dots, atmosphere
   seal, grid drift) at rest instead of replaying entrances mid-wipe */
.swap-ghost .ghost-backdrop *,
.swap-ghost .ghost-shell * {
  animation-play-state: paused !important;
  transition: none !important;
}

.swap-scanline {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  z-index: 7;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.1), rgba(var(--accent-rgb), 0.9) 18%, rgba(var(--accent-rgb), 0.9) 82%, rgba(var(--accent-rgb), 0.1));
  box-shadow: 0 0 16px 2px rgba(var(--accent-rgb), 0.55);
  animation: scanline-travel 0.95s cubic-bezier(0.52, 0, 0.16, 1) both;
  animation-delay: var(--ghost-delay, 0ms);
}

/* overview→chamber: ONE ghost of the whole floor covers the canvas and wipes
   away, revealing the chamber already seated beneath the scan line */
.dock-ghost { inset: 0; }

@keyframes ghost-wipe {
  from { clip-path: inset(0 0 0 0); }
  to { clip-path: inset(101% 0 0 0); }
}

@keyframes scanline-travel {
  from { top: 0; }
  to { top: 101%; }
}

.docket, .bench, .desk {
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* scrollbars stay invisible until the column is actually being explored */
.docket, .bench, .desk { scrollbar-color: transparent transparent; }
.docket:hover, .bench:hover, .desk:hover { scrollbar-color: rgba(var(--accent-rgb), 0.3) transparent; }
.docket::-webkit-scrollbar, .bench::-webkit-scrollbar, .desk::-webkit-scrollbar { width: 6px; }
.docket::-webkit-scrollbar-track, .bench::-webkit-scrollbar-track, .desk::-webkit-scrollbar-track { background: transparent; }
.docket::-webkit-scrollbar-thumb, .bench::-webkit-scrollbar-thumb, .desk::-webkit-scrollbar-thumb {
  background: transparent;
  border: none;
}
.docket:hover::-webkit-scrollbar-thumb, .bench:hover::-webkit-scrollbar-thumb, .desk:hover::-webkit-scrollbar-thumb {
  background: rgba(var(--accent-rgb), 0.3);
  border-radius: 99px;
}

/* ── 08 · Docket ─────────────────────────────────────────────────────────── */

.docket { padding: 16px 14px; display: flex; flex-direction: column; gap: 12px; }

.docket-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.docket-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.docket-head small { font-family: var(--mono); font-size: 10px; color: var(--dim); letter-spacing: 0.06em; text-transform: uppercase; }

.docket-list { display: flex; flex-direction: column; gap: 8px; }

.case-card {
  position: relative;
  text-align: left;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 170, 197, 0.1);
  background:
    linear-gradient(170deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 45%),
    rgba(151, 178, 207, 0.055);
  box-shadow: 0 8px 18px -10px rgba(1, 4, 9, 0.7);
  cursor: pointer;
  transition:
    border-color var(--base) var(--ease),
    background-color var(--base) var(--ease),
    box-shadow var(--base) var(--ease),
    transform var(--fast) var(--ease);
}
.case-card:hover {
  background:
    linear-gradient(170deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 45%),
    rgba(151, 178, 207, 0.1);
  border-color: rgba(196, 219, 240, 0.22);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px -10px rgba(1, 4, 9, 0.8);
}

/* delivered to the bench: tinted edge-bar + lifted surface */
.case-card::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
  opacity: 0;
  transition: opacity var(--base) var(--ease);
}
.case-card.active {
  border-color: rgba(var(--accent-rgb), 0.5);
  background:
    linear-gradient(170deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0) 45%),
    rgba(var(--accent-rgb), 0.08);
  box-shadow: 0 12px 28px -12px rgba(var(--accent-rgb), 0.35);
}
.case-card.active::before { opacity: 1; }

.case-card .case-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.case-card .case-meta span {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: rgba(var(--accent-rgb), 0.9);
}
.case-card.active .case-meta::after {
  content: "on the bench";
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(var(--accent-rgb), 0.16);
  color: rgba(var(--accent-rgb), 1);
}
/* this session's real outcome, if the case has been judged */
.case-card .case-verdict-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.case-card .case-verdict-dot.pass { background: var(--green); box-shadow: 0 0 7px rgba(61, 220, 138, 0.8); }
.case-card .case-verdict-dot.revise { background: var(--amber); box-shadow: 0 0 7px rgba(245, 184, 85, 0.8); }
.case-card .case-verdict-dot.fail { background: var(--red); box-shadow: 0 0 7px rgba(255, 93, 85, 0.8); }

.case-card strong {
  display: block;
  font-size: 13px;
  font-weight: 660;
  line-height: 1.3;
  letter-spacing: -0.005em;
}
.case-card small { display: block; margin-top: 3px; font-size: 12px; color: var(--dim); line-height: 1.45; }

.docket-note {
  margin: auto 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--edge);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 460;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--dim);
}

/* ── 09 · Bench ──────────────────────────────────────────────────────────── */

.bench { display: flex; flex-direction: column; }

/* flex-grow (not %-height) so the glass reliably reaches the floor even when idle */
.panel { padding: 22px clamp(20px, 1.8vw, 34px) 24px; flex: 1 0 auto; }

.bench-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

.bench-head-copy { min-width: 0; }

.case-id {
  font-size: 10px;
  color: var(--dim);
  letter-spacing: 0.1em;
  padding: 2px 7px;
  border: 1px solid var(--edge);
  border-radius: 5px;
}

.bench-head h1 {
  margin: 4px 0 6px;
  font-size: clamp(22px, 2.4vw, 31px);
  font-weight: 720;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.bench-blurb {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14.5px;
  color: var(--muted);
}

.identity-capsule {
  flex-shrink: 0;
  display: flex;
  gap: 16px;
  padding: 10px 15px;
  border: 1px solid var(--edge);
  border-radius: var(--radius-sm);
  background: rgba(5, 9, 14, 0.4);
}
.identity-capsule > div { display: flex; flex-direction: column; gap: 1px; }
.identity-capsule span {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}
.identity-capsule strong { font-size: 12px; font-weight: 620; color: var(--text); }
.identity-capsule strong.mono { font-size: 11.5px; color: var(--muted); }

/* Dossier — reads as a typeset case file, not a form. The inputs only
   reveal themselves on hover/focus. */

.dossier-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 22px;
}
.doc-wide { grid-column: 1 / -1; }

.dossier .doc {
  padding: 12px 14px 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 170, 197, 0.1);
  border-left: 2.5px solid rgba(148, 170, 197, 0.22);
  background:
    linear-gradient(172deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0) 38%),
    rgba(9, 14, 20, 0.5);
  transition: border-color var(--base) var(--ease), background-color var(--base) var(--ease);
}
.dossier .doc:hover { border-color: rgba(196, 219, 240, 0.2); border-left-color: rgba(var(--accent-rgb), 0.45); }
.dossier .doc:focus-within {
  border-left-color: rgba(var(--accent-rgb), 0.75);
  border-color: rgba(var(--accent-rgb), 0.3);
  background:
    linear-gradient(172deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0) 38%),
    rgba(9, 14, 20, 0.65);
}

/* quiet "this is editable" affordance */
.dossier .doc-label { position: relative; }
.dossier .doc-label::after {
  content: "✎ edit";
  position: absolute;
  right: 0;
  top: -2px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(var(--accent-rgb), 0.9);
  opacity: 0;
  transition: opacity var(--base) var(--ease);
}
.dossier .doc:hover .doc-label::after { opacity: 1; }
.dossier .doc:hover .doc-label small,
.dossier .doc:focus-within .doc-label small { opacity: 0; }
.dossier .doc-label small { transition: opacity var(--base) var(--ease); }

.dossier .doc textarea {
  background: transparent;
  border-color: transparent;
  padding: 2px 0 4px;
  overflow: hidden;
  resize: none;
  min-height: 52px;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 420;
  line-height: 1.62;
  color: #d6dfe9;
}
/* the submitted work is machine output — keep it forensic */
.dossier .doc-wide textarea { font-family: var(--mono); font-size: 12.5px; color: #c9d4e0; }

.dossier .doc textarea:hover,
.dossier .doc textarea:focus {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--text);
}

.bench-run {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-top: 13px;
}

.submitter-field { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.submitter-field span {
  font-size: 11px;
  font-weight: 680;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.submitter-field input { padding: 9px 12px; }

.btn-judge { padding: 11px 26px; border-radius: 12px; }
.btn-judge .btn-stack { align-items: center; }
.btn-judge.loading { pointer-events: none; }
.btn-judge.loading b::after { content: "…"; }

/* Pipeline */

.pipeline {
  list-style: none;
  display: flex;
  gap: 0;
  margin: 18px 0 0;
  padding: 0;
}

.pipe-step {
  position: relative;
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 12px 2px 0;
  opacity: 0.45;
  transition: opacity var(--base) var(--ease);
}

.pipe-step i {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 50%;
  border: 2px solid var(--dim);
  background: transparent;
  transition: border-color var(--base) var(--ease), background-color var(--base) var(--ease), box-shadow var(--base) var(--ease);
}

.pipe-step::after {
  content: "";
  position: absolute;
  top: 9.5px;
  left: 22px;
  right: 10px;
  height: 1px;
  background: var(--edge);
}
.pipe-step:last-child::after { display: none; }

.pipe-step b { display: block; font-size: 12.5px; font-weight: 660; line-height: 1.3; }
.pipe-step small { display: block; margin-top: 1px; font-size: 11px; font-weight: 480; color: var(--dim); line-height: 1.4; }

.pipe-step.active { opacity: 1; }
.pipe-step.active i {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.35);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.8);
  animation: pipe-pulse 0.9s ease-in-out infinite;
}
.pipe-step.done { opacity: 0.85; }
.pipe-step.done i { border-color: var(--accent); background: var(--accent); box-shadow: none; }

/* Findings — compact signal cloud + reasoning prose, no dead columns */

.findings { margin-top: 22px; display: flex; flex-direction: column; gap: 18px; }

.findings-empty { font-size: 13px; padding: 12px 16px; }

/* content unfolds when judgment lands — the screen grows with the story */
.findings .finding-block {
  animation: unfold-in 0.6s var(--ease) both;
}
.findings .finding-block:nth-child(2) { animation-delay: 0.16s; }

@keyframes unfold-in {
  from {
    opacity: 0;
    transform: translateY(12px);
    clip-path: inset(0 0 72% 0 round 10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    clip-path: inset(0 0 0 0 round 0);
  }
}

/* docket → bench delivery: the sheets land in sequence */
.panel.delivering .dossier .doc { animation: rise-in 0.45s var(--ease) both; }
.panel.delivering .dossier .doc:nth-child(2) { animation-delay: 0.09s; }
.panel.delivering .dossier .doc:nth-child(3) { animation-delay: 0.18s; }
.panel.delivering .bench-head h1 { animation: rise-in 0.4s var(--ease) both; }
.panel.delivering .case-id { animation: stamp-in 0.4s var(--ease-stamp) 0.1s both; display: inline-block; }

.finding-block header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.finding-block h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.finding-block header small { font-family: var(--mono); font-size: 10px; color: var(--dim); }

.signal-cloud { display: flex; flex-wrap: wrap; gap: 6px; }

.signal-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 99px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  background: rgba(var(--accent-rgb), 0.07);
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  animation: row-in 0.35s var(--ease) both;
  animation-delay: var(--row-delay, 0ms);
}
.signal-chip::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.9);
}
.signal-chip.meta {
  border-color: var(--edge);
  background: rgba(151, 178, 207, 0.05);
  color: var(--muted);
}
.signal-chip.meta::before { background: var(--dim); }
.signal-chip.risk {
  border-color: rgba(255, 93, 85, 0.4);
  background: rgba(255, 93, 85, 0.08);
  color: #ffb4af;
}
.signal-chip.risk::before { background: var(--red); }

.reasoning-list {
  margin: 0;
  padding: 0 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 78ch;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}
.reasoning-list li::marker { color: rgba(var(--accent-rgb), 0.7); font-family: var(--mono); font-size: 11px; }
.reasoning-list li { animation: row-in 0.4s var(--ease) both; animation-delay: var(--row-delay, 0ms); }

/* ── 10 · Ledger & Trust ─────────────────────────────────────────────────── */

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}
.panel-head h2 {
  margin: 4px 0 6px;
  font-size: 24px;
  font-weight: 720;
  letter-spacing: -0.015em;
}
.panel-sub { margin: 0; max-width: 56ch; font-size: 13.5px; color: var(--muted); }
.panel-sub .mono { font-size: 12px; color: rgba(var(--accent-rgb), 0.9); }

.archive-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.archive-table th {
  text-align: left;
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  border-bottom: 1px solid var(--edge);
}
.archive-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(148, 170, 197, 0.07);
  color: var(--muted);
}
.archive-table tr:hover td { background: rgba(151, 178, 207, 0.04); color: var(--text); }

.table-verdict {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 5px;
}
.table-verdict.pass { color: var(--green-bright); background: rgba(61, 220, 138, 0.12); }
.table-verdict.revise { color: var(--amber); background: rgba(245, 184, 85, 0.12); }
.table-verdict.fail { color: #ff9d97; background: rgba(255, 93, 85, 0.12); }

.json-drawer { margin-top: 16px; }
.json-drawer summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  padding: 9px 12px;
  border: 1px solid var(--edge);
  border-radius: var(--radius-sm);
  transition: color var(--base) var(--ease), border-color var(--base) var(--ease);
  list-style: none;
}
.json-drawer summary::-webkit-details-marker { display: none; }
.json-drawer summary::before { content: "▸ "; color: rgba(var(--accent-rgb), 0.8); }
.json-drawer[open] summary::before { content: "▾ "; }
.json-drawer summary:hover { color: var(--text); border-color: var(--edge-lit); }
.json-drawer pre {
  margin: 10px 0 0;
  padding: 14px;
  max-height: 320px;
  overflow: auto;
  background: rgba(4, 7, 11, 0.7);
  border: 1px solid var(--edge);
  border-radius: var(--radius-sm);
  font-size: 11px;
  line-height: 1.55;
  color: #b9c6d6;
}

/* Trust */

.paste-verify { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.paste-verify .btn { align-self: flex-start; }

.trust-block { margin-top: 26px; }
.trust-block h3 {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.registry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.registry-card {
  padding: 13px 14px;
  border: 1px solid var(--edge);
  border-radius: var(--radius-sm);
  background: rgba(5, 9, 14, 0.4);
  transition: border-color var(--base) var(--ease);
}
.registry-card.active { border-color: rgba(var(--accent-rgb), 0.45); }
.registry-card .reg-name { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; }
.registry-card .reg-name i { width: 7px; height: 7px; border-radius: 50%; background: var(--reg-tint, var(--green)); }
.registry-card[data-judge="code"] { --reg-tint: var(--tint-code); }
.registry-card[data-judge="research"] { --reg-tint: var(--tint-research); }
.registry-card[data-judge="negotiation"] { --reg-tint: var(--tint-negotiation); }
.registry-card[data-judge="governance"] { --reg-tint: var(--tint-governance); }
.registry-card .reg-id { display: block; margin: 7px 0 2px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.registry-card .reg-ip { display: block; font-family: var(--mono); font-size: 10px; color: var(--dim); }
.registry-card a {
  display: inline-block;
  margin-top: 9px;
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(var(--accent-rgb), 0.9);
}
.registry-card a:hover { color: var(--green-bright); }

.spine {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.spine li {
  position: relative;
  flex: 1;
  min-width: 150px;
  padding: 12px 14px;
  border: 1px solid var(--edge);
  border-radius: var(--radius-sm);
  background: rgba(5, 9, 14, 0.4);
}
.spine li.strong { border-color: rgba(var(--accent-rgb), 0.4); background: rgba(var(--accent-rgb), 0.05); }
.spine b { display: block; font-size: 12.5px; font-weight: 650; }
.spine small { display: block; margin-top: 2px; font-size: 11px; color: var(--dim); }

.boundary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.boundary-col {
  padding: 15px 17px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--edge);
}
.boundary-col.proves { border-color: rgba(61, 220, 138, 0.3); background: rgba(61, 220, 138, 0.04); }
.boundary-col.limits { border-color: rgba(245, 184, 85, 0.25); background: rgba(245, 184, 85, 0.03); }
.boundary-col h4 {
  margin: 0 0 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.boundary-col.proves h4 { color: var(--green-bright); }
.boundary-col.limits h4 { color: var(--amber); }
.boundary-col ul { margin: 0; padding-left: 17px; font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 5px; }

/* ── 11 · Paper & receipt states (the hero) ─────────────────────────────── */

.desk { display: flex; flex-direction: column; gap: 12px; padding: 16px clamp(16px, 1.2vw, 26px) 18px; }

/* the paper keeps its physical size; a wide desk column just gives it air */
.desk > * { width: 100%; max-width: 470px; margin-inline: auto; }

.desk-slot { position: relative; }

.receipt-tray {
  border: 1.5px dashed rgba(148, 170, 197, 0.25);
  border-radius: 12px;
  padding: 28px 26px 34px;
  text-align: center;
  transition: opacity var(--base) var(--ease);
}

/* ghost of the receipt to come */
.receipt-tray::before {
  content: "";
  display: block;
  width: 58%;
  height: 120px;
  margin: 0 auto 20px;
  border: 1.5px dashed rgba(148, 170, 197, 0.3);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background:
    linear-gradient(rgba(148, 170, 197, 0.16) 1.5px, transparent 1.5px) 0 22px / 100% 17px no-repeat padding-box,
    repeating-linear-gradient(transparent 0 13px, rgba(148, 170, 197, 0.1) 13px 14.5px) 0 48px / 72% 60px no-repeat padding-box;
  background-position: 18% 24px, 18% 52px;
  clip-path: polygon(
    0 0, 100% 0, 100% calc(100% - 7px),
    93.75% 100%, 87.5% calc(100% - 7px), 81.25% 100%, 75% calc(100% - 7px),
    68.75% 100%, 62.5% calc(100% - 7px), 56.25% 100%, 50% calc(100% - 7px),
    43.75% 100%, 37.5% calc(100% - 7px), 31.25% 100%, 25% calc(100% - 7px),
    18.75% 100%, 12.5% calc(100% - 7px), 6.25% 100%, 0 calc(100% - 7px)
  );
  opacity: 0.55;
}

.tray-line {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 470;
  font-size: 16px;
  color: var(--muted);
}
.tray-sub { margin: 7px 0 0; font-size: 12.5px; color: var(--dim); }

.paper {
  position: relative;
  background:
    linear-gradient(168deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 38%),
    linear-gradient(180deg, var(--paper), var(--paper-deep));
  color: var(--ink);
  border-radius: 8px 8px 0 0;
  padding: 20px 20px 26px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 36px 70px -22px rgba(0, 0, 0, 0.75);
  /* receipt zig-zag bottom edge */
  clip-path: polygon(
    0 0, 100% 0,
    100% calc(100% - 9px),
    95% 100%, 90% calc(100% - 9px), 85% 100%, 80% calc(100% - 9px),
    75% 100%, 70% calc(100% - 9px), 65% 100%, 60% calc(100% - 9px),
    55% 100%, 50% calc(100% - 9px), 45% 100%, 40% calc(100% - 9px),
    35% 100%, 30% calc(100% - 9px), 25% 100%, 20% calc(100% - 9px),
    15% 100%, 10% calc(100% - 9px), 5% 100%, 0 calc(100% - 9px)
  );
}

/* paper grain */
.paper::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.2 0 0 0 0 0.18 0 0 0 0 0.12 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
}

.paper-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 10px;
  border-bottom: 1.5px solid rgba(24, 29, 27, 0.85);
}
.paper-brand {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.paper-doc {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.paper-verdict {
  padding: 16px 0 4px;
  display: flex;
  flex-direction: column;
}
.paper-verdict small {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.paper-verdict strong {
  font-size: clamp(34px, 2.6vw, 42px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
  transform: rotate(-1.6deg);
  transform-origin: left bottom;
  margin: 3px 0 1px;
}
.paper-verdict span {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.paper-verdict.pass strong, .paper-verdict.pass span { color: var(--ink-pass); }
.paper-verdict.revise strong, .paper-verdict.revise span { color: var(--ink-revise); }
.paper-verdict.fail strong, .paper-verdict.fail span { color: var(--ink-fail); }

.action-note {
  margin: 2px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.paper-rows {
  margin: 14px 0 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  border-top: 1px dashed rgba(24, 29, 27, 0.3);
  padding-top: 12px;
}
.paper-rows > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border-radius: 4px;
  transition: background-color var(--base) var(--ease), box-shadow var(--base) var(--ease);
}
.paper-rows dt {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}
.paper-rows dd {
  margin: 0;
  font-size: 12px;
  font-weight: 550;
  text-align: right;
  overflow-wrap: anywhere;
}
.paper-rows dd.mono { font-size: 10.5px; font-weight: 500; }

.paper-forensics { margin-top: 12px; }
.paper-forensics summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px dashed rgba(24, 29, 27, 0.3);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.paper-forensics summary::-webkit-details-marker { display: none; }
.paper-forensics summary .mono {
  font-size: 9px;
  font-weight: 400;
  color: var(--ink-soft);
  letter-spacing: 0.08em;
}
.paper-forensics summary::after { content: "+"; font-weight: 700; color: var(--ink-soft); }
.paper-forensics[open] summary::after { content: "–"; }
.paper-forensics .paper-rows { border-top: none; padding-top: 4px; margin-top: 0; }

.paper-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-top: 16px;
}
.paper-note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.seal {
  flex-shrink: 0;
  width: 58px;
  height: 58px;
  color: #1d8a55;
  filter: drop-shadow(0 2px 6px rgba(29, 138, 85, 0.35));
  transition: color var(--base) var(--ease), transform var(--base) var(--ease), filter var(--base) var(--ease);
}
.seal svg { width: 100%; height: 100%; }

/* specimen variant (threshold) */
.specimen { max-width: 360px; margin-left: auto; }
.specimen-tag {
  position: absolute;
  top: 44%;
  left: 50%;
  z-index: 1;
  transform: translate(-50%, -50%) rotate(-22deg);
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(24, 29, 27, 0.08);
  pointer-events: none;
}

/* desk actions */
.desk-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.desk-link {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--dim);
  transition: color var(--base) var(--ease);
}
.desk-link:hover { color: rgba(var(--accent-rgb), 1); }

/* ── Receipt states ── */

.desk-slot[data-state="pending"] .receipt-tray { display: block; }

.desk-slot[data-state="sealing"] .receipt-tray,
.desk-slot[data-state="sealed"] .receipt-tray,
.desk-slot[data-state="verified"] .receipt-tray,
.desk-slot[data-state="tampered"] .receipt-tray { display: none; }

.desk-slot[data-state="sealing"] .receipt { animation: print-in 0.8s var(--ease) both; }

.desk-slot[data-state="sealing"] .seal,
.desk-slot[data-state="sealed"] .seal { animation: seal-stamp 0.55s var(--ease-stamp) both; }

.desk-slot[data-state="sealing"] .paper-verdict strong,
.desk-slot[data-state="sealed"] .paper-verdict strong { animation: stamp-in 0.5s var(--ease-stamp) 0.18s both; }

.desk-slot[data-state="verified"] .paper {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 36px 70px -22px rgba(0, 0, 0, 0.75),
    0 0 52px -8px rgba(61, 220, 138, 0.4);
}

/* tampered: the seal did its job */
.desk-slot[data-state="tampered"] .paper {
  animation: tamper-shake 0.5s var(--ease) both;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 36px 70px -22px rgba(0, 0, 0, 0.75),
    0 0 56px -6px rgba(255, 70, 60, 0.5);
}

.desk-slot[data-state="tampered"] .seal {
  color: var(--ink-fail);
  transform: rotate(-10deg) scale(0.98);
  filter: drop-shadow(0 2px 6px rgba(179, 38, 30, 0.4));
}
.desk-slot[data-state="tampered"] .seal::after {
  content: "";
  position: absolute;
  inset: -2px;
  background:
    linear-gradient(64deg, transparent 46.5%, var(--paper) 46.5%, var(--paper) 53.5%, transparent 53.5%);
  animation: crack-in 0.3s steps(2) 0.1s both;
}
.seal { position: relative; }

.desk-slot[data-state="tampered"] .paper-rows > div[data-row="score"],
.desk-slot[data-state="tampered"] .paper-rows > div.broken {
  background: rgba(179, 38, 30, 0.1);
  box-shadow: inset 0 0 0 1px rgba(179, 38, 30, 0.45);
  transform: translateX(3px) rotate(0.4deg);
}
.desk-slot[data-state="tampered"] .paper-rows > div.broken dd { color: var(--ink-fail); text-decoration: line-through solid rgba(179, 38, 30, 0.6) 1.5px; }

.receipt-banner {
  --banner-rot: -8deg;
  position: absolute;
  top: 86px;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%) rotate(var(--banner-rot));
  padding: 7px 18px;
  border: 3px double var(--ink-fail);
  border-radius: 4px;
  background: rgba(244, 240, 229, 0.78);
  color: var(--ink-fail);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  white-space: nowrap;
  animation: banner-slam 0.4s var(--ease-stamp) both;
}
.receipt-banner.ok {
  --banner-rot: -5deg;
  border-color: var(--ink-pass);
  color: var(--ink-pass);
  top: auto;
  bottom: 102px;
}
/* the stamp lifts off the paper instead of vanishing */
.receipt-banner.leaving {
  animation: none;
  transition: opacity 0.38s ease, transform 0.38s ease;
  opacity: 0;
  transform: translateX(-50%) rotate(var(--banner-rot)) scale(0.9) translateY(-8px);
}

/* ── 12 · Verify readout ─────────────────────────────────────────────────── */

.verify-readout { display: flex; flex-direction: column; gap: 6px; }

.verify-summary {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid;
  animation: row-in 0.4s var(--ease) both;
}
.verify-summary.ok {
  border-color: rgba(61, 220, 138, 0.4);
  background: rgba(61, 220, 138, 0.07);
}
.verify-summary.fail {
  border-color: rgba(255, 93, 85, 0.45);
  background: rgba(255, 93, 85, 0.08);
}
.verify-summary strong {
  display: block;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.01em;
}
.verify-summary.ok strong { color: var(--green-bright); }
.verify-summary.fail strong { color: #ffb4af; }
.verify-summary span { font-size: 12px; color: var(--muted); }

.verify-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 11px;
  border-radius: 7px;
  background: rgba(151, 178, 207, 0.045);
  animation: row-in 0.4s var(--ease) both;
  animation-delay: var(--row-delay, 0ms);
}
.verify-row .vr-state {
  flex-shrink: 0;
  width: 44px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.verify-row.ok .vr-state { color: var(--green-bright); }
.verify-row.warn .vr-state { color: var(--amber); }
.verify-row.fail .vr-state { color: #ff9d97; }
.verify-row.fail { background: rgba(255, 93, 85, 0.07); }
.verify-row b { font-size: 12px; font-weight: 600; white-space: nowrap; }
.verify-row small { font-size: 11px; color: var(--dim); line-height: 1.4; overflow-wrap: anywhere; }

.tamper-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 93, 85, 0.3);
  background: rgba(255, 93, 85, 0.05);
  animation: row-in 0.4s var(--ease) both;
}
.tamper-compare > div { display: flex; flex-direction: column; gap: 1px; padding: 4px 6px; }
.tamper-compare span {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}
.tamper-compare strong { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--muted); }
.tamper-compare strong.bad { color: #ff9d97; }

/* ── 13 · Stage (the proof, presented) ───────────────────────────────────── */

.stage {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: #04070b;
}

/* while the stage is up, stop compositing the console behind it */
body.stage-active .console { visibility: hidden; }

/* the curtain: stage fades up to reveal the destination beneath */
.stage { transition: opacity 0.5s var(--ease); }
.stage.closing { opacity: 0; pointer-events: none; }

.stage-atmo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle, rgba(165, 190, 215, 0.035) 1px, transparent 1.4px) 0 0 / 30px 30px,
    radial-gradient(52% 42% at 50% 16%, rgba(var(--accent-rgb), 0.09), transparent 70%),
    radial-gradient(70% 36% at 50% 108%, rgba(var(--accent-rgb), 0.07), transparent 72%),
    radial-gradient(120% 100% at 50% 50%, transparent 55%, rgba(1, 3, 6, 0.8) 100%);
  transition: background var(--slow) var(--ease);
}

/* faint seal rings hanging in the stage air */
.stage-atmo::before,
.stage-atmo::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(var(--accent-rgb), 0.055);
  animation: seal-breathe 9s ease-in-out infinite;
}
.stage-atmo::before { width: 64vmin; height: 64vmin; }
.stage-atmo::after {
  width: 50vmin;
  height: 50vmin;
  border-style: dashed;
  border-color: rgba(var(--accent-rgb), 0.04);
  animation-delay: 1.2s;
}
.stage[data-act="tamper"] .stage-atmo {
  background:
    radial-gradient(52% 42% at 50% 16%, rgba(255, 80, 70, 0.1), transparent 70%),
    radial-gradient(70% 36% at 50% 108%, rgba(255, 80, 70, 0.07), transparent 72%),
    radial-gradient(120% 100% at 50% 50%, transparent 50%, rgba(26, 2, 1, 0.85) 100%);
}

.stage-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px clamp(18px, 3vw, 36px);
}
.stage-brand {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.stage-brand i { font-style: normal; color: var(--dim); }
.stage-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  padding: 5px 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 99px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(var(--accent-rgb), 0.95);
}
.stage-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 9px rgba(var(--accent-rgb), 0.9);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

.stage-canvas {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px clamp(18px, 3vw, 48px);
  overflow-y: auto;
}

.stage-foot {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 10px clamp(18px, 3vw, 36px) 22px;
}

.stage-caption { max-width: 860px; text-align: center; animation: rise-in 0.45s var(--ease) both; }
.stage-kicker {
  margin: 0 0 7px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(var(--accent-rgb), 0.95);
}
.stage-line {
  margin: 0;
  font-size: clamp(21px, 2.4vw, 31px);
  font-weight: 740;
  letter-spacing: -0.018em;
  line-height: 1.12;
}
.stage-sub {
  margin: 7px auto 0;
  max-width: 640px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 460;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--muted);
}
.stage[data-act="tamper"] .stage-line { color: #ffb4af; }
.stage[data-act="tamper"] .stage-kicker { color: #ff9d97; }

.stage-rail { display: flex; gap: 6px; width: min(520px, 84vw); }

/* each dot is a real button — visited acts can be revisited by clicking */
.stage-rail > button {
  position: relative;
  appearance: none;
  height: 16px;
  flex: 1;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.stage-rail > button:disabled { cursor: default; }
.stage-rail > button::before,
.stage-rail > button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 3px;
}
.stage-rail > button::before {
  background: rgba(151, 178, 207, 0.18);
  transition: background 0.25s ease;
}
.stage-rail > button:not(:disabled):hover::before { background: rgba(151, 178, 207, 0.42); }
.stage-rail > button.done::before { background: rgba(var(--accent-rgb), 0.75); }
.stage-rail > button::after { display: none; }
.stage-rail > button.now::after {
  display: block;
  background: rgba(var(--accent-rgb), 0.55);
}
.stage-rail > button.now.filling::after {
  transform-origin: left;
  animation: beat-fill var(--act-ms, 5000ms) linear both;
}

.stage-controls { display: flex; align-items: center; gap: 10px; }
.stage-controls .btn-primary { min-width: 168px; }
#stage-auto[aria-pressed="true"] {
  color: rgba(var(--accent-rgb), 1);
  background: rgba(var(--accent-rgb), 0.1);
}

/* ── stage canvas pieces ── */

.act { animation: rise-in 0.55s var(--ease) both; max-width: 980px; width: 100%; }

/* act: the question */
.act-question { text-align: center; }
.act-question .aq-seal {
  display: block;
  width: 88px;
  height: 88px;
  margin: 0 auto 28px;
  color: rgba(var(--accent-rgb), 0.55);
  animation: seal-breathe 5s ease-in-out infinite;
}
.act-question .aq-seal svg { width: 100%; height: 100%; }
.act-question h1 {
  margin: 0;
  font-size: clamp(38px, 4.6vw, 64px);
  font-weight: 760;
  line-height: 1.03;
  letter-spacing: -0.025em;
}
.act-question .aq-q {
  margin: 18px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 2.4vw, 32px);
  color: var(--green-bright);
  text-shadow: 0 0 34px rgba(61, 220, 138, 0.35);
}

/* act: the case — three sheets */
.act-case { display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
.sheet {
  padding: 16px 20px 17px;
  border-radius: 12px;
  border: 1px solid var(--edge);
  border-left: 3px solid rgba(var(--accent-rgb), 0.5);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0) 40%),
    rgba(13, 19, 28, 0.85);
  box-shadow: 0 18px 44px -18px rgba(0, 0, 0, 0.7);
  animation: rise-in 0.5s var(--ease) both;
}
.sheet:nth-child(2) { animation-delay: 0.18s; }
.sheet:nth-child(3) { animation-delay: 0.36s; }
.sheet:nth-child(4) { animation-delay: 0.54s; }
.sheet-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.sheet-label b {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(var(--accent-rgb), 0.95);
}
.sheet-label small { font-family: var(--serif); font-style: italic; font-size: 12.5px; color: var(--muted); }
.sheet p { margin: 0; font-size: 14px; line-height: 1.6; color: #d4dde7; }
.sheet.sheet-work p { font-family: var(--mono); font-size: 12.5px; color: #c5d0dc; }

/* act: the judgment */
.act-judgment { max-width: 660px; display: flex; flex-direction: column; gap: 26px; }
.aj-identity {
  display: flex;
  justify-content: center;
  gap: 26px;
  padding: 14px 22px;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: var(--radius);
  background: rgba(var(--accent-rgb), 0.05);
}
.aj-identity div { text-align: center; }
.aj-identity span {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}
.aj-identity strong { font-size: 13px; font-weight: 650; color: var(--text); }
.aj-identity strong.mono { font-size: 12px; }

.aj-pipeline { display: flex; flex-direction: column; gap: 9px; }
.aj-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  border-radius: 10px;
  border: 1px solid var(--edge);
  background: rgba(13, 19, 28, 0.8);
  opacity: 0.4;
  transition: opacity var(--base) var(--ease), border-color var(--base) var(--ease);
}
.aj-step i {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--dim);
  transition: border-color var(--base) var(--ease), background-color var(--base) var(--ease), box-shadow var(--base) var(--ease);
}
.aj-step b { font-size: 14px; font-weight: 650; }
.aj-step small { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.aj-step.active { opacity: 1; border-color: rgba(var(--accent-rgb), 0.45); }
.aj-step.active i {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.4);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.8);
  animation: pipe-pulse 0.9s ease-in-out infinite;
}
.aj-step.done { opacity: 0.85; }
.aj-step.done i { border-color: var(--accent); background: var(--accent); }

/* act: receipt + proof — the large paper */
.act-receipt {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 34px;
  transition: gap 0.6s var(--ease);
}

/* the side panel expands and retracts; the paper recenters through flex.
   Inner content keeps its width — the panel clips, never squishes. */
.stage-side {
  width: min(430px, 90vw);
  overflow: hidden;
  opacity: 1;
  transform: translateX(0);
  transition: width 0.6s var(--ease), opacity 0.4s ease, transform 0.6s var(--ease);
}
.act-receipt[data-phase="receipt"] { gap: 0; }
.act-receipt[data-phase="tamper"] { gap: 0; }
.act-receipt[data-phase="receipt"] .stage-side,
.act-receipt[data-phase="tamper"] .stage-side {
  width: 0;
  opacity: 0;
  transform: translateX(26px);
}

.stage-paper-wrap { position: relative; width: min(470px, 92vw); flex-shrink: 0; }
.stage-paper-wrap .paper { transition: box-shadow 0.6s ease; }

/* the paper floats in its own light, like the threshold specimen */
.stage-paper-wrap::before {
  content: "";
  position: absolute;
  inset: -16% -22%;
  z-index: -1;
  background: radial-gradient(50% 46% at 50% 44%, rgba(var(--accent-rgb), 0.14), transparent 70%);
  animation: halo-breathe 8s ease-in-out infinite;
}
.stage[data-act="tamper"] .stage-paper-wrap::before {
  background: radial-gradient(50% 46% at 50% 44%, rgba(255, 80, 70, 0.13), transparent 70%);
}
.stage-paper-wrap .paper { padding: 26px 26px 32px; }
.stage-paper-wrap .paper-verdict strong { font-size: clamp(40px, 4vw, 52px); }
.stage-checks { width: min(430px, 90vw); display: flex; flex-direction: column; gap: 6px; }

/* ── the autoplay actor's hand: a glass ring in the judge's accent ──
   The outer element carries X, the inner carries Y on a different curve,
   so travel bends like a wrist instead of a ruler. */
.stage-cursor {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  will-change: transform;
}
.stage-cursor.visible { opacity: 1; }
.stage-cursor .cursor-y { display: block; will-change: transform; }
.stage-cursor .cursor-ring {
  position: absolute;
  left: -13px;
  top: -13px;
  width: 26px;
  height: 26px;
  border-radius: 99px;
  border: 1.5px solid rgba(var(--accent-rgb), 0.95);
  background: rgba(var(--accent-rgb), 0.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45), 0 0 12px rgba(var(--accent-rgb), 0.35);
  transition: transform 0.16s var(--ease);
}
.stage-cursor .cursor-dot {
  position: absolute;
  left: -2.5px;
  top: -2.5px;
  width: 5px;
  height: 5px;
  border-radius: 99px;
  background: rgba(var(--accent-rgb), 1);
  transition: transform 0.16s var(--ease);
}
.stage-cursor.pressing .cursor-ring { transform: scale(0.6); }
.stage-cursor.pressing .cursor-dot { transform: scale(1.8); }
.stage-cursor .cursor-ripple {
  position: absolute;
  left: -19px;
  top: -19px;
  width: 38px;
  height: 38px;
  border-radius: 99px;
  border: 2px solid rgba(var(--accent-rgb), 0.85);
  opacity: 0;
  transform: scale(0.4);
}
.stage-cursor.pressing .cursor-ripple { animation: cursor-ripple 0.5s ease both; }

@keyframes cursor-ripple {
  0% { opacity: 0.9; transform: scale(0.4); }
  100% { opacity: 0; transform: scale(1.45); }
}

/* what the hand touches, responds */
.cursor-pressed { transform: scale(0.97) !important; }
.act-case .sheet { transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.act-case .sheet.cursor-hover {
  transform: translateY(-8px);
  box-shadow: 0 26px 50px -18px rgba(0, 0, 0, 0.75), 0 0 30px -8px rgba(var(--accent-rgb), 0.35);
}
.paper-rows > div { transition: background 0.25s ease, box-shadow 0.25s ease; }
.paper-rows > div.cursor-hover {
  background: rgba(24, 29, 27, 0.07);
  box-shadow: inset 0 0 0 1px rgba(24, 29, 27, 0.18);
  border-radius: 4px;
}
.verify-row.cursor-hover { box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.5); }
.paper-foot .seal.cursor-hover { filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), 0.5)); }

/* case → judgment: the sheets feed into the machine */
.act-case.ingesting .sheet {
  transition: transform 0.42s cubic-bezier(0.5, 0, 0.8, 0.4), opacity 0.4s ease-in;
  opacity: 0;
  transform: translateY(-34px) scale(0.84);
}
.act-case.ingesting .sheet:nth-child(1) { transform: translate(150px, -34px) scale(0.84); }
.act-case.ingesting .sheet:nth-child(2) { transition-delay: 0.05s, 0.05s; }
.act-case.ingesting .sheet:nth-child(3) { transform: translate(-150px, -34px) scale(0.84); transition-delay: 0.1s, 0.1s; }

/* tamper affordance: the score row becomes the button */
.stage[data-act="tamper"] .stage-paper-wrap .paper-rows > div[data-row="score"]:not(.broken) {
  cursor: pointer;
  box-shadow: inset 0 0 0 1.5px rgba(179, 38, 30, 0.55);
  animation: tamper-invite 1.6s ease-in-out infinite;
}

/* act: the point */
.act-close { text-align: center; max-width: 820px; }
.act-close h1 {
  margin: 0;
  font-size: clamp(40px, 5vw, 68px);
  font-weight: 770;
  letter-spacing: -0.027em;
  line-height: 1.02;
}
.act-close .ac-sub {
  margin: 20px auto 0;
  max-width: 56ch;
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1.55;
  color: #b9c6d6;
}
.act-close .ac-built {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 26px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(var(--accent-rgb), 0.9);
}
.ac-judges { display: inline-flex; gap: 7px; }
.ac-judges i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.ac-judges i:nth-child(1) { background: var(--tint-code); box-shadow: 0 0 8px rgba(var(--tint-code-rgb), 0.8); }
.ac-judges i:nth-child(2) { background: var(--tint-research); box-shadow: 0 0 8px rgba(var(--tint-research-rgb), 0.8); }
.ac-judges i:nth-child(3) { background: var(--tint-negotiation); box-shadow: 0 0 8px rgba(var(--tint-negotiation-rgb), 0.8); }
.ac-judges i:nth-child(4) { background: var(--tint-governance); box-shadow: 0 0 8px rgba(var(--tint-governance-rgb), 0.8); }
.act-close .ac-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

@keyframes seal-breathe {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; }
}

@keyframes tamper-invite {
  0%, 100% { box-shadow: inset 0 0 0 1.5px rgba(179, 38, 30, 0.35); }
  50% { box-shadow: inset 0 0 0 2px rgba(179, 38, 30, 0.75); }
}

/* ── 14 · Toast ──────────────────────────────────────────────────────────── */

.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 70;
  padding: 11px 20px;
  border-radius: 11px;
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  background: var(--glass-strong);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-deep);
  animation: rise-in 0.35s var(--ease) both;
}
.toast.error { border-color: rgba(255, 93, 85, 0.5); color: #ffb4af; }

/* ── 15 · Keyframes ──────────────────────────────────────────────────────── */

@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes drift-in {
  from { opacity: 0; transform: translateX(26px) rotate(4deg); }
  to { opacity: 1; transform: translateX(0) rotate(0); }
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes row-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 8px 0 rgba(61, 220, 138, 0.8); }
  50% { box-shadow: 0 0 14px 3px rgba(61, 220, 138, 0.45); }
}

@keyframes pipe-pulse {
  0%, 100% { box-shadow: 0 0 6px rgba(var(--accent-rgb), 0.9); }
  50% { box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.45); }
}

@keyframes print-in {
  0% { opacity: 0; transform: translateY(-26px); clip-path: inset(0 0 100% 0); }
  60% { opacity: 1; }
  100% { opacity: 1; transform: translateY(0); clip-path: inset(0 0 -20px 0); }
}

@keyframes stamp-in {
  0% { opacity: 0; transform: rotate(-1.6deg) scale(1.7); filter: blur(3px); }
  62% { opacity: 1; transform: rotate(-1.6deg) scale(0.96); filter: blur(0); }
  100% { opacity: 1; transform: rotate(-1.6deg) scale(1); }
}

@keyframes seal-stamp {
  0% { opacity: 0; transform: scale(2.1) rotate(14deg); }
  64% { opacity: 1; transform: scale(0.92) rotate(-2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes tamper-shake {
  0%, 100% { transform: translateX(0); }
  18% { transform: translateX(-7px) rotate(-0.5deg); }
  38% { transform: translateX(6px) rotate(0.4deg); }
  58% { transform: translateX(-4px); }
  78% { transform: translateX(2px); }
}

@keyframes crack-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes banner-slam {
  0% { opacity: 0; transform: translateX(-50%) rotate(var(--banner-rot, -8deg)) scale(2.4); }
  70% { opacity: 1; transform: translateX(-50%) rotate(var(--banner-rot, -8deg)) scale(0.94); }
  100% { opacity: 1; transform: translateX(-50%) rotate(var(--banner-rot, -8deg)) scale(1); }
}

@keyframes beat-fill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ── 16 · Reduced motion ─────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  /* static ticker, no scrollbar — just fade out at the edge */
  .ticker-viewport {
    overflow: hidden;
    mask-image: linear-gradient(90deg, black 86%, transparent 100%);
  }
  .stage-rail > button.now.filling::after { animation: none; transform: scaleX(1); }
}

/* ── 17 · Responsive ─────────────────────────────────────────────────────── */

@media (max-width: 1360px) {
  .station-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1280px) {
  .console { height: auto; min-height: 100svh; }
  /* frame grows with content but never stops short of the viewport —
     the dock rail rides it all the way to the floor */
  .console-frame { height: auto; flex: 1; }
  .console-main { height: auto; }
  .console-body {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.62fr);
    min-height: 0;
    height: auto;
  }
  .docket { grid-column: 1 / -1; order: -1; }
  .docket-list { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .case-card { min-width: 215px; }
  .docket-note { display: none; }
  .docket, .bench, .desk { overflow: visible; }
}

/* contextual compaction: on shorter screens the chamber tightens its
   rhythm so the idle bench fits without a token scrollbar */
@media (max-height: 1000px) and (min-width: 881px) {
  .console-body { padding-top: 14px; padding-bottom: 16px; gap: 14px; }
  .panel { padding-top: 16px; padding-bottom: 18px; }
  .bench-head { margin-bottom: 12px; }
  .bench-head h1 { font-size: clamp(20px, 2vw, 26px); }
  .dossier-grid { gap: 10px 18px; }
  .dossier .doc { padding: 9px 12px 7px; }
  .dossier .doc textarea { min-height: 40px; line-height: 1.52; }
  .doc-label { margin-bottom: 4px; }
  .bench-run { margin-top: 10px; }
  .pipeline { margin-top: 12px; }
  .pipe-step { padding-top: 7px; }
  .findings { margin-top: 13px; }
  .findings-empty { padding: 9px 14px; }
  .docket { padding: 13px 12px; gap: 9px; }
  .case-card { padding: 10px 12px; }
  .case-card small {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .desk { padding-top: 12px; gap: 10px; }
  .receipt-tray { padding: 16px 22px 22px; }
  .receipt-tray::before { height: 84px; margin-bottom: 14px; }
  .station-inner { gap: 18px; }
  .station-head h1 { font-size: clamp(26px, 2.8vw, 38px); }
}

@media (max-width: 880px) {
  .console-body { grid-template-columns: minmax(0, 1fr); }
  .desk { max-width: 460px; width: 100%; margin: 0 auto; }
  .topbar { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; row-gap: 10px; }
  .console-frame { flex-direction: column; }
  .dock-rail {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 10px;
    border-right: none;
    border-bottom: 1px solid var(--edge);
  }
  .dock-slot { flex-direction: row; gap: 8px; padding: 12px 14px 9px; flex-shrink: 0; }
  .dock-slot::before { top: 4px; }
  .dock-glyph { height: 18px; font-size: 13px; }
  .dock-rule { display: none; }
  .dock-aux { padding-top: 9px; }
  .dock-aux .tab-badge { position: static; }
  .topbar-actions { margin-left: auto; }
  .station-grid { grid-template-columns: 1fr; }
  .station { overflow: visible; }
  .recent-row .rr-hash { display: none; }
  .brand-text small { display: none; }
  .dossier-grid { grid-template-columns: 1fr; }
  .bench-head { flex-direction: column; }
  .identity-capsule { align-self: stretch; justify-content: space-between; }
  .pipeline { flex-wrap: wrap; gap: 6px 0; }
  .pipe-step { flex: 1 1 45%; }
  .boundary { grid-template-columns: 1fr; }
  .bench-run { flex-direction: column; align-items: stretch; }

  .threshold-stage {
    grid-template-columns: 1fr;
    gap: 28px;
    overflow-y: auto;
    align-items: start;
    padding-top: 7svh;
  }
  .threshold-receipt { display: none; }
  .runtime-pill { display: none; }
}

@media (max-width: 560px) {
  body { font-size: 14px; }
  .threshold-title { font-size: 38px; }
  .threshold-actions .btn-marquee { width: 100%; }
  .panel { padding: 16px 14px 20px; }
  .topbar-actions #header-verify-link, .topbar-rule { display: none; }
  .stage-caption .stage-line { font-size: 19px; }
  .act-receipt { flex-direction: column; align-items: center; gap: 18px; }
  /* column layout: the side panel can't width-collapse — fade it instead */
  .act-receipt[data-phase="receipt"], .act-receipt[data-phase="tamper"] { gap: 18px; }
  .act-receipt[data-phase="receipt"] .stage-side,
  .act-receipt[data-phase="tamper"] .stage-side {
    width: min(430px, 90vw);
    height: 0;
    transform: none;
  }
  .archive-table th:nth-child(5), .archive-table td:nth-child(5) { display: none; }
}
