:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --text: #0b0b0b;
  --text-2: #52514e;
  --muted: #898781;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --border: rgba(11, 11, 11, 0.1);
  --wash: rgba(11, 11, 11, 0.05);
  --s-blue: #2a78d6;
  --s-orange: #eb6834;
  --s-aqua: #1baf7a;
  --s-violet: #6250d6;
  --up: #006300;
  --down: #d03b3b;
  --good: #0ca30c;
  --warning: #fab219;
  --critical: #d03b3b;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --text: #f0efec;
    --text-2: #c3c2b7;
    --muted: #898781;
    --grid: #2c2c2a;
    --axis: #383835;
    --border: rgba(255, 255, 255, 0.1);
    --wash: rgba(255, 255, 255, 0.06);
    --s-blue: #3987e5;
    --s-orange: #d95926;
    --s-aqua: #199e70;
    --s-violet: #9085e9;
    --up: #0ca30c;
    --down: #e66767;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
.muted { color: var(--muted); }
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand { font-weight: 650; }
.spacer { flex: 1; }
nav { display: flex; gap: 2px; overflow-x: auto; }
nav button, .filters button, .ghost {
  border: 0; background: none; padding: 6px 12px; border-radius: 6px; color: var(--text-2);
  white-space: nowrap;
}
nav button:hover, .filters button:hover, .ghost:hover { background: var(--wash); }
nav button[aria-current="page"], .filters button[aria-pressed="true"] {
  background: var(--wash); color: var(--text); font-weight: 600;
}
button:focus-visible, tr[tabindex]:focus-visible { outline: 2px solid var(--s-blue); outline-offset: 1px; }
main { max-width: 1180px; margin: 0 auto; padding: 16px; }
footer { max-width: 1180px; margin: 0 auto; padding: 8px 16px 32px; font-size: 12px; }
.filters { display: flex; gap: 2px; margin-bottom: 12px; min-height: 32px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}
.card h2 { margin: 0; font-size: 15px; font-weight: 650; }
.card .sub { margin: 2px 0 10px; color: var(--text-2); font-size: 13px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.tile .label { color: var(--text-2); font-size: 12px; }
.tile .value { font-size: 24px; font-weight: 650; line-height: 1.25; }
.tile .note { color: var(--muted); font-size: 12px; }
.up { color: var(--up); }
.down { color: var(--down); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 6px; font-size: 13px; color: var(--text-2); }
.legend .item { display: inline-flex; align-items: center; gap: 6px; }
.legend .key { width: 14px; height: 0; border-top: 2px solid; display: inline-block; }
.legend .key.dashed { border-top-style: dashed; }
.legend .val { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.legend .when { color: var(--muted); margin-left: auto; font-variant-numeric: tabular-nums; }
.chart { width: 100%; height: 340px; }
.chart.short { height: 240px; }
.chart.tall { height: 460px; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--text-2); font-weight: 500; white-space: nowrap; }
th, td { padding: 7px 10px 7px 0; border-bottom: 1px solid var(--grid); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.wrap { white-space: pre-wrap; color: var(--text-2); min-width: 240px; }
tr.pick { cursor: pointer; }
tr.pick:hover, tr.pick[aria-selected="true"] { background: var(--wash); }
tr.pick td:first-child { font-weight: 600; padding-left: 8px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--wash); color: var(--text-2); font-size: 12px; white-space: nowrap; }
.meter { display: inline-block; width: 90px; height: 6px; border-radius: 3px; background: var(--grid); vertical-align: middle; overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 3px; background: var(--s-blue); }
.meter.w10 > i { width: 10%; } .meter.w20 > i { width: 20%; } .meter.w30 > i { width: 30%; }
.meter.w40 > i { width: 40%; } .meter.w50 > i { width: 50%; } .meter.w60 > i { width: 60%; }
.meter.w70 > i { width: 70%; } .meter.w80 > i { width: 80%; } .meter.w90 > i { width: 90%; }
.meter.w100 > i { width: 100%; } .meter.w0 > i { width: 0; }
.empty { color: var(--text-2); padding: 8px 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.grid2 > .card { margin-bottom: 0; }
.grid2 { margin-bottom: 16px; }
.busy { opacity: 0.5; }
details summary { cursor: pointer; color: var(--text-2); margin-top: 10px; }
body.login { display: grid; place-items: center; min-height: 100vh; }
.login-card { max-width: 380px; margin: 16px; }
.login-card h1 { margin: 0 0 8px; font-size: 18px; }
@media (max-width: 640px) {
  .chart { height: 280px; }
  .chart.tall { height: 400px; }
  #asof { display: none; }
}
