/* ============================================================
   Wayfarer — AI Travel Planner frontend
   Modern, professional, travel-editorial aesthetic.
   ============================================================ */

:root {
  /* palette */
  --ink:        #0e1726;
  --ink-soft:   #41506b;
  --muted:      #7a879c;
  --line:       #e6eaf1;
  --bg:         #f6f8fc;
  --surface:    #ffffff;

  --brand:      #0f766e;   /* deep teal */
  --brand-2:    #14b8a6;
  --brand-ink:  #0a4d47;
  --accent:     #f59e0b;   /* warm amber */
  --accent-2:   #fb7185;

  --ok:         #16a34a;
  --warn:       #d97706;
  --bad:        #dc2626;

  --radius:     18px;
  --radius-sm:  12px;
  --shadow-sm:  0 1px 2px rgba(16,23,38,.06), 0 2px 6px rgba(16,23,38,.05);
  --shadow-md:  0 10px 30px rgba(16,23,38,.10);
  --shadow-lg:  0 24px 60px rgba(16,23,38,.16);

  --font:       'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body:  'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand-name { font-family: var(--font); font-weight: 800; letter-spacing: -.02em; }

a { color: inherit; text-decoration: none; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; background: #eef1f7; padding: 1px 6px; border-radius: 6px; font-size: .85em; }

/* ─── Header ───────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(18px, 5vw, 56px);
  background: rgba(246,248,252,.82);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-mark {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; box-shadow: var(--shadow-sm);
}
.brand-mark.small { width: 26px; height: 26px; border-radius: 8px; font-size: .8rem; }
.brand-name { font-size: 1.25rem; color: var(--ink); }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a { color: var(--ink-soft); font-weight: 500; font-size: .95rem; }
.site-nav a:hover { color: var(--brand); }

.api-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 600; color: var(--ink-soft);
  background: var(--surface); border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 999px; box-shadow: var(--shadow-sm);
}
.api-pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.api-pill.online .dot { background: var(--ok); box-shadow: 0 0 0 3px rgba(22,163,74,.18); }
.api-pill.offline .dot { background: var(--bad); box-shadow: 0 0 0 3px rgba(220,38,38,.18); }

/* ─── Hero ─────────────────────────────────────────────────── */
.hero {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 70px);
  align-items: center;
  max-width: 1180px; margin: 0 auto;
  padding: clamp(40px, 7vw, 92px) clamp(18px, 5vw, 56px);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--brand-ink); background: #d7f3ee;
  font-weight: 700; font-size: .82rem; letter-spacing: .02em;
  padding: 7px 13px; border-radius: 999px; margin: 0 0 18px;
}
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.05; margin: 0 0 18px; }
.hero-sub { font-size: 1.1rem; color: var(--ink-soft); max-width: 30em; margin: 0 0 22px; }
.hero-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.hero-points li { color: var(--ink-soft); font-weight: 500; }
.hero-points i { color: var(--brand-2); margin-right: 8px; }

/* ─── Form card ────────────────────────────────────────────── */
.form-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(22px, 3vw, 32px);
  box-shadow: var(--shadow-lg);
}
.card-title { font-size: 1.25rem; margin: 0 0 22px; display: flex; align-items: center; gap: 10px; }
.card-title i { color: var(--brand); }

