:root { --fg:#111; --muted:#666; --line:#ddd; --bg:#fff; --alt:#f6f6f6; --accent:#7a1f2b; --ok:#1a7f37; --bad:#b42318; --warn:#9a6700; }
@media (prefers-color-scheme: dark) { :root { --fg:#e6e6e6; --muted:#999; --line:#333; --bg:#141414; --alt:#1c1c1c; --accent:#e07a8a; --ok:#4ac26b; --bad:#ff7b72; --warn:#d29922; } }
* { box-sizing: border-box; }
:root { --nav-h: 38px; --ctl-h: 24px; }
body { margin:0; font:13px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color:var(--fg); background:var(--bg); }
nav { display:flex; gap:16px; align-items:center; height:var(--nav-h); padding:0 16px; border-bottom:1px solid var(--line); position:sticky; top:0; background:var(--bg); z-index:2; }
nav b { color:var(--accent); margin-right:8px; }
nav a { color:var(--fg); text-decoration:none; }
nav a.on { font-weight:600; text-decoration:underline; }
main { padding:12px 16px 40px; }
h1 { font-size:16px; margin:4px 0 12px; }
h2 { font-size:14px; margin:20px 0 8px; }
a { color:var(--accent); }
table { border-collapse:collapse; width:100%; }
th, td { text-align:left; padding:3px 6px; border-bottom:1px solid var(--line); vertical-align:top; }
/* headers stick just under the nav; the 1px shadow keeps the bottom rule visible while stuck */
th { position:sticky; top:var(--nav-h); z-index:1; background:var(--bg); font-weight:600; white-space:nowrap; box-shadow:inset 0 -1px 0 var(--line); }
tr:nth-child(even) td { background:var(--alt); }
td.n, th.n { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.muted { color:var(--muted); }
.ok { color:var(--ok); } .bad { color:var(--bad); } .warn { color:var(--warn); }
.pill { display:inline-block; padding:0 5px; border:1px solid var(--line); border-radius:3px; font-size:11px; }
form.filters { display:flex; flex-wrap:wrap; gap:6px 10px; align-items:end; margin-bottom:10px; }
form.filters label { display:flex; flex-direction:column; gap:2px; font-size:11px; color:var(--muted); }
form.filters label.chk { flex-direction:row; align-items:center; gap:4px; height:var(--ctl-h); font-size:13px; color:var(--fg); }
form.filters .actions { display:flex; align-items:center; gap:10px; height:var(--ctl-h); }
input, select, textarea, button { font:inherit; color:var(--fg); background:var(--bg); border:1px solid var(--line); padding:2px 4px; }
input:not([type=checkbox]), select, button { height:var(--ctl-h); }
input[type=checkbox] { margin:0; }
input[type=number] { width:70px; }
button { cursor:pointer; padding:2px 10px; }
textarea { width:100%; font-family:ui-monospace, Menlo, monospace; font-size:12px; }
pre { white-space:pre-wrap; word-break:break-word; margin:0; font-size:12px; }
.stats { display:flex; gap:24px; margin-bottom:12px; }
.stats div b { display:block; font-size:18px; }
/* sideways scrolling only where the table can't fit; on wide screens the wrapper must not
   become a scroll container, or it captures the sticky headers */
.scroll { overflow-x:auto; }
@media (min-width: 1000px) { .scroll { overflow:visible; } }
@media (max-width: 999px) { th { position:static; } }
details summary { cursor:pointer; }
nav form.nav-user { margin:0 0 0 auto; display:flex; align-items:center; gap:8px; }
main.login { max-width:360px; margin:12vh auto 0; }
main.login form { display:flex; gap:8px; align-items:end; margin:12px 0; }
main.login label { display:flex; flex-direction:column; gap:2px; flex:1; font-size:11px; color:var(--muted); }
main.login form.muted { display:block; font-size:12px; }
button.link { border:0; padding:0; height:auto; background:none; color:var(--accent); text-decoration:underline; }
