/*
 * Perfect Gig — design system v3 (Sprint 22).
 *
 * Rewritten from scratch. The previous stylesheet's problems weren't its
 * colours, they were structural, and all five are fixed here:
 *
 *   1. One radius (22px) on everything — cards, buttons, inputs, hero. Now a
 *      scale: 4px tags, 6px controls, 8px panels. Nothing above 10px except a
 *      deliberate pill on a status tag.
 *   2. Shadowed floating cards everywhere. Now 1px hairlines define structure;
 *      shadow is reserved for things that genuinely float (dropdowns, the
 *      sticky search bar).
 *   3. Emoji as icons. Now an inline SVG set (js/lib/icons.js).
 *   4. A two-stop gradient wash as the primary surface. Now flat near-black
 *      chrome with the accent on a small fraction of pixels, which is what
 *      Skyscanner/Booking/Expedia/Ticketmaster actually do.
 *   5. No density or type scale. Now an explicit scale with tracked 11px
 *      micro-labels and tabular-figure price display.
 *
 * Mobile-first: base rules target a phone; min-width queries layer on the
 * wider treatment. Token values are mirrored in DesignSystem.swift so the app
 * and the site stay one product — see website/README.md.
 */

/* ============================================================
   1. Tokens
   ============================================================ */
:root {
  /* Neutral ramp — slightly cool, so the accent reads as deliberate */
  --bg:            #F6F7F9;
  --surface:       #FFFFFF;
  --surface-sunk:  #F1F3F6;
  --ink-900:       #0B0E14;
  --ink-700:       #333A47;
  --ink-500:       #646C7B;
  --ink-400:       #8C93A2;
  --line:          #E3E6EC;
  --line-strong:   #CBD1DA;

  /* One accent, used sparingly */
  --accent:        #1B4DE4;
  --accent-hover:  #1740C0;
  --accent-ink:    #FFFFFF;
  --accent-tint:   #EDF2FE;
  --accent-line:   #C3D3FA;

  /* Semantic — cost categories and price signals */
  --flight:        #1B4DE4;
  --flight-tint:   #EDF2FE;
  --hotel:         #6D3BEB;
  --hotel-tint:    #F1ECFE;
  --ticket:        #B45309;
  --ticket-tint:   #FCF1E4;
  --success:       #047857;
  --success-tint:  #E6F4EE;
  --warn:          #B54708;
  --warn-tint:     #FDF0E6;
  --danger:        #B42318;

  /* Dark chrome (header on marketing pages, hero, footer) */
  --chrome:        #0B0E14;
  --chrome-2:      #151A23;
  --chrome-line:   #262C38;
  --chrome-ink:    #FFFFFF;
  --chrome-ink-2:  #A2AAB9;

  /* Radius scale — the single biggest visual correction in this rewrite */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 10px;

  /* Shadow: only for things that float */
  --shadow-pop:    0 4px 6px -2px rgba(11, 14, 20, .05), 0 12px 24px -4px rgba(11, 14, 20, .12);
  --shadow-sticky: 0 1px 2px rgba(11, 14, 20, .06), 0 8px 20px -8px rgba(11, 14, 20, .14);

  /* Type — the system stack, deliberately. A webfont would be one more
     network dependency and a flash of unstyled text on the first paint of a
     page whose whole job is to feel fast; SF Pro / Segoe UI Variable /
     Roboto are all excellent, and on iOS this matches the app exactly. */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --content:      1200px;
  --content-prose: 680px;
  --header-h:     60px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:           #0A0C11;
    --surface:      #12151C;
    --surface-sunk: #171B23;
    --ink-900:      #F3F5F8;
    --ink-700:      #C6CCD6;
    --ink-500:      #939BAA;
    --ink-400:      #6E7686;
    --line:         #242935;
    --line-strong:  #343B49;

    --accent:       #6C91FF;
    --accent-hover: #85A4FF;
    --accent-ink:   #07101F;
    --accent-tint:  #16213C;
    --accent-line:  #2A3A61;

    --flight:       #6C91FF;
    --flight-tint:  #16213C;
    --hotel:        #A98BFF;
    --hotel-tint:   #221B3A;
    --ticket:       #E3A155;
    --ticket-tint:  #2E2316;
    --success:      #3FBF87;
    --success-tint: #10281F;
    --warn:         #E0954F;
    --warn-tint:    #2C2013;
    --danger:       #F97066;

    --chrome:       #05070B;
    --chrome-2:     #0E1218;
    --chrome-line:  #1C222D;
    --chrome-ink:   #FFFFFF;
    --chrome-ink-2: #99A1B0;

    --shadow-pop:    0 4px 6px -2px rgba(0, 0, 0, .4), 0 12px 28px -4px rgba(0, 0, 0, .55);
    --shadow-sticky: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 20px -8px rgba(0, 0, 0, .6);
  }
}

