/* Adjust: paper and ink. Warm paper, blue-black ink, red for what a detector or a person must look at, blue for
   what the operator wrote. Serif for files and headings, Plex for the desk, Plex Mono for numbers and references. */
:root {
  --paper: #EFE9DC; --sheet: #FBF8F1; --sheet-2: #F6F1E6; --manila: #E8D9B4; --manila-2: #DCC99B;
  --ink: #1E2230; --ink-2: #464B5A; --muted: #6F6A5E; --faint: #9C968A; --line: #DCD3C1; --rule: #E9E2D3;
  --red: #A1302A; --red-wash: #F6E3DC; --blue: #23468C; --blue-wash: #E3E9F4;
  --accent: var(--red);
  --head: 46px; --foot: 26px;
}
html { font-size: 13px; }
body { font-variant-numeric: tabular-nums; }
.tabular-nums { font-variant-numeric: tabular-nums; }
.mono, .api, pre, code, kbd { font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; }
.serif { font-family: "Source Serif 4", Georgia, serif; }

/* ── letterhead ───────────────────────────────────────────────────────────────────────────── */
.appbar { position: sticky; top: 0; z-index: 30; height: var(--head); display: flex; align-items: stretch; gap: 22px;
  padding: 0 22px; background: var(--sheet); border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 var(--sheet), 0 2px 0 var(--line); }
.appbrand { display: flex; align-items: baseline; gap: 10px; align-self: center; white-space: nowrap; }
.brand-mark { font-family: "Source Serif 4", Georgia, serif; font-weight: 700; font-size: 20px; letter-spacing: -.01em; }
.brand-mark::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 3px; background: var(--red);
  border-radius: 50%; vertical-align: 2px; }
.brand-sub { font-size: 11.5px; color: var(--muted); letter-spacing: .02em; }
.appnav { display: flex; align-items: stretch; }
.navlink { display: flex; align-items: center; gap: 5px; padding: 0 11px; color: var(--muted); border-bottom: 2px solid transparent;
  margin-bottom: -1px; }
