/*
 * Cumbria Trains — Main Stylesheet
 * ─────────────────────────────────────────────────────────────────────────
 * Structure:
 *   1.  Design tokens (CSS variables)
 *   2.  Reset & base
 *   3.  Typography
 *   4.  Layout utilities
 *   5.  Site header
 *   6.  Site footer
 *   7.  Live board component
 *   8.  Station card component
 *   9.  Disruption banner
 *  10.  Search
 *  11.  Homepage
 *  12.  Station page
 *  13.  Route page
 *  14.  Status colours (shared utility)
 *  15.  Responsive overrides
 *
 * All colours are defined as CSS variables so they can be overridden
 * by a parent design system (e.g. WordPress theme) by redeclaring
 * :root or .cg-trains-scope variables.
 *
 * Google Fonts import — swap this URL for self-hosted if needed.
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;900&family=DM+Mono:wght@400;500&display=swap');

/* ════════════════════════════════════════════════════════════════════════
   1. DESIGN TOKENS
   ════════════════════════════════════════════════════════════════════════ */
:root {
  /* Palette */
  --brand-900: #0e1c2a;
  --brand-800: #122637;
  --brand-700: #163247;
  --brand-600: #1d4060;
  --brand-500: #246080;
  --brand-400: #3a88b5;
  --brand-300: #60aad4;
  --brand-200: #9dcde8;
  --brand-100: #d6ecf7;

  --accent-500: #e8a93e;   /* amber — Cumbria golden hour */
  --accent-400: #f0bc5e;
  --accent-300: #f7d38e;

  /* Semantic */
  --bg-base:    #0d1c29;
  --bg-surface: #122332;
  --bg-raised:  #163244;
  --bg-subtle:  #1b3a51;

  --text-primary:   #e8f2fa;
  --text-secondary: #8faec5;
  --text-muted:     #5a7d99;

  --border:       rgba(255,255,255,.08);
  --border-focus: var(--brand-300);

  /* Status */
  --status-ok:      #5cd88a;
  --status-late:    #ffc542;
  --status-cancel:  #ff5f5f;
  --status-unknown: #8faec5;

  /* Header */
  --header-bg:     #0d1c29;
  --header-height: 64px;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* Type scale */
  --text-xs:   12px;
  --text-sm:   14px;
  --text-base: 16px;
  --text-md:   18px;
  --text-lg:   22px;
  --text-xl:   28px;
  --text-2xl:  36px;
  --text-3xl:  48px;

  /* Radius */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,.3);
  --shadow-md: 0 6px 24px rgba(0,0,0,.4);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.5);

  /* Transition */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --dur-fast: 150ms;
  --dur-mid:  300ms;
  --dur-slow: 500ms;

  /* Board */
  --board-row-height: 72px;

  /* Fonts */
  --font-display: 'Outfit', system-ui, sans-serif;
  --font-mono:    'DM Mono', 'Menlo', monospace;
}

/* ════════════════════════════════════════════════════════════════════════
   2. RESET & BASE
   ════════════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: var(--text-base);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-display);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

img { display: block; max-width: 100%; }
a { color: var(--brand-300); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; }

/* ════════════════════════════════════════════════════════════════════════
   3. TYPOGRAPHY
   ════════════════════════════════════════════════════════════════════════ */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }
h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl);  }
h3 { font-size: var(--text-lg);  }
h4 { font-size: var(--text-md);  }

.page-title     { font-size: clamp(28px, 4vw, var(--text-3xl)); font-weight: 900; }
.section-title  { font-size: var(--text-xl); font-weight: 700; margin-bottom: var(--space-4); }
.section-title small { font-size: var(--text-sm); font-weight: 400; color: var(--text-muted); margin-left: var(--space-2); }
.text-muted  { color: var(--text-muted); }
.text-sm     { font-size: var(--text-sm); }
.text-xs     { font-size: var(--text-xs); }
.font-mono   { font-family: var(--font-mono); }
.font-bold   { font-weight: 700; }
.crs-badge {
  display: inline-flex; align-items: center;
  background: var(--brand-700); color: var(--brand-200);
  padding: 2px 8px; border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-size: var(--text-xs);
  letter-spacing: .05em;
}

