/* ─────────────────────────────────────────────────────────
   Transport Belarus — Design System (design_handoff_transport_belarus)
   ───────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  /* Palette: Modern Clean Slate (Design System 2026) */
  --bg: #F8FAFC;
  --bg-elev: #FFFFFF;
  --ink: #0F172A;
  --ink-2: #475569;
  --ink-3: #94A3B8;
  --line: #E2E8F0;
  --line-strong: #CBD5E1;
  --accent: #E5322D;
  --accent-ink: #FFFFFF;
  --accent-soft: #FCEDEC;
  --good: #16A34A;
  --live: #16A34A;
  --warn: #F59E0B;
  --info: #2563EB;

  /* Route colors (metro-like palette) */
  --r-1: #E5322D;
  --r-2: #F59E0B;
  --r-3: #16A34A;
  --r-4: #2563EB;
  --r-5: #7C3AED;
  --r-6: #0891B2;
  --r-7: #DB2777;
  --r-8: #4B5563;

  /* Aliasing for compatibility */
  --primary: var(--accent);
  --primary-hover: #c42723;
  --primary-light: var(--accent-soft);
  --primary-border: #fca5a5;
  --text-main: var(--ink);
  --text-muted: var(--ink-3);
  --text-light: #94a3b8;
  --bg-page: var(--bg);
  --bg-card: var(--bg-elev);
  --border-color: var(--line);
  --badge-green-bg: #dcfce7;
  --badge-green-text: #166534;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.04);
  --shadow-md: 0 4px 12px -2px rgb(0 0 0 / 0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* Numeric tabular for schedule times */
.tnum, .num, time { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 20px 48px;
  box-sizing: border-box;
}

/* Header & Breadcrumbs */
.breadcrumb-nav {
  margin-bottom: 12px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
}
.back-link:hover {
  text-decoration: underline;
}

/* Route Title Header */
.route-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}
.route-title-wrap h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.35;
  margin: 0;
}
.route-endpoints {
  font-size: 15px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}
.route-actions {
  display: flex;
  gap: 8px;
}
.icon-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.15s;
}
.icon-btn:hover {
  background: var(--bg-page);
  border-color: var(--text-light);
}

/* Top Navigation Tabs */
.nav-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.tab-btn {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}
.tab-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}
.tab-btn:hover:not(.active) {
  background: var(--bg-page);
  color: var(--text-main);
}

/* Direction Bar & Date Bar */
.direction-date-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.btn-switch-dir {
  background: #ffffff;
  border: 1px solid var(--primary);
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 9999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s;
}
.btn-switch-dir:hover {
  background: var(--primary-light);
}
.date-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.date-label {
  font-size: 13px;
  color: var(--text-muted);
}
.date-label strong {
  color: var(--text-main);
}
.verified-tag {
  color: #16a34a;
  font-weight: 600;
  font-size: 13px;
  margin-left: 6px;
}
.date-pills {
  display: flex;
  background: var(--bg-page);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}
.date-pill {
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  background: transparent;
}
.date-pill.active {
  background: var(--primary);
  color: #ffffff;
}

/* Nearest Departures Card */
.nearest-departures-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.nearest-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}
.nearest-header h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--primary);
  text-transform: uppercase;
}
.live-clock-badge {
  font-size: 13px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  gap: 6px;
}
.live-clock-badge strong {
  color: var(--text-main);
}

.nearest-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nearest-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.15s;
}
.nearest-row:hover {
  background: var(--primary-light);
  border-color: var(--primary-border);
}
.nearest-row.selected {
  background: var(--primary-light);
  border-color: var(--primary);
}
.nearest-time {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.selected-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: #dbeafe;
  padding: 2px 6px;
  border-radius: 4px;
}
.choose-badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}
.nearest-wait {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Evening Finished Banner */
.evening-status-banner {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 12px;
  color: #92400e;
  font-size: 14px;
  font-weight: 500;
}

/* Two Column Layout */
.content-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: start;
}

/* Left Column: Stops Timeline Sidebar */
.stops-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.stops-sidebar-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
}
.stops-sidebar-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.stop-search-box {
  position: relative;
  margin-bottom: 16px;
}
.stop-search-box input {
  width: 100%;
  padding: 8px 12px 8px 32px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
}
.stop-search-box input:focus {
  border-color: var(--primary);
}
.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 13px;
}

/* Timeline */
.timeline-list {
  position: relative;
  list-style: none;
  padding-left: 20px;
}
.timeline-list::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: #cbd5e1;
}
.timeline-item {
  position: relative;
  padding-bottom: 18px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 2px #cbd5e1;
}
.timeline-item.first::before {
  background: #16a34a;
  box-shadow: 0 0 0 2px #bbf7d0;
}
.timeline-stop-name {
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
}
.timeline-stop-name:hover {
  color: var(--primary);
  text-decoration: underline;
}
.timeline-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 9999px;
  background: var(--primary-light);
  color: var(--primary);
  white-space: nowrap;
}
.timeline-item.first .timeline-badge {
  background: var(--badge-green-bg);
  color: var(--badge-green-text);
}

/* Right Column: Main Schedule Card */
.main-schedule-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.schedule-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.schedule-card-title {
  font-size: 18px;
  font-weight: 700;
}
.departure-dropdown {
  font-size: 13px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--primary);
  font-weight: 500;
}

/* Verified banner */
.verified-interval-box {
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: #1e3a8a;
  font-weight: 500;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Days Switcher */
.days-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.weekdays-group {
  display: flex;
  gap: 4px;
}
.day-tab {
  width: 34px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
}
.day-tab.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* Trip Selector & Stop Search Row */
.trip-filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}
.filter-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.filter-field select,
.filter-field input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: #ffffff;
}

