/* Trip planner: the page half of the demo. No build step. */

:root {
  color-scheme: light;
  --white: #ffffff;
  --ink: #1a232b;
  --ink-2: #272e35;
  --heading: #171d2e;
  --slate: #3a424a;
  --slate-2: #3a3e4a;
  --text-2: #555f6d;
  --muted: #8c91a1;          /* large text only; small text uses --muted-ink */
  --muted-ink: #646c7b;
  --placeholder: #6f7a86;
  --line: #e9ecef;
  --line-2: #dee3e7;
  --track: #e9eaef;
  --soft: #f7f7f7;
  --soft-2: #f5f7f9;
  --orange: #ff611a;
  --orange-ink: #c2410c;
  --orange-soft: #fff3ec;
  --green: #12804a;
  --green-soft: #e8f6ee;
  --hero-bg:
    radial-gradient(circle, rgba(255, 255, 255, 0.62) 1px, transparent 1.6px) 0 0 / 22px 22px,
    linear-gradient(179deg, #e2e2e2 38%, #e9e9e9 97%);

  --shadow-card: 0 1px 2px rgba(26, 35, 43, 0.05), 0 6px 18px -10px rgba(26, 35, 43, 0.14);
  --shadow-float: 0 1px 2px rgba(26, 35, 43, 0.06), 0 18px 40px -18px rgba(26, 35, 43, 0.28);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);

  --rail: 440px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --z-map: 0;
  --z-content: 10;
  --z-sticky: 20;
  --z-banner: 30;
  --z-toast: 40;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
button, textarea { font: inherit; color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--slate); outline-offset: 2px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- frame */

.app { container: app / inline-size; min-height: 100dvh; }

/* The docked chat owns the right 440px while open (desktop). */
.chat-rail {
  position: fixed;
  inset: 0 0 0 auto;
  width: var(--rail);
  background: var(--white);
  border-left: 1px solid var(--line);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out);
}
@media (min-width: 1024px) {
  body.chat-open .app { margin-right: var(--rail); }
  body.chat-open .chat-rail { opacity: 1; }
}
@media (max-width: 1023.98px) { .chat-rail { display: none; } }

/* ---------------------------------------------------------------- shared type */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 14px;
  line-height: 16px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  color: var(--slate);
}
.eyebrow-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--orange); }

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 100px;
  border: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.pill-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pill-btn-ghost { background: transparent; color: var(--slate-2); box-shadow: inset 0 0 0 1px rgba(23, 29, 46, 0.2); }
.pill-btn-ghost:hover { background: rgba(23, 29, 46, 0.05); }
.pill-btn-dark { background: var(--slate); color: var(--white); }
.pill-btn-dark:hover { background: var(--ink-2); }

/* ---------------------------------------------------------------- stage card */

.stage-card {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 12px;
  border-radius: 32px;
  background: var(--hero-bg);
  min-height: 628px;
  height: calc(100svh - 24px);
  overflow: hidden;
}
.shell:not([data-phase="landing"]) .stage-card { height: auto; min-height: 0; padding-bottom: 28px; }

.masthead {
  position: relative;
  z-index: var(--z-content);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 30px 32px 0;
}
.masthead-start, .masthead-end { display: flex; align-items: center; gap: 12px; min-width: 0; }

.menu-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px 6px 6px;
  border-radius: 48px;
  box-shadow: inset 0 0 0 1px rgba(23, 29, 46, 0.2);
}
.menu-avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); }
.menu-avatar svg { width: 18px; height: 18px; fill: none; stroke: var(--white); stroke-width: 1.7; stroke-linecap: round; }
.menu-burger { width: 24px; height: 24px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }

.activity {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  margin: 0;
  padding: 0 14px 0 12px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(23, 29, 46, 0.1);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  color: var(--slate);
  white-space: nowrap;
  animation: fade-in 0.3s var(--ease-out) both;
}
.activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); animation: pulse-dot 1.2s var(--ease-io) infinite; }

