:root {
  color-scheme: light;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --surface-3: #e2e7ee;
  --text: #1c2430;
  --text-muted: #5c6675;
  --border: rgba(16, 24, 40, 0.1);
  --border-strong: rgba(16, 24, 40, 0.18);
  --shadow: 0 6px 20px rgba(15, 23, 42, 0.14);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05), 0 2px 10px rgba(15, 23, 42, 0.05);
  --radius: 12px;
  --radius-sm: 8px;
  --accent: #256abf;
  --accent-hover: #1c5cab;
  --accent-ink: #ffffff;
  --accent-soft: rgba(42, 120, 214, 0.1);
  --accent-line: rgba(42, 120, 214, 0.35);
  --focus: #2a78d6;
  --warn-soft: rgba(250, 178, 25, 0.16);
  --warn-line: #c98500;
  --grid: #e6e9ee;
  --axis: #c3c8d0;
  --series-wk: #2a78d6;
  --series-sa: #eb6834;
  --series-su: #1baf7a;
  --ramp-1: #86b6ef;
  --ramp-2: #5598e7;
  --ramp-3: #256abf;
  --ramp-4: #184f95;
  --ramp-5: #0d366b;
  --tooltip-bg: rgba(17, 23, 33, 0.94);
  --tooltip-text: #f5f7fa;
  --header-h: 64px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #12161d;
  --surface: #1e242e;
  --surface-2: #2a3240;
  --surface-3: #343d4d;
  --text: #e7ebf1;
  --text-muted: #98a2b3;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 10px rgba(0, 0, 0, 0.2);
  --accent: #6da7ec;
  --accent-hover: #86b6ef;
  --accent-ink: #0b1524;
  --accent-soft: rgba(109, 167, 236, 0.14);
  --accent-line: rgba(109, 167, 236, 0.4);
  --focus: #86b6ef;
  --warn-soft: rgba(250, 178, 25, 0.12);
  --warn-line: #fab219;
  --grid: #2c3340;
  --axis: #465063;
  --series-wk: #3987e5;
  --series-sa: #d95926;
  --series-su: #199e70;
  --ramp-1: #184f95;
  --ramp-2: #2a78d6;
  --ramp-3: #5598e7;
  --ramp-4: #9ec5f4;
  --ramp-5: #cde2fb;
  --tooltip-bg: rgba(42, 50, 64, 0.97);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #12161d;
    --surface: #1e242e;
    --surface-2: #2a3240;
    --surface-3: #343d4d;
    --text: #e7ebf1;
    --text-muted: #98a2b3;
    --border: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.16);
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 10px rgba(0, 0, 0, 0.2);
    --accent: #6da7ec;
    --accent-hover: #86b6ef;
    --accent-ink: #0b1524;
    --accent-soft: rgba(109, 167, 236, 0.14);
    --accent-line: rgba(109, 167, 236, 0.4);
    --focus: #86b6ef;
    --warn-soft: rgba(250, 178, 25, 0.12);
    --warn-line: #fab219;
    --grid: #2c3340;
    --axis: #465063;
    --series-wk: #3987e5;
    --series-sa: #d95926;
    --series-su: #199e70;
    --ramp-1: #184f95;
    --ramp-2: #2a78d6;
    --ramp-3: #5598e7;
    --ramp-4: #9ec5f4;
    --ramp-5: #cde2fb;
    --tooltip-bg: rgba(42, 50, 64, 0.97);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(1.85rem, 1.3rem + 2.2vw, 2.6rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.7rem);
}

h3 {
  font-size: 1.125rem;
}

h4 {
  font-size: 1rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--accent-hover);
}