/* ============================================================
   2. Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

/* Must outrank the component `display` rules below, or [hidden] silently
   does nothing on anything that sets its own display. */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-900);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv05" 1, "ss03" 1;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 640;
  letter-spacing: -0.022em;
  line-height: 1.2;
  color: var(--ink-900);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

.icon { flex-shrink: 0; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  font-weight: 600;
  border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; }

/* Micro-label: 11px, uppercase, tracked. Used for every field label, table
   header, and price qualifier. This one rule does most of the work of making
   a dense interface legible. */
.label {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: var(--ink-400);
}

.muted { color: var(--ink-500); }
.num { font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

/* ============================================================
   3. Layout
   ============================================================ */
.wrap {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 16px;
}
.wrap-prose {
  max-width: var(--content-prose);
  margin: 0 auto;
  padding: 0 16px;
}
main { padding-bottom: 64px; }

.section { padding: 40px 0; }
.section-head { margin-bottom: 16px; }
.section-head h2 { font-size: 19px; }
.section-head p { margin: 6px 0 0; color: var(--ink-500); font-size: 13.5px; }

/* ============================================================
   4. Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 16px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 640;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: var(--r-sm);
  background: var(--ink-900);
  color: var(--surface);
  display: grid;
  place-items: center;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}
.site-nav a {
  font-size: 13.5px;
  font-weight: 520;
  color: var(--ink-500);
  padding: 7px 10px;
  border-radius: var(--r-sm);
  white-space: nowrap;
}
.site-nav a:hover { color: var(--ink-900); background: var(--surface-sunk); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--ink-900); font-weight: 600; }

/* "More" — About/Privacy/Terms live here, not in the primary nav. */
.nav-more { position: relative; }
.nav-more > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 13.5px;
  font-weight: 520;
  color: var(--ink-500);
  padding: 7px 10px;
  border-radius: var(--r-sm);
}
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-more > summary:hover { color: var(--ink-900); background: var(--surface-sunk); }
.nav-more > summary[aria-current="page"] { color: var(--ink-900); font-weight: 600; }
.nav-more[open] > summary { color: var(--ink-900); background: var(--surface-sunk); }
.nav-more[open] > summary .icon { transform: rotate(180deg); }
.nav-more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 190px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-pop);
}
.nav-more-menu a {
  display: block;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-700);
}
.nav-more-menu a:hover { background: var(--surface-sunk); color: var(--ink-900); }

/* On a narrow phone the brand already is the home link, so the explicit
   "Home" item is redundant — dropping it keeps the bar on one line rather
   than letting it overflow. */
@media (max-width: 479px) {
  .site-header .bar { gap: 10px; }
  .site-nav a[href="index.html"] { display: none; }
  .site-nav a, .nav-more > summary { padding: 7px 8px; }
}

