:root {
  color-scheme: light dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #20313b;
  background: #f4f7f7;
  --surface: #fff;
  --muted: #526771;
  --line: #dbe5e6;
  --soft: #f7fafa;
  --accent: #006d70;
  --brand-mark-fg: #fff;
  --on-time: #176447;
  --on-time-bg: #e7f4ec;
  --minor: #785000;
  --minor-bg: #fff3d6;
  --major: #a62f36;
  --major-bg: #fcebed;
  --finder-bg: #dcecea;
  --finder-fg: #20313b;
  --finder-muted: #425e61;
  --finder-outline: #668986;
  --finder-action: #64d0bb;
  --finder-action-fg: #143c36;
  --finder-action-border: #236d62;
  --table-head-bg: #e2ebef;
  --footer-bg: #e4ebec;
  --heat-0: #d7edf6;
  --heat-1: #9dcce0;
  --heat-2: #36749c;
  --heat-3: #153f63;
  --heat-empty: #f5f7f7;
  --heat-sparse-bg: #e9f0f1;
  --heat-sparse-line: #9bb2ba;
  --heat-border: #c2d0d5;
  --train: #4a3fb0;
  --train-fg: #fff;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 16px; line-height: 1.45; text-align: left; }
h1, h2, p, dl, dd { margin: 0; }
h1 { font-size: 32px; line-height: 1.15; letter-spacing: -.035em; }
h2 { font-size: 20px; line-height: 1.3; letter-spacing: -.02em; }
a { color: inherit; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.shell { width: min(100% - 64px, 1100px); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.brand-row { padding-block: var(--space-1); }
.brand { display: inline-flex; align-items: center; gap: var(--space-1); font-weight: 750; text-decoration: none; letter-spacing: -.02em; }
.brand-mark { width: 28px; height: 28px; color: var(--accent); flex: none; }
/* Matches static/icons/favicon.svg, including its dark-mode colours. */
.brand-mark-line { stroke: var(--brand-mark-fg); }
.wordmark-light { color: var(--muted); font-weight: 400; }
.primary-nav { display: flex; align-items: baseline; gap: var(--space-3); }
.primary-nav a { padding-block: var(--space-1); color: var(--muted); font-size: 14px; text-decoration: none; border-bottom: 3px solid transparent; }
.primary-nav a[aria-current] { color: var(--accent); border-color: var(--accent); font-weight: 700; }
.primary-nav .data-health { margin-left: auto; font-size: 12px; padding: 4px 8px; align-self: center; }
.primary-nav .data-health.limited { color: var(--muted); }
.skip-link { position: absolute; top: -5rem; left: 16px; padding: 8px; background: var(--surface); z-index: 1; }
.skip-link:focus { top: 8px; }
.page-heading { margin-block: var(--space-3) var(--space-2); }
.page-heading > p:last-child:not(.eyebrow) { color: var(--muted); margin-top: var(--space-1); }
.eyebrow { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: var(--space-1); }
.back-link { display: inline-block; color: var(--muted); font-size: 14px; margin-bottom: var(--space-1); }
.card, .daily, .network-card, .station-start, .current-delays { margin-block: var(--space-4); }
.section-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-1) var(--space-2); margin-bottom: var(--space-2); }
.section-heading > span, .section-heading p, .count { color: var(--muted); font-size: 13px; font-weight: 400; }
.section-heading a { font-size: 14px; }
.network-card .section-heading, .daily .section-heading { margin-bottom: var(--space-2); }
.network-metrics, .daily-metrics { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: var(--space-3); font-variant-numeric: tabular-nums; }
.network-metrics > div, .daily-metrics > div { padding-block: var(--space-1); min-width: 0; }
.daily-metrics { margin-bottom: 0; }
dt { color: var(--muted); font-size: 14px; margin-bottom: var(--space-1); }
dd { font-size: 22px; font-weight: 700; line-height: 1.3; }
.network-metrics strong { font-size: 44px; }
.unit { font-size: 12px; font-weight: 400; color: var(--muted); }
.coverage { font-size: 13px; color: var(--muted); }
.coverage.stale { color: var(--minor); font-weight: 600; }
.board-warning { margin-block: var(--space-1); padding: 6px 10px; border-radius: 6px; color: var(--minor); background: var(--minor-bg); font-weight: 600; }
.limited { background: var(--soft); color: var(--muted); border-radius: 3px; padding: 4px 8px; }
.freshness { color: var(--muted); font-size: 13px; margin-block: var(--space-1); }
.network-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-1) var(--space-3); margin-top: var(--space-2); }
.network-freshness { color: var(--muted); font-size: 13px; }
.figures-details { color: var(--muted); font-size: 13px; max-width: 70ch; }
.figures-details summary { color: var(--accent); font-weight: 600; }
.figures-details p { margin-top: var(--space-1); }
.daily .figures-details { margin-top: var(--space-2); }
.note, .below-card { font-size: 13px; color: var(--muted); margin-top: var(--space-1); max-width:  70ch; }
.note { max-width:  70ch; }
.no-delays, .empty { color: var(--muted); font-size: 14px; max-width:  60ch; }
.no-delays { margin-top: var(--space-2); }
.empty { max-width:  70ch; }
.station-filter { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-1); margin-block: var(--space-1); }
label { font-size: 14px; font-weight: 600; }
select, button, .button { font: inherit; font-size: 14px; text-align: left; min-height: 44px; border-radius: 4px; padding: 8px 16px; }
select { background: var(--surface); color: inherit; border: 1px solid var(--line); min-width: 180px; max-width: 100%; height: 44px; }
button, .button { background: var(--accent); color: #fff; border: 1px solid var(--accent); font-weight: 700; cursor: pointer; text-decoration: none; }
button:hover, .button:hover { filter: brightness(.9); }
.station-start { position: relative; overflow: hidden; padding: var(--space-2) var(--space-3); background: var(--finder-bg); color: var(--finder-fg); border-radius: 4px; }
.station-start, .network-card, .homepage-lower { margin-block: var(--space-3); }
.homepage-lower .current-delays, .homepage-lower .daily { margin: 0; }
.homepage-lower .daily { margin-top: var(--space-4); }
.network-card h2, .current-delays h2, .daily h2 { border-left: 3px solid var(--accent); padding-left: var(--space-1); }
.intro-content { position: relative; z-index: 1; max-width: 690px; }
.station-start .page-heading { margin: 0 0 var(--space-2); }
.station-start h1 { font-size: 40px; }
.station-start .page-heading > p { color: var(--finder-muted); margin-top: 4px; }
.intro-rail { display: none; position: absolute; right: var(--space-3); top: 50%; transform: translateY(-50%); width: 270px; height: 128px; color: var(--finder-outline); opacity: .45; pointer-events: none; }
.station-picker-row { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); }
.station-start .station-filter { flex: 0 1 548px; margin: 0; gap: var(--space-2); }
.station-start select { flex: 1; min-width: 180px; max-width: 420px; border-color: var(--finder-outline); }
.station-start button { background: var(--finder-action); color: var(--finder-action-fg); border-color: var(--finder-action-border); }
.station-start .station-filter label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.forget-station { color: var(--finder-muted); font-size: 13px; white-space: nowrap; }
.shortcuts { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-1); margin-top: var(--space-2); font-size: 12px; }
.shortcuts span { color: var(--finder-muted); margin-right: var(--space-1); }
.shortcuts a { border: 1px solid var(--finder-outline); border-radius: 4px; padding: 6px 10px; min-height: 32px; text-decoration: none; font-weight: 600; }
.shortcuts a:hover { background: var(--soft); }
.board-views { display: flex; gap: var(--space-3); margin-bottom: var(--space-1); font-size: 14px; }
.board-views a { padding-block: var(--space-1); text-decoration: none; border-bottom: 3px solid transparent; }
.board-views a[aria-current] { font-weight: 700; border-color: var(--accent); }
.station-board .section-heading { margin-bottom: var(--space-1); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-variant-numeric: tabular-nums; }
th, td { padding: var(--space-1) var(--space-2); border-bottom: 1px solid var(--line); vertical-align: top; }
tr > :first-child { padding-left: 0; }
tr > :last-child { padding-right: 0; }
thead th { font-size: 12px; color: var(--muted); font-weight: 600; border-top: 2px solid var(--line); }
.current-delays thead th { background: var(--table-head-bg); border-top: 0; padding: var(--space-1) var(--space-2); }
.current-delays tbody th, .current-delays tbody td { padding-inline: var(--space-2); }
tbody th { font-weight: 600; }
th small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 4px; }
.numeric, .service-time { text-align: right; white-space: nowrap; }
.departure-board { table-layout: fixed; }
.departure-board th:first-child, .departure-board td:first-child { width: 96px; }
.departure-board th:nth-child(2), .departure-board td:nth-child(2) { width: 96px; }
.departure-board th:last-child, .departure-board td:last-child { width: 128px; }
.departure-board tbody th { overflow-wrap: anywhere; }
.departure-board strong { font-size: 17px; font-weight: 750; }
.service-time { font-size: 14px; font-weight: 500; }
.expected-time { text-align: right; white-space: nowrap; font-size: 14px; font-weight: 600; }
.expected-time small { display: block; font-size: 11px; font-weight: 400; }
.expected-time.unchanged { color: var(--muted); }
.badge { display: inline-block; border-radius: 3px; padding: 2px 6px; font-size: 13px; font-weight: 650; white-space: nowrap; }
.on-time { color: var(--on-time); background: var(--on-time-bg); }
.minor { color: var(--minor); background: var(--minor-bg); }
.major { color: var(--major); background: var(--major-bg); }
.reading-details { color: var(--muted); font-size: 12px; font-weight: 400; }
summary { cursor: pointer; padding-block: 4px; min-height: 24px; }
.reading-details summary { width: fit-content; }
.reading-details p { margin-block: var(--space-1); }
.reading-details ul { padding-left: var(--space-2); }
.reading-details li { margin-block: var(--space-1); }
.reading-details .badge { white-space: normal; }
.pagination { display: flex; align-items: center; gap: var(--space-3); font-size: 14px; margin-top: var(--space-1); }
.pagination a { padding-block: var(--space-1); }
.pagination > span:empty { display: none; }
.status-summary { max-width: 760px; }
.status-summary > p { margin-top: var(--space-2); }
.status-list { padding: 0; margin: 0; list-style: none; }
.status-list li { display: grid; grid-template-columns: 220px 1fr 180px; gap: var(--space-2); padding-block: var(--space-2); border-bottom: 1px solid var(--line); font-size: 14px; }
.status-list .coverage { grid-column: 3; grid-row: 1; }
.fetch-time { grid-column: 2; grid-row: 1; }
.fetch-time .freshness { margin: 0; }
.site-footer { margin-top: 48px; padding-block: var(--space-4) var(--space-3); background: var(--footer-bg); font-size: 12px; color: var(--muted); }
.site-footer p + p { margin-top: var(--space-1); }
.methodology { max-width: 720px; }
.methodology h2 { margin-top: var(--space-3); }
.methodology p { margin-top: var(--space-1); }
.patterns { margin-block: var(--space-4); }
.patterns-filter select { min-width: min(300px, 100%); }
.patterns h2 { border-left: 3px solid var(--accent); padding-left: var(--space-1); }
.patterns-summary { font-size: 18px; font-weight: 650; margin-bottom: var(--space-2); }
.heatmap-scroll { max-width: 100%; overflow-x: auto; }
.heatmap { display: block; max-width: none; font-family: inherit; font-variant-numeric: tabular-nums; }
.heat-axis { fill: var(--muted); font-size: 13px; font-weight: 600; }
.heat-hour, .heat-number { text-anchor: middle; }
.heat-no-data { font-weight: 400; }
.heat-cell { stroke: var(--heat-border); stroke-width: 1; }
.heat-0 { fill: var(--heat-0); background: var(--heat-0); }
.heat-1 { fill: var(--heat-1); background: var(--heat-1); }
.heat-2 { fill: var(--heat-2); background: var(--heat-2); }
.heat-3 { fill: var(--heat-3); background: var(--heat-3); }
.heat-empty { fill: var(--heat-empty); background: var(--heat-empty); }
.heat-sparse { fill: url(#sparse-hatch); background: repeating-linear-gradient(135deg, var(--heat-sparse-bg) 0 5px, var(--heat-sparse-line) 5px 6px); }
.heat-sparse-base { fill: var(--heat-sparse-bg); }
.heat-sparse-line { fill: none; stroke: var(--heat-sparse-line); stroke-width: 1; }
.heat-number { font-size: 12px; font-weight: 700; fill: #163342; pointer-events: none; }
.heat-number-2, .heat-number-3 { fill: #fff; }
.heat-legend { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-2); margin-top: var(--space-2); color: var(--muted); font-size: 13px; }
.heat-legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.heat-legend i { width: 16px; height: 16px; border: 1px solid var(--heat-border); border-radius: 2px; flex: none; }
.patterns-figures { margin-top: var(--space-2); }
.patterns-method { margin-top: var(--space-3); max-width: 72ch; color: var(--muted); font-size: 13px; }
.not-found { max-width: 720px; padding-block: var(--space-3); }
.not-found > p:not(.eyebrow) { margin-block: var(--space-2); color: var(--muted); }
.error-links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (min-width: 1000px) {
  .intro-rail { display: block; }
  .network-card { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 0 var(--space-3); align-items: start; }
  .network-card .section-heading { grid-column: 1; grid-row: 1 / 3; margin: var(--space-1) 0 0; }
  .network-card .network-metrics, .network-card .empty { grid-column: 2; grid-row: 1; }
  .network-card .network-meta { grid-column: 2; grid-row: 2; margin-top: var(--space-1); }
  .homepage-lower { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--space-4); align-items: start; }
  .homepage-lower .daily { border-left: 1px solid var(--line); padding-left: var(--space-3); }
  .homepage-lower .daily .section-heading { gap: var(--space-1); }
  .homepage-lower .daily h2 { font-size: 18px; }
  .homepage-lower .daily-metrics { display: block; }
  .homepage-lower .daily-metrics > div { display: grid; grid-template-columns: 1fr auto; gap: var(--space-1); align-items: baseline; padding-block: var(--space-1); }
  .homepage-lower .daily-metrics dt { margin: 0; font-size: 13px; }
  .homepage-lower .daily-metrics dd { font-size: 18px; text-align: right; }
  .homepage-lower .daily .note { font-size: 12px; }
  .current-delays tbody th strong { display: block; }
  .current-delays tbody th small { display: inline; margin: 0; }
  .current-delays .reading-details { display: inline-block; margin-left: var(--space-1); }
  .current-delays .reading-details summary { min-height: 0; padding: 0; }
  .current-delays .reading-details[open] { display: block; margin: var(--space-1) 0 0; }
}
@media (min-width: 1000px) and (hover: hover) {
  tbody tr:hover { background: var(--soft); }
}
@media (prefers-color-scheme: dark) {
  :root { color: #e6edf1; background: #111b21; --surface: #1b2931; --muted: #afc1ca; --line: #354750; --soft: #20323b; --accent: #7ddbd0; --brand-mark-fg: #102a2c; --on-time: #a4e3bf; --on-time-bg: #233e32; --minor: #f5d487; --minor-bg: #433921; --major: #ffb0b5; --major-bg: #462b32; --finder-bg: #183b3d; --finder-fg: #e6edf1; --finder-muted: #c2d7d7; --finder-outline: #8daead; --finder-action: #7ddbd0; --finder-action-fg: #102a2c; --finder-action-border: #7ddbd0; --table-head-bg: #2c3e48; --footer-bg: #0c161b; --heat-empty: #17232a; --heat-sparse-bg: #27353d; --heat-sparse-line: #708c98; --heat-border: #4c626c; --train: #bdb7ff; --train-fg: #1b1742; }
  button, .button { color: #102a2c; }
}
@media (max-width: 639px) {
  .shell { width: calc(100% - 32px); }
  h1 { font-size: 26px; }
  h2 { font-size: 18px; }
  .page-heading > p { font-size: 14px; }
  .primary-nav { flex-wrap: wrap; gap: 0 var(--space-2); }
  .primary-nav a { font-size: 12px; }
  .primary-nav .data-health { margin: 0 0 var(--space-1); }
  .page-heading { margin-top: var(--space-2); }
  .station-start { padding: var(--space-2); }
  .station-start h1 { font-size: 30px; }
  .station-start .station-filter { flex-basis: 100%; }
  .station-start select { min-width: 0; }
  .station-filter label { width: 100%; }
  select { flex: 1; min-width: 0; padding-inline: var(--space-1); }
  .shortcuts { gap: var(--space-1); }
  .network-metrics, .daily-metrics { grid-template-columns: 1.45fr 1fr .8fr; gap: var(--space-1); }
  dt { font-size: 12px; }
  dd { font-size: 16px; }
  .network-metrics strong { font-size: 34px; }
  .network-metrics dd { min-height: 0; }
  .coverage { font-size: 12px; }
  .freshness { font-size: 12px; }
  .network-freshness { font-size: 12px; }
  th, td { padding-inline: var(--space-1); }
  .departure-board thead th { font-size: 11px; padding-inline: 4px; }
  .current-delays tbody th, .current-delays tbody td { padding-inline: var(--space-1); }
  .departure-board th:first-child, .departure-board td:first-child { width: 64px; }
  .departure-board th:nth-child(2), .departure-board td:nth-child(2) { width: 70px; }
  .departure-board th:last-child, .departure-board td:last-child { width: 88px; }
  .departure-board strong { font-size: 16px; }
  .departure-board .badge { font-size: 12px; }
  .station-table { table-layout: fixed; font-size: 14px; }
  .station-table th:first-child { width: 44%; }
  .station-table .numeric { white-space: normal; }
  .route-table { font-size: 14px; }
  .status-list li { grid-template-columns: 1fr auto; gap: var(--space-1); }
  .status-list .coverage { grid-column: 2; }
  .fetch-time { grid-column: 1 / -1; grid-row: 2; }
}

/* Live network map. The list remains visible when the enhancement or tiles fail. */
[hidden] { display: none !important; }
.live-map-section, .map-list-section { margin-block: var(--space-4); }
.map-filter { margin-block: var(--space-2) var(--space-1); }
.map-reset { background: var(--surface); color: var(--accent); }
.map-error { margin-block: var(--space-1); color: var(--muted); font-weight: 600; }
.map-enhancement { position: relative; margin-top: var(--space-2); }
#network-map { width: 100%; height: 460px; background: var(--soft); border: 1px solid var(--line); border-radius: 4px; }
@media (prefers-color-scheme: dark) { #network-map .leaflet-tile { filter: grayscale(.65) brightness(.72) contrast(.9); } }
.leaflet-container .leaflet-control-attribution { background: var(--surface); color: inherit; font-size: 12px; padding: 2px 4px; }
.leaflet-container .leaflet-control-attribution a { color: var(--accent); }
.map-panel { position: absolute; z-index: 500; top: 0; right: 0; width: min(500px, 55%); max-height: 100%; overflow: auto; padding: var(--space-3); background: var(--surface); border: 1px solid var(--line); box-shadow: -8px 0 24px #0002; }
.map-panel-close { float: right; min-height: 36px; padding: 4px 10px; background: var(--surface); color: var(--accent); }
.map-panel h2 { margin-bottom: var(--space-2); }
.map-panel p { margin-block: var(--space-1); }
.map-status { display: inline-block; text-transform: capitalize; font-weight: 650; margin-bottom: var(--space-1); }
.map-trains-count { font-weight: 650; }
.map-service-group { margin: var(--space-2); }
.map-panel .map-service-group { margin-inline: 0; }
.map-service-group h3 { font-size: 14px; margin: 0 0 var(--space-1); }
.map-services { list-style: none; margin: 0; padding: 0; }
.map-service { padding: var(--space-1) 0; border-top: 1px solid var(--line); }
.map-service-main { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: baseline; gap: var(--space-1); font-size: 14px; }
.map-service-main strong { min-width: 0; }
.map-service-main > span { white-space: nowrap; }
.map-service-delay { text-align: right; }
.map-credits { margin-top: var(--space-1); color: var(--muted); font-size: 12px; }
.map-legend { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); list-style: none; margin: var(--space-2) 0; padding: 0; font-size: 13px; }
.map-legend li, .map-list-name { display: inline-flex; align-items: center; gap: var(--space-1); }
.map-dot { display: inline-block; width: 16px; height: 16px; border-radius: 50%; flex: none; background: var(--on-time); border: 2px solid var(--on-time); }
.map-minor, .map-minor-delay { background: var(--minor); border-color: var(--minor); }
.map-significant, .map-significant-delay { background: var(--major); border-color: var(--major); }
.map-no-recent-data, .map-no-data { background: transparent; border: 2px dashed var(--muted); }
.map-marker { display: flex; align-items: center; justify-content: center; gap: 4px; width: 82px; height: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 4px; box-shadow: 0 1px 4px #0004; cursor: pointer; }
.map-marker-empty { width: 24px; height: 24px; padding: 2px; }
.map-marker-delay { font-size: 12px; font-weight: 700; white-space: nowrap; }
.leaflet-tooltip.map-station-label { padding: 3px 6px; border-color: var(--line); border-radius: 3px; background: var(--surface); color: inherit; font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1.2; box-shadow: 0 1px 3px #0003; }
.leaflet-tooltip-top.map-station-label::before { border-top-color: var(--line); }
.map-list-item { border-bottom: 1px solid var(--line); padding-block: var(--space-1); }
.map-list-item summary { display: grid; grid-template-columns: minmax(190px, 1.2fr) minmax(90px, .7fr) minmax(185px, 1.1fr) minmax(120px, .8fr) auto; gap: var(--space-1); align-items: center; padding: var(--space-1); list-style: none; }
.map-list-item summary::-webkit-details-marker { display: none; }
.map-list-item summary span { min-width: 0; }
.map-list-item summary > span:not(:first-child) { color: var(--muted); font-size: 13px; }
.map-list-item summary .map-view-cue { color: var(--accent); white-space: nowrap; font-weight: 650; }
.map-list-item[open] .map-view-cue span { display: inline-block; transform: rotate(180deg); }
.map-list-item .empty, .map-list-item .map-station-link { margin: var(--space-2); }
.map-list-item .map-station-link { display: inline-block; font-size: 14px; }
.map-reading { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.map-list-item .unchanged, .map-panel .unchanged { color: var(--muted); }
/* Train positions: indigo, square-cornered icons so they never read as station delay markers. */
.map-toggle { display: inline-flex; align-items: center; gap: var(--space-1); min-height: 44px; font-size: 14px; font-weight: 600; cursor: pointer; }
.map-toggle input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.train-glyph { display: block; width: 16px; height: 16px; flex: none; }
.train-glyph-body { fill: currentColor; }
.train-glyph-cut { fill: var(--train); }
.train-glyph-rail { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.train-marker, .train-badge { display: flex; align-items: center; justify-content: center; gap: 4px; height: 26px; background: var(--train); color: var(--train-fg); border: 2px solid var(--surface); border-radius: 6px; box-shadow: 0 1px 4px #0005; cursor: pointer; font-size: 12px; font-weight: 700; white-space: nowrap; }
.train-marker { width: 26px; }
.train-badge { width: 88px; padding-inline: 6px; }
.train-icon:focus-visible { outline: none; }
.train-icon:focus-visible > div { outline: 3px solid var(--accent); outline-offset: 2px; }
.trains-hidden .train-icon { display: none; }
.train-legend-icon { width: 20px; height: 20px; border-width: 1px; cursor: default; }
.train-legend-icon .train-glyph { width: 13px; height: 13px; }
.map-panel-back { min-height: 36px; padding: 4px 10px; margin-bottom: var(--space-2); background: var(--surface); color: var(--accent); }
.train-direction { color: var(--muted); font-size: 14px; }
.train-destination { font-weight: 650; }
.train-message { white-space: pre-line; font-size: 16px; line-height: 1.45; }
.train-position { color: var(--muted); font-size: 13px; }
.train-gone { padding: 4px var(--space-1); background: var(--minor-bg); color: var(--minor); border-radius: 3px; font-size: 14px; font-weight: 650; }
.train-choices { list-style: none; margin: var(--space-2) 0; padding: 0; }
.train-choice { display: grid; gap: 2px; width: 100%; min-height: 44px; margin-bottom: var(--space-1); padding: var(--space-1) var(--space-2); background: var(--surface); color: inherit; border: 1px solid var(--line); border-left: 4px solid var(--train); text-align: left; font-weight: 400; }
.train-choice strong { font-weight: 700; }
.train-choice span { color: var(--muted); font-size: 13px; }
.train-list-section { margin-block: var(--space-4); }
.train-list { list-style: none; margin: 0; padding: 0; }
.train-list-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--space-2); align-items: start; padding: var(--space-1) var(--space-1) var(--space-1) var(--space-2); border-bottom: 1px solid var(--line); border-left: 4px solid var(--train); }
.train-list-item > :not(.train-show) { grid-column: 1; margin: 0; }
.train-list-heading { display: flex; flex-wrap: wrap; gap: 0 var(--space-1); align-items: baseline; }
.train-list-heading span { color: var(--muted); font-size: 13px; }
.train-message-compact { font-size: 14px; }
.train-show { grid-column: 2; grid-row: 1 / span 4; align-self: center; min-height: 44px; padding: 4px 14px; background: var(--surface); color: var(--accent); }
@media (max-width: 639px) {
  #network-map { height: 350px; touch-action: pan-y; }
  .map-panel { position: fixed; z-index: 1100; top: auto; bottom: 0; left: 0; right: 0; width: 100%; max-height: 65vh; border-radius: 12px 12px 0 0; box-shadow: 0 -8px 32px #0006; }
  .map-list-item summary { grid-template-columns: 1fr auto; gap: 4px var(--space-1); }
  .map-list-item summary > span:nth-child(2), .map-list-item summary > span:nth-child(3), .map-list-item summary > span:nth-child(4) { grid-column: 1 / -1; }
  .map-list-item summary .map-view-cue { grid-column: 2; grid-row: 1; }
  .map-service-main { grid-template-columns: 1fr auto; }
  .map-service-main strong { grid-column: 1 / -1; }
}
