:root {
  color-scheme: light;
  --surface-0: #f4f4f2;
  --surface-1: #fcfcfb;
  --border: #e2e1dc;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --text-muted: #77766f;
  --link: #256abf;
  --good: #0ca30c;
  --warning: #b77f00;
  --critical: #d03b3b;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --surface-0: #111110;
    --surface-1: #1a1a19;
    --border: #33332f;
    --text-primary: #ffffff;
    --text-secondary: #c3c2b7;
    --text-muted: #96958c;
    --link: #6da7ec;
    --warning: #fab219;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --surface-0: #111110;
  --surface-1: #1a1a19;
  --border: #33332f;
  --text-primary: #ffffff;
  --text-secondary: #c3c2b7;
  --text-muted: #96958c;
  --link: #6da7ec;
  --warning: #fab219;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--surface-0);
  color: var(--text-primary);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

header, main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}

header { padding-top: 32px; }
h1 { font-size: 26px; margin: 0 0 4px; letter-spacing: -0.01em; }
h2 { font-size: 17px; margin: 0 0 4px; }
a { color: var(--link); }
.asof { margin: 0; font-weight: 600; color: var(--text-secondary); }
.note, .sub { color: var(--text-muted); font-size: 13px; margin: 4px 0 12px; }

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.tile {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
}
.tile .label { color: var(--text-muted); font-size: 13px; }
.tile .value { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }

.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}
.chart { width: 100%; overflow-x: auto; }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--text-secondary); font-weight: 600; }
.status { font-weight: 600; white-space: nowrap; }
.status::before { margin-right: 4px; }
.status-pass { color: var(--good); }
.status-pass::before { content: "\2713"; }
.status-warn { color: var(--warning); }
.status-warn::before { content: "!"; }
.status-fail { color: var(--critical); }
.status-fail::before { content: "\2715"; }
.status-info { color: var(--text-secondary); }
.status-info::before { content: "i"; }

footer { max-width: 1040px; margin: 0 auto; padding: 8px 16px 32px; color: var(--text-muted); font-size: 13px; }
