/* Seismograph: one stylesheet for every page. Colors are tokens, redefined for dark mode. */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --ink: #1b2233;
  --muted: #5e6577;
  --line: #e3e1da;
  --brand: #1f2a44;
  --accent: #e8622c;
  --bar: #e8622c;
  --grid: #ebe9e3;
  --live-bg: #fff1e8;
  --live-ink: #8a3210;
  --lag-bg: #f3f1ea;
  --link: #1f4fbf;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1420;
    --surface: #161d2c;
    --ink: #e6e8ee;
    --muted: #9aa2b5;
    --line: #2a3346;
    --brand: #e6e8ee;
    --accent: #ff8a57;
    --bar: #ff8a57;
    --grid: #232b3c;
    --live-bg: #3a1e12;
    --live-ink: #ffc2a3;
    --lag-bg: #1d2535;
    --link: #8fb0ff;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--link); }
a:hover { text-decoration-thickness: 2px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 24px; padding-bottom: 40px; }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.01em; }
h2 { font-size: 1.25rem; margin: 32px 0 12px; }
section { margin: 0 0 8px; }
.lead { font-size: 1.08rem; color: var(--ink); max-width: 760px; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Header */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 12px; padding-bottom: 12px; }
.brand { color: var(--brand); font-weight: 700; font-size: 1.15rem; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.brand small { font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.mark { width: 22px; height: 22px; border-radius: 5px; background: var(--brand) url("favicon.svg") center / cover; }
nav[aria-label="Main"] { display: flex; flex-wrap: wrap; gap: 4px 16px; }
nav[aria-label="Main"] a { color: var(--ink); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
nav[aria-label="Main"] a[aria-current="page"] { border-bottom-color: var(--accent); }

/* Banners */
.banner { padding: 10px 0; font-size: 0.95rem; }
.banner.live { background: var(--live-bg); color: var(--live-ink); }
.banner.live a { color: inherit; font-weight: 600; }
.banner.lag { background: var(--lag-bg); color: var(--muted); }
.banner.notice, .banner.beta { background: var(--lag-bg); color: var(--ink); border-bottom: 1px solid var(--line); }
.banner.notice a, .banner.beta a { font-weight: 600; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 20px 0; }
.card { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; color: inherit; text-decoration: none; }
a.card:hover { border-color: var(--accent); }
.card.live { border-color: var(--accent); }
.card .label { color: var(--muted); font-size: 0.85rem; }
.card .figure { font-size: 1.7rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.25; }
.card .note { color: var(--muted); font-size: 0.85rem; }
.hero { padding: 12px 0 4px; }
.hero h1 { font-size: 2.3rem; }

/* Charts */
.chart-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.chart { display: block; width: 100%; min-width: 520px; height: auto; }
.chart .bar { fill: var(--bar); }
.chart .hit { fill: transparent; }
.chart g:hover .bar { opacity: 0.75; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .base { stroke: var(--muted); stroke-width: 1; }
.chart text { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart .empty { font-size: 13px; }

/* Tables */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; margin-top: 24px; }
table.data { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: 0.95rem; }
table.data caption { text-align: left; font-weight: 600; padding: 0 0 8px; caption-side: top; }
table.data th, table.data td { padding: 8px 12px; border-top: 1px solid var(--line); vertical-align: top; }
table.data thead th { border-top: 0; color: var(--muted); font-weight: 500; font-size: 0.85rem; text-align: left; }
table.data thead th.num { text-align: right; }
table.data tbody th { text-align: left; font-weight: 500; }
.tag { display: inline-block; font-size: 0.75rem; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); vertical-align: 1px; }
.tag.live { border-color: var(--accent); color: var(--accent); }
details.more { margin-top: 12px; }
details.more > summary { cursor: pointer; color: var(--link); margin-bottom: 8px; }

/* Text blocks */
.note-box { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 6px; padding: 10px 14px; }
.note-box.warn { border-left-color: var(--live-ink); }
.kicker { color: var(--muted); margin: 0 0 4px; font-size: 0.95rem; }
.formula { font-size: 1.3rem; font-weight: 600; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.pager a[rel="next"] { margin-left: auto; }
ul.days { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 16px; }
ul.days li { display: flex; justify-content: space-between; border-bottom: 1px dotted var(--line); padding: 4px 0; }
.slot:empty { display: none; }

/* Breadcrumbs: one small line above the h1 */
.crumbs ol { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 6px; color: var(--muted); font-size: 0.88rem; }
.crumbs li + li::before { content: "›"; content: "›" / ""; margin-right: 6px; }

/* Footer */
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.88rem; padding: 16px 0 32px; }
.foot p { margin: 6px 0; max-width: 820px; }

@media (max-width: 600px) {
  h1 { font-size: 1.5rem; }
  .hero h1 { font-size: 1.8rem; }
  .card .figure { font-size: 1.4rem; }
  table.data th, table.data td { padding: 7px 8px; }
  table.data { display: block; overflow-x: auto; }
  dl.facts { grid-template-columns: 1fr; gap: 0; }
  dl.facts dd { margin-bottom: 8px; }
}