/* Schedule Table */
.schedule-table-wrap {
  overflow-x: auto;
}
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.schedule-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--border-color);
}
.schedule-table th:last-child {
  text-align: right;
}
.schedule-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
}
.schedule-table td:last-child {
  text-align: right;
}
.schedule-table tr:hover td {
  background: var(--bg-page);
}
.stop-idx {
  color: var(--text-light);
  font-weight: 600;
}
.stop-offset {
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-page);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
}
.time-pill-arrival {
  background: #dbeafe;
  color: #1e40af;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  display: inline-block;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* Hourly Matrix Accordion */
.hourly-accordion {
  margin-top: 24px;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}
.hourly-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hourly-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}
.hourly-cell {
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.hourly-hour {
  font-weight: 700;
  font-size: 14px;
  color: var(--primary);
}
.hourly-mins {
  font-size: 13px;
  color: var(--text-main);
}

/* Responsive */
@media (max-width: 900px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
  .trip-filter-row {
    grid-template-columns: 1fr;
  }
  .route-title-wrap h1 {
    font-size: 22px;
  }
}

/* === STATIONS & STATIONS CATALOG STYLES === */
.station-search-box {
  margin: 16px 0 20px;
}
.station-search-input {
  width: 100%;
  max-width: 480px;
  padding: 12px 16px;
  font-size: 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-main);
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.station-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.station-alpha-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
}
.station-alpha-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: all 0.15s;
}
.station-alpha-link:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.station-letter-section {
  margin-bottom: 28px;
}
.station-letter-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  border-bottom: 2px solid var(--primary-border);
  padding-bottom: 6px;
  margin-bottom: 12px;
}
.station-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.station-card-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.15s, border-color 0.15s;
}
.station-card-item:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}
.station-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}
.station-card-routes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.station-route-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.station-route-badge:hover {
  background: var(--primary);
  color: #fff;
}
.station-detail-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-top: 16px;
}
.station-passing-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.station-passing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.15s;
}
.station-passing-row:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.station-passing-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.station-passing-pill {
  font-weight: 700;
  font-size: 15px;
  color: var(--primary);
}
.station-passing-dir {
  font-size: 14px;
  color: var(--text-main);
}
.station-passing-action {
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
}


/* === ADVANCED STATION PAGE (1fr + 340px) === */
.station-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}
.station-title-wrap h1 {
  font-size: 26px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
}
.station-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}
.station-actions {
  display: flex;
  gap: 8px;
}
.station-btn-action {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
}
.station-btn-action:hover {
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary);
}
.station-btn-action.active {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #b45309;
}

/* Grid Layout: 1fr + 340px */
.station-page-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

/* Date/Time Bar */
.station-datetime-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
  gap: 10px;
}
.station-today-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}
.station-live-clock {
  font-size: 13px;
  color: var(--primary);
  font-weight: 700;
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}
.station-day-tabs {
  display: flex;
  background: var(--bg-page);
  border-radius: var(--radius-sm);
  padding: 2px;
  border: 1px solid var(--border-color);
}
.station-day-btn {
  background: transparent;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.station-day-btn.active {
  background: var(--primary);
  color: #fff;
}

/* Live Board */
.station-live-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.station-live-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}
.station-live-pulse {
  font-size: 12px;
  font-weight: 500;
  color: #16a34a;
  display: flex;
  align-items: center;
  gap: 5px;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  background: #16a34a;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}
.station-live-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.station-live-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.15s;
  gap: 12px;
}
.station-live-row:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-1px);
}
.station-live-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.station-live-badge {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  background: #fff;
  border: 1px solid var(--primary-border);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.station-live-dir {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.station-live-right {
  display: flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
}
.station-live-time {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
}
.station-live-countdown {
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 9999px;
}
.station-live-action {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
}

/* Route Chips & Cards */
.station-chips-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.station-chips-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
}
.station-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.station-route-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  transition: all 0.15s;
}
.station-route-chip:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Station Routes List / Cards Redesign */
.station-routes-block {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.station-routes-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}
.station-routes-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
}
.station-count-pill {
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-page);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 2px 8px;
  border-radius: 9999px;
}
.station-routes-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}
.station-routes-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 12px;
}
@media (max-width: 640px) {
  .station-routes-cards-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}
.station-route-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.station-route-card:hover {
  background: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}
.src-badge-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  min-width: 72px;
}
.src-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  letter-spacing: -0.01em;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.src-type-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.src-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.src-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.station-route-card:hover .src-title {
  color: var(--primary);
}
.src-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  flex-wrap: wrap;
}
.src-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.src-meta-dot {
  opacity: 0.5;
}
.src-arrow-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--border-color);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  transition: all 0.15s;
}
.station-route-card:hover .src-arrow-wrap {
  background: var(--primary);
  color: #fff;
  transform: translateX(2px);
}

/* Collapsible Details/Summary */
.station-schedule-accordion {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.station-schedule-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  user-select: none;
  list-style: none;
}
.station-schedule-summary::-webkit-details-marker {
  display: none;
}
.station-summary-btn {
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.station-schedule-accordion[open] .station-summary-btn {
  background: var(--text-muted);
}
.station-schedule-content {
  padding: 0 20px 20px;
  border-top: 1px solid var(--border-color);
}
.station-matrix-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 13px;
}
.station-matrix-table th {
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  text-align: left;
  font-weight: 700;
  color: var(--text-muted);
}
.station-matrix-table td {
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  vertical-align: top;
}
.matrix-hour {
  font-weight: 700;
  color: var(--primary);
  background: var(--bg-page);
  text-align: center;
  width: 60px;
}
.matrix-times-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.matrix-time-item {
  font-family: inherit;
  font-weight: 500;
  color: var(--text-main);
  background: var(--bg-page);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

/* Sidebar Styles */
.station-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.station-sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.station-sidebar-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}
.station-passport-table {
  width: 100%;
  font-size: 13px;
  border-collapse: collapse;
}
.station-passport-table tr {
  border-bottom: 1px solid var(--border-color);
}
.station-passport-table tr:last-child {
  border-bottom: none;
}
.passport-label {
  padding: 8px 0;
  color: var(--text-muted);
  font-weight: 500;
}
.passport-val {
  padding: 8px 0;
  text-align: right;
  font-weight: 600;
  color: var(--text-main);
}
.sidebar-other-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-other-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  transition: all 0.15s;
}
.sidebar-other-item:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