img,
svg {
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 3000;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
  color: var(--accent-ink);
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

.narrow {
  max-width: 820px;
}

.muted {
  color: var(--text-muted);
}

.nowrap {
  white-space: nowrap;
}

.num {
  font-variant-numeric: tabular-nums;
}

[hidden] {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1500;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.site-nav {
  margin-left: auto;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.94rem;
  font-weight: 550;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.site-nav a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.icon-btn:hover {
  background: var(--surface-2);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

.menu-toggle {
  display: none;
}

@media (max-width: 960px) {
  .menu-toggle {
    display: inline-grid;
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    margin: 0;
    padding: 12px 20px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }

  .site-nav.open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav a {
    padding: 12px 14px;
    font-size: 1rem;
  }

  .header-actions {
    margin-left: auto;
  }
}

@media (max-width: 420px) {
  .brand-sub {
    display: none;
  }
}

.page-head {
  padding: 40px 0 28px;
}

.page-head h1 {
  margin-bottom: 12px;
}

.lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 70ch;
  margin-bottom: 0;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.breadcrumbs li {
  display: flex;
  align-items: center;
}

.breadcrumbs li + li::before {
  content: "/";
  margin: 0 8px;
  color: var(--axis);
}

.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.75rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.section {
  padding: 28px 0;
}

.section-tight {
  padding: 12px 0;
}

.section-head {
  margin-bottom: 20px;
  max-width: 74ch;
}

.section-head p {
  color: var(--text-muted);
  margin: 0;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  min-width: 0;
}

.card > :last-child {
  margin-bottom: 0;
}

.card h3 {
  margin-bottom: 8px;
}

.card p {
  color: var(--text-muted);
}

.card-link {
  display: flex;
  flex-direction: column;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.card-link:hover {
  color: var(--text);
  border-color: var(--accent-line);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.card-link .card-cta {
  margin-top: auto;
  padding-top: 8px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.94rem;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}

.card-icon svg {
  width: 22px;
  height: 22px;
}

.label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.stat-value {
  display: block;
  margin-top: 6px;
  font-size: 1.6rem;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.stat-value small {
  font-size: 0.95rem;
  font-weight: 550;
  color: var(--text-muted);
  margin-left: 2px;
}

.stat-note {
  display: block;
  margin-top: 4px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  font-size: 0.97rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--accent-ink);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--surface-2);
  color: var(--text);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero {
  padding: 56px 0 36px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 40px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.hero h1 {
  font-size: clamp(2rem, 1.3rem + 2.8vw, 3rem);
  margin-bottom: 16px;
}

.hero .lead {
  margin-bottom: 24px;
}

.hero-panel {
  padding: 24px;
}

.search {
  position: relative;
  display: flex;
  gap: 8px;
}

.search-field {
  position: relative;
  flex: 1;
  min-width: 0;
}

.search-field svg {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}

.search-field .input {
  padding-left: 42px;
}

.input::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

.input:focus {
  outline: 2px solid var(--focus);
  outline-offset: 0;
  border-color: transparent;
}

select.input {
  padding-right: 36px;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 600;
}

.hint {
  margin-top: 8px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.route-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.3em;
  height: 1.75em;
  padding: 0 0.5em;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

a.route-badge:hover {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}

.route-badge-lg {
  min-width: 2.6em;
  height: 2.2em;
  font-size: 1.05rem;
  border-radius: 8px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 1.7em;
  padding: 0 0.6em;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.tag-neutral {
  background: var(--surface-2);
  color: var(--text-muted);
}

.meta-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.meta-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-list strong {
  color: var(--text);
  font-weight: 600;
}

.seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.seg button {
  min-height: 36px;
  padding: 6px 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.seg button:hover {
  color: var(--text);
}

.seg button[aria-selected="true"],
.seg button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.seg button small {
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 4px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-bottom: 18px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 4px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.pill:hover {
  background: var(--surface-2);
}

.pill[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent);
  font-weight: 600;
}

.pill .route-badge {
  height: 1.55em;
  font-size: 0.78rem;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.data-table caption {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.86rem;
  color: var(--text-muted);
  caption-side: bottom;
  border-top: 1px solid var(--border);
}

.data-table th,
.data-table td {
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table thead th {
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--surface-2);
  white-space: nowrap;
}

.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: color-mix(in srgb, var(--surface-2) 55%, transparent);
}

.data-table .num,
.data-table th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.data-table a {
  font-weight: 550;
}

.data-table .sub {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.timetable {
  font-size: 0.9rem;
}

.timetable th,
.timetable td {
  padding: 7px 12px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.timetable thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  vertical-align: bottom;
  white-space: normal;
  min-width: 110px;
  max-width: 160px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.8rem;
  line-height: 1.3;
  color: var(--text);
}

.timetable thead th a {
  font-weight: 600;
}

.timetable thead th .label {
  margin-top: 3px;
  font-size: 0.68rem;
}

.timetable tbody td {
  text-align: right;
}

.timetable td.none {
  color: var(--axis);
  text-align: center;
}

.timetable .nd {
  font-style: italic;
  color: var(--text-muted);
}

.timetable-scroll {
  max-height: 640px;
  overflow: auto;
}

.board {
  width: 100%;
  border-collapse: collapse;
}

.board caption {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.86rem;
  color: var(--text-muted);
  caption-side: bottom;
  border-top: 1px solid var(--border);
}

.board th {
  width: 92px;
  padding: 10px 12px 10px 16px;
  text-align: right;
  vertical-align: top;
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.board th .nd-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 550;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.board td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.board tr:last-child th,
.board tr:last-child td {
  border-bottom: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 4px 0 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
  line-height: 1;
}

.chip-time {
  font-weight: 650;
}

.chip-route {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 22px;
  padding: 0 5px;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.chip.is-next {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset;
}

.chip.is-past {
  opacity: 0.45;
}

.board-row-empty {
  display: none;
}

.service-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.next-card {
  border-left: 4px solid var(--accent);
}

.next-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  margin-bottom: 12px;
}

.next-head h2 {
  margin: 0;
  font-size: 1.2rem;
}

.next-clock {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.next-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.next-item {
  display: grid;
  grid-template-columns: 150px auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.next-item:last-child {
  border-bottom: 0;
}

.next-time {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.next-dest {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.next-eta {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .next-item {
    grid-template-columns: 78px auto minmax(0, 1fr);
  }

  .next-eta {
    grid-column: 3;
  }

  .next-dest {
    white-space: normal;
  }
}

.meter {
  position: relative;
  height: 8px;
  margin-top: 10px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ramp-1), var(--ramp-3), var(--ramp-5));
}

.meter-caption {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.notice {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--text);
  font-size: 0.94rem;
}

.notice svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--accent);
}

.notice p {
  margin: 0;
}

.notice p + p {
  margin-top: 6px;
}

.notice-warn {
  border-color: var(--warn-line);
  background: var(--warn-soft);
}

.notice-warn svg {
  color: var(--warn-line);
}

.notice strong {
  font-weight: 650;
}

.prose {
  max-width: 74ch;
}

.prose h2 {
  margin-top: 1.8em;
}

.prose h3 {
  margin-top: 1.5em;
}

.prose > :first-child {
  margin-top: 0;
}

.prose ul,
.prose ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose li::marker {
  color: var(--text-muted);
}

.formula {
  margin: 1.2em 0;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 0.98rem;
  overflow-x: auto;
  white-space: nowrap;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--surface-2);
}

.toc {
  padding: 18px 20px;
  margin-bottom: 28px;
}

.toc ol {
  margin: 8px 0 0;
  padding-left: 1.3em;
}

.toc li {
  margin: 4px 0;
}

.layout-aside {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 40px;
  align-items: start;
}

.layout-aside aside {
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

@media (max-width: 960px) {
  .layout-aside {
    grid-template-columns: minmax(0, 1fr);
  }

  .layout-aside aside {
    position: static;
  }
}

.glossary dt {
  margin-top: 1.4em;
  font-weight: 650;
  font-size: 1.06rem;
}

.glossary dd {
  margin: 0.35em 0 0;
  color: var(--text);
}

.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}

.faq summary {
  position: relative;
  padding: 16px 48px 16px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.15s;
}

.faq details[open] summary::after {
  transform: translateY(-30%) rotate(225deg);
}

.faq .answer {
  padding: 0 20px 16px;
}

.faq .answer > :last-child {
  margin-bottom: 0;
}

.list-plain {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.rank-list li:last-child {
  border-bottom: 0;
}

.rank-list a {
  font-weight: 550;
  min-width: 0;
}

.rank-list .value {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.route-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.route-card h3 {
  margin: 2px 0 4px;
  font-size: 1.04rem;
}

.route-card p {
  margin: 0 0 10px;
  font-size: 0.92rem;
}

.route-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.84rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.route-facts strong {
  color: var(--text);
  font-weight: 650;
}

.stop-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: stop;
}

.stop-list li {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 0 7px 30px;
  font-size: 0.94rem;
}

.stop-list li::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent-line);
}

.stop-list li:first-child::before {
  top: 50%;
}

.stop-list li:last-child::before {
  bottom: 50%;
}

.stop-list li::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
}

.stop-list li.tp::after {
  background: var(--accent);
}

.stop-list .stop-id {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hour-bars {
  display: grid;
  grid-template-columns: repeat(var(--cols, 24), minmax(0, 1fr));
  align-items: end;
  gap: 2px;
  height: 92px;
  padding-top: 6px;
}

.hour-bars span {
  display: block;
  min-height: 0;
  border-radius: 4px 4px 0 0;
  background: var(--series-wk);
  max-width: 24px;
  width: 100%;
  justify-self: center;
}

.hour-bars span.zero {
  background: transparent;
}

.hour-axis {
  display: grid;
  grid-template-columns: repeat(var(--cols, 24), minmax(0, 1fr));
  gap: 2px;
  margin-top: 4px;
  border-top: 1px solid var(--axis);
  padding-top: 4px;
  font-size: 0.68rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.hour-axis span {
  text-align: center;
  white-space: nowrap;
  overflow: visible;
}

.chart {
  position: relative;
}

.chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart .grid-line {
  stroke: var(--grid);
  stroke-width: 1;
  shape-rendering: crispEdges;
}

.chart .axis-line {
  stroke: var(--axis);
  stroke-width: 1;
  shape-rendering: crispEdges;
}

.chart .tick {
  fill: var(--text-muted);
  font-size: 11px;
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
}

.chart .axis-title {
  fill: var(--text-muted);
  font-size: 11px;
  font-family: var(--font);
}

.chart .direct-label {
  fill: var(--text);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
}

.chart .value-label {
  fill: var(--text-muted);
  font-size: 11px;
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
}

.chart .series-line {
  fill: none;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.chart .crosshair {
  stroke: var(--axis);
  stroke-width: 1;
}

.chart .hover-dot {
  stroke: var(--surface);
  stroke-width: 2;
}

.chart .bar {
  transition: opacity 0.12s;
}

.chart .bar.dim {
  opacity: 0.55;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
  color: var(--text);
}

.chart-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.key-line {
  display: inline-block;
  width: 16px;
  height: 2px;
  border-radius: 1px;
}

.key-rect {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.chart-tooltip {
  position: absolute;
  z-index: 20;
  min-width: 140px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  background: var(--tooltip-bg);
  color: var(--tooltip-text);
  box-shadow: var(--shadow);
  font-size: 12px;
  line-height: 1.45;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s;
}

.chart-tooltip.show {
  opacity: 1;
}

.chart-tooltip .tt-title {
  margin-bottom: 4px;
  font-weight: 600;
  opacity: 0.85;
}

.chart-tooltip .tt-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}

.chart-tooltip .tt-row strong {
  min-width: 34px;
  font-weight: 700;
}

.chart-tooltip .tt-row .key-line {
  width: 12px;
}

.table-view {
  margin-top: 14px;
}

.table-view summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
}

.table-view[open] summary {
  margin-bottom: 12px;
}

.ramp-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ramp-bar {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right, var(--ramp-1), var(--ramp-2), var(--ramp-3), var(--ramp-4), var(--ramp-5));
}

.ramp-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.map-page main {
  display: flex;
  flex-direction: column;
}

.map-shell {
  position: relative;
  height: calc(100vh - var(--header-h));
  height: calc(100dvh - var(--header-h));
  min-height: 480px;
  border-bottom: 1px solid var(--border);
}

#map {
  position: absolute;
  inset: 0;
  background: var(--surface-2);
}

.map-toolbar {
  position: absolute;
  top: 14px;
  left: 60px;
  right: 60px;
  z-index: 1000;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.map-toolbar > * {
  pointer-events: auto;
}

.map-toolbar .seg {
  background: var(--surface);
  box-shadow: var(--shadow);
}

.map-toolbar .seg button[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: none;
}

.map-toolbar select.input {
  width: auto;
  min-height: 42px;
  max-width: 260px;
  border-color: transparent;
  box-shadow: var(--shadow);
  font-size: 0.92rem;
}

.map-status {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 12px;
}

@media (max-width: 640px) {
  .map-toolbar {
    left: 54px;
    right: 10px;
    top: 10px;
  }

  .map-toolbar select.input {
    max-width: 100%;
  }
}

.leaflet-container {
  font-family: var(--font);
}

.leaflet-bar,
.leaflet-touch .leaflet-bar {
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.leaflet-bar a,
.leaflet-touch .leaflet-bar a {
  background: var(--surface);
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.leaflet-bar a:first-child {
  border-top-left-radius: var(--radius-sm);
  border-top-right-radius: var(--radius-sm);
}

.leaflet-bar a:last-child {
  border-bottom-left-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
  border-bottom: none;
}

.leaflet-bar a:hover,
.leaflet-bar a:focus {
  background: var(--surface-2);
  color: var(--text);
}

.leaflet-bar a.leaflet-disabled {
  background: var(--surface);
  color: var(--text-muted);
  opacity: 0.6;
}

.leaflet-control-layers,
.leaflet-touch .leaflet-control-layers {
  border: none;
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font: 13px/1.6 var(--font);
}

.leaflet-control-layers-expanded {
  padding: 8px 12px;
}

:root[data-theme="dark"] .leaflet-control-layers-toggle {
  filter: invert(1);
}

.leaflet-control-attribution,
.leaflet-container .leaflet-control-attribution {
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  color: var(--text-muted);
  font: 11px/1.5 var(--font);
}

.leaflet-control-attribution a {
  color: inherit;
}

.map-legend {
  min-width: 200px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font: 12px/1.35 var(--font);
  color: var(--text);
}

.map-legend h2 {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.map-legend .ramp-bar {
  width: 180px;
}

.map-legend .sizes {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-top: 10px;
}

.map-legend .sizes div {
  text-align: center;
}

.map-legend .dot {
  display: block;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--text);
  opacity: 0.2;
}

.map-legend .lab {
  margin-top: 4px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.map-legend .note {
  margin-top: 8px;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .map-legend {
    min-width: 0;
    padding: 10px 12px;
  }

  .map-legend .ramp-bar {
    width: 140px;
  }

  .map-legend .sizes {
    display: none;
  }
}

.map-tooltip.leaflet-tooltip {
  padding: 7px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--tooltip-bg);
  color: var(--tooltip-text);
  box-shadow: var(--shadow);
  font: 12px/1.4 var(--font);
}

.map-tooltip.leaflet-tooltip-top::before {
  border-top-color: var(--tooltip-bg);
}

.info-panel {
  position: absolute;
  right: 14px;
  top: 70px;
  z-index: 1200;
  width: 290px;
  max-width: calc(100% - 28px);
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.4;
  color: var(--text);
  opacity: 0;
  transform: translateX(10px);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.info-panel.open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  visibility: visible;
}

.info-panel h2 {
  margin: 0 0 2px;
  padding-right: 28px;
  font-size: 15px;
}

.info-panel .panel-sub {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
}

.info-panel .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin: 7px 0;
}

.info-panel .row span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.info-panel .row strong {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.info-panel .badges {
  margin-top: 10px;
}

.info-panel .btn {
  width: 100%;
  margin-top: 14px;
  min-height: 40px;
  font-size: 0.9rem;
}

.info-panel .close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.info-panel .close svg {
  width: 16px;
  height: 16px;
}

.info-panel .close:hover,
.info-panel .close:focus-visible {
  background: var(--surface-2);
  color: var(--text);
}

@media (max-width: 640px) {
  .info-panel {
    top: auto;
    bottom: 14px;
    right: 14px;
    left: 14px;
    width: auto;
    max-width: none;
  }
}

.site-footer {
  margin-top: 56px;
  padding: 44px 0 28px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.92rem;
}

.map-page .site-footer {
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
}

@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-about {
    grid-column: 1 / -1;
  }
}

.footer-about p {
  margin: 12px 0 0;
  color: var(--text-muted);
  max-width: 46ch;
}

.footer-col h2 {
  margin: 0 0 12px;
  font-size: 0.75rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col li {
  margin: 8px 0;
}

.footer-col a {
  color: var(--text);
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.84rem;
}

.footer-bottom p {
  margin: 0;
}

.error-hero {
  padding: 80px 0 40px;
  text-align: center;
}

.error-code {
  display: block;
  font-size: clamp(4rem, 3rem + 6vw, 7rem);
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--accent);
}

.error-hero .lead {
  margin: 12px auto 28px;
}

.error-hero .btn-row {
  justify-content: center;
}

.error-hero .search {
  max-width: 520px;
  margin: 28px auto 0;
}

.result-count {
  margin: 0 0 12px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.finder-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

@media (max-width: 620px) {
  .finder-controls {
    grid-template-columns: minmax(0, 1fr);
  }
}

.distance {
  display: none;
}

.has-distance .distance {
  display: table-cell;
}

.spacer-top {
  margin-top: 24px;
}

.spacer-bottom {
  margin-bottom: 24px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

@media (max-width: 860px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
}

.kv {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 16px;
  margin: 0;
  font-size: 0.94rem;
}

.kv dt {
  color: var(--text-muted);
}

.kv dd {
  margin: 0;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}

@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .toolbar,
  .next-card,
  .btn-row {
    display: none !important;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  .card,
  .stat,
  .table-wrap {
    box-shadow: none;
    border-color: #cccccc;
  }

  .day-panel[hidden] {
    display: block !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

.js .tab-panel:not(.is-active) {
  display: none;
}

html:not(.js) [role="tablist"],
html:not(.js) [data-filter-group] {
  display: none;
}

html:not(.js) .tab-panel + .tab-panel {
  margin-top: 24px;
}

html:not(.js) .tab-panel > h3.sr-only {
  position: static;
  width: auto;
  height: auto;
  margin: 0 0 12px;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

.ramp-ticks {
  position: relative;
  height: 18px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.ramp-ticks span {
  position: absolute;
  top: 0;
  white-space: nowrap;
}

.hour-chart {
  margin-top: 6px;
}

.tiles-light {
  filter: grayscale(1) brightness(1.05) contrast(0.88);
}

.tiles-dark {
  filter: invert(1) hue-rotate(180deg) grayscale(0.55) brightness(0.88) contrast(0.88);
}

.map-legend .ramp-ticks {
  width: 180px;
}

.card .stat-value {
  color: var(--text);
}

@media (max-width: 640px) {
  .map-legend .ramp-ticks {
    width: 140px;
  }
}
