/* Interportal compact type and spacing scale — MRT Explorer SG 2.1.15.
 * Keep the functional 16px inputs (iOS Safari focus zoom threshold).
 * 12px metadata, 14px ordinary text/actions, 16px prominent text,
 * 20px section titles and 26px primary journey values.
 */
:root{--type-meta:12px;--type-body:14px;--type-emphasis:16px;--type-heading:20px;--type-display:26px;--space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{font-family:Helvetica,Arial,sans-serif;font-size:var(--type-body);line-height:1.4}
button,input,select,textarea{font-family:inherit}
button{font-size:var(--type-body)}
input:not([type=radio]):not([type=checkbox]),select,textarea{font-size:16px}
.site-header .brand-copy strong{font-size:var(--type-emphasis);font-weight:700;letter-spacing:-.02em}
.site-header .brand-copy small,.ip-header-date-label{font-size:var(--type-meta)}
.ip-header-date #actualDate{font-size:16px;width:148px;min-height:32px;padding:4px 6px}
.site-header .header-inner{min-height:54px;padding:6px 0;gap:8px}
.page-shell{margin-top:8px;gap:8px}
.ip-toolbar{padding:3px 0;gap:4px}
.ip-nav{padding:3px;gap:3px;border-radius:11px}
.ip-nav button{min-height:40px;padding:8px 4px;font-size:var(--type-body);font-weight:700;border-radius:8px}
.planner-panel,.result-panel,.ip-panel{padding:16px;border-radius:14px}
.field-label,.option-label,.ip-picker-field-label,.ip-controls label,.ip-board-time-field>label,.metric-label,.clock-point span,.clock-duration small,.eyebrow{font-size:var(--type-meta);font-weight:700;letter-spacing:0;text-transform:none}
.field-label b,.ip-run-steps .ip-picker-field-label b{width:18px;height:18px;min-width:18px;font-size:var(--type-meta)}
.field-label,.station-field{gap:5px}
.field-error{font-size:var(--type-meta);line-height:1.25}
.field-error:empty{display:none}
.journey-inputs{gap:8px}
.station-field input,.station-search>input{height:44px;min-height:44px;padding:0 12px;border-radius:10px;font-size:16px}
.swap-btn{width:44px;height:44px;margin-bottom:0;border-radius:10px;font-size:20px}
.service-mode-controls,.trip-options{gap:10px;margin-top:12px}
.time-control{gap:8px}
.option-label{margin-bottom:5px}
.mode-options,.journey-mode-options,.time-mode-options,.service-day-options{padding:3px;gap:3px;border-radius:10px}
.mode-options span,.journey-mode-options span,.time-mode-options span,.service-day-options span{font-size:var(--type-body);font-weight:600;min-height:36px;padding:4px 5px;line-height:1.2;border-radius:7px;white-space:normal;text-align:center}
.time-input-shell{min-height:44px;border-radius:10px}
.time-input-shell input{height:42px;font-size:16px}
.time-input-shell button{height:32px;font-size:var(--type-body);font-weight:700}
.ip-board-time-value #boardTimePlaceholder{font-size:var(--type-body)}
.ip-controls,.ip-run-steps{gap:8px;margin-bottom:8px}
.ip-picker-field{gap:4px}
.ip-option-trigger{min-height:44px;padding:8px 10px;border-radius:10px}
.ip-option-copy{gap:3px}
.ip-option-copy strong,.ip-option-row .ip-option-copy strong,.ip-train-row-copy strong,.ip-train-trigger-copy strong,.suggestion-name{font-size:var(--type-body);font-weight:700;line-height:1.3}
.ip-option-subtitle,.ip-train-row-copy small,.ip-train-trigger-copy small,.ip-train-context,.ip-meta,.ip-empty,.ip-load-status,#gtfsStatus,.ip-dep-desc small,.ip-working small,.ip-working-copy small,.ip-working-meta,.ip-about-version,.ip-about-note,.station-label small,.segment-minute,.leg-heading span,.wait-copy span,.transfer-copy span,.clock-point small,.estimate-note,.alternative-note,.timeline-range{font-size:var(--type-meta);line-height:1.35}
.ip-option-badge,.ip-line,.suggestion-code,.route-line-pill,.network-badge{font-size:var(--type-meta);font-weight:700}
.ip-option-badge,.ip-line{padding:2px 6px}
.ip-list,.ip-run-results .ip-workings{gap:5px}
.ip-departure,.ip-run-results .ip-working,.ip-run-option{padding:9px 10px;gap:8px;border-radius:10px}
.ip-dep-time{min-width:74px;gap:2px}
.ip-dep-time strong,.ip-dep-desc strong,.ip-working-copy strong,.ip-run-option strong,.ip-train-row-time,.ip-train-trigger-code,.leg-heading strong,.station-label strong,.wait-copy strong,.transfer-copy strong,.ip-connection-head>strong{font-size:var(--type-body);font-weight:700;line-height:1.3}
.result-topline h2,.ip-about-heading h1{font-size:var(--type-heading);line-height:1.2;letter-spacing:-.025em}
.timeline-heading h3,.ip-run-results h2,.ip-about-section h2,.ip-train-sheet-head h2,.ip-option-viewport .ip-train-sheet-head h2{font-size:var(--type-emphasis);font-weight:700;line-height:1.25;letter-spacing:-.015em}
.clock-point strong,.time-hero strong{font-size:var(--type-display);line-height:1.1;letter-spacing:-.045em}
.metric strong{font-size:var(--type-emphasis);margin-top:3px}
.clock-duration>span,.station-clock,.leg-time,.wait-clock,.transfer-clock,.wait-leg>b,.transfer-leg>b,.ip-walk-time,.ip-leg-train-number{font-size:var(--type-meta)!important;font-weight:700}
.result-topline,.result-actions{gap:6px}
.result-mode,.quality-badge,.quick-trip,.live-trip-btn{font-size:var(--type-meta);padding:6px 9px;min-height:36px}
.journey-clock{margin-top:10px;padding:12px;gap:10px;border-radius:12px}
.result-grid{margin-top:8px;border-radius:12px}
.time-hero,.metric{padding:10px 12px}
.route-ribbon{margin-top:10px}
.timeline-heading{margin-top:12px;padding-top:10px;gap:8px}
.route-steps{margin-top:8px;gap:7px}
.leg-head{min-height:44px;padding:8px 10px;gap:8px}
.station-list{padding:4px 10px 6px}
.station-row{min-height:32px}
.wait-leg,.transfer-leg,.ip-connection{padding:9px 10px;gap:7px;border-radius:10px}
.ip-train-trigger{min-height:50px;padding:8px 10px;gap:8px;border-radius:9px}
.ip-train-sheet-head{padding:12px 14px;gap:8px}
.ip-train-sheet-head .eyebrow{margin-bottom:3px}
.ip-train-context{margin-top:3px}
.ip-train-close{width:40px;height:40px}
.ip-train-row,.ip-option-row{min-height:48px;padding:8px 10px;gap:8px;border-radius:9px}
.ip-train-row-copy{gap:2px}
.ip-train-sheet-results{padding-top:8px}
.ip-train-group{font-size:var(--type-meta);padding:5px 8px}
.ip-option-search input{font-size:16px}
.ip-table,.ip-working-table{font-size:var(--type-meta);line-height:1.3}
.ip-table th,.ip-working-table th,.ip-table td small{font-size:var(--type-meta)}
.ip-table th,.ip-table td,.ip-working-table th,.ip-working-table td{padding:6px 4px}
.ip-run-results{margin-top:12px;padding-top:10px}
.ip-run-results h2{margin-bottom:8px}
.ip-about-heading{padding-bottom:12px}
.ip-about-heading p,.ip-about-section p,.ip-about-links a{font-size:var(--type-body);line-height:1.5}
.ip-about-section{padding:12px 0}
.ip-about-section h2{margin-bottom:6px}
.ip-about-links a{padding:9px 10px}
@media(max-width:650px){
  .site-header .header-inner{min-height:52px;width:calc(100% - 20px)}
  .site-header .brand-copy strong{font-size:var(--type-emphasis)}
  .site-header .brand-mark{width:24px}
  .site-header .brand{gap:6px}
  .ip-header-date #actualDate{width:139px;font-size:16px}
  .ip-header-date-label{font-size:var(--type-meta)}
  .page-shell{width:calc(100% - 16px);margin-top:5px}
  .ip-nav button{font-size:var(--type-body);min-height:38px}
  .planner-panel,.result-panel,.ip-panel{padding:12px;border-radius:12px}
  .journey-inputs{grid-template-columns:minmax(0,1fr) 44px;row-gap:8px}
  .journey-mode-options span{font-size:var(--type-body)}
  .clock-point strong,.time-hero strong{font-size:var(--type-display)}
  .station-label strong{font-size:var(--type-body)}
  .ip-run-steps{gap:8px}
}
@media(max-width:340px){
  .site-header .brand-copy strong{font-size:var(--type-body)}
  .site-header .brand-mark{width:21px}
  .ip-header-date #actualDate{width:126px}
  .ip-table th,.ip-table td{padding:5px 2px}
}

/* Align the mark, text and date as one header row. Scale the bars with the
 * container rather than allowing their legacy fixed widths to overflow. */
.site-header{background:#07191e;backdrop-filter:none;-webkit-backdrop-filter:none}
.site-header .header-inner{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;width:min(1160px,calc(100% - 28px));min-height:56px;padding:8px 0}
.site-header .brand{display:flex;gap:10px;align-items:center;min-width:0}
.site-header .brand-mark{width:27px;min-width:27px;flex:0 0 27px;gap:3px}
.site-header .brand-mark i{height:3.5px;max-width:100%}
.site-header .brand-mark i:nth-child(1){width:71%}
.site-header .brand-mark i:nth-child(2){width:100%}
.site-header .brand-mark i:nth-child(3){width:55%}
.site-header .brand-copy strong{font-size:16px;font-weight:700;line-height:1.2;letter-spacing:-.02em;white-space:normal}
.ip-header-date{gap:2px;min-width:0}
.ip-header-date-label{font-size:11px;font-weight:600;line-height:1.1}
.ip-header-date #actualDate{width:136px;min-height:32px;padding:3px 6px;font-size:16px;border-radius:7px}
html[data-view=about] .site-header .header-inner{grid-template-columns:minmax(0,1fr)}
/* Keep the touch area comfortable, but reduce the weight of the controls.
 * All segmented controls share the same font and selected state. */
.ip-nav button,.mode-options span,.journey-mode-options span,.time-mode-options span,.service-day-options span,.time-input-shell button{font-size:14px;font-weight:600;line-height:1.2}
.ip-nav button[aria-selected=true],.mode-options input:checked+span,.journey-mode-options input:checked+span,.time-mode-options input:checked+span,.service-day-options input:checked+span{font-weight:700}
.ip-nav button[aria-selected=true]{box-shadow:none}
.field-label,.option-label,.ip-picker-field-label,.ip-controls label{font-size:13px;font-weight:600;line-height:1.25}
.field-label b,.ip-run-steps .ip-picker-field-label b{font-size:11px;font-weight:700}
.station-field input::placeholder{color:#6b7975}
.planner-panel .route-form{display:grid;gap:12px;margin:0}
.planner-panel .service-mode-controls,.planner-panel .trip-options{margin:0}
.planner-panel .trip-options{align-items:start}
.planner-panel .time-control{gap:6px}
.planner-panel .journey-mode-switch{width:100%}
.planner-panel .journey-mode-options{width:100%;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-flow:row;grid-auto-columns:auto}
.planner-panel .mode-options,.planner-panel .journey-mode-options,.planner-panel .time-mode-options{padding:3px;gap:3px;border-radius:9px}
.planner-panel .mode-options span,.planner-panel .journey-mode-options span,.planner-panel .time-mode-options span{min-height:36px;border-radius:6px;padding:3px 4px}
.planner-panel #timeFieldLabel{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;margin:0;padding:0}
.planner-panel .station-field input{padding-right:36px}
.planner-panel .station-search{min-width:0}
.planner-panel .swap-btn{display:grid;place-items:center;font-size:19px}
.planner-panel .time-input-shell button,.ip-board-time-shell button{font-size:14px;font-weight:600}
.planner-panel,.result-panel,.ip-panel{box-shadow:0 3px 12px #07191e08}
@media(max-width:700px){
  .site-header .header-inner{width:calc(100% - 24px);gap:8px}
  .site-header .brand{gap:8px}
  .ip-header-date #actualDate{width:132px}
  .planner-panel .journey-inputs{grid-template-columns:minmax(0,1fr) 40px;grid-template-areas:"from swap" "to swap";gap:8px 8px;align-items:center}
  .planner-panel .swap-btn{align-self:center;width:40px;height:44px;margin:17px 0 0}
  .planner-panel .journey-mode-options span,.planner-panel .mode-options span,.planner-panel .time-mode-options span,.ip-nav button{font-size:13px}
  .planner-panel .trip-options{gap:10px;grid-template-columns:minmax(0,1fr)}
  .planner-panel .station-field input{padding-left:10px}
  .planner-panel .route-form{gap:10px}
  .planner-panel .station-field{gap:4px}
}
@media(max-width:350px){
  .site-header .brand-mark{width:23px;min-width:23px;flex-basis:23px}
  .site-header .brand{gap:6px}
  .site-header .brand-copy strong{font-size:14px}
  .ip-header-date #actualDate{width:122px}
  .planner-panel .journey-mode-options span,.ip-nav button{font-size:12px}
}

/* Journey results: consistent card insets and an aligned, compact station list.
 * Explicit grid tracks replace the conflicting legacy mobile header layouts. */
.result-panel .route-steps{margin-top:12px;gap:8px;min-width:0}
.result-panel .journey-leg,.result-panel .wait-leg,.result-panel .transfer-leg,.result-panel .ip-connection{border-radius:10px;min-width:0}
.result-panel .leg-head{display:grid;grid-template-columns:40px minmax(0,1fr);grid-template-areas:none;align-items:start;gap:10px;padding:10px 12px;min-height:0}
.result-panel .leg-head>.route-line-pill{grid-area:auto;align-self:start;justify-self:start;min-width:40px;width:auto;max-width:100%;height:24px;padding:0 5px;border-radius:5px;margin-top:1px;font-size:12px}
.result-panel .leg-heading{grid-area:auto;display:grid;gap:4px;min-width:0}
.result-panel .leg-heading>strong{font-size:14px;line-height:1.25;font-weight:700;white-space:normal;overflow-wrap:anywhere}
.result-panel .leg-heading>span{font-size:12px;line-height:1.35;white-space:normal;overflow-wrap:anywhere}
.result-panel .ip-leg-meta{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:3px 8px;min-width:0}
.result-panel .ip-leg-meta .ip-leg-train-number{margin:0;line-height:1.3;font-size:12px!important}
.result-panel .ip-leg-meta .leg-time{grid-area:auto;margin:0 0 0 auto;line-height:1.3;font-size:12px!important;white-space:nowrap;font-variant-numeric:tabular-nums}
.result-panel .ip-leg-meta .service-boundary-indicator{grid-area:auto;margin:0;order:initial}
.result-panel .station-list{padding:6px 12px 8px;gap:0}
.result-panel .station-row{--time-col:44px;--dot-col:14px;--row-gap:8px;display:grid;grid-template-columns:var(--time-col) var(--dot-col) minmax(0,1fr) auto;column-gap:var(--row-gap);row-gap:0;min-height:32px;padding:4px 0;align-items:center}
.result-panel .station-row::before{left:calc(var(--time-col) + var(--row-gap) + var(--dot-col) / 2 - 1px)}
.result-panel .station-clock{font-size:12px!important;text-align:right;line-height:1.25}
.result-panel .station-label{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:2px 8px;min-width:0}
.result-panel .station-label strong{font-size:14px;line-height:1.25;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;flex:1 1 auto;min-width:0}
.result-panel .station-label small{font-size:11px;line-height:1.25;white-space:nowrap;color:var(--muted)}
.result-panel .station-dot{width:9px;height:9px;border-width:2px}
.result-panel .station-row:first-child .station-dot,.result-panel .station-row:last-child .station-dot{width:12px;height:12px;border-width:3px}
.result-panel .wait-leg{display:grid;grid-template-columns:44px 24px minmax(0,1fr) auto;align-items:center;gap:8px;padding:10px 12px}
.result-panel .wait-icon{width:24px;height:24px;font-size:15px}
.result-panel .wait-clock{text-align:right}
.result-panel .wait-copy{display:grid;gap:3px}
.result-panel .wait-copy strong{font-size:14px;line-height:1.25}
.result-panel .wait-copy span{font-size:12px;line-height:1.35}
.result-panel .wait-leg>b{grid-column:auto;align-self:center;margin:0;white-space:nowrap}
.result-panel .ip-connection{padding:10px 12px;gap:8px;border-left-width:3px}
.result-panel .ip-connection-head{gap:8px;align-items:center}
.result-panel .ip-connection-head>strong{font-size:14px;line-height:1.25}
.result-panel .ip-walk-time{gap:4px;font-size:12px!important}
.result-panel .ip-walk-time svg{width:17px;height:17px}
.result-panel .ip-train-trigger{padding:8px 10px;min-height:46px;gap:8px}
.result-panel .ip-train-trigger-copy{gap:3px}
.result-panel .ip-train-trigger-copy strong,.result-panel .ip-train-trigger-code{font-size:14px;line-height:1.25}
.result-panel .ip-train-trigger-copy small{font-size:12px;line-height:1.3}
.result-panel .clock-duration{align-self:center}
@media(max-width:650px){
  .result-panel .station-row{grid-template-columns:var(--time-col) var(--dot-col) minmax(0,1fr)}
  .result-panel .segment-minute{display:none}
}
@media(max-width:350px){
  .result-panel .leg-head,.result-panel .station-list,.result-panel .wait-leg,.result-panel .ip-connection{padding-left:9px;padding-right:9px}
  .result-panel .wait-leg{grid-template-columns:36px 20px minmax(0,1fr) auto;gap:5px}
  .result-panel .wait-icon{width:20px;height:20px}
  .result-panel .station-row{--time-col:40px;--row-gap:6px}
}