/* ════════════════════════════════════════════════════════════════════════
   4. LAYOUT UTILITIES
   ════════════════════════════════════════════════════════════════════════ */
.container {
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.container-wide { max-width: 1400px; margin-inline: auto; padding-inline: var(--space-5); }

.stack   { display: flex; flex-direction: column; }
.stack-2 { gap: var(--space-2); }
.stack-3 { gap: var(--space-3); }
.stack-4 { gap: var(--space-4); }
.stack-5 { gap: var(--space-5); }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-5); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-4); }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-4); }

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: box-shadow var(--dur-mid) var(--ease), transform var(--dur-mid) var(--ease);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-link:hover { transform: translateY(-2px); }

.btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 10px 20px; border-radius: var(--radius-md);
  font-weight: 600; font-size: var(--text-sm);
  border: 1px solid transparent; transition: all var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand-500); color: #fff;
  border-color: var(--brand-400);
}
.btn-primary:hover { background: var(--brand-400); text-decoration: none; }
.btn-ghost {
  background: transparent; color: var(--text-secondary);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg-raised); color: var(--text-primary); text-decoration: none; }

.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: var(--text-xs); font-weight: 600;
  background: var(--bg-subtle); color: var(--text-secondary);
}
.badge-line { background: var(--brand-800); color: var(--brand-200); }

/* ════════════════════════════════════════════════════════════════════════
   5. SITE HEADER
   ════════════════════════════════════════════════════════════════════════ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.header-inner {
  max-width: 1160px; margin-inline: auto;
  padding-inline: var(--space-5);
  height: var(--header-height);
  display: flex; align-items: center; gap: var(--space-5);
}

.site-logo {
  display: flex; align-items: center; gap: var(--space-3);
  color: var(--text-primary); text-decoration: none; flex-shrink: 0;
}
.site-logo:hover { text-decoration: none; }
.logo-icon { width: 36px; height: 36px; color: var(--brand-300); }
.logo-name { display: block; font-weight: 700; font-size: var(--text-md); line-height: 1; }
.logo-sub  { display: block; font-size: var(--text-xs); color: var(--text-muted); }

.site-nav {
  display: flex; align-items: center; gap: var(--space-2);
  margin-left: var(--space-3); flex: 1;
}
.nav-link {
  padding: 6px 12px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: var(--text-sm); font-weight: 500;
  transition: all var(--dur-fast);
}
.nav-link:hover, .nav-link.is-active {
  background: var(--bg-raised); color: var(--text-primary);
  text-decoration: none;
}

.header-search { display: flex; align-items: center; }
.header-search form { position: relative; }
.header-search-input {
  background: var(--bg-raised); border: 1px solid var(--border);
  color: var(--text-primary); padding: 8px 40px 8px 14px;
  border-radius: var(--radius-full); font-family: inherit;
  font-size: var(--text-sm); width: 220px;
  transition: border-color var(--dur-fast), width var(--dur-mid) var(--ease);
}
.header-search-input:focus { outline: none; border-color: var(--border-focus); width: 280px; }
.header-search-input::placeholder { color: var(--text-muted); }
.header-search-btn {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text-muted); display: flex; align-items: center;
}
.header-search-btn:hover { color: var(--text-primary); }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; background: none; border: none;
  padding: 8px; border-radius: var(--radius-sm);
}
.nav-toggle span {
  display: block; height: 2px; background: var(--text-primary);
  border-radius: 2px; transition: all var(--dur-mid) var(--ease);
}
.nav-toggle.is-open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile nav */
.mobile-nav {
  display: none; padding: var(--space-4) var(--space-5) var(--space-5);
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
}
.mobile-nav.is-open { display: block; }
.mobile-nav nav { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-4); }
.mnav-link {
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-weight: 500;
}
.mnav-link:hover { background: var(--bg-raised); color: var(--text-primary); text-decoration: none; }
.mnav-search { display: flex; gap: var(--space-2); }
.mnav-search-input {
  flex: 1; background: var(--bg-raised); border: 1px solid var(--border);
  color: var(--text-primary); padding: 10px 14px; border-radius: var(--radius-md);
  font-family: inherit; font-size: var(--text-sm);
}
.mnav-search button {
  background: var(--brand-500); color: #fff; border: none;
  padding: 10px 16px; border-radius: var(--radius-md); font-weight: 600;
}

