/* ===========================================================================
   Carddex Ledger — design system
   ---------------------------------------------------------------------------
   One paradigm: a dense ledger table + a fixed inspector. Every surface reads
   tokens, so a theme is only a token remap on :root[data-theme]. The chrome
   bars (top bar, status bar, footer hints) stay dark in every theme, like an
   IDE title bar — that is deliberate, not an oversight.
   =========================================================================== */

:root {
  /* Paper — the default warm sage-paper terminal */
  --paper: #E4E1D0;
  --paper-hi: #EDEAD9;
  --paper-lo: #D9D5C1;
  --paper-lo2: #CFCBB4;
  --ink: #1C1A14;
  --ink-soft: #4B4736;
  --ink-faint: #655F4A;
  --rule: rgba(28, 26, 20, .14);
  --rule-strong: rgba(28, 26, 20, .32);
  --accent: #C1560E;
  --accent-ink: #8C3D0A;
  --accent-soft: rgba(193, 86, 14, .13);
  --accent-soft2: rgba(193, 86, 14, .24);
  --pos: #3E6E49;
  --pos-soft: rgba(62, 110, 73, .14);
  --neg: #96392F;
  --neg-soft: rgba(150, 57, 47, .14);
  --warn: #8A6A1E;
  --warn-soft: rgba(138, 106, 30, .15);
  --seq: #51606E;
  --seq-rgb: 81, 96, 110;
  --veil: rgba(228, 225, 208, .55);

  --chrome-bg: #1C1A14;
  --chrome-fg: #F2EFE3;
  --chrome-muted: #C8C3AE;
  --chrome-kbd-bg: rgba(255, 255, 255, .1);
  --chrome-kbd-border: rgba(255, 255, 255, .22);
  --chrome-pos: #67C687;
  --chrome-neg: #E6786C;

  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --rowh: 34px;
  --insp-w: 380px;
}

:root[data-theme="ivory"] {
  --paper: #F4F2EA;
  --paper-hi: #FBFAF5;
  --paper-lo: #E9E6DB;
  --paper-lo2: #DEDACC;
  --rule: rgba(25, 24, 19, .13);
  --rule-strong: rgba(25, 24, 19, .3);
  --veil: rgba(244, 242, 234, .6);
}

:root[data-theme="slate"] {
  --paper: #23211B;
  --paper-hi: #2B2921;
  --paper-lo: #1B1915;
  --paper-lo2: #141310;
  --ink: #ECE7D9;
  --ink-soft: #BCB49D;
  --ink-faint: #8E866F;
  --rule: rgba(236, 231, 217, .12);
  --rule-strong: rgba(236, 231, 217, .3);
  --accent: #E8863C;
  --accent-ink: #F2A366;
  --accent-soft: rgba(232, 134, 60, .16);
  --accent-soft2: rgba(232, 134, 60, .3);
  --pos: #67C687;
  --pos-soft: rgba(103, 198, 135, .15);
  --neg: #E5695C;
  --neg-soft: rgba(229, 105, 92, .15);
  --warn: #D9A83E;
  --warn-soft: rgba(217, 168, 62, .15);
  --seq: #93A7BA;
  --seq-rgb: 147, 167, 186;
  --chrome-bg: #0F0E0B;
  --veil: rgba(35, 33, 27, .62);
}

:root[data-theme="terminal"] {
  --paper: #0A0C10;
  --paper-hi: #12151B;
  --paper-lo: #171B23;
  --paper-lo2: #1D2230;
  --ink: #E7EAEF;
  --ink-soft: #96A0B0;
  --ink-faint: #5B6472;
  --rule: rgba(231, 234, 239, .1);
  --rule-strong: rgba(231, 234, 239, .28);
  --accent: #F97316;
  --accent-ink: #FB8A3C;
  --accent-soft: rgba(249, 115, 22, .14);
  --accent-soft2: rgba(249, 115, 22, .3);
  --pos: #16C784;
  --pos-soft: rgba(22, 199, 132, .13);
  --neg: #EA3943;
  --neg-soft: rgba(234, 57, 67, .13);
  --warn: #F0B90B;
  --warn-soft: rgba(240, 185, 11, .14);
  --seq: #3D7EC7;
  --seq-rgb: 61, 126, 199;
  --chrome-bg: #000000;
  --chrome-pos: #16C784;
  --chrome-neg: #EA3943;
  --veil: rgba(10, 12, 16, .66);
}

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

