:root {
  --s1: #2a78d6; --s2: #eb6834;
  --bg: #f6f5f1; --panel: #fff; --ink: #14171a; --muted: #636b74; --line: #dfddd6;
  --accent: #0b5a4a; --accent-ink: #fff; --ok: #1d7a46; --warn: #a15c00; --fail: #b3261e; --todo: #5b6470;
  --radius: 6px;
}
@media (prefers-color-scheme: dark) {
  :root { --s1: #3987e5; --s2: #d95926; --bg: #121416; --panel: #1b1e21; --ink: #e9e7e1; --muted: #9aa1a9; --line: #2e3338; --accent: #5cc2a8; --accent-ink: #0b1f1a; --ok: #6fcf97; --warn: #f2b561; --fail: #ff8a80; --todo: #9aa1a9; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
.shell { display: grid; grid-template-columns: 200px 1fr; min-height: 100vh; }
nav { border-right: 1px solid var(--line); padding: 20px 12px; position: sticky; top: 0; height: 100vh; }
nav h1 { font-size: 15px; letter-spacing: .14em; text-transform: uppercase; margin: 0 8px 18px; }
nav button { display: flex; justify-content: space-between; width: 100%; text-align: left; background: none; border: 0; color: var(--ink); padding: 7px 8px; border-radius: var(--radius); font: inherit; cursor: pointer; }
nav button:hover { background: var(--line); }
nav button[aria-current] { background: var(--accent); color: var(--accent-ink); }
nav .badge { font-variant-numeric: tabular-nums; font-size: 12px; opacity: .85; }
nav .who { position: absolute; bottom: 16px; left: 20px; right: 12px; color: var(--muted); font-size: 12px; }
main { padding: 28px 32px 80px; max-width: 1180px; min-width: 0; }
h2 { font-size: 22px; margin: 0 0 4px; font-weight: 600; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 28px 0 8px; font-weight: 600; }
p.lead { color: var(--muted); margin: 0 0 20px; max-width: 70ch; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
label { display: grid; gap: 3px; font-size: 12px; color: var(--muted); }
input, select { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 8px; min-width: 0; }
input:focus-visible, select:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
button.btn { font: inherit; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: var(--radius); padding: 6px 12px; cursor: pointer; white-space: nowrap; }
button.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.btn:disabled { opacity: .5; cursor: default; }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.neg { color: var(--fail); }
tr:last-child td { border-bottom: 0; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; border: 1px solid currentColor; white-space: nowrap; }
.ok { color: var(--ok); } .warn { color: var(--warn); } .fail { color: var(--fail); } .todo { color: var(--todo); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.tile b { display: block; font-size: 26px; font-variant-numeric: tabular-nums; font-weight: 600; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--radius); max-width: 80vw; z-index: 5; }
.toast.err { background: var(--fail); color: #fff; }
.login { max-width: 360px; margin: 14vh auto; }
.login .panel { display: grid; gap: 12px; }
.check .pill { align-self: start; justify-self: start; }
a { color: var(--accent); }
.check { display: grid; grid-template-columns: 74px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.check:last-child { border-bottom: 0; }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  nav { position: static; height: auto; display: flex; flex-wrap: wrap; gap: 4px; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 16px; }
  nav h1 { width: 100%; margin: 0 0 6px; } nav button { width: auto; } nav .who { position: static; width: 100%; }
  main { padding: 20px 16px 60px; }
}

.tabs { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs button { font: inherit; color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; cursor: pointer; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.tabs select { margin-left: auto; margin-bottom: 6px; }
.tiles + .fig, .fig + .fig { margin-top: 16px; }
.fig { margin-left: 0; margin-right: 0; }
.fig figcaption { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
.legend { margin-left: auto; display: flex; gap: 14px; color: var(--muted); font-size: 12px; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; }
.key.s1, rect.s1 { background: var(--s1); fill: var(--s1); }
.key.s2, rect.s2 { background: var(--s2); fill: var(--s2); }
.key.s0, rect.s0 { background: var(--muted); fill: var(--muted); }
.plot { position: relative; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { stroke: var(--muted); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .hit { fill: transparent; outline: none; }
.chart .hit:hover, .chart .hit:focus { fill: color-mix(in srgb, var(--ink) 6%, transparent); }
.tip { position: absolute; top: 6px; transform: translateX(-50%); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 10px; font-size: 12px; pointer-events: none; white-space: nowrap; box-shadow: 0 2px 8px rgb(0 0 0 / .15); }
tr.group td { font-weight: 600; padding-top: 16px; border-bottom-color: var(--muted); }
tr.sum td { font-weight: 600; }
tr.total td { border-top: 1px solid var(--muted); }