/* Toast */
.station-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1e293b;
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
  pointer-events: none;
}
.station-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (max-width: 900px) {
  .station-page-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   ROUTE PAGE REDESIGN 2026 (Full Width, Timetable & Stops List)
   ========================================================================== */

.route-header-endpoints {
  color: var(--primary);
  font-weight: 700;
  display: inline-block;
  margin-left: 6px;
}

/* Hourly Timetable (Сводная таблица по часам) */
.hourly-timetable-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.hourly-timetable-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}
.hourly-timetable-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}
.hourly-timetable-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}
.hourly-matrix-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hourly-matrix-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
  padding: 8px 0;
  gap: 14px;
}
.hourly-matrix-row:last-child {
  border-bottom: none;
}
.hourly-matrix-hour {
  min-width: 62px;
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  text-align: center;
}
.hourly-matrix-mins {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}
.min-pill {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.12s ease;
  user-select: none;
}
.min-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #ffffff;
  transform: translateY(-1px);
}
.min-pill.selected {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.35);
}

/* Stops Section (Full Width) */
.stops-section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.stops-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.stops-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}
.route-start-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
}
.route-stops-search {
  margin-bottom: 16px;
  position: relative;
}
.route-stops-search input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: #ffffff;
}
.route-stops-search .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--text-light);
}

.stops-table-wrap {
  overflow-x: auto;
}
.stops-table {
  width: 100%;
  border-collapse: collapse;
}
.stops-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg-page);
  border-bottom: 2px solid var(--border-color);
}
.stops-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  vertical-align: middle;
}
.stops-table tr:hover td {
  background: var(--primary-light);
}
.stop-link {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
.stop-link:hover {
  color: var(--primary);
  text-decoration: underline;
}
.stop-offset-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-page);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}
.stop-arrival-pill {
  font-size: 14px;
  font-weight: 700;
  color: #1e40af;
  background: #dbeafe;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  display: inline-block;
}

/* Transport Type Catalog Page (e.g. /minsk/bus/) */
.type-catalog-header {
  margin-bottom: 24px;
}
.type-catalog-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}
.type-catalog-subtitle {
  font-size: 15px;
  color: var(--text-muted);
}
.type-quick-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 24px;
}
.type-quick-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s;
}
.type-quick-tab:hover,
.type-quick-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}


/* ==========================================================================
   SITE HEADER & FULL BREADCRUMBS
   ========================================================================== */

.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.header-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-main);
  font-size: 17px;
  font-weight: 800;
}
.logo-icon {
  font-size: 22px;
}
.logo-text span {
  color: var(--primary);
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.header-nav::-webkit-scrollbar {
  display: none;
}
.header-nav-link {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  transition: all 0.15s;
}
.header-nav-link:hover {
  color: var(--primary);
  background: var(--primary-light);
}
.header-nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
}
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-badge {
  font-size: 12px;
  font-weight: 600;
  background: #f1f5f9;
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  white-space: nowrap;
}

/* Full Breadcrumbs Trail */
.full-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  margin: 16px 0 20px;
  color: var(--text-light);
}
.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.breadcrumb-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
.breadcrumb-link:hover {
  text-decoration: underline;
}
.breadcrumb-sep {
  color: #94a3b8;
  font-size: 12px;
}
.breadcrumb-current {
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================================================
   VERTICAL ROUTE CARDS (FULL WIDTH STACK)
   ========================================================================== */

.routes-vertical-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}
.route-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  gap: 16px;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}
.route-item-card:hover {
  border-color: var(--primary);
  background: #fbfdff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.route-item-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}
.route-badge-box {
  min-width: 78px;
  text-align: center;
  padding: 8px 12px;
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-sm);
  color: var(--primary);
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
}
.route-item-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.route-item-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.route-meta-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.meta-pill {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-page);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  white-space: nowrap;
}
.meta-pill.highlight {
  color: #166534;
  background: #f0fdf4;
  border-color: #bbf7d0;
  font-weight: 600;
}
.route-item-right {
  display: flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
}
.route-fare-badge {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}
.route-view-btn {
  background: var(--primary);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s;
}
.route-item-card:hover .route-view-btn {
  background: #1d4ed8;
}

/* ==========================================================================
   ANTI-МПК CONTENT SECTIONS (INFO GUIDE & FAQ)
   ========================================================================== */

.content-guide-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin: 32px 0 24px;
  box-shadow: var(--shadow-sm);
}
.content-guide-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 14px;
}
.content-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.guide-card {
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.guide-card-header {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.guide-card-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* FAQ Accordion Block */
.faq-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin: 20px 0 12px;
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.faq-item {
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.faq-question {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-answer {
  padding: 0 16px 14px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   MOBILE VIEWPORT OPTIMIZATIONS (max-width: 768px)
   ========================================================================== */

@media (max-width: 768px) {
  .header-container {
    height: auto;
    padding: 10px 14px;
    flex-wrap: wrap;
  }
  .header-nav {
    order: 3;
    width: 100%;
    padding-top: 6px;
    border-top: 1px solid #f1f5f9;
  }
  .route-item-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
  }
  .route-item-left {
    width: 100%;
    align-items: flex-start;
    gap: 12px;
  }
  .route-item-title {
    white-space: normal;
  }
  .route-item-right {
    width: 100%;
    justify-content: space-between;
    border-top: 1px solid #f1f5f9;
    padding-top: 10px;
  }
  .route-view-btn {
    flex: 1;
    text-align: center;
  }
  .hourly-matrix-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .hourly-matrix-hour {
    width: 100%;
    text-align: left;
  }
  .content-guide-section {
    padding: 16px 18px;
  }
  .route-header {
    flex-direction: column;
    gap: 10px;
  }
  .route-title-wrap h1 {
    font-size: 20px;
    line-height: 1.35;
  }
}


/* ==========================================================================
   UNIFIED STOPS & HOURLY SCHEDULE TABLE (Merged Single Table 2026)
   ========================================================================== */

.unified-schedule-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.unified-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 14px;
}
.unified-card-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
}
.unified-card-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}
.unified-filter-toolbar {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.unified-search-box {
  flex: 1;
  min-width: 240px;
  position: relative;
}
.unified-search-box input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: #ffffff;
}
.unified-search-box .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 13px;
}
.hour-filter-scroll {
  display: flex;
  overflow-x: auto;
  max-width: 100%;
}
.hour-filter-pills {
  display: flex;
  gap: 6px;
  padding-bottom: 2px;
}
.hour-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 9999px;
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.hour-pill:hover {
  background: #ffffff;
  border-color: var(--primary);
  color: var(--primary);
}
.hour-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