.navlink:hover { color: var(--ink); }
.navlink.is-active { color: var(--ink); font-weight: 600; border-bottom-color: var(--red); }
.navlink kbd, .btn kbd { font-size: 9.5px; color: var(--faint); border: 1px solid var(--line); border-radius: 2px; padding: 0 3px; line-height: 14px; }
.count-pill { background: var(--red); color: #fff; border-radius: 2px; padding: 0 5px; font-size: 11px; font-weight: 600; }
.appclock { margin-left: auto; display: flex; align-items: center; }
.clock { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.clock-label { color: var(--muted); }
.clock-time { font-family: "IBM Plex Mono", monospace; font-weight: 500; }
.replay-state { color: var(--muted); border: 1px solid var(--line); border-radius: 2px; padding: 0 6px; font-size: 11px; }
.replay-state.is-playing { color: #fff; background: var(--red); border-color: var(--red); }

.app-footer { position: sticky; bottom: 0; z-index: 30; height: var(--foot); display: flex; align-items: center; gap: 16px;
  padding: 0 22px; font-size: 11px; color: var(--muted); background: var(--sheet); border-top: 1px solid var(--line); }
.synthetic { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }

/* ── paper, buttons, inputs ───────────────────────────────────────────────────────────────── */
h1.page-title { font-family: "Source Serif 4", Georgia, serif; font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.page-lede { color: var(--muted); max-width: 90ch; }
.panel { background: var(--sheet); border: 1px solid var(--line); border-radius: 2px; box-shadow: 0 1px 0 rgba(30, 34, 48, .04); }
.panel-head { display: flex; align-items: baseline; gap: 10px; padding: 9px 14px 8px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-family: "Source Serif 4", Georgia, serif; font-size: 15px; font-weight: 600; }
.link { text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; }
.link:hover { text-decoration-color: var(--red); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 28px; padding: 0 11px;
  border: 1px solid var(--ink-2); border-radius: 2px; background: var(--sheet); font-weight: 500; white-space: nowrap; }
.btn:hover { background: #fff; }
.btn-primary { background: var(--ink); color: var(--sheet); border-color: var(--ink); }
.btn-primary:hover { background: #2C3142; }
.btn-primary kbd { color: #B7B3A8; border-color: #4A4F5E; }
.btn-accent { background: var(--red); color: #fff; border-color: var(--red); }
.btn-accent:hover { background: #8A2620; }
.btn:focus-visible, .row:focus-visible, .input:focus-visible, a:focus-visible, .qcard:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }
.seg { display: inline-flex; border: 1px solid var(--ink-2); border-radius: 2px; overflow: hidden; }
.seg button { height: 26px; padding: 0 9px; background: var(--sheet); border-left: 1px solid var(--line); font-family: "IBM Plex Mono", monospace; font-size: 12px; }
.seg button:first-child { border-left: 0; }
.seg button.is-on { background: var(--ink); color: var(--sheet); }
.input, select.input { height: 28px; border: 1px solid var(--line); border-bottom-color: var(--ink-2); border-radius: 2px; padding: 0 8px;
  background: #fff; min-width: 0; }
textarea.input { height: auto; padding: 6px 8px; }
.mchip { padding: 2px 9px; border: 1px solid var(--line); border-radius: 2px; background: var(--sheet); color: var(--muted); font-size: 12px; }
.mchip.is-on { color: var(--ink); border-color: var(--ink); font-weight: 600; }
.notice { padding: 6px 10px; border: 1px solid var(--ink); border-radius: 2px; background: #fff; margin-bottom: 8px; }
.notice.is-error { border-color: var(--red); color: var(--red); }
.label { font-size: 11px; color: var(--muted); }
.big { font-family: "Source Serif 4", Georgia, serif; font-size: 34px; font-weight: 600; letter-spacing: -.02em; line-height: 1.05; }
.htmx-request .htmx-hide { opacity: .4; }

.tiles { display: grid; background: var(--sheet); border: 1px solid var(--line); border-radius: 2px; }
.tiles > div { padding: 10px 14px; border-left: 1px solid var(--line); }
.tiles > div:first-child { border-left: 0; }
.tiles span { display: block; font-size: 11px; color: var(--muted); }
.tiles b { display: block; font-family: "Source Serif 4", Georgia, serif; font-size: 26px; font-weight: 600; letter-spacing: -.01em; margin-top: 2px; }
.tiles i { display: block; font-style: normal; font-size: 11px; color: var(--muted); }

/* ── ruled tables (ledger, accuracy, sources) ─────────────────────────────────────────────── */
table.feed, table.grid-table { width: 100%; table-layout: fixed; border-collapse: collapse; }
table.grid-table { table-layout: auto; }
.feed th, .grid-table th { text-align: left; font-weight: 500; font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); padding: 7px 9px 5px; border-bottom: 1px solid var(--ink-2); background: var(--sheet-2); white-space: nowrap; }
.feed td, .grid-table td { padding: 5px 9px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.feed tr.row { cursor: pointer; }
.feed tr.row:hover td { background: #fff; }
.feed tr.row.is-open td { background: var(--manila); border-bottom-color: transparent; }
.feed tr.row.is-child td:nth-child(3) { padding-left: 18px; }
.feed tr.detail > td { background: var(--sheet-2); padding: 0; border-bottom: 1px solid var(--ink-2); }
.api { font-size: 12px; }
.api b { font-weight: 600; }

.tier { display: inline-block; font-family: "IBM Plex Mono", monospace; font-size: 11px; padding: 0 4px; border: 1px solid var(--line); border-radius: 2px; color: var(--muted); }
.tier-1 { border-color: var(--blue); color: var(--blue); }
.tier-2 { border-color: var(--red); color: var(--red); font-weight: 600; }
.tier-3 { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 2px; border: 1px solid transparent; white-space: nowrap; line-height: 18px; }
.chip-done { background: var(--blue-wash); color: var(--blue); }
.chip-waiting { background: var(--red); color: #fff; font-weight: 600; }
.chip-decided, .chip-rejected { border-color: var(--line); color: var(--muted); }
.chip-approved { border-color: var(--ink); color: var(--ink); }
.chip-declined { border-color: var(--ink); color: var(--ink); font-weight: 600; }
.chip-reverted { border: 1px dashed var(--faint); color: var(--muted); font-style: italic; }
.chip-failed { background: var(--ink); color: #fff; }

.entry { padding: 12px 16px 16px; }
.entry h3, .ev-h { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin-bottom: 8px; }
.facts dt, .kv dt { color: var(--muted); }
.kv { display: grid; grid-template-columns: 82px 1fr; gap: 3px 8px; }
.checks { margin-top: 6px; font-size: 12px; color: var(--muted); }
.checks li::before { content: "– "; }
.ev { margin-top: 8px; }
.ev-cap { font-size: 12px; font-weight: 600; margin-bottom: 3px; display: flex; gap: 8px; align-items: baseline; }
.ev-src { font-weight: 400; color: var(--muted); font-size: 11px; }
.ev-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); font-size: 11.5px; }
.ev-table th { text-align: left; color: var(--muted); font-weight: 500; padding: 2px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ev-table td { padding: 2px 6px; border-bottom: 1px solid var(--rule); font-variant-numeric: tabular-nums; }
details.sql summary { cursor: pointer; color: var(--muted); font-size: 12px; user-select: none; }
details.sql pre { margin-top: 4px; padding: 8px 10px; background: var(--sheet-2); border: 1px solid var(--line); border-radius: 2px; font-size: 11.5px; line-height: 1.45; white-space: pre-wrap; }
.replay-mode { font-size: 11px; color: var(--muted); border: 1px dashed var(--faint); border-radius: 2px; padding: 0 6px; white-space: nowrap; }
.feed tr.row, .entry, article.panel { scroll-margin-top: 60px; }

/* ── long-form pages (how it works, known gaps) ───────────────────────────────────────────── */
.doc { font-size: 14px; }
.doc h2 { font-family: "Source Serif 4", Georgia, serif; font-size: 21px; font-weight: 600; margin: 22px 0 8px; }
.doc h3 { font-family: "Source Serif 4", Georgia, serif; font-size: 16.5px; font-weight: 600; margin: 16px 0 6px; }
.doc h2:first-child, .doc h3:first-child { margin-top: 0; }
.doc p { margin: 8px 0; line-height: 1.6; max-width: 76ch; }
.doc ul { margin: 6px 0 6px 20px; list-style: disc; }
.doc li { margin: 4px 0; line-height: 1.55; max-width: 76ch; }
.doc code { font-size: 12px; background: var(--sheet-2); border: 1px solid var(--rule); padding: 0 3px; border-radius: 2px; }
.doc h4 { font-size: 13px; font-weight: 600; margin: 10px 0 4px; }
.doc ol { margin: 6px 0 6px 22px; list-style: decimal; }
.doc pre.codeblock { margin: 10px 0; padding: 10px 12px; background: var(--sheet-2); border: 1px solid var(--rule); border-radius: 2px; font-size: 12px; line-height: 1.5; overflow-x: auto; max-width: 100ch; }
.doc pre.codeblock code { background: none; border: 0; padding: 0; }
.doc pre.mermaid { margin: 10px 0; padding: 10px; background: #fff; border: 1px solid var(--rule); border-radius: 2px; font-size: 12px; overflow-x: auto; }
.doc pre.mermaid:not([data-processed]) { color: var(--faint); font-size: 11px; max-height: 160px; overflow: hidden; }
.doc .tablewrap { overflow-x: auto; max-width: 100%; margin: 10px 0; }
.doc table.doctable { border-collapse: collapse; font-size: 12.5px; }
.doc table.doctable th, .doc table.doctable td { border-bottom: 1px solid var(--rule); padding: 5px 10px; text-align: left; vertical-align: top; line-height: 1.45; }
.doc table.doctable th { border-bottom: 1px solid var(--ink-2); font-weight: 600; background: var(--sheet-2); }
.doc i { font-style: italic; }

/* ── the Desk: in-tray, claim file, evidence ──────────────────────────────────────────────── */
body[data-screen="desk"] main { padding: 0; }
.strip { display: flex; align-items: center; gap: 20px; padding: 10px 22px 9px; border-bottom: 1px solid var(--line); background: var(--paper); }
.strip > div:first-child { flex: 1 1 0; min-width: 0; }
.strip { flex-wrap: wrap; }
.strip h1 { font-family: "Source Serif 4", Georgia, serif; font-size: 19px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.strip .lede { color: var(--muted); font-size: 12px; }
.replay { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.replay-progress { width: 132px; margin-left: 4px; font-size: 11px; color: var(--muted); }
.replay-progress .bar { height: 3px; background: var(--line); margin-top: 4px; }
.replay-progress .bar > div { height: 3px; background: var(--red); }
.tally { display: flex; align-items: stretch; gap: 0; padding: 0 22px; border-bottom: 1px solid var(--ink-2); background: var(--paper); height: 50px; }
.tally > div { padding: 6px 18px 6px 0; margin-right: 18px; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }
.tally span { font-size: 10.5px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.tally b { font-family: "Source Serif 4", Georgia, serif; font-size: 20px; font-weight: 600; line-height: 1.1; white-space: nowrap; }
.tally b.red { color: var(--red); }
.tally b.blue { color: var(--blue); }
.tape { flex: 1; min-width: 0; border-right: 0 !important; margin-right: 0 !important; overflow: hidden; }
.tape ol { display: flex; flex-direction: column; gap: 1px; font-size: 11.5px; }
.tape li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.tape li:first-child { color: var(--blue); }
.tape li time { font-family: "IBM Plex Mono", monospace; color: var(--muted); margin-right: 6px; }

.bench { display: grid; grid-template-columns: 318px minmax(0, 1fr) 410px; height: calc(100vh - var(--head) - var(--foot) - 50px - 51px); }
.bench > * { min-height: 0; overflow-y: auto; }

/* in-tray */
.tray { background: var(--paper); border-right: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; }
.tray-head { padding: 10px 14px 0; }
.tray-head h2 { font-family: "Source Serif 4", Georgia, serif; font-size: 15px; font-weight: 600; }
.tray-head p { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.lanes { display: flex; gap: 0; margin-top: 8px; border-bottom: 1px solid var(--line); }
.lanes a { padding: 4px 10px 5px; font-size: 12px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.lanes a.is-on { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.lanes a b { font-family: "IBM Plex Mono", monospace; font-weight: 500; font-size: 11px; color: var(--muted); margin-left: 3px; }
.tray-list { flex: 1; overflow-y: auto; padding: 8px 10px 14px; display: flex; flex-direction: column; gap: 6px; }
.tray-more { font-size: 11.5px; color: var(--muted); padding: 4px 4px 0; }
.qcard { display: block; background: var(--sheet); border: 1px solid var(--line); border-left: 3px solid var(--line); padding: 7px 10px 7px 10px;
  cursor: pointer; position: relative; }
.qcard:hover { border-color: var(--ink-2); border-left-color: var(--ink-2); }
.qcard.is-person { border-left-color: var(--red); }
.qcard.is-flag { border-left-color: var(--ink-2); }
.qcard.is-open { background: var(--manila); border-color: var(--manila-2); border-left-color: var(--red); box-shadow: 2px 2px 0 var(--manila-2); }
.qcard.is-new { animation: arrive 1.6s ease-out; }
@keyframes arrive { 0% { background: var(--blue-wash); transform: translateX(-6px); } 100% { transform: none; } }
.qcard .q1 { display: flex; align-items: baseline; gap: 8px; }
.qcard .no { font-family: "IBM Plex Mono", monospace; font-weight: 600; font-size: 12.5px; }
.qcard .amt { margin-left: auto; font-family: "IBM Plex Mono", monospace; font-size: 12px; }
.qcard .where { font-size: 12px; color: var(--ink-2); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qcard .last { font-size: 11.5px; color: var(--blue); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qcard .last time { font-family: "IBM Plex Mono", monospace; color: var(--muted); margin-right: 5px; }
.qcard .needs { position: absolute; top: 7px; right: 10px; }
.stamps { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.stamp { display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 0 5px;
  line-height: 16px; border: 1.5px solid currentColor; border-radius: 2px; white-space: nowrap; }
.stamp.s-waiting { color: var(--red); background: var(--red-wash); }
.stamp.s-acted { color: var(--blue); }
.stamp.s-decided { color: var(--ink-2); }
.stamp.s-reverted { color: var(--muted); border-style: dashed; text-decoration: line-through; }
.stamp.s-declined { color: var(--muted); }
.stamp.s-routine { color: var(--faint); border-width: 1px; }

/* the claim file: a manila folder with tabs, a typed sheet inside */
.folder { background: var(--paper); padding: 14px 22px 22px; }
.folder-tabs { display: flex; gap: 3px; padding-left: 14px; position: relative; z-index: 1; }
.folder-tabs a { padding: 6px 16px 5px; background: var(--manila-2); color: var(--ink-2); border: 1px solid var(--manila-2); border-bottom: 0;
  border-radius: 6px 6px 0 0; font-size: 12.5px; }
.folder-tabs a.is-on { background: var(--manila); color: var(--ink); font-weight: 600; }
.folder-tabs a span { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--muted); margin-left: 4px; }
.folder-body { background: var(--manila); border: 1px solid var(--manila-2); border-radius: 0 4px 4px 4px; padding: 10px; }
.sheet { background: var(--sheet); border: 1px solid var(--line); padding: 18px 22px 22px; min-height: 420px;
  background-image: linear-gradient(90deg, transparent 38px, rgba(161, 48, 42, .16) 38px, rgba(161, 48, 42, .16) 39px, transparent 39px); }
.sheet-head { display: flex; align-items: flex-start; gap: 16px; padding-left: 26px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.sheet-head .kicker { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.sheet-head h2 { font-family: "IBM Plex Mono", monospace; font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
.sheet-head .title { font-family: "Source Serif 4", Georgia, serif; font-size: 15px; color: var(--ink-2); margin-top: 1px; }
.sheet-head .status { font-size: 12px; color: var(--muted); margin-top: 3px; }
.file-stamps { margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; max-width: 46%; padding-top: 2px; }
.file-stamp { font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--red); border: 2px solid var(--red); padding: 1px 7px; border-radius: 3px; transform: rotate(-3deg); opacity: .88; }
.file-stamp.blue { color: var(--blue); border-color: var(--blue); transform: rotate(2deg); }
.sheet-body { padding-left: 26px; }
.sheet h3 { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 16px 0 6px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.fields.one { grid-template-columns: minmax(0, 1fr); }
.fld { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 8px; padding: 4px 0; border-bottom: 1px dotted var(--line); }
.fld dt { color: var(--muted); font-size: 12px; }
.fld dd { font-family: "IBM Plex Mono", monospace; font-size: 12.5px; }
.fld.m-flag dd { color: var(--red); text-decoration: underline wavy var(--red); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.fld.m-op dd { color: var(--blue); }
.ftable { width: 100%; border-collapse: collapse; font-size: 12px; }
.ftable th { text-align: left; font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 500;
  padding: 4px 8px 3px 0; border-bottom: 1px solid var(--ink-2); white-space: nowrap; }
.ftable td { padding: 4px 8px 4px 0; border-bottom: 1px dotted var(--line); vertical-align: top; font-family: "IBM Plex Mono", monospace; font-size: 11.5px; }
.ftable td:first-child { white-space: nowrap; }
.ftable tr.m-flag td { color: var(--red); }
.ftable tr.m-flag td:first-child::before { content: "▸ "; }
.ftable tr.m-op td { color: var(--blue); }
.ftable .empty { color: var(--muted); font-family: "IBM Plex Sans", sans-serif; font-style: italic; }
.people { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.people .card h4 { font-family: "Source Serif 4", Georgia, serif; font-size: 14px; font-weight: 600; border-bottom: 1px solid var(--ink-2); padding-bottom: 3px; margin-bottom: 2px; }
.people .fld { display: block; padding: 3px 0 4px; }
.people .fld dt { font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; }
.benchbar { position: relative; height: 54px; margin: 10px 0 6px; }
.benchbar .track { position: absolute; left: 0; right: 0; top: 18px; height: 8px; background: linear-gradient(90deg, var(--blue-wash), var(--sheet-2)); border: 1px solid var(--line); }
.benchbar .band { position: absolute; top: 18px; height: 8px; background: rgba(35, 70, 140, .22); }
.benchbar .tick { position: absolute; top: 12px; height: 20px; border-left: 1px solid var(--ink-2); }
.benchbar .tick span { position: absolute; top: 22px; left: 0; transform: translateX(-50%); white-space: nowrap; font-size: 10.5px; color: var(--muted); font-family: "IBM Plex Mono", monospace; }
.benchbar .est { position: absolute; top: 6px; height: 32px; border-left: 3px solid var(--ink); }
.benchbar .est.over { border-left-color: var(--red); }
.benchbar .est span { position: absolute; top: -6px; left: 6px; font-size: 11px; font-weight: 600; white-space: nowrap; font-family: "IBM Plex Mono", monospace; }
.benchbar .est.flip span { left: auto; right: 6px; }
.benchbar .tick.flip span { transform: translateX(-85%); }
.benchbar .est.over span { color: var(--red); }

/* evidence: receipts on the right */
.evidence { background: var(--sheet-2); border-left: 1px solid var(--line); padding: 12px 16px 22px; }
.evidence > h2 { font-family: "Source Serif 4", Georgia, serif; font-size: 15px; font-weight: 600; }
.evidence > p.lede { font-size: 11.5px; color: var(--muted); margin: 1px 0 10px; }
.receipt { background: #fff; border: 1px solid var(--line); margin-bottom: 12px; position: relative; }
.receipt::before { content: ""; position: absolute; left: -1px; right: -1px; top: -4px; height: 4px;
  background: radial-gradient(circle at 4px -1px, var(--sheet-2) 3px, transparent 3.5px) 0 0 / 8px 4px repeat-x; }
.receipt.is-new { animation: stampin .9s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes stampin { 0% { transform: scale(1.04) rotate(-.6deg); box-shadow: 0 0 0 3px var(--blue-wash); } 100% { transform: none; } }
.receipt.is-pending { border-color: var(--red); }
.r-top { display: flex; align-items: center; gap: 6px; padding: 7px 10px 6px; border-bottom: 1px dashed var(--line); }
.r-top time { font-family: "IBM Plex Mono", monospace; font-size: 11.5px; color: var(--muted); }
.r-body { padding: 7px 10px 9px; font-size: 12px; }
.r-body .saw { line-height: 1.45; }
.r-body .kv { grid-template-columns: 74px 1fr; font-size: 11.5px; margin-top: 6px; }
.r-body .kv dd { font-family: "IBM Plex Mono", monospace; font-size: 11px; overflow-wrap: anywhere; }
.r-call { margin-top: 7px; padding: 6px 8px; background: var(--blue-wash); color: var(--blue); font-family: "IBM Plex Mono", monospace; font-size: 11px; overflow-wrap: anywhere; }
.r-call.is-pending { background: var(--red-wash); color: var(--red); }
.r-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 10px 8px; border-top: 1px dashed var(--line); font-size: 11.5px; color: var(--muted); }
.r-foot form { display: flex; gap: 6px; width: 100%; }
.r-child { padding: 5px 10px; border-top: 1px dashed var(--line); font-size: 11.5px; }
.r-child b { color: var(--ink); }
.r-child.is-revert { color: var(--red); }

/* the pile: an empty desk before the operator has touched anything */
.pile { padding: 20px 26px 10px; }
.pile .num { font-family: "Source Serif 4", Georgia, serif; font-size: 40px; font-weight: 600; line-height: 1; }
.pile .bars { margin-top: 10px; display: grid; grid-template-columns: 140px 1fr 50px; gap: 5px 10px; font-size: 12px; align-items: center; }
.pile .bars .b { height: 10px; background: var(--ink-2); }

/* ── narrow windows: the bench stacks ─────────────────────────────────────────────────────── */
@media (max-width: 1099px) {
  .appbar { height: auto; flex-wrap: wrap; padding: 6px 12px 0; gap: 8px 16px; }
  .appnav { order: 3; width: 100%; overflow-x: auto; height: 34px; scrollbar-width: none; }
  .navlink kbd { display: none; }
  .navlink { white-space: nowrap; }
  .strip { flex-wrap: wrap; }
  .replay { margin-left: 0; flex-wrap: wrap; }
  .tally { height: auto; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
  .bench { display: block; height: auto; }
  .bench > * { overflow: visible; }
  .tray { max-height: 420px; }
  .people, .fields { grid-template-columns: minmax(0, 1fr); }
  .r-stack { grid-template-columns: minmax(0, 1fr) !important; }
  .r-stack > * { grid-column: 1 / -1 !important; border-left: 0 !important; border-right: 0 !important; }
  .r-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .table-scroll { overflow-x: auto; }
  .table-scroll > table.feed { min-width: 940px; }
  .r-filters { flex-wrap: wrap; }
}
@media (max-width: 699px) {
  .kbd-hint, .brand-sub { display: none; }
  main { padding-left: 10px !important; padding-right: 10px !important; }
  .r-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .app-footer > span:last-child { display: none; }
}
