/* Datum QC — the design. This is the only copy; it began as the Flask app's
   static/app.css and became the source when that app was removed. */

/* Datum QC — all styles. Two palettes, one set of rules: only variables below. */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/IBMPlexSans.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/IBMPlexMono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/IBMPlexMono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/IBMPlexMono-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ── palettes ───────────────────────────────────────────────────────────── */
:root[data-theme="light"] {
  --bg: #E8EAED;
  --header-bg: rgba(232,234,237,.86);
  --surface: #F7F8FA;
  --surface2: #EEF0F3;
  --surface3: #FCFCFD;
  --hover: #F0F2F5;
  --hover2: #EDEFF3;
  --card: #FFFFFF;
  --border: #DFE2E7;
  --border2: #E9EBEF;
  --border3: #EAECF0;
  --border-strong: #C9CED6;
  --border-soft: #DADDE2;
  --border-input: #DCDFE5;
  --gridline: #D6DAE1;
  --text: #14181D;
  --text2: #262C34;
  --text3: #4E5663;
  --muted: #5A6270;
  --muted2: #6A7280;
  --muted3: #666E7B;
  --muted4: #6E7683;
  --faint: #A2A9B3;
  --accent: #0E8C7C;
  --accent-fg: #0B7A6C;
  --on-accent: #FFFFFF;
  --accent-bg: rgba(14,140,124,.07);
  --accent-bg2: rgba(14,140,124,.1);
  --accent-border: #C4E1DC;
  --accent-glow: rgba(14,140,124,.06);
  --accent-shadow: rgba(14,140,124,.3);
  --accent-sweep: rgba(14,140,124,.13);
  --accent-sweep2: rgba(14,140,124,.55);
  --blue-glow: rgba(64,96,168,.05);
  --err: #C2382A;
  --err-bg: rgba(194,56,42,.09);
  --err-border: rgba(194,56,42,.24);
  --warn: #8F6206;
  --warn-bg: rgba(143,98,6,.08);
  --warn-border: rgba(143,98,6,.22);
  --ok: #16714A;
}
:root[data-theme="dark"] {
  --bg: #08090C;
  --header-bg: rgba(8,9,12,.82);
  --surface: #0C0F13;
  --surface2: #0A0D11;
  --surface3: #090B0F;
  --hover: #0F1318;
  --hover2: #10141A;
  --card: #0E1116;
  --border: #1A1F26;
  --border2: #14181E;
  --border3: #12161B;
  --border-strong: #262C35;
  --border-soft: #171B22;
  --border-input: #1E232B;
  --gridline: #141922;
  --text: #E4E8EE;
  --text2: #D2D8E0;
  --text3: #9BA4B1;
  --muted: #98A1AE;
  --muted2: #5C6674;
  --muted3: #7C8593;
  --muted4: #6B7482;
  --faint: #3B434F;
  --accent: #2FD2BC;
  --accent-fg: #8FD9CF;
  --on-accent: #052220;
  --accent-bg: rgba(47,210,188,.05);
  --accent-bg2: rgba(47,210,188,.1);
  --accent-border: #1F2B2A;
  --accent-glow: rgba(47,210,188,.05);
  --accent-shadow: rgba(47,210,188,.22);
  --accent-sweep: rgba(47,210,188,.12);
  --accent-sweep2: rgba(47,210,188,.45);
  --blue-glow: rgba(64,96,168,.06);
  --err: #F0594B;
  --err-bg: rgba(240,89,75,.1);
  --err-border: rgba(240,89,75,.26);
  --warn: #E0A93B;
  --warn-bg: rgba(224,169,59,.09);
  --warn-border: rgba(224,169,59,.24);
  --ok: #3FBF87;
}

/* ── base ───────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); }
body {
  min-height: 100vh;
  color: var(--text);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-border); }
a:hover { color: var(--accent-fg); border-bottom-color: var(--accent); }
button { font-family: inherit; }
input, select { font-family: inherit; }
::selection { background: var(--accent-bg2); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--surface2); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--faint); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes gridDrift { from { transform: translate3d(0,0,0); } to { transform: translate3d(-64px,-64px,0); } }
@keyframes beacon { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.82); } }
@keyframes ringOut { 0% { opacity: .55; transform: scale(1); } 100% { opacity: 0; transform: scale(2.6); } }
@keyframes sweep { 0% { top: -2%; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { top: 102%; opacity: 0; } }
@keyframes caret { 0%,45% { opacity: 1; } 50%,100% { opacity: 0; } }

/* ── ambient ────────────────────────────────────────────────────────────── */
.amb-grid {
  position: fixed; inset: -80px; pointer-events: none; z-index: 0; opacity: .5;
  background-image: linear-gradient(var(--gridline) 1px, transparent 1px),
                    linear-gradient(90deg, var(--gridline) 1px, transparent 1px);
  background-size: 64px 64px;
  animation: gridDrift 24s linear infinite;
}
.amb-glow {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(120% 80% at 50% -10%, var(--accent-glow), transparent 55%),
              radial-gradient(90% 60% at 100% 100%, var(--blue-glow), transparent 60%);
}