.unified-table-wrap {
  overflow-x: auto;
}
.unified-table {
  width: 100%;
  border-collapse: collapse;
}
.unified-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg-page);
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}
.unified-table td {
  padding: 12px 12px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  vertical-align: middle;
}
.unified-table tr:hover td {
  background: var(--primary-light);
}

.col-num {
  width: 40px;
  color: var(--text-light);
  font-weight: 700;
}
.col-stop {
  min-width: 180px;
}
.col-offset {
  width: 90px;
}
.col-arrival {
  width: 110px;
}
.col-schedule {
  min-width: 280px;
}

.badge-start {
  font-size: 11px;
  color: #16a34a;
  font-weight: 700;
  margin-left: 4px;
}
.badge-end {
  font-size: 11px;
  color: #dc2626;
  font-weight: 700;
  margin-left: 4px;
}

.stop-hourly-wrap {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  overflow-x: auto;
  max-width: 100%;
}
.stop-hour-block {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 3px 6px;
  flex-shrink: 0;
  white-space: nowrap;
}
.stop-hour-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--primary);
  margin-right: 2px;
}
.stop-hour-mins {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
}

.unified-scroll-hint {
  display: none;
}
@media (max-width: 768px) {
  .unified-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .unified-table {
    min-width: 560px;
  }
  .unified-scroll-hint {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
  }
}

/* ─────────────────────────────────────────────────────────
   DESIGN HANDOFF COMPONENT STYLES
   ───────────────────────────────────────────────────────── */

/* Route badge — square colored tile with the number */
.route-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 26px;
  padding: 0 6px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  background: var(--accent);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.route-badge.lg {
  min-width: 48px;
  height: 40px;
  border-radius: 10px;
  font-size: 20px;
}
.route-badge.sm {
  min-width: 26px;
  height: 20px;
  font-size: 11px;
  padding: 0 4px;
  border-radius: 4px;
}
.route-badge.huge {
  min-width: 62px;
  height: 46px;
  border-radius: 12px;
  font-size: 22px;
}

/* Live pulse dot */
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.6);
  animation: pulse 1.8s ease-out infinite;
  display: inline-block;
  flex-shrink: 0;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
  70% { box-shadow: 0 0 0 8px transparent; opacity: 0.8; }
  100% { opacity: 1; }
}

/* Chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.chip:hover {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--line-strong);
}
/* Chip active / solid pill */
.chip--solid, .chip.active {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  height: 32px !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  background: var(--ink) !important;
  color: #FFFFFF !important;
  border: 1px solid var(--ink) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important;
}
.chip--accent {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

/* Segmented control */
.seg {
  display: inline-flex;
  padding: 3px;
  background: var(--line);
  border-radius: 12px;
  gap: 0;
}
.seg button {
  padding: 7px 14px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s;
}
.seg button.active {
  background: var(--bg-elev);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05), 0 1px 0 rgba(0,0,0,0.03);
}

/* Weekday pills */
.days {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}
.days button {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s;
}
.days button:hover {
  border-color: var(--ink-3);
}
.days button.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.days button.today {
  border-color: var(--accent);
  color: var(--accent);
}
.days button.today.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* Countdown hero */
.countdown {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.countdown .cd-num {
  font-size: 80px;
  line-height: 0.9;
  font-weight: 800;
}
.countdown .cd-sep {
  font-size: 56px;
  line-height: 0.9;
  color: var(--ink-3);
  font-weight: 600;
}
.countdown .cd-unit {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-3);
  margin-left: 8px;
}
@media (max-width: 600px) {
  .countdown .cd-num { font-size: 58px; }
  .countdown .cd-sep { font-size: 42px; }
}

.countdown-hero-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px 24px 22px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}
.countdown-hero-card .hero-circle-accent {
  position: absolute;
  right: -40px;
  top: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.06;
  pointer-events: none;
}