/* ════════════════════════════════════════════════════════════════════════
   6. SITE FOOTER
   ════════════════════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--brand-900);
  border-top: 1px solid var(--border);
  padding: var(--space-8) 0 var(--space-6);
  margin-top: auto;
}
.footer-inner { max-width: 1160px; margin-inline: auto; padding-inline: var(--space-5); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}
.footer-brand { font-size: var(--text-md); font-weight: 700; display: block; margin-bottom: var(--space-3); }
.footer-col p { color: var(--text-secondary); font-size: var(--text-sm); margin-top: var(--space-2); }
.footer-col strong { display: block; margin-bottom: var(--space-3); font-size: var(--text-sm); color: var(--text-secondary); text-transform: uppercase; letter-spacing: .06em; }
.footer-col nav { display: flex; flex-direction: column; gap: var(--space-2); }
.footer-col nav a { color: var(--text-secondary); font-size: var(--text-sm); }
.footer-col nav a:hover { color: var(--text-primary); }
.footer-small { font-size: var(--text-xs); color: var(--text-muted) !important; }
.footer-legal {
  border-top: 1px solid var(--border);
  padding-top: var(--space-5);
  display: flex; flex-wrap: wrap; gap: var(--space-4);
  font-size: var(--text-xs); color: var(--text-muted);
}

/* ════════════════════════════════════════════════════════════════════════
   7. LIVE BOARD COMPONENT
   ════════════════════════════════════════════════════════════════════════ */
.live-board {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.board-tabs {
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border);
}
.board-tab {
  padding: 8px 20px; border-radius: var(--radius-md);
  background: none; border: 1px solid var(--border);
  color: var(--text-secondary); font-size: var(--text-sm); font-weight: 600;
  transition: all var(--dur-fast) var(--ease);
}
.board-tab:hover { background: var(--bg-subtle); color: var(--text-primary); }
.board-tab.is-active {
  background: var(--brand-600); color: #fff;
  border-color: var(--brand-500);
}
.board-stale {
  margin-left: auto; font-size: var(--text-xs); color: var(--status-late);
}

.board-error {
  padding: var(--space-5);
  background: rgba(255, 95, 95, .08);
  border-bottom: 1px solid rgba(255, 95, 95, .2);
  color: var(--status-cancel);
  font-size: var(--text-sm);
}
.board-error a { color: var(--status-cancel); text-decoration: underline; }

.board-table-wrap { overflow-x: auto; }
.board-table {
  width: 100%; border-collapse: collapse;
  font-size: var(--text-sm);
}
.board-table thead { background: var(--bg-raised); }
.board-table th {
  padding: 12px 16px; text-align: left;
  font-size: var(--text-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-muted); border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.board-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--dur-fast);
}
.board-table tbody tr:hover { background: var(--bg-raised); }
.board-table tbody tr:last-child { border-bottom: none; }
.board-table td { padding: 14px 16px; vertical-align: top; }

.board-th-plat   { width: 60px; }
.board-th-status { width: 120px; }

.board-time { font-family: var(--font-mono); font-weight: 500; font-size: var(--text-md); white-space: nowrap; }
.board-dest-name { font-size: var(--text-md); font-weight: 600; line-height: 1.2; margin-bottom: 4px; }
.service-link { color: var(--text-primary); }
.service-link:hover { color: var(--brand-300); text-decoration: none; }

/* Calling-at ticker */
.board-calling {
  font-size: var(--text-xs); color: var(--accent-400);
  white-space: nowrap; overflow: hidden; height: 1.4em;
  position: relative;
}
.board-calling-scroll {
  display: inline-block;
  animation: ticker 20s linear infinite;
}
@keyframes ticker {
  0%   { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.board-plat { font-family: var(--font-mono); font-size: var(--text-md); font-weight: 700; white-space: nowrap; }
.board-status { font-weight: 700; white-space: nowrap; }
.board-empty { color: var(--text-muted); font-style: italic; }
.board-loading { color: var(--text-muted); }

/* Status colour classes */
.status-ontime  { color: var(--status-ok); }
.status-late    { color: var(--status-late); }
.status-cancel  { color: var(--status-cancel); }
.status-unknown { color: var(--status-unknown); }

/* Board fade transition */
.board-tbody.is-fading { opacity: 0; transition: opacity var(--dur-fast); }

.board-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--border);
  background: var(--bg-raised);
  font-size: var(--text-xs); color: var(--text-muted);
}