html, body {
  margin: 0;
  height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 13px;
}

body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; z-index: 5; }
::selection { background: var(--accent-soft2); color: var(--ink); }

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.micro {
  font-size: 10px;
  letter-spacing: .07em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink-faint);
}
.spacer { flex: 1; }
.muted { color: var(--ink-faint); }

/* ── app header ─────────────────────────────────────────────────────────── */
.app-header {
  flex: 0 0 48px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 14px;
  background: var(--paper-hi);
  border-bottom: 1px solid var(--rule-strong);
  z-index: 40;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .02em;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--ink);
}
.brand .mark {
  width: 16px;
  height: 16px;
  border: 1.5px solid currentColor;
  position: relative;
  flex: none;
}
.brand .mark::before,
.brand .mark::after { content: ""; position: absolute; background: currentColor; }
.brand .mark::before { left: 3px; top: 2px; width: 1.5px; height: 9px; }
.brand .mark::after { left: 6.5px; top: 5px; width: 1.5px; height: 6px; }

.nav { display: flex; gap: 2px; overflow-x: auto; flex: 1 1 auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-faint);
  text-decoration: none;
  border-radius: 3px;
  white-space: nowrap;
}
.nav a:hover { color: var(--ink); background: var(--paper-lo); }
.nav a.on { color: var(--ink); background: var(--paper-lo); }

.hdr-right { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.search-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 5px 8px 5px 10px;
  font-size: 11px;
  color: var(--ink-faint);
  cursor: pointer;
  min-width: 190px;
}
.search-hint:hover { border-color: var(--rule-strong); }
kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--paper-lo);
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  padding: 1px 5px;
  color: var(--ink-soft);
}

.theme-dots { display: flex; gap: 6px; align-items: center; }
.theme-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--rule-strong);
  cursor: pointer;
  padding: 0;
  flex: 0 0 auto;
}
.theme-dot:hover { border-color: var(--ink-soft); }
.theme-dot.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft2); }

/* ── subtabs ────────────────────────────────────────────────────────────── */
.subtabs {
  flex: 0 0 34px;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 14px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  overflow-x: auto;
}
.subtab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 4px;
  margin-right: 18px;
  font-size: 12px;
  color: var(--ink-faint);
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}
.subtab:hover { color: var(--ink-soft); }
.subtab.on { color: var(--ink); border-bottom-color: var(--accent); }

/* ── page scaffolding ───────────────────────────────────────────────────── */
main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}
.panel { display: none; flex: 1; min-height: 0; flex-direction: column; }
.panel.on { display: flex; }
.workspace { flex: 1; min-height: 0; display: flex; }
.table-pane { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.doc-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.section-pad { padding: 18px 22px; }

.inspector {
  flex: 0 0 var(--insp-w);
  width: var(--insp-w);
  border-left: 1px solid var(--rule-strong);
  background: var(--paper-hi);
  overflow-y: auto;
  min-height: 0;
}

/* ── filters row ────────────────────────────────────────────────────────── */
.filters {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap;
  background: var(--paper);
}
.fr-input {
  background: var(--paper-hi);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 5px 8px;
  font-size: 11px;
  width: 108px;
}
.fr-search { width: 230px; }
.chip-row { display: flex; gap: 4px; flex-wrap: wrap; }
.chip {
  font-size: 11px;
  padding: 4px 9px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--paper-hi);
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
}
.chip:hover { border-color: var(--rule-strong); }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip .n { opacity: .55; font-family: var(--font-mono); }

