/* ZnajdzBus UI foundation v2.9.13.
   Change shared visual decisions here. Existing page classes are adapters to
   the public .zb-card, .zb-button, .zb-field and .zb-text components. */
:root {
  --ds-font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ds-page: #f6f8fb;
  --ds-surface: #fff;
  --ds-inset: #f9fbfd;
  --ds-ink: #17253a;
  --ds-muted: #536a84;
  --ds-border: #d8e5ef;
  --ds-brand: #075f91;
  --ds-focus: #075f91;
  --ds-shadow: 0 3px 12px #17253a0a;
  --ds-radius-card: 16px;
  --ds-radius-inset: 13px;
  --ds-radius-control: 11px;
  --ds-location-control-size: 52px;
  --ds-empty-illustration-width: 200px;
  --ds-empty-illustration-width-compact: 160px;
  --ds-space-1: 4px;
  --ds-space-2: 8px;
  --ds-space-3: 12px;
  --ds-space-4: 16px;
  --ds-space-5: 20px;
  --ds-space-6: 24px;
  --ds-text-xs: 12px;
  --ds-text-sm: 14px;
  --ds-text-md: 16px;
  --ds-text-lg: 20px;
  --ds-text-xl: 24px;
  --ds-weight-regular: 400;
  --ds-weight-medium: 600;
  --ds-weight-bold: 800;
  --ds-action-bg: #fff;
  --ds-action-text: #075f91;
  --ds-action-border: #cbd8e5;
  --ds-action-hover: #eaf4fb;
  --ds-action-active: #deeffa;
  --ds-action-primary: #0b78b4;
  --ds-action-on-primary: #fff;
  --ds-action-primary-hover: #075f91;
}
html[data-theme="dark"] {
  --ds-page:#101923;--ds-surface:#182432;--ds-inset:#203247;
  --ds-ink:#f0f5fb;--ds-muted:#bdcbdc;--ds-border:#667b92;
  --ds-brand:#8bd2ff;--ds-focus:#ffd52b;--ds-shadow:none;
  --ds-action-bg:#203247;--ds-action-text:#e7f4ff;
  --ds-action-border:#8295aa;--ds-action-hover:#2c455d;
  --ds-action-active:#34536e;--ds-action-primary:#88d2ff;
  --ds-action-on-primary:#0b2335;--ds-action-primary-hover:#b3e3ff;
}
html[data-theme="contrast"] {
  --ds-page:#fff;--ds-surface:#fff;--ds-inset:#fff;
  --ds-ink:#000;--ds-muted:#000;--ds-border:#000;
  --ds-brand:#003c88;--ds-focus:#003c88;--ds-shadow:none;
  --ds-action-bg:#fff;--ds-action-text:#000;
  --ds-action-border:#000;--ds-action-hover:#000;
  --ds-action-active:#000;--ds-action-primary:#000;
  --ds-action-on-primary:#fff;--ds-action-primary-hover:#000;
}

/* Legacy variable bridge: new pages and the existing search share the palette. */
html[data-theme] {
  --c-page:var(--ds-page)!important;
  --c-surface:var(--ds-surface)!important;
  --c-ink:var(--ds-ink)!important;
  --c-muted:var(--ds-muted)!important;
  --c-line:var(--ds-border)!important;
  --c-primary-strong:var(--ds-brand)!important;
  --zb-btn-bg:var(--ds-action-bg);
  --zb-btn-text:var(--ds-action-text);
  --zb-btn-border:var(--ds-action-border);
  --zb-btn-hover:var(--ds-action-hover);
  --zb-btn-active:var(--ds-action-active);
  --zb-btn-primary:var(--ds-action-primary);
  --zb-btn-primary-text:var(--ds-action-on-primary);
  --zb-btn-primary-hover:var(--ds-action-primary-hover);
}
html[data-theme] body {font-family:var(--ds-font)!important;color:var(--ds-ink)!important}

/* One card shell. Semantic variants affect padding and layout, not its skin. */
html[data-theme] body :is(.zb-card,.searchCard,.result,.infoCard,.zbSeoContext,
  .zbStopServerTimetable,.zb-st-card,.seoRouteLinks,.feedbackDialog,
  .offerCard,.offerAside,.offerFuture > div,.zbChangelog .card) {
  background:var(--ds-surface)!important;
  color:var(--ds-ink)!important;
  border:1px solid var(--ds-border)!important;
  border-radius:var(--ds-radius-card)!important;
  box-shadow:var(--ds-shadow)!important;
  min-width:0;
}
html[data-theme] body :is(.zb-card--inset,.walkLeg,.routeMapCard,.leg,
  .zbSeoLineCard,.zbStopGroup a,.zbTripTime,.zbVariant,.zbStopServerRow,.zb-st-row) {
  background:var(--ds-inset)!important;
  color:var(--ds-ink)!important;
  border:1px solid var(--ds-border)!important;
  border-radius:var(--ds-radius-inset)!important;
  box-shadow:none!important;
  min-width:0;
}
/* The inner wrapper owns spacing so adding a skin to a legacy card never
   changes its grid or the hit area of its header. */