.wordmark { display: inline-flex; flex-direction: column; align-items: flex-end; text-decoration: none; color: #252937; border-radius: 6px; }
.wordmark-line { display: flex; align-items: flex-start; line-height: 1; }
.wordmark-text { font-weight: 700; font-size: 28px; letter-spacing: -0.84px; line-height: 1; }
.wordmark-sup { font-weight: 500; font-size: 12px; line-height: 1; margin-top: 1px; width: 11px; text-align: right; }
.wordmark-tag {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  padding-right: 12px;
  font-size: 9.5px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.flag { width: 14px; height: 10px; }

/* ---------------------------------------------------------------- landing hero */

.hero {
  position: relative;
  z-index: var(--z-content);
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1048px;
  margin: 0 auto;
  padding: 24px 24px 120px;
  text-align: center;
}
.hero .eyebrow { justify-content: center; }
.hero-title {
  margin: 0 0 40px;
  font-size: 48px;
  line-height: 58px;
  font-weight: 700;
  letter-spacing: -2px;
  color: var(--slate);
  text-wrap: balance;
}

.prompt {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  width: min(760px, 100%);
  padding: 10px 10px 10px 24px;
  border-radius: 30px;
  background: var(--white);
  box-shadow: 0 0 0 1px rgba(26, 35, 43, 0.06), 0 2px 4px rgba(26, 35, 43, 0.04), 0 18px 40px -16px rgba(26, 35, 43, 0.22);
  text-align: left;
  transition: box-shadow 0.2s var(--ease-out);
}
.prompt:focus-within { box-shadow: 0 0 0 1px rgba(26, 35, 43, 0.16), 0 0 0 5px rgba(255, 97, 26, 0.12), 0 18px 40px -16px rgba(26, 35, 43, 0.22); }
.prompt-input {
  flex: 1;
  min-width: 0;
  max-height: 168px;
  padding: 12px 0;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  font-size: 18px;
  line-height: 28px;
  color: var(--ink);
}
.prompt-input::placeholder { color: var(--placeholder); }
.prompt-send {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--slate);
  color: var(--white);
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s var(--ease-out);
}
.prompt-send svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.prompt-send:hover { background: var(--ink); }
.prompt-send:active { transform: scale(0.95); }
.prompt-send[aria-disabled="true"] { background: #c9cfd5; cursor: default; }

.suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 800px; margin: 16px 0 0; padding: 0; list-style: none; }
.hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 16px 7px 12px;
  border: 0;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 0 0 1px rgba(23, 29, 46, 0.12);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: var(--slate);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s, box-shadow 0.2s;
}
.hint svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--slate); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.hint:hover { background: var(--white); box-shadow: inset 0 0 0 1px rgba(23, 29, 46, 0.22); }
.hero > * { animation: fade-up 0.7s var(--ease-out) both; }
.hero > :nth-child(2) { animation-delay: 0.06s; }
.hero > :nth-child(3) { animation-delay: 0.12s; }
.hero > :nth-child(4) { animation-delay: 0.18s; }

