@font-face {
  font-family: "Newsreader"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/newsreader-latin.woff2") format("woff2"); /* SIL Open Font License 1.1 */
}
:root {
  --bg: #f7f6f2;
  --ink: #141923;
  --soft: #4b5563;
  --line: #d9d5c9;
  --accent: #11325f;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font: 1rem/1.6 var(--sans); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: #fff; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; text-wrap: balance; margin: 0; }
p { text-wrap: pretty; }
code { font-family: var(--mono); font-size: 0.88em; }
.page { max-width: 1040px; margin: 0 auto; padding: 0 1.5rem 4rem; }

.masthead {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline;
  gap: 0.5rem 1.5rem; padding: 1.5rem 0 1rem; border-bottom: 1px solid var(--line);
}
.masthead .brand { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; text-decoration: none; color: var(--ink); }
.masthead nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; font-size: 0.95rem; }
.masthead nav a, .masthead nav span { color: var(--soft); text-decoration: none; padding: 0.4rem 0; }
.masthead nav a:hover { color: var(--accent); text-decoration: underline; }

.hero { padding: 4rem 0 3rem; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.5rem); line-height: 1.02; letter-spacing: -0.02em; }
.hero .lead { margin: 1.5rem 0 0; max-width: 58ch; font-family: var(--serif); font-size: 1.3rem; line-height: 1.45; color: var(--soft); }
.meta { margin: 0.9rem 0 0; font-size: 0.9rem; color: var(--soft); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin-top: 2rem; }
.btn {
  display: inline-block; padding: 0.7rem 1.15rem; border-radius: 4px; text-decoration: none;
  font-weight: 600; background: var(--accent); color: #fff;
}
.btn:hover { background: var(--ink); }

/* Desktop overview of the route. On narrow screens the index rail below carries it. */
.route { list-style: none; margin: 0; padding: 0; display: flex; position: relative; }
.route::before { content: ""; position: absolute; left: 5.5%; right: 5.5%; top: 0.95rem; border-top: 1.5px solid var(--ink); }
.route li { flex: 1; text-align: center; position: relative; transition: opacity 0.2s; }
.route li.dim { opacity: 0.3; }
.route a { display: block; text-decoration: none; color: var(--ink); font-size: 0.85rem; font-weight: 600; line-height: 1.3; }
.route a:hover .dot { background: var(--ink); border-color: var(--ink); color: #fff; }
.route small { display: block; font-weight: 400; color: var(--soft); font-size: 0.78rem; }
.route .dot { margin: 0 auto 0.5rem; }
@media (max-width: 760px) { .route { display: none; } }

.dot {
  width: 1.9rem; height: 1.9rem; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700; background: var(--accent); color: #fff; border: 1.5px solid var(--accent);
}
.wip .dot { background: var(--bg); color: var(--ink); border: 1.5px dashed var(--ink); }
.bonus .dot { background: var(--bg); color: var(--ink); border-color: var(--ink); }

section.band { margin-top: 4rem; padding-top: 1rem; border-top: 2px solid var(--ink); }
section.band h2 { font-size: 1.9rem; line-height: 1.15; letter-spacing: -0.01em; }
section.band .sub { margin: 0.6rem 0 0; color: var(--soft); max-width: 66ch; }

.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.5rem 0 0; }
.filter-btn {
  border: 1px solid var(--line); background: none; color: var(--soft);
  padding: 0.35rem 0.8rem; border-radius: 999px; font: inherit; font-size: 0.875rem; cursor: pointer;
}
.filter-btn:hover { border-color: var(--ink); color: var(--ink); }
.filter-btn[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
@media (pointer: coarse) { .filter-btn { min-height: 44px; padding-inline: 1rem; } }
.filter-status { margin: 0.75rem 0 0; font-size: 0.875rem; color: var(--soft); }

.stops { list-style: none; margin: 1rem 0 0; padding: 0; position: relative; }
.stops::before { content: ""; position: absolute; left: 0.95rem; top: 2rem; bottom: 2rem; border-left: 1.5px solid var(--line); }
.stop {
  display: grid; grid-template-columns: 3.25rem 1fr 11rem; gap: 0 1.25rem; align-items: start;
  padding: 1.75rem 0; border-bottom: 1px solid var(--line); position: relative;
}
.stop[hidden] { display: none; }
.stop h3 { font-size: 1.5rem; line-height: 1.2; }
.stop h3 a { color: var(--ink); text-decoration: none; }
.stop h3 a:hover { color: var(--accent); text-decoration: underline; }
.stop .meta { margin: 0.3rem 0 0; }
.stop .problem { margin: 0.75rem 0 0; max-width: 64ch; color: var(--soft); }
.stop .proof { margin: 0.75rem 0 0; max-width: 64ch; }
.stop-links { display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.95rem; padding-top: 0.35rem; }
.stop-links a:first-child { font-weight: 600; }
.stop-links span { color: var(--soft); }
@media (max-width: 760px) {
  .stop { grid-template-columns: 2.75rem 1fr; }
  .stop-links { grid-column: 2; flex-direction: row; flex-wrap: wrap; gap: 0.25rem 1.5rem; margin-top: 0.75rem; }
  .stop-links a, .stop-links span { padding: 0.5rem 0; }
}

.ruled { display: grid; grid-template-columns: 1fr 1fr; gap: 0 3rem; margin: 1.5rem 0 0; }
.ruled > div { padding: 1.1rem 0; border-top: 1px solid var(--line); }
.ruled h3 { font-size: 1.25rem; line-height: 1.25; }
.ruled h3 a { color: var(--ink); }
.ruled p { margin: 0.4rem 0 0; color: var(--soft); max-width: 60ch; }
.ruled ul { margin: 0.6rem 0 0; padding-left: 1.1rem; }
.ruled li { margin-bottom: 0.5rem; max-width: 60ch; }
@media (max-width: 760px) { .ruled { grid-template-columns: 1fr; } }

table.scorecard { width: 100%; border-collapse: collapse; margin-top: 1.25rem; }
table.scorecard th, table.scorecard td { text-align: left; vertical-align: top; padding: 0.8rem 1rem 0.8rem 0; border-top: 1px solid var(--line); }
table.scorecard th { width: 32%; font-weight: 600; }
@media (max-width: 560px) {
  table.scorecard th, table.scorecard td { display: block; width: auto; }
  table.scorecard td { border-top: 0; padding-top: 0; }
}
.limits { margin: 1.25rem 0 0; padding-left: 1.1rem; max-width: 70ch; }
.limits li { margin-bottom: 0.6rem; }

.contact p { margin: 0.75rem 0 0; max-width: 60ch; color: var(--soft); }
.contact .email { font-family: var(--serif); font-size: clamp(1.4rem, 4.5vw, 2rem); color: var(--accent); overflow-wrap: anywhere; }

.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 4rem; padding-top: 1rem; border-top: 1px solid var(--line); font-weight: 600; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1rem; margin-top: 4rem; font-size: 0.9rem; color: var(--soft); }
