.viz-root {
  color-scheme: light;
  --page: #f4f3ef;
  --surface-1: #fcfcfb;
  --border: #e2e1dc;
  --grid: #ecebe6;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --text-muted: #77766f;
  --series-1: #2a78d6;
  --good: #0ca30c;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;
  --none: #b9b8b1;
  --accent-text: #1c5cab;
}
@media (prefers-color-scheme: dark) {
  .viz-root {
    color-scheme: dark;
    --page: #111110;
    --surface-1: #1a1a19;
    --border: #2e2e2b;
    --grid: #262624;
    --text-primary: #f0efec;
    --text-secondary: #c3c2b7;
    --text-muted: #8f8e86;
    --series-1: #3987e5;
    --none: #4a4a46;
    --accent-text: #86b6ef;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--page, #f4f3ef); }
@media (prefers-color-scheme: dark) { html, body { background: #111110; } }
body { font: 15px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.viz-root { max-width: 1040px; margin: 0 auto; padding: 20px 20px 60px; color: var(--text-primary); background: var(--page); }
a { color: var(--accent-text); }
code { font: 0.9em ui-monospace, SFMono-Regular, Menlo, monospace; }

.top { display: flex; justify-content: space-between; align-items: center; padding: 6px 0 28px; }
.brand { font-weight: 700; font-size: 18px; color: var(--text-primary); text-decoration: none; letter-spacing: -0.01em; }
.top nav a { margin-left: 18px; color: var(--text-secondary); text-decoration: none; font-size: 14px; }
.top nav a:hover { color: var(--text-primary); }

.hero { padding: 12px 0 30px; }
.eyebrow { color: var(--text-muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 10px; }
.hero h1 { font-size: clamp(28px, 4.6vw, 48px); line-height: 1.12; letter-spacing: -0.025em; margin: 0; max-width: 21ch; font-weight: 650; }
.hero h1 em { font-style: normal; color: var(--text-secondary); }
.big { font-variant-numeric: tabular-nums; }
.sub { color: var(--text-secondary); font-size: 17px; max-width: 62ch; margin: 16px 0 0; }

.card { background: var(--surface-1); border: 1px solid var(--border); border-radius: 12px; padding: 22px 24px; margin: 0 0 18px; }
.card h2 { font-size: 15px; font-weight: 600; margin: 0 0 16px; color: var(--text-primary); }

/* distribution bar: 2px surface gap between segments, 4px rounded ends */
.dist { display: flex; gap: 2px; height: 34px; }
.seg { height: 100%; min-width: 3px; cursor: default; }
.seg:first-child { border-radius: 4px 0 0 4px; }
.seg:last-child { border-radius: 0 4px 4px 0; }
.legend { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.legend li { display: flex; align-items: center; gap: 7px; color: var(--text-secondary); font-size: 14px; }
.legend b { color: var(--text-primary); font-variant-numeric: tabular-nums; font-weight: 600; }
.sw { width: 10px; height: 10px; border-radius: 2px; flex: none; }

.status { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.status .ic { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; font-size: 10px; font-weight: 700; color: #fff; }

.trend svg { width: 100%; height: auto; display: block; overflow: visible; }
.trend .axis text { fill: var(--text-muted); font-size: 11px; }
.trend .gridline { stroke: var(--grid); stroke-width: 1; }
.note { color: var(--text-muted); font-size: 13px; margin: 10px 0 0; }

.tablebar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.tablebar h2 { margin: 0 auto 0 0; }
.tablebar input, .tablebar select { font: inherit; font-size: 14px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--page); color: var(--text-primary); }
.tablebar input { width: 220px; }
.tablewrap { max-height: 640px; overflow: auto; border-top: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { position: sticky; top: 0; background: var(--surface-1); text-align: left; font-weight: 600; color: var(--text-secondary); font-size: 12px; padding: 9px 8px; border-bottom: 1px solid var(--border); }
td { padding: 8px; border-bottom: 1px solid var(--grid); color: var(--text-primary); }
td.num { color: var(--text-muted); font-variant-numeric: tabular-nums; width: 44px; }
td.dim { color: var(--text-secondary); white-space: nowrap; }
td .host { color: var(--text-muted); font-size: 12px; }
button.copy { font: inherit; font-size: 12px; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--border); background: transparent; color: var(--text-secondary); cursor: pointer; }
button.copy:hover { color: var(--text-primary); }

.prose p { color: var(--text-secondary); max-width: 75ch; }
footer { color: var(--text-muted); font-size: 13px; padding-top: 18px; }

.tip { position: fixed; pointer-events: none; background: var(--text-primary, #0b0b0b); color: var(--surface-1, #fff); font-size: 13px; padding: 7px 10px; border-radius: 7px; z-index: 10; max-width: 260px; }
@media (prefers-color-scheme: dark) { .tip { background: #f0efec; color: #1a1a19; } }
@media (max-width: 640px) {
  .card { padding: 18px 16px; }
  .tablebar input { width: 100%; }
  th:nth-child(4), td:nth-child(4) { display: none; }
}
@media (forced-colors: active) { .seg, .sw { border: 1px solid CanvasText; } }
