:root {
  --ink: #14202e;
  --ink-soft: #4a5b6e;
  --muted: #5a6675;   /* darkened to clear WCAG AA (4.5:1) on white and the page bg */
  --bg: #f6f8fb;
  --card: #ffffff;
  --line: #e6ecf3;
  --brand: #0f6fff;        /* decorative: borders, fills, focus (UI ≥3:1) */
  --brand-deep: #0a4fc2;
  --accent: #ff6b5e;
  --gold: #f4a92b;
  --green: #18a86b;
  /* Semantic TEXT colors — AA (≥4.5:1 on white). The decorative brand/green/accent
     above fail normal-text contrast, so copy/links use these darker variants. */
  --brand-text: #0a4fc2;
  --green-text: #0c7a4a;
  --accent-text: #c83c2f;
  /* elevation scale — flatter resting surfaces; elevation signals interactivity */
  --shadow-sm: 0 2px 8px rgba(20, 40, 70, .06);
  --shadow: 0 4px 14px rgba(20, 40, 70, .06);
  --shadow-lg: 0 24px 60px rgba(20, 40, 70, .14);
  /* radius scale: pills for actions, sm for chips/badges, base for cards */
  --radius-sm: 10px;
  --radius: 14px;
  --radius-pill: 999px;
  /* motion scale — one set of easings/durations so everything moves consistently */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-emphasis: cubic-bezier(.34, 1.3, .64, 1);
  --dur-fast: 150ms;
  --dur-med: 250ms;
  --dur-slow: 400ms;
}
/* Let height:auto disclosures animate where supported (paired with allow-discrete). */
:root { interpolate-size: allow-keywords; }

* { box-sizing: border-box; }
/* Visible keyboard focus everywhere (mouse clicks stay clean via :focus-visible). */
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
/* Respect users who ask for less motion: drop transitions/animations/smooth-scroll. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
html, body { margin: 0; padding: 0; }
/* Inline SVG icons — consistent across OSes (vs emoji). */
.ic { display: inline-block; vertical-align: -0.15em; flex: none; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}
a { color: var(--brand-text); text-decoration: none; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; }

/* ---- top bar ---- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px; background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px;
  color: var(--ink); letter-spacing: -.03em; }
.brand-mark {
  display: inline-grid; place-items: center; width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--brand), #5aa0ff);
  color: #fff; border-radius: 9px; box-shadow: var(--shadow-sm);
}
.topbar nav { display: flex; align-items: center; gap: 18px; font-weight: 600; }
.topbar nav a { color: var(--ink-soft); }
.topbar nav a:hover { color: var(--brand-text); }
.topbar nav a[aria-current="page"] { color: var(--brand-text); font-weight: 800; }
.who { color: var(--muted); font-weight: 500; font-size: 14px; }
.btn-ghost {
  border: 1px solid var(--line); padding: 8px 16px; border-radius: 999px;
  color: var(--ink) !important; background: #fff;
}
.btn-ghost:hover { border-color: var(--brand-text); }
.logout-form { display: inline-flex; margin: 0; }
.logout-form button { font-family: inherit; font-size: inherit; cursor: pointer; }

main { min-height: calc(100vh - 140px); }

/* demo-mode banner (live provider keys missing -> sample data) */
.demo-banner { background: #fff1e3; color: #c97a16; border-bottom: 1px solid #ffe6c7;
  text-align: center; padding: 8px 16px; font-size: 13px; font-weight: 600; }

/* ---- flashes ---- */
.flashes { max-width: 900px; margin: 16px auto 0; padding: 0 20px; }
.flash { padding: 12px 16px; border-radius: 12px; margin-bottom: 8px; font-weight: 600; }
.flash-error { background: #ffeceb; color: #c0392b; }
.flash-success { background: #e7f8ef; color: var(--green-text); }

/* ---- landing / hero ---- */
.hero {
  max-width: 1000px; margin: 0 auto; padding: 80px 24px 40px; text-align: center;
}
.hero .eyebrow {
  display: inline-block; background: #e7f0ff; color: var(--brand-deep);
  padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 13px;
  margin-bottom: 22px; letter-spacing: .01em;
}
.hero h1 { font-size: clamp(36px, 6vw, 62px); font-weight: 800; margin: 0 0 18px; }
.hero h1 .grad {
  background: linear-gradient(120deg, var(--brand), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lede { font-size: 20px; color: var(--ink-soft); max-width: 640px; margin: 0 auto 30px; }
/* Hero route motif — the brand mark as an illustration: the line draws itself, the
   destination nodes pop. No stock photography; ownable and weightless. */
.hero-illustration { margin: 34px auto 0; max-width: 600px; }
.hero-route { width: 100%; height: auto; }
.hero-route-path { stroke-dasharray: 760; stroke-dashoffset: 760;
  animation: route-draw-once 1.6s var(--ease-out, ease) .2s forwards; }
.hero-route-nodes circle { fill: var(--brand); opacity: 0; transform-box: fill-box; transform-origin: center;
  animation: route-dot-once .5s var(--ease-emphasis, ease) forwards;
  animation-delay: calc(.5s + var(--n) * .45s); }
@keyframes route-draw-once { to { stroke-dashoffset: 0; } }
@keyframes route-dot-once { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 14px 28px; border-radius: 999px; font-weight: 700;
  border: none; cursor: pointer; font-size: 16px; font-family: inherit;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 22px rgba(15,111,255,.32); }
.btn-primary:hover { background: var(--brand-deep); }
.btn-secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }

.feature-grid {
  max-width: 840px; margin: 36px auto 72px; padding: 0 24px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px;
}
@media (max-width: 640px) { .feature-grid { grid-template-columns: 1fr; } }
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow);
}
.feature .ico { color: var(--brand); margin-bottom: 4px; }
.feature h3 { margin: 16px 0 8px; font-size: 21px; }
.feature p { margin: 0; color: var(--ink-soft); font-size: 16px; line-height: 1.55; }

/* ---- auth ---- */
.auth-wrap { max-width: 420px; margin: 60px auto; padding: 0 20px; }
.auth-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px; box-shadow: var(--shadow);
}
.auth-card h2 { margin: 0 0 6px; }
.auth-card .sub { color: var(--muted); margin: 0 0 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  font-family: inherit; font-size: 15px; background: #fbfcfe; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand-text); background: #fff;
}
.auth-card .btn { width: 100%; margin-top: 6px; }
.auth-alt { text-align: center; margin-top: 18px; color: var(--muted); }
/* Continue with Google */
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #fff; color: var(--ink) !important; border: 1px solid var(--line);
  margin: 0 0 4px; }
