/* Riding a bus from the Map (js/alight.js, v62): three steps in one sheet. App tokens only, so every theme and style
   works in light and dark. The sheet keeps one height through the steps (nothing jumps when a step changes). */
.overlay.al-sheet.later-sheet { height: min(88%, 780px); max-height: 88%; }
.al-sheet .al-body { padding-top: 0; overscroll-behavior: contain; overflow-x: hidden; }   /* (a step sliding in never scrolls sideways) */
.al-dots { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); display: inline-flex; gap: 5px; pointer-events: none; }
/* one line, so a longer step title never makes the header taller (the sheet would jump) */
.al-top { position: relative; padding-top: 18px; padding-right: 16px; }
.al-top h2 { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: var(--fs-title3); }
.al-dots i { width: 7px; height: 7px; border-radius: var(--r-pill); background: var(--line); transition: width .25s var(--ease), background-color .25s; }
.al-sheet[data-step="1"] .al-dots i:nth-child(1), .al-sheet[data-step="2"] .al-dots i:nth-child(-n+2), .al-sheet[data-step="3"] .al-dots i { background: var(--accent); }
.al-sheet[data-step="1"] .al-dots i:nth-child(1), .al-sheet[data-step="2"] .al-dots i:nth-child(2), .al-sheet[data-step="3"] .al-dots i:nth-child(3) { width: 18px; }

.al-step.in-fwd { animation: alFwd .26s var(--ease) both; }
.al-step.in-back { animation: alBack .26s var(--ease) both; }
@keyframes alFwd { from { opacity: 0; transform: translateX(28px); } }
@keyframes alBack { from { opacity: 0; transform: translateX(-28px); } }
@media (prefers-reduced-motion: reduce) { .al-step.in-fwd, .al-step.in-back { animation: none; } .al-dots i { transition: none; } }

