:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #191919;
  --text-2: #5f6368;
  --border: #e3e5e8;
  --accent: #257de0;
  --accent-strong: #0b4f9c;
  --grid: #eceef1;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111213;
    --surface: #191919;
    --text: #efefef;
    --text-2: #9c9c9c;
    --border: #2c2e31;
    --accent: #338ced;
    --accent-strong: #8cc0ff;
    --grid: #26282b;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111213;
  --surface: #191919;
  --text: #efefef;
  --text-2: #9c9c9c;
  --border: #2c2e31;
  --accent: #338ced;
  --accent-strong: #8cc0ff;
  --grid: #26282b;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.site-header, main, footer { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.site-header { padding-top: 24px; }
h1 { font-size: 1.6rem; margin: 0 0 4px; }
h2 { font-size: 1.2rem; margin: 32px 0 4px; }
.sub, .muted { color: var(--text-2); margin: 0; }
.muted { font-size: 0.9rem; }
footer { padding-top: 32px; padding-bottom: 32px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.route-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 20px 0 8px; }
.route-card {
  text-align: left; cursor: pointer; font: inherit; color: inherit;
  background: var(--surface); border: 2px solid var(--border); border-radius: 12px; padding: 14px 16px;
}
.route-card[aria-selected="true"] { border-color: var(--accent); }
.route-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.route-card .route { font-weight: 600; }
.route-card .price { font-size: 1.5rem; font-weight: 700; margin: 4px 0 0; font-variant-numeric: tabular-nums; }
.route-card .when { color: var(--text-2); font-size: 0.875rem; }

.chart-box { position: relative; height: 260px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-top: 12px; }
.chart-box.tall { height: 300px; }

.notice { background: var(--surface); border: 1px dashed var(--border); border-radius: 12px; padding: 16px; margin-top: 16px; color: var(--text-2); }

.table-view { margin-top: 12px; }
.table-view summary { cursor: pointer; color: var(--accent-strong); }
table { width: 100%; border-collapse: collapse; margin-top: 8px; background: var(--surface); }
th, td { padding: 8px; border-bottom: 1px solid var(--border); text-align: left; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr { cursor: pointer; }
tbody tr:hover, tbody tr.selected { background: var(--grid); }
