/* Ask GoSEQ, answered as an itinerary (js/askflow.js): a full-screen sheet in the style of Find my stop and the live
   trip moments. Small-caps kicker, the question in big type (its parts tappable), steps that tick, a skeleton, then the
   answer: when to leave, huge, over a timeline. Follows the app's light and dark themes. Motion: the sheet rising, the
   ticks, the answer arriving (opacity and transform only); reduced motion keeps only fades. */
.ask-sheet { --ak-dim: color-mix(in srgb, var(--text) 55%, transparent); --ak-faint: color-mix(in srgb, var(--text) 13%, transparent); --ak-round: color-mix(in srgb, var(--text) 8%, transparent);
  position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; color: var(--text); overflow: hidden;
  background: radial-gradient(120% 80% at 50% 26%, #FFFFFF 0%, #F6F3EF 55%, #ECE6E0 100%); padding-top: calc(var(--safe-top) + 8px); animation: cs-in .24s var(--ease) both; }
:root[data-theme="dark"] .ask-sheet { background: radial-gradient(120% 80% at 50% 26%, #26211f 0%, #141110 55%, #0b0909 100%); --ak-round: rgba(255, 255, 255, .1); }
.ask-sheet.closing { animation: cs-out .2s var(--ease) both; }
.ak-top { flex: none; display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 14px 0 22px; }
.ak-kicker { font-size: var(--fs-foot); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ak-dim); }
.ak-x { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--ak-round); color: var(--text); flex: none; }
.ak-x.sm { width: 36px; height: 36px; }
.ak-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 2px 22px 24px; }
/* the echo */
.ak-echo { margin: 4px 0 0; font-size: var(--fs-title); line-height: 1.2; font-weight: 800; letter-spacing: -.02em; outline: none; overflow-wrap: anywhere; }
.ak-dim { color: var(--ak-dim); font-weight: 700; }
.ak-quote { font-size: var(--fs-title2); font-weight: 700; }
.ak-fix { display: inline; cursor: pointer; font: inherit; letter-spacing: inherit; color: inherit; padding: 0 2px; margin: 0 -2px; border-radius: 6px; text-align: left; text-decoration: underline dotted color-mix(in srgb, var(--accent) 75%, transparent); text-decoration-thickness: 2.5px; text-underline-offset: 6px; }
.ak-fix.ak-when { color: var(--accent); }
.ak-fix:active { background: var(--ak-round); }
.ak-dot { color: var(--ak-dim); }
.ak-dayline { display: block; margin-top: 8px; font-size: var(--fs-row); line-height: 1.35; font-weight: 700; letter-spacing: 0; color: var(--ak-dim); }
.ak-from { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; font-size: var(--fs-sub); font-weight: 600; color: var(--ak-dim); min-height: 0; }
.ak-from:empty { display: none; }
.ak-from b { color: var(--text); }
/* the steps, ticking off */
.ak-steps { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 9px; font-size: var(--fs-body); font-weight: 600; color: var(--ak-dim); }
.ak-steps:empty { display: none; }
.ak-step { display: flex; align-items: center; gap: 10px; }
.ak-step.done { color: var(--text); }
.ak-tick { width: 20px; height: 20px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--ak-faint); position: relative; }
.ak-tick .i { width: 13px; height: 13px; stroke-width: 3; }
.ak-step.done .ak-tick { background: var(--accent); border-color: var(--accent); color: var(--on-accent); animation: ak-pop .3s var(--spring) both; }
.ak-step.bad .ak-tick { border-color: var(--bad); color: var(--bad); }
.ak-step.on .ak-tick { border-color: var(--accent); }
.ak-step.on .ak-tick::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--accent); animation: ak-ring 1.4s ease-out infinite; }
@keyframes ak-pop { from { transform: scale(.4); opacity: 0; } }
@keyframes ak-ring { from { transform: scale(1); opacity: .9; } to { transform: scale(1.9); opacity: 0; } }
.ask-sheet:is([data-state="answer"], [data-state="day"]) .ak-steps { display: none; }
/* the skeleton: the shape of the answer, while it's worked out */
.ak-skel { margin-top: 26px; }
.ak-skel .skel { border-radius: 10px; }
.ak-skel-row { display: flex; align-items: center; gap: 14px; margin-top: 22px; }
.ak-skel-dot { width: 14px !important; height: 14px; border-radius: 50% !important; flex: none; }
/* the answer */
.ak-in { animation: ak-up .34s var(--ease) both; }
.ak-in .ak-tl > li { animation: ak-up .34s var(--ease) both; }
.ak-in .ak-tl > li:nth-child(2) { animation-delay: .04s; } .ak-in .ak-tl > li:nth-child(3) { animation-delay: .08s; } .ak-in .ak-tl > li:nth-child(4) { animation-delay: .12s; } .ak-in .ak-tl > li:nth-child(n+5) { animation-delay: .16s; }
@keyframes ak-up { from { opacity: 0; transform: translateY(10px); } }
.ak-hero { margin: 22px 0 0; font-size: clamp(44px, 14vw, 62px); line-height: 1.02; font-weight: 800; letter-spacing: -.035em; font-variant-numeric: tabular-nums; outline: none; }
.ak-hero small { display: block; margin-bottom: 6px; font-size: var(--fs-foot); line-height: 1; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; color: var(--ak-dim); }
.ak-hero em { font-style: normal; color: var(--accent); }
.ak-hero .ak-dim, .ak-sec-hero .ak-dim { font-size: .6em; letter-spacing: -.02em; font-weight: 800; }
.ak-status { margin: 10px 0 0; font-size: var(--fs-row); line-height: 1.35; font-weight: 600; color: var(--ak-dim); }
.ak-status b { color: var(--text); font-weight: 800; white-space: nowrap; }   /* "7 min early" never leaves "early" alone on a line */
.ak-status b.late { color: var(--bad); }
.ak-sched { display: inline-flex; align-items: center; gap: 5px; color: var(--ak-dim); font-weight: 700; }
.ak-sched::before { content: ""; width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid currentColor; }
.ak-note { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-size: var(--fs-sub); font-weight: 600; }
/* the timeline: time · rail · what to do */
.ak-tl { list-style: none; margin: 24px 0 0; padding: 0; }
.ak-tl > li { position: relative; padding: 0 0 20px 88px; min-height: 30px; }
.ak-tl > li > time { position: absolute; left: 0; top: 2px; width: 62px; text-align: right; font-size: var(--fs-sub); font-weight: 700; color: var(--ak-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ak-tl > li::before { content: ""; position: absolute; left: 70px; top: 6px; width: 12px; height: 12px; border-radius: 50%; box-sizing: border-box; border: 2.5px solid var(--ak-dim); background: transparent; z-index: 1; }
.ak-tl > li::after { content: ""; position: absolute; left: 75px; top: 20px; bottom: 2px; border-left: 2px dotted var(--ak-dim); }
.ak-tl > li.ak-r::before { background: var(--text); border-color: var(--text); }
.ak-tl > li.ak-r::after { border-left: 3px solid var(--text); left: 74.5px; }
.ak-tl > li.ak-c::before { border-color: var(--accent); }
.ak-tl > li.ak-a { padding-bottom: 0; }
.ak-tl > li.ak-a::before { background: var(--accent); border-color: var(--accent); }
.ak-tl > li.ak-a::after { display: none; }
.ak-tl > li > div:not(.ak-ride):not(.ak-meta):not(.ak-off) { display: flex; align-items: flex-start; gap: 8px; font-size: var(--fs-body); font-weight: 600; line-height: 1.35; }
.ak-tl > li > div:not(.ak-ride) > .i { color: var(--ak-dim); flex: none; margin-top: 2px; }
.ak-tl > li > div:not(.ak-ride):not(.ak-meta):not(.ak-off) > span { flex: 1; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; column-gap: 6px; row-gap: 4px; }
.ak-road { color: var(--ak-dim); font-weight: 600; font-size: var(--fs-sub); }
.ak-ride { display: flex; align-items: center; gap: 10px; font-size: var(--fs-row); font-weight: 600; line-height: 1.25; }
.ak-ride .badge { height: 32px; min-width: 50px; font-size: var(--fs-body); border-radius: 9px; }
.ak-head { min-width: 0; overflow-wrap: anywhere; }
.ak-head b { font-weight: 800; }
.ak-meta { margin-top: 5px; font-size: var(--fs-sub); font-weight: 600; color: var(--ak-dim); font-variant-numeric: tabular-nums; }
.ak-off { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; font-size: var(--fs-sub); font-weight: 600; }
.ak-tl .stop-chip { min-width: 40px; padding: 3px 6px 4px; font-size: var(--fs-row); border-radius: 7px; vertical-align: middle; }
.ak-tl .stop-chip small { font-size: 8px; margin-bottom: 1px; letter-spacing: .1em; }
.ak-spare { margin-left: 4px; padding: 2px 9px; border-radius: 99px; background: var(--ok-soft); color: var(--ok); font-size: var(--fs-foot); font-weight: 800; white-space: nowrap; }
.ak-spare.tight { background: var(--warn-soft); color: var(--warn); }
/* the foot: Start trip, then the other choices */
.ak-foot { flex: none; padding: 12px 22px calc(var(--safe-bot) + 16px); }
.ak-foot:empty { display: none; }
.ak-go { min-height: 58px; border-radius: 16px; font-size: var(--fs-row); }
.ak-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ak-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 99px; background: var(--ak-round); color: var(--text); font-weight: 700; font-size: var(--fs-sub); white-space: nowrap; }
.ak-chip.on, .ak-chip[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.ak-slow { margin: 0 0 10px; font-size: var(--fs-sub); font-weight: 600; color: var(--ak-dim); }
.ak-row2 { display: grid; grid-template-columns: 1fr 1.25fr; gap: 10px; }
.ak-row2 .btn { padding: 0 12px; font-size: var(--fs-sub); }
/* a problem: one line, one next step */
.ak-err { margin-top: 26px; }
.ak-err b { display: block; font-size: var(--fs-title); line-height: 1.18; font-weight: 800; letter-spacing: -.02em; }
.ak-err p { margin: 8px 0 0; font-size: var(--fs-row); font-weight: 600; color: var(--ak-dim); }
/* a whole day */
.ak-day { margin-top: 18px; }
.ak-sec { padding: 18px 0 4px; border-top: 1px solid var(--ak-faint); }
.ak-sec:first-child { border-top: 0; padding-top: 4px; }
.ak-sec-k { margin: 0; font-size: var(--fs-cap); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ak-dim); }
.ak-sec-hero { margin: 8px 0 0; font-size: 34px; line-height: 1.05; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ak-sec-hero small { display: block; margin-bottom: 4px; font-size: var(--fs-cap); letter-spacing: .12em; text-transform: uppercase; color: var(--ak-dim); }
.ak-sec-hero em { font-style: normal; color: var(--accent); }
.ak-sec .ak-tl { margin-top: 16px; }
/* fixing a part of the question */
.ak-fixp { position: absolute; inset: 0; z-index: 3; display: flex; align-items: flex-end; background: rgba(0, 0, 0, .42); animation: cs-fade .18s both; }
.ak-fixp[hidden] { display: none; }
.ak-fix-card { width: 100%; max-height: 80%; overflow-y: auto; background: var(--surface); color: var(--text); border-radius: 22px 22px 0 0; padding: 14px 16px calc(var(--safe-bot) + 18px); animation: ak-up .22s var(--ease) both; }
.ak-fix-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: var(--fs-row); }
.ak-fix-card .seg { margin-bottom: 12px; }
.ak-tfield { display: block; margin-bottom: 14px; }
.ak-tfield[hidden] { display: none; }
.ak-daypick { display: flex; flex-wrap: wrap; gap: 8px; }
.ak-places .item[aria-current="true"] b { color: var(--accent); }
@media (prefers-reduced-motion: reduce) {
  .ask-sheet { animation-name: cs-fade; } .ask-sheet.closing { animation-name: cs-fadeout; }
  .ak-in, .ak-in .ak-tl > li, .ak-fix-card { animation: none; }
  .ak-step.done .ak-tick { animation: none; } .ak-step.on .ak-tick::after { animation: none; opacity: .5; transform: scale(1.3); }
}