/* ============================================================
   5. Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: none;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }

.btn-secondary {
  background: var(--surface);
  color: var(--ink-900);
  border-color: var(--line-strong);
}
.btn-secondary:hover:not(:disabled) { background: var(--surface-sunk); }

.btn-ghost { background: none; color: var(--ink-500); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-sunk); color: var(--ink-900); }

.btn-lg { height: 44px; padding: 0 22px; font-size: 14.5px; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; }

/* On the dark hero, the primary button inverts to white. */
.on-chrome .btn-primary { background: var(--surface); color: var(--ink-900); }
.on-chrome .btn-primary:hover { background: #E8EBF0; }
.on-chrome .btn-secondary {
  background: transparent;
  color: var(--chrome-ink);
  border-color: rgba(255, 255, 255, .22);
}
.on-chrome .btn-secondary:hover { background: rgba(255, 255, 255, .08); }

/* ============================================================
   6. Panels & tags
   ============================================================ */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.panel-pad { padding: 16px; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2, .panel-head h3 { font-size: 14px; font-weight: 620; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 7px;
  border-radius: var(--r-xs);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}
.tag-success { background: var(--success-tint); color: var(--success); }
.tag-accent  { background: var(--accent-tint);  color: var(--accent); }
.tag-warn    { background: var(--warn-tint);    color: var(--warn); }
.tag-neutral { background: var(--surface-sunk); color: var(--ink-500); }

/* ============================================================
   7. Fields
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label { font-size: 11px; font-weight: 600; letter-spacing: .055em; text-transform: uppercase; color: var(--ink-400); }

.input, .select {
  height: 38px;
  width: 100%;
  padding: 0 11px;
  background: var(--surface);
  color: var(--ink-900);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  font-size: 14px;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.input::placeholder { color: var(--ink-400); }
.input:focus, .select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.select { appearance: none; padding-right: 32px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 16px) 17px, calc(100% - 11px) 17px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

/* Stepper — a bordered segmented control, not two floating round buttons. */
.stepper {
  display: inline-flex;
  align-items: center;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface);
}
.stepper button {
  width: 34px;
  height: 100%;
  border: 0;
  background: none;
  color: var(--ink-500);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.stepper button:hover { background: var(--surface-sunk); color: var(--ink-900); }
.stepper output {
  min-width: 34px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  line-height: 36px;
  height: 100%;
}

/* ============================================================
   8. Search widget — the OTA pattern: one bordered bar, hairline-divided
   fields, solid action button. Stacks on phones.
   ============================================================ */
.searchbar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.on-chrome .searchbar { border-color: transparent; box-shadow: var(--shadow-sticky); }

.search-modes {
  display: flex;
  gap: 2px;
  padding: 6px 6px 0;
  border-bottom: 1px solid var(--line);
}
.search-mode {
  appearance: none;
  border: 0;
  background: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px 10px;
  font-size: 13px;
  font-weight: 560;
  color: var(--ink-500);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.search-mode:hover { color: var(--ink-900); }
.search-mode[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 640; }

.search-fields { display: flex; flex-direction: column; }
.search-field {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 9px 14px;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
}
.search-field:focus-within { background: var(--accent-tint); }
.search-field > label { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-400); }
.search-field input {
  border: 0;
  background: none;
  padding: 0;
  width: 100%;
  font-size: 15px;
  font-weight: 520;
  color: var(--ink-900);
}
.search-field input:focus { outline: none; }
.search-field input::placeholder { color: var(--ink-400); font-weight: 400; }
.search-field .field-icon { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-400); }

.search-actions { padding: 10px 14px; display: flex; gap: 10px; align-items: center; }
.search-actions .btn-primary { flex: 1; }
.search-hint { padding: 0 14px 12px; font-size: 12px; color: var(--ink-500); }
.search-hint a { font-weight: 560; }

/* ============================================================
   9. City / airport autocomplete
   ============================================================ */
.ac-menu {
  position: absolute;
  left: 6px;
  right: 6px;
  top: calc(100% - 4px);
  z-index: 80;
  max-height: 324px;
  overflow-y: auto;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-pop);
}
.ac-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 9px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  text-align: left;
  cursor: pointer;
}
.ac-item:hover, .ac-item.is-active { background: var(--accent-tint); }
.ac-item .ac-ico {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: var(--r-xs);
  background: var(--surface-sunk);
  color: var(--ink-500);
}
.ac-item.is-city .ac-ico { background: var(--accent-tint); color: var(--accent); }
.ac-body { min-width: 0; flex: 1; }
.ac-title { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-sub { display: block; font-size: 11.5px; color: var(--ink-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-title .ac-code { margin-left: 5px; }
.ac-code {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--ink-400);
  font-variant-numeric: tabular-nums;
}
.ac-item.is-airport { padding-left: 22px; }
.ac-item.is-airport .ac-title { font-weight: 500; font-size: 13px; }
.ac-empty { padding: 14px 10px; font-size: 13px; color: var(--ink-500); }

/* ============================================================
   10. Results — one bordered list, hairline-separated rows. Not a stack of
   floating cards; this is a comparison table, and it should read like one.
   ============================================================ */
.results-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 10px;
}
.results-bar h2 { font-size: 16px; }
.results-bar .count { font-size: 12.5px; color: var(--ink-500); }

.result-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }

.result {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 14px;
  padding: 14px 16px 14px 14px;
  border-bottom: 1px solid var(--line);
  border-left: 2px solid transparent;
}
.result:last-child { border-bottom: 0; }
.result.is-cheapest { border-left-color: var(--success); background: linear-gradient(90deg, var(--success-tint), transparent 42%); }

.result-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 1px;
  border-radius: var(--r-sm);
  background: var(--surface-sunk);
  height: 50px;
}
.result-date .dow { font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-400); margin-top: 5px; }
.result-date .dnum { font-size: 19px; font-weight: 650; line-height: 1.05; letter-spacing: -0.03em; color: var(--ink-900); font-variant-numeric: tabular-nums; }
.result-date .mon { font-size: 9.5px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-500); }

.result-main { min-width: 0; }
.result-venue { font-size: 14.5px; font-weight: 620; letter-spacing: -0.015em; color: var(--ink-900); }
.result-city { font-size: 12.5px; color: var(--ink-500); margin-top: 1px; }
.result-openers { font-size: 11.5px; color: var(--ink-400); margin-top: 2px; }

/* Cost breakdown: an inline strip with hairline separators, not three
   floating chips with big coloured circles. */
.result-costs { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; margin-top: 8px; }
.cost {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding-right: 10px;
  border-right: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-500);
  line-height: 1.6;
}
.cost:last-child { border-right: 0; padding-right: 0; }
.cost .icon { color: var(--ink-400); }
.cost.c-flight .icon { color: var(--flight); }
.cost.c-hotel  .icon { color: var(--hotel); }
.cost.c-ticket .icon { color: var(--ticket); }
.cost b { font-weight: 620; color: var(--ink-700); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.cost.is-est b { color: var(--ink-500); font-weight: 550; }

.result-right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.result-total {
  font-size: 21px;
  font-weight: 660;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  color: var(--ink-900);
  line-height: 1.1;
  white-space: nowrap;
}
.result-per { font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-400); }
/* Booking-fee disclosure (Sprint 23). Deliberately legible rather than
   fine print — the total's credibility depends on showing where it differs
   from a ticket site's advertised price. */
.result-fees { font-size: 11px; color: var(--ticket); font-variant-numeric: tabular-nums; margin-top: 1px; white-space: nowrap; }
/* A TBA ticket price (common on Ticketmaster's API for real, on-sale shows)
 * points at the Ticketmaster listing instead of leaving the disclosure a
 * dead end — styled as its own small CTA rather than the quiet .result-fees
 * text used elsewhere, since it's an action, not just a caveat. */