.accreditation { position: absolute; left: 32px; bottom: 36px; z-index: var(--z-content); }
.accreditation p { margin: 0 0 8px; font-size: 12px; line-height: 18px; color: var(--muted-ink); opacity: 0.8; }
.accreditation-logos { display: flex; align-items: center; gap: 24px; opacity: 0.45; color: #6f7480; }
.accreditation-logos b { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.accreditation-logos .serif { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: 17px; letter-spacing: 0.04em; }
.accreditation-logos .round { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #8b909b; color: #e5e5e5; font-size: 6px; letter-spacing: 0; }
.shell:not([data-phase="landing"]) .hero,
.shell:not([data-phase="landing"]) .accreditation { display: none; }

/* ---------------------------------------------------------------- compact trip header */

.trip {
  position: relative;
  z-index: var(--z-content);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 32px 0;
  animation: fade-up 0.6s var(--ease-out) both;
}
.trip .eyebrow { margin-bottom: 10px; }
.trip-title {
  margin: 0 0 22px;
  font-size: 32px;
  line-height: 40px;
  font-weight: 600;
  letter-spacing: -1px;
  color: var(--heading);
  text-align: center;
  text-wrap: balance;
}
.trip-title .muted { color: var(--muted); }

.tripbar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f1f1f1, #fbfbfb);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.09), 0 1px 0 rgba(255, 255, 255, 0.9);
  border: 1px solid #f1f1f1;
}
.chips { flex: 1; min-width: 0; display: flex; align-items: stretch; }

.chip {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-content: center;
  min-height: 52px;
  padding: 6px 14px;
  border-radius: 10px;
  overflow: hidden;
}
.chip + .chip::before, .chip-date::before, .chip-pax::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: var(--line-2);
}
.chip[data-chip="destination"]::before { display: none; }
.chip-place { flex-grow: 1.25; }
.chip-date { flex-grow: 0.9; }
.chip-pax { flex-grow: 1.6; }
.chip-icon { grid-row: 1 / 3; align-self: center; width: 22px; height: 22px; fill: none; stroke: var(--text-2); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.chip-label {
  grid-column: 2;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 14px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--muted-ink);
}
.chip-place .chip-label, .chip-place .chip-value { grid-column: 1 / -1; }
.chip-value { grid-column: 2; display: flex; align-items: baseline; gap: 6px; min-width: 0; line-height: 24px; }
.chip-main { font-size: 16px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.chip-sub { flex: none; font-size: 13px; font-weight: 500; color: var(--muted-ink); }
.chip[data-empty="true"] .chip-main { color: var(--placeholder); font-weight: 400; }

.chip.is-landing .chip-value { animation: chip-in 0.65s var(--ease-out) both; }
.chip.is-landing .chip-label { color: var(--orange-ink); transition: color 0.2s; }
.chip.is-landing::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 15%, rgba(255, 97, 26, 0.13) 50%, transparent 85%);
  transform: translateX(-100%);
  animation: chip-sweep 1s var(--ease-out) 0.05s both;
  pointer-events: none;
}

.trip-arrow {
  position: relative;
  z-index: 1;
  flex: none;
  align-self: center;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: 0 -6px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--line-2);
  color: var(--slate);
}
.trip-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.trip-arrow .arrow-out { transform: translateY(3px); transition: transform 0.3s var(--ease-out); }
.trip-arrow .arrow-back { opacity: 0; transition: opacity 0.3s; }
.trip-arrow[data-round="true"] .arrow-out { transform: none; }
.trip-arrow[data-round="true"] .arrow-back { opacity: 1; }

.status-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 132px;
  height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 12px;
  background: var(--slate);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: default;
  transition: background-color 0.2s;
}
.status-btn[data-state="results"] { cursor: pointer; }
.status-btn[data-state="results"]:hover { background: var(--ink-2); }
.status-spin { display: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: var(--white); animation: spin 0.8s linear infinite; }
.status-btn[data-state="searching"] .status-spin { display: block; }
.status-btn[data-state="planning"] .status-spin { display: block; border-color: rgba(255, 255, 255, 0.25); border-top-color: var(--orange); animation-duration: 1.4s; }

/* ---------------------------------------------------------------- journey */

.journey { margin: 0 12px; animation: fade-up 0.6s var(--ease-out) 0.1s both; }
.journey-grid { display: grid; gap: 12px; }

.map-wrap { position: relative; }
.map-card {
  position: relative;
  height: clamp(420px, calc(100svh - 330px), 760px);
  border-radius: 24px;
  background: var(--hero-bg);
  overflow: hidden;
}
.map { position: absolute; inset: 0; z-index: var(--z-map); }
.map-canvas, .map-overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-overlay { overflow: visible; pointer-events: none; }
.map.is-unavailable { display: none; }
.map-canvas { transition: opacity 0.9s var(--ease-out); }
.map:not(.is-ready) .map-canvas { opacity: 0; }

.map-caption {
  position: absolute;
  left: 20px;
  top: 20px;
  margin: 0;
  padding: 6px 12px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: inset 0 0 0 1px rgba(23, 29, 46, 0.08);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  color: var(--slate);
  animation: fade-in 0.4s var(--ease-out) both;
}