html[data-theme] body .zb-card__body {padding:var(--ds-space-5)}
html[data-theme] body .zb-card--inset > .zb-card__body {padding:var(--ds-space-4)}
html[data-theme] body .searchCard {border-radius:var(--ds-radius-card)!important}
html[data-theme] body #resultsPanel {background:transparent!important;border:0!important;box-shadow:none!important}
html[data-theme] body #results > .empty,
html[data-theme] body .zbStopNoResults {
  background:var(--ds-surface)!important;color:var(--ds-muted)!important;
  border:1px solid var(--ds-border)!important;
  border-radius:var(--ds-radius-card)!important;
  box-shadow:var(--ds-shadow)!important;
}
#results > .empty.zbEmptyState {
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:var(--ds-space-2);padding:var(--ds-space-6);text-align:center;
}
.zbEmptyStateIllustration {
  display:block;width:var(--ds-empty-illustration-width);max-width:100%;
  height:auto;aspect-ratio:768 / 499;object-fit:contain;flex:none;
}
.zbEmptyStateMessage {margin:0;max-width:52ch;line-height:1.6;overflow-wrap:anywhere}
@media(max-width:600px){
  #results > .empty.zbEmptyState {padding:var(--ds-space-4)}
  .zbEmptyStateIllustration {width:var(--ds-empty-illustration-width-compact)}
}
html[data-theme="contrast"] body :is(.zb-card,.searchCard,.result,.infoCard,
  .zbSeoContext,.zbStopServerTimetable,.zb-st-card,.seoRouteLinks,
  .feedbackDialog,.offerCard,.offerAside,.offerFuture > div,.zbChangelog .card,
  .zb-card--inset,.walkLeg,.routeMapCard,.leg,.zbSeoLineCard,.zbStopGroup a,
  .zbTripTime,.zbVariant,.zbStopServerRow,.zb-st-row,#results > .empty,.zbStopNoResults) {
  border:2px solid var(--ds-border)!important;
}

/* Controls and text share sizes, focus and interaction states across screens. */
html[data-theme] body .zb-button {
  box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;
  gap:var(--ds-space-2);min-height:44px;padding:0 14px;
  border:1px solid var(--ds-action-border);border-radius:var(--ds-radius-control);
  background:var(--ds-action-bg);color:var(--ds-action-text);
  font:var(--ds-weight-medium) var(--ds-text-sm)/1.25 var(--ds-font);
  text-decoration:none;cursor:pointer;
  transition:background-color .15s,border-color .15s,color .15s;
}
html[data-theme] body .zb-button:hover {background:var(--ds-action-hover);text-decoration:none}
html[data-theme] body .zb-button:active,
html[data-theme] body .zb-button[aria-expanded="true"] {background:var(--ds-action-active)}
html[data-theme] body .zb-button--primary {
  background:var(--ds-action-primary);color:var(--ds-action-on-primary);
  border-color:var(--ds-action-primary);
}
html[data-theme] body .zb-button--primary:hover {
  background:var(--ds-action-primary-hover);border-color:var(--ds-action-primary-hover);
}
html[data-theme] body .zb-button:focus-visible,
html[data-theme] body .zb-field:focus-visible,
html[data-theme] body .zb-link:focus-visible {
  outline:3px solid var(--ds-focus)!important;outline-offset:3px!important;
}
html[data-theme] body .zb-button:disabled {opacity:.55;cursor:not-allowed}
html[data-theme] body .zb-field {
  box-sizing:border-box;min-height:44px;border:1px solid var(--ds-border);
  border-radius:var(--ds-radius-control);background:var(--ds-surface);
  color:var(--ds-ink);font:var(--ds-weight-regular) var(--ds-text-md)/1.4 var(--ds-font);
}
html[data-theme] body .zb-text {font-family:var(--ds-font);font-size:var(--ds-text-md);line-height:1.5;color:var(--ds-ink)}
html[data-theme] body .zb-text--muted {font-size:var(--ds-text-sm);color:var(--ds-muted)}
html[data-theme] body :is(.zb-link,.infoCard a,.zbSeoPrimaryLink) {color:var(--ds-brand);text-underline-offset:3px}
html[data-theme] body :is(.zb-link,.infoCard a,.zbSeoPrimaryLink):hover {text-decoration-thickness:2px}
html[data-theme] body :is(.field input,.field select,.zbStopFind input,.zb-st-field input,.feedbackDialog input,.feedbackDialog select,.feedbackDialog textarea) {
  font-family:var(--ds-font)!important;border-radius:var(--ds-radius-control)!important;
}
html[data-theme] body :is(.shareRouteBtn,.walkMapToggle,.routeMapCard .showMap) {
  border-radius:var(--ds-radius-control)!important;font-family:var(--ds-font)!important;
}

