:root { --bg: #ffffff; --fg: #1d2330; --muted: #667085; --line: #e4e7ec; --accent: #1f6feb;
        --open: #d1fadf; --partial: #fef0c7; --closed: #f2f4f7; --row: #f9fafb; }
@media (prefers-color-scheme: dark) {
  :root { --bg: #0d1117; --fg: #e6edf3; --muted: #8b949e; --line: #30363d; --accent: #58a6ff;
          --open: #1a4d2e; --partial: #5c4813; --closed: #21262d; --row: #161b22; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg);
       font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
header { display: flex; align-items: center; gap: 24px; padding: 12px 24px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
header h1 { font-size: 16px; margin: 0; }
nav { display: flex; gap: 16px; flex: 1; }
nav a { color: var(--muted); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
nav a.active { color: var(--fg); border-bottom-color: var(--accent); }
#user { color: var(--muted); }
main { padding: 16px 24px 48px; max-width: 1200px; }
h2 { font-size: 18px; margin: 8px 0 4px; } h3 { font-size: 15px; margin: 24px 0 8px; }
.hint { color: var(--muted); margin: 0 0 12px; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 500; }
td.num, th.num { text-align: right; }
tbody tr:hover { background: var(--row); }
tr.clickable { cursor: pointer; } tr.selected { background: var(--row); font-weight: 600; }
.wrap { white-space: normal; }
form { display: flex; gap: 16px; margin: 8px 0; }
select, input { font: inherit; padding: 4px 6px; background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 4px; }
.split { display: grid; grid-template-columns: 180px 1fr; gap: 32px; align-items: start; }
.sidebar { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 16px; }
.sidebar a { color: var(--fg); text-decoration: none; padding: 6px 10px; border-radius: 6px; }
.sidebar a:hover { background: var(--row); }
.sidebar a.active { background: var(--row); color: var(--accent); font-weight: 600; box-shadow: inset 2px 0 0 var(--accent); }
.sidebar .kind { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.detail h2 { margin-top: 0; }
details.year { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 8px; }
details.year summary { cursor: pointer; padding: 8px 12px; font-weight: 600; list-style: none; display: flex; gap: 12px; align-items: baseline; }
details.year summary::-webkit-details-marker { display: none; }
details.year summary::before { content: "▸"; color: var(--muted); }
details.year[open] summary::before { content: "▾"; }
details.year summary .counts { font-weight: 400; color: var(--muted); font-size: 13px; }
details.year table { margin: 0 0 8px; }
.tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 10px; }
.tag.closed { background: var(--closed); color: var(--fg); }
.tag.early { background: var(--partial); }
.tag.special { background: var(--open); }
.tag.primary { background: var(--row); color: var(--accent); border: 1px solid var(--line); }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } .sidebar { position: static; flex-direction: row; flex-wrap: wrap; } }
#status.error { color: #d1242f; }
@media (max-width: 640px) { header, main { padding-left: 16px; padding-right: 16px; } td, th { padding: 6px; } }