.al-big { min-height: var(--btn-h); font-size: var(--fs-row); }
.al-bus { display: flex; align-items: flex-start; gap: var(--sp-3); margin: var(--sp-1) 0 var(--sp-3); }
.al-bus .grow { min-width: 0; }
.al-hs { display: block; font-size: var(--fs-row); font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.al-bus small { display: block; color: var(--muted); font-size: var(--fs-detail); margin-top: 2px; }
.al-live { color: var(--ok); font-weight: 700; }
.al-next { font-size: var(--fs-body); margin: var(--sp-3) var(--sp-1); color: var(--muted); }
.al-next b { color: var(--text); }
.al-actions { display: grid; gap: var(--sp-3); margin-top: var(--sp-4); }
.al-actions .btn { margin: 0; }
.al-note { margin: var(--sp-3) 0; }
.al-lead { font-size: var(--fs-body); margin: var(--sp-1) var(--sp-1) var(--sp-3); color: var(--muted); }
.al-lead b { color: var(--text); }
.al-h { margin: var(--sp-5) var(--sp-1) var(--sp-2); }

/* the little map */
.al-map { margin: 0 0 var(--sp-2); }
.al-route-halo { fill: none; stroke: var(--surface); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.al-route { fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.al-route.guess { stroke-dasharray: 2 7; }
.al-step[data-step="3"] .al-route { stroke: color-mix(in srgb, var(--accent) 30%, transparent); }
.al-route-to { fill: none; stroke: var(--accent); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.al-sdot { fill: var(--surface); stroke: var(--accent); stroke-width: 1.6; }
.al-pick { fill: var(--accent); stroke: var(--surface); stroke-width: 2.5; }
.al-pick-ring { fill: none; stroke: var(--accent); stroke-width: 2.5; opacity: .45; }
.al-board { fill: var(--surface); stroke: var(--ok); stroke-width: 3.5; }


/* stop rows: the shortcuts and the timeline */
.al-opt { min-height: 60px; gap: var(--sp-3); }
.al-opt .grow { min-width: 0; }
.al-opt .grow b { font-weight: 700; font-size: var(--fs-body); overflow-wrap: anywhere; }
.al-opt .grow small { display: block; color: var(--muted); font-size: var(--fs-detail); margin-top: 2px; }
.al-opt.sugg, .al-opt[aria-pressed="true"] { background: var(--accent-soft); }
.al-opt.passed { opacity: .45; }
.al-sugg { display: inline-block; margin-left: var(--sp-2); padding: 2px 8px; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 800; letter-spacing: .02em; vertical-align: 2px; }
.al-t { flex: none; display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; }
.al-t b { font-size: var(--fs-body); font-weight: 700; }
.al-t small { color: var(--muted); font-size: var(--fs-detail); }
.al-ico { flex: none; width: 36px; height: 36px; border-radius: var(--r-pill); display: grid; place-items: center; background: var(--surface-2); color: var(--accent); }
.al-line { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.al-line > li { position: relative; }
.al-line > li + li { border-top: 1px solid var(--line); }
.al-line > li::before { content: ""; position: absolute; left: 32px; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: color-mix(in srgb, var(--accent) 35%, transparent); pointer-events: none; }
.al-line > li:first-child::before { top: 50%; }
.al-line > li.last::before { bottom: 50%; }
.al-line > li:only-child::before { display: none; }
.al-dot { position: relative; z-index: 1; flex: none; width: 14px; height: 14px; margin: 0 11px 0 9px; border-radius: var(--r-pill); background: var(--surface); border: 3px solid var(--accent); }
.al-opt.sugg .al-dot, .al-opt[aria-pressed="true"] .al-dot { background: var(--accent); }
.al-search { display: flex; align-items: center; gap: var(--sp-2); margin: var(--sp-5) 0 0; padding: 0 14px; min-height: 52px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); color: var(--muted); }
.al-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: var(--fs-body); outline: none; min-height: 48px; }
.al-search:focus-within { box-shadow: var(--shadow), inset 0 0 0 2px var(--accent); }
.al-none { margin: var(--sp-3) var(--sp-1); }
.al-foot { position: sticky; bottom: 0; z-index: 2; margin-top: var(--sp-4); padding: var(--sp-4) 0 var(--sp-1); background: linear-gradient(to bottom, transparent, var(--surface) 34%); }
.al-foot .btn { margin: 0; }

/* step 3 */
.al-sum { margin: var(--sp-1) 0 var(--sp-3); }
.al-sum-stop { display: block; font-size: var(--fs-card); font-weight: 800; line-height: 1.2; margin: 4px 0 var(--sp-2); overflow-wrap: anywhere; }
.al-sum-route { display: flex; align-items: center; gap: var(--sp-2); margin: 0 0 var(--sp-3); color: var(--muted); font-size: var(--fs-detail); }
.al-facts { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.al-facts span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: var(--r-pill); background: var(--surface-2); font-size: var(--fs-detail); font-weight: 600; }
.al-facts .i { color: var(--accent); }
.al-alert button { min-height: 48px; }
.al-alert button:disabled { opacity: .45; }
.al-alert-note { margin: var(--sp-2) var(--sp-1) 0; }

/* the bus's sheet on the Map: the way in, and the banner while you follow it with no trip */
.al-ride { min-height: var(--btn-h); margin: 2px 0 14px; font-size: var(--fs-row); }
.al-follow { margin: 0 0 14px; padding: 12px 14px; border-radius: var(--r-chip); background: var(--accent-soft); }
.al-follow-t { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-detail); }
.al-follow-t .i { color: var(--accent); flex: none; margin-top: 2px; }
.al-follow-t b { display: block; font-size: var(--fs-body); }
.al-follow-b { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: 10px; align-items: center; }
.al-follow-b .btn { min-height: 44px; padding: 0 14px; flex: 1 1 auto; }
.al-follow-b .iconbtn { margin-left: auto; }