.field { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row-dest { margin-bottom: 0; }
.field-hint { margin: -4px 0 16px; font-size: .82rem; color: var(--muted); line-height: 1.4; }
.label-optional { font-weight: 500; font-size: .78rem; color: var(--muted); text-transform: lowercase; }
.field label { display: block; font-weight: 600; font-size: .85rem; color: var(--ink); margin-bottom: 7px; }

.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > i { position: absolute; left: 14px; color: var(--muted); font-size: .9rem; pointer-events: none; }
.input-wrap input {
  width: 100%; padding: 12px 14px 12px 38px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; font-size: .96rem; color: var(--ink);
  background: #fbfcfe; transition: border-color .15s, box-shadow .15s;
}
.input-wrap input::placeholder { color: #aab3c4; }
.input-wrap input:focus {
  outline: none; border-color: var(--brand-2);
  box-shadow: 0 0 0 4px rgba(20,184,166,.14); background: #fff;
}

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: #eef6f5; color: var(--brand-ink);
  border: 1px solid #cdeae5; border-radius: 999px;
  padding: 6px 8px 6px 12px; font-size: .85rem; font-weight: 600;
}
.chip button { border: 0; background: transparent; color: var(--brand-ink); cursor: pointer; font-size: .8rem; opacity: .6; display: grid; place-items: center; }
.chip button:hover { opacity: 1; }
.chip-input-wrap input { padding-left: 38px; }

/* ─── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border: 0; border-radius: var(--radius-sm); cursor: pointer;
  font-family: var(--font); font-weight: 700; font-size: .95rem;
  padding: 12px 18px; transition: transform .12s, box-shadow .15s, background .15s, opacity .15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-block { width: 100%; margin-top: 6px; padding: 14px; }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 8px 20px rgba(15,118,110,.28); }
.btn-primary:hover { box-shadow: 0 12px 26px rgba(15,118,110,.36); }
.btn-ghost { background: transparent; color: var(--ink-soft); border: 1.5px solid var(--line); }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-approve { background: var(--ok); color: #fff; }
.btn-approve:hover { background: #15803d; }
.btn-modify { background: var(--accent); color: #3a2a05; }
.btn-modify:hover { background: #e08e09; }
.btn-reject { background: #fff; color: var(--bad); border: 1.5px solid #f4caca; }
.btn-reject:hover { background: #fff5f5; }

.form-error { color: var(--bad); font-size: .85rem; font-weight: 600; margin: 12px 0 0; }

/* ─── Workspace ────────────────────────────────────────────── */
.workspace {
  max-width: 1000px; margin: 0 auto 40px;
  padding: clamp(22px, 4vw, 38px) clamp(18px, 5vw, 40px);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-md);
}
.workspace-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.workspace-head h2 { font-size: 1.6rem; margin: 0 0 4px; }
.ws-meta { color: var(--muted); font-size: .92rem; margin: 0; }

/* pipeline stepper */
.pipeline { list-style: none; display: flex; align-items: flex-start; padding: 0; margin: 0 0 24px; gap: 0; }
.pipeline .step { flex: 1; text-align: center; position: relative; color: var(--muted); }
.pipeline .step::before {
  content: ''; position: absolute; top: 19px; left: -50%; width: 100%; height: 3px;
  background: var(--line); z-index: 0;
}
.pipeline .step:first-child::before { display: none; }
.step-icon {
  position: relative; z-index: 1; display: grid; place-items: center;
  width: 40px; height: 40px; margin: 0 auto 8px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--line); color: var(--muted);
  transition: all .25s;
}
.step-label { font-size: .82rem; font-weight: 600; }
.step.active .step-icon { border-color: var(--brand-2); color: var(--brand); box-shadow: 0 0 0 5px rgba(20,184,166,.15); }
.step.active { color: var(--brand-ink); }
.step.done .step-icon { background: var(--brand); border-color: var(--brand); color: #fff; }
.step.done::before { background: var(--brand-2); }
.step.done { color: var(--ink-soft); }
.step.gate-wait .step-icon { border-color: var(--accent); color: var(--warn); box-shadow: 0 0 0 5px rgba(245,158,11,.18); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 5px rgba(245,158,11,.18);} 50% { box-shadow: 0 0 0 9px rgba(245,158,11,.05);} }