.result-ticket-cta { background: var(--ticket); color: #fff; margin-top: 6px; height: 30px; }
.result-ticket-cta:hover { opacity: .9; text-decoration: none; }
.result-ticket-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.result-ticket-actions .result-ticket-cta:last-child:not(:first-child) { background: none; color: var(--accent); border: 1px solid var(--line); }

/* One disclosure above the list, rather than repeated under every row. */
.notice {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 11px 13px;
  margin-bottom: 10px;
  border: 1px solid var(--accent-line);
  border-radius: var(--r-md);
  background: var(--accent-tint);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-700);
}
.notice .icon { color: var(--accent); margin-top: 1px; }
.notice b { font-weight: 640; color: var(--ink-900); }

/* Price alert control (Sprint 25) */
.alert-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 13px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: 13px;
  color: var(--ink-700);
}
.alert-bar .icon { color: var(--accent); }
.alert-bar.is-off { color: var(--ink-500); }
.alert-bar.is-off .icon { color: var(--ink-400); }
.alert-input { width: 96px; height: 32px; font-size: 13px; }
.alert-note { font-size: 12px; color: var(--ink-500); }

/* Secondary rows: dates not auto-priced. */
.more-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}
.more-row:last-child { border-bottom: 0; }
.more-row .more-main { flex: 1; min-width: 0; }
.more-row .more-venue { font-size: 13px; font-weight: 560; color: var(--ink-900); }
.more-row .more-meta { font-size: 11.5px; color: var(--ink-500); }
.more-row .more-est { font-size: 12px; color: var(--ink-400); font-variant-numeric: tabular-nums; margin-right: 2px; white-space: nowrap; }

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--ink-500);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  margin-top: 12px;
}
.status.is-error { color: var(--danger); border-color: var(--danger); background: var(--surface); }
.status.is-ok { color: var(--success); }

.empty {
  padding: 44px 20px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  color: var(--ink-500);
  font-size: 13.5px;
}
.empty h3 { font-size: 15px; margin-bottom: 4px; color: var(--ink-900); }

/* Spinner */
.spinner {
  width: 14px; height: 14px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   11. Hero (marketing pages)
   ============================================================ */
.hero {
  background: var(--chrome);
  color: var(--chrome-ink);
  border-bottom: 1px solid var(--chrome-line);
  padding: 52px 0 0;
}
.hero h1 {
  color: var(--chrome-ink);
  font-size: clamp(30px, 5.4vw, 48px);
  font-weight: 680;
  letter-spacing: -0.038em;
  line-height: 1.08;
  max-width: 17ch;
}
.hero .lead {
  margin: 14px 0 0;
  font-size: clamp(14.5px, 2.2vw, 16.5px);
  line-height: 1.55;
  color: var(--chrome-ink-2);
  max-width: 52ch;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  padding: 4px 10px 4px 7px;
  border: 1px solid var(--chrome-line);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 560;
  color: var(--chrome-ink-2);
}
.hero-eyebrow .icon { color: var(--accent); }
.hero-search { padding: 28px 0 0; }
/* The search bar straddles the dark band and the page below it. */
.hero-search .searchbar { margin-bottom: -44px; }
.hero-spacer { height: 44px; }

.trustline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-top: 24px;
  padding-bottom: 28px;
  font-size: 12px;
  color: var(--chrome-ink-2);
}
.trustline span { display: inline-flex; align-items: center; gap: 6px; }
.trustline .icon { color: var(--success); }

/* ============================================================
   12. Feature grid / steps (marketing)
   ============================================================ */