/* ── shared type helpers ────────────────────────────────────────────────── */
.mono { font-family: "IBM Plex Mono", monospace; }
.eyebrow {
  font: 500 11px/1 "IBM Plex Mono", monospace; letter-spacing: .16em;
  color: var(--muted2); margin-bottom: 18px;
}
.panel-label { font: 500 11px/1 "IBM Plex Mono", monospace; letter-spacing: .14em; color: var(--muted4); }
h1.title { font: 450 34px/1.2 "IBM Plex Sans", sans-serif; letter-spacing: -.015em; margin: 0 0 14px; }
.lede { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--muted); text-wrap: pretty; }

/* ── header ─────────────────────────────────────────────────────────────── */
.hdr {
  position: sticky; top: 0; z-index: 20; background: var(--header-bg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.hdr-in {
  max-width: 1240px; margin: 0 auto; padding: 0 40px; height: 66px;
  display: flex; align-items: center; gap: 40px;
}
.brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.mark {
  width: 22px; height: 22px; border: 1.5px solid var(--accent); border-radius: 3px;
  display: flex; align-items: center; justify-content: center; position: relative;
}
.mark i { width: 12px; height: 1.5px; background: var(--accent); }
.mark s {
  position: absolute; left: -1.5px; right: -1.5px; top: -1.5px; bottom: -1.5px;
  border: 1.5px solid var(--accent); border-radius: 3px; animation: ringOut 3.4s ease-out infinite;
}
.wordmark { display: flex; align-items: baseline; gap: 7px; }
.wordmark b { font: 600 15px/1 "IBM Plex Sans", sans-serif; letter-spacing: .2em; }
.wordmark span { font: 400 11px/1 "IBM Plex Mono", monospace; letter-spacing: .1em; color: var(--muted2); }

.tabs { display: flex; align-items: stretch; gap: 2px; height: 66px; flex: 1 1 auto; }
.tab {
  display: flex; align-items: center; padding: 0 15px; height: 66px; position: relative;
  font: 450 13.5px/1 "IBM Plex Sans", sans-serif; letter-spacing: .01em;
  color: var(--muted); border: 0; transition: color .18s ease;
}
.tab:hover { color: var(--text); border: 0; }
.tab span.n { font: 500 10px/1 "IBM Plex Mono", monospace; color: var(--faint); margin-right: 8px; }
.tab .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: transparent; transition: background .2s ease; }
.tab.on { color: var(--text); }
.tab.on .bar { background: var(--accent); }
.tab.off { color: var(--faint); cursor: default; }
.tab .badge {
  font: 500 10px/1 "IBM Plex Mono", monospace; background: var(--err-bg); color: var(--err);
  border: 1px solid var(--err-border); border-radius: 20px; padding: 3px 6px; margin-left: 8px;
}
.hdr-right { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }
.beacon {
  display: flex; align-items: center; gap: 8px; padding: 6px 11px;
  border: 1px solid var(--accent-border); background: var(--accent-bg); border-radius: 20px;
}
.beacon i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: beacon 2.4s ease-in-out infinite; }
.beacon span { font: 500 10.5px/1 "IBM Plex Mono", monospace; letter-spacing: .1em; color: var(--accent-fg); }
.themer {
  display: flex; align-items: center; gap: 2px; background: var(--card);
  border: 1px solid var(--border-input); border-radius: 20px; padding: 2px;
}
.themer button {
  appearance: none; background: none; border: 0; padding: 5px 11px; border-radius: 16px;
  color: var(--muted3); font: 500 10.5px/1 "IBM Plex Mono", monospace; letter-spacing: .08em;
  cursor: pointer; transition: color .16s ease, background .16s ease;
}
.themer button:hover { color: var(--text); background: var(--hover2); }
:root[data-theme="light"] .themer button[data-set="light"],
:root[data-theme="dark"] .themer button[data-set="dark"] { background: var(--accent-bg2); color: var(--accent); }
.corpus-v { font: 400 11px/1 "IBM Plex Mono", monospace; color: var(--muted3); }