/* Nearest departure rows */
.dep-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s;
}
.dep-row:last-child { border-bottom: 0; }
.dep-row:hover { background: var(--accent-soft); }
.dep-row .time {
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--ink);
  min-width: 72px;
}
.dep-row.active .time { color: var(--accent); }
.dep-row .meta { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.dep-row .eta-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.dep-row.past { opacity: 0.4; }
.dep-row.past .time { text-decoration: line-through; }

/* Base Card from Design Prototype */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* Route stats strip */
.route-stat-strip {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 6px;
  display: flex;
  justify-content: space-around;
  text-align: center;
  align-items: center;
  box-shadow: var(--shadow-sm);
}
.route-stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  flex: 1;
  min-width: 0;
  padding: 2px 4px;
}
.route-stat-val {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.route-stat-lbl {
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 600;
}
.route-stat-divider {
  width: 1px;
  align-self: stretch;
  background: var(--line);
}

/* Hour-by-hour schedule grid (.hourstrip) */
#hourly-schedule-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2px 24px;
}
.hourstrip {
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  border-bottom: 1px dashed var(--line);
  min-width: 0;
}
.hourstrip:last-child { border-bottom: 0; }
.hourstrip.active-hour {
  background: color-mix(in oklab, currentColor 6%, transparent);
  border-radius: 6px;
}
.hourstrip .hour {
  font-weight: 800;
  font-size: 14px;
  color: currentColor;
  font-variant-numeric: tabular-nums;
}
.hourstrip .mins {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}
.hourstrip .min {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  min-width: 28px;
  height: 24px;
  text-align: center;
  cursor: pointer;
  padding: 0 5px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-family: inherit;
  line-height: 1;
  transition: all 0.12s;
  user-select: none;
  box-sizing: border-box;
  outline: none;
}
.hourstrip .min:hover {
  background: color-mix(in oklab, currentColor 12%, transparent);
  color: currentColor;
  border-color: color-mix(in oklab, currentColor 30%, transparent);
}
.hourstrip .min.now {
  background: var(--accent, #E5322D);
  color: #ffffff;
  border-color: var(--accent, #E5322D);
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(229, 50, 45, 0.35);
}
.hourstrip .min.past {
  color: var(--ink-3);
  opacity: 0.55;
  background: transparent;
  border-color: transparent;
}

/* Stop Row with Metro Line Diagram (.stop-row-diagram) */
.stop-row-diagram {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  position: relative;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s;
}
.stop-row-diagram:last-child { border-bottom: none; }
.stop-row-diagram:hover { background: var(--accent-soft); }
.stop-track {
  position: relative;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stop-track .line-top {
  position: absolute;
  top: 0;
  left: 50%;
  width: 3px;
  height: 50%;
  background: currentColor;
  transform: translateX(-50%);
}
.stop-track .line-bottom {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 3px;
  height: 50%;
  background: currentColor;
  transform: translateX(-50%);
}
.stop-track .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-elev);
  border: 3px solid currentColor;
  position: relative;
  z-index: 1;
}
.stop-track .dot.big {
  width: 14px;
  height: 14px;
  background: currentColor;
}
.stop-track .pulse-ring {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.25;
  animation: pulse 1.8s infinite ease-out;
}
.stop-diagram-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  color: var(--ink);
}
.stop-diagram-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.stop-diagram-idx {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.stop-diagram-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.stop-diagram-sub {
  font-size: 11px;
  color: var(--ink-3);
}
.stop-diagram-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  color: var(--ink);
}
.stop-diagram-time {
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.stop-diagram-arriving {
  font-size: 11px;
  color: var(--live);
  font-weight: 700;
}

/* Hide / show departures helpers */
.desktop-departures-card { display: block; }
.mobile-departures-card { display: none; }
@media (max-width: 960px) {
  .desktop-departures-card { display: none; }
  .mobile-departures-card { display: block; }
}

/* Top Navbar (Desktop) */
.top-navbar {
  background: var(--bg-elev);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.top-navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}
.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.03em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  font-weight: 700;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--accent);
}
.nav-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 12px;
  min-width: 240px;
  position: relative;
}
.nav-search input {
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  width: 100%;
}
.nav-search kbd {
  font-size: 10px;
  padding: 2px 5px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-weight: 700;
  color: var(--ink-3);
}
.global-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  max-width: 90vw;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.14), 0 4px 12px rgba(15, 23, 42, 0.06);
  max-height: 420px;
  overflow-y: auto;
  z-index: 1000;
  padding: 8px;
  text-align: left;
}
.gs-section-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3, #94a3b8);
  padding: 8px 10px 4px;
}
.gs-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink, #0f172a);
  transition: background 0.15s ease;
}
.gs-result-item:hover,
.gs-result-item.is-selected {
  background: var(--bg-elev, #f1f5f9);
}
.gs-item-badge {
  font-size: 16px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg, #f8fafc);
  border-radius: 6px;
  flex-shrink: 0;
}
.gs-item-body {
  flex: 1;
  min-width: 0;
}
.gs-item-title {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink, #0f172a);
}
.gs-item-sub {
  font-size: 11px;
  color: var(--ink-3, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gs-arrow {
  font-size: 16px;
  color: var(--ink-3, #94a3b8);
  margin-left: 4px;
}
.gs-empty {
  padding: 24px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-3, #64748b);
}
.gs-empty span {
  display: block;
  font-size: 24px;
  margin-bottom: 6px;
}
.gs-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 8px 10px;
}
.gs-quick-chip {
  padding: 4px 10px;
  background: var(--bg, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2, #334155);
  text-decoration: none;
  transition: all 0.15s ease;
}
.gs-quick-chip:hover {
  background: var(--line, #e2e8f0);
  color: var(--ink, #0f172a);
}
.gs-quick-chip.accent {
  background: var(--accent-soft, #fee2e2);
  border-color: rgba(229, 50, 45, 0.2);
  color: var(--accent, #e5322d);
  font-weight: 700;
}
.nav-live {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--live);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
}
@media (max-width: 860px) {
  .nav-search { display: none; }
  .top-navbar-inner { gap: 12px; padding: 10px 14px; }
}

/* App Header (Sticky bar on mobile / section header) */
.app-header {
  padding: 12px 0 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.app-header .back {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  transition: all 0.15s;
}
.app-header .back:hover {
  background: var(--bg);
  border-color: var(--line-strong);
}
.app-header .title {
  flex: 1;
  min-width: 0;
}
.app-header .title .kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.app-header .title h1 {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}

/* Route card in city list and catalogs */
.route-card {
  position: relative;
  padding: 14px 16px 14px 20px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.route-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.line-strip {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
}
.route-card-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.route-card-type-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.route-card-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.route-card-title .arrow {
  margin: 0 6px;
  color: var(--ink-3);
  font-weight: 500;
}
.mini-line {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 5px 0;
  color: var(--accent);
}
.mini-line .stop {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.mini-line .stop.big {
  width: 10px;
  height: 10px;
}
.mini-line .seg {
  flex: 1;
  height: 3px;
  background: currentColor;
  padding: 0;
  border-radius: 0;
  min-width: 8px;
  opacity: 0.4;
}
.route-card-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.route-card-right .fare-badge {
  font-size: 12px;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.route-card-right .chevron {
  color: var(--ink-3);
  font-size: 18px;
  font-weight: 700;
}

/* Station Live Board */
.now-arriving {
  background: linear-gradient(135deg, var(--accent), color-mix(in oklab, var(--accent) 80%, #000));
  color: var(--accent-ink);
  border-radius: 20px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 10px 30px -8px color-mix(in oklab, var(--accent) 40%, transparent);
  margin-bottom: 20px;
}
.board-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.board-row:hover { background: var(--accent-soft); }
.board-row:last-child { border-bottom: 0; }
.board-row .dest {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.board-row .dep-time {
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.board-row .cnt {
  font-size: 12px;
  font-weight: 700;
  color: var(--live);
  min-width: 70px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.board-row.now .cnt { color: var(--accent); }

/* Passport Card */
.passport-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 20px;
}
.passport-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.passport-row:last-child { border-bottom: none; }
.passport-row .label {
  color: var(--ink-3);
  font-weight: 600;
}
.passport-row .value {
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* Search Hero */
.search-hero {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 8px 24px rgba(0,0,0,0.04);
}
.search-hero input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.search-hero input::placeholder { color: var(--ink-3); font-weight: 500; }

/* Cities grid */
.cities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.cities-grid .city {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.cities-grid .city:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.cities-grid .city .name { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
.cities-grid .city .meta { font-size: 12px; color: var(--ink-3); font-weight: 600; }

/* Quick tiles */
.quick-tile {
  padding: 16px 18px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 16px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.quick-tile:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.quick-tile .qt-icon { font-size: 24px; color: var(--accent); }
.quick-tile .qt-label { font-size: 15px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
.quick-tile .qt-hint { font-size: 12px; color: var(--ink-3); font-weight: 600; }

/* Desktop 2-column layout */
.route-desktop-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
  margin-top: 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.route-main-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}
.route-sidebar-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

/* ==========================================================================
   MOBILE & SMALL TABLET VIEWPORT OPTIMIZATIONS (Tight paddings & zero overflow)
   ========================================================================== */
@media (max-width: 960px) {
  .route-desktop-layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 10px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .route-main-col, .route-sidebar-col {
    gap: 14px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 10px 12px 32px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Breadcrumbs */
  .breadcrumb-nav {
    margin-bottom: 8px;
    font-size: 12px;
  }

  /* Top Navbar */
  .top-navbar {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }
  .top-navbar-inner {
    padding: 8px 12px;
    gap: 10px;
  }
  .brand-logo {
    width: 28px;
    height: 28px;
    font-size: 15px;
    border-radius: 8px;
  }
  .brand-link {
    font-size: 14px;
    gap: 8px;
  }
  .nav-links {
    gap: 10px;
    font-size: 12px;
  }

  /* Route Header */
  .route-header {
    gap: 8px;
    margin-bottom: 10px;
  }
  .route-title-wrap h1 {
    font-size: 18px;
    line-height: 1.3;
  }
  .route-meta-row {
    font-size: 12px;
    gap: 4px;
  }

  /* Route Direction & Date Controls */
  .route-controls-card {
    padding: 10px 12px !important;
    margin-bottom: 12px !important;
    border-radius: 12px !important;
  }
  #btn-switch-direction-pill {
    width: 100%;
    padding: 7px 10px;
    font-size: 12px;
    border-radius: 8px;
    justify-content: flex-start;
  }
  .days button {
    width: 32px;
    height: 32px;
    font-size: 12px;
    border-radius: 8px;
  }
  .seg {
    border-radius: 10px;
    padding: 2px;
  }
  .seg button {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 7px;
  }

  /* Countdown Hero Card */
  .countdown-hero-card {
    padding: 14px 14px !important;
    border-radius: 14px !important;
    margin-bottom: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .countdown .cd-num {
    font-size: 46px !important;
    line-height: 0.9 !important;
  }
  .countdown .cd-sep {
    font-size: 34px !important;
    line-height: 0.9 !important;
  }
  .countdown .cd-unit {
    font-size: 12px !important;
    margin-left: 4px !important;
  }
  .countdown-hero-card .hero-circle-accent {
    width: 130px;
    height: 130px;
    right: -25px;
    top: -25px;
  }

  /* Unified Schedule Card & Table */
  .unified-schedule-card {
    padding: 12px 10px !important;
    border-radius: 14px !important;
    margin-bottom: 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
  }
  .unified-card-header {
    margin-bottom: 8px;
    padding-bottom: 8px;
    gap: 8px;
  }
  .unified-card-title {
    font-size: 15px;
  }
  .unified-card-subtitle {
    font-size: 11px;
    margin-top: 2px;
  }
  .route-start-badge {
    padding: 4px 8px;
    font-size: 11px;
  }
  .unified-filter-toolbar {
    gap: 8px;
    margin-bottom: 8px;
  }
  .unified-search-box {
    width: 100%;
    min-width: 0;
  }
  .unified-search-box input {
    padding: 7px 10px 7px 30px;
    font-size: 13px;
  }
  .hour-pill {
    padding: 4px 8px;
    font-size: 11px;
  }
  .unified-table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .unified-table th {
    padding: 6px 6px;
    font-size: 10px;
  }
  .unified-table td {
    padding: 8px 6px;
    font-size: 13px;
  }
  .col-num {
    width: 24px;
    padding-left: 2px;
    font-size: 12px;
  }
  .col-stop {
    min-width: 120px;
    font-size: 13px;
  }
  .col-offset {
    width: 60px;
    font-size: 11px;
  }
  .col-arrival {
    width: 70px;
  }
  .stop-arrival-pill {
    padding: 2px 6px;
    font-size: 12px;
  }
  .col-schedule {
    min-width: 200px;
  }
  .stop-hourly-wrap {
    gap: 3px !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    align-items: center !important;
  }
  .stop-hour-block {
    padding: 2px 4px !important;
    font-size: 11px !important;
    border-radius: 4px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }

  /* Station Page */
  .app-header {
    padding: 8px 0 6px;
    gap: 8px;
    margin-bottom: 8px;
  }
  .app-header .back {
    width: 32px;
    height: 32px;
    font-size: 14px;
    border-radius: 10px;
  }
  .app-header .title .kicker {
    font-size: 10px;
  }
  .app-header .title {
    font-size: 15px;
  }
  .now-arriving {
    padding: 12px 14px;
    border-radius: 14px;
    margin-bottom: 12px;
    gap: 10px;
  }
  .now-arriving #hero-dest {
    font-size: 15px !important;
  }
  .now-arriving #hero-time {
    font-size: 24px !important;
  }
  .board-row {
    padding: 9px 12px;
    gap: 8px;
  }
  .board-row .dest {
    font-size: 13px;
  }
  .board-row .dep-time {
    font-size: 14px;
  }
  .board-row .cnt {
    font-size: 11px;
    min-width: 52px;
  }

  /* Cards & Lists */
  .passport-card {
    padding: 12px 14px;
    border-radius: 14px;
    margin-bottom: 12px;
  }
  .passport-row {
    padding: 6px 0;
    font-size: 12px;
  }
  .route-card {
    padding: 10px 12px 10px 14px;
    gap: 8px;
    border-radius: 12px;
    margin-bottom: 8px;
  }
  .route-card-title {
    font-size: 14px;
  }
  .content-guide-section {
    padding: 14px 14px;
    margin: 16px 0 14px;
    border-radius: 14px;
  }
  .content-guide-title {
    font-size: 16px;
    margin-bottom: 10px;
  }
  .content-guide-grid {
    gap: 8px;
    margin-bottom: 12px;
  }
  .guide-card {
    padding: 10px 12px;
  }
  .faq-question {
    padding: 10px 12px;
    font-size: 13px;
  }
  .faq-answer {
    padding: 0 12px 10px;
    font-size: 12px;
  }
  .cities-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
  }
  .cities-grid .city {
    padding: 10px 12px;
    border-radius: 12px;
  }
  .quick-tile {
    padding: 12px 14px;
    border-radius: 14px;
  }
}


/* Bottom tab bar (mobile PWA / iOS native style) */
.tabbar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(250, 248, 245, 0.94);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--line, #e5e7eb);
  grid-template-columns: repeat(5, 1fr);
  padding: 6px 2px calc(env(safe-area-inset-bottom, 0px) + 6px);
  gap: 2px;
  z-index: 9999;
}
@media (max-width: 860px) {
  .tabbar {
    display: grid;
  }
  body {
    padding-bottom: 74px !important;
  }
}
.tabbar a, .tabbar button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 5px 0 3px;
  color: var(--ink-3, #64748b);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease, transform 0.1s ease;
}
.tabbar a:active, .tabbar button:active {
  transform: scale(0.92);
}
.tabbar a.active, .tabbar button.active {
  color: var(--accent, #e5322d);
}
.tabbar a svg, .tabbar button svg {
  display: block;
  stroke: currentColor;
}

/* Mobile Search Overlay */
.mobile-search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  padding: 16px;
  align-items: flex-start;
  justify-content: center;
}
.mso-content {
  background: var(--card-bg, #ffffff);
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
  overflow: hidden;
  margin-top: 20px;
}
.mso-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line, #e2e8f0);
}
.mso-header input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink, #0f172a);
  background: transparent;
}
.mso-close {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: var(--ink-3, #64748b);
  cursor: pointer;
  padding: 4px 8px;
}
.mso-results {
  padding: 8px 12px;
  overflow-y: auto;
  max-height: 65vh;
}

/* ── Aviasales / Travelpayouts Aviation Widgets ── */
.avia-widget-card,
.avia-popular-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid #eef2f6;
  margin: 28px 0;
  overflow: hidden;
}
.avia-widget-header,
.avia-popular-header {
  padding: 16px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #edf2f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.avia-title,
.avia-popular-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}
.avia-popular-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.avia-icon {
  font-size: 1.25rem;
  margin-right: 8px;
}
/* Юридический лейбл ERID */
.ad-erid-label {
  font-size: 0.75rem;
  color: #94a3b8;
  letter-spacing: 0.02em;
}
.avia-widget-body,
.avia-popular-body {
  padding: 20px;
  min-height: 250px;
}
@media (max-width: 768px) {
  .avia-widget-header,
  .avia-popular-header {
    flex-direction: column;
    align-items: flex-start;
  }
}



/* Collapsible hourly schedule wrapper & expand button */
.hourly-schedule-wrapper {
  position: relative;
  overflow: hidden;
  transition: max-height 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.hourly-schedule-wrapper.is-collapsed {
  max-height: 220px;
}
.hourly-schedule-wrapper.is-expanded {
  max-height: 2500px;
}
.hourly-fade-overlay {
  display: none;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--bg-elev, #ffffff) 92%);
  pointer-events: none;
}
.hourly-schedule-wrapper.is-collapsed .hourly-fade-overlay {
  display: block;
}

.hourly-expand-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  margin-top: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 10px;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.hourly-expand-btn:hover {
  background: var(--line);
  border-color: var(--line-strong);
  color: var(--ink);
}
.hourly-expand-btn:active {
  transform: scale(0.99);
}
.hourly-expand-btn .btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--line);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  transition: transform 0.2s ease;
}
.hourly-schedule-wrapper.is-expanded + .hourly-expand-btn .btn-icon {
  transform: rotate(180deg);
}

/* ==========================================================================
   TRAIN HUB & INDIVIDUAL TRAIN PAGES (INTERCITY EXPRESS & ROUTE HUBS)
   ========================================================================== */

.route-hub-header {
  margin-bottom: 24px;
}
.route-kicker {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3, #64748b);
  margin-bottom: 8px;
}
.route-hub-header h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--ink-1, #0f172a);
  line-height: 1.25;
  margin: 0 0 10px 0;
}
.route-subtitle {
  font-size: 15px;
  color: var(--ink-2, #475569);
  line-height: 1.5;
  margin: 0;
}

/* Sorting toolbar */
.route-sort-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.sort-tab {
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 9999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2, #475569);
  background: var(--surface, #ffffff);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.sort-tab:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}
.sort-tab.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.15);
}

/* Train route card */
.train-route-card {
  background: var(--surface, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.train-route-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.train-card-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.train-card-timing {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 290px;
}
.timing-node {
  text-align: left;
}
.timing-time {
  font-size: 24px;
  font-weight: 800;
  color: var(--ink-1, #0f172a);
  line-height: 1.1;
  font-feature-settings: "tnum";
}
.timing-station {
  font-size: 13px;
  color: var(--ink-3, #64748b);
  margin-top: 3px;
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.timing-arrow-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.timing-duration-pill {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.timing-arrow-line {
  width: 50px;
  height: 2px;
  background: #cbd5e1;
  position: relative;
}
.timing-arrow-line::after {
  content: "→";
  position: absolute;
  right: -6px;
  top: -8px;
  font-size: 12px;
  color: #94a3b8;
}

.train-card-info {
  flex: 1;
  min-width: 0;
}
.train-number-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
  font-size: 13px;
  padding: 3px 10px;
  border-radius: 6px;
}
.train-title-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-1, #1e293b);
  margin: 6px 0 8px 0;
}
.train-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.train-badge {
  font-size: 12px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}
.train-badge.fare {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
  font-weight: 700;
}

.train-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 170px;
}
.btn-route-stops {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  text-decoration: none;
  transition: background 0.15s ease;
}
.btn-route-stops:hover {
  background: #edf2f7;
  border-color: #94a3b8;
}
.btn-buy-ticket {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  background: #ff5722;
  border: 1px solid #f4511e;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 4px rgba(255,87,34,0.2);
}
.btn-buy-ticket:hover {
  background: #f4511e;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(255,87,34,0.3);
}

/* Accordion for Partner Widget */
.train-widget-accordion {
  display: none;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--line, #e2e8f0);
}
.train-widget-accordion.open {
  display: block;
}
.widget-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.widget-drawer-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-1, #1e293b);
}
.widget-drawer-close {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3, #64748b);
  background: #f1f5f9;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
}
.widget-drawer-close:hover {
  background: #e2e8f0;
}
.partner-widget-mount {
  min-height: 120px;
  border-radius: 8px;
  overflow: hidden;
}

/* ==========================================================================
   INDIVIDUAL TRAIN PAGE (HERO, KPIS, STOPS TABLE)
   ========================================================================== */

.train-hero-card {
  background: #ffffff;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.train-hero-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.hero-endpoint {
  min-width: 200px;
}
.hero-endpoint.origin {
  text-align: left;
}
.hero-endpoint.destination {
  text-align: right;
}
.hero-time {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  font-feature-settings: "tnum";
}
.hero-time.origin {
  color: #059669;
}
.hero-time.destination {
  color: #2563eb;
}
.hero-station {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-1, #1e293b);
  margin-top: 4px;
}
.hero-city-tag {
  font-size: 12px;
  color: var(--ink-3, #64748b);
  margin-top: 2px;
}

.hero-track-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.hero-track-pill {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  background: #f1f5f9;
  padding: 4px 12px;
  border-radius: 9999px;
}
.hero-track-line {
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #10b981 0%, #3b82f6 100%);
  border-radius: 2px;
  position: relative;
}
.hero-track-line::before {
  content: "";
  position: absolute;
  left: 0;
  top: -4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px #dcfce7;
}
.hero-track-line::after {
  content: "";
  position: absolute;
  right: 0;
  top: -4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 0 3px #dbeafe;
}
.hero-stops-count {
  font-size: 12px;
  color: var(--ink-3, #64748b);
  font-weight: 600;
}

/* 6 KPI Cards Grid */
.train-kpis-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.kpi-card {
  background: #f8fafc;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
  padding: 12px 14px;
}
.kpi-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink-3, #64748b);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.kpi-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-1, #0f172a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Ticket Hero Widget Section */
.train-ticket-hero {
  background: #ffffff;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 28px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.train-ticket-hero-title {
  font-size: 16px;
  font-weight: 750;
  color: var(--ink-1, #0f172a);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Stops Table Section */
.train-stops-section {
  margin-top: 28px;
}
.stops-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 16px;
}
.stops-header-titles h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink-1, #0f172a);
  margin: 0 0 4px 0;
}
.stops-header-subtitle {
  font-size: 14px;
  color: var(--ink-3, #64748b);
  margin: 0;
}
.stops-pill-counter {
  font-size: 13px;
  font-weight: 700;
  color: #0369a1;
  background: #e0f2fe;
  padding: 4px 12px;
  border-radius: 9999px;
  white-space: nowrap;
}

.train-stops-table-wrap {
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.train-stops-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.train-stops-table th {
  background: #f8fafc;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink-3, #64748b);
  border-bottom: 1px solid var(--line, #e2e8f0);
  letter-spacing: 0.5px;
}
.train-stops-table td {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--ink-1, #1e293b);
  border-bottom: 1px solid #f1f5f9;
}
.train-stops-table tr:last-child td {
  border-bottom: none;
}
.train-stops-table tr.origin-row {
  background: rgba(16, 185, 129, 0.04);
  border-left: 4px solid #10b981;
}
.train-stops-table tr.dest-row {
  background: rgba(59, 130, 246, 0.04);
  border-left: 4px solid #3b82f6;
}
.origin-badge {
  font-size: 11px;
  font-weight: 700;
  background: #dcfce7;
  color: #15803d;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 6px;
}
.dest-badge {
  font-size: 11px;
  font-weight: 700;
  background: #dbeafe;
  color: #1d4ed8;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 6px;
}
.hub-badge {
  font-size: 11px;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}
.stop-duration-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 3px 10px;
  border-radius: 9999px;
}
.time-green {
  color: #059669;
  font-weight: 700;
}
.time-blue {
  color: #2563eb;
  font-weight: 700;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .train-kpis-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .train-card-main {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .train-card-timing {
    justify-content: space-between;
    min-width: 0;
  }
  .train-card-actions {
    flex-direction: row;
    width: 100%;
  }
  .btn-route-stops, .btn-buy-ticket {
    flex: 1;
    text-align: center;
  }
  .train-hero-main {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .hero-endpoint.origin, .hero-endpoint.destination {
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
  }
  .train-kpis-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .train-stops-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ==========================================================================
   PORTAL FOOTER & CURRENCY INFO STYLING
   ========================================================================== */

.footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 40px 0 24px 0;
  margin-top: 50px;
  border-top: 1px solid #1e293b;
}
.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  margin-bottom: 24px;
}
.footer-col {
  display: flex;
  flex-direction: column;
}
.footer-title {
  color: #ffffff;
  font-size: 15px;
  font-weight: 750;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-text {
  font-size: 13px;
  line-height: 1.6;
  color: #94a3b8;
  max-width: 520px;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.15s ease;
}
.footer-links a:hover {
  color: #38bdf8;
  text-decoration: underline;
}
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 20px;
  font-size: 12px;
  color: #64748b;
  text-align: center;
}

/* Back to hub button link */
.back-to-hub-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #f1f5f9;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
  margin-top: 24px;
}
.back-to-hub-link:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #94a3b8;
}

/* Currency info note */
.train-ticket-hero-note {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 13px;
}
.currency-pill {
  font-weight: 750;
  color: #15803d;
  background: #dcfce7;
  padding: 3px 10px;
  border-radius: 9999px;
  white-space: nowrap;
}
.currency-sub {
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