/* working banner */
.working-banner {
  display: none; flex-direction: column; gap: 14px;
  background: linear-gradient(135deg, #f0fbf9 0%, #f8fafc 100%);
  border: 1px solid #cdeae5; color: var(--brand-ink);
  padding: 18px 20px; border-radius: var(--radius); font-weight: 600;
  box-shadow: 0 4px 18px rgba(13, 148, 136, .08);
}
.working-head { display: flex; align-items: flex-start; gap: 12px; }
.working-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.working-title { font-size: 1rem; font-weight: 700; color: var(--brand-ink); }
.working-sub {
  font-weight: 500; font-size: .78rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em;
}
.progress-wrap { width: 100%; }
.progress-track {
  position: relative; height: 8px; background: #e2e8f0; border-radius: 999px; overflow: hidden;
}
.progress-fill {
  position: relative; z-index: 1; height: 100%; width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-2), var(--brand), #14b8a6);
  transition: width .65s cubic-bezier(.4, 0, .2, 1);
  box-shadow: 0 0 12px rgba(13, 148, 136, .35);
}
.working-banner.gate-pause {
  border-color: #f6e0b3;
  background: linear-gradient(135deg, #fffaf0 0%, #f8fafc 100%);
  box-shadow: 0 4px 18px rgba(245, 158, 11, .1);
}
.working-banner.gate-pause .spinner { display: none; }
.working-banner.gate-pause .working-head::before {
  content: '\f28b';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 1.15rem;
  color: var(--warn);
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}
.working-banner.gate-pause .progress-shimmer { animation: none; opacity: 0; }
.working-banner.gate-pause .progress-fill {
  background: linear-gradient(90deg, var(--accent), #fbbf24);
  box-shadow: 0 0 10px rgba(245, 158, 11, .25);
}
.working-banner.over-draft {
  margin-bottom: 20px;
  border-color: #b8e0db;
  background: linear-gradient(135deg, #ecfdf5 0%, #f0f9ff 100%);
}
.progress-shimmer {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.45) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: progress-shimmer 1.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes progress-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.status-lines {
  position: relative; min-height: 2.2em;
}
.status-line {
  display: block; position: absolute; left: 0; right: 0; top: 0;
  font-weight: 500; font-size: .9rem; color: var(--ink-soft); line-height: 1.45;
  opacity: 0; transform: translateY(8px);
  transition: opacity .5s ease, transform .5s ease;
  pointer-events: none;
}
.status-line.visible {
  opacity: 1; transform: translateY(0);
}
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 3px solid #cdeae5; border-top-color: var(--brand-2);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Review gate ──────────────────────────────────────────── */
.draft-area { margin-top: 24px; }
.review-gate {
  background: linear-gradient(180deg, #fffaf0, #fff);
  border: 1.5px solid #f6e0b3; border-radius: var(--radius);
  padding: 22px; margin-bottom: 26px;
}
.gate-head { margin-bottom: 16px; }
.gate-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #3a2a05; font-weight: 700; font-size: .82rem;
  padding: 6px 12px; border-radius: 999px; margin-bottom: 8px;
}
.gate-head p { margin: 8px 0 0; color: var(--ink-soft); }
.gate-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.feedback-box { margin-top: 18px; padding-top: 18px; border-top: 1px dashed #f0d99a; }
.feedback-hint {
  margin: 0 0 12px; padding: 10px 12px; border-radius: var(--radius-sm);
  background: #fff8eb; color: #7c5a10; font-size: .88rem; line-height: 1.5;
}
.feedback-box label { display: block; font-weight: 600; margin-bottom: 8px; }
.feedback-box textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); font-family: inherit; font-size: .95rem; resize: vertical;
}
.feedback-box textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(245,158,11,.14); }
.feedback-actions { display: flex; gap: 10px; margin-top: 12px; }

/* ─── Itinerary ────────────────────────────────────────────── */
.itinerary { display: grid; gap: 22px; }
.summary-card {
  background: linear-gradient(135deg, var(--brand-ink), var(--brand));
  color: #fff; border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow-md);
}
.summary-card h3 { margin: 0 0 6px; font-size: 1.4rem; }
.summary-card .sum-sub { opacity: .85; margin: 0 0 18px; }
.sum-stats { display: flex; flex-wrap: wrap; gap: 14px; }
.sum-stat { background: rgba(255,255,255,.12); border-radius: var(--radius-sm); padding: 12px 16px; min-width: 110px; }
.sum-stat .k { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; opacity: .8; }
.sum-stat .v { font-size: 1.25rem; font-weight: 800; font-family: var(--font); }

/* budget */
.budget-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.budget-card h3 { margin: 0 0 16px; display: flex; align-items: center; gap: 10px; font-size: 1.15rem; }
.budget-card h3 i { color: var(--accent); }
.budget-row { display: grid; grid-template-columns: 130px 1fr 90px; align-items: center; gap: 12px; margin-bottom: 12px; }
.budget-row .b-label { font-weight: 600; font-size: .9rem; text-transform: capitalize; }
.b-bar { height: 10px; background: #eef1f7; border-radius: 999px; overflow: hidden; }
.b-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand-2), var(--brand)); }
.budget-row .b-amt { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* day cards */
.day-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0; overflow: hidden; box-shadow: var(--shadow-sm); }
.day-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; background: #f9fbfd; border-bottom: 1px solid var(--line);
}
.day-head .d-title { display: flex; align-items: center; gap: 12px; }
.day-num { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 800; font-family: var(--font); }
.day-head h4 { margin: 0; font-size: 1.05rem; }
.day-head .d-date { color: var(--muted); font-size: .82rem; }
.day-weather { display: inline-flex; align-items: center; gap: 7px; font-size: .85rem; font-weight: 600; color: var(--ink-soft); background: #eef6f5; padding: 6px 12px; border-radius: 999px; }
.day-body { padding: 8px 20px 18px; }
.activity { display: flex; gap: 16px; padding: 24px 0; border-bottom: 1px dashed var(--line); align-items: flex-start; }
.activity:last-child { border-bottom: 0; }
.activity .a-time { flex: 0 0 75px; font-weight: 800; color: var(--brand); font-size: .9rem; font-variant-numeric: tabular-nums; padding-top: 4px; }
.activity .a-body { flex: 1; display: flex; gap: 24px; align-items: flex-start; text-align: left; flex-direction: row; }

.a-text { flex: 1; min-width: 0; }
.activity .a-title { font-weight: 700; margin: 0 0 6px; font-size: 1.1rem; color: var(--ink); }
.activity .a-title a:hover { color: var(--brand); border-bottom-color: var(--brand); }
.activity .a-desc { color: var(--ink-soft); font-size: .95rem; margin: 0 0 8px; line-height: 1.6; }
.activity .a-cost { display: inline-block; font-weight: 700; color: var(--accent); font-size: .88rem; padding: 4px 10px; background: rgba(245, 158, 11, 0.1); border-radius: 6px; margin-top: 6px; }
.a-travel {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; margin-bottom: 12px;
  font-size: .85rem; font-weight: 500; color: var(--ink-soft);
}
.a-travel strong { color: var(--ink); font-weight: 700; }
.a-travel i { opacity: .7; }

.day-head-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: flex-end; }
.day-route {
  display: inline-flex; align-items: center; gap: 7px; font-size: .82rem; font-weight: 700;
  color: var(--brand); background: #eef6f5; padding: 6px 12px; border-radius: 999px;
}