/* ════════════════════════════════════════════════════════════════════════
   8. STATION CARD COMPONENT
   ════════════════════════════════════════════════════════════════════════ */
.station-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  display: flex; flex-direction: column; gap: var(--space-3);
  transition: all var(--dur-mid) var(--ease);
  text-decoration: none; color: inherit;
}
.station-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-600);
  text-decoration: none;
}
.station-card-head { display: flex; justify-content: space-between; align-items: flex-start; }
.station-card-name { font-size: var(--text-md); font-weight: 700; color: var(--text-primary); }
.station-card-meta { font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; }
.station-card-next { font-size: var(--text-sm); }
.station-card-next strong { color: var(--text-primary); }
.station-card-status {
  font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.station-card-lines { display: flex; flex-wrap: wrap; gap: var(--space-1); }

/* ════════════════════════════════════════════════════════════════════════
   9. DISRUPTION BANNER
   ════════════════════════════════════════════════════════════════════════ */
.disruption-banner {
  background: rgba(255, 197, 66, .1);
  border: 1px solid rgba(255, 197, 66, .3);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  display: flex; align-items: flex-start; gap: var(--space-3);
}
.disruption-banner svg { flex-shrink: 0; color: var(--status-late); margin-top: 2px; }
.disruption-banner-body strong { color: var(--status-late); }
.disruption-banner-body p { font-size: var(--text-sm); color: var(--text-secondary); margin-top: var(--space-1); }
.no-disruptions {
  padding: var(--space-5);
  background: rgba(92, 216, 138, .06);
  border: 1px solid rgba(92, 216, 138, .15);
  border-radius: var(--radius-lg);
  color: var(--status-ok);
  font-size: var(--text-sm); font-weight: 600;
  display: flex; align-items: center; gap: var(--space-2);
}

/* ════════════════════════════════════════════════════════════════════════
   10. SEARCH
   ════════════════════════════════════════════════════════════════════════ */
.search-hero {
  background: linear-gradient(135deg, var(--brand-700) 0%, var(--brand-600) 100%);
  border-radius: var(--radius-xl); padding: var(--space-7) var(--space-6);
  text-align: center;
}
.search-hero h1 { font-size: clamp(24px, 3.5vw, 42px); margin-bottom: var(--space-2); }
.search-hero p { color: var(--brand-200); margin-bottom: var(--space-5); }
.search-form {
  display: flex; gap: var(--space-2); max-width: 560px; margin-inline: auto;
  background: var(--bg-base); padding: var(--space-2); border-radius: var(--radius-lg);
  border: 1px solid var(--brand-500);
}
.search-input {
  flex: 1; background: none; border: none; color: var(--text-primary);
  padding: 10px 16px; font-family: inherit; font-size: var(--text-md);
}
.search-input:focus { outline: none; }
.search-input::placeholder { color: var(--text-muted); }
.search-btn {
  background: var(--brand-500); color: #fff; border: none;
  padding: 10px 24px; border-radius: var(--radius-md); font-weight: 700;
  font-family: inherit; font-size: var(--text-sm);
}
.search-btn:hover { background: var(--brand-400); }
.search-results { margin-top: var(--space-5); }
.search-result {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-4); border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit;
  transition: background var(--dur-fast);
}
.search-result:hover { background: var(--bg-raised); text-decoration: none; }
.search-result-name { font-weight: 600; font-size: var(--text-md); }
.search-result-meta { font-size: var(--text-sm); color: var(--text-muted); }

/* ════════════════════════════════════════════════════════════════════════
   11. HOMEPAGE
   ════════════════════════════════════════════════════════════════════════ */