.btn-google:hover { border-color: var(--brand-text); background: #fbfcfe; }
.btn-google .g-icon { display: inline-grid; place-items: center; width: 20px; height: 20px;
  border-radius: 50%; background: conic-gradient(#ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0);
  color: #fff; font-weight: 800; font-size: 12px; }
.auth-or { display: flex; align-items: center; gap: 10px; margin: 16px 0; color: var(--muted); font-size: 13px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---- planner ---- */
.planner-wrap { max-width: 1080px; margin: 0 auto; padding: 34px 20px 80px; }
.guest-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; background: #e7f0ff; border: 1px solid #cfe0ff; border-radius: var(--radius);
  padding: 14px 20px; margin-bottom: 18px; color: var(--brand-deep); font-weight: 600; }
.planner-head { margin-bottom: 22px; }
.planner-head h1 { font-size: 30px; margin: 0 0 6px; }
.planner-head p { color: var(--ink-soft); margin: 0; }

.search-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.row-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 720px){ .row, .row-3 { grid-template-columns: 1fr; } }

/* Three quiet form groups (Where / When / Trip style) — structure over spacing alone. */
.form-group { border: none; margin: 0; padding: 0 0 4px; }
.form-group + .form-group { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.form-legend { font-weight: 800; font-size: 15px; color: var(--ink); padding: 0; margin: 0 0 6px;
  letter-spacing: -.01em; }

/* Visually-hidden but available to assistive tech (labels that a legend now duplicates). */
.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; }

.section-label { font-weight: 700; font-size: 13px; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); margin: 22px 0 10px; }

/* segmented control / tabs */
.segment { display: inline-flex; background: #eef2f7; border-radius: 12px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.segment button {
  border: none; background: transparent; padding: 9px 16px; border-radius: 9px;
  font-family: inherit; font-weight: 600; font-size: 14px; color: var(--ink-soft); cursor: pointer;
}
.segment button.active { background: #fff; color: var(--brand-text); box-shadow: 0 2px 8px rgba(20,40,70,.08); }

/* typeahead place search */
.typeahead { position: relative; }
.ta-menu {
  display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 40;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-top: 4px;
  box-shadow: var(--shadow-lg); overflow: hidden auto; max-height: 280px;
}
.ta-menu.show { display: block; }
.ta-item { padding: 11px 14px; font-size: 14px; cursor: pointer; color: var(--ink); }
.ta-item:hover, .ta-item.active { background: #eef3ff; }
.ta-anywhere { font-weight: 700; color: var(--brand-deep); border-bottom: 1px solid var(--line); }

/* progressive-disclosure helpers */
.link-btn {
  background: none; border: none; padding: 8px 0; margin-top: 4px; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 600; color: var(--brand-text);
  display: inline-block;
}
.link-btn:hover { color: var(--brand-deep); text-decoration: underline; }
.link-btn.on { color: var(--accent-text); }
#anchor-dates {
  margin-top: 14px; padding: 16px 18px; border-radius: var(--radius);
  background: #f4f8ff; border: 1px solid #dce8ff;
}
#anchor-dates .hint { color: var(--brand-deep); font-weight: 600; }
#style-row { align-items: start; }
#finetune { margin-top: 6px; }

.date-pane { display: none; margin-top: 14px; }
.date-pane.active { display: block; }
.hint { color: var(--muted); font-size: 13px; margin-top: 6px; }

/* vibe chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 9px 16px; font-weight: 600; font-size: 14px; cursor: pointer; user-select: none;
  color: var(--ink-soft); transition: all .12s;
}
.chip.on { background: var(--brand); border-color: var(--brand-text); color: #fff; }

.toggle-row { display: flex; align-items: center; gap: 12px; }
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0; background: #cdd8e3; border-radius: 999px; transition: .2s; cursor: pointer;
}
.slider::before {
  content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: .2s;
}
.switch input:checked + .slider { background: var(--brand); }
.switch input:checked + .slider::before { transform: translateX(20px); }

.search-actions { margin-top: 26px; display: flex; align-items: center; gap: 16px; }
.search-actions .btn { padding: 15px 38px; }

/* ---- loading ---- */
.loader { display: none; text-align: center; padding: 60px 20px; }
.loader.show { display: block; }
/* The route-line motif as the loader: the path "draws" itself, the destination dots
   pop in turn — the same brand mark used in the timeline and landing hero. */
.route-loader { display: block; margin: 0 auto 18px; }
.route-loader-path { stroke-dasharray: 200; stroke-dashoffset: 200;
  animation: route-draw 2s var(--ease-out, ease) infinite; }
.route-loader-dot { fill: var(--brand); opacity: 0; animation: route-dot 2s ease infinite;
  transform-box: fill-box; transform-origin: center; }
.route-loader-dot.rl1 { animation-delay: .1s; }
.route-loader-dot.rl2 { animation-delay: .7s; }
.route-loader-dot.rl3 { animation-delay: 1.3s; }
@keyframes route-draw { 0% { stroke-dashoffset: 200; } 60%,100% { stroke-dashoffset: 0; } }
@keyframes route-dot { 0%,100% { opacity: 0; transform: scale(.6); } 20%,80% { opacity: 1; transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
.loader .status { font-weight: 700; font-size: 18px; }
.loader .substatus { color: var(--muted); margin-top: 8px; min-height: 22px; }
/* 4-stage checklist — reinforces that the long wait is deliberate work. */
.load-stages { list-style: none; max-width: 320px; margin: 18px auto 0; padding: 0;
  text-align: left; display: flex; flex-direction: column; gap: 8px; }
.load-stages li { position: relative; padding-left: 28px; color: var(--muted); font-size: 14px;
  font-weight: 600; transition: color .2s; }
.load-stages li::before { content: ""; position: absolute; left: 4px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; border-radius: 50%; border: 2px solid #d4dde8; background: var(--card); }
.load-stages li.active { color: var(--ink); }
.load-stages li.active::before { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(15,111,255,.12); }
.load-stages li.done { color: var(--ink-soft); }
.load-stages li.done::before { border-color: var(--green); background: var(--green); }
.load-stages li.done::after { content: ""; position: absolute; left: 8px; top: 50%;
  width: 4px; height: 7px; margin-top: -5px; border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg); }

/* ---- results ---- */
.results { margin-top: 34px; display: none; }
.results.show { display: block; }
.results-meta {
  background: linear-gradient(120deg, #0f1f33, #163a63); color: #fff;
  border-radius: var(--radius); padding: 22px 26px; margin-bottom: 22px;
}
.results-meta h2 { margin: 0 0 6px; font-size: 22px; }
.results-meta .advice { color: #cfe0ff; font-size: 15px; margin-top: 10px;
  border-left: 3px solid var(--gold); padding-left: 12px; }
.results-meta .ai-badge { display:inline-block; background: rgba(255,255,255,.16);
  padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; margin-left: 8px; }
.intel-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.intel-chip { background: rgba(255,255,255,.16); color: #fff; padding: 5px 12px;
  border-radius: 999px; font-size: 13px; font-weight: 600; }
.intel-chip.warn { background: rgba(244,169,43,.28); }

/* --- Baseline + Gold/Silver/Bronze comparison view --- */
.compare-toolbar {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 14px;
  flex-wrap: wrap; margin-bottom: 4px;
}
.compare-hint { font-size: 13px; }
/* Recommendation-first stack: a dominant pick, the baseline anchor beneath it, then a
   "view more alternatives" disclosure — one decision at a time, not four equal columns. */
.compare-stack { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.compare-col {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm);
  cursor: pointer; display: flex; flex-direction: column; gap: 6px;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
/* Cards fade/rise in as they're (re)rendered. @starting-style fires on insertion; the
   @supports guard means browsers without it just render instantly. */
@supports (transition-behavior: allow-discrete) {
  .compare-col {
    transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out),
                opacity var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out);
  }
  @starting-style { .compare-col { opacity: 0; transform: translateY(8px); } }
}
/* Named so View Transitions morph the pick/baseline/panel across renders. */
.compare-col.pick { view-transition-name: pick-card; }
.compare-col.baseline:not(.pick) { view-transition-name: baseline-card; }
#detail-panel:not(:empty) { view-transition-name: detail-panel; }
.compare-col:hover { border-color: var(--brand-text); box-shadow: var(--shadow); }
.compare-col.selected { border: 2px solid var(--brand); box-shadow: var(--shadow-lg); }
.compare-col.baseline { background: #f9fbff; }
.compare-col.victor { border: 2px solid var(--gold); box-shadow: 0 8px 26px rgba(244,169,43,.28); }
/* The pick dominates: bigger, brand-edged, lifted. */
.compare-col.pick { border: 2px solid var(--brand); box-shadow: var(--shadow); padding: 20px; }
.compare-col.pick .compare-headline { font-size: 20px; }
.compare-col.pick .compare-price { font-size: 30px; }
.card-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); }
.card-eyebrow.pick-eyebrow { color: var(--brand-text); }
/* Anchor + alternatives read as secondary: lighter, denser. */
.compare-col.alt, .compare-col.baseline:not(.pick) { box-shadow: none; background: #fbfcfe; }
.more-alts { margin-top: 2px; }
.more-alts > summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--brand-text);
  padding: 6px 0; list-style: none; }
.more-alts > summary::-webkit-details-marker { display: none; }
.more-alts[open] { display: flex; flex-direction: column; gap: 12px; }
.more-alts[open] > summary { margin-bottom: 2px; }
/* Disclosed content eases in when a native <details> opens (animations restart when the
   children switch from display:none; covered by the global reduced-motion rule). */
.more-alts[open] > .compare-col { animation: disclose-in var(--dur-med) var(--ease-out); }
.badge-more[open] > .hotel-badge { animation: disclose-in var(--dur-fast) var(--ease-out); }
@keyframes disclose-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.victory-ribbon {
  position: absolute; top: -10px; right: 12px; background: var(--gold); color: #5a3c00;
  font-weight: 800; font-size: 12px; padding: 3px 10px; border-radius: 999px; box-shadow: var(--shadow);
}
.compare-col .medal { font-weight: 800; font-size: 13px; letter-spacing: .03em; color: var(--ink-soft); }
.compare-headline { font-weight: 800; font-size: 16px; line-height: 1.25; }
.compare-route { font-size: 13px; }
.compare-price { font-size: 24px; font-weight: 800; margin-top: 2px; }
.delta { font-weight: 700; font-size: 14px; color: var(--ink-soft); }
.delta.cheaper { color: var(--green-text); }
.delta.baseline-tag { color: var(--muted); font-weight: 600; }
.compare-reason { color: var(--ink-soft); font-size: 13px; }
.compare-col .open-detail {
  margin-top: 6px; background: none; border: none; padding: 0; text-align: left;
  color: var(--brand-text); font-weight: 600; font-size: 13px; cursor: pointer; font-family: inherit;
}
.compare-col .save-btn { margin-top: 4px; align-self: flex-start; }
.detail-panel:not(:empty) {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 24px; box-shadow: var(--shadow); margin-bottom: 18px;
}
@media (max-width: 720px) {
  /* Journey timeline keeps its chronological order; only the layout adapts:
     flight rows stack their actions, hotel thumbnails drop, alternatives stay
     collapsed (they're native <details>, closed by default). */
  .leg { flex-direction: column; align-items: stretch; gap: 8px; }
  .leg-actions { flex-direction: row; flex-wrap: wrap; }
  .hotel-img { display: none; }
  .route-strip { gap: 4px; }
  .rs-city, .rs-end { min-width: 0; padding: 6px 10px; }
}
.stay-extra { margin-top: 8px; }
.stay-extra-label { font-size: 13px; margin-bottom: 4px; }

.pill { font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; }
.pill-good { background: #e7f8ef; color: var(--green-text); }
.pill-warn { background: #fff1e3; color: #c97a16; }
.pill-cost { background: #eef2f7; color: var(--ink-soft); }
.pill-event { background: #fde8ff; color: #a02cc0; }

/* ── Journey timeline detail ─────────────────────────────────────────────
   One containing surface; hierarchy via type + spacing, colour used sparingly. */
.journey-detail { display: flex; flex-direction: column; gap: 18px; }

/* "Why this plan" — the single AI verdict, clearly labelled as assisted. */
.why-panel { background: #f3f7ff; border: 1px solid #dbe6fb; border-radius: 14px; padding: 14px 18px; }
.why-tag { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--brand-text); margin-bottom: 4px; }
.why-head { margin: 0; font-size: 17px; line-height: 1.3; }
.why-body { margin: 6px 0 0; color: var(--ink-soft); font-size: 14px; }
.why-reasons { margin: 10px 0 0; padding-left: 18px; color: var(--ink-soft); font-size: 13.5px; }
.why-reasons li { margin: 2px 0; }
.why-caution { margin-top: 12px; }

/* Scoped AI insight rendered beside the item it explains. */
.insight { font-size: 13px; border-radius: 10px; padding: 7px 12px; margin-top: 8px; }
.insight.good { background: #eef4ff; color: var(--brand-deep); border: 1px solid #dbe6fb; }
.insight.caution { background: #fff8f0; color: #8a5a12; border: 1px solid #ffe6c7; }

/* Connected route strip: home ✈ → city (nights/role) → … → ✈ home. */
.route-strip { list-style: none; margin: 0; padding: 0; display: flex; align-items: stretch;
  flex-wrap: wrap; gap: 6px; }
.rs-node { display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 12px; padding: 8px 14px; text-align: center; }
.rs-end { background: #eef2f7; color: var(--ink-soft); min-width: 64px; }
.rs-code { font-weight: 800; font-size: 14px; color: var(--ink); }
.rs-sub { font-size: 12px; color: var(--muted); }
.rs-city { background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); min-width: 92px; }
.rs-name { font-weight: 800; font-size: 14px; }
.rs-nights { font-size: 12px; color: var(--ink-soft); }
.rs-role { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  margin-top: 2px; padding: 0 7px; border-radius: 999px; }
.rs-role.destination { background: #e7f0ff; color: var(--brand-deep); }
.rs-role.stopover { background: #eef2f7; color: var(--ink-soft); }
.rs-conn { display: flex; align-items: center; color: var(--brand); opacity: .8; }

/* The chapters themselves: one ordered list, separators between chapters. */
/* The route-line motif: a single vertical line threads the journey, each city is a
   brand node dot. This is the canonical brand instance (reused in loader/landing). */
.journey { list-style: none; margin: 0; padding: 0; position: relative; }
.journey::before { content: ""; position: absolute; left: 6px; top: 14px; bottom: 14px;
  width: 2px; background: linear-gradient(var(--brand), #bcd4ff); opacity: .5; border-radius: 2px; }
.chapter { padding: 16px 0 16px 30px; position: relative; }
.chapter::before { content: ""; position: absolute; left: 0; top: 22px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--brand); border: 3px solid var(--card);
  box-shadow: 0 0 0 1px var(--line); }
.chapter:first-child { padding-top: 4px; }
.chapter:first-child::before { top: 10px; }
.chapter-return::before { background: var(--ink-soft); }
/* Chapters fade in along the route line as you scroll (CSS-only; no IntersectionObserver,
   already covered by the global prefers-reduced-motion rule). */
@supports (animation-timeline: view()) {
  .chapter { animation: chapter-in linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
  @keyframes chapter-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
/* Scannable subheadings inside each city chapter (Flight to / Stay / What's on). */
.block-label { display: flex; align-items: center; gap: 6px; margin-top: 14px;
  font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-soft); }
.block-label + .chapter-block, .block-label + .where-to-stay { margin-top: 6px; }
.chapter-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 12px; }
.chapter-head h4 { margin: 0; font-size: 18px; }
.chapter-meta { font-weight: 500; font-size: 14px; color: var(--ink-soft); }
.chapter-when { font-size: 12.5px; color: var(--muted); }
.chapter-block { margin-top: 10px; }
.chapter-events { margin-top: 6px; }
.booked-note { font-size: 13px; margin-bottom: 6px; }

/* Native disclosures (hotel alternatives, more events, how-this-was-chosen). */
details.disclosure { margin-top: 8px; }
details.disclosure > summary { cursor: pointer; color: var(--brand-text); font-weight: 600;
  font-size: 13px; list-style: none; }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary::before { content: "▸ "; }
details.disclosure[open] > summary::before { content: "▾ "; }
.how-chosen { border-top: 1px solid var(--line); padding-top: 12px; }

/* Slim event rows (no big block; understated amber only when prices may inflate). */
.ev-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.ev-row + .ev-row { border-top: 1px dashed var(--line); }
.ev-ico { flex: none; color: var(--ink-soft); }
.ev-body { flex: 1; min-width: 0; }
.ev-name { font-weight: 700; font-size: 14px; }
.ev-meta { font-size: 13px; color: var(--ink-soft); }
.ev-row.ev-followed { background: #f3f7ff; border-radius: 10px; padding-left: 8px; padding-right: 8px; }
.ev-follow { font-size: 12px; font-weight: 800; color: var(--brand-text); margin-bottom: 1px; }
.ev-link { flex: none; color: var(--brand-text) !important; font-weight: 700;
  font-size: 13px; padding: 4px 8px; white-space: nowrap; text-decoration: underline; }
.ev-link:hover { color: var(--brand-deep) !important; }

.leg, .stay { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.leg:last-child, .stay:last-child { border-bottom: none; }
.leg .a, .stay .a { font-weight: 700; }
.leg { display: flex; align-items: center; gap: 12px; }
.leg-main { flex: 1; min-width: 0; }
.leg-actions { display: flex; flex-direction: column; gap: 6px; flex: none; align-items: stretch; }
.leg-book { background: #eef3ff; color: var(--brand-deep) !important; font-weight: 700;
  font-size: 13px; padding: 7px 14px; border-radius: var(--radius-pill); white-space: nowrap; text-align: center; }
.leg-book:hover { background: var(--brand); color: #fff !important; }
/* Commission comparison link — secondary, clearly a different (affiliate) action. */
.leg-compare { color: var(--muted) !important; font-weight: 600; font-size: 12px;
  padding: 2px 6px; white-space: nowrap; text-align: center; text-decoration: underline; }
.leg-compare:hover { color: var(--brand-text) !important; }
.est-tag { font-size: 12px; font-weight: 700; color: #c97a16; background: #fff1e3;
  padding: 1px 6px; border-radius: var(--radius-pill); }

/* ── Interest picker (followed attractions) ─────────────────────────────── */
.attr-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.attr-tab { font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-soft); }
.attr-tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.attr-search { position: relative; }
#attr-q, #ev-attr-q { width: 100%; padding: 10px 14px; border: 1px solid var(--line);
  border-radius: 12px; font-size: 15px; font-family: inherit; }
.attr-results:not(:empty) { margin-top: 6px; border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; }
.attr-result, .attr-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.attr-result + .attr-result { border-top: 1px solid var(--line); }
.attr-result.active { background: #eef4ff; border-radius: 8px; }   /* roving keyboard focus */
.attr-img { width: 44px; height: 44px; border-radius: 9px; object-fit: cover; flex: none;
  background: #eef2f7; }
.attr-img-ph { display: inline-flex; align-items: center; justify-content: center; font-size: 20px; }
.attr-result-body, .attr-card-body { flex: 1; min-width: 0; }
.attr-result-name, .attr-card-name { font-weight: 700; font-size: 14px; }
.attr-result-meta, .attr-card-meta { font-size: 12.5px; color: var(--ink-soft);
  display: flex; gap: 8px; align-items: center; }
.attr-shows { background: #e7f8ef; color: var(--green-text); font-weight: 700;
  font-size: 12px; padding: 1px 7px; border-radius: 999px; }
.attr-follow, .attr-unfollow { flex: none; font-family: inherit; font-size: 13px;
  font-weight: 700; cursor: pointer; padding: 7px 14px; border-radius: 999px; }
.attr-follow { background: var(--brand); color: #fff; border: 1px solid var(--brand); }
.attr-follow.on, .attr-unfollow { background: #e7f8ef; color: var(--green-text);
  border: 1px solid #bfe8cf; }
.attr-unfollow:hover { background: #fde7e7; color: #b3261e; border-color: #f3c2c2; }
.attr-noresult, .attr-empty { padding: 12px; font-size: 13.5px; }
.attr-followed { margin-top: 16px; }
.attr-group + .attr-group { margin-top: 14px; }
.attr-group-title { margin: 0 0 8px; font-size: 12px; text-transform: uppercase;
  letter-spacing: .04em; color: var(--ink-soft); }
.attr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.attr-card { border: 1px solid var(--line); border-radius: 12px; background: #fbfcfe; }
@media (max-width: 640px) { .attr-cards { grid-template-columns: 1fr; } }

/* Counterfactual "what-if" chips — the interrogable ranking. */
.cf-chips { display: flex; flex-direction: column; gap: 4px; margin: 4px 0; }
.cf-chip { font-size: 12px; padding: 2px 9px; border-radius: 8px; line-height: 1.35; }
.cf-price { background: #eef4ff; color: var(--brand-deep); }
.cf-stopover { background: #f4f1ff; color: #6b4fd0; }
.cf-event { background: #fff8f0; color: #8a5a12; }

/* "Where to stay" — the neighbourhood recommendation (secret sauce). */
.where-to-stay { background: #f3f7ff; border: 1px solid #dbe6fb; border-radius: 12px; padding: 12px 14px; }
.wts-head { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--brand-text); display: flex; align-items: center; gap: 6px; }
.wts-rec { font-weight: 700; font-size: 15px; margin-top: 4px; }
.wts-summary { font-size: 13px; margin-top: 3px; }
.wts-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.wts-tag { font-size: 12px; font-weight: 600; background: #fff; border: 1px solid var(--line);
  color: var(--ink-soft); padding: 1px 9px; border-radius: 999px; }
.wts-sources { margin-top: 8px; }
.wts-sources a { font-size: 12px; }

/* Per-flight stop label + fatigue warnings. */
.stop-badge { font-size: 12px; font-weight: 800; padding: 1px 8px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .03em; }
.stop-badge.stop-nonstop { background: #e7f8ef; color: var(--green-text); }
.stop-badge.stop-conn { background: #eef2f7; color: var(--ink-soft); }
.leg-warns { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 6px; }
.leg-warn { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.leg-warn.warn { background: #fde7e7; color: #b3261e; }
.leg-warn.soft { background: #fff1e3; color: #c97a16; }
.leg-trade { margin-top: 4px; font-size: 12.5px; color: var(--green-text); }

/* Convenience read on a comparison card. */
.compare-convenience { font-size: 12.5px; font-weight: 700; color: var(--ink-soft);
  margin: 2px 0; }
.compare-convenience.nonstop { color: var(--green-text); }

/* hotel options inside a stay */
.hotels { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.hotel { display: flex; gap: 12px; align-items: center; padding: 10px;
  border: 1px solid var(--line); border-radius: 12px; background: #fbfcfe; }
.hotel.sel { border-color: var(--brand-text); background: #f3f8ff; box-shadow: 0 0 0 1px var(--brand) inset; }
.hotel-img { width: 64px; height: 64px; aspect-ratio: 1; object-fit: cover; border-radius: 9px; flex: none; background: #eef2f7; }
.hotel-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.hotel-name { font-weight: 700; font-size: 14px; }
.hotel-name a { color: var(--ink); }
.hotel-name a:hover { color: var(--brand-text); }
.hotel-stars { color: var(--gold); font-size: 12px; letter-spacing: 1px; margin-left: 4px; }
.hotel-meta { font-size: 13px; color: var(--ink-soft); }
.hotel-score { display: inline-block; background: var(--brand); color: #fff; font-weight: 800;
  font-size: 12px; padding: 1px 7px; border-radius: 6px; }
.hotel-pick { display: inline-block; background: var(--brand); color: #fff; font-weight: 700;
  font-size: 12px; padding: 1px 8px; border-radius: 999px; margin-left: 4px; }
.hotel-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.hotel-badge { font-size: 12px; font-weight: 600; color: var(--ink-soft);
  background: #eef2f7; padding: 2px 8px; border-radius: 999px; }
.hotel-badge.good { background: #e7f8ef; color: var(--green-text); }
.hotel-badge.tier { background: #e7f0ff; color: var(--brand-deep); }
.hotel-badge.warn { background: #fde7e7; color: #b3261e; }
/* "+N more" overflow — native <details>, so it survives the detail-panel DOM moves. */
.badge-more { display: inline-flex; }
.badge-more > summary { font-size: 12px; font-weight: 600; color: var(--ink-soft);
  background: #eef2f7; padding: 2px 8px; border-radius: 999px; cursor: pointer; list-style: none; }
.badge-more > summary::-webkit-details-marker { display: none; }
.badge-more[open] { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.badge-more[open] > summary { margin-right: 2px; }
/* accommodation character + the value trade */
.hotel-type { display: inline-block; background: #f0ecff; color: #6b4fd0; font-weight: 700;
  font-size: 12px; padding: 1px 8px; border-radius: 999px; text-transform: capitalize; }
.hotel-sub { font-size: 12.5px; margin: 1px 0; }
.hotel-premium { font-size: 12.5px; color: var(--green-text); margin-top: 3px; }
.hotel-tax { font-size: 12px; margin-top: 2px; }
.hotel-attrib { font-size: 12px; margin-top: 2px; opacity: .8; }
.hotel-side { flex: none; display: flex; align-items: center; }
.hotel-book { display: inline-block; background: var(--brand); color: #fff !important; font-weight: 700;
  font-size: 13px; padding: 8px 16px; border-radius: 999px; white-space: nowrap; }
.hotel-book:hover { background: var(--brand-deep); }
.hotel-est { background: #fff8f0; border-color: #ffe6c7; }
.hotel-tag { font-size: 12px; font-weight: 700; color: #c97a16; background: #fff1e3;
  padding: 1px 7px; border-radius: 999px; margin-left: 4px; }
.hotel-none { margin-top: 8px; color: var(--muted); font-size: 13px; }
.muted { color: var(--muted); }
.score-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px,1fr)); gap: 8px; margin-top: 10px; }
.score-item { background: #f4f7fb; border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.score-item .v { font-weight: 800; }
.score-item .v.neg { color: var(--accent-text); }
.score-item .v.pos { color: var(--green-text); }
.reasons { margin: 10px 0 0; padding-left: 18px; color: var(--ink-soft); font-size: 13.5px; }

.save-btn { background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; font-weight: 700; cursor: pointer; font-family: inherit; color: var(--ink); }
.save-btn:hover { border-color: var(--brand-text); color: var(--brand-text); }
.save-btn.saved { background: #e7f8ef; color: var(--green-text); border-color: #bfe9d3; }

.err-box { display:none; background:#ffeceb; color:#c0392b; padding:16px 20px; border-radius:12px; font-weight:600; margin-top: 24px; }
.err-box.show { display:block; }

/* profile */
.profile-wrap { max-width: 880px; margin: 0 auto; padding: 34px 20px 80px; }
/* Sticky save bar — appears only once a slider/destination actually changes, so the
   lone Save button after a long accordion stops feeling ambiguous. */
.profile-save-actions {
  position: sticky; bottom: 16px; z-index: 20; margin: 18px 0 30px;
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-pill);
  padding: 10px 10px 10px 20px; box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .2s var(--ease-out, ease), transform .2s var(--ease-out, ease);
}
.profile-save-actions.dirty { opacity: 1; transform: none; pointer-events: auto; }
.profile-save-actions #save-status { line-height: 1.4; }

/* Travel inspiration — a distinct, tinted product surface, not another settings row. */
.inspiration { margin-top: 28px; background: linear-gradient(180deg, #eef4ff, #f7fafff2);
  border: 1px solid #dbe6fb; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.inspiration-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.inspiration-icon { display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none;
  border-radius: 11px; background: linear-gradient(135deg, var(--brand), #5aa0ff); color: #fff;
  font-size: 18px; box-shadow: var(--shadow-sm); }
.inspiration h2 { margin: 0; font-size: 21px; }
.inspiration-sub { margin: 2px 0 0; color: var(--ink-soft); font-size: 14px; }

/* collapsible profile sections */
.acc { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
  box-shadow: var(--shadow); margin-bottom: 14px; overflow: hidden; }
.acc-head { width: 100%; display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 2px 14px; padding: 18px 22px; background: none;
  border: none; cursor: pointer; font-family: inherit; text-align: left; }
.acc-head:hover { background: #fbfcfe; }
.acc-icon { font-size: 24px; grid-row: span 2; }
.acc-title { font-weight: 800; font-size: 17px; color: var(--ink); align-self: end; }
.acc-blurb { grid-column: 2; color: var(--ink-soft); font-size: 13px; align-self: start; }
.acc-chev { grid-row: span 2; font-size: 22px; color: var(--muted); transition: transform .2s; }
.acc.open .acc-chev { transform: rotate(180deg); }
.acc-body { display: none; padding: 4px 22px 22px; }
.acc.open .acc-body { display: block; }
.sliders { display: grid; gap: 20px; }
.slider-head { display: flex; justify-content: space-between; align-items: baseline; }
.slider-label { font-weight: 700; font-size: 15px; }
.slider-val { font-weight: 800; color: var(--brand-text); font-size: 15px; }
.slider-help { color: var(--ink-soft); font-size: 14px; margin: 4px 0 10px; }
.range { width: 100%; accent-color: var(--brand-text); height: 6px; }
.slider-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; }
/* destinations: search-and-add (any city) */
.dest-add { max-width: 420px; margin-top: 4px; }
.dest-suggest { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.dest-chip { padding: 7px 12px; border: 1px solid var(--line); border-radius: var(--radius-pill);
  background: #fff; font-family: inherit; font-size: 13px; color: var(--ink-soft); cursor: pointer;
  transition: border-color var(--dur-fast, 150ms), background var(--dur-fast, 150ms); }
.dest-chip:hover { border-color: var(--brand); background: #f4f8ff; }
.dest-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
@media (max-width: 680px) { .dest-list { grid-template-columns: 1fr; } }
.dest-empty { grid-column: 1 / -1; }
.dest-row { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfe; }
.dest-remove { border: none; background: none; color: var(--muted); font-size: 14px;
  cursor: pointer; padding: 6px; border-radius: 8px; min-height: 32px; }
.dest-remove:hover { color: var(--ink); background: #f0f2f6; }
/* home airport */
.home-airport { margin-bottom: 18px; }
.home-airport .field { max-width: 420px; }
.home-airport .hint { margin-top: 4px; }
/* interest-picker source provenance */
.attr-srcline { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.attr-src { font-size: 12px; color: var(--muted); border: 1px solid var(--line);
  border-radius: var(--radius-pill); padding: 1px 8px; background: #fff; }
.attr-src.merged { color: var(--brand-text, var(--brand)); border-color: transparent;
  background: #eef4ff; }
.dest-name { font-weight: 600; font-size: 14px; }
.been-toggle { font-size: 13px; color: var(--ink-soft); white-space: nowrap; display: flex; gap: 5px; align-items: center; cursor: pointer; }
.pref-sel { padding: 7px 8px; border: 1px solid var(--line); border-radius: 9px;
  font-family: inherit; font-size: 12.5px; background: #fff; max-width: 175px; }

/* saved plans + trips */
.trips-wrap { max-width: 820px; margin: 0 auto; padding: 34px 20px 80px; }
.plan-group { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
  box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 18px; }
.plan-group-head { display: flex; justify-content: space-between; align-items: center;
  gap: 14px; flex-wrap: wrap; padding-bottom: 12px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.plan-group .trip-row { box-shadow: none; }
.trip-row { background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 20px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }
.plan-group-title { font-weight: 800; font-size: 17px; margin: 0; }
.trip-row-title { font-weight: 800; }
.trip-row-side { text-align: right; display: flex; align-items: center; gap: 14px; }
.trip-row-cost { font-weight: 800; font-size: 18px; }
.trip-row-date { font-size: 13px; }
.trip-row-actions { display: flex; align-items: center; gap: 12px; }
.trips-wrap form { margin: 0; }
.trips-wrap .account-delete { margin-top: 24px; }
.link-btn.danger { color: var(--accent); }
.link-btn.quiet { color: var(--muted); }
.share-note { font-size: 12.5px; }
.plan-group-empty { padding: 8px 0; }
.empty { text-align: center; color: var(--muted); padding: 60px 20px; }
/* The route motif as an empty-state mark — a quiet brand presence where there's no data. */
.empty::before, .attr-empty::before {
  content: ""; display: block; width: 120px; height: 36px; margin: 0 auto 14px; opacity: .55;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20120%2036'%3E%3Cpath%20d='M10%2028%20Q40%206%2060%2018%20T110%2010'%20fill='none'%20stroke='%230f6fff'%20stroke-width='2.5'%20stroke-linecap='round'/%3E%3Ccircle%20cx='10'%20cy='28'%20r='4'%20fill='%230f6fff'/%3E%3Ccircle%20cx='60'%20cy='18'%20r='4'%20fill='%230f6fff'/%3E%3Ccircle%20cx='110'%20cy='10'%20r='4'%20fill='%230f6fff'/%3E%3C/svg%3E");
}
.attr-empty { display: block; text-align: center; }

.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  max-width: 1080px; margin: 0 auto; padding: 24px 24px; color: var(--ink-soft); font-size: 13px; }
.foot .muted { color: var(--muted); }
.foot-links a { color: var(--ink-soft); font-weight: 600; }
.foot-links a:hover { color: var(--brand-text); }

/* legal pages (privacy / terms) */
.legal-wrap { max-width: 760px; margin: 0 auto; padding: 40px 24px 80px; }
.legal-wrap h1 { font-size: 32px; margin: 0 0 4px; }
.legal-wrap .updated { color: var(--muted); margin: 0 0 28px; }
.legal-wrap h2 { font-size: 20px; margin: 28px 0 8px; }
.legal-wrap p, .legal-wrap li { color: var(--ink-soft); line-height: 1.65; }
.legal-wrap ul { padding-left: 20px; }
.legal-wrap li { margin-bottom: 6px; }

.inspiration-cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.profile-status-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }

/* planner mode tabs + the "Plan around an event" explorer */
.plan-modes { margin-bottom: 18px; }
.plan-modes button { font-size: 15px; font-weight: 700; padding: 12px 22px; }
#event-planner { margin-bottom: 22px; }
.ev-lead h2 { margin: 0 0 4px; font-size: 20px; }
.ev-lead p { margin: 0 0 14px; color: var(--ink-soft); }
.ev-follow-search { background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; }
.ev-entity-card { background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; }
.ev-entity-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ev-entity-head .ev-more { margin-left: auto; flex: none; }
.ev-entity-name { font-weight: 800; font-size: 16px; }
.ev-occ-row { display: flex; align-items: center; gap: 14px; padding: 10px 0;
  border-top: 1px solid var(--line); }
.ev-occ-when { flex: 0 0 170px; display: flex; flex-direction: column; }
.ev-occ-when span { color: var(--ink-soft); font-size: 13px; }
.ev-occ-cost { flex: 1; min-width: 0; }
.ev-occ-price { display: block; }
.ev-occ-ticket { color: var(--ink-soft); font-size: 13px; }
.ev-occ-sources { margin-top: 3px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ev-best { font-size: 11px; font-weight: 700; color: var(--green-text, #0a7a3d);
  background: #e7f8ef; border-radius: 6px; padding: 2px 8px; }
.ev-plan { flex: none; }
.ev-teaser { text-align: center; background: linear-gradient(180deg, #eef4ff, #f7faff);
  border-radius: var(--radius); padding: 36px 24px; }
.ev-teaser-icon { font-size: 30px; color: var(--brand); display: block; margin-bottom: 8px; }
.ev-teaser h2 { margin: 0 0 6px; }
.ev-teaser p { max-width: 520px; margin: 0 auto 16px; color: var(--ink-soft); }
@media (max-width: 720px) {
  .ev-occ-row { flex-wrap: wrap; gap: 8px; }
  .ev-occ-when { flex-basis: 100%; flex-direction: row; gap: 8px; align-items: baseline; }
  .ev-plan { width: 100%; }
}

/* desktop profile modal (planner) — the fragment renders the normal profile classes */
.profile-modal { width: min(880px, 92vw); max-height: 90vh; overflow-y: auto;
  border: none; border-radius: 16px; padding: 0 26px 26px;
  box-shadow: 0 24px 80px rgba(10, 30, 60, .35); }
.profile-modal::backdrop { background: rgba(15, 30, 50, .45); }
.profile-modal .profile-wrap { max-width: none; margin: 0; padding: 0; }
.profile-modal .planner-head { padding-top: 22px; }
.profile-modal-close { position: sticky; top: 12px; float: right; margin-right: -12px;
  z-index: 5; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: var(--ink-soft); font-size: 15px; cursor: pointer; }
.profile-modal-close:hover { color: var(--ink); border-color: var(--brand); }

/* cookie-consent banner */
.cookie-consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap;
  background: #14202e; color: #dce6f0; padding: 14px 22px; font-size: 14px;
  box-shadow: 0 -6px 24px rgba(0,0,0,.22); }
/* display:flex above outranks the UA's [hidden]{display:none} — restate it stronger,
   or the banner ignores consent.js entirely (Accept "does nothing"). */
.cookie-consent[hidden] { display: none; }
.cookie-consent .cc-text { max-width: 720px; }
.cookie-consent a { color: #6aa8ff; font-weight: 600; }
.cc-actions { display: flex; gap: 10px; flex: none; }
.cookie-consent .btn-ghost { color: #dce6f0 !important; border-color: #3a4a5e; background: transparent; }
.cookie-consent .btn-ghost:hover { border-color: #6aa8ff; }
.cookie-consent .btn-primary { padding: 8px 20px; }
@media (max-width: 640px) { .cookie-consent { padding: 12px 16px; } .cc-actions { width: 100%; }
  .cc-actions .btn, .cookie-consent .btn-ghost { flex: 1; } }

/* ---- profile influence status --------------------------------------------- */
.profile-status {
  display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding: 14px 16px;
  background: #fff; border: 1px solid #dce8f8; border-radius: 14px; box-shadow: var(--shadow-sm);
}
.profile-status-icon {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none;
  color: var(--brand-text); background: #eaf2ff; border-radius: 12px;
}
.profile-status-copy { flex: 1; min-width: 0; }
.profile-status-heading { display: flex; justify-content: space-between; gap: 14px; font-size: 14px; }
.profile-status-heading span { color: var(--brand-text); font-weight: 700; white-space: nowrap; }
.profile-status-copy p { margin: 5px 0 0; color: var(--ink-soft); font-size: 13px; }
.profile-progress {
  display: block; width: 100%; height: 4px; margin-top: 8px; overflow: hidden;
  appearance: none; border: none; background: #e7edf5; border-radius: 999px;
}
.profile-progress::-webkit-progress-bar { background: #e7edf5; border-radius: 999px; }
.profile-progress::-webkit-progress-value { background: var(--brand); border-radius: 999px; }
.profile-progress::-moz-progress-bar { background: var(--brand); border-radius: 999px; }
.profile-status-link { flex: none; font-size: 14px; font-weight: 700; white-space: nowrap; }
.profile-status-link:hover { text-decoration: underline; }

/* ---- mobile ---------------------------------------------------------------
   Phones: let the top bar wrap, stack the action buttons, trim card padding,
   and keep form inputs at 16px so iOS doesn't zoom on focus. */
@media (max-width: 640px) {
  /* top bar: brand on its own line, nav wraps below — never overflows */
  .topbar { padding: 12px 16px; flex-wrap: wrap; gap: 10px 16px; }
  .topbar nav { width: 100%; gap: 16px; font-size: 15px; }
  .who { display: none; }                 /* the email eats the row on mobile */
  .brand { font-size: 18px; }
  .btn-ghost { padding: 7px 14px; }

  main { min-height: 0; }

  /* hero */
  .hero { padding: 48px 20px 28px; }
  .hero p.lede { font-size: 18px; }
  .cta-row .btn { width: 100%; }

  /* cards & wrappers: tighter gutters */
  .planner-wrap, .profile-wrap, .trips-wrap { padding: 22px 14px 64px; }
  .planner-head h1 { font-size: 25px; }
  .search-card { padding: 18px 16px; }
  .auth-wrap { margin: 34px auto; }
  .auth-card { padding: 24px 20px; }

  /* keep form inputs ≥16px to stop iOS auto-zoom on focus */
  .field input, .field select, .field textarea { font-size: 16px; }

  /* action rows: full-width stacked buttons */
  .search-actions { flex-direction: column; align-items: stretch; gap: 12px; }
  .search-actions .btn { width: 100%; padding: 14px 20px; }
  .profile-save-actions { margin-bottom: 24px; }
  .profile-save-actions #save-status { min-height: 20px; text-align: center; }

  /* profile status: keep the explanation readable without dominating the form */
  .profile-status { align-items: flex-start; flex-wrap: wrap; }
  .profile-status-copy { flex-basis: calc(100% - 54px); }
  .profile-status-link { margin-left: 54px; }

  /* results */
  .results-meta { padding: 18px 16px; }
  .plan-top { padding: 18px 16px; gap: 12px; }
  .plan-body { padding: 0 16px 18px; }
  .plan-price .amount { font-size: 22px; }
  .plan-headline { font-size: 17px; }

  /* profile destination rows: stack so the dropdown isn't squeezed */
  .dest-row { grid-template-columns: 1fr auto auto; row-gap: 8px; }
  .pref-sel { grid-column: 1 / -1; max-width: none; width: 100%; }
}

@media (max-width: 400px) {
  /* very small phones: let price drop under the headline */
  .plan-top { flex-direction: column; }
  .plan-price { text-align: left; }
  /* drop the hotel thumbnail so the name + Book button have room */
  .hotel-img { display: none; }
}

/* When-to-go curve: a free day-by-day cost+context read for flexible travellers. */
.when-to-go { margin-top: 14px; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; background: var(--card); }
.when-to-go > summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.when-to-go .wtg-note { color: var(--brand-text); font-weight: 600; margin: 8px 0 4px; font-size: 14px; }
.wtg-bars { display: flex; align-items: flex-end; gap: 3px; min-height: 80px; margin: 10px 0 6px; overflow-x: auto; }
.wtg-bar { flex: 1 1 0; min-width: 10px; border-radius: 4px 4px 0 0; position: relative;
  background: var(--line); transition: filter .15s; }
.wtg-bar:hover { filter: brightness(.92); }
.wtg-bar.src-observed { background: #2f9e6b; }   /* a real fare we've seen */
.wtg-bar.src-feed { background: #6aa0ff; }        /* affiliate fares feed */
.wtg-bar.src-model { background: #c3ccd8; }       /* offline estimate */
.wtg-bar.cheapest { outline: 2px solid #2f9e6b; outline-offset: 1px; }
.wtg-bar.chosen { box-shadow: inset 0 -4px 0 var(--accent); }
.wtg-flag { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: 12px; white-space: nowrap; }
.wtg-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  color: var(--muted); font-size: 12px; }
.wtg-legend { display: inline-flex; align-items: center; gap: 4px; }
.src-dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin: 0 2px 0 8px; vertical-align: middle; }
.src-dot.src-observed { background: #2f9e6b; }
.src-dot.src-feed { background: #6aa0ff; }
.src-dot.src-model { background: #c3ccd8; }

/* Booking-timing advisory: book now or wait, with a backtested hit-rate. */
.booking-timing { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px;
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); font-size: 14px; }
.booking-timing .bt-icon { display: inline-flex; align-items: center; color: var(--ink-soft); margin-top: 1px; }
.booking-timing.bt-book_now { background: #fff6ec; border-color: #ffd9a8; }
.booking-timing.bt-could_wait { background: #eef6ff; border-color: #cfe3ff; }
.booking-timing.bt-neutral { background: var(--card); }
.booking-timing .bt-hit { display: block; color: var(--ink-soft); font-weight: 600; margin-top: 2px; }
.booking-timing .bt-basis { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }

/* Event radar (profile) + event-led anchor banner (planner). */
.radar-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.radar-controls label { font-weight: 600; color: var(--ink-soft); }
.radar-controls input { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; min-width: 200px; }
.radar-rows { display: flex; flex-direction: column; gap: 10px; }
.radar-row { display: flex; gap: 12px; align-items: center; justify-content: space-between;
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--card); }
.radar-name { font-weight: 700; color: var(--ink); }
.radar-where { color: var(--muted); font-size: 14px; margin-top: 2px; }
.radar-price { margin-top: 4px; }
.radar-ticket { color: var(--ink-soft); font-size: 13px; }
.radar-conf { font-weight: 500; font-size: 12px; color: var(--muted); margin-left: 6px; }
.radar-sources { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.src-chip { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px;
  background: #eef2f7; color: var(--ink-soft); border: 1px solid var(--line); }
a.src-chip:hover { background: #e2eaf3; }
/* Comfortable tap/click targets for small inline actions (44px on touch widths). */
a.src-chip, .ev-link, .leg-compare {
  display: inline-flex; align-items: center; min-height: 32px;
}
@media (max-width: 720px) {
  a.src-chip, .ev-link, .leg-compare { min-height: 44px; }
}
.est-tag { font-size: 12px; color: var(--muted); font-weight: 500; }
.anchor-ticket { color: #c97a16; }
.event-anchor-banner { background: #fff6ec; border: 1px solid #ffd9a8; border-radius: 10px;
  padding: 12px 14px; margin-bottom: 14px; color: var(--ink); }
.link-btn { background: none; border: none; color: var(--brand-text); cursor: pointer;
  text-decoration: underline; padding: 0; font: inherit; }

/* error pages */
.error-page { max-width: 520px; margin: 60px auto; text-align: center; }
.error-page h1 { margin-bottom: 8px; }
.error-ref code { background: #f0f2f6; padding: 2px 8px; border-radius: 6px; }

/* account page */
.account-wrap { max-width: 560px; margin: 0 auto; }
.account-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 16px; }
.account-card h2 { font-size: 17px; margin: 0 0 10px; }
.account-card.danger { border-color: #e8c9c9; }
.account-form .field { margin-bottom: 10px; max-width: 320px; }
.badge-ok { color: #1b7e43; background: #e8f6ee; border-radius: var(--radius-pill);
  padding: 2px 10px; font-size: 12.5px; margin-left: 6px; }
.badge-warn { color: #8a5b00; background: #fdf3e0; border-radius: var(--radius-pill);
  padding: 2px 10px; font-size: 12.5px; margin-left: 6px; }
.btn-danger { background: #b33333; color: #fff; border: none; border-radius: var(--radius-pill);
  padding: 10px 18px; cursor: pointer; font-family: inherit; }
.forgot-link { margin-top: 10px; }

/* party + currency selectors */
.party-row { display: flex; gap: 14px; align-items: end; }
.party-sel { padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px;
  font-family: inherit; font-size: 14px; background: #fff; }
.per-person { font-size: 13px; font-weight: 400; }

/* public shared trip */
.public-trip { max-width: 640px; margin: 0 auto; }
.public-badge { text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.public-total { font-size: 18px; }
.public-journey { margin: 22px 0; }
.public-cta { text-align: center; margin: 32px 0; padding: 22px; background: #f6f9ff;
  border-radius: var(--radius); }
.public-cta .btn { margin: 6px; }
.share-controls { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.share-url { font-size: 12.5px; background: #f0f2f6; padding: 4px 8px; border-radius: 6px; }

/* ops dashboard */
.ops-wrap { max-width: 760px; margin: 0 auto; }
.ops-table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 8px 0; }
.ops-table th { text-align: left; color: var(--muted); font-weight: 600; padding: 4px 10px 4px 0; }
.ops-table td { padding: 4px 10px 4px 0; border-top: 1px solid var(--line); }
.ops-task-form { display: inline-flex; gap: 8px; margin: 0 10px 10px 0; align-items: center; }
.ops-input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-family: inherit; }