.grid { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.grid > * { background: var(--surface); padding: 18px 16px; }
.feature h3 { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 620; margin-bottom: 6px; }
.feature p { margin: 0; font-size: 13px; color: var(--ink-500); line-height: 1.55; }
.feature .fi { width: 26px; height: 26px; border-radius: var(--r-xs); display: grid; place-items: center; }
.fi-flight { background: var(--flight-tint); color: var(--flight); }
.fi-hotel  { background: var(--hotel-tint);  color: var(--hotel); }
.fi-ticket { background: var(--ticket-tint); color: var(--ticket); }
.fi-ok     { background: var(--success-tint);color: var(--success); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.steps li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; }
.steps .n {
  width: 24px; height: 24px;
  border-radius: var(--r-xs);
  background: var(--ink-900);
  color: var(--surface);
  display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700;
}
.steps b { display: block; font-size: 13.5px; font-weight: 620; margin-bottom: 2px; }
.steps p { margin: 0; font-size: 13px; color: var(--ink-500); line-height: 1.55; }

/* ============================================================
   13. Prose (About / Privacy / Terms)
   ============================================================ */
.page-head { padding: 36px 0 20px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.page-head h1 { font-size: clamp(24px, 4vw, 32px); letter-spacing: -0.03em; }
.page-head p { margin: 8px 0 0; color: var(--ink-500); font-size: 14px; }

.prose h2 { font-size: 16px; margin: 30px 0 8px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { font-size: 14px; line-height: 1.68; color: var(--ink-700); }
.prose ul { padding-left: 18px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--ink-900); font-weight: 620; }
.prose .updated { font-size: 12px; color: var(--ink-400); margin-bottom: 26px; }
.prose code { font-size: .9em; background: var(--surface-sunk); padding: 1px 5px; border-radius: var(--r-xs); }

.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  margin: 18px 0;
}
.contact-row .ci { width: 32px; height: 32px; border-radius: var(--r-sm); background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; }
.contact-row .cv { font-size: 14px; font-weight: 600; }

/* ============================================================
   14. Footer
   ============================================================ */
.site-footer {
  background: var(--chrome);
  color: var(--chrome-ink-2);
  border-top: 1px solid var(--chrome-line);
  padding: 32px 0;
  font-size: 12.5px;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
.site-footer a { color: var(--chrome-ink-2); font-weight: 500; }
.site-footer a:hover { color: var(--chrome-ink); text-decoration: none; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--chrome-ink); font-weight: 600; }

/* ============================================================
   15. Plan page layout
   ============================================================ */
.plan-grid { display: flex; flex-direction: column; gap: 18px; padding-top: 20px; }
.settings dl { margin: 0; }
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
}
.settings-row:last-child { border-bottom: 0; }
.settings-row > .rl { min-width: 0; }
.settings-row .rt { font-size: 13px; font-weight: 550; color: var(--ink-900); }
.settings-row .rh { font-size: 11.5px; color: var(--ink-400); margin-top: 1px; }

/* ============================================================
   16. Wider screens
   ============================================================ */
@media (min-width: 640px) {
  .search-fields { flex-direction: row; }
  .search-field { flex: 1; border-bottom: 0; border-right: 1px solid var(--line); min-width: 0; }
  .search-field:last-child { border-right: 0; }
  .search-field.f-narrow { flex: 0 0 128px; }
  .search-actions { border-top: 1px solid var(--line); }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .hero { padding-top: 68px; }
}

@media (min-width: 900px) {
  .searchbar .search-row { display: flex; align-items: stretch; }
  .searchbar .search-row .search-fields { flex: 1; }
  .searchbar .search-row .search-actions { border-top: 0; border-left: 1px solid var(--line); padding: 10px 12px; }
  .searchbar .search-row .search-actions .btn-primary { flex: 0 0 auto; min-width: 116px; height: 100%; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .plan-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }
  .plan-grid .settings { position: sticky; top: calc(var(--header-h) + 16px); }
  .plan-grid .results-col { min-width: 0; }
  .results-bar { margin-top: 4px; }
}

/* Wide hero: the headline and the supporting copy sit side by side rather
   than stacking into the left third and leaving half the viewport empty. */
@media (min-width: 940px) {
  .hero-top {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 48px;
    align-items: end;
  }
  .hero .lead { margin-top: 0; max-width: 44ch; }
  .trustline { margin-top: 18px; padding-bottom: 0; }
  .hero h1 { max-width: 14ch; }
}

@media (min-width: 1080px) {
  .hero h1 { font-size: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