/* Globe overlay (SVG): the arc runs from slate to the brand orange. */
.arc-stop-a { stop-color: #3a424a; }
.arc-stop-b { stop-color: #ff611a; }
.route-ground { fill: none; stroke: rgba(58, 66, 74, 0.32); stroke-width: 1.2; stroke-dasharray: 2 5; stroke-linecap: round; }
.route-glow { fill: none; stroke: rgba(255, 97, 26, 0.26); stroke-width: 7; stroke-linecap: round; }
.route-arc { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.route-comet { fill: none; stroke: #ffffff; stroke-width: 3.4; stroke-linecap: round; opacity: 0; }
.route-tip { fill: var(--white); stroke: var(--orange); stroke-width: 2.4; opacity: 0; }
.ambient path { fill: none; stroke-width: 1.8; stroke-linecap: round; opacity: 0.7; }
.ambient circle { fill: rgba(58, 66, 74, 0.7); }
.ambient circle.ambient-head { fill: var(--white); stroke: var(--orange); stroke-width: 1.6; }

.pin-dot { fill: var(--white); stroke: var(--ink); stroke-width: 2.6; }
.pin-core { fill: var(--ink); }
.pin[data-role="via"] .pin-dot { stroke: var(--orange); stroke-width: 2.4; }
.pin[data-role="via"] .pin-core { fill: var(--orange); }
.pin-ring { fill: none; stroke: var(--orange); stroke-width: 1.6; transform-box: fill-box; transform-origin: center; opacity: 0; }
.pin-pulse { animation: pin-pulse 2.6s var(--ease-out) 0.9s infinite; }
.pin-drop { animation: pin-drop 0.7s var(--ease-out) both; }
.pin-drop .pin-ring { animation: pin-ring 1.1s var(--ease-out) 0.35s both; }
.pin-label {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  fill: var(--ink);
  paint-order: stroke;
  stroke: rgba(240, 240, 240, 0.95);
  stroke-width: 4px;
  stroke-linejoin: round;
  letter-spacing: -0.01em;
}
.pin-label tspan.code { font-family: var(--mono); font-size: 12px; font-weight: 500; fill: var(--text-2); }
.pin[data-role="via"] .pin-label { font-size: 13px; fill: var(--orange-ink); }
.pin-label-wrap { animation: fade-in 0.5s var(--ease-out) 0.35s both; }
.plane-body path { fill: var(--ink); }
.plane-halo { fill: rgba(255, 255, 255, 0.92); stroke: rgba(26, 35, 43, 0.12); stroke-width: 1; }
.is-searching .route-comet { opacity: 1; }
.is-searching .route-glow { animation: glow-breathe 1.1s var(--ease-io) infinite; }
.is-searching .pin-pulse { animation-duration: 1.2s; animation-delay: 0s; }

/* The search you can watch: a bar in the same family as the trip bar. */
.search {
  position: absolute;
  left: 50%;
  bottom: 20px;
  z-index: var(--z-content);
  width: min(760px, calc(100% - 40px));
  translate: -50% 0;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-float);
  overflow: hidden;
  animation: fade-up 0.45s var(--ease-out) both;
}
.search-row { display: flex; align-items: center; gap: 4px; padding: 10px 10px 10px 4px; }
.search-cell { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 2px 16px; }
.search-cell + .search-cell::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 1px; background: var(--line-2); }
.search-airline { flex-grow: 1.5; }
.search-label { font-family: var(--mono); font-size: 10.5px; font-weight: 500; line-height: 14px; letter-spacing: 0.3px; text-transform: uppercase; color: var(--muted-ink); }
.search-num, .flick { font-size: 20px; font-weight: 600; line-height: 28px; letter-spacing: -0.4px; color: var(--ink); }
#fare-count { font-variant-numeric: tabular-nums; }
.flick { position: relative; display: block; height: 28px; overflow: hidden; white-space: nowrap; }
.flick span { display: block; overflow: hidden; text-overflow: ellipsis; }
.flick span.in { animation: flick-in 0.1s var(--ease-out) both; }
#low-price.is-drop { animation: price-tick 0.28s var(--ease-out); }
.search-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  background: var(--slate);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.search-pill .status-spin { display: block; }
.progress { height: 3px; background: var(--line); }
.progress-bar { display: block; width: 100%; height: 100%; transform-origin: left; transform: scaleX(0); background: var(--orange); }

/* Hand-off: a dark card over the map. */
.handoff {
  position: absolute;
  left: 20px;
  bottom: 20px;
  z-index: var(--z-banner);
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(460px, calc(100% - 40px));
  padding: 12px 18px 12px 12px;
  border-radius: 18px;
  background: var(--ink);
  color: var(--white);
  box-shadow: var(--shadow-float);
  animation: fade-up 0.6s var(--ease-out) both;
}
.handoff-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: #2f3842; }
.handoff-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--white); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.handoff-text { display: flex; flex-direction: column; min-width: 0; line-height: 20px; }
.handoff-text strong { font-size: 15px; font-weight: 600; }
.handoff-text span { font-size: 13px; color: rgba(255, 255, 255, 0.72); }
.handoff-dot { flex: none; width: 8px; height: 8px; margin-left: auto; border-radius: 50%; background: var(--orange); animation: pulse-dot 1.2s var(--ease-io) infinite; }
.shell[data-phase="searching"] .handoff { bottom: 132px; }

/* ---------------------------------------------------------------- results */

.results { animation: fade-up 0.5s var(--ease-out) both; }
.results-head { padding: 28px 8px 20px; }
.results-title { margin: 0; font-size: 32px; line-height: 40px; font-weight: 600; letter-spacing: -1px; color: var(--heading); }
.results-title .muted { display: block; color: var(--muted); }
.results-sub { margin: 10px 0 0; font-size: 14px; line-height: 22px; color: var(--text-2); }

.offers { display: grid; gap: 16px; margin: 0; padding: 0 0 24px; list-style: none; }
.offers > li { animation: card-in 0.6s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 70ms + 60ms); scroll-margin: 16px 0 24px; }