.btn {
  font-size: 11px;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: 3px;
  border: 1px solid var(--rule-strong);
  background: var(--paper-hi);
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--paper-hi); border-color: var(--ink); }
.btn.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn.ghost { background: transparent; }
.btn.small { padding: 3px 8px; font-size: 10px; }
.btn[disabled] { opacity: .45; cursor: default; }

/* ── ledger table ───────────────────────────────────────────────────────── */
.tbl-wrap { flex: 1; min-height: 0; overflow: auto; }
table.ledger { width: 100%; border-collapse: collapse; font-size: 12px; }
table.ledger thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--paper-lo);
  text-align: left;
  padding: 6px 10px;
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 700;
  border-bottom: 1px solid var(--rule-strong);
  white-space: nowrap;
}
table.ledger thead th.sortable { cursor: pointer; user-select: none; }
table.ledger thead th.sortable:hover { color: var(--ink); }
table.ledger thead th .arrow { color: var(--accent-ink); margin-left: 3px; font-size: 9px; }
table.ledger thead th.right, table.ledger td.right { text-align: right; }
table.ledger tbody tr { height: var(--rowh); border-bottom: 1px solid var(--rule); cursor: pointer; }
table.ledger tbody tr:hover { background: var(--paper-hi); }
table.ledger tbody tr.focused { box-shadow: inset 2px 0 0 var(--accent); background: var(--paper-hi); }
table.ledger tbody tr.selected { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
table.ledger td { padding: 0 10px; white-space: nowrap; vertical-align: middle; }
table.ledger td.name-cell { white-space: normal; max-width: 320px; }

.pname { font-weight: 600; display: block; line-height: 1.25; }
.pset { color: var(--ink-faint); font-size: 10.5px; }
.name-flex { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 3px 0; }
.name-stack { display: flex; flex-direction: column; min-width: 0; }
.tag {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .03em;
  color: var(--ink-soft);
  background: var(--paper-lo);
  border-radius: 2px;
  padding: 1px 5px;
  white-space: nowrap;
}
.delta { font-weight: 700; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.delta.pos { color: var(--pos); }
.delta.neg { color: var(--neg); }
.delta.flat { color: var(--ink-faint); }
.rank-cell { color: var(--ink-faint); font-size: 11px; font-family: var(--font-mono); }
.locked {
  color: var(--ink-faint);
  font-size: 10.5px;
  font-style: italic;
  cursor: help;
}
.sig {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .03em;
  padding: 2px 6px;
  border-radius: 9px;
  text-transform: uppercase;
}
.sig.buy { background: var(--pos-soft); color: var(--pos); }
.sig.sell { background: var(--neg-soft); color: var(--neg); }
.sig.hold { background: var(--paper-lo); color: var(--ink-faint); }

/* card art (real image when available, deterministic SVG otherwise) */
.cardart { display: block; flex: 0 0 auto; border-radius: 2px; background: var(--paper-lo); }
img.cardart { object-fit: cover; }

/* skeleton loading rows */
.skel-row td { padding: 8px 10px; }
.skel {
  display: block;
  height: 9px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--paper-lo) 25%, var(--paper-lo2) 37%, var(--paper-lo) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }

.empty-state { padding: 40px 20px; text-align: center; color: var(--ink-faint); font-size: 12px; }
.error-state { padding: 16px 20px; color: var(--neg); font-size: 12px; }

/* ── footer hints + status bar ──────────────────────────────────────────── */
.footer-hints {
  flex: 0 0 26px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 12px;
  background: var(--chrome-bg);
  color: var(--chrome-muted);
  font-size: 10px;
}
.footer-hints .fh { display: flex; align-items: center; gap: 4px; }
.footer-hints kbd {
  background: var(--chrome-kbd-bg);
  border-color: var(--chrome-kbd-border);
  color: var(--chrome-muted);
}

.statusbar {
  flex: 0 0 28px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 14px;
  background: var(--chrome-bg);
  color: var(--chrome-muted);
  font-size: 10.5px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  border-top: 1px solid rgba(255, 255, 255, .08);
  z-index: 50;
}
.statusbar::-webkit-scrollbar { display: none; }
.sb-item { display: inline-flex; align-items: baseline; gap: 6px; flex: 0 0 auto; }
.sb-label { font-size: 9px; letter-spacing: .08em; font-weight: 700; text-transform: uppercase; }
.sb-val {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--chrome-fg);
  font-weight: 600;
  font-size: 11px;
}
.sb-delta { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 10.5px; }
.sb-pos { color: var(--chrome-pos); }
.sb-neg { color: var(--chrome-neg); }
.sb-live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--chrome-pos);
  display: inline-block;
  align-self: center;
}
.sb-live.stale { background: var(--warn); }
.sb-live.off { background: var(--chrome-neg); }
.sb-btn { background: none; border: none; color: inherit; cursor: pointer; padding: 0; font: inherit; }
.sb-btn:hover { color: var(--chrome-fg); }