.hero {
  padding: var(--space-8) 0 var(--space-6);
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(36,96,128,.4) 0%, transparent 70%);
}
.hero-inner { max-width: 760px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  background: rgba(60, 136, 181, .15); border: 1px solid rgba(60, 136, 181, .3);
  padding: 4px 14px; border-radius: var(--radius-full);
  font-size: var(--text-xs); font-weight: 600; letter-spacing: .05em;
  color: var(--brand-300); margin-bottom: var(--space-4);
  text-transform: uppercase;
}
.hero-title {
  font-size: clamp(32px, 5vw, 64px); font-weight: 900;
  line-height: 1.05; letter-spacing: -.02em;
  margin-bottom: var(--space-4);
}
.hero-title em { color: var(--accent-400); font-style: normal; }
.hero-subtitle { font-size: var(--text-md); color: var(--text-secondary); max-width: 520px; margin-bottom: var(--space-6); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

.quick-stations { padding: var(--space-6) 0; }
.home-boards    { padding: var(--space-7) 0; background: linear-gradient(to bottom, transparent, rgba(18,35,50,.5)); }
.home-boards .container > .section-title { margin-bottom: var(--space-5); }
.home-routes    { padding: var(--space-7) 0; }

.route-card {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-5);
  display: flex; flex-direction: column; gap: var(--space-3);
  transition: all var(--dur-mid) var(--ease);
  text-decoration: none; color: inherit;
}
.route-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; }
.route-card-arrow { margin-left: auto; color: var(--text-muted); font-size: 20px; }
.route-card-title { font-size: var(--text-md); font-weight: 700; }
.route-card-meta  { font-size: var(--text-xs); color: var(--text-muted); }

/* ════════════════════════════════════════════════════════════════════════
   12. STATION PAGE
   ════════════════════════════════════════════════════════════════════════ */
.station-header {
  padding: var(--space-7) 0 var(--space-5);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-6);
}
.station-header-inner { display: flex; align-items: flex-start; gap: var(--space-6); flex-wrap: wrap; }
.station-info { flex: 1; min-width: 280px; }
.station-info .page-title { margin-bottom: var(--space-2); }
.station-meta { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-3) 0; }
.station-blurb { color: var(--text-secondary); font-size: var(--text-sm); max-width: 540px; }
.station-lines { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.station-board-section { margin-bottom: var(--space-7); }

/* ════════════════════════════════════════════════════════════════════════
   13. ROUTE PAGE
   ════════════════════════════════════════════════════════════════════════ */
.route-header { padding: var(--space-7) 0 var(--space-5); margin-bottom: var(--space-6); }
.route-journey { display: flex; align-items: center; gap: var(--space-3); font-size: var(--text-lg); font-weight: 700; margin-bottom: var(--space-4); }
.route-journey span.arrow { color: var(--accent-400); font-size: var(--text-xl); }
.route-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--space-4); margin-bottom: var(--space-5); }
.route-fact { background: var(--bg-raised); border-radius: var(--radius-md); padding: var(--space-4); }
.route-fact-label { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: var(--space-1); }
.route-fact-value { font-size: var(--text-md); font-weight: 700; }

/* ════════════════════════════════════════════════════════════════════════
   14. STATUS COLOUR UTILITIES (shared)
   ════════════════════════════════════════════════════════════════════════ */
.text-ok     { color: var(--status-ok); }
.text-late   { color: var(--status-late); }
.text-cancel { color: var(--status-cancel); }

/* ════════════════════════════════════════════════════════════════════════
   15. RESPONSIVE
   ════════════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .site-nav { display: none; }
  .header-search { display: none; }
  .nav-toggle { display: flex; margin-left: auto; }
}

@media (max-width: 640px) {
  .container { padding-inline: var(--space-4); }
  .hero { padding: var(--space-6) 0 var(--space-4); }
  .hero-actions { flex-direction: column; }
  .search-form { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-legal { flex-direction: column; gap: var(--space-2); }
  .board-table th, .board-table td { padding: 10px 12px; }
  .board-calling { display: none; }
  h1 { font-size: var(--text-xl); }
  .hero-title { font-size: clamp(28px, 8vw, 48px); }
  .station-header-inner { flex-direction: column; gap: var(--space-4); }
  .route-facts { grid-template-columns: 1fr 1fr; }
}

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