.offer {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 0 0 1px var(--line), var(--shadow-card);
  cursor: pointer;
  transition: box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.offer:hover { box-shadow: 0 0 0 1px var(--line-2), var(--shadow-float); }
.offer[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--slate), var(--shadow-float); }
.offer.is-highlighted { box-shadow: 0 0 0 2px var(--orange), 0 22px 44px -20px rgba(255, 97, 26, 0.45); transform: translateY(-2px); }

.offer-pick { grid-column: 1 / -1; display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.45s var(--ease-out); }
.offer-pick > div { overflow: hidden; min-height: 0; }
.offer.is-highlighted .offer-pick { grid-template-rows: 1fr; }
.offer-pick p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin: 0;
  padding: 12px 24px;
  border-radius: 16px 16px 0 0;
  background: var(--orange-soft);
  border-bottom: 1px solid #ffe2d3;
}
.pick-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.2px; text-transform: uppercase; color: var(--orange-ink); }
.pick-eyebrow::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.pick-text { font-size: 14px; font-weight: 500; line-height: 20px; color: var(--ink-2); }

.offer-main { padding: 20px 24px; min-width: 0; }
.offer-top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tag-best { background: #eceef1; color: var(--ink-2); }
.tag-cheapest, .tag-fastest { background: var(--green-soft); color: var(--green); }
.air-name { font-size: 13px; line-height: 18px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.air-name strong { font-weight: 600; color: var(--ink-2); }

.legs { display: grid; gap: 18px; }
.leg { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; column-gap: 14px; }
.leg-meta { display: flex; flex-direction: column; align-items: flex-end; text-align: right; min-width: 0; }
.air-badge {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: oklch(0.93 0.04 var(--h, 250));
  color: oklch(0.36 0.11 var(--h, 250));
}
.leg-when { display: flex; flex-direction: column; min-width: 0; }
.leg-times { font-size: 16px; font-weight: 500; line-height: 22px; color: var(--ink); white-space: nowrap; }
.leg-times sup { margin-left: 1px; font-size: 10px; font-weight: 600; color: var(--orange-ink); vertical-align: 6px; }
.leg-route { font-size: 12px; line-height: 18px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leg-dur { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.leg-stops { font-size: 12.5px; line-height: 18px; color: var(--ink-2); white-space: nowrap; }
.leg-stops.is-nonstop { color: var(--green); font-weight: 500; }
.leg-stops small { font-size: 12.5px; color: var(--text-2); }

.offer-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 20px 16px;
  border-left: 1px solid var(--line);
  text-align: center;
}
.price-block { display: flex; flex-direction: column; align-items: center; }
.price-total { font-size: 22px; font-weight: 600; line-height: 28px; letter-spacing: -0.4px; color: var(--ink); }
.price-total sup { font-size: 11px; font-weight: 600; vertical-align: 8px; margin-right: 1px; }
.price-label { font-size: 12px; line-height: 16px; color: var(--text-2); }
.select-btn { margin-top: 12px; height: 38px; padding: 0 20px; font-size: 12.5px; }
.offer[aria-pressed="true"] .select-btn { background: var(--orange); }
.bags { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.bags span { display: inline-flex; align-items: center; gap: 3px; }
.bags svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------- services + footer */

.services { background: var(--white); }
.services-inner { display: flex; align-items: flex-start; gap: 40px; max-width: 1048px; margin: 0 auto; padding: 160px 24px 180px; }
.services-left { flex: 1; min-width: 0; }
.services-title { margin: 0; font-size: 32px; line-height: 40px; font-weight: 600; letter-spacing: -1px; color: var(--heading); }
.services-title > span { display: block; }
.services-title .muted { color: var(--muted); }
.services-icons { display: inline-flex; gap: 6px; vertical-align: middle; margin-left: 6px; }
.services-icons svg { width: 28px; height: 28px; fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linejoin: round; }
.services-icons svg:last-child { fill: var(--muted); stroke: none; }
.services-right { width: 384px; flex: none; padding: 32px 0; }
.feature-list-wrap { position: relative; padding-left: 40px; }
.feature-list-wrap::before { content: ""; position: absolute; left: 0; top: 0; width: 4px; height: 100%; border-radius: 16px; background: var(--track); }
.stripe { position: absolute; left: 0; top: 0; z-index: 1; width: 4px; height: var(--stripe-h, 80px); border-radius: 16px; background: var(--orange); transform: translateY(var(--stripe-y, 0)); transition: transform 0.3s ease, height 0.3s ease; }
.feature-list { display: flex; flex-direction: column; gap: 20px; margin: 0; padding: 0; list-style: none; }
.feature-list h3 { margin: 0; font: inherit; }
.feature-btn { width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; font-size: 18px; font-weight: 500; line-height: 1.2; color: var(--muted-ink); border-radius: 4px; }
.feature-item.is-active .feature-btn { font-weight: 600; color: var(--heading); }
.feature-desc { display: none; margin: 12px 0 0; font-size: 14px; line-height: 22px; color: var(--text-2); }
.feature-item.is-active .feature-desc { display: block; animation: fade-in 0.35s var(--ease-out) both; }

.site-footer { margin: 0 12px 24px; border-radius: 40px; background: var(--soft); }
.footer-inner { max-width: 1416px; margin: 0 auto; padding: 48px; }
.footer-top { display: flex; justify-content: flex-end; margin-bottom: 72px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px 24px; }
.footer-links ul { margin: 0; padding: 0; list-style: none; }
.footer-head { margin: 0 0 12px; font-size: 12px; font-weight: 700; line-height: 18px; text-transform: uppercase; color: var(--heading); }
.footer-links li { font-size: 14px; line-height: 22px; color: var(--muted-ink); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 68px; padding: 32px 0 16px; border-top: 1px solid var(--track); }
.footer-copy { margin: 0; display: flex; gap: 12px; font-size: 12px; line-height: 1; color: var(--muted-ink); }
.footer-social { display: flex; gap: 20px; color: var(--muted); }
.footer-social svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }

/* ---------------------------------------------------------------- toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: var(--z-toast);
  max-width: calc(100vw - 32px);
  padding: 12px 20px;
  border-radius: 100px;
  background: var(--ink);
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  box-shadow: var(--shadow-float);
  transform: translateX(-50%);
  animation: toast-in 0.35s var(--ease-out) both;
}
@media (min-width: 1024px) { body.chat-open .toast { left: calc((100vw - var(--rail)) / 2); } }

/* ---------------------------------------------------------------- wide canvas: list beside the map */

@container app (min-width: 900px) {
  .shell[data-phase="results"] .journey-grid { grid-template-columns: minmax(0, 1fr) minmax(340px, 42%); align-items: start; }
  .shell[data-phase="results"] .map-wrap { position: sticky; top: 12px; }
  .shell[data-phase="results"] .map-card { height: calc(100svh - 24px); max-height: 900px; }
  .shell[data-phase="results"] .results-head { padding-top: 20px; }
}

@container app (max-width: 1100px) {
  .chip-icon { display: none; }
  .chip-date, .chip-pax { grid-template-columns: minmax(0, 1fr); }
  .chip-date .chip-label, .chip-date .chip-value, .chip-pax .chip-label, .chip-pax .chip-value { grid-column: 1; }
}

/* Narrow canvas: one column, map pinned while the cards scroll. */
@container app (max-width: 899.98px) {
  .journey-grid > .map-wrap { order: -1; }
  .shell[data-phase="results"] .map-wrap { position: sticky; top: 0; z-index: var(--z-sticky); padding-top: 4px; background: var(--white); }
  .shell[data-phase="results"] .map-card { height: clamp(240px, 38svh, 360px); }
  .shell[data-phase="results"] .offers > li { scroll-margin-top: calc(clamp(240px, 38svh, 360px) + 20px); }
  .services-inner { flex-direction: column; gap: 32px; padding: 96px 24px 96px; }
  .services-right { width: 100%; padding: 0; }
  .tripbar { flex-wrap: wrap; }
  .chips { flex-basis: 100%; flex-wrap: wrap; row-gap: 4px; }
  .chip-place { flex: 1 1 40%; }
  .chip-date { flex: 1 1 22%; }
  .chip-pax { flex: 1 1 30%; }
  .chip[data-chip="depart"]::before { display: none; }
  .status-btn { flex: 1 1 100%; height: 46px; }
}

@container app (max-width: 640px) {
  .stage-card { margin: 4px; border-radius: 24px; min-height: 600px; height: calc(100svh - 8px); }
  .masthead { padding: 20px 20px 0; }
  .wordmark-text { font-size: 22px; letter-spacing: -0.66px; }
  .wordmark-sup { font-size: 9px; width: 8px; }
  .wordmark-tag { font-size: 8px; padding-right: 9px; margin-top: 4px; }
  .activity { padding: 0 10px; }
  .replay-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pill-btn-ghost { padding: 0 12px; }
  .chip-icon { display: none; }
  .chip-date, .chip-pax { grid-template-columns: minmax(0, 1fr); }
  .chip-date .chip-label, .chip-date .chip-value, .chip-pax .chip-label, .chip-pax .chip-value { grid-column: 1; }
  .chip-date { flex: 1 1 40%; }
  .chip-pax { flex: 1 1 100%; }
  .chip-pax::before { display: none; }
  .activity-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .hero { padding: 16px 20px 96px; }
  .hero .eyebrow { font-size: 13px; }
  .hero-title { font-size: 36px; line-height: 44px; letter-spacing: -1.5px; margin-bottom: 28px; }
  .prompt { padding: 8px 8px 8px 18px; border-radius: 26px; }
  .prompt-input { font-size: 16px; line-height: 24px; padding: 10px 0; }
  .prompt-send { width: 44px; height: 44px; }
  .suggestions { gap: 6px; }
  .hint { font-size: 13.5px; min-height: 36px; padding: 6px 14px 6px 10px; }
  .accreditation { left: 24px; bottom: 28px; }
  .accreditation-logos { gap: 18px; }
  .trip { padding: 18px 16px 0; }
  .trip-title { font-size: 24px; line-height: 30px; letter-spacing: -0.6px; margin-bottom: 16px; }
  .shell:not([data-phase="landing"]) .stage-card { padding-bottom: 16px; height: auto; min-height: 0; }
  .journey { margin: 0 4px; }
  .chip { padding: 6px 10px; }
  .chip-main { font-size: 15px; }
  .map-card { height: clamp(320px, 52svh, 480px); border-radius: 20px; }
  .search { bottom: 12px; width: calc(100% - 24px); }
  .search-row { flex-wrap: wrap; padding: 8px 6px 8px 0; row-gap: 6px; }
  .search-airline { flex-basis: 100%; }
  .search-airline + .search-cell::before { display: none; }
  .search-pill { display: none; }
  .search-num, .flick { font-size: 18px; line-height: 24px; }
  .flick { height: 24px; }
  .handoff { top: 56px; bottom: auto; left: 12px; right: 12px; max-width: none; padding: 8px 14px 8px 8px; border-radius: 14px; }
  .shell[data-phase="searching"] .handoff { bottom: auto; }
  .handoff-icon { width: 32px; height: 32px; border-radius: 10px; }
  .handoff-icon svg { width: 18px; height: 18px; }
  .handoff-text strong { font-size: 13.5px; }
  .handoff-text span { display: none; }
  .results-head { padding: 22px 4px 16px; }
  .results-title { font-size: 26px; line-height: 32px; letter-spacing: -0.7px; }
  .offer { grid-template-columns: minmax(0, 1fr); }
  .offer-main { padding: 16px; }
  .offer-pick p { padding: 10px 16px; }
  .leg { grid-template-columns: 32px minmax(0, 1fr) auto; column-gap: 10px; row-gap: 2px; }
  .air-badge { width: 32px; height: 32px; grid-row: 1 / 3; }
  .leg-dur { grid-column: 3; text-align: right; font-size: 13px; }
  .leg-stops { grid-column: 2 / 4; flex-direction: row; gap: 6px; font-size: 13px; }
  .offer-side { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; padding: 14px 16px; border-left: 0; border-top: 1px solid var(--line); text-align: left; }
  .offer-side .price-block { align-items: flex-start; }
  .select-btn { margin-top: 0; }
  .bags { margin-top: 0; }
  .services-title { font-size: 26px; line-height: 32px; }
  .site-footer { margin: 0 4px 12px; border-radius: 24px; }
  .footer-inner { padding: 40px 28px 56px; }
  .footer-top { justify-content: center; margin-bottom: 48px; }
  .footer-links { justify-content: flex-start; column-gap: 28px; }
  .footer-links > div { flex: 1 1 40%; }
  .footer-bottom { flex-direction: column; gap: 20px; }
  .footer-copy { flex-wrap: wrap; justify-content: center; }
}

/* ---------------------------------------------------------------- motion */

@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pulse-dot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.45; transform: scale(0.78); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes chip-in { from { opacity: 0; transform: translateY(12px); filter: blur(4px); } }
@keyframes chip-sweep { to { transform: translateX(100%); } }
@keyframes pin-drop { from { opacity: 0; transform: translateY(-26px); } }
@keyframes pin-ring { 0% { opacity: 0.9; transform: scale(1); } 100% { opacity: 0; transform: scale(5.5); } }
@keyframes pin-pulse { 0% { opacity: 0.55; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(3.6); } }
@keyframes glow-breathe { 50% { stroke-opacity: 0.25; stroke-width: 13; } }
@keyframes flick-in { from { transform: translateY(45%); opacity: 0.25; } }
@keyframes price-tick { from { color: var(--green); transform: translateY(-2px); } }
@keyframes card-in { from { opacity: 0; transform: translateY(18px) scale(0.985); } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .pin-pulse, .is-searching .route-glow, .activity-dot, .handoff-dot { animation: none !important; }
  .chip.is-landing::after { display: none; }
}
