/* ---------- Self-hosted fonts (SIL Open Font License) ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 200 800; font-display: swap; src: url(/fonts/newsreader-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 200 800; font-display: swap; src: url(/fonts/newsreader-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 200 800; font-display: swap; src: url(/fonts/newsreader-italic-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 200 800; font-display: swap; src: url(/fonts/newsreader-italic-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap; src: url(/fonts/jetbrains-mono-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap; src: url(/fonts/jetbrains-mono-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root { --font-heading: "Newsreader"; --font-body: "Inter"; --font-mono: "JetBrains Mono"; }

/* =========================================================
   Workpack Auditor — "the inspector's desk"
   Paper, ink, ruled lines and one red inspection pen.
   ========================================================= */
:root {
  --paper: #f6f4ef;
  --paper-2: #efece4;
  --sheet: #fbfaf6;
  --rule: #ddd8cc;
  --rule-strong: #c7c0b0;
  --ink: #14213d;
  --ink-2: #33405c;
  --muted: #6a7184;
  --faint: #9ca0aa;

  --accent: #d9480f;
  --accent-text: #c0400d;
  --accent-ink: #ffffff;
  --accent-soft: rgba(217, 72, 15, 0.07);
  --accent-line: rgba(217, 72, 15, 0.55);

  /* Severity inks: used only for findings */
  --critical: #b3261e;
  --major: #9a6200;
  --minor: #56637a;
  --other: #8a8f99;
  --ok: #2f7d4f;

  --logo-bg: #fbfaf6;
  --radius: 4px;

  --font-heading-stack: var(--font-heading), "Newsreader", Georgia, serif;
  --font-body-stack: var(--font-body), "Inter", system-ui, sans-serif;
  --font-mono-stack: var(--font-mono), "JetBrains Mono", ui-monospace, monospace;

  /* Aliases used by shared components */
  --text: var(--ink);
  --text-2: var(--ink-2);
  --line: var(--rule);
  --line-strong: var(--rule-strong);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #111a2e;
  --paper-2: #16203a;
  --sheet: #172240;
  --rule: #2b3756;
  --rule-strong: #3c4a6e;
  --ink: #ece8df;
  --ink-2: #c8c4ba;
  --muted: #959bab;
  --faint: #6c7388;

  --accent: #f0703a;
  --accent-text: #f2804f;
  --accent-ink: #14213d;
  --accent-soft: rgba(240, 112, 58, 0.1);
  --accent-line: rgba(240, 112, 58, 0.6);

  --critical: #f2786f;
  --major: #e0a943;
  --minor: #a9b3c6;
  --other: #8d93a3;
  --ok: #6cc893;

  --logo-bg: #172240;
  color-scheme: dark;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body-stack);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--font-heading-stack); font-weight: 500; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.mono { font-family: var(--font-mono-stack); font-feature-settings: "zero" 1; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.i12 { width: 12px; height: 12px; flex: none; }
.i14 { width: 14px; height: 14px; flex: none; }
.i16 { width: 16px; height: 16px; flex: none; }
.i18 { width: 18px; height: 18px; flex: none; }
.i20 { width: 20px; height: 20px; flex: none; }
.i22 { width: 22px; height: 22px; flex: none; }

.eyebrow {
  font-family: var(--font-mono-stack);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Small ink dot (used in a few places, never glowing) */
.lamp { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); flex: none; }
.lamp-accent { background: var(--accent); }
.lamp-ok { background: var(--ok); }

.app { min-height: 100vh; display: flex; flex-direction: column; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 40px; }

/* ---------- Top bar ---------- */
.topbar { border-bottom: 1px solid var(--rule); background: var(--paper); }
.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  height: 64px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading-stack);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.logo { width: 26px; height: 26px; }
.logo-sm { width: 20px; height: 20px; }
.brand-sm { font-size: 16px; gap: 8px; }
.topbar-right { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.icon-btn:hover { color: var(--ink); border-color: var(--rule); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); }
.btn-primary:hover { filter: brightness(0.94); }
.btn-ghost { background: transparent; border: 1px solid var(--rule-strong); color: var(--ink-2); }
.btn-ghost:hover { color: var(--ink); border-color: var(--ink-2); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 560px);
  gap: 72px;
  align-items: start;
  padding-top: 80px;
  padding-bottom: 88px;
}
.hero-copy { padding-top: 24px; }
.kicker {
  display: inline-block;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--accent-line);
  margin-bottom: 28px;
}
.hero h1 {
  font-size: clamp(40px, 4.6vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  font-weight: 450;
  max-width: 15ch;
  text-wrap: balance;
}
.lede {
  margin-top: 24px;
  font-size: 17.5px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 44ch;
}

/* Task card illustration */
.taskcard { margin: 0; }
.taskcard svg { display: block; width: 100%; height: auto; }
.taskcard figcaption { margin-top: 6px; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.tc-paper { fill: #eceae4; stroke: #d3cfc4; stroke-width: 1; }
.tc-paper-edge { fill: #dcd8ce; }
.tc-typed { font-family: var(--font-mono-stack); font-size: 11px; fill: #2a2f3a; letter-spacing: 0.01em; }
.tc-bold { font-weight: 700; }
.tc-lg { font-size: 15px; letter-spacing: 0.08em; }
.tc-sm { font-size: 9px; fill: #5d6270; letter-spacing: 0.06em; }
.tc-rule { stroke: #9a978f; stroke-width: 0.8; }
.tc-box { fill: none; stroke: #8f8c84; stroke-width: 1; }
.tc-ink { fill: none; stroke: #23407a; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; }
.tc-stamp { fill: none; stroke: #3a5aa0; stroke-width: 1.4; opacity: 0.7; }
.tc-stamp text { fill: #3a5aa0; stroke: none; font-family: var(--font-mono-stack); font-size: 10px; font-weight: 700; letter-spacing: 0.06em; }
.tc-stamp .tc-stamp-sm { font-size: 6.5px; }
.pen { fill: none; stroke: #d9480f; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.pen-thin { stroke-width: 1.5; }
.pen-label { font-family: var(--font-heading-stack); font-style: italic; font-size: 17px; fill: #d9480f; opacity: 0; }
.pen-1 { animation: pen-draw 0.9s 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.pen-2 { animation: pen-draw 0.9s 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.pen-3 { animation: pen-draw 0.5s 2.4s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.pen-label-1 { animation: pen-fade 0.4s 1.2s forwards; }
.pen-label-2 { animation: pen-fade 0.4s 2.2s forwards; }
@keyframes pen-draw { to { stroke-dashoffset: 0; } }
@keyframes pen-fade { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .pen { animation: none; stroke-dashoffset: 0; }
  .pen-label { animation: none; opacity: 1; }
}

/* Intake: ruled box with a dashed edge */
.intake { margin-top: 28px; }
.intake-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.drop {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 22px;
  border: 1.5px dashed var(--rule-strong);
  border-radius: var(--radius);
  background: var(--sheet);
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.drop:hover, .drop:focus-visible { border-color: var(--accent); }
.intake.is-dragging .drop { border-color: var(--accent); background: var(--accent-soft); }
.drop-icon { color: var(--accent-text); }
.drop-text { flex: 1; min-width: 0; }
.drop-title { font-weight: 600; font-size: 15px; }
.drop-hint { font-size: 13px; color: var(--muted); }

.trust {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

/* Progress (inside the intake box) */
.progress { padding: 18px 22px 14px; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--sheet); }
.progress-file { font-family: var(--font-mono-stack); font-size: 13px; color: var(--ink); word-break: break-all; }
.steps { list-style: none; margin: 10px 0 0; padding: 0; }
.step { display: flex; align-items: center; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 14.5px; }
.step-dot { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; flex: none; border: 1px solid var(--rule-strong); }
.step-done .step-dot { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.step-done .step-label { color: var(--muted); }
.step-active .step-dot { border-color: transparent; }
.step-active .step-label { color: var(--ink); font-weight: 600; }
.step-pending .step-label { color: var(--faint); }
.step-no { margin-left: auto; font-size: 11px; color: var(--faint); }
.ring { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--rule); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; }

/* ---------- Manual-style sections ---------- */
.doc-section {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 40px;
  padding-top: 36px;
  padding-bottom: 64px;
  border-top: 1px solid var(--rule);
}
.container.doc-section { max-width: 1180px; }
.doc-margin { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; }
.doc-no { font-size: 13px; color: var(--accent-text); letter-spacing: 0.04em; }
.doc-name { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.doc-body h2 { font-size: 30px; line-height: 1.2; letter-spacing: -0.015em; margin-bottom: 24px; max-width: 30ch; }

.ruled-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.ruled-list li {
  display: grid;
  grid-template-columns: 56px minmax(160px, 260px) minmax(0, 1fr);
  gap: 20px;
  align-items: baseline;
  padding: 15px 0;
  border-bottom: 1px solid var(--rule);
}
.rl-no { font-size: 12px; color: var(--muted); }
.rl-title { font-weight: 600; font-size: 15px; }
.rl-text { color: var(--ink-2); font-size: 14.5px; }
.ruled-prose li { grid-template-columns: 56px minmax(0, 1fr); }
.rl-prose { color: var(--ink-2); font-size: 15px; }
.rl-prose .rl-title { color: var(--ink); }

/* ---------- Footer ---------- */
.footer { margin-top: auto; border-top: 1px solid var(--ink); }
.footer-inner { display: flex; align-items: center; justify-content: flex-start; gap: 8px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 28px; }
.footer-meta { font-size: 14px; color: var(--muted); }

/* ---------- Notices ---------- */
.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  border: 1px solid var(--rule-strong);
  border-left-width: 3px;
  background: var(--sheet);
}
.notice-icon { margin-top: 3px; }
.notice-error { border-left-color: var(--critical); }
.notice-error .notice-icon { color: var(--critical); }
.notice-warn { border-left-color: var(--major); }
.notice-warn .notice-icon { color: var(--major); }

/* ---------- Login ---------- */
.login-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-top: 72px; padding-bottom: 72px; }
.instrument.login-panel { width: 100%; max-width: 420px; background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: var(--radius); }
.instrument-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--rule);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.instrument-bar > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.login-body { padding: 30px 28px 28px; }
.login-title { font-size: 32px; letter-spacing: -0.015em; }
.login-sub { margin-top: 6px; color: var(--muted); font-size: 14px; }
.login-form { display: flex; flex-direction: column; margin-top: 24px; }
.field-label { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.field {
  height: 44px;
  padding: 0 12px;
  border-radius: var(--radius);
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-mono-stack);
  font-size: 15px;
  letter-spacing: 0.08em;
  outline: none;
}
.field:focus { border-color: var(--accent); }
.login-btn { height: 44px; margin-top: 16px; font-size: 15px; }
.login-wrap .trust { text-align: center; }

/* ---------- Sample report frame ---------- */
.sample { border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--paper-2); padding: 0 0 20px; }
.sample-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 16px;
  border-bottom: 1px solid var(--rule);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.sample-badge {
  padding: 2px 8px;
  border: 1.5px solid var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  letter-spacing: 0.16em;
  transform: rotate(-2deg);
}
.sample-note { font-family: var(--font-body-stack); font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--ink-2); }
.sample-meta { margin-left: auto; }
.sample-body { padding: 16px 16px 0; pointer-events: none; user-select: none; }
.sample-cards { margin-top: 14px; }

/* ---------- Results ---------- */
.drop-compact {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding: 12px 16px;
  border: 1.5px dashed var(--rule-strong);
  border-radius: var(--radius);
  background: var(--sheet);
  color: var(--ink-2);
  font-size: 14px;
  cursor: pointer;
}
.drop-compact svg { color: var(--accent-text); }
.drop-compact:hover, .drop-compact.is-dragging { border-color: var(--accent); }
.drop-compact.is-dragging { background: var(--accent-soft); }

.results { padding: 40px 0 72px; }
.results-title { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--ink); }
.file-name { font-family: var(--font-heading-stack); font-size: 32px; font-weight: 500; letter-spacing: -0.015em; line-height: 1.2; margin-top: 6px; word-break: break-word; }
.meta { margin-top: 4px; font-size: 12px; color: var(--muted); }

.panel { background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: var(--radius); }

/* Summary: a ruled form */
.summary { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(200px, 260px); overflow: hidden; }
.summary > * { padding: 18px 22px; }
.summary > * + * { border-left: 1px solid var(--rule); }
.big { font-family: var(--font-heading-stack); font-size: 54px; font-weight: 500; line-height: 1; margin-top: 8px; font-variant-numeric: tabular-nums; }
.annunciators { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 0; padding: 0 !important; }
.annunciator { --c: var(--faint); padding: 18px 20px; border-right: 1px solid var(--rule); }
.annunciator:last-child { border-right: none; }
.ann-critical { --c: var(--critical); }
.ann-major { --c: var(--major); }
.ann-minor { --c: var(--minor); }
.ann-other { --c: var(--other); }
.ann-top { display: flex; align-items: center; gap: 8px; }
.annunciator .lamp { width: 8px; height: 8px; border-radius: 1px; background: var(--rule-strong); }
.annunciator.lit .lamp { background: var(--c); }
.ann-label { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.annunciator.lit .ann-label { color: var(--c); }
.ann-n { font-family: var(--font-mono-stack); font-size: 24px; margin-top: 6px; color: var(--ink); }
.annunciator:not(.lit) .ann-n { color: var(--faint); }

.pages-tile { display: flex; flex-direction: column; justify-content: center; }
.pages-val { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 24px; }
.pages-icon { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid currentColor; }
.pages-tile.ok .pages-icon { color: var(--ok); }
.pages-tile.warn .pages-icon { color: var(--major); }
.pages-note { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 32px 0 20px; }
.segmented { display: inline-flex; border: 1px solid var(--rule-strong); border-radius: var(--radius); overflow: hidden; }
.segmented button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 14px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
.segmented button + button { border-left: 1px solid var(--rule-strong); }
.segmented button.on { background: var(--ink); color: var(--paper); }

.groups { display: grid; gap: 36px; }
.group-title { display: flex; align-items: center; gap: 10px; font-family: var(--font-heading-stack); font-size: 21px; font-weight: 500; margin-bottom: 12px; }
.group-title svg { color: var(--muted); }
.count { font-family: var(--font-mono-stack); font-size: 11px; color: var(--muted); }
.group-rule { flex: 1; height: 1px; background: var(--rule); margin-left: 6px; }

.cards { display: grid; gap: 10px; }
.finding { padding: 16px 20px; border-radius: var(--radius); border: 1px solid var(--rule-strong); background: var(--sheet); }
.finding-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }

/* Severity as an ink stamp */
.status {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px 1px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  font-family: var(--font-mono-stack);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: rotate(-1.5deg);
  opacity: 0.92;
  color: var(--other);
}
.status .lamp { display: none; }
.status-critical { color: var(--critical); }
.status-major { color: var(--major); }
.status-minor { color: var(--minor); }
.status-other { color: var(--other); border-style: dashed; }

.ref { font-size: 13.5px; font-weight: 600; color: var(--ink); word-break: break-word; }
.page { margin-left: auto; font-size: 12px; color: var(--muted); }
.finding-text { font-size: 15px; color: var(--ink); white-space: pre-line; }
.evidence {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dotted var(--rule-strong);
  font-size: 14px;
  color: var(--ink-2);
  white-space: pre-line;
}
.evidence-label { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); padding-top: 3px; }

/* Technical data in text, with red-pen marks on differing characters */
code.tech { font-family: var(--font-mono-stack); font-size: 0.9em; color: var(--ink); white-space: nowrap; }
code.tech mark {
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 700;
  text-decoration: underline wavy var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

/* Table view */
.table-panel { overflow: hidden; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13.5px; }
th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 12px 14px;
  border-bottom: 1px solid var(--ink);
}
td { padding: 12px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; white-space: pre-line; overflow-wrap: anywhere; color: var(--ink-2); }
td.td-mono { font-size: 12.5px; color: var(--ink); }
td code.tech { white-space: normal; }
td .status { white-space: normal; }
tbody tr:last-child td { border-bottom: none; }
th.col-0 { width: 15%; }
th.col-1 { width: 8%; }
th.col-2 { width: 12%; }
th.col-3 { width: 24%; }
th.col-4 { width: 27%; }
th.col-5 { width: 14%; }

.empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 24px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--ok); border: 1.5px solid var(--ok); margin-bottom: 8px; }
.empty-title { font-family: var(--font-heading-stack); font-size: 22px; }
.empty-note { max-width: 440px; }

.notes { margin-top: 20px; color: var(--muted); font-size: 13px; }
.notes p { margin: 4px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 48px; padding-bottom: 56px; }
  .hero h1 { max-width: 18ch; }
  .doc-section { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .doc-margin { flex-direction: row; gap: 12px; align-items: baseline; }
  .summary { grid-template-columns: minmax(0, 1fr); }
  .summary > * + * { border-left: none; border-top: 1px solid var(--rule); }
}
@media (max-width: 720px) {
  .container, .topbar-inner { padding: 0 16px; }
  .ruled-list li { grid-template-columns: 44px minmax(0, 1fr); gap: 4px 12px; }
  .rl-text { grid-column: 2; }
  .drop { flex-wrap: wrap; }
  .evidence { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .page { margin-left: 0; }
  .sample-meta { margin-left: 0; }
  .table-panel { overflow-x: auto; }
  table { min-width: 680px; }
  code.tech { white-space: normal; }
}

/* =========================================================
   Early-access page additions
   ========================================================= */
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.signup {
  padding: 20px 22px 18px;
  border: 1.5px dashed var(--rule-strong);
  border-radius: var(--radius);
  background: var(--sheet);
}
.signup:focus-within { border-color: var(--accent); }
.signup-title { display: block; font-family: var(--font-heading-stack); font-size: 22px; font-weight: 500; margin-bottom: 12px; }
.signup-row { display: flex; gap: 10px; }
.signup-field { flex: 1; min-width: 0; height: 40px; font-family: var(--font-body-stack); letter-spacing: 0; font-size: 15px; background: var(--paper); }
.signup-row .btn { height: 40px; }
.signup-status { min-height: 0; font-size: 14px; margin-top: 10px; }
.signup-status:empty { display: none; }
.signup-status.is-error { color: var(--critical); }
.signup-status.is-ok { color: var(--ok); }
.signup-privacy { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.signup-done { font-family: var(--font-heading-stack); font-size: 22px; }
.signup-done-sub { margin-top: 4px; font-size: 14px; color: var(--muted); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }

@media (max-width: 520px) {
  .signup-row { flex-direction: column; }
}

/* Headline annotation: "page 214" in red-pen italic */
.hero h1 .pen-note { font-style: italic; color: var(--accent-text); white-space: nowrap; }
