:root {
  --bg: #ffffff;
  --bg-alt: #f6f8fa;
  --text: #1f2328;
  --muted: #6e7781;
  --border: #d0d7de;
  --accent: #4c9be8;
  --up: #1a7f37;
  --down: #cf222e;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --bg-alt: #161b22;
    --text: #e6edf3;
    --muted: #8d96a0;
    --border: #30363d;
    --accent: #58a6ff;
    --up: #3fb950;
    --down: #f85149;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.9rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.brand {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
}
.brand::after { content: "."; color: var(--accent); }
.generated { color: var(--muted); font-size: 0.8rem; }
main { max-width: 1100px; margin: 0 auto; padding: 1.5rem; }
footer {
  max-width: 1100px;
  margin: 2rem auto 0;
  padding: 1rem 1.5rem 2rem;
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}
h1 { font-size: 1.5rem; margin: 0.5rem 0 0.25rem; }
h2 { font-size: 1.1rem; margin: 2rem 0 0.75rem; }
.sub { color: var(--muted); margin: 0 0 1rem; font-size: 0.9rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td {
  text-align: left;
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
tbody tr:hover { background: var(--bg-alt); }
.pos { font-variant-numeric: tabular-nums; font-weight: 600; }
.pos.top10 { color: var(--up); }
.muted { color: var(--muted); }
.up { color: var(--up); font-weight: 600; }
.down { color: var(--down); font-weight: 600; }
.tag {
  display: inline-block;
  padding: 0 0.4em;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.72rem;
  color: var(--muted);
  vertical-align: 0.08em;
}
.tag.tracked { color: var(--accent); border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  padding: 0.25rem 0.7rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
}
.chart-wrap {
  position: relative;
  height: 420px;
  margin: 1rem 0 1.5rem;
  padding: 0.75rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.spark { display: block; }
.spark polyline {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.empty { color: var(--muted); font-style: italic; }
code {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  font-size: 0.88em;
}
@media (max-width: 640px) {
  main { padding: 1rem; }
  .chart-wrap { height: 300px; }
}
