:root {
  --ink: #10233c;
  --muted: #64748b;
  --line: #dce5ee;
  --soft: #f4f7fa;
  --paper: #ffffff;
  --navy: #0b1f36;
  --blue: #1479ff;
  --cyan: #22c9d6;
  --green: #14966f;
  --amber: #dc7a08;
  --red: #d9463e;
  --shadow: 0 16px 45px rgba(18, 39, 63, .08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #edf5fb 0, #f7f9fb 380px, #f7f9fb 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
a { color: inherit; }
button, input { font: inherit; }
.shell { width: min(1240px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 14px; background: #fff; border-radius: 8px; }
.skip-link:focus { top: 12px; }

.site-header { position: sticky; top: 0; z-index: 20; color: #fff; background: rgba(11,31,54,.97); border-bottom: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(14px); }
.header-inner { min-height: 74px; display: flex; align-items: center; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; white-space: nowrap; }
.brand > span:last-child { display: flex; align-items: baseline; font-size: 18px; letter-spacing: -.03em; }
.brand strong { font-weight: 800; }
.brand em { color: var(--cyan); font-style: normal; font-weight: 800; }
.brand-signal { display: grid; gap: 3px; width: 30px; }
.brand-signal i { display: block; height: 3px; border-radius: 9px; background: var(--cyan); }
.brand-signal i:nth-child(2) { width: 74%; background: #fff; }
.brand-signal i:nth-child(3) { width: 46%; }
.preprod { display: inline-flex; align-items: center; gap: 7px; color: #c9d8e7; font-size: 12px; font-weight: 750; letter-spacing: .03em; }
.preprod i { width: 8px; height: 8px; border-radius: 50%; background: #f6b94a; box-shadow: 0 0 0 4px rgba(246,185,74,.12); }
.main-nav { margin-left: auto; display: flex; align-items: center; gap: 5px; }
.main-nav a { padding: 9px 12px; border-radius: 9px; color: #d7e3ee; text-decoration: none; font-size: 14px; font-weight: 700; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.1); }

.main-shell { padding-block: 44px 72px; }
.dashboard-head { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(330px,.75fr); align-items: end; gap: 48px; padding: 18px 0 48px; }
.eyebrow { margin: 0 0 8px; color: #40708f; font-size: 12px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
h1, h2 { margin: 0; letter-spacing: -.035em; line-height: 1.08; }
h1 { max-width: 820px; font-size: clamp(2.25rem, 5vw, 4.35rem); }
h2 { font-size: clamp(1.35rem, 2.2vw, 1.85rem); }
.lead { max-width: 760px; margin: 20px 0 0; color: #536a80; font-size: 18px; }
.search-form { padding: 18px; background: rgba(255,255,255,.8); border: 1px solid #d5e2ec; border-radius: var(--radius); box-shadow: var(--shadow); }
.search-form label { display: block; margin-bottom: 9px; font-size: 13px; font-weight: 800; }
.search-form > div { display: flex; gap: 8px; }
.search-form input { width: 100%; min-width: 0; height: 48px; padding: 0 14px; color: var(--ink); background: #fff; border: 1px solid #cbd8e3; border-radius: 11px; outline: none; }
.search-form input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(20,121,255,.1); }
.search-form button, .button { min-height: 48px; padding: 0 18px; color: #fff; background: var(--blue); border: 0; border-radius: 11px; font-weight: 800; cursor: pointer; text-decoration: none; }
.search-form button:hover, .button:hover { background: #0968dc; }

.section-title-row, .panel-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.section-title-row { margin-bottom: 18px; }
.freshness { padding: 7px 10px; color: #3e637d; background: #e6f1f8; border-radius: 99px; font-size: 12px; font-weight: 750; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.kpi { position: relative; min-height: 148px; padding: 21px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 25px rgba(18,39,63,.04); }
.kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--cyan); }
.kpi-warn::before { background: var(--amber); }
.kpi-danger::before { background: var(--red); }
.kpi span { display: block; color: var(--muted); font-size: 13px; font-weight: 750; }
.kpi strong { display: block; margin: 8px 0 4px; font-size: clamp(1.8rem, 3vw, 2.65rem); line-height: 1; letter-spacing: -.05em; }
.kpi small { color: #8292a3; }
.kpi-grid.compact { margin-bottom: 18px; }
.kpi-grid.compact .kpi { min-height: 118px; }

.content-grid { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(280px,.7fr); gap: 18px; margin-top: 18px; align-items: start; }
.panel { padding: 24px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 28px rgba(18,39,63,.04); }
.panel-heading { margin-bottom: 18px; }
.panel-heading > span, .panel-heading > a { color: #668096; font-size: 12px; font-weight: 750; }
.panel-heading > a { color: var(--blue); text-decoration: none; }
.run-list { display: grid; }
.run-row { display: grid; grid-template-columns: 92px minmax(0,1fr) 140px; align-items: center; gap: 16px; min-height: 82px; padding: 12px 4px; border-top: 1px solid #edf1f4; text-decoration: none; }
.run-row:first-child { border-top: 0; }
.run-row:hover .journey strong { color: var(--blue); }
.train-id { display: flex; flex-direction: column; }
.train-id small { color: #678096; font-size: 10px; font-weight: 850; letter-spacing: .08em; }
.train-id strong { font-size: 20px; }
.journey { display: grid; grid-template-columns: minmax(0,1fr) 24px minmax(0,1fr); align-items: center; gap: 5px; }
.journey strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.journey i { color: #91a4b6; font-style: normal; text-align: center; }
.journey small { grid-column: 1/-1; color: #8292a3; font-size: 11px; }
.delay { display: inline-flex; justify-content: center; align-items: center; min-height: 30px; padding: 5px 10px; border-radius: 99px; font-size: 12px; font-weight: 850; white-space: nowrap; }
.delay-ok { color: #087859; background: #e1f7ef; }
.delay-warn { color: #9a5506; background: #fff0d8; }
.delay-danger { color: #b12925; background: #ffe4e2; }
.source-list { display: grid; gap: 6px; }
.source-row { display: grid; grid-template-columns: 10px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid #edf1f4; }
.source-row:first-child { border-top: 0; }
.source-row strong, .source-row small { display: block; }
.source-row strong { font-size: 13px; }
.source-row small { color: #8192a3; font-size: 11px; }
.health-dot { width: 9px; height: 9px; border-radius: 50%; background: #94a3b8; box-shadow: 0 0 0 4px #f1f5f9; }
.health-dot.is-ok { background: var(--green); box-shadow: 0 0 0 4px #e4f7f0; }
.health-dot.is-warn { background: var(--amber); box-shadow: 0 0 0 4px #fff1dc; }
.pill { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 9px; border-radius: 99px; color: #496174; background: #edf2f6; font-size: 11px; font-weight: 800; white-space: nowrap; }
.pill-ok { color: #087859; background: #e1f7ef; }
.pill-warn { color: #9a5506; background: #fff0d8; }
.pill-danger { color: #b12925; background: #ffe4e2; }
.alert-list { display: grid; gap: 10px; }
.alert-card { display: flex; gap: 13px; padding: 16px; background: #fff9ef; border: 1px solid #f4dfbc; border-radius: 13px; }
.alert-card > span { display: grid; place-items: center; flex: 0 0 30px; height: 30px; color: #995708; background: #ffe7bd; border-radius: 50%; font-weight: 900; }
.alert-card > div { min-width: 0; }
.alert-card strong { font-size: 14px; }
.alert-card p { margin: 4px 0; overflow-wrap: anywhere; color: #6c6255; font-size: 13px; }
.alert-card small { color: #9a8870; }
.history-panel { background: var(--navy); color: #fff; }
.history-panel .eyebrow { color: #74dbe3; }
.history-panel > strong { display: block; margin: 22px 0 4px; font-size: 42px; letter-spacing: -.05em; }
.history-panel p { color: #b9c8d6; }
.text-link { color: var(--cyan); font-weight: 800; text-decoration: none; }

.page-head { max-width: 900px; margin-bottom: 30px; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
.page-head > p:not(.eyebrow) { max-width: 700px; color: #5b7185; font-size: 18px; }
.page-head .search-form { max-width: 720px; margin-top: 25px; }
.search-results { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.link-list { display: grid; }
.link-list a { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px 2px; border-top: 1px solid #edf1f4; text-decoration: none; }
.link-list a:first-child { border-top: 0; }
.link-list a:hover strong { color: var(--blue); }
.link-list strong, .link-list small { display: block; }
.link-list small { color: #8192a3; }
.link-list i { color: var(--blue); font-style: normal; }
.empty-state { padding: 28px; color: #60768a; background: var(--soft); border: 1px dashed #cddae5; border-radius: 13px; text-align: center; }
.empty-state strong { color: var(--ink); }
.empty-state p { margin: 5px 0 0; font-size: 14px; }

.detail-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 35px; margin-bottom: 24px; padding: 28px; color: #fff; background: var(--navy); border-radius: 24px; box-shadow: var(--shadow); }
.detail-head .eyebrow { color: var(--cyan); }
.detail-head h1 { font-size: clamp(2.5rem, 6vw, 4.8rem); }
.title-line { display: flex; align-items: center; gap: 14px; }
.type-badge { padding: 7px 10px; color: var(--navy); background: var(--cyan); border-radius: 8px; font-size: 12px; font-weight: 900; }
.route-title { margin: 14px 0; color: #c7d5e2; font-size: 18px; font-weight: 700; }
.route-title i { padding: 0 7px; color: var(--cyan); font-style: normal; }
.pill-row { display: flex; flex-wrap: wrap; gap: 7px; }
.detail-facts { min-width: 290px; display: grid; gap: 10px; }
.detail-facts div { padding: 11px 14px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: 11px; }
.detail-facts span, .detail-facts strong { display: block; }
.detail-facts span { color: #9fb2c3; font-size: 11px; }
.detail-facts strong { margin-top: 2px; font-size: 14px; }
.coordinate-card { min-width: 275px; padding: 18px; color: var(--ink); background: #fff; border-radius: 14px; }
.coordinate-card span, .coordinate-card strong, .coordinate-card small { display: block; }
.coordinate-card span, .coordinate-card small { color: #718498; }
.coordinate-card span { font-size: 11px; font-weight: 800; text-transform: uppercase; }
.coordinate-card strong { margin: 5px 0; }
.coordinate-card small { font-size: 11px; }
.stats-strip { display: grid; grid-template-columns: repeat(4,1fr); margin-bottom: 18px; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.stats-strip > div { padding: 18px 20px; border-left: 1px solid var(--line); }
.stats-strip > div:first-child { border-left: 0; }
.stats-strip span, .stats-strip strong { display: block; }
.stats-strip span { color: #718498; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.stats-strip strong { margin-top: 5px; font-size: 19px; }

.reliability-panel { margin: 18px 0; overflow: hidden; }
.reliability-main { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 28px; }
.reliability-main p:not(.eyebrow) { max-width: 760px; margin: 9px 0 0; color: #61768a; }
.score { display: grid; min-width: 170px; min-height: 132px; align-content: center; justify-items: center; padding: 18px; border: 1px solid var(--line); border-radius: 16px; text-align: center; }
.score span, .score small { color: #718498; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.score strong { margin: 4px 0; font-size: 42px; line-height: 1; letter-spacing: -.05em; }
.score-neutral { background: #f4f7fa; }
.score-neutral strong { font-size: 22px; }
.score-ok { color: #087859; background: #eaf8f3; border-color: #c8eadf; }
.score-warn { color: #9a5506; background: #fff7e9; border-color: #f3dfbb; }
.score-danger { color: #b12925; background: #fff0ef; border-color: #f3cfcd; }
.reliability-kpis { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 18px; }
.reliability-kpis > div { padding: 15px; background: var(--soft); border-radius: 12px; }
.reliability-kpis span, .reliability-kpis strong, .reliability-kpis small { display: block; }
.reliability-kpis span { color: #6f8396; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.reliability-kpis strong { margin: 4px 0; font-size: 21px; }
.reliability-kpis small { color: #8091a2; font-size: 11px; }
.calibration { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.calibration > strong { font-size: 13px; }
.progress-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-top: 11px; }
.progress-item span { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.progress-item b, .progress-item small { font-size: 11px; }
.progress-item small { color: #72869a; }
.progress-item progress { width: 100%; height: 8px; overflow: hidden; border: 0; border-radius: 99px; background: #dce5ed; }
.progress-item progress::-webkit-progress-bar { background: #dce5ed; border-radius: 99px; }
.progress-item progress::-webkit-progress-value { background: var(--blue); border-radius: 99px; }
.progress-item progress::-moz-progress-bar { background: var(--blue); border-radius: 99px; }

.history-head { max-width: 980px; }
.history-layout { grid-template-columns: minmax(0,2fr) minmax(270px,.65fr); }
.calibration-note { background: #eef6ff; border-color: #cfe2f7; }
.calibration-note p:not(.eyebrow) { color: #5e7489; }
.table-link, .back-link { color: #076bdc; font-weight: 800; text-decoration: none; }
.back-link { display: inline-flex; margin-top: 10px; font-size: 13px; }
.ranking-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; align-items: start; }
.rank-list { display: grid; }
.rank-list > a { display: grid; grid-template-columns: minmax(120px,1fr) minmax(130px,.7fr) auto; align-items: center; gap: 14px; min-height: 67px; padding: 10px 2px; border-top: 1px solid #edf1f4; text-decoration: none; }
.rank-list > a:first-child { border-top: 0; }
.rank-list > a:hover strong { color: var(--blue); }
.rank-list > a > span:not(.train-id):not(.route-mini) strong, .rank-list > a > span:not(.train-id):not(.route-mini) small { display: block; }
.rank-list > a > span:not(.train-id):not(.route-mini) small { color: #8192a3; font-size: 10px; }
.route-mini { display: grid; grid-template-columns: minmax(0,1fr) 18px minmax(0,1fr); align-items: center; gap: 4px; min-width: 0; }
.route-mini strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.route-mini i { color: #91a4b6; font-style: normal; text-align: center; }
.metric-list { display: grid; grid-template-columns: 1fr auto; gap: 11px 20px; margin: 24px 0 0; }
.metric-list dt { color: #708497; }
.metric-list dd { margin: 0; font-weight: 850; }
.day-runs > a { grid-template-columns: 85px minmax(0,1fr) auto; }
.compact-ranks { grid-template-columns: repeat(2,1fr); gap: 0 22px; }
.compact-ranks > a { grid-template-columns: minmax(90px,.7fr) 1fr 1fr; }
.liaison-head { align-items: center; }
.liaison-head h1 { max-width: 850px; font-size: clamp(2rem, 4.6vw, 4rem); }
.liaison-head h1 i { color: var(--cyan); font-style: normal; }
.liaison-head > div:first-child > p:last-child { max-width: 760px; color: #b9c8d6; }
.station-explorer-head { padding-top: 6px; }
.station-index-grid { margin-bottom: 18px; }
.station-ranks > a { grid-template-columns: minmax(170px,1.3fr) minmax(105px,.55fr) minmax(100px,.55fr) auto; }
.station-ranks > a > span:first-child strong,
.station-ranks > a > span:first-child small { display: block; }
.station-ranks > a > span:first-child small { color: #8192a3; font-size: 10px; }
.station-destinations > a { grid-template-columns: minmax(230px,1.4fr) minmax(110px,.55fr) minmax(100px,.5fr) auto; }
.station-method { margin-top: 18px; }

.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; display: grid; grid-template-columns: minmax(190px,1.4fr) 90px 90px 125px; align-items: center; gap: 14px; min-height: 70px; margin-left: 11px; padding: 9px 0 9px 30px; border-left: 2px solid #d7e2eb; }
.timeline li:first-child { padding-top: 0; }
.timeline li:last-child { padding-bottom: 0; }
.timeline-dot { position: absolute; left: -7px; top: calc(50% - 6px); width: 12px; height: 12px; background: #fff; border: 3px solid var(--blue); border-radius: 50%; }
.timeline .is-terminal .timeline-dot { width: 15px; height: 15px; left: -8.5px; background: var(--blue); }
.stop-name a, .stop-name strong { display: block; font-weight: 800; text-decoration: none; }
.stop-name a:hover { color: var(--blue); }
.stop-name small, .stop-time span { display: block; color: #8697a8; font-size: 10px; }
.stop-time strong { font-size: 14px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 12px 10px; border-top: 1px solid #e8eef3; text-align: left; white-space: nowrap; }
th { color: #6d8294; background: #f7f9fb; font-size: 11px; text-transform: uppercase; }
thead th { border-top: 0; }
.station-events { display: grid; }
.station-events a { display: grid; grid-template-columns: 110px minmax(0,1fr) 130px; align-items: center; gap: 14px; padding: 12px 2px; border-top: 1px solid #edf1f4; text-decoration: none; }
.station-events a:first-child { border-top: 0; }
.station-events a > span:nth-child(2) strong, .station-events a > span:nth-child(2) small { display: block; }
.station-events a > span:nth-child(2) small { color: #8192a3; }
.tag-list { display: grid; gap: 8px; max-height: 560px; overflow: auto; }
.tag-list > span { padding: 11px; background: var(--soft); border-radius: 10px; }
.tag-list strong, .tag-list small { display: block; }
.tag-list strong { font-size: 12px; }
.tag-list small { color: #76899b; font-size: 10px; }

.source-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.source-cards article { padding: 17px; border: 1px solid var(--line); border-radius: 13px; }
.source-cards article > div:first-child { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.source-cards .pill { margin-bottom: 10px; }
.source-cards dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0; font-size: 11px; }
.source-cards dt { color: #7b8da0; }
.source-cards dd { margin: 0; font-weight: 750; text-align: right; }

.method-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 18px; }
.method-grid article { padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.method-grid article > span { color: var(--blue); font-size: 13px; font-weight: 900; }
.method-grid h2 { margin-top: 28px; font-size: 20px; }
.method-grid p, .prose p { color: #60758a; }
.prose { max-width: 900px; }
.prose h2 { margin-top: 30px; }
.prose h2:first-child { margin-top: 0; }
.not-found { max-width: 720px; min-height: 52vh; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.not-found p:not(.eyebrow) { color: #61778b; font-size: 18px; }
.not-found .button { display: inline-flex; align-items: center; margin-top: 12px; }

.site-footer { padding: 34px 0; color: #c3d0dc; background: var(--navy); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr .7fr; gap: 35px; }
.footer-grid span { color: #7f98ad; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.footer-grid p { margin: 6px 0 0; color: #9db0c0; font-size: 12px; }

@media (max-width: 980px) {
  .header-inner { flex-wrap: wrap; padding-block: 12px; }
  .preprod { margin-left: auto; }
  .main-nav { width: 100%; order: 3; margin-left: 0; overflow-x: auto; }
  .dashboard-head, .content-grid { grid-template-columns: 1fr; }
  .dashboard-head { gap: 24px; }
  .kpi-grid, .stats-strip { grid-template-columns: repeat(2,1fr); }
  .stats-strip > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .stats-strip > div:nth-child(4) { border-top: 1px solid var(--line); }
  .method-grid { grid-template-columns: repeat(2,1fr); }
  .source-cards { grid-template-columns: 1fr; }
  .history-layout, .ranking-grid { grid-template-columns: 1fr; }
  .compact-ranks { grid-template-columns: 1fr; }
  .station-ranks > a, .station-destinations > a { grid-template-columns: minmax(170px,1fr) repeat(2,minmax(90px,.5fr)) auto; }
}

@media (max-width: 700px) {
  .shell { width: min(100% - 24px, 1240px); }
  .main-shell { padding-block: 26px 48px; }
  .brand > span:last-child { font-size: 16px; }
  .preprod { font-size: 10px; }
  .main-nav a { padding: 7px 9px; font-size: 12px; }
  .dashboard-head { padding: 8px 0 34px; }
  h1 { font-size: 2.45rem; }
  .lead, .page-head > p:not(.eyebrow) { font-size: 16px; }
  .search-form > div { flex-direction: column; }
  .search-form button { width: 100%; }
  .section-title-row { align-items: flex-start; flex-direction: column; gap: 9px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .kpi { min-height: 125px; padding: 17px; }
  .kpi strong { font-size: 1.8rem; }
  .panel { padding: 18px; }
  .run-row { grid-template-columns: 70px minmax(0,1fr); gap: 10px; }
  .run-row > .delay { grid-column: 2; justify-self: start; }
  .journey { grid-template-columns: 1fr; }
  .journey i { display: none; }
  .journey strong { white-space: normal; }
  .journey small { grid-column: auto; }
  .search-results { grid-template-columns: 1fr; }
  .detail-head { align-items: stretch; flex-direction: column; padding: 22px; }
  .detail-head h1 { font-size: 3rem; }
  .title-line { flex-wrap: wrap; }
  .detail-facts, .coordinate-card { min-width: 0; }
  .stats-strip { grid-template-columns: 1fr 1fr; }
  .stats-strip > div { padding: 14px; }
  .timeline li { grid-template-columns: minmax(0,1fr) 75px; gap: 8px; padding-block: 14px; }
  .timeline .stop-time:nth-of-type(2) { display: none; }
  .timeline .delay { grid-column: 2; }
  .station-events a { grid-template-columns: 80px 1fr; }
  .station-events .delay { grid-column: 2; justify-self: start; }
  .method-grid { grid-template-columns: 1fr; }
  .reliability-main { grid-template-columns: 1fr; }
  .score { min-width: 0; }
  .reliability-kpis, .progress-grid { grid-template-columns: 1fr; }
  .rank-list > a, .day-runs > a { grid-template-columns: 80px minmax(0,1fr); }
  .rank-list > a > .pill, .rank-list > a > .delay { grid-column: 2; justify-self: start; }
  .rank-list > a > .route-mini:first-child { grid-column: 1 / -1; }
  .compact-ranks > a { grid-template-columns: 80px 1fr; }
  .station-ranks > a, .station-destinations > a { grid-template-columns: 1fr 1fr; }
  .station-ranks > a > span:first-child,
  .station-destinations > a > .route-mini:first-child { grid-column: 1 / -1; }
  .station-ranks > a > .pill,
  .station-destinations > a > .pill { grid-column: 2; justify-self: start; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 440px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: 1fr; }
  .stats-strip > div { border-left: 0; border-top: 1px solid var(--line); }
  .stats-strip > div:first-child { border-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .skip-link { display: none !important; }
  .site-header { position: static; }
  .alert-card, .history-panel, .kpi, .run-row { break-inside: avoid; }
}
