:root {
  --bg: #f7f7f5; --panel: #ffffff; --text: #1d1f23; --muted: #5f6570; --line: #e3e3de;
  --accent: #1f6f5c; --accent-text: #ffffff; --ok: #1f6f5c; --bad: #a3401f; --focus: #2b7fd8;
  --other: #c9c6bb; --warn: #b7791f;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15171a; --panel: #1d2024; --text: #e8e8e4; --muted: #9aa0a8; --line: #2e3238;
    --accent: #4fb39a; --accent-text: #0e1a17; --ok: #4fb39a; --bad: #e0845f; --focus: #6aa8ee;
    --other: #4a4f57; --warn: #e0b45f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15171a; --panel: #1d2024; --text: #e8e8e4; --muted: #9aa0a8; --line: #2e3238;
  --accent: #4fb39a; --accent-text: #0e1a17; --ok: #4fb39a; --bad: #e0845f; --focus: #6aa8ee;
  --other: #4a4f57; --warn: #e0b45f;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
header { background: var(--panel); border-bottom: 1px solid var(--line); }
.bar { max-width: 1280px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.brand { font-weight: 650; color: var(--text); text-decoration: none; }
.brand span { color: var(--muted); font-weight: 400; }
nav { display: flex; gap: 4px; flex: 1; }
nav a { padding: 6px 10px; border-radius: 6px; color: var(--muted); text-decoration: none; }
nav a[aria-current="page"] { background: var(--bg); color: var(--text); font-weight: 600; }
.who { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; margin: 0; }
main { max-width: 1280px; margin: 0 auto; padding: 24px 16px 48px; }
h1 { font-size: 24px; margin: 0 0 4px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 20px 0; }
.fact { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; }
.fact b { font-size: 30px; font-weight: 650; font-variant-numeric: tabular-nums; }
.fact span { color: var(--muted); }
.fact small { color: var(--muted); font-size: 12px; margin-top: 4px; }
.signin, .message { max-width: 380px; margin: 48px auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 28px; }
.message { max-width: 520px; }
form label { display: block; font-size: 14px; color: var(--muted); margin: 14px 0; }
input { display: block; width: 100%; margin-top: 6px; padding: 9px 11px; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 7px; }
button { font: inherit; padding: 9px 16px; border: 0; border-radius: 7px; background: var(--accent); color: var(--accent-text); font-weight: 600; cursor: pointer; }
button.link { background: none; color: var(--accent); padding: 0; font-weight: 500; }
.error { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); padding: 8px 12px; border-radius: 7px; }
.search { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin: 16px 0 4px; }
.search label { margin: 0; flex: 0 1 360px; }
.scroll { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; vertical-align: bottom; max-width: 110px; }
tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
th.num { white-space: normal; }
.nowrap { white-space: nowrap; }
.sql { min-width: 320px; }
.sql summary { cursor: pointer; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.sql pre { white-space: pre-wrap; word-break: break-word; font-size: 13px; background: var(--bg); padding: 10px; border-radius: 6px; }
.verdict { font-size: 13px; font-weight: 600; }
.verdict.ok { color: var(--ok); }
.verdict.bad { color: var(--bad); }
.head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.head p { margin: 4px 0; }
.periods { flex: 0 0 auto; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 3px; }
.periods a { padding: 4px 10px; font-size: 14px; }
h2 { font-size: 18px; margin: 32px 0 10px; }
h3 { font-size: 15px; margin: 20px 0 8px; }
.crumbs { margin: 0 0 4px; font-size: 14px; }
.chart { margin: 20px 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px 10px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart figcaption { color: var(--muted); font-size: 13px; margin-top: 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chart .axis { stroke: var(--line); }
.chart .tick { fill: var(--muted); font-size: 12px; }
.c-ok { fill: var(--ok); background: var(--ok); }
.c-other { fill: var(--other); background: var(--other); }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-left: 8px; }
.key:first-child { margin-left: 0; }
.meter { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 13px; }
.meter svg { width: 56px; height: 8px; }
.meter .track { fill: var(--line); }
.meter .used.low { fill: var(--ok); }
.meter .used.high { fill: var(--warn); }
.meter .used.full { fill: var(--bad); }
.fact .meter { margin-top: 10px; font-size: 15px; }
.fact .meter svg { width: 100px; }
@media (max-width: 640px) { .who span { display: none; } .fact b { font-size: 24px; } }