/* ── inspector ──────────────────────────────────────────────────────────── */
.insp-empty { padding: 40px 20px; text-align: center; color: var(--ink-faint); font-size: 12px; line-height: 1.6; }
.insp-head { padding: 14px 16px 10px; border-bottom: 1px solid var(--rule); }
.insp-eyebrow {
  font-size: 10px;
  letter-spacing: .07em;
  color: var(--ink-faint);
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  text-transform: uppercase;
}
.insp-title-row { display: flex; gap: 12px; align-items: flex-start; margin-top: 8px; }
.insp-name { font-size: 15px; font-weight: 800; line-height: 1.25; }
.insp-sub { font-size: 11px; color: var(--ink-faint); margin-top: 2px; }
.insp-price-row { display: flex; align-items: baseline; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.insp-price { font-family: var(--font-mono); font-size: 22px; font-weight: 700; }
.insp-actions { display: flex; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.insp-section { padding: 12px 16px; border-bottom: 1px solid var(--rule); }
.insp-section:last-child { border-bottom: none; }
.insp-h {
  font-size: 10px;
  letter-spacing: .07em;
  color: var(--ink-faint);
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-transform: uppercase;
}
.insp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.insp-stat .k { font-size: 10px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .05em; }
.insp-stat .v { font-family: var(--font-mono); font-size: 13px; font-weight: 700; }

.bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; font-size: 11px; }
.bar-code { width: 34px; font-weight: 700; color: var(--ink-soft); }
.bar-track { flex: 1; height: 6px; background: var(--paper-lo); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--seq); }
.bar-pct { width: 40px; text-align: right; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-soft); }
.bar-val { width: 66px; text-align: right; font-family: var(--font-mono); font-size: 10.5px; }

.grade-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px dashed var(--rule);
  gap: 8px;
}
.grade-row:last-child { border-bottom: none; }
.grade-name { font-size: 11.5px; font-weight: 600; }
.grade-mult { font-size: 9.5px; color: var(--ink-faint); margin-left: 5px; font-family: var(--font-mono); }
.grade-price { font-family: var(--font-mono); font-size: 12px; font-weight: 700; }

.reasons { font-size: 11px; line-height: 1.5; color: var(--ink-soft); }

/* ── charts ─────────────────────────────────────────────────────────────── */
.chart-note { font-size: 10px; color: var(--ink-faint); margin-top: 4px; font-style: italic; }
.legend { display: flex; gap: 12px; font-size: 10px; color: var(--ink-soft); margin-top: 6px; flex-wrap: wrap; }
.legend .lg { display: flex; align-items: center; gap: 4px; }
.legend .sw { width: 9px; height: 2px; display: inline-block; }
svg.chart { display: block; width: 100%; height: auto; }

