:root {
  --bg: #f6f7f9; --panel: #ffffff; --ink: #1b1f24; --muted: #5f6b7a; --line: #dfe3e8; --soft: #eef1f4;
  --accent: #2357d9; --accent-ink: #ffffff;
  --p0: #b42318; --p0-bg: #fde8e7; --p1: #c4320a; --p1-bg: #fff0e6; --p2: #8a6100; --p2-bg: #fff6d6; --p3: #475467; --p3-bg: #eef1f4;
  --ok: #067647; --ok-bg: #e3f6ec; --warn: #8a6100; --warn-bg: #fff6d6; --bad: #b42318; --bad-bg: #fde8e7;
  --del: #fde8e7; --del-ink: #8f1d14; --ins: #e3f6ec; --ins-ink: #05603a;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111418; --panel: #191d23; --ink: #e6e9ee; --muted: #9aa4b2; --line: #2c333c; --soft: #222831;
    --accent: #6d95ff; --accent-ink: #0b1020;
    --p0: #ff8b80; --p0-bg: #3b1714; --p1: #ffa577; --p1-bg: #3a2114; --p2: #f3c969; --p2-bg: #352a0f; --p3: #b7c0cc; --p3-bg: #252b33;
    --ok: #6fd3a0; --ok-bg: #12301f; --warn: #f3c969; --warn-bg: #352a0f; --bad: #ff8b80; --bad-bg: #3b1714;
    --del: #3b1714; --del-ink: #ffb4ab; --ins: #12301f; --ins-ink: #9be8bd;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.top { display: flex; align-items: center; gap: 24px; padding: 12px 24px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { font-weight: 700; color: var(--ink); letter-spacing: .2px; }
.top nav { display: flex; gap: 16px; }
.who { margin-left: auto; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.who form { display: inline; }
.role { font-family: var(--mono); font-size: 12px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 24px 16px 48px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 16px; }
h1 { font-size: 24px; margin: 0 0 4px; }
h2 { font-size: 18px; margin: 28px 0 12px; }
h3 { font-size: 15px; margin: 16px 0 8px; }
.sub { color: var(--muted); margin: 0 0 16px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.stat .n { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: 13px; }
table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--soft); font-size: 13px; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.tbl-wrap { overflow-x: auto; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--soft); color: var(--muted); }
.P0 { background: var(--p0-bg); color: var(--p0); } .P1 { background: var(--p1-bg); color: var(--p1); }
.P2 { background: var(--p2-bg); color: var(--p2); } .P3 { background: var(--p3-bg); color: var(--p3); }
.good, .PASS, .COMPLETE, .APPROVED, .NO_BLOCKERS_IN_CHECKED_SCOPE, .DONE, .EXPECTED, .SEALED { background: var(--ok-bg); color: var(--ok); }
.warn, .WARN, .PARTIAL, .NEEDS_REVIEW, .APPROVED_WITH_EXCEPTIONS, .INSUFFICIENT_DATA, .NEEDS_CHECK, .HYPOTHESIS, .RUNNING, .QUEUED, .BUILDING { background: var(--warn-bg); color: var(--warn); }
.bad, .FAIL, .FAILED, .BLOCKED, .CONFIRMED_BLOCKERS, .BUG { background: var(--bad-bg); color: var(--bad); }
.NOT_CHECKED, .MANUAL, .NOT_APPLICABLE, .FALSE_POSITIVE, .CANCELLED, .NEW, .RECOMMENDATION, .FACT { background: var(--soft); color: var(--muted); }
.FACT { color: var(--ink); }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
.flash.ok { background: var(--ok-bg); color: var(--ok); } .flash.err { background: var(--bad-bg); color: var(--bad); }
.note { background: var(--soft); border-radius: 8px; padding: 10px 12px; color: var(--muted); font-size: 14px; }
button, .btn { font: inherit; border: 1px solid var(--line); background: var(--panel); color: var(--ink); padding: 7px 14px; border-radius: 8px; cursor: pointer; display: inline-block; }
button.primary, .btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.danger { color: var(--bad); }
button.link { border: 0; background: none; padding: 0; color: var(--accent); }
button:disabled { opacity: .5; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
form.inline { display: inline; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
input[type=text], input[type=url], input[type=number], input[type=password], select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; }
textarea { font-family: var(--mono); font-size: 13px; min-height: 70px; }
.check { display: flex; gap: 8px; align-items: flex-start; color: var(--ink); font-size: 14px; }
.hint { color: var(--muted); font-size: 12px; margin-top: 3px; }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 8px 16px 16px; margin: 0 0 16px; background: var(--panel); }
legend { font-weight: 600; padding: 0 6px; }
.mono, code { font-family: var(--mono); font-size: 13px; }
.url { font-family: var(--mono); font-size: 13px; word-break: break-all; }
pre { background: var(--soft); padding: 10px; border-radius: 8px; overflow-x: auto; font-size: 12px; white-space: pre-wrap; word-break: break-word; max-height: 420px; }
.progressbar { height: 8px; background: var(--soft); border-radius: 999px; overflow: hidden; }
.progressbar > div { height: 100%; background: var(--accent); }
.diff { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin: 8px 0; }
.diff .row { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.diff .row:last-child { border-bottom: 0; }
.diff .meta { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.diff .del { background: var(--del); color: var(--del-ink); }
.diff .ins { background: var(--ins); color: var(--ins-ink); }
del.w { background: var(--del); color: var(--del-ink); text-decoration: line-through; }
ins.w { background: var(--ins); color: var(--ins-ink); text-decoration: none; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 4px 12px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; word-break: break-word; }
details > summary { cursor: pointer; color: var(--accent); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-bottom: 12px; }
.filters > div { min-width: 140px; }
.filters label { margin-top: 0; }
@media (max-width: 640px) { .kv { grid-template-columns: 1fr; } .top { gap: 12px; } }