/* ── layout ─────────────────────────────────────────────────────────────── */
main { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 52px 40px 96px; }
.ftr { position: relative; z-index: 1; border-top: 1px solid var(--border-soft); padding: 26px 40px; }
.ftr-in {
  max-width: 1240px; margin: 0 auto; display: flex; justify-content: space-between;
  align-items: center; gap: 24px; flex-wrap: wrap;
  font: 400 11.5px/1.5 "IBM Plex Mono", monospace; color: var(--muted3);
}

/* ── panels, chips, buttons, facts ──────────────────────────────────────── */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.panel-head {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.panel-note { font: 400 11px/1 "IBM Plex Mono", monospace; color: var(--muted3); }
.tag {
  font: 500 9.5px/1 "IBM Plex Mono", monospace; letter-spacing: .1em; border-radius: 3px;
  padding: 4px 7px; flex: 0 0 auto;
  color: var(--accent-fg); background: var(--accent-bg); border: 1px solid var(--accent-border);
}
.tag.manual { color: var(--muted3); background: transparent; border: 1px solid var(--border-strong); }
.btn {
  appearance: none; border: 0; border-radius: 5px; background: var(--accent); color: var(--on-accent);
  cursor: pointer; padding: 14px 26px; font: 500 14.5px/1 "IBM Plex Sans", sans-serif;
  letter-spacing: .01em; display: inline-flex; align-items: center; gap: 11px;
  transition: transform .16s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 22px -8px var(--accent-shadow); border: 0; }
.btn span { font: 500 11px/1 "IBM Plex Mono", monospace; opacity: .7; }
.btn[disabled] { background: var(--border-input); color: var(--muted3); cursor: not-allowed; }
.btn[disabled]:hover { transform: none; box-shadow: none; }
.btn-ghost {
  appearance: none; background: none; border: 1px solid var(--border-strong); border-radius: 5px;
  color: var(--muted); cursor: pointer; padding: 13px 20px;
  font: 450 13.5px/1 "IBM Plex Sans", sans-serif; display: inline-flex; align-items: center;
  transition: border-color .18s ease, color .18s ease;
}
.btn-ghost:hover { border-color: var(--faint); color: var(--text); }
.btn-accent-ghost {
  appearance: none; background: none; border: 1px solid var(--accent); border-radius: 5px;
  color: var(--accent); cursor: pointer; padding: 11px 19px;
  font: 500 13px/1 "IBM Plex Sans", sans-serif; display: inline-flex; align-items: center; gap: 10px;
  transition: background .18s ease;
}
.btn-accent-ghost:hover { background: var(--accent-bg2); }
.facts { display: flex; flex-direction: column; gap: 11px; }
.fact { display: flex; gap: 14px; font: 400 12px/1.5 "IBM Plex Mono", monospace; }
.fact b { color: var(--muted3); flex: 0 0 104px; font-weight: 400; }
.fact span { color: var(--text3); flex: 1 1 auto; overflow-wrap: anywhere; }
.note { display: flex; gap: 10px; align-items: flex-start; }
.note i { font: 500 11px/1.5 "IBM Plex Mono", monospace; color: var(--accent); flex: 0 0 auto; font-style: normal; }
.note span { font-size: 12.5px; line-height: 1.55; color: var(--muted3); }
.banner {
  border-radius: 5px; padding: 13px 16px; margin-bottom: 26px; max-width: 760px;
  font: 400 12.5px/1.55 "IBM Plex Mono", monospace;
  color: var(--err); background: var(--err-bg); border: 1px solid var(--err-border);
}
.banner.ok { color: var(--accent-fg); background: var(--accent-bg); border-color: var(--accent-border); }

/* ── 01 check ───────────────────────────────────────────────────────────── */
.hero { max-width: 760px; animation: fadeUp .5s cubic-bezier(.22,.7,.3,1) both; }
.hero .eyebrow { margin-bottom: 20px; }
.hero h1 {
  font: 450 44px/1.12 "IBM Plex Sans", sans-serif; letter-spacing: -.02em;
  margin: 0 0 18px; text-wrap: pretty;
}
.hero p { margin: 0; font-size: 16.5px; line-height: 1.62; color: var(--muted); max-width: 640px; text-wrap: pretty; }
.check-grid { display: grid; grid-template-columns: 1fr 400px; gap: 28px; margin-top: 44px; align-items: start; }
.col-left { animation: fadeUp .5s cubic-bezier(.22,.7,.3,1) both; animation-delay: .06s; }
.col-left > .panel-label { display: block; margin-bottom: 12px; color: var(--muted4); }
.manifest { animation: fadeUp .5s cubic-bezier(.22,.7,.3,1) both; animation-delay: .12s; }

.drop {
  display: block; border: 1px dashed var(--border-strong); background: var(--surface);
  border-radius: 6px; padding: 44px 32px; text-align: center; cursor: pointer;
  transition: border-color .2s ease, background .2s ease; position: relative; overflow: hidden;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-bg); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.drop .glyph {
  width: 46px; height: 46px; margin: 0 auto 18px; border: 1px solid var(--border-strong);
  border-radius: 5px; display: flex; align-items: center; justify-content: center;
  font: 500 11px/1 "IBM Plex Mono", monospace; color: var(--accent); letter-spacing: .06em;
}
.drop .lead { font-size: 15.5px; color: var(--text2); margin-bottom: 7px; }
.drop .sub { font: 400 12.5px/1.5 "IBM Plex Mono", monospace; color: var(--muted2); }

.files { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.file {
  display: flex; align-items: center; gap: 14px; padding: 13px 15px; background: var(--card);
  border: 1px solid var(--border); border-radius: 5px; animation: fadeUp .35s ease both;
  transition: border-color .18s ease;
}
.file:hover { border-color: var(--border-strong); }
.file .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
.file .name {
  font: 450 13.5px/1 "IBM Plex Mono", monospace; color: var(--text); flex: 1 1 auto;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.file .size { font: 400 12px/1 "IBM Plex Mono", monospace; color: var(--muted2); flex: 0 0 auto; }
.file .x {
  appearance: none; background: none; border: 0; color: var(--muted3); cursor: pointer;
  font: 400 16px/1 "IBM Plex Mono", monospace; padding: 2px 4px; flex: 0 0 auto;
  transition: color .16s ease;
}
.file .x:hover { color: var(--err); }
.run-row { display: flex; align-items: center; gap: 18px; margin-top: 22px; }
.run-hint { font: 400 12.5px/1.5 "IBM Plex Mono", monospace; color: var(--muted2); }

.rule-row {
  padding: 15px 20px; border-bottom: 1px solid var(--border2);
  display: flex; gap: 14px; align-items: flex-start; transition: background .16s ease;
}
.rule-row:hover { background: var(--hover); }
.rule-row .code { font: 500 12px/1.5 "IBM Plex Mono", monospace; color: var(--accent); flex: 0 0 34px; }
.rule-row.manual .code { color: var(--muted3); }
.rule-row .mid { flex: 1 1 auto; min-width: 0; }
.rule-row .mid b { display: block; font: 400 13.5px/1.55 "IBM Plex Sans", sans-serif; color: var(--text); margin-bottom: 3px; }
.rule-row.manual .mid b { color: var(--muted); }
.rule-row .mid span { display: block; font-size: 12.5px; line-height: 1.5; color: var(--muted2); }
.manifest-foot { padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; }

/* ── 02 scan ────────────────────────────────────────────────────────────── */
.scan { animation: fadeIn .3s ease both; }
.scan-grid { display: grid; grid-template-columns: 1fr 420px; gap: 28px; align-items: start; }
.scan h1 { font: 450 34px/1.2 "IBM Plex Sans", sans-serif; letter-spacing: -.015em; margin: 0 0 30px; }
.scan .eyebrow { margin-bottom: 16px; }
.pct-row { display: flex; align-items: baseline; gap: 14px; margin-bottom: 12px; }
.pct { font: 500 44px/1 "IBM Plex Mono", monospace; color: var(--accent); letter-spacing: -.02em; }
.stage { font: 400 13px/1 "IBM Plex Mono", monospace; color: var(--muted2); }
.track { height: 3px; background: var(--border-soft); border-radius: 2px; overflow: hidden; margin-bottom: 34px; }
.track i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s linear; }
.trav {
  position: relative; border: 1px solid var(--border); border-radius: 6px; background: var(--surface2);
  height: 210px; overflow: hidden; margin-bottom: 28px;
}
.trav .cells {
  position: absolute; inset: 0; opacity: .45;
  background-image: linear-gradient(var(--gridline) 1px, transparent 1px),
                    linear-gradient(90deg, var(--gridline) 1px, transparent 1px);
  background-size: 28px 28px;
}
.trav .beam {
  position: absolute; left: 0; right: 0; height: 60px; top: -2%;
  background: linear-gradient(180deg, transparent, var(--accent-sweep) 78%, var(--accent-sweep2));
  animation: sweep 2.4s cubic-bezier(.4,0,.6,1) infinite;
}
.trav .lbl { position: absolute; left: 20px; top: 18px; font: 500 10.5px/1 "IBM Plex Mono", monospace; letter-spacing: .12em; color: var(--muted3); }
.trav .foot { position: absolute; left: 20px; bottom: 18px; right: 20px; display: flex; justify-content: space-between; align-items: flex-end; }
.trav .foot b { font: 500 26px/1 "IBM Plex Mono", monospace; color: var(--text); letter-spacing: -.02em; }
.trav .foot span { font: 400 11.5px/1 "IBM Plex Mono", monospace; color: var(--muted2); }
.console {
  border: 1px solid var(--border); border-radius: 6px; background: var(--surface2);
  padding: 18px 20px; height: 190px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 7px;
}
.console div { font: 400 12.5px/1.5 "IBM Plex Mono", monospace; color: var(--muted); display: flex; gap: 12px; animation: fadeUp .28s ease both; }
.console div b { color: var(--muted3); flex: 0 0 auto; font-weight: 400; }
.console div.cur { color: var(--accent); }
.console div.cur span { animation: caret 1.1s steps(1) infinite; }
.pipe-row { padding: 15px 20px; border-bottom: 1px solid var(--border2); display: flex; gap: 13px; align-items: center; }
.pipe-row .ring {
  width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  font: 500 9px/1 "IBM Plex Mono", monospace; color: var(--on-accent);
}
.pipe-row.on .ring { border-color: var(--accent); }
.pipe-row.done .ring { border-color: var(--accent); background: var(--accent); }
.pipe-row .code { font: 500 12px/1 "IBM Plex Mono", monospace; color: var(--muted3); flex: 0 0 34px; }
.pipe-row.on .code, .pipe-row.done .code { color: var(--accent); }
.pipe-row .nm { flex: 1 1 auto; font-size: 13px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pipe-row.on .nm, .pipe-row.done .nm { color: var(--text); }
.pipe-row .st { font: 400 11.5px/1 "IBM Plex Mono", monospace; color: var(--muted3); flex: 0 0 auto; }
.pipe-files { padding: 16px 20px; display: flex; flex-direction: column; gap: 9px; }
.pipe-files div { display: flex; gap: 10px; align-items: center; font: 400 12px/1 "IBM Plex Mono", monospace; color: var(--muted3); }
.pipe-files i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
.pipe-files span { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── 03 report ──────────────────────────────────────────────────────────── */
.rpt { animation: fadeIn .35s ease both; }
.rpt-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; margin-bottom: 34px; }
.rpt-head .eyebrow { margin-bottom: 14px; }
.rpt-head p { margin: 0; font-size: 15px; color: var(--muted); max-width: 620px; text-wrap: pretty; }
.rpt-head .actions { display: flex; gap: 12px; align-items: center; }
.rpt-head .btn { padding: 13px 22px; font-size: 13.5px; }
.rpt-head .btn span { opacity: .65; }
.sev-err { color: var(--err); }
.sev-warn { color: var(--warn); }

.stats {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: 6px; overflow: hidden; margin-bottom: 28px;
}
.stat { background: var(--surface); padding: 22px 24px; animation: fadeUp .45s ease both; }
.stat b { display: block; font: 500 10.5px/1 "IBM Plex Mono", monospace; letter-spacing: .13em; color: var(--muted4); margin-bottom: 14px; font-weight: 500; }
.stat .v { display: flex; align-items: baseline; gap: 9px; }
.stat .v i { font: 500 34px/1 "IBM Plex Mono", monospace; letter-spacing: -.03em; color: var(--text); font-style: normal; }
.stat .v span { font: 400 12px/1 "IBM Plex Mono", monospace; color: var(--muted2); }

.outcomes { margin-bottom: 36px; }
.outcomes .panel-head { padding: 16px 22px; }
.out-row { padding: 15px 22px; border-bottom: 1px solid var(--border2); display: flex; align-items: center; gap: 18px; animation: fadeUp .4s ease both; }
.out-row .code { font: 500 12px/1 "IBM Plex Mono", monospace; color: var(--accent); flex: 0 0 36px; }
.out-row.manual .code { color: var(--muted3); }
.out-row .nm { flex: 1 1 auto; font-size: 13.5px; color: var(--text); }
.out-row.manual .nm { color: var(--muted); }
.out-bar { flex: 0 0 auto; height: 6px; width: 180px; background: var(--border2); border-radius: 3px; overflow: hidden; display: flex; }
.out-bar i { height: 100%; }
.out-bar .e { background: var(--err); }
.out-bar .w { background: var(--warn); }
.out-row .res { font: 450 12.5px/1 "IBM Plex Mono", monospace; flex: 0 0 216px; text-align: right; color: var(--text3); }
.out-row .res.pass { color: var(--ok); }
.out-row .res.bad { color: var(--err); }
.out-row .res.warned { color: var(--warn); }
.out-row .res.na { color: var(--muted3); }

.disc-row { display: flex; align-items: center; gap: 14px; margin: 18px 0 4px; flex-wrap: wrap; }
.disc-row .seg button { padding: 7px 12px; font: 500 10.5px/1 "IBM Plex Mono", monospace; letter-spacing: .08em; }
.disc-hint { flex-basis: 100%; font-size: 12px; color: var(--muted3); line-height: 1.5; }

.models-line { display: flex; gap: 10px; flex-wrap: wrap; margin: -14px 0 30px; }
.model-chip { font: 450 11.5px/1.5 "IBM Plex Mono", monospace; color: var(--muted3); background: var(--surface); border: 1px solid var(--border2); border-radius: 5px; padding: 6px 11px; }
.model-chip b { color: var(--text2); font-weight: 550; }
.model-chip i { font-style: normal; color: var(--accent); }

.gfa { margin-bottom: 36px; }
.gfa .panel-head { padding: 16px 22px; }
.gfa-tbl { overflow-x: auto; }
.gfa-row { display: grid; grid-template-columns: 1.4fr repeat(7, 1fr); gap: 10px; padding: 13px 22px; border-bottom: 1px solid var(--border2); min-width: 980px; }
.gfa-row:last-child { border-bottom: 0; }
.gfa-cap > span { font: 500 10px/1.4 "IBM Plex Mono", monospace; letter-spacing: .11em; color: var(--muted4); text-align: right; }
.gfa-cap > span:first-child { text-align: left; }
.gfa-m { font-size: 13px; color: var(--text2); overflow-wrap: anywhere; }
.gfa-v { font: 450 12.5px/1.4 "IBM Plex Mono", monospace; color: var(--text3); text-align: right; }
.gfa-v.acc { color: var(--accent); }
.gfa-v.warn { color: var(--warn); }
.gfa-v.err { color: var(--err); }
.gfa-total { background: var(--hover); }
.gfa-total .gfa-m { color: var(--text); }

.filters { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; flex-wrap: wrap; }
.filters .set { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.seg { display: flex; background: var(--surface); border: 1px solid var(--border-input); border-radius: 5px; overflow: hidden; }
.seg button {
  appearance: none; border: 0; background: none; color: var(--muted); cursor: pointer;
  padding: 9px 14px; font: 450 12.5px/1 "IBM Plex Mono", monospace;
  transition: background .16s ease, color .16s ease;
}
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--accent-bg2); color: var(--accent); }
select.ctl, input.ctl {
  appearance: none; background: var(--surface); border: 1px solid var(--border-input);
  border-radius: 5px; color: var(--text2); padding: 9px 13px;
  font: 450 12.5px/1 "IBM Plex Mono", monospace; cursor: pointer; outline: none;
  transition: border-color .18s ease;
}
input.ctl { color: var(--text); width: 190px; cursor: text; }
input.ctl:focus, select.ctl:focus { border-color: var(--accent); }

.groups { border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: var(--surface); }
.group { border-bottom: 1px solid var(--border2); }
.group[hidden] { display: none; }
.g-head {
  appearance: none; width: 100%; background: none; border: 0; cursor: pointer; padding: 17px 22px;
  display: flex; align-items: center; gap: 18px; text-align: left; transition: background .16s ease;
}
.g-head:hover { background: var(--hover2); }
.g-head .caret { font: 400 11px/1 "IBM Plex Mono", monospace; color: var(--faint); flex: 0 0 12px; transition: transform .2s ease; display: inline-block; }
.group.open .g-head { background: var(--hover); }
.group.open .g-head .caret { transform: rotate(90deg); }
.g-head .mid { flex: 1 1 auto; min-width: 0; }
.g-head .top { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.g-head .nm { font: 450 14.5px/1.3 "IBM Plex Sans", sans-serif; color: var(--text); }
.g-head .disc {
  font: 500 9.5px/1 "IBM Plex Mono", monospace; letter-spacing: .09em; color: var(--text3);
  border: 1px solid var(--border-strong); border-radius: 3px; padding: 4px 6px;
}
.g-head .auth { font: 400 11px/1 "IBM Plex Mono", monospace; color: var(--muted3); }
.g-head .ent { display: block; font: 400 11.5px/1.4 "IBM Plex Mono", monospace; color: var(--muted3); margin-top: 6px; }
.g-head .counts { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.chip { font: 500 11.5px/1 "IBM Plex Mono", monospace; border-radius: 3px; padding: 5px 8px; }
.chip.e { color: var(--err); background: var(--err-bg); border: 1px solid var(--err-border); }
.chip.w { color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn-border); }

.g-body { background: var(--surface3); border-top: 1px solid var(--border2); overflow-x: auto; }
.g-body[hidden] { display: none; }
.gi { padding: 0 0 10px; border-bottom: 1px solid var(--border2); }
.gi-cap { display: flex; gap: 10px; padding: 12px 22px 10px; font: 500 10px/1 "IBM Plex Mono", monospace; letter-spacing: .11em; color: var(--muted4); border-bottom: 1px solid var(--border2); }
.gi-cap > span:first-child { flex: 0 0 80px; }
.gi-cap-issue { flex: 1 1 auto; }
.gi-cap-n { flex: 0 0 auto; min-width: 70px; text-align: right; }
.gi-row { display: flex; align-items: baseline; gap: 10px; padding: 8px 22px; border-bottom: 1px solid var(--border3); }
.gi-row[hidden] { display: none; }
.gi-row .sdot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; align-self: center; }
.gi-row .sdot.err { background: var(--err); } .gi-row .sdot.warn { background: var(--warn); }
.gi-row .sev { font: 500 11.5px/1.4 "IBM Plex Mono", monospace; flex: 0 0 64px; }
.gi-row .sev.err { color: var(--err); } .gi-row .sev.warn { color: var(--warn); }
.gi-txt { flex: 1 1 auto; font-size: 13px; line-height: 1.5; color: var(--text2); min-width: 0; }
.gi-rule { font: 500 11.5px/1.4 "IBM Plex Mono", monospace; color: var(--text3); flex: 0 0 auto; }
.gi-n { font: 500 12.5px/1.4 "IBM Plex Mono", monospace; color: var(--accent); flex: 0 0 auto; min-width: 70px; text-align: right; }
.gi-more { padding: 8px 22px 4px; font: 400 11.5px/1.5 "IBM Plex Mono", monospace; color: var(--muted3); }

.g-foot {
  padding: 14px 22px; font: 400 11.5px/1 "IBM Plex Mono", monospace; color: var(--muted3);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.g-foot span { color: var(--muted2); }
.empty { padding: 56px 22px; text-align: center; font: 400 13px/1.6 "IBM Plex Mono", monospace; color: var(--muted2); }
.empty[hidden] { display: none; }
.rpt-foot {
  display: flex; justify-content: space-between; align-items: center; margin-top: 16px;
  font: 400 11.5px/1 "IBM Plex Mono", monospace; color: var(--muted3); flex-wrap: wrap; gap: 12px;
}

/* ── 04 rules ───────────────────────────────────────────────────────────── */
.page-hero { max-width: 700px; margin-bottom: 40px; animation: fadeIn .3s ease both; }
.cards { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; margin-bottom: 44px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 24px;
  animation: fadeUp .45s ease both; transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.card .top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card .code { font: 500 13px/1 "IBM Plex Mono", monospace; letter-spacing: .06em; color: var(--accent); }
.card.manual .code { color: var(--muted3); }
.card .nm { font: 450 17px/1.35 "IBM Plex Sans", sans-serif; color: var(--text); margin-bottom: 12px; }
.card.manual .nm { color: var(--muted); }
.card p { margin: 0 0 18px; font-size: 13.5px; line-height: 1.6; color: var(--muted); text-wrap: pretty; }
.card .facts { gap: 8px; padding-top: 16px; border-top: 1px solid var(--border2); }
.card .fact { font-size: 11.5px; line-height: 1.5; }
.card .fact b { flex: 0 0 92px; }

.corpus-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; gap: 20px; flex-wrap: wrap; }
.corpus-ctl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.corpus-ctl input.ctl { width: 280px; }
.corpus-head .panel-label { display: block; margin-bottom: 10px; }
.corpus-head .count { font-size: 14px; color: var(--muted); }
.table { border: 1px solid var(--border); border-radius: 6px; background: var(--surface); overflow-x: auto; }
.t-rows { min-width: 920px; }
.c-row { display: grid; grid-template-columns: 1.05fr 64px 0.8fr 2.15fr; }
.c-row[hidden] { display: none; }
.c-row > div { padding: 13px 14px; border-bottom: 1px solid var(--border3); }
.c-row > div:first-child { padding-left: 22px; font-size: 13.5px; color: var(--text2); }
.c-row > div:last-child { padding-right: 22px; }
.c-row .disc { font: 500 10.5px/1.4 "IBM Plex Mono", monospace; color: var(--text3); }
.c-row .auth { font: 400 11.5px/1.4 "IBM Plex Mono", monospace; color: var(--muted3); }
.c-row .bind { padding-top: 6px; padding-bottom: 6px; }
.b-row, .bind-head { display: grid; grid-template-columns: 205px 1fr 52px; gap: 12px; }
.b-row { padding: 7px 0; align-items: baseline; }
.b-row + .b-row { border-top: 1px dashed var(--border3); }
.b-ent { font: 400 11.5px/1.5 "IBM Plex Mono", monospace; color: var(--accent-fg); overflow-wrap: anywhere; }
.b-sub { font: 400 11px/1.5 "IBM Plex Mono", monospace; color: var(--muted3); overflow-wrap: anywhere; }
.b-pm { font: 450 12px/1.5 "IBM Plex Mono", monospace; color: var(--text3); text-align: right; }
.c-head > div {
  padding: 13px 14px; font: 500 10px/1 "IBM Plex Mono", monospace; letter-spacing: .11em;
  color: var(--muted3); border-bottom: 1px solid var(--border);
}
.c-head > div:first-child { padding-left: 22px; font-size: 10px; color: var(--muted3); }
.c-head > div:last-child { padding-right: 22px; }
.bind-head .r { text-align: right; }
.t-foot { padding: 15px 22px; font: 400 11.5px/1 "IBM Plex Mono", monospace; color: var(--muted3); }

/* ── 05 settings ────────────────────────────────────────────────────────── */
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.set-grid > * { animation: fadeUp .45s ease both; }
.set-col { display: flex; flex-direction: column; gap: 20px; }
.set-col > * { animation: fadeUp .45s ease both; }
.panel-head.solo { justify-content: flex-start; padding: 17px 22px; }
.set-body { padding: 22px; }
.corpus-v-big { display: flex; align-items: baseline; gap: 12px; margin-bottom: 22px; }
.corpus-v-big b { font: 500 30px/1 "IBM Plex Mono", monospace; color: var(--text); letter-spacing: -.02em; }
.corpus-v-big span { font: 400 12.5px/1 "IBM Plex Mono", monospace; color: var(--muted2); }
.set-body .facts { margin-bottom: 24px; }
.pull { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pull-msg { font: 400 12px/1.5 "IBM Plex Mono", monospace; color: var(--accent-fg); flex: 1 1 200px; overflow-wrap: anywhere; }
.pull-msg.bad { color: var(--err); }
.proc { padding: 6px 0; }
.proc-row { padding: 15px 22px; display: flex; gap: 14px; align-items: flex-start; border-bottom: 1px solid var(--border2); }
.proc-row i { font: 500 11px/1.6 "IBM Plex Mono", monospace; color: var(--accent); flex: 0 0 auto; font-style: normal; }
.proc-row b { display: block; font: 400 13.5px/1.55 "IBM Plex Sans", sans-serif; color: var(--text2); margin-bottom: 4px; }
.proc-row span { display: block; font-size: 12.5px; line-height: 1.55; color: var(--muted3); }
.app-card { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 22px; }
.app-card .panel-label { display: block; margin-bottom: 16px; }

/* ── narrower than the design ───────────────────────────────────────────────
   This was a desktop tool at 127.0.0.1, so only the 1080px step below existed. Measured,
   the header is the one thing that overflows the PAGE: brand (190) + tabs (374) +
   status (505) plus gaps needs ~1150px, and .hdr-in caps at 1240px — so it fits at full
   width and nowhere else. Everything else already behaves: the screens have no
   overflowing elements at 375px, and the corpus table keeps its 920px min-width and
   scrolls inside .table, which is what that overflow-x has always been for.

   So the header sheds width in two steps: drop the beacon chip first — it is the widest
   and least essential part, and the hero paragraph makes the same "nothing is uploaded"
   promise in words — then give the tabs their own row when one row cannot hold them. */
@media (max-width: 1239px) {
  .beacon { display: none; }
}

@media (max-width: 1080px) {
  .check-grid, .scan-grid, .cards, .set-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2,1fr); }
  .hdr-in, main { padding-left: 24px; padding-right: 24px; }
  .hero h1 { font-size: 34px; }

  .hdr-in { height: auto; flex-wrap: wrap; gap: 0 24px; padding-top: 14px; }
  .hdr-right { margin-left: auto; }
  .tabs {
    order: 3; flex: 1 0 100%; height: auto;
    overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { height: 52px; flex: 0 0 auto; }
}

@media (max-width: 767px) {
  .tab { height: 46px; padding: 0 13px; }
  .hero h1 { font-size: 27px; }
  .stats { grid-template-columns: 1fr; }
  .rpt-head .actions { width: 100%; }
  .rpt-head .actions .btn, .rpt-head .actions .btn-ghost { flex: 1 1 auto; justify-content: center; }
}

/* ---- browser edition ----
   The Flask build omitted these elements server-side with {% if %}; here they are always
   in the DOM and toggled. An author `display` rule outranks the user-agent's
   [hidden] { display: none }, so each one is spelled out — the same way this file already
   handles .group[hidden] and .gi-row[hidden]. Without this an empty .banner renders as a
   red bar and an empty .badge as a red pill on the Report tab. */
.banner[hidden],
.panel[hidden],
.tab .badge[hidden] { display: none; }