/* ── stat tiles ─────────────────────────────────────────────────────────── */
.stat-grid { display: flex; border-bottom: 1px solid var(--rule); flex: 0 0 auto; overflow-x: auto; }
.stat-tile { flex: 1; min-width: 150px; padding: 12px 16px; border-right: 1px solid var(--rule); }
.stat-tile:last-child { border-right: none; }
.stat-tile .k { font-size: 10px; letter-spacing: .06em; color: var(--ink-faint); font-weight: 700; text-transform: uppercase; }
.stat-tile .v { font-family: var(--font-mono); font-size: 21px; font-weight: 700; margin-top: 4px; }
.stat-tile .d { font-size: 11px; margin-top: 2px; font-family: var(--font-mono); }

/* ── command palette ────────────────────────────────────────────────────── */
.palette-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 26, 20, .38);
  display: none;
  z-index: 100;
  padding-top: 8vh;
  justify-content: center;
}
.palette-overlay.on { display: flex; }
.palette {
  width: 560px;
  max-width: 92%;
  max-height: 70vh;
  background: var(--paper-hi);
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .3);
  display: flex;
  flex-direction: column;
}
.palette-input-row { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--rule); }
.palette-input-row input { flex: 1; border: none; background: transparent; font-size: 14px; outline: none; }
.palette-body { overflow-y: auto; padding: 6px 0; }
.palette-group {
  font-size: 10px;
  letter-spacing: .06em;
  color: var(--ink-faint);
  font-weight: 700;
  padding: 8px 14px 4px;
  text-transform: uppercase;
}
.palette-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  font-size: 12.5px;
  cursor: pointer;
}
.palette-item:hover, .palette-item.hl { background: var(--accent-soft); }
.palette-item .meta { color: var(--ink-faint); font-size: 11px; font-family: var(--font-mono); white-space: nowrap; }
.palette-foot { border-top: 1px solid var(--rule); padding: 7px 14px; display: flex; gap: 14px; font-size: 10px; color: var(--ink-faint); }

/* ── help overlay (?) ───────────────────────────────────────────────────── */
.help-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 26, 20, .5);
  display: none;
  z-index: 110;
  align-items: center;
  justify-content: center;
}
.help-overlay.on { display: flex; }
.help-card {
  background: var(--paper-hi);
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  padding: 20px 24px;
  max-width: 460px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .3);
}
.help-card h2 { margin: 0 0 14px; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; }
.help-grid { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 12px; align-items: center; }

/* ── hero (home) ────────────────────────────────────────────────────────── */
.hero { padding: 34px 22px 22px; border-bottom: 1px solid var(--rule); }
.hero h1 {
  font-size: 28px;
  margin: 0 0 8px;
  font-weight: 800;
  letter-spacing: -.01em;
  text-wrap: balance;
  max-width: 640px;
}
.hero p { font-size: 13.5px; color: var(--ink-soft); max-width: 580px; line-height: 1.55; margin: 0 0 16px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── cards / reports ────────────────────────────────────────────────────── */
.card { background: var(--paper-hi); border: 1px solid var(--rule); border-radius: 4px; padding: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }
h2.h-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  margin: 0 0 12px;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.report-body { line-height: 1.6; font-size: 13px; }
.report-body h2, .report-body h3 { font-size: 14px; margin: 18px 0 8px; }

/* ── error pages ────────────────────────────────────────────────────────── */
.error-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  text-align: center;
  padding: 20px;
}
.error-code { font-family: var(--font-mono); font-size: 64px; font-weight: 800; color: var(--paper-lo2); line-height: 1; }

/* ── narrow viewport advisory (mobile paradigm lands in v3) ─────────────── */
@media (max-width: 900px) {
  .inspector {
    position: fixed;
    right: 0;
    top: 48px;
    bottom: 54px;
    z-index: 20;
    box-shadow: -4px 0 16px rgba(0, 0, 0, .18);
    transform: translateX(100%);
    transition: transform .18s ease;
  }
  .inspector.open { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .inspector { transition: none; }
}
