/* Tokens mirror src/glg/viz/theme.py so the explorer matches the report's charts. */
:root {
  --bg: #ffffff;
  --surface: #f6f8fa;
  --ink: #1f2328;
  --muted: #57606a;
  --faint: #eaeef2;
  --rule: #c4cbd3;
  --covid: #eef1f4;
  --other: #8c959f;
  --amber: #E69F00;
  --magenta: #CC79A7;
  --sky: #56B4E9;
  --green: #009E73;
  --vermillion: #D55E00;
  --blue: #0072B2;
  --link: #0072B2;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16181c;
    --surface: #1d2025;
    --ink: #e6edf3;
    --muted: #9da7b3;
    --faint: #262b32;
    --rule: #4a525c;
    --covid: #22262d;
    --other: #7d8590;
    --amber: #BF8400;
    --magenta: #B8699A;
    --sky: #3E9AD2;
    --green: #009E73;
    --vermillion: #DB6A2E;
    --blue: #3F87D4;
    --link: #6aaef0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #16181c; --surface: #1d2025; --ink: #e6edf3; --muted: #9da7b3; --faint: #262b32;
  --rule: #4a525c; --covid: #22262d; --other: #7d8590; --amber: #BF8400; --magenta: #B8699A;
  --sky: #3E9AD2; --green: #009E73; --vermillion: #DB6A2E; --blue: #3F87D4; --link: #6aaef0;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.5 "Source Sans 3", "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--link); }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--bg); padding: 4px 8px; }

.top { border-bottom: 1px solid var(--faint); padding: 20px 0 16px; margin-bottom: 8px; }
.kicker { margin: 0; font-size: 0.85rem; color: var(--muted); }
.kicker a { color: var(--muted); }
h1 { margin: 4px 0 6px; font-size: 1.9rem; line-height: 1.15; }
h2 { font-size: 1.45rem; margin: 22px 0 4px; line-height: 1.2; }
h3 { font-size: 1.12rem; margin: 30px 0 2px; }
.lede { margin: 0 0 12px; color: var(--muted); max-width: 46em; }
.sub { margin: 0 0 8px; color: var(--muted); font-size: 0.92rem; max-width: 50em; }
.hint { color: var(--muted); font-size: 0.85rem; margin: 4px 0 12px; }

.picker { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.picker label { font-weight: 600; }
select {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--rule); border-radius: 6px; padding: 8px 10px;
  min-height: 44px; max-width: 100%;
}

.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; margin: 6px 0 4px; }
.seg button {
  font: inherit; font-size: 0.9rem; color: var(--ink); background: transparent; border: 0;
  padding: 8px 14px; min-height: 40px; cursor: pointer;
}
.seg button + button { border-left: 1px solid var(--rule); }
.seg button[aria-pressed="true"] { background: var(--faint); font-weight: 600; }

.chart { width: 100%; margin: 4px 0; }
.chart svg { display: block; max-width: 100%; height: auto; overflow: visible; }
.chart [aria-label="tip"] { font-size: 13px; }
#ov-chart svg { cursor: pointer; }

.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.86rem; color: var(--ink); margin: 6px 0 2px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 18px; height: 0; border-top: 2px solid; }
.legend i.box { width: 12px; height: 12px; border: 0; border-radius: 2px; }
.legend i.dash { border-top-style: dashed; }
.legend i.dot { width: 9px; height: 9px; border-radius: 50%; border: 2px solid; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.tile { background: var(--surface); border: 1px solid var(--faint); border-radius: 8px; padding: 10px 12px; }
.tile .v { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.tile .l { font-size: 0.82rem; color: var(--muted); }

.notes { margin: 8px 0 4px; }
.note { border-left: 3px solid var(--vermillion); background: var(--surface); padding: 8px 12px; margin: 6px 0; font-size: 0.92rem; border-radius: 0 6px 6px 0; }
.note.info { border-left-color: var(--rule); }

ul.annot, ul.disc { padding-left: 1.1em; font-size: 0.9rem; color: var(--ink); }
ul.annot li, ul.disc li { margin: 3px 0; }
ul.disc .meta { color: var(--muted); }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; font-size: 0.88rem; font-variant-numeric: tabular-nums; min-width: 100%; }
th, td { padding: 6px 10px; border-bottom: 1px solid var(--faint); text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { font-weight: 600; color: var(--muted); border-bottom-color: var(--rule); }
tr.partial td { color: var(--muted); font-style: italic; }
details { margin: 10px 0 20px; }
summary { cursor: pointer; color: var(--link); min-height: 32px; }

.error { color: var(--vermillion); font-weight: 600; }
.foot { border-top: 1px solid var(--faint); margin-top: 40px; padding-top: 12px; padding-bottom: 32px; font-size: 0.85rem; color: var(--muted); }

@media (max-width: 600px) {
  body { font-size: 16px; }
  h1 { font-size: 1.55rem; }
  .tile .v { font-size: 1.3rem; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
}