/* route map */
.route-map-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm);
}
.route-map-card h3 { margin: 0 0 8px; display: flex; align-items: center; gap: 10px; font-size: 1.15rem; }
.route-map-card h3 i { color: var(--brand); }
.route-map-sub { margin: 0 0 16px; color: var(--ink-soft); font-size: .92rem; }
.route-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 16px; }
.route-stat { background: #f9fbfd; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.route-stat .k { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 4px; }
.route-stat .v { font-size: 1.2rem; font-weight: 800; color: var(--ink); font-family: var(--font); }
.route-map-wrap, .route-day-map { height: 340px; border-radius: var(--radius-sm); border: 1px solid var(--line); overflow: hidden; background: #eef1f7; }
.route-day-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }
.route-day-btn {
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  border-radius: 999px; padding: 8px 14px; font-size: .82rem; font-weight: 700; cursor: pointer;
  font-family: inherit; transition: .15s ease;
}
.route-day-btn.active, .route-day-btn:hover { border-color: var(--day-color, var(--brand)); color: var(--brand); background: #eef6f5; }
.route-legs-table-wrap { overflow-x: auto; margin-bottom: 18px; }
.route-legs-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.route-legs-table th, .route-legs-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.route-legs-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.route-day-maps { display: grid; gap: 16px; }
.route-day-card { background: #f9fbfd; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; }
.route-day-card h4 { margin: 0 0 4px; display: flex; align-items: center; gap: 8px; font-size: 1rem; }
.route-day-meta { margin: 0 0 10px; color: var(--ink-soft); font-size: .85rem; }
.day-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

@media (max-width: 600px) {
  .route-map-wrap, .route-day-map { height: 260px; }
}

.a-image { flex: 0 0 240px; height: 160px; margin: 0; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.a-image img { width: 100%; height: 100%; object-fit: cover; display: block; background: #eef1f7; transition: transform 0.4s ease; }
.a-image.a-image-fallback {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; background: linear-gradient(135deg, #eef6f5, #eef1f7); color: var(--brand);
  font-size: .82rem; font-weight: 600; text-align: center; padding: 12px;
}
.a-image.a-image-pending {
  background: linear-gradient(135deg, #eef6f5 0%, #f1f5f9 50%, #eef6f5 100%);
  background-size: 200% 100%;
  animation: image-skeleton-bg 2.2s ease-in-out infinite;
}
.a-image-skeleton {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; width: 100%; height: 100%; color: var(--brand); font-size: .78rem; font-weight: 600;
}
.a-image-skeleton i { font-size: 1.4rem; opacity: .55; animation: image-pulse 1.6s ease-in-out infinite; }
@keyframes image-skeleton-bg {
  0%, 100% { background-position: 100% 0; }
  50% { background-position: 0 0; }
}
@keyframes image-pulse {
  0%, 100% { opacity: .4; transform: scale(.96); }
  50% { opacity: .85; transform: scale(1); }
}
.a-image img.a-image-reveal {
  animation: image-reveal .45s ease;
}
@keyframes image-reveal {
  from { opacity: 0; transform: scale(1.03); }
  to { opacity: 1; transform: none; }
}
.a-image.a-image-fallback i { font-size: 1.6rem; opacity: .7; }
.a-image:hover img { transform: scale(1.05); }

@media (max-width: 600px) {
  .activity .a-body { flex-direction: column; text-align: left; align-items: stretch; gap: 14px; }
  .a-image { flex: auto; height: 200px; width: 100%; }
}

/* generic note / json fallback */
.note-block { background: #f9fbfd; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; }
.note-block h3 { margin: 0 0 10px; font-size: 1.05rem; }
.note-block pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-size: .85rem; color: var(--ink-soft); }
.note-block ul { margin: 0; padding-left: 18px; color: var(--ink-soft); }

.completed-banner {
  display: flex; align-items: center; gap: 12px;
  background: #ecfdf3; border: 1px solid #abefc6; color: #14532d;
  padding: 14px 18px; border-radius: var(--radius-sm); font-weight: 700; margin-bottom: 4px;
}
.completed-banner i { color: var(--ok); font-size: 1.2rem; }

/* ─── How it works ─────────────────────────────────────────── */
.section-title { text-align: center; font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0 0 8px; }
.section-sub { text-align: center; color: var(--muted); margin: 0 0 40px; }
.how, .agents { max-width: 1100px; margin: 0 auto; padding: clamp(48px, 7vw, 90px) clamp(18px, 5vw, 40px); }
.flow { display: flex; align-items: stretch; justify-content: center; flex-wrap: wrap; gap: 12px; }
.flow-step { flex: 1 1 160px; max-width: 200px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px; box-shadow: var(--shadow-sm); text-align: center; }
.flow-step .n { display: grid; place-items: center; width: 32px; height: 32px; margin: 0 auto 12px; border-radius: 10px; background: #eef6f5; color: var(--brand); font-weight: 800; font-family: var(--font); }
.flow-step.gate { border-color: #f6e0b3; background: #fffaf0; }
.flow-step.gate .n { background: #fdebc5; color: var(--warn); }
.flow-step h3 { margin: 0 0 6px; font-size: 1.05rem; }
.flow-step p { margin: 0; color: var(--ink-soft); font-size: .88rem; }
.flow-arrow { align-self: center; color: var(--line); font-size: 1.1rem; }

/* ─── Agents ───────────────────────────────────────────────── */
.agent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.agent-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.agent-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.agent-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; font-size: 1.3rem; color: #fff; margin-bottom: 16px; }
.agent-icon.research { background: linear-gradient(135deg, #2563eb, #38bdf8); }
.agent-icon.plan { background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.agent-icon.human { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.agent-icon.finalize { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.agent-card h3 { margin: 0 0 8px; font-size: 1.2rem; }
.agent-card p { color: var(--ink-soft); margin: 0 0 14px; font-size: .92rem; }
.agent-card ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.agent-card li { font-size: .8rem; font-weight: 600; color: var(--ink-soft); background: #f4f6fa; border: 1px solid var(--line); padding: 5px 11px; border-radius: 999px; }
.agent-card li i { color: var(--brand-2); margin-right: 5px; }

/* ─── Footer ───────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); padding: 30px clamp(18px, 5vw, 56px); text-align: center; color: var(--ink-soft); }
.site-footer p { margin: 4px 0; display: inline-flex; align-items: center; gap: 8px; justify-content: center; flex-wrap: wrap; }
.site-footer .muted { color: var(--muted); font-size: .85rem; }

/* ─── Toasts ───────────────────────────────────────────────── */
.toast-stack { position: fixed; bottom: 24px; right: 24px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff; padding: 13px 18px; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); font-weight: 600; font-size: .92rem;
  animation: toast-in .3s ease; max-width: 360px;
}
.toast.ok { background: #14532d; }
.toast.bad { background: #7f1d1d; }
.toast.warn { background: #78350f; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ─── Optional travel price panel (form) ───────────────────── */
.travel-panel {
  border: 1px dashed var(--line); border-radius: var(--radius-sm);
  margin-bottom: 18px; overflow: hidden; background: #f9fbfd;
}
.travel-panel-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 16px; border: 0; background: transparent;
  font-family: inherit; font-size: .95rem; font-weight: 700; color: var(--ink);
  cursor: pointer; text-align: left;
}
.travel-panel-toggle em { font-style: normal; font-weight: 500; color: var(--muted); font-size: .85rem; }
.travel-panel-toggle i.travel-chevron { transition: transform .2s ease; color: var(--muted); }
.travel-panel.open .travel-chevron { transform: rotate(180deg); }
.travel-panel-body { padding: 0 16px 16px; border-top: 1px solid var(--line); }
.travel-panel-hint { margin: 12px 0; font-size: .85rem; color: var(--ink-soft); }
.travel-subsection { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.travel-subsection-label { margin: 0 0 6px; font-size: .9rem; font-weight: 600; color: var(--ink); }
.travel-airports { margin: 10px 0 14px; padding: 10px 12px; background: var(--surface-2, #f8f9fb); border-radius: 8px; font-size: .82rem; color: var(--ink-soft); line-height: 1.5; }
.route-iata-badge { display: inline-block; margin-bottom: 4px; padding: 2px 8px; border-radius: 999px; background: rgba(13, 148, 136, .12); color: var(--accent, #0d9488); font-size: .75rem; font-weight: 600; letter-spacing: .02em; }
.check-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px;
  border: 1.5px solid var(--line); border-radius: 999px; font-size: .88rem;
  font-weight: 600; cursor: pointer; background: #fff;
}
.check-pill:has(input:checked) { border-color: var(--brand); background: #eef6f5; color: var(--brand); }
.check-pill input { accent-color: var(--brand); }

/* ─── HITL travel picker (review gate) ─────────────────────── */
.travel-review {
  margin: 16px 0; padding: 16px; background: #f8fbff;
  border: 1px solid #c7daf5; border-radius: var(--radius-sm);
}
.travel-review-inner > h4 { margin: 0 0 6px; font-size: .98rem; display: flex; align-items: center; gap: 8px; }
.travel-review-sub, .travel-review-skip { margin: 0 0 12px; font-size: .82rem; color: var(--ink-soft); line-height: 1.45; }
.travel-review-skip { margin: 12px 0 0; }
.travel-review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-bottom: 4px; }
.travel-section-label { margin: 14px 0 8px; font-size: .88rem; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.travel-section-label:first-of-type { margin-top: 0; }
.travel-pick-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
  padding: 12px; border: 2px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; cursor: pointer; font-family: inherit; transition: .15s ease;
}
.travel-pick-card:hover { border-color: var(--brand); }
.travel-pick-card.selected { border-color: var(--brand); background: #eef6f5; box-shadow: 0 0 0 3px rgba(13,148,136,.12); }
.travel-pick-card strong { font-size: .92rem; color: var(--ink); }
.pick-select-label { font-size: .75rem; font-weight: 700; color: var(--brand); margin-top: 4px; }
.selected-travel-card {
  background: linear-gradient(135deg, #fffbeb 0%, #fff 70%);
  border: 1px solid #f6e0b3; border-radius: var(--radius);
  padding: 20px; margin-bottom: 4px;
}
.selected-travel-card > h3 { margin: 0 0 10px; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.selected-travel-card p { margin: 6px 0; font-size: .9rem; color: var(--ink-soft); }

/* ─── Travel picks (recommended at top of itinerary) ───────── */
.travel-picks-card {
  background: linear-gradient(135deg, #f0faf9 0%, #fff 55%);
  border: 1px solid #c5e8e4; border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm); margin-bottom: 4px;
}
.travel-picks-card > h3 { margin: 0 0 6px; display: flex; align-items: center; gap: 10px; font-size: 1.15rem; }
.travel-picks-card > h3 i { color: var(--brand); }
.travel-picks-sub { margin: 0 0 18px; color: var(--ink-soft); font-size: .92rem; }
.travel-picks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.pick-card {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px;
  background: #fff; display: flex; flex-direction: column; gap: 10px;
}
.pick-card.pick-flight { border-color: #93c5fd; background: #f8fbff; }
.pick-badge {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700;
  background: rgba(13, 148, 136, .14); color: var(--brand);
}
.pick-badge-hotel { background: rgba(99, 102, 241, .12); color: #4f46e5; }
.pick-main { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.pick-main h4 { margin: 4px 0 2px; font-size: 1rem; }
.pick-meta { margin: 0; font-size: .82rem; color: var(--ink-soft); }
.pick-price { font-size: 1.05rem; font-weight: 800; color: var(--ink); white-space: nowrap; }
.pick-reason { margin: 0; font-size: .82rem; color: var(--muted); line-height: 1.45; }
.pick-hotel-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.pick-hotel-info { flex: 1; min-width: 0; }
.pick-link { align-self: flex-start; padding: 6px 12px !important; font-size: .82rem !important; }

.travel-options-card summary {
  cursor: pointer; font-weight: 700; font-size: .95rem; color: var(--ink-soft);
  padding: 4px 0 12px; list-style: none; display: flex; align-items: center; gap: 8px;
}
.travel-options-card summary::-webkit-details-marker { display: none; }

/* ─── Travel options cards (final plan) ────────────────────── */
.travel-options-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm); margin-bottom: 4px;
}
.travel-options-card > h3 { margin: 0 0 6px; display: flex; align-items: center; gap: 10px; font-size: 1.15rem; }
.travel-options-card > h3 i { color: var(--brand); }
.travel-options-sub { margin: 0 0 16px; color: var(--ink-soft); font-size: .92rem; }
.travel-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.travel-tab {
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  border-radius: 999px; padding: 8px 16px; font-size: .85rem; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: .15s ease;
}
.travel-tab.active, .travel-tab:hover { border-color: var(--brand); color: var(--brand); background: #eef6f5; }
.travel-route-badge {
  display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600;
  color: var(--ink-soft); background: #f4f6fa; padding: 8px 14px; border-radius: 999px; margin-bottom: 14px;
}
.travel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.travel-offer {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px;
  background: #fff; display: flex; flex-direction: column; gap: 10px;
  transition: box-shadow .2s, transform .2s;
}
.travel-offer:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.travel-offer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.travel-price { font-size: 1.35rem; font-weight: 800; color: var(--brand); font-family: var(--font); white-space: nowrap; }
.travel-meta { font-size: .82rem; color: var(--ink-soft); line-height: 1.5; }
.travel-meta strong { color: var(--ink); }
.travel-offer.hotel-offer { padding: 0; overflow: hidden; }
.hotel-thumb { width: 100%; height: 130px; object-fit: cover; background: #eef1f7; display: block; }
.hotel-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.hotel-rating { font-size: .82rem; font-weight: 700; color: var(--accent); }
.travel-empty { color: var(--muted); font-size: .9rem; padding: 12px 0; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .agent-grid { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); }
  .site-nav a { display: none; }
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
  .pipeline .step-label { font-size: .7rem; }
  .budget-row { grid-template-columns: 90px 1fr 70px; }
  .gate-actions .btn { flex: 1; }
}

/* ─── Revisions and Research additions ─────────────────────── */
.revision-info {
  margin: 16px 0;
  padding: 14px;
  background: rgba(255,255,255,0.1);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
}
.rev-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
  background: rgba(245, 158, 11, 0.2);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.rev-notes strong { display: block; font-size: 0.9rem; margin-bottom: 6px; }
.rev-notes ul { margin: 0; padding-left: 20px; font-size: 0.9rem; }
.rev-notes li { margin-bottom: 4px; }

.research-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.research-card h3 { margin: 0 0 16px; display: flex; align-items: center; gap: 10px; font-size: 1.15rem; color: var(--brand-ink); }
.r-section { margin-bottom: 16px; }
.r-section:last-child { margin-bottom: 0; }
.r-section h4 { margin: 0 0 8px; font-size: 0.95rem; color: var(--ink); text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.9; }
.r-section ul { margin: 0; padding-left: 18px; color: var(--ink-soft); font-size: 0.9rem; }
.r-section li { margin-bottom: 4px; }
.r-weather-grid { display: grid; gap: 8px; font-size: 0.9rem; color: var(--ink-soft); background: #f9fbfd; padding: 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.r-weather-item strong { color: var(--ink); }
.r-sources a { color: var(--brand); text-decoration: underline; text-decoration-color: rgba(15,118,110,0.3); text-underline-offset: 2px; }
.r-sources a:hover { text-decoration-color: var(--brand); }

