:root {
  --bg: #ffffff;
  --text: #141414;
  --muted: #6a6a6a;
  --faint: #9a9a9a;
  --line: #ececec;
  --field: #f5f5f4;
  --accent: #1d4ed8;
  --alert: #b42318;
  --radius: 8px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111213;
    --text: #ececec;
    --muted: #a0a0a0;
    --faint: #6f6f6f;
    --line: #232426;
    --field: #1b1c1e;
    --accent: #8ab4ff;
    --alert: #ff8a80;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "tnum" 1;
}
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--bg); padding: 6px 10px; z-index: 10; }

.top, .page, .bottom { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.top {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-top: 28px; padding-bottom: 20px;
}
.brand { font-weight: 700; font-size: 18px; letter-spacing: -0.01em; text-decoration: none; }
.brand span { color: var(--muted); font-weight: 500; }
.top-links a { color: var(--muted); text-decoration: none; font-size: 15px; }
.top-links a:hover, .top-links a[aria-current] { color: var(--text); }

.controls {
  position: sticky; top: 0; z-index: 5; background: var(--bg);
  padding: 8px 0 12px; border-bottom: 1px solid var(--line);
}
.ranges { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 -2px; padding: 2px; }
.ranges::-webkit-scrollbar { display: none; }
.ranges button {
  flex: none; border: 0; background: none; padding: 6px 10px; border-radius: 999px;
  color: var(--muted); cursor: pointer; font-size: 15px;
}
.ranges button:hover { color: var(--text); }
.ranges button[aria-pressed="true"] { background: var(--text); color: var(--bg); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.filters input[type="search"], .filters select {
  height: 36px; border: 0; border-radius: var(--radius); background: var(--field);
  padding: 0 10px; font-size: 15px; min-width: 0;
}
.filters .search { flex: 1 1 180px; display: flex; }
.filters .search input { width: 100%; }
.filters select { max-width: 100%; }
.filters .check { display: inline-flex; gap: 6px; align-items: center; font-size: 15px; color: var(--muted); cursor: pointer; }
.filters .check input { width: 16px; height: 16px; accent-color: var(--text); }

.summary { color: var(--faint); font-size: 14px; margin: 14px 0 0; min-height: 20px; }

.day { margin-top: 18px; }
.day h2 {
  position: sticky; top: var(--controls-height, 104px); z-index: 2; background: var(--bg);
  font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted); margin: 0; padding: 10px 0 6px;
}
.day ol { list-style: none; margin: 0; padding: 0; }

.event { border-top: 1px solid var(--line); }
.event:first-child { border-top: 0; }
.event > button {
  display: grid; grid-template-columns: 76px 1fr; gap: 12px; width: 100%;
  text-align: left; background: none; border: 0; padding: 12px 0; cursor: pointer;
}
.event .body > span { display: block; }
.event .time { color: var(--muted); font-size: 15px; padding-top: 1px; }
.event .title { font-weight: 600; font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.event .meta { color: var(--muted); font-size: 14px; margin-top: 2px; overflow-wrap: anywhere; }
.event .meta span + span::before { content: " · "; color: var(--faint); }
.event .status { color: var(--alert); font-weight: 600; text-transform: capitalize; }
.event.cancelled .title { text-decoration: line-through; color: var(--muted); }
.event .repeat { color: var(--faint); font-size: 13px; margin-top: 2px; }

.details { padding: 0 0 14px 88px; font-size: 14px; }
.details[hidden] { display: none; }
.details p { margin: 0 0 8px; color: var(--muted); }
.details .links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 8px; }
.details .links a, .details .links button {
  background: none; border: 0; padding: 0; cursor: pointer; color: var(--accent); text-decoration: none; font-size: 14px;
}
.details .links a:hover, .details .links button:hover { text-decoration: underline; }
.details ul { list-style: none; margin: 0 0 8px; padding: 0; color: var(--muted); columns: 2; column-gap: 20px; }
.details li { break-inside: avoid; }

.state { color: var(--muted); padding: 24px 0; }
.state button {
  margin-left: 8px; border: 1px solid var(--line); background: none; border-radius: var(--radius);
  padding: 4px 10px; cursor: pointer;
}
.more { display: block; margin: 20px auto 0; border: 1px solid var(--line); background: none;
  border-radius: 999px; padding: 8px 16px; cursor: pointer; color: var(--muted); }
.more:hover { color: var(--text); }

.prose h1 { font-size: 26px; letter-spacing: -0.01em; margin: 8px 0 12px; }
.prose p { color: var(--muted); max-width: 62ch; }
.sources { margin-top: 24px; border-top: 1px solid var(--line); }
.sources .row {
  display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.sources .row span { color: var(--faint); font-size: 14px; text-align: right; }

.bottom { color: var(--faint); font-size: 13px; padding-top: 40px; padding-bottom: 40px; }
.bottom p { margin: 4px 0; }

@media (max-width: 560px) {
  .top { padding-top: 18px; padding-bottom: 12px; }
  .event > button { grid-template-columns: 62px 1fr; gap: 10px; }
  .event .body > span { display: block; }
.event .time { font-size: 14px; }
  .details { padding-left: 72px; }
  .details ul { columns: 1; }
  .controls { position: static; }
  .day h2 { top: 0; }
  .filters label:not(.search):not(.check) { flex: 1 1 0; min-width: 0; }
  .filters select { width: 100%; }
  .filters .search { flex-basis: 100%; }
}
