:root {
  --bg:#0b1017;
  --surface:#111821;
  --surface-2:#161f2b;
  --surface-3:#1b2633;
  --line:#243140;
  --line-soft:#1c2733;
  --text:#f4f7fb;
  --text-soft:#aeb9c6;
  --text-muted:#7e8a98;
  --accent:#5aaeff;
  --accent-soft:#122a42;
  --success:#56d39b;
  --warning:#ffbf5b;
  --danger:#ff6f78;
  --radius-sm:10px;
  --radius-md:14px;
  --radius-lg:18px;
  --shadow:0 16px 44px rgba(0,0,0,.18);
  color-scheme:dark;
  font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
*{box-sizing:border-box}
html{background:var(--bg)}
body{margin:0;background:var(--bg);color:var(--text);font-size:15px;line-height:1.45;-webkit-font-smoothing:antialiased}
button,a{font:inherit}
button{color:inherit}
svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.app-shell{min-height:100vh}
.topbar{height:68px;display:flex;align-items:center;justify-content:space-between;padding:0 20px;border-bottom:1px solid var(--line-soft);background:rgba(11,16,23,.94);backdrop-filter:blur(14px);position:sticky;top:0;z-index:20}
.brand{display:flex;align-items:center;gap:11px;text-decoration:none;color:var(--text)}
.brand-mark{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:var(--accent);color:#07111c;font-weight:800;font-size:18px;letter-spacing:-.04em}
.brand-name{font-size:19px;font-weight:720;letter-spacing:-.025em}
.topbar-actions{display:flex;align-items:center;gap:10px}
.icon-button,.avatar-button,.change-station,.view-button,.board-nav button{border:1px solid var(--line);background:var(--surface);cursor:pointer}
.icon-button{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;color:var(--text-soft)}
.avatar-button{width:40px;height:40px;border-radius:12px;font-size:12px;font-weight:700;color:var(--text-soft)}
.page{width:min(100%,1040px);margin:0 auto;padding:22px 16px 44px}
.prototype-note{display:inline-flex;align-items:center;gap:8px;color:var(--text-muted);font-size:12px;margin-bottom:24px}
.prototype-note .dot{width:7px;height:7px;border-radius:50%;background:var(--warning);box-shadow:0 0 0 4px rgba(255,191,91,.09)}
.station-header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:26px}
.eyebrow{margin:0 0 6px;color:var(--text-muted);font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.12em}
.station-title-line{display:flex;align-items:center;gap:12px}
h1{font-size:34px;line-height:1.05;letter-spacing:-.045em;margin:0;font-weight:760}
.station-code{display:inline-flex;align-items:center;height:28px;padding:0 9px;border-radius:8px;background:var(--surface-2);border:1px solid var(--line);color:var(--text-soft);font-weight:700;font-size:12px;letter-spacing:.08em}
.station-subtitle{margin:9px 0 0;color:var(--text-muted);font-size:13px}
.change-station{padding:10px 13px;border-radius:11px;color:var(--text-soft);white-space:nowrap}
.board-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.segmented-control{display:flex;padding:4px;background:var(--surface);border:1px solid var(--line);border-radius:13px}
.segment{border:0;background:transparent;color:var(--text-muted);padding:8px 15px;border-radius:9px;cursor:pointer;font-weight:650;font-size:13px}
.segment.active{background:var(--surface-3);color:var(--text);box-shadow:inset 0 0 0 1px rgba(255,255,255,.035)}
.view-button{display:flex;align-items:center;gap:8px;padding:9px 11px;border-radius:11px;color:var(--text-soft);font-size:13px}
.view-button svg{width:17px;height:17px}
.board{border:1px solid var(--line);border-radius:var(--radius-lg);overflow:hidden;background:var(--surface);box-shadow:var(--shadow)}
.service-row{display:grid;grid-template-columns:78px minmax(0,1fr) 22px;gap:16px;align-items:start;padding:18px;border-bottom:1px solid var(--line-soft);outline:none;transition:background .16s ease}
.service-row:last-child{border-bottom:0}
.service-row:hover,.service-row:focus-visible{background:var(--surface-2)}
.time-block{display:flex;flex-direction:column;gap:7px}
.time-block time{font-size:22px;line-height:1;font-weight:760;letter-spacing:-.035em;font-variant-numeric:tabular-nums}
.status{font-size:12px;font-weight:700;white-space:nowrap}
.status-on-time{color:var(--success)}
.status-delay{color:var(--warning)}
.status-delay-strong{color:#ff9c63}
.status-cancelled{color:var(--danger)}
.service-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
h2{font-size:17px;line-height:1.2;letter-spacing:-.018em;margin:0;font-weight:710}
.platform{display:inline-flex;align-items:center;white-space:nowrap;padding:4px 8px;border-radius:8px;background:var(--accent-soft);color:#9bd0ff;font-size:12px;font-weight:700}
.platform-changed{background:rgba(255,191,91,.11);color:var(--warning)}
.platform-muted{background:var(--surface-3);color:var(--text-muted)}
.calling{color:var(--text-soft);margin:7px 0 10px;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.service-meta{display:flex;align-items:center;gap:7px;flex-wrap:wrap;color:var(--text-muted);font-size:12px}
.meta-divider{opacity:.55}
.formation{margin-left:auto;color:var(--text-soft);font-weight:650;padding:3px 7px;border:1px solid var(--line);border-radius:7px;background:rgba(255,255,255,.015)}
.service-event{display:flex;align-items:center;gap:7px;margin-top:11px;color:#c7d9e9;font-size:12px}
.service-event svg{width:15px;height:15px;color:var(--accent)}
.row-chevron{align-self:center;color:var(--text-muted);font-size:25px;font-weight:300}
.cancelled h2{color:#d8dee6;text-decoration:line-through;text-decoration-thickness:1px;text-decoration-color:#7f4850}
.cancelled .calling{color:#ad7378}
.board-nav{display:grid;grid-template-columns:1fr auto 1fr;gap:10px;margin-top:14px}
.board-nav button{padding:10px 14px;border-radius:11px;color:var(--text-soft);cursor:pointer}
.board-nav button:last-child{justify-self:stretch}
.now-button{min-width:74px;background:var(--surface-2)!important;color:var(--text)!important;font-weight:700}
@media (min-width:720px){
  .topbar{padding:0 30px}
  .page{padding:32px 24px 56px}
  .service-row{grid-template-columns:92px minmax(0,1fr) 24px;padding:20px 22px;gap:20px}
  .time-block time{font-size:24px}
  h2{font-size:18px}
}
@media (max-width:560px){
  .topbar{height:62px;padding:0 14px}
  .brand-name{font-size:18px}
  .page{padding:18px 12px 34px}
  .prototype-note{margin-bottom:19px}
  .station-header{align-items:end;margin-bottom:20px}
  h1{font-size:30px}
  .station-subtitle{font-size:12px}
  .change-station{font-size:12px;padding:9px 10px}
  .view-button span{display:none}
  .view-button{padding:9px}
  .service-row{grid-template-columns:66px minmax(0,1fr) 14px;gap:11px;padding:16px 13px}
  .time-block time{font-size:20px}
  .service-heading{display:block}
  .platform{margin-top:7px}
  .calling{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
  .formation{margin-left:0}
  .row-chevron{font-size:22px}
}

/* Journey prototype */
.journey-topbar-left{display:flex;align-items:center;gap:10px}
.back-button{width:40px;height:40px;display:grid;place-items:center;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--text-soft);text-decoration:none}
.back-button:hover,.back-button:focus-visible{background:var(--surface-2);color:var(--text)}
.compact-brand{gap:9px}
.journey-page{max-width:900px}
.journey-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:18px}
.journey-title-row{display:flex;align-items:center;gap:11px}
.headcode-badge{display:inline-flex;align-items:center;height:28px;padding:0 9px;border-radius:8px;background:var(--surface-2);border:1px solid var(--line);color:var(--text-soft);font-size:12px;font-weight:760;letter-spacing:.05em}
.journey-operator{margin:8px 0 0;color:var(--text-muted);font-size:13px}
.journey-status-panel{display:flex;align-items:flex-end;gap:14px}
.running-pill{display:inline-flex;align-items:center;gap:7px;padding:7px 10px;border-radius:999px;background:rgba(86,211,155,.09);color:var(--success);font-size:12px;font-weight:760;white-space:nowrap}
.running-dot{width:7px;height:7px;border-radius:50%;background:var(--success);box-shadow:0 0 0 4px rgba(86,211,155,.08)}
.journey-delay{display:flex;flex-direction:column;align-items:flex-end;gap:2px}
.journey-delay strong{color:var(--warning);font-size:14px}
.journey-delay span{color:var(--text-muted);font-size:12px}
.journey-summary{display:grid;grid-template-columns:1fr auto 1fr auto 1.35fr;align-items:stretch;border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--surface);box-shadow:var(--shadow);padding:17px 18px;margin-bottom:30px}
.summary-item{display:flex;flex-direction:column;gap:3px;min-width:0}
.summary-item strong{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.summary-item>span:last-child{color:var(--text-muted);font-size:12px}
.summary-label{color:var(--text-muted);font-size:10px!important;font-weight:760;text-transform:uppercase;letter-spacing:.1em}
.summary-divider{width:1px;background:var(--line-soft);margin:0 18px}
.journey-section-header{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:12px}
.journey-section-header .eyebrow{margin-bottom:4px}
.journey-section-header h2{font-size:20px}
.journey-legend{display:flex;align-items:center;gap:14px;color:var(--text-muted);font-size:11px}
.journey-legend span{display:flex;align-items:center;gap:6px}
.legend-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--line)}
.legend-dot.passed{background:var(--success)}
.legend-dot.current{background:var(--accent)}
.timeline{border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--surface);box-shadow:var(--shadow);padding:7px 0}
.stop{display:grid;grid-template-columns:42px minmax(0,1fr);padding:0 18px;min-height:122px}
.stop-marker-column{position:relative;display:flex;justify-content:center}
.stop-marker{position:relative;z-index:2;display:grid;place-items:center;width:18px;height:18px;margin-top:23px;border-radius:50%;background:var(--surface);border:2px solid var(--line)}
.stop-marker svg{width:12px;height:12px;stroke-width:2.4}
.stop-marker-passed{background:var(--success);border-color:var(--success);color:#07140f}
.stop-marker-current{width:22px;height:22px;margin-top:21px;border-color:var(--accent);background:var(--surface);box-shadow:0 0 0 5px rgba(90,174,255,.09)}
.stop-marker-current span{width:8px;height:8px;border-radius:50%;background:var(--accent)}
.stop-marker-future{background:var(--surface);border-color:#405164}
.stop-marker-final{width:20px;height:20px;background:var(--surface);border:5px solid #405164}
.stop-line{position:absolute;top:40px;bottom:-23px;width:2px;background:var(--line)}
.stop-passed .stop-line{background:linear-gradient(var(--success),var(--line))}
.stop-content{padding:18px 0 21px;border-bottom:1px solid var(--line-soft);min-width:0}
.stop-final .stop-content{border-bottom:0}
.stop-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.stop-title-row h3{display:inline;font-size:16px;line-height:1.2;margin:0;font-weight:720;letter-spacing:-.018em}
.stop-code{margin-left:7px;color:var(--text-muted);font-size:10px;font-weight:760;letter-spacing:.08em}
.stop-platform{flex:0 0 auto;color:#9bd0ff;background:var(--accent-soft);font-size:11px;font-weight:720;padding:4px 7px;border-radius:7px}
.stop-times{display:flex;align-items:flex-start;gap:30px;margin-top:12px}
.stop-times>div{display:flex;flex-direction:column;gap:1px}
.stop-times span{color:var(--text-muted);font-size:10px;text-transform:uppercase;letter-spacing:.07em;font-weight:700}
.stop-times strong{font-size:13px;font-variant-numeric:tabular-nums}
.stop-note{margin:9px 0 0;color:var(--text-muted);font-size:12px}
.stop-passed .stop-content{opacity:.62}
.stop-passed:hover .stop-content{opacity:.82}
.current-card{position:relative;margin:7px 0 10px;padding:17px 16px 18px;border:1px solid rgba(90,174,255,.24);border-radius:14px;background:linear-gradient(180deg,rgba(90,174,255,.075),rgba(90,174,255,.025));box-shadow:inset 3px 0 0 rgba(90,174,255,.55)}
.current-label{color:var(--accent);font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.12em;margin-bottom:8px}
.late-time{color:var(--warning)}
.formation-change{display:flex;align-items:flex-start;gap:11px;margin-top:15px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2)}
.formation-change-icon{width:30px;height:30px;display:grid;place-items:center;flex:0 0 auto;border-radius:9px;background:var(--accent-soft);color:var(--accent)}
.formation-change-icon svg{width:16px;height:16px}
.formation-change-body{display:flex;flex-direction:column;gap:2px;min-width:0}
.formation-change-label{color:var(--text-muted);font-size:10px;text-transform:uppercase;letter-spacing:.09em;font-weight:760}
.formation-change-body strong{font-size:13px}
.formation-transition{display:flex;align-items:center;gap:7px;margin-top:5px;color:var(--text-soft);font-size:11px;font-weight:650;flex-wrap:wrap}
.formation-arrow{color:var(--accent)}
.journey-footer-card{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-top:14px;padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}
.journey-footer-card .eyebrow{margin-bottom:3px}
.journey-footer-card strong{font-size:14px}
.journey-footer-muted{color:var(--text-muted);font-size:12px}
.service-row[data-href]{cursor:pointer}
@media (max-width:560px){
  .journey-topbar .compact-brand .brand-name{display:none}
  .journey-hero{align-items:flex-start;flex-direction:column;gap:14px}
  .journey-status-panel{width:100%;align-items:center;justify-content:space-between}
  .journey-delay{align-items:flex-end}
  .journey-summary{grid-template-columns:1fr 1px 1fr;padding:14px}
  .journey-summary .summary-item:nth-of-type(3){grid-column:1/-1;margin-top:14px;padding-top:14px;border-top:1px solid var(--line-soft)}
  .journey-summary .summary-divider:nth-of-type(2){display:none}
  .summary-divider{margin:0 12px}
  .journey-section-header{align-items:flex-start}
  .journey-legend{display:none}
  .timeline{border-radius:15px}
  .stop{grid-template-columns:34px minmax(0,1fr);padding:0 12px;min-height:116px}
  .stop-content{padding:16px 0 19px}
  .stop-title-row h3{font-size:15px}
  .stop-times{gap:21px}
  .current-card{margin-right:0;padding:15px 13px 16px}
  .formation-change{padding:11px}
}

/* Station picker prototype */
.icon-link{display:grid;text-decoration:none}
.change-station-link{display:inline-flex;align-items:center;text-decoration:none}
.stations-page{max-width:760px}
.station-search-header{margin-bottom:20px}
.station-search-header h1{max-width:620px}
.station-search-copy{margin:10px 0 0;color:var(--text-muted);font-size:13px}
.station-search-box{display:flex;align-items:center;gap:11px;height:54px;padding:0 14px;border:1px solid var(--line);border-radius:15px;background:var(--surface);box-shadow:var(--shadow);margin-bottom:12px}
.station-search-box:focus-within{border-color:rgba(90,174,255,.55);box-shadow:0 0 0 3px rgba(90,174,255,.08),var(--shadow)}
.station-search-box>svg{flex:0 0 auto;width:20px;height:20px;color:var(--text-muted)}
.station-search-box input{min-width:0;flex:1;border:0;outline:0;background:transparent;color:var(--text);font:inherit;font-size:15px}
.station-search-box input::placeholder{color:var(--text-muted)}
.search-clear{width:30px;height:30px;border:0;border-radius:9px;background:var(--surface-2);color:var(--text-muted);font-size:20px;line-height:1;cursor:pointer}
.location-row{width:100%;display:grid;grid-template-columns:38px minmax(0,1fr) 18px;align-items:center;gap:12px;text-align:left;padding:13px 14px;border:1px solid var(--line);border-radius:14px;background:var(--surface);color:var(--text);margin-bottom:28px}
.location-row[disabled]{opacity:.55;cursor:not-allowed}
.location-icon{width:36px;height:36px;display:grid;place-items:center;border-radius:10px;background:var(--accent-soft);color:var(--accent)}
.location-icon svg{width:18px;height:18px}
.location-copy{display:flex;flex-direction:column;gap:2px;min-width:0}
.location-copy strong{font-size:13px}
.location-copy small{color:var(--text-muted);font-size:11px}
.location-chevron{justify-self:end;color:var(--text-muted);font-size:22px}
.station-section{margin-top:24px}
.station-section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:10px}
.station-section-heading .eyebrow{margin-bottom:3px}
.station-section-heading h2{font-size:18px}
.result-count{color:var(--text-muted);font-size:11px}
.station-list{border:1px solid var(--line);border-radius:var(--radius-lg);overflow:hidden;background:var(--surface);box-shadow:var(--shadow)}
.station-result{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:64px;padding:12px 14px;border-bottom:1px solid var(--line-soft);color:var(--text);text-decoration:none;transition:background .14s ease}
.station-result:last-child{border-bottom:0}
.station-result:hover,.station-result:focus-visible{background:var(--surface-2);outline:none}
.station-result-main{display:flex;flex-direction:column;gap:3px;min-width:0}
.station-result-name{font-size:14px;font-weight:690;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.station-result-area{color:var(--text-muted);font-size:11px}
.station-result-side{display:flex;align-items:center;gap:9px;flex:0 0 auto}
.station-result-code{display:inline-flex;align-items:center;height:26px;padding:0 8px;border:1px solid var(--line);border-radius:8px;background:var(--surface-2);color:var(--text-soft);font-size:10px;font-weight:800;letter-spacing:.08em}
.recent-badge{color:var(--text-muted);font-size:10px}
.station-result-chevron{color:var(--text-muted);font-size:22px;font-weight:300}
.station-empty{display:flex;flex-direction:column;align-items:center;text-align:center;gap:5px;padding:44px 20px;border:1px dashed var(--line);border-radius:var(--radius-lg);color:var(--text-soft)}
.station-empty-icon{width:42px;height:42px;display:grid;place-items:center;margin-bottom:7px;border-radius:13px;background:var(--surface-2);color:var(--text-muted)}
.station-empty strong{font-size:14px}
.station-empty span{color:var(--text-muted);font-size:12px}
@media (max-width:560px){
  .station-search-header h1{font-size:28px}
  .location-row{margin-bottom:24px}
  .station-result{min-height:61px;padding:11px 12px}
  .recent-badge{display:none}
}
.board-loading,.journey-loading{padding:30px;text-align:center;color:var(--text-muted);font-size:13px}
.service-event{color:var(--warning)}

/* Compact completed calling points */
.stop-passed{min-height:92px}
.stop-passed .stop-content{padding-top:12px;padding-bottom:12px}
.stop-passed .stop-marker{margin-top:16px}
.stop-passed .stop-line{top:34px;bottom:-17px}
@media (max-width:560px){
  .stop-passed{min-height:86px}
  .stop-passed .stop-content{padding-top:11px;padding-bottom:11px}
}
