/* A station's page (templates/station.html). Only what site.css doesn't have. */

/* Hero: the station sign (operator colour set inline from the data), and the stat tiles */
.station-sign { align-self: flex-start; max-width: 100%; display: flex; align-items: stretch; border: 2px solid var(--ink-deep); border-radius: 16px; box-shadow: 0 5px 0 #050A12; overflow: hidden; }
.sign-mark { width: 64px; flex: none; color: var(--paper); display: flex; align-items: center; justify-content: center; }
.title.sign-name { background: var(--paper); color: var(--ink); padding: 6px 22px 2px; line-height: 1; min-width: 0; overflow-wrap: anywhere; }
.sign-code { background: var(--ink); color: var(--paper); padding: 0 14px; display: flex; align-items: center; font-size: 26px; flex: none; }
.station-stats { flex: 1 1 360px; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat { background: var(--navy-2); border: 2px solid var(--rim); border-radius: 16px; box-shadow: 0 4px 0 #050A12; padding: 14px 16px; display: flex; flex-direction: column; }
.stat .n { font-size: 30px; font-weight: 900; line-height: 1.1; white-space: nowrap; }
.stat .what { font-size: 14px; font-weight: 800; color: var(--muted-ink); }

/* Platforms and passengers */
.station-panels { padding-top: 36px; padding-bottom: 36px; display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.station-panels > .panel { padding: 20px; min-width: 0; }
.station-panels .heading-row .aside { font-size: 14px; }
.platforms { flex: 1 1 400px; }
.passengers { flex: 1.2 1 440px; gap: 14px; }
.passengers .heading-row .aside { color: var(--muted-ink); }
.layout { width: 100%; height: auto; display: block; }
.layout .plat { fill: var(--band); stroke: var(--ink); stroke-width: 2.5; }
.layout .plat-name { font-family: var(--sans); font-weight: 900; font-size: 15px; fill: var(--ink); }
.layout .rail { stroke: var(--ink); stroke-width: 4; }
.layout .sleepers { stroke: var(--stone); stroke-width: 3; }
.layout .towards { font-family: var(--sans); font-weight: 800; font-size: 13px; fill: var(--muted); }
.access { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.access li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.access .what { font-weight: 900; flex: 1 1 200px; }
.access .src { font-size: 13px; font-weight: 700; color: var(--muted); }

/* Passengers a year: loaded years solid teal, sample years dashed */
.years { display: flex; align-items: flex-end; gap: 10px; height: 150px; }
.year { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.year .label { font-size: 13px; font-weight: 900; white-space: nowrap; }
.year .when { font-size: 12px; font-weight: 800; color: var(--muted-ink); white-space: nowrap; }
.col { display: block; width: 100%; max-width: 56px; border-radius: 6px 6px 0 0; background: var(--teal); border: 2px solid var(--teal); }
.col--sample { background: transparent; border: 2px dashed var(--muted-ink); }
.neighbours-title { margin: 4px 0 0; font-size: 15px; font-weight: 900; }
.neighbour { display: grid; grid-template-columns: minmax(110px, 180px) minmax(0, 1fr) 76px; align-items: center; gap: 10px; }
.neighbour .name { font-size: 14px; font-weight: 800; }
.neighbour .bar { height: 14px; }
.neighbour .bar .here { background: var(--teal); }
.neighbour .bar .other { background: var(--muted-ink); }
.neighbour .n { font-size: 14px; font-weight: 900; text-align: right; }

/* What the trains do, on the band */
.train-facts { padding-top: 28px; padding-bottom: 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.card.train-fact { background: var(--paper); display: flex; flex-direction: column; gap: 4px; }
.train-fact .v { font-size: 20px; font-weight: 900; line-height: 1.2; }

/* Freight that passes */
.panel.passing { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; text-decoration: none; }
.passing .code { font-size: 22px; }
.passing .time { font-size: 16px; color: var(--muted); }
.passing .route { flex: 1 1 220px; font-size: 16px; font-weight: 900; }
.passing .runs { font-size: 14px; font-weight: 800; color: var(--muted); }
.passing .what { font-size: 14px; font-weight: 700; color: var(--body-2); }
.table-caption { text-align: left; padding: 12px 16px 0; font-size: 14px; font-weight: 900; color: var(--muted); }
.near { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font-size: 15px; font-weight: 900; }
.near .name { flex: 1 1 160px; }
.near .sub { font-size: 13px; font-weight: 800; color: var(--muted); }

/* What called yesterday */
.train-code { font-size: 17px; color: var(--ink); }
.train-time { font-size: 14px; color: var(--muted); }
.key { gap: 8px 20px; font-size: 14px; font-weight: 700; color: var(--body-2); }

@media (max-width: 520px) {
  .sign-mark { width: 48px; }
  .sign-mark svg { width: 26px; height: 26px; }
  .title.sign-name { padding: 6px 14px 2px; }
  .sign-code { font-size: 20px; padding: 0 10px; }
  .neighbour { grid-template-columns: minmax(0, 1fr) 70px; }
  .neighbour .bar { grid-column: 1 / 3; grid-row: 2; }
}
