:root {
  color-scheme: light dark;
  --bg: #fbfaf7;
  --fg: #1e1f22;
  --muted: #5d6166;
  --line: #e2ded6;
  --accent: #2f5d50;
  --card: #f3f0ea;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181a;
    --fg: #e8e6e1;
    --muted: #9aa0a6;
    --line: #2a2e31;
    --accent: #7fc4ae;
    --card: #1d2022;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
header, main, footer { max-width: 52rem; margin: 0 auto; padding: 0 1.25rem; }
header {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-top: 1.75rem; padding-bottom: 1rem; gap: 1rem; flex-wrap: wrap;
}
.brand { font-weight: 650; font-size: 1.15rem; color: var(--fg); text-decoration: none; }
nav a { color: var(--muted); text-decoration: none; margin-left: 1.1rem; }
a { color: var(--accent); }
a:hover { text-decoration: underline; }
h1 { font-size: 1.7rem; line-height: 1.25; margin: .5rem 0 .5rem; font-weight: 650; }
h2 { font-size: 1.05rem; margin: 1.75rem 0 .35rem; font-weight: 600; }
p { margin: .45rem 0; }
.lead { color: var(--muted); }
.controls {
  display: grid; gap: .5rem; margin: 1.25rem 0 .5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 34rem) {
  .controls { grid-template-columns: 1fr 11rem 9rem; }
}
input[type="search"], select, button {
  font: inherit; color: var(--fg); background: var(--card);
  border: 1px solid var(--line); border-radius: .5rem; padding: .5rem .65rem;
}
input[type="search"] { min-width: 0; }
button { cursor: pointer; }
button:hover { border-color: var(--accent); }
.stations { list-style: none; margin: 1rem 0 0; padding: 0; }
.stations li {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "name coords" "brand coords" "addr coords" "meta coords";
  gap: .1rem .75rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--line);
}
.st-name { grid-area: name; font-weight: 550; }
.st-brand { grid-area: brand; color: var(--muted); font-size: .85rem; }
.st-addr { grid-area: addr; font-size: .92rem; }
.st-meta { grid-area: meta; color: var(--muted); font-size: .8rem; }
.st-coords { grid-area: coords; align-self: center; font-size: .82rem; white-space: nowrap; }
.more { margin: 1.25rem 0 2rem; text-align: center; }
footer {
  margin-top: 2.5rem; padding-top: 1rem; padding-bottom: 2.5rem;
  border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
code { font-size: .9em; background: var(--card); padding: .05em .3em; border-radius: .25em; }