/* Offer page keeps its photographic hero but uses the shared card and action skin. */
html[data-theme] body.zbOffer .offerPhotoCaption {background:var(--ds-surface);color:var(--ds-ink);border:1px solid var(--ds-border)}
html[data-theme] body.zbOffer .offerPhotoCaption span {color:var(--ds-muted)}
html[data-theme] body.zbOffer .offerPhotoCaption a {color:var(--ds-brand)}
html[data-theme] body.zbOffer :is(.offerCard,.offerAside,.offerFuture > div) {padding:30px}
html[data-theme] body.zbOffer .offerSection .offerEyebrow {color:var(--ds-brand)}
html[data-theme] body.zbOffer :is(.offerCard p,.offerFuture p) {color:var(--ds-muted)}
@media(max-width:650px) {
  html[data-theme] body.zbOffer :is(.offerCard,.offerAside,.offerFuture > div) {padding:24px}
}
@media(prefers-reduced-motion:reduce) {
  html[data-theme] body .zb-button {transition:none}
}
@media(forced-colors:active) {
  html[data-theme] body :is(.zb-card,.searchCard,.result,.infoCard,.walkLeg,.routeMapCard,.leg) {border-color:CanvasText!important}
}

/* Compact passenger result: the summary, details and map have separate controls. */
html[data-theme] body .result--compact .resultHead {
  display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;
  grid-template-areas:"lines times countdown" "endpoints endpoints endpoints" "overview overview overview"!important;
  align-items:center!important;gap:8px 12px!important;padding:14px 18px 8px!important;
  min-height:0!important;background:var(--ds-surface)!important;cursor:default!important;
}
html[data-theme] body .result--compact .summaryLines {grid-area:lines;gap:4px;flex-wrap:wrap;max-width:110px}
html[data-theme] body .result--compact .miniLine {width:34px!important;height:34px!important;font-size:18px!important;border-radius:9px!important}
html[data-theme] body .result--compact .mainTimes {grid-area:times!important;display:block!important;font-size:22px!important;line-height:1.3!important;white-space:nowrap;color:var(--ds-ink)!important}
html[data-theme] body .result--compact .mainTimes strong {font-weight:var(--ds-weight-medium)!important}
html[data-theme] body .result--compact .countdown {display:block!important;grid-area:countdown!important;justify-self:end!important;align-self:center!important;margin:0!important;padding:0!important;min-width:0!important;max-width:100%;white-space:normal!important;text-align:right!important;font-size:22px!important;line-height:1.3!important;font-weight:var(--ds-weight-medium)!important;color:var(--ds-ink)!important}
html[data-theme] body .result--compact .countdownLabel {font-size:13px}
html[data-theme] body .result--compact .countdownTime {white-space:nowrap}
html[data-theme] body .result--compact .resultEndpoints {grid-area:endpoints;margin:0!important;font-size:13px;line-height:1.45;font-weight:var(--ds-weight-regular);color:var(--ds-muted);overflow-wrap:anywhere}
html[data-theme] body .result--compact .journeyOverview {grid-area:overview;display:flex;align-items:center;justify-content:flex-start;min-width:0}
html[data-theme] body .result--compact .journeySteps {display:flex;gap:6px;flex-wrap:wrap;align-items:center;min-width:0;font-size:12px;color:var(--ds-ink)}
html[data-theme] body .result--compact .journeySegment {display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
html[data-theme] body .result--compact .journeySegment [data-zb-icon] {display:inline-flex;color:var(--ds-brand)}
html[data-theme] body .result--compact .journeySegment svg {width:15px;height:15px}
html[data-theme] body .result--compact .journeyArrow {color:var(--ds-muted)}
html[data-theme] body .result--compact .journeyLine {display:inline-grid;place-items:center;padding:1px 6px;border-radius:4px;background:var(--line);color:#fff;font-size:11px;font-weight:var(--ds-weight-bold)}
html[data-theme] body .result--compact .journeyTotal {display:inline-flex;align-items:center;gap:4px;white-space:nowrap;margin-inline-start:4px;padding-inline-start:12px;border-inline-start:1px solid var(--ds-border);font-size:12px;color:var(--ds-ink)}
html[data-theme] body .result--compact .journeyTotal [data-zb-icon] {display:inline-flex;color:var(--ds-brand)}
html[data-theme] body .result--compact .journeyTotal svg {width:15px;height:15px}
html[data-theme] body .result--compact .journeyTotal strong {font-size:13px;color:var(--ds-ink);font-weight:var(--ds-weight-medium)}
html[data-theme] body .result--compact .resultActions {display:flex;justify-content:flex-end;align-items:center;gap:4px;flex-wrap:wrap;padding:0 12px 6px}
html[data-theme] body .result--compact .resultActions .zb-button {display:inline-flex!important;grid-area:auto!important;width:auto!important;min-width:0!important;min-height:44px!important;margin:0!important;padding:6px!important;border:0!important;background:transparent!important;color:var(--ds-brand)!important;font-size:12px!important;font-weight:var(--ds-weight-medium)!important;line-height:1.3!important;gap:5px!important}
html[data-theme] body .result--compact .resultActions .zb-button:hover {background:var(--ds-action-hover)!important}
html[data-theme] body .result--compact .resultActions .zb-button[aria-expanded="true"] {text-decoration:underline}
html[data-theme] body .result--compact .resultActions .zb-button::after {content:none!important}
html[data-theme] body .result--compact .resultActions svg {width:15px;height:15px}
html[data-theme] body .result--compact .resultToggleLabel {white-space:nowrap}
html[data-theme] body .result--compact .detailsChevron {display:inline-flex;align-items:center;justify-content:center;flex:0 0 15px;width:15px;height:15px;transform-origin:center}
html[data-theme] body .result--compact .resultToggle[aria-expanded="true"] .detailsChevron {transform:rotate(180deg)}
html[data-theme] body .result--compact > .routeMapCard {display:none!important;margin:0!important;padding:12px!important;border-width:1px 0 0!important;border-radius:0!important}
html[data-theme] body .result--compact > .routeMapCard .inlineMap {border:0!important;margin:0!important}
html[data-theme] body .result--compact > .routeMapCard:has(.inlineMap.active) {display:block!important}
html[data-theme] body .result--compact .details {padding:16px 18px!important}
html[data-theme] body .result--compact .leg.stops-collapsed .intermediateStops {display:none}
html[data-theme] body .result--compact .stopsToggle {font-size:12px;margin-top:8px}
@media(max-width:650px) {
  html[data-theme] body .result--compact .resultHead {padding:12px 13px 6px!important;gap:7px 9px!important}
  html[data-theme] body .result--compact .mainTimes {font-size:20px!important}
  html[data-theme] body .result--compact .countdown {font-size:20px!important}
  html[data-theme] body .result--compact .details {padding:16px 13px!important}
}
@media(max-width:370px) {
  html[data-theme] body .result--compact .summaryLines {max-width:72px}
  html[data-theme] body .result--compact .countdown {max-width:94px}
}

/* Expanded result follows the approved compact stage timeline. */
html[data-theme] body .result--compact .details .journeyStage {
  position:relative;display:grid!important;grid-template-columns:30px minmax(0,1fr)!important;
  gap:12px!important;margin:0!important;padding:0 0 20px!important;
  background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;
  color:var(--ds-ink)!important;min-width:0;
}
html[data-theme] body .result--compact .details .journeyStage:last-of-type {padding-bottom:0!important}
html[data-theme] body .result--compact .journeyStage:not(:last-of-type)::before {content:"";position:absolute;left:14px;top:35px;bottom:5px;width:2px;background:var(--ds-border)}
html[data-theme] body .result--compact .journeyStage .stageIcon {
  display:inline-grid!important;place-items:center;width:30px!important;height:30px!important;
  border-radius:9px!important;position:relative;z-index:1;font-size:16px!important;flex:none;
}
html[data-theme] body .result--compact .journeyStage .walkStageIcon {border-radius:50%!important;background:var(--ds-inset);color:var(--ds-brand)}
html[data-theme] body .result--compact .walkStageIcon svg {width:16px;height:16px}
html[data-theme] body .result--compact .stageContent {min-width:0}
html[data-theme] body .result--compact .stageTitle {display:flex;align-items:baseline;justify-content:space-between;gap:4px 12px;flex-wrap:wrap;margin-top:3px;font-size:12px;line-height:1.45}
html[data-theme] body .result--compact .stageTitle strong {font-size:14px!important;font-weight:var(--ds-weight-medium)!important;color:var(--ds-ink)}
html[data-theme] body .result--compact .stageTitle > span {color:var(--ds-muted)!important;font-size:12px!important;font-weight:var(--ds-weight-regular);text-align:left!important}
html[data-theme] body .result--compact .stageText {display:block!important;margin:3px 0 0!important;font-size:13px!important;line-height:1.45!important;font-weight:var(--ds-weight-regular)!important;color:var(--ds-muted)!important;text-align:left!important;overflow-wrap:anywhere}
html[data-theme] body .result--compact .walkLegText {display:block!important;padding:0!important;min-width:0}
html[data-theme] body .result--compact .walkLegTitle {display:inline!important;white-space:normal!important}
html[data-theme] body .result--compact .walkMapToggle {margin:9px 0 0!important;min-height:44px!important;max-width:100%;padding:7px 10px!important;font-size:12px!important;white-space:normal!important;text-align:left}
html[data-theme] body .result--compact .walkMapToggle svg {width:15px;height:15px}
html[data-theme] body .result--compact .walkMapPanel {margin-top:10px;border:1px solid var(--ds-border)!important;border-radius:9px;background:var(--ds-inset)!important;overflow:hidden}
html[data-theme] body .result--compact .walkMapPanel .walkLeafletMap {height:320px;width:100%;min-width:0}
html[data-theme] body .result--compact .walkMapStatus {padding:10px;font-size:12px;color:var(--ds-muted);overflow-wrap:anywhere}
html[data-theme] body .result--compact .walkMapFit {margin:8px 10px;min-height:44px;font-size:12px}
html[data-theme] body .result--compact .walkMapFooter {padding:8px 10px!important;justify-content:flex-start!important}
html[data-theme] body .result--compact .walkMapFooter a {font-size:12px!important;overflow-wrap:anywhere;white-space:normal!important}
html[data-theme] body .result--compact .stopsList {display:block!important;list-style:none!important;border:0!important;margin:10px 0 0!important;padding:0!important}
html[data-theme] body .result--compact .stopsList li {position:static!important;display:grid!important;grid-template-columns:46px minmax(0,1fr)!important;gap:8px!important;align-items:start!important;margin:0 0 6px!important;padding:0!important;border:0!important;font-size:13px!important;line-height:1.45!important;min-height:0!important;color:var(--ds-ink)!important}
html[data-theme] body .result--compact .stopsList li::before,html[data-theme] body .result--compact .stopsList li::after {content:none!important}
html[data-theme] body .result--compact .stopsList time {font-size:13px!important;font-weight:var(--ds-weight-medium)!important;color:var(--ds-ink)!important;font-variant-numeric:tabular-nums}
html[data-theme] body .result--compact .stopsList strong {font-size:13px!important;font-weight:var(--ds-weight-medium)!important;overflow-wrap:anywhere}
html[data-theme] body .result--compact .stopsList small {display:block;font-size:11px;color:var(--ds-muted)}
html[data-theme] body .result--compact .stopsToggle {margin:2px 0!important;padding:7px 0!important;min-height:44px;border:0!important;background:transparent!important;color:var(--ds-brand)!important;font-size:12px!important;text-align:left;white-space:normal}
html[data-theme] body .result--compact .stopsToggle:hover {text-decoration:underline}
html[data-theme] body .result--compact .intermediateStops {border-left:2px solid var(--ds-border)!important;padding-left:10px!important;margin:0 0 4px!important}
html[data-theme] body .result--compact .intermediateStops :is(time,strong) {font-weight:var(--ds-weight-regular)!important;color:var(--ds-muted)!important}
html[data-theme] body .result--compact .leg.stops-collapsed .intermediateStops {display:none!important}
html[data-theme] body .result--compact .journeyNote {margin:15px 0 0;font-size:11px;line-height:1.45;color:var(--ds-muted)}
html[data-theme] body .result--compact .stopsList li > span {padding-left:0!important}
html[data-theme] body .result--compact .stopsList li > span::before {content:none!important}
html[data-theme] body .result--compact .walkMapToggle {width:auto!important;justify-content:flex-start!important}
html[data-theme] body #results .result--compact .details .journeyStage {border:0!important}
html[data-theme] body .result--compact .stopsList li {grid-template-columns:max-content minmax(0,1fr)!important}
html[data-theme] body .result--compact .stopsList time {min-width:46px}
html[data-theme] body .result--compact .walkMapToggle {height:auto!important}
html[data-theme] body .result--compact .stageTitle > strong {flex:0 1 auto!important;min-width:0;max-width:100%;overflow-wrap:anywhere}
/* Reserve the actual time range width so a wrapped countdown cannot overlap it. */
html[data-theme] body .result--compact .resultHead {grid-template-columns:auto max-content minmax(0,1fr)!important}
html[data-theme] body .result--compact .countdown {overflow-wrap:anywhere}
/* The larger countdown needs a full row at 320px; never split Polish words. */
@media(max-width:370px) {
  html[data-theme] body .result--compact .resultHead {grid-template-areas:"lines times times" "countdown countdown countdown" "endpoints endpoints endpoints" "overview overview overview"!important}
  html[data-theme] body .result--compact .countdown {max-width:100%;overflow-wrap:normal!important}
}


/* Timetable browser: shared surfaces, palette and controls. */
/* Reserve the space occupied by the enhanced timetable before its data loads.
   Without JS the compact, complete static timetable retains its normal height. */
.zbTimetablePending .zbTimetablePage .main>.zbSeoContext{min-block-size:59rem}
.zbPrivacySettings{border:0;background:transparent;font:inherit;cursor:pointer;min-height:44px;padding:8px;color:var(--ds-brand)}
.zbServiceDates{font-size:var(--ds-text-xs);color:var(--ds-muted)}
.zbServiceDates summary{cursor:pointer;padding:8px 0;min-height:44px}
.zbServiceDates p{line-height:1.7;overflow-wrap:anywhere}
.zbTtWorkspace{display:grid;grid-template-columns:minmax(220px, .36fr) minmax(0,1fr);gap:var(--ds-space-5);align-items:start}
.zbTtBrowser{margin-bottom:var(--ds-space-6);color:var(--ds-ink)}
.zbTtBrowser [hidden]{display:none!important}
.zbTtSearch{display:block;margin-bottom:var(--ds-space-4)}
.zbTtSearch input{width:100%;min-height:48px;padding:12px 16px}
.zbTtLines{display:flex;gap:12px;margin-bottom:20px;flex-wrap:wrap}
.zbTtLine{flex:1;justify-content:flex-start;gap:12px}
.zbTtBadge{display:grid;place-items:center;width:32px;height:32px;border-radius:8px;background:var(--line);color:#fff;font-size:20px}
.zbTtStop[aria-pressed="true"]{background:var(--ds-action-active);color:var(--ds-brand);border-color:var(--ds-brand)}
.zbTtHeading{padding:16px 18px;border-bottom:1px solid var(--ds-border);margin:0;font-size:16px;font-weight:600}
.zbTtStops{padding:8px}
.zbTtStop{display:block;text-align:left;width:100%;padding:12px;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--ds-ink);font:inherit;min-height:44px;cursor:pointer}
.zbTtStop:hover,.zbTtDeparture:hover{background:var(--ds-action-hover)}
.zbTtControls{padding:18px;display:flex;gap:12px;flex-wrap:wrap;border-bottom:1px solid var(--ds-border)}
.zbTtControls label{flex:1;min-width:150px;font-size:var(--ds-text-xs);color:var(--ds-muted)}
.zbTtControls select,.zbTtControls input{display:block;width:100%;padding:10px;margin-top:5px;min-height:44px;font:inherit;font-size:16px;color:var(--ds-ink)}
.zbTtBody{padding:18px}.zbTtBody h2{font-size:24px;margin:4px 0 8px}.zbTtMeta{font-size:12px;color:var(--ds-muted)}
.zbTtDeparture{width:100%;display:flex;align-items:center;gap:18px;padding:16px 8px;text-align:left;background:transparent;color:var(--ds-ink);border:0;border-bottom:1px solid var(--ds-border);font:inherit;cursor:pointer}
.zbTtDeparture>time{font-size:24px;font-weight:600;font-variant-numeric:tabular-nums}.zbTtDeparture>span:nth-child(2){flex:1}.zbTtDeparture small{display:block;font-size:12px;color:var(--ds-muted)}
.zbTtJourney{padding:12px;background:var(--ds-inset);border-radius:8px}.zbTtJourney ol{margin:0;padding-left:24px}.zbTtJourney li{padding:5px}.zbTtJourney time{font-variant-numeric:tabular-nums;margin-right:8px}
.zbTtFull{margin-top:18px}.zbTtFull summary{padding:10px 0;color:var(--ds-brand);cursor:pointer}.zbTtFull table{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}.zbTtFull th,.zbTtFull td{text-align:left;vertical-align:top;padding:10px;border-bottom:1px solid var(--ds-border)}.zbTtMinute{display:block;padding:3px 0}.zbTtMinute small{font-size:12px;color:var(--ds-muted)}
.zbTtEmpty{padding:16px;color:var(--ds-muted)}
.zbTimetableReady .main>.zbSeoContext{display:none}
.zbTimetableReady .main{display:block!important}
@media(max-width:700px){.zbTtWorkspace{grid-template-columns:1fr}.zbTtStops{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.zbTtLine{padding:10px!important;gap:8px}.zbTtBody{padding:14px}.zbTtControls{padding:14px}.zbTtDeparture{gap:12px}.zbTtJourney li{overflow-wrap:anywhere}}
.zbTtStop,.zbTtDeparture{font-weight:400!important}.zbTtStop[aria-pressed="true"]{font-weight:600!important}
.zbTtMoreStops summary{padding:12px;color:var(--ds-brand);cursor:pointer;min-height:44px}
.zbTtMobileStop{display:none;padding:14px}.zbTtMobileStop select{width:100%;padding:12px;font-size:16px;margin-top:6px;color:var(--ds-ink)}
@media(max-width:700px){.zbTtMobileStop{display:block}.zbTtStops{display:none}.zbTtSearching .zbTtStops{display:block}.zbTtHeading{display:none}}

.zbTtLine{white-space:nowrap!important;font-weight:500!important;gap:6px!important;padding:10px 8px!important}
@media(max-width:390px){.zbTtBadge{width:26px;height:28px;font-size:18px}.zbTtLine{font-size:12px!important}}

/* Reuse the home search shell; the timetable results start below it. */
.zbTimetableReady #resultsPanel{display:none!important}
.zbTtSearchCard{padding:var(--ds-space-6);margin-bottom:var(--ds-space-6)}
.zbTtSearchCard .zbTtLines{margin-bottom:0}
html[data-theme] body .zbTtLine{justify-content:flex-start;min-height:58px;padding:10px 14px!important}
html[data-theme] body .zbTtLine[aria-current="page"]{background:var(--ds-action-active)!important;border:2px solid var(--ds-brand)!important;color:var(--ds-brand)!important;box-shadow:inset 0 0 0 1px var(--ds-brand)}
.zbTtSelectedMark{margin-left:auto;visibility:hidden;font-size:18px;font-weight:600}
.zbTtLine[aria-current="page"] .zbTtSelectedMark{visibility:visible}
.zbTimetablePage .infoGrid>.infoCard:not(.infoCardLabelled):not(:first-child){display:none}
.zbTimetablePage .infoGrid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
@media(max-width:650px){.zbTimetablePage .infoGrid{grid-template-columns:1fr!important}}
@media(max-width:500px){.zbTtLines{gap:8px}html[data-theme] body .zbTtLine{padding:8px!important;gap:6px!important}.zbTtLine>span:nth-child(2){font-size:12px}.zbTtSelectedMark{font-size:14px}.zbTtBadge{width:26px!important;height:28px!important;font-size:18px}.zbTtSearchCard{padding:14px!important}}
html[data-theme="contrast"] body .zbTtLine[aria-current="page"]{background:var(--ds-action-primary)!important;color:var(--ds-action-on-primary)!important}
html body.zbTimetablePage .infoGrid{display:grid!important}
.zbTtSearchCard .zbTtLines{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:500px){html[data-theme] body .zbTtLine{position:relative;flex-direction:column;justify-content:center;min-width:0;min-height:68px}.zbTtSelectedMark{position:absolute;right:7px;top:5px}.zbTtLine>span:nth-child(2){font-size:12px}}

/* Bound native date controls, including Safari's intrinsic date width. */
.zbTtControls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
.zbTtControls label{min-width:0;max-width:100%}
.zbTtControls :is(input,select),.zbTtMobileStop select{box-sizing:border-box;min-width:0;max-width:100%;width:100%;height:48px}
.zbTtControls input[type="date"]{-webkit-appearance:none;appearance:none;inline-size:100%;min-inline-size:0}
.zbTtControls input[type="date"]::-webkit-date-and-time-value{text-align:left;min-height:1.25em}
@media(max-width:700px){
  .zbTtSearchCard .zbTtSearch{margin-bottom:12px}
  .zbTtSearchCard .zbTtMobileStop{padding:0;margin:0 0 16px}
  .zbTtStopPanel{display:none}
  .zbTtSearching .zbTtStopPanel{display:block}
}
@media(max-width:500px){.zbTtControls{grid-template-columns:minmax(0,1fr)}}

/* Choose the line first, then find and select its stop. */
.zbTtSearchCard .zbTtLines{margin-bottom:16px}
.zbTtSearchCard .zbTtSearch{margin-bottom:0}
@media(max-width:700px){.zbTtSearchCard .zbTtSearch{margin-bottom:12px}.zbTtSearchCard .zbTtMobileStop{margin-bottom:0}}

/* Keep location hints next to their labels, including on narrow screens. */
#searchForm .fieldHead{justify-content:flex-start;gap:var(--ds-space-2)}
#searchForm .fieldHead strong{flex:0 0 auto}
#searchForm .fieldHead span{flex:1;min-width:0}

/* Stop maps reuse the shared surfaces, actions and all three themes. */
.inputRow.zbLocationRow{grid-template-columns:var(--ds-location-control-size) minmax(0,1fr)!important;gap:var(--ds-space-2)}
.inputRow.zbLocationRow--origin{grid-template-columns:var(--ds-location-control-size) var(--ds-location-control-size) minmax(0,1fr)!important}
#searchForm .zbLocationRow :is(#nearMe,.zbMapOpen){box-sizing:border-box;width:var(--ds-location-control-size)!important;min-width:var(--ds-location-control-size)!important;max-width:var(--ds-location-control-size)!important;height:var(--ds-location-control-size)!important;min-height:var(--ds-location-control-size)!important;margin:0;padding:0!important;border-radius:var(--ds-radius-control)!important;align-self:center}
#searchForm .zbLocationRow input{height:var(--ds-location-control-size)!important}
.zbMapDialog{padding:0;width:min(900px,calc(100% - 32px));max-width:100%;max-height:calc(100dvh - 32px);color:var(--ds-ink);background:var(--ds-surface);border:1px solid var(--ds-border)}
.zbMapDialog::backdrop{background:#0009}
.zbMapDialogHead,.zbMapDialogActions{padding:var(--ds-space-4);display:flex;gap:var(--ds-space-3);align-items:center;justify-content:space-between;background:var(--ds-surface)}
.zbMapDialogHead h2{font-size:var(--ds-text-lg);margin:0}
.zbMapDialogBody{padding:0 var(--ds-space-4) var(--ds-space-4);display:grid;gap:var(--ds-space-3)}
.zbMapDialogActions{position:sticky;bottom:0;border-top:1px solid var(--ds-border)}
.zbMapDialogActions .zb-button{width:100%}
.zbMapFrame{position:relative;min-width:0}
.zbStopMapCanvas{height:340px;min-height:220px;background:var(--ds-inset);border:1px solid var(--ds-border);border-radius:var(--ds-radius-inset);isolation:isolate}
.zbMapCrosshair{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:500;pointer-events:none;font-size:32px;line-height:1;color:#111;text-shadow:0 0 2px #fff,1px 1px #fff,-1px -1px #fff}
.zbMapFilter{display:grid;gap:var(--ds-space-2)}
.zbMapFilter input{min-width:0;width:100%;min-height:44px}
.zbMapStopList{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--ds-space-2);max-height:220px;overflow:auto}
.zbMapStopList .zb-button{justify-content:flex-start;text-align:left;white-space:normal}
.zbMapSelection{display:grid;gap:var(--ds-space-2)}
.zbMapServices{margin:var(--ds-space-2) 0;padding-left:20px;font-size:var(--ds-text-sm)}
.zbMapPage{margin-bottom:var(--ds-space-6)}

/* Passenger notices use the shared surface, type, spacing and theme tokens. */
[data-service-notices]:empty,[data-service-notices][hidden]{display:none}
.zbServiceNotice{margin-bottom:var(--ds-space-5);overflow-wrap:anywhere}
.zbServiceNotice>summary{cursor:pointer;padding:var(--ds-space-4) var(--ds-space-5);min-height:44px;color:var(--ds-ink)}
.zbServiceNotice>summary>strong{font-size:var(--ds-text-md)}
.zbServiceNotice>summary>span{display:block;margin-top:var(--ds-space-1);font-size:var(--ds-text-sm)}
.zbServiceNotice>summary:focus-visible{outline:3px solid var(--ds-focus);outline-offset:3px;border-radius:var(--ds-radius-card)}
.zbServiceNotice .zbNoticeDetails{color:var(--ds-brand);text-decoration:underline}
.zbServiceNotice .zb-card__body{border-top:1px solid var(--ds-border);font-size:var(--ds-text-md);line-height:1.6}
.zbNoticeRoutes{display:grid;gap:var(--ds-space-4);list-style:none;margin:0;padding:0}
.zbNoticeRoutes ul{margin:var(--ds-space-1) 0 0;padding-left:var(--ds-space-5)}
.zbNoticeSource{display:flex;flex-wrap:wrap;gap:var(--ds-space-3) var(--ds-space-5)}
.zbTtFrequencyOnly .zbTtSearch,.zbTtFrequencyOnly .zbTtMobileStop,.zbTtFrequencyOnly .zbTtStopPanel,.zbTtFrequencyOnly .zbTtControls label:has([data-direction]),.zbTtFrequencyOnly [data-stop-title],.zbTtFrequencyOnly [data-stop-map-preview],.zbTtFrequencyOnly [data-current-line],.zbTtFrequencyOnly [data-service-source]{display:none!important}
.zbTtFrequencyOnly .zbTtWorkspace{grid-template-columns:minmax(0,1fr)}
.zbMapNearby{list-style:none;padding:0;display:grid;gap:var(--ds-space-3)}
.zbMapStopCard{padding:var(--ds-space-3);overflow-wrap:anywhere}
.zbMapStopActions{display:flex;flex-wrap:wrap;gap:var(--ds-space-2);margin-top:var(--ds-space-3)}
.zbMapStopActions .zb-button{white-space:normal}
.zbStopMarker,.zbPointMarker{display:grid;place-items:center!important;background:transparent;border:0}
.zbStopMarkerRing,.zbPointMarker>span{display:grid;place-items:center;box-sizing:border-box;position:relative;width:36px;height:36px;min-width:36px;max-width:36px;min-height:36px;max-height:36px;aspect-ratio:1;border-radius:50%;padding:3px;box-shadow:0 1px 4px #0006;line-height:1}
.zbStopMarkerFace{display:grid;place-items:center;width:30px;height:30px;box-sizing:border-box;border-radius:50%;background:var(--ds-surface);color:var(--ds-ink);font-size:11px;font-weight:800;white-space:nowrap}
.zbStopMarkerCheck{display:none;position:absolute;right:-5px;top:-7px;width:18px;height:18px;border-radius:50%;background:var(--ds-ink);color:var(--ds-surface);font-size:12px;font-weight:800;place-items:center;border:1px solid var(--ds-surface)}
.zbStopMarker--current .zbStopMarkerCheck{display:grid}
.zbStopMarker--current .zbStopMarkerRing{outline:2px solid var(--ds-ink);outline-offset:2px}
.zbPointMarker>span{background:var(--ds-action-primary);color:var(--ds-action-on-primary);border:2px solid var(--ds-ink);font-size:28px;padding:0}
.zbMapLineBadges{display:flex;gap:4px;flex-wrap:wrap;margin-left:auto}
.zbMapLineBadge{display:grid;place-items:center;min-width:24px;height:24px;padding:0 4px;box-sizing:border-box;border-radius:var(--ds-radius-control);border:2px solid var(--line);background:var(--ds-surface);color:var(--ds-ink);font-size:12px;font-weight:800}
.zbMapPage>summary.zbMapPreviewToggle{display:flex;width:100%;min-height:44px;padding:var(--ds-space-3) var(--ds-space-4);gap:var(--ds-space-2);text-align:center;white-space:normal;overflow-wrap:anywhere;list-style:none}
.zbMapPreviewToggle::-webkit-details-marker{display:none}
.zbMapPreviewToggle::marker{content:""}
.zbMapPreviewToggle>[data-zb-icon]{display:inline-flex;flex:none}
.zbMapPage:not([open]){margin-bottom:var(--ds-space-4);border:0;background:transparent;box-shadow:none}
.zbMapPage:not([open]) .zbMapHideLabel,.zbMapPage[open] .zbMapShowLabel{display:none}
.zbMapPage[open]>summary.zbMapPreviewToggle{background:var(--ds-action-active)}
.zbMapPage>summary:focus-visible{outline:3px solid var(--ds-focus);outline-offset:3px}
.zbMapDialog :focus-visible,.zbMapPage :focus-visible{outline:3px solid var(--ds-focus);outline-offset:3px}
.zbMapDialog .leaflet-popup-content-wrapper,.zbMapPage .leaflet-popup-content-wrapper{color:var(--ds-ink);background:var(--ds-surface)}
.zbMapDialog .leaflet-control-zoom a,.zbMapPage .leaflet-control-zoom a{min-width:44px;min-height:44px;line-height:44px}
.zbMapPage .leaflet-popup-close-button{min-width:44px;min-height:44px}
.zbMapPage .leaflet-popup-content{margin:28px 16px 16px;max-width:calc(100vw - 100px)}
.zbMapStatus,.zbMapAvailability{margin:0;color:var(--ds-muted)}
@media(max-width:600px){.zbMapDialog{width:100%;height:100dvh;max-height:100dvh;margin:0;border-radius:0}.zbMapDialogHead{align-items:flex-start}.zbMapStopList{grid-template-columns:1fr}.zbStopMapCanvas{height:280px}.zbMapDialogHead h2{font-size:var(--ds-text-md)}}
.zbMapDialog [hidden],.zbMapPage [hidden]{display:none!important}
