:root {
  --bg: #fbfbfa; --fg: #1d1f21; --muted: #6a6f75; --line: #d9dbde; --panel: #f1f2f3;
  --pass: #9fd3a8; --partial: #e6b84f; --fail: #c83a32; --corrupt: #7a3fb8; --none: transparent;
  --ok: #2e7d3a; --warn: #9a6a00; --bad: #b3261e;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a; --fg: #e3e5e8; --muted: #9399a1; --line: #33373d; --panel: #1e2125;
    --pass: #3d7a48; --partial: #c99a2e; --fail: #e5534b; --corrupt: #a371f7;
    --ok: #6cc77a; --warn: #e0b04a; --bad: #ff7b72;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
main { max-width: 900px; margin: 0 auto; padding: 16px; }
a { color: inherit; }
h1 { font-size: 18px; margin: 0 0 12px; }
h2 { font-size: 15px; margin: 20px 0 6px; }
h3 { font-size: 13px; margin: 14px 0 4px; font-weight: 600; }
.mono, table, .code, .findings { font-family: var(--mono); }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.codebox { text-align: center; border: 2px solid var(--ok); border-radius: 6px; padding: 10px; margin-bottom: 12px; }
.codebox-label { font-size: 12px; color: var(--muted); }
.code { font-size: 34px; font-weight: 700; letter-spacing: 4px; }

.status { margin: 6px 0; }
.st-cancelled { color: var(--bad); font-weight: 700; }
.verdict { margin: 8px 0 4px; font-size: 15px; }
.verdict-good strong { color: var(--ok); }
.verdict-issues strong { color: var(--bad); }
.verdict-inconclusive strong { color: var(--warn); }

.findings { list-style: none; padding: 0; margin: 4px 0 10px; font-size: 13px; }
.findings li { padding: 3px 6px; border-left: 3px solid var(--line); margin: 2px 0; overflow-wrap: anywhere; }
.findings .sev { font-weight: 700; }
.sev-fail { border-color: var(--bad) !important; color: var(--bad); }
.sev-warn { border-color: var(--warn) !important; }
.sev-warn .sev { color: var(--warn); }
.sev-info .sev { color: var(--muted); }

.addrs { display: grid; grid-template-columns: max-content 1fr; gap: 0 10px; margin: 8px 0; font-size: 13px; }
.addrs dt { color: var(--muted); }
.addrs dd { margin: 0; overflow-wrap: anywhere; }

.tables { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0; }
table { border-collapse: collapse; font-size: 12px; }
caption { text-align: left; font-family: system-ui, sans-serif; font-weight: 600; padding-bottom: 3px; max-width: 280px; }
th, td { border: 1px solid var(--line); padding: 2px 6px; text-align: right; font-variant-numeric: tabular-nums; }
thead th { background: var(--panel); font-weight: 600; }
tbody th { text-align: left; font-weight: 400; color: var(--muted); }

.legend { font-size: 12px; color: var(--muted); }
.legend .cell { display: inline-block; width: 10px; height: 10px; vertical-align: -1px; }
.strip-scroll { overflow-x: auto; max-width: 100%; }
.strip { width: max-content; min-width: 100%; font-family: var(--mono); font-size: 11px; }
.strip-row { display: flex; align-items: flex-end; }
.strip-label { flex: 0 0 82px; color: var(--muted); padding-right: 4px; }
.strip-cells { flex: 1 1 auto; display: flex; align-items: flex-end; height: 14px; }
.strip-cells .cell { flex: 1 1 0; min-width: 2px; }
/* height is the non-colour cue: pass low, partial mid, fail/corrupt full; corrupt is also striped */
.cell { background: var(--none); }
.c-pass { background: var(--pass); height: 35%; }
.c-partial { background: var(--partial); height: 70%; }
.c-fail { background: var(--fail); height: 100%; }
.c-corrupt { height: 100%; background: repeating-linear-gradient(135deg, var(--corrupt) 0 2px, var(--bg) 2px 3px); }
.c-none { height: 0; }
.strip-row + .strip-row { margin-top: 1px; }
.axis { position: relative; height: 15px; border-top: 1px solid var(--line); }
.tick { position: absolute; top: 1px; transform: translateX(-50%); color: var(--muted); }
.tick-start { transform: none; }
.tick-end { transform: translateX(-100%); }
.axis-title { flex: 1 1 auto; text-align: center; color: var(--muted); }
#report-link { margin: 6px 0; }
.lat td.note { text-align: left; vertical-align: top; color: var(--muted); max-width: 12em; }

.nav { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 12px; }
.inline { display: inline; }
.flash { padding: 8px; border: 1px solid var(--warn); }
.scroll { overflow-x: auto; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
