/* IBM Plex Sans (variable, 100-700) and Plex Mono 500, served from this site (SIL Open Font Licence). optional: on a slow
   first visit the system font stays rather than the page re-flowing when the font arrives. */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 100 700; font-display: optional; src: url(/fonts/ibm-plex-sans-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 100 700; font-display: optional; src: url(/fonts/ibm-plex-sans-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: optional; src: url(/fonts/ibm-plex-mono-500-latin.woff2) format("woff2"); }
/* Tokens, as on Plant Wiki (the wiki family's template): one set of names, light by default, dark from the phone or
   computer setting (or Settings > Appearance). Flight Wiki keeps its blue accent. The globe always keeps the dark set. */
:root {
  --bg: #F3F5F8; --bg-2: #FFFFFF; --surface: #FFFFFF; --surface-2: #EEF2F7;
  --ink: #0F1B2D; --text: #24324A; --muted: #526072; --faint: #636E82;
  --line: #DDE3EA; --line-2: #C2CBD6;
  --accent: #1D4ED8; --accent-ink: #FFFFFF; --accent-soft: rgba(37, 99, 235, 0.1);
  --primary: #2563EB; --primary-hover: #1D4ED8; --on-primary: #FFFFFF;
  --good: #166534; --warn: #B45309; --bad: #B42318; --danger: var(--bad);
  --hover: rgba(15, 23, 42, 0.05); --field: #EEF2F7; --field-focus: #E6EBF3; --shadow: rgba(15, 23, 42, 0.14);
  --nav: #0F1B2D; --nav-ink: #FFFFFF; --nav-muted: #AEB9C8; --nav-field: rgb(255 255 255 / .08); --nav-line: rgb(255 255 255 / .14); --nav-accent: #8AB4FF;
  --overlay: rgba(11, 18, 32, 0.8);
  --radius: 6px; --r: 8px; --r-lg: 10px;
  --sh-1: 0 1px 2px rgb(15 27 45 / .06); --sh-2: 0 8px 24px rgb(15 27 45 / .10);
  --panel-w: 480px;
  --top-h: 58px;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
:root[data-theme="dark"], .globe-wrap {
  --bg: #0B121C; --bg-2: #070C14; --surface: #111A27; --surface-2: #16212F;
  --ink: #E6ECF2; --text: #E1E8F0; --muted: #9AA6B4; --faint: #6F7C8E;
  --line: #233042; --line-2: #34445A;
  --accent: #6EA8FE; --accent-ink: #0B121C; --accent-soft: rgba(110, 168, 254, 0.14);
  --primary: #2F6FE0; --primary-hover: #3B7CF0; --on-primary: #FFFFFF;
  --good: #4CC38A; --warn: #E3B05A; --bad: #F97066;
  --hover: rgba(255, 255, 255, 0.06); --field: rgba(255, 255, 255, 0.06); --field-focus: rgba(255, 255, 255, 0.09); --shadow: rgba(0, 0, 0, 0.45);
  --nav: #070C14; --nav-muted: #9AA6B4;
  --sh-1: 0 1px 2px rgb(0 0 0 / .3); --sh-2: 0 8px 24px rgb(0 0 0 / .35);
  color-scheme: dark;
}
/* Before the script runs (or without it), the phone's setting still decides. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0B121C; --bg-2: #070C14; --surface: #111A27; --surface-2: #16212F;
    --ink: #E6ECF2; --text: #E1E8F0; --muted: #9AA6B4; --faint: #6F7C8E; --line: #233042; --line-2: #34445A;
    --accent: #6EA8FE; --accent-ink: #0B121C; --accent-soft: rgba(110, 168, 254, 0.14); --primary: #2F6FE0; --primary-hover: #3B7CF0;
    --good: #4CC38A; --warn: #E3B05A; --bad: #F97066; --hover: rgba(255, 255, 255, 0.06); --field: rgba(255, 255, 255, 0.06);
    --field-focus: rgba(255, 255, 255, 0.09); --shadow: rgba(0, 0, 0, 0.45); --nav: #070C14; --nav-muted: #9AA6B4; color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- top bar: Plant Wiki's header (navy in both schemes) ---- */
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.topbar {
  height: var(--top-h);
  display: flex; align-items: center; gap: 18px;
  padding: 0 20px;
  background: var(--nav); color: var(--nav-ink);
  border-bottom: 1px solid var(--nav-line);
  position: relative; z-index: 20;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--nav-ink); font-weight: 600; font-size: 18px; letter-spacing: -.01em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand em { color: var(--nav-accent); font-style: normal; }
.brand img { width: 32px; height: 32px; border-radius: 8px; display: block; box-shadow: var(--sh-1); }
.topsearch { position: relative; flex: 1 1 340px; max-width: 460px; min-width: 0; display: flex; align-items: center; }
.topsearch > .i { position: absolute; left: 12px; color: var(--nav-muted); pointer-events: none; }
.topsearch input {
  width: 100%; height: 38px; padding: 0 42px 0 38px;
  background: var(--nav-field); border: 1px solid var(--nav-line); border-radius: var(--radius);
  color: var(--nav-ink); font: inherit; font-size: 14px;
}
.topsearch input::placeholder { color: var(--nav-muted); }
.topsearch input:focus { border-color: var(--nav-accent); outline: none; }
.camsearch { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: var(--radius); background: transparent; color: var(--nav-muted); cursor: pointer; }
.camsearch:hover { background: var(--nav-field); color: var(--nav-ink); }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.navlink { display: inline-flex; align-items: center; gap: 6px; color: var(--nav-muted); font-weight: 600; font-size: 14px; padding: 8px 10px; border-radius: var(--radius); white-space: nowrap; }
.navlink:hover, .navlink.active { background: var(--nav-field); color: var(--nav-ink); text-decoration: none; }
.nav-sep { width: 1px; height: 22px; background: var(--nav-line, rgba(255,255,255,.15)); margin: 0 6px; flex: none; } /* between Flight Wiki's own features and the family's shared menu */
.nav-i { display: none; }
.nav-av { width: 24px; height: 24px; border-radius: 50%; overflow: hidden; display: inline-grid; place-items: center; background: var(--nav-field); font-size: 11px; }
.nav-av img { width: 100%; height: 100%; object-fit: cover; }
.nav .btn { height: 38px; gap: 8px; }
.nav .installbtn { background: var(--nav-field); border-color: var(--nav-line); color: var(--nav-ink); }
.sharebtn { flex: none; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--nav-line); border-radius: var(--radius); background: var(--nav-field); color: var(--nav-ink); cursor: pointer; }
.sharebtn:hover { border-color: var(--nav-muted); }
.sharebtn .i { width: 18px; height: 18px; }

/* ---- footer: the wiki family's footer, at the end of the side panel ---- */
.site-foot { margin: 48px -24px -40px; border-top: 1px solid var(--line); background: var(--surface); }
.foot-in { padding: 28px 24px 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 22px 24px; }
.foot-in > :first-child { grid-column: 1 / -1; }
.foot-in p { margin: 10px 0 0; font-size: 14px; color: var(--muted); max-width: 380px; }
.foot-in h4 { margin: 0 0 8px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.foot-in nav a { display: block; color: var(--text); font-size: 14px; padding: 4px 0; }
.foot-in nav a:hover { color: var(--accent); text-decoration: none; }
.site-foot .brand { color: var(--ink); }
.site-foot .brand em { color: var(--accent); }
.site-foot .brand img { width: 28px; height: 28px; }
.langpick { display: grid; gap: 4px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.langpick select { min-height: 36px; max-width: 200px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; }
.play-badge { display: block; width: max-content; margin: 10px 0 0 -8px; border-radius: 10px; }
.play-badge img { display: block; height: 52px; width: auto; }
.legal { padding: 14px 24px 22px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.legal a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.badge {
  display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 2px;
  border-radius: 9px; background: var(--good); color: var(--accent-ink);
  font-size: 11px; font-weight: 600; line-height: 18px; text-align: center;
}
.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 13px; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---- suggest dropdown ---- */
.suggest {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 40;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: 0 12px 32px var(--shadow); overflow: hidden; display: none;
}
.suggest.open { display: block; }
.suggest button {
  display: flex; width: 100%; gap: 10px; align-items: baseline; text-align: left;
  padding: 8px 12px; background: none; border: 0; cursor: pointer;
}
.suggest button:hover, .suggest button.hl { background: var(--accent-soft); }
.suggest .code { font-family: var(--mono); color: var(--accent); width: 34px; flex: none; }
.suggest .sub { color: var(--muted); font-size: 12px; margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }

/* ---- layout ---- */
.layout { display: flex; height: calc(100dvh - var(--top-h)); }
.panel {
  width: var(--panel-w); flex: none; overflow-y: auto; overscroll-behavior: contain;
  padding: 28px 24px 40px; border-right: 1px solid var(--line); background: var(--bg);
  outline: none;
}
.globe-wrap { position: relative; flex: 1; min-width: 0; background: radial-gradient(ellipse at center, #152038 0%, var(--bg) 70%); overflow: hidden; }
#globe { position: absolute; inset: 0; }
.globe-hint { position: absolute; bottom: 12px; right: 16px; font-size: 12px; color: var(--faint); pointer-events: none; }
.globe-legend { position: absolute; top: 14px; right: 16px; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); pointer-events: none; }
.globe-legend span { display: flex; align-items: center; gap: 6px; }
.globe-legend i { display: inline-block; width: 18px; height: 2px; border-radius: 1px; }

/* ---- type ---- */
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
h1 { font-size: 40px; line-height: 1.1; font-weight: 600; margin: 0 0 14px; letter-spacing: -0.01em; }
h1 .accent { color: var(--accent); display: block; }
h2 { font-size: 22px; font-weight: 600; margin: 0 0 6px; }
h3, .h3 { font-size: 14px; font-weight: 600; margin: 28px 0 10px; color: var(--text); }
.lede { color: var(--muted); margin: 0 0 22px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); }
.disclaimer { color: var(--faint); font-size: 12px; margin-top: 24px; }

/* ---- forms ---- */
.search-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: grid; gap: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: grid; gap: 4px; position: relative; min-width: 0; }
.field > span { font-size: 12px; color: var(--muted); }
.field input, .field select {
  height: 38px; padding: 0 10px; width: 100%;
  background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius);
  color: var(--text); font: inherit; font-size: 14px;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); }
.field .hint { font-size: 12px; color: var(--faint); }
.swap {
  position: absolute; right: -17px; top: 27px; z-index: 2; width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--line-2); display: grid; place-items: center; cursor: pointer; padding: 0;
}
.swap svg { width: 14px; height: 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--line-2);
  background: transparent; color: var(--text); font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--hover); text-decoration: none; }
.btn.primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.ghost { border-color: transparent; }
.btn.big { height: 40px; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: default; }
.linkbtn { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; }
.row { display: flex; align-items: center; }
.gap { gap: 8px; }
.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.error { color: var(--bad); font-size: 13px; margin: 0; }

/* ---- cards & lists ---- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2);
  background: transparent; cursor: pointer; color: var(--text);
}
.chip:hover { border-color: var(--accent); }
.deal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.deal {
  display: grid; gap: 2px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); cursor: pointer; text-align: left;
}
.deal:hover { border-color: var(--accent); text-decoration: none; }
.deal .city { font-weight: 500; }
.deal .meta { font-size: 12px; color: var(--muted); }
.deal .price { font-family: var(--mono); color: var(--accent); font-size: 15px; }

.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 16px 0 4px; }
.more-box { margin-top: 20px; border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; background: var(--surface); }
.more-box > summary { cursor: pointer; padding: 13px 0; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; }
.more-box > summary::-webkit-details-marker { display: none; }
.more-box > summary::after { content: '▾'; margin-left: auto; color: var(--muted); transition: transform 0.15s; }
.more-box[open] > summary::after { transform: rotate(180deg); }
.more-box[open] { padding-bottom: 14px; }
.more-box .group:first-of-type { margin-top: 0; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.fact b { display: block; font-family: var(--mono); font-size: 15px; font-weight: 500; }
.fact span { font-size: 11px; color: var(--muted); }

.fare-list { display: grid; gap: 6px; }
.fare {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center;
  padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; width: 100%;
}
.fare:hover, .fare.sel { border-color: var(--accent); }
.fare .al { font-weight: 500; }
.fare .info { font-size: 12px; color: var(--muted); grid-column: 1; }
.fare .price { font-family: var(--mono); font-size: 17px; grid-row: 1 / span 2; grid-column: 2; text-align: right; }
.fare .tag { font-size: 11px; color: var(--good); display: block; }

.route-head { display: flex; align-items: center; gap: 10px; }
.route-head .codes { font-size: 30px; font-weight: 600; letter-spacing: 0.01em; }
.route-head .arrow { color: var(--accent); }

.hist-box { margin-top: 14px; display: grid; gap: 6px; }
.hist-box:empty { display: none; }
.hist-box svg { width: 100%; height: auto; display: block; }
.hist-box .line { fill: none; stroke: var(--accent); stroke-width: 2; }
.hist-box .area { fill: var(--accent-soft); stroke: none; }
.hist-box text { fill: var(--muted); font-size: 10px; }
.watch-box { margin-top: 18px; padding: 12px; border-radius: 10px; border: 1px dashed var(--line-2); display: grid; gap: 10px; }

.watch {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); margin-bottom: 8px;
}
.watch.hit { border-color: var(--good); }
.watch .title { font-weight: 500; }
.watch .title a { color: var(--text); }
.watch .sub { font-size: 12px; color: var(--muted); }
.watch .now { font-family: var(--mono); font-size: 18px; text-align: right; }
.watch .delta { font-size: 12px; text-align: right; }
.watch .actions { grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; }
.status { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; }
.status.good { color: var(--good); }
.status.warn { color: var(--warn); }
.down { color: var(--good); }
.up { color: var(--bad); }

/* ---- charts ---- */
.chart { position: relative; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .bar { fill: var(--accent); opacity: 0.55; }
.chart .bar.min { opacity: 1; }
.chart .bar.sel { fill: var(--text); opacity: 1; }
.chart .hit:hover + .bar, .chart g:hover .bar { opacity: 1; }
.chart .axis { fill: var(--faint); font-size: 10px; font-family: var(--mono); }
.chart .grid { stroke: var(--line); }
.tip {
  position: absolute; pointer-events: none; z-index: 5; transform: translate(-50%, -100%);
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 6px; padding: 5px 8px;
  font-size: 12px; white-space: nowrap; display: none; box-shadow: 0 8px 20px var(--shadow);
}
.tip b { font-family: var(--mono); font-weight: 500; }
.spark { width: 120px; height: 32px; }
.spark path.line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark path.target { stroke: var(--good); stroke-width: 1; stroke-dasharray: 3 3; }
.spark circle { fill: var(--accent); }

/* ---- agent ---- */
.chat { display: grid; gap: 10px; margin: 16px 0; }
.msg { padding: 10px 12px; border-radius: 10px; max-width: 92%; white-space: pre-wrap; }
.msg.user { background: var(--accent-soft); justify-self: end; }
.msg.assistant { background: var(--surface); border: 1px solid var(--line); }
.msg .steps { font-size: 11px; color: var(--faint); margin-top: 6px; font-family: var(--mono); white-space: normal; }
.proposal { border: 1px solid var(--accent); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; background: var(--surface); }
.proposal .kv { font-size: 13px; }
.proposal .kv span { color: var(--muted); }
.chat-input { display: flex; gap: 8px; position: sticky; bottom: -40px; padding: 10px 0 0; background: var(--bg); }
.chat-input textarea {
  flex: 1; min-height: 40px; max-height: 140px; resize: vertical; padding: 9px 10px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); color: var(--text); font: inherit; font-size: 14px;
}
.typing { color: var(--muted); font-size: 13px; }
.typing::after { content: '…'; animation: blink 1s steps(3) infinite; }
@keyframes blink { 50% { opacity: 0.3; } }

/* ---- dialog / toast ---- */
.dialog {
  border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--text);
  padding: 22px; width: min(380px, calc(100vw - 32px));
}
.dialog::backdrop { background: rgba(4, 8, 16, 0.72); }
.dialog form { display: grid; gap: 12px; }
.dialog h2 { margin: 0; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 14px; font-size: 14px;
  transition: 0.2s; pointer-events: none; z-index: 100; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%); }

table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th, table.data td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); }
table.data td.num, table.data th.num { text-align: right; font-family: var(--mono); }
details.table-view summary { cursor: pointer; font-size: 12px; color: var(--muted); margin-top: 8px; }

.empty { padding: 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: 10px; }

/* ---- onboarding, toggles, compare ---- */
.progress { height: 4px; border-radius: 2px; background: var(--line); margin: 0 0 16px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); transition: width 0.25s; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: block; padding: 12px; border-radius: 8px; border: 1px solid var(--line-2); font-size: 14px; height: 100%; }
.choice input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.toggle { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; padding: 4px 0; }
.toggle input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.toggle b { font-weight: 500; display: block; font-size: 14px; }
.toggle small { color: var(--muted); font-size: 12px; }
.compare { display: grid; gap: 4px; }
.cmp-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
.cmp-row b { font-family: var(--mono); font-weight: 500; }
.cmp-row.best { border-color: var(--good); }
.cmp-row.best b::after { content: ' best'; font-family: inherit; font-size: 11px; color: var(--good); }
.topbar, .layout { max-width: 100vw; }
.topsearch { min-width: 0; }

/* ---- round trips ---- */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line-2); justify-self: start; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg span, .seg a { display: block; padding: 5px 12px; border-radius: 6px; font-size: 13px; color: var(--muted); }
.seg a:hover { text-decoration: none; color: var(--text); }
.seg input:checked + span, .seg a.on { background: var(--accent-soft); color: var(--accent); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.seg.sm span, .seg.sm a { padding: 3px 10px; font-size: 12px; }
.field.off { opacity: 0.4; }
h3.sub { font-size: 12px; font-weight: 500; color: var(--muted); margin: 12px 0 6px; }
.trip-total { margin-top: 14px; padding: 12px; border-radius: 10px; border: 1px solid var(--accent); background: var(--surface); display: grid; gap: 4px; }
.trip-total:empty { display: none; }
.trip-total b { display: block; font-family: var(--mono); font-size: 22px; font-weight: 500; }

/* ---- frequent flyer + booking ---- */
.ff-badge { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px; font-size: 11px; font-weight: 500; color: var(--accent); background: var(--accent-soft); vertical-align: 1px; }
.fare { cursor: pointer; }
.fare:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fare .fare-book { grid-column: 1 / -1; display: none; padding-top: 6px; }
.fare.sel .fare-book { display: block; }
.fare .book { font-size: 13px; font-weight: 500; }
.ff-pick { display: grid; gap: 8px; }
.trip-total .btn { margin-top: 4px; }

/* ---- live fares ---- */
.live-box { margin-top: 16px; padding: 12px; border-radius: 10px; border: 1px solid var(--good); background: var(--surface); display: grid; gap: 8px; }
.live-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px rgba(76, 195, 138, 0.2); }
.live-box .fare { background: var(--bg); }
.insight { margin: 0; }
.insight.low { color: var(--good); }
.insight.high { color: var(--warn); }
.live-none { margin: 12px 0 0; }
.live-tag { font-size: 10px; font-family: inherit; color: var(--good); border: 1px solid var(--good); border-radius: 4px; padding: 0 4px; vertical-align: 2px; }
.fare .fare-book .book + .book { margin-left: 12px; }

/* ---- phone pieces (hidden on desktop) ---- */
.tabbar, .bookbar, .globe-toggle { display: none; }
.hint-touch { display: none; }
@media (hover: none) { .hint-mouse { display: none; } .hint-touch { display: inline; } }
.suggest { max-height: min(50vh, 360px); overflow-y: auto; }

/* ---- responsive ---- */
@media (max-width: 1100px) {
  .topsearch { flex-basis: 220px; }
  .nav a { padding: 6px 7px; }
}
@media (max-width: 900px) {
  :root { --tab-h: 58px; --safe-b: env(safe-area-inset-bottom, 0px); }
  body { overflow: auto; }
  .topbar { position: sticky; top: 0; gap: 10px; padding-top: env(safe-area-inset-top, 0px); height: calc(var(--top-h) + env(safe-area-inset-top, 0px)); }
  .nav { display: none; }
  .topsearch { flex: 1; }
  .topbar .brand { font-size: 0; gap: 0; }
  .topbar .brand img { width: 32px; height: 32px; border-radius: 8px; }
  .account { margin-left: 0; }
  .account .btn { padding: 0 10px; }
  .account .btn svg + * { display: none; }

  /* globe: a compact band you can expand */
  .layout { flex-direction: column-reverse; height: auto; }
  .globe-wrap { height: clamp(280px, min(92vw, 46vh), 420px); flex: none; transition: height 0.25s; }
  body.map-open .globe-wrap { height: calc(100dvh - var(--top-h) - var(--tab-h) - var(--safe-b)); }
  .globe-toggle {
    display: inline-flex; align-items: center; gap: 6px; position: absolute; left: 12px; bottom: 10px; z-index: 3;
    height: 34px; padding: 0 12px; border-radius: 17px; border: 1px solid var(--line-2);
    background: var(--overlay); color: var(--text); font-size: 13px; cursor: pointer;
  }
  .globe-toggle svg { width: 16px; height: 16px; }
  .globe-hint { bottom: 18px; }
  .globe-legend { top: 10px; right: 12px; }

  .panel { width: 100%; border-right: 0; padding: 18px 16px calc(var(--tab-h) + var(--safe-b) + 28px); overflow: visible; }
  body.has-bookbar .panel { padding-bottom: calc(var(--tab-h) + var(--safe-b) + 96px); }
  h1 { font-size: 30px; margin-bottom: 16px; }
  .lede { display: none; }
  h2 { font-size: 20px; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .route-head { flex-wrap: wrap; row-gap: 8px; }
  .route-head .codes { font-size: 26px; }

  /* comfortable tap targets; 16px text stops iPhones zooming into fields */
  .field input, .field select, .chat-input textarea, .topsearch input { font-size: 16px; }
  .field input, .field select { height: 46px; }
  .topsearch input { height: 38px; }
  .btn { height: 42px; }
  .btn.sm { height: 36px; }
  .btn.big { height: 48px; font-size: 16px; }
  .chip { padding: 8px 12px; font-size: 14px; }
  .seg span, .seg a { padding: 8px 14px; font-size: 14px; }
  .fare { padding: 12px; }
  .fare .book { display: inline-block; padding: 6px 0; }
  .toggle { padding: 8px 0; }
  .toggle input { width: 22px; height: 22px; }

  /* From / To stack with the swap button between them */
  .pair { grid-template-columns: 1fr; }
  .pair .swap { display: grid; right: 12px; top: auto; bottom: -22px; width: 34px; height: 34px; }
  .pair .swap svg { transform: rotate(90deg); width: 16px; height: 16px; }

  /* bottom navigation */
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
    background: var(--bg-2); border-top: 1px solid var(--line);
  }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 500; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a.active { color: var(--accent); }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar .badge { position: absolute; top: 5px; left: calc(50% + 6px); }

  /* selected flight + booking, pinned above the tab bar */
  .bookbar {
    position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + var(--safe-b)); z-index: 39;
    display: flex; align-items: center; gap: 10px; padding: 10px 16px;
    background: var(--surface-2); border-top: 1px solid var(--line-2); box-shadow: 0 -8px 24px var(--shadow);
  }
  .bookbar[hidden] { display: none; }
  .bookbar .bb-info { flex: 1; min-width: 0; display: grid; }
  .bookbar .bb-info b { font-family: var(--mono); font-size: 18px; font-weight: 500; }
  .bookbar .bb-info span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .bookbar .btn { height: 40px; }

  .chat-input { bottom: calc(var(--tab-h) + var(--safe-b)); padding-bottom: 10px; }
  .toast { bottom: calc(var(--tab-h) + var(--safe-b) + 16px); }
  body.has-bookbar .toast { bottom: calc(var(--tab-h) + var(--safe-b) + 84px); }
  .trip-total .row .btn { flex: 1; }
}
@media (max-width: 360px) {
  .deal-grid { grid-template-columns: 1fr; }
  .facts b { font-size: 14px; }
}

/* ---- settings groups ---- */
.settings { display: grid; gap: 12px; }
.settings .group { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); display: grid; gap: 10px; min-width: 0; }
.settings legend { padding: 0 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
.save-row { display: flex; gap: 8px; flex-wrap: wrap; position: sticky; bottom: 0; padding: 10px 0; background: var(--bg); box-shadow: 0 0 0 3px var(--bg); }
@media (max-width: 900px) {
  .save-row { bottom: calc(var(--tab-h) + var(--safe-b)); }
  .save-row .btn { flex: 1; }
}

/* ---- phone fixes ---- */
.field input[type=date] { min-width: 0; }
@media (max-width: 900px) {
  .topsearch { flex: 1 1 0; min-width: 0; }
  .account { flex: none; }
  .field input[type=date] { padding: 0 8px; }
  .grid2 { gap: 8px; }
}

/* ---- pick airports on the globe ---- */
.field.map-target input { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field.map-target > span::after { content: var(--map-hint, ' · map fills this'); color: var(--accent); font-size: 11px; }
.field.flash input { animation: flash 0.7s ease-out; }
@keyframes flash { from { background: var(--accent-soft); } to { background: var(--bg); } }
.map-hint { margin: 0; font-size: 12px; color: var(--faint); }
#globe canvas { cursor: crosshair; }

.suggest-head { margin: 14px 0 6px; }

/* ---- multi-city ---- */
.multi { display: grid; gap: 10px; }
.legs { display: grid; gap: 10px; }
.leg { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: var(--bg); display: grid; gap: 8px; }
.leg-head { display: flex; align-items: center; justify-content: space-between; }
.leg-n { font-size: 12px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; }
.leg-grid { display: grid; grid-template-columns: 1fr 1fr 130px; gap: 8px; }
.add-leg { justify-self: start; }
.multi-codes { font-size: 22px; line-height: 1.3; }
.leg-card { margin-top: 18px; }
.leg-card .h3 { margin: 0 0 4px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.leg-src { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.gap-note { margin: 8px 0 0; padding-left: 10px; border-left: 2px dashed var(--line-2); }
@media (max-width: 900px) {
  .leg-grid { grid-template-columns: 1fr 1fr; }
  .leg-grid .field:last-child { grid-column: 1 / -1; }
  .multi-codes { font-size: 18px; }
}
/* ---- share ---- */
.share { display: grid; gap: 12px; }
.share h2 { margin: 0; }
.share-text { margin: 0; white-space: pre-wrap; font: 13px/1.5 var(--mono); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; max-height: 40vh; overflow: auto; }
.share-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.share-actions.end { justify-content: flex-end; }
.dialog.share-dlg { width: min(460px, calc(100vw - 32px)); }
.shares { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.shares .btn { justify-content: center; text-decoration: none; }
.shares .wa { background: #1da851; border-color: #1da851; color: #fff; }
.shares .li { background: #0a66c2; border-color: #0a66c2; color: #fff; }
.shares .tg { background: #229ed9; border-color: #229ed9; color: #fff; }
.shares .x { background: #0f1419; border-color: var(--line-2); color: #fff; }
.shares .btn:hover { filter: brightness(1.08); }
.play-badge { display: block; width: max-content; margin: 14px 0 0 -10px; border-radius: 10px; }
.play-badge img { display: block; height: 58px; width: auto; }
.share .play-badge { margin: 4px auto 0; }
@media (max-width: 560px) {
  .dialog.share-dlg { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 16px 16px 0 0; border-width: 1px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
}
#shareRoute { margin-left: 4px; }

/* ---- AI analysis ---- */
.ai-box { margin-top: 12px; padding: 12px; border-radius: 10px; border: 1px solid rgba(165, 180, 252, 0.32); background: var(--surface); display: grid; gap: 6px; }
.ai-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ai-badge { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; color: #0b1220; background: #a5b4fc; border-radius: 4px; padding: 1px 5px; }
.verdict { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; border: 1px solid currentColor; }
.verdict.good { color: var(--good); }
.verdict.neutral { color: var(--accent); }
.verdict.warn { color: var(--warn); }
.ai-headline { margin: 0; font-weight: 500; }
.ai-line { margin: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; line-height: 1.5; }
.ai-line .ai-badge, .ai-line .verdict { flex: none; }
.ai-why > summary { cursor: pointer; font-size: 13px; color: var(--accent); width: max-content; }
.ai-why[open] > summary { margin-bottom: 6px; }
.see-all { display: inline-block; margin: 10px 0 4px; }
#aiSlot:empty { display: none; }
.ai-reasons { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.ai-line { flex-basis: 100%; order: 5; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ai-line:empty { display: none; }

/* ---- admin ---- */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px; display: grid; gap: 2px; }
.kpi span { font-size: 12px; color: var(--muted); }
.kpi b { font-family: var(--mono); font-size: 22px; font-weight: 500; }
.kpi small { font-size: 11px; color: var(--faint); }
.admin-chart { margin-top: 10px; }
.admin-chart .bar-v { fill: var(--accent); opacity: 0.35; }
.admin-chart .bar-a { fill: var(--accent); }
.admin-chart .legend { display: flex; gap: 14px; color: var(--muted); margin-top: 4px; }
.admin-chart .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.sw-v { background: rgba(110, 168, 254, 0.35); } .sw-a { background: var(--accent); }
.filter { flex: 1; min-width: 160px; height: 34px; padding: 0 10px; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius); color: var(--text); font: inherit; font-size: 14px; }
.table-scroll { overflow-x: auto; }
table.users td { vertical-align: middle; white-space: nowrap; }
table.users .who { display: flex; gap: 8px; align-items: center; }
table.users .who img, .sm-av { width: 28px; height: 28px; border-radius: 50%; }
table.users .actions { display: flex; gap: 4px; }
.btn.danger { color: var(--bad); }
body.wide-panel { --panel-w: 760px; }
@media (max-width: 900px) { .kpi b { font-size: 18px; } }

/* ---- my travels ---- */
.travel-kpis { margin-top: 14px; }
.cand-list, .trip-list { display: grid; gap: 6px; }
.cand { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px dashed #e3b05a; border-radius: 8px; background: var(--surface); }
.trip-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 900px) { .trip-row { grid-template-columns: 1fr auto; } .trip-row .small.muted { grid-column: 1; } }
.travel-kpis .kpi b { font-size: 18px; white-space: nowrap; }

/* ---- trip import ---- */
.import-box { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.import-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.imp { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); cursor: pointer; font: inherit; }
.imp:hover { border-color: var(--accent); }
.imp span { font-size: 12px; color: var(--muted); }
#impStatus:empty { display: none; }
@media (max-width: 420px) { .import-grid { grid-template-columns: 1fr; } }

/* ---- account menu ---- */
.account { position: relative; }
button.avatar { border: 0; padding: 0; cursor: pointer; }
.account-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; min-width: 230px;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 12px 32px var(--shadow);
  padding: 6px; display: grid;
}
.account-menu[hidden] { display: none; }
.account-menu a, .account-menu button { display: block; text-align: left; padding: 10px 12px; border-radius: 6px; color: var(--text); background: none; border: 0; font: inherit; font-size: 14px; cursor: pointer; }
.account-menu a:hover, .account-menu button:hover { background: var(--hover); text-decoration: none; }
.am-who { display: flex; gap: 10px; align-items: center; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.am-who div, .account-card div { display: grid; min-width: 0; }
.am-who span:not(.avatar), .account-card div span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.am-signout { color: var(--bad) !important; border-top: 1px solid var(--line) !important; margin-top: 4px; border-radius: 0 0 6px 6px !important; }
.account-card { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.account-card div { flex: 1; }
.account-card .avatar img, .am-who .avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---- time machine ---- */
.tm-start { margin: 6px 0 4px; }
.tm {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 6; width: min(460px, calc(100% - 24px));
  background: rgba(11, 18, 32, 0.88); backdrop-filter: blur(6px); border: 1px solid rgba(227, 176, 90, 0.5); border-radius: 12px;
  padding: 12px 14px; display: grid; gap: 6px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}
.tm[hidden] { display: none; }
.tm-top { display: flex; align-items: center; }
.tm-badge { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #e3b05a; }
.tm-x { background: none; border: 0; color: var(--muted); font-size: 16px; cursor: pointer; padding: 2px 6px; }
.tm-date { font-size: 22px; font-weight: 600; }
.tm-trip { font-size: 14px; }
.tm-trip b { font-family: var(--mono); font-weight: 500; color: #e3b05a; }
.tm-stats { font-size: 12px; color: var(--muted); }
.tm input[type=range] { width: 100%; accent-color: #e3b05a; }
.tm-years { display: flex; justify-content: space-between; font-size: 10px; color: var(--faint); font-family: var(--mono); }
.tm-years:empty { display: none; }
.tm-ctrl { display: flex; gap: 8px; align-items: center; justify-content: center; }
.tm-ctrl button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-size: 15px; cursor: pointer; }
.tm-ctrl .tm-play { width: 48px; height: 48px; background: #e3b05a; color: #0b1220; border-color: #e3b05a; font-size: 18px; }
.tm-ctrl select { height: 34px; background: var(--surface); color: var(--text); border: 1px solid var(--line-2); border-radius: 6px; padding: 0 6px; }
@media (max-width: 900px) { .tm { bottom: 54px; } .tm-date { font-size: 18px; } }

/* ======================================================================
   Readability pass: contrast, type scale, spacing, tap targets.
   Kept last so it wins over earlier component rules.
   ====================================================================== */
:root[data-theme="dark"], .globe-wrap {
  --muted: #a7b3c4;   /* ~8:1 on the background */
  --faint: #8a98ab;   /* ~5:1, passes WCAG AA for small text */
}
body { line-height: 1.55; }
.small, .meta, .info, .hint, .map-hint, .disclaimer, .sub, .fare .info, .deal .meta, .cmp-row .small,
.toggle small, .field > span, h3.sub, .tm-stats, .kpi small, .legend, .ai-reasons, table.data { font-size: 13px; }
.disclaimer { line-height: 1.5; }
.tag, .ff-badge, .verdict, .live-tag, .ai-badge, .tm-badge { font-size: 11.5px; }
.eyebrow { font-size: 12.5px; }
.fare .al { font-size: 15px; }
.fare .price { font-size: 18px; }
.fare .info { margin-top: 2px; line-height: 1.45; }
.fare-list { gap: 8px; }
h3, .h3 { font-size: 15px; margin: 30px 0 10px; }
.panel > h2, #view > h2 { line-height: 1.25; }
.lede, .muted { line-height: 1.6; }
.fare-list:not(.expanded) .fare.extra { display: none; }
.show-more {
  width: 100%; padding: 10px; border-radius: 8px; border: 1px dashed var(--line-2); background: none;
  color: var(--accent); font: inherit; font-size: 14px; cursor: pointer;
}
.show-more:hover { border-color: var(--accent); }
.linkbtn { padding: 4px 0; }
.seg span, .seg a { padding: 6px 12px; }

@media (max-width: 900px) {
  body { font-size: 16px; }
  .small, .meta, .info, .hint, .map-hint, .disclaimer, .sub, .fare .info, .deal .meta, .cmp-row .small,
  .toggle small, .field > span, h3.sub, .tm-stats, .kpi small, .legend, .ai-reasons, table.data { font-size: 14px; }
  .muted { font-size: inherit; }
  .lede { font-size: 16px; }
  h1 { font-size: 30px; line-height: 1.15; }
  h2 { font-size: 22px; }
  h3, .h3 { font-size: 16px; margin-top: 28px; }
  .eyebrow { font-size: 13px; }
  .tabbar a { font-size: 12px; }
  .fare .al { font-size: 16px; }
  .fare .price { font-size: 19px; }
  .deal .city { font-size: 16px; }
  .deal .price { font-size: 17px; }
  .deal { padding: 12px; }
  /* every tappable thing at least ~40px tall */
  .linkbtn { min-height: 40px; padding: 8px 0; display: inline-flex; align-items: center; }
  .seg span, .seg a, .seg.sm span, .seg.sm a { min-height: 40px; display: flex; align-items: center; padding: 0 14px; font-size: 14px; }
  .route-head .btn.sm { height: 40px; }
  .fare .book { min-height: 40px; display: inline-flex; align-items: center; font-size: 14px; }
  .fare .fare-book .book + .book { margin-left: 16px; }
  .chip { min-height: 40px; display: inline-flex; align-items: center; }
  .trip-row .linkbtn { justify-self: end; }
  .tm { bottom: calc(var(--tab-h) + var(--safe-b) + 10px); }
  .tm-ctrl button { width: 44px; height: 44px; }
  .tm-ctrl .tm-play { width: 52px; height: 52px; }
  .tm-trip { font-size: 15px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .facts .fact span { font-size: 12.5px; }
  .cand { flex-direction: column; align-items: stretch; }
  .cand .row { justify-content: flex-end; }
  .import-grid .imp { min-height: 64px; }
  .imp span { font-size: 13px; }
  .ai-box, .live-box { padding: 14px; }
}
/* chart labels are in SVG units; the chart is ~0.8x on phones, so start larger */
.chart .axis { font-size: 13px; }
details.table-view summary, details summary { font-size: 13px; padding: 6px 0; }
.status { font-size: 13px; }
@media (max-width: 900px) {
  .chart .axis { font-size: 15px; }
  details summary { font-size: 14px; min-height: 40px; display: flex; align-items: center; }
  .status { font-size: 14px; }
  .tag { font-size: 12px; }
}
/* chart labels stay legible over bars */
.chart .axis { paint-order: stroke; stroke: var(--bg); stroke-width: 4px; stroke-linejoin: round; }
@media (max-width: 900px) {
  /* the pinned booking bar already has these buttons */
  .trip-total .row, .trip-total .row + .small, #oneBook .row { display: none; }
  #oneBook:has(.row) { display: none; }
}
.fare.sel .fare-book { display: flex; flex-wrap: wrap; column-gap: 18px; }
.fare .fare-book .book + .book { margin-left: 0 !important; }
/* route header: codes on their own line, controls underneath */
:root { --panel-w: 520px; }
.route-head { flex-wrap: wrap; row-gap: 10px; }
.route-head .codes { flex-basis: 100%; white-space: nowrap; }
.route-head .spacer { display: none; }

/* ---- installable app ---- */
.install-banner { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 18px; border-radius: 12px; border: 1px solid var(--accent); background: var(--surface); }
.install-banner img { border-radius: 10px; flex: none; }
.install-banner div { flex: 1; display: grid; min-width: 0; }
.install-banner span { font-size: 13px; color: var(--muted); }
.setup-card { padding: 12px 14px; margin-bottom: 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.install-x { background: none; border: 0; color: var(--muted); font-size: 16px; cursor: pointer; padding: 6px; }
.install-steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; line-height: 1.5; }
/* installed: respect the notch / home indicator */
body.standalone .topbar { padding-top: env(safe-area-inset-top, 0px); }

.danger-btn { color: var(--bad); border-color: rgba(239, 112, 112, 0.5); }
/* small phones (360px): keep the route controls on one line */
@media (max-width: 380px) {
  .route-head { column-gap: 6px; }
  .route-head .seg span, .route-head .seg a { padding: 0 10px; }
  .route-head .btn.sm { padding: 0 10px; }
  .seg span, .seg a { padding: 0 11px; }
}

/* ---- surprise me ---- */
.sf-cta { display: flex; align-items: center; gap: 12px; margin: 14px 0; padding: 12px 14px; font-size: 22px; background: var(--surface); border: 1px dashed var(--accent); border-radius: 10px; color: var(--text); }
.sf-cta:hover { text-decoration: none; border-style: solid; }
.sf-cta span { display: grid; font-size: 14px; }
.sf-cta small { color: var(--muted); font-size: 12px; }
.sf-intro { margin: 0 0 14px; }
.sf-form { display: grid; gap: 14px; }
.sf-group { display: grid; gap: 6px; min-width: 0; }
.sf-label { font-size: 12px; color: var(--muted); }
.sf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sf-chips .chip { min-height: 36px; padding: 0 12px; font-size: 14px; cursor: pointer; }
.sf-chips .chip.on { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.sf-amount { width: 88px; height: 36px; padding: 0 10px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 999px; color: var(--text); font: inherit; font-size: 14px; }
.sf-amount:focus { outline: none; border-color: var(--accent); }
.sf-go .btn { width: 100%; height: 46px; font-size: 16px; }
.sf-card { margin-top: 16px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; text-align: center; scroll-margin-bottom: 90px; }
#sfOut { scroll-margin-top: calc(var(--top-h, 56px) + 8px); scroll-margin-bottom: calc(var(--tab-h, 0px) + 16px); }
.sf-gift { font-size: 52px; line-height: 1; margin: 6px 0 10px; }
button.sf-gift { background: none; border: 0; padding: 0; cursor: pointer; color: inherit; animation: sf-wobble 1.8s ease-in-out; }
.sf-gift.shake { animation: sf-shake 0.6s ease-in-out infinite; }
@keyframes sf-shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-10deg); } 75% { transform: rotate(10deg); } }
@keyframes sf-wobble { 0%, 60% { transform: scale(1); } 80% { transform: scale(1.15) rotate(-6deg); } 100% { transform: scale(1.3); opacity: .4; } }
.sf-hints, .sf-why { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.sf-hints li { background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 14px; }
.sf-why { text-align: left; }
.sf-why li { padding-left: 22px; position: relative; font-size: 15px; line-height: 1.4; }
.sf-why li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); }
.sf-city { font-size: 34px; margin: 0 0 4px; animation: sf-pop 0.5s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes sf-pop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.sf-price { font-family: var(--mono); font-size: 26px; color: var(--accent); margin: 10px 0 12px; display: flex; gap: 8px; justify-content: center; align-items: baseline; }
.sf-price small { font-family: inherit; font-size: 13px; color: var(--muted); }
.sf-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
@media (max-width: 900px) {
  /* Chip rows scroll sideways instead of wrapping, so the whole form fits on one screen. */
  .sf-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; scroll-padding: 16px; }
  .sf-chips::-webkit-scrollbar { display: none; }
  .sf-chips > * { flex: none; }
  .sf-go { position: sticky; bottom: calc(var(--tab-h) + var(--safe-b) + 10px); z-index: 3; }
  .sf-go .btn { box-shadow: 0 6px 20px var(--shadow); }
  .sf-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .sf-actions .btn { height: 44px; justify-content: center; }
  .sf-actions .btn.primary { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { .sf-gift.shake, .sf-city, button.sf-gift { animation: none; } }

@media (max-width: 900px) {
  /* Inline "Sign in with Google" inside a sentence: keep the line height normal. */
  p .linkbtn { min-height: 0; padding: 0; vertical-align: baseline; }
  .chat-input textarea { min-height: 64px; }
  .tabbar a { font-size: 10.5px; }
}

/* ---- phones: tighter vertical rhythm (less scrolling on the home page) ---- */
@media (max-width: 900px) {
  .globe-wrap { height: clamp(280px, min(92vw, 46vh), 420px); }
  .panel { padding: 14px 14px calc(var(--tab-h) + var(--safe-b) + 14px); }
  body.has-bookbar .panel { padding-bottom: calc(var(--tab-h) + var(--safe-b) + 84px); }
  h1 { font-size: 28px; margin-bottom: 12px; }
  h3, .h3 { margin: 20px 0 8px; }
  .search-card { padding: 12px; gap: 8px; }
  .field input, .field select { height: 44px; }
  .deal-grid { gap: 6px; }
  .deal { padding: 10px 12px; }
  .see-all { margin: 8px 0 0; }
  .sf-cta { margin: 10px 0; padding: 10px 12px; }
  .disclaimer { margin-top: 12px; }
  .play-badge { margin-top: 8px; }
  .play-badge img { height: 48px; }
}

/* ---- ±N days price strip (route page) ---- */
.flex-strip-head { display: flex; align-items: center; gap: 8px; margin: 14px 0 6px; color: var(--muted); }
.flex-strip-head .status { margin-left: auto; }
.flex-strip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.flex-strip::-webkit-scrollbar { display: none; }
.flex-day {
  flex: 1 0 64px; display: grid; gap: 4px; justify-items: center; padding: 8px 6px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); text-align: center;
}
.flex-day:hover { text-decoration: none; border-color: var(--line-2); }
.fd-date { display: grid; font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.fd-date b { font-size: 13px; color: var(--text); font-weight: 600; }
.fd-price { font: 600 13px var(--mono); }
.flex-day.low { border-color: rgba(76, 195, 138, 0.55); }
.flex-day.low .fd-price { color: var(--good); }
.flex-day.sel { border-color: var(--accent); background: var(--accent-soft); }

/* ---- admin: running costs ---- */
.cost-table td.cost-bar { width: 22%; min-width: 60px; }
.cost-bar span { display: block; height: 8px; border-radius: 4px; background: var(--accent); min-width: 2px; }
.cost-bar span.over { background: var(--bad); }

/* ---- plan cards (Settings) ---- */
.plan-card { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); margin-bottom: 8px; }
.plan-card span { color: var(--muted); font-size: 14px; }
.plan-card.on { border-color: var(--accent); }
.plan-card.plus { border-style: dashed; border-color: var(--accent); }
.plan-card ul { margin: 4px 0 8px; padding-left: 18px; color: var(--muted); font-size: 14px; }
.plan-card .btn { justify-self: start; }

/* ---- admin: signup funnel ---- */
.funnel { display: grid; gap: 8px; }
.fn-row { display: grid; grid-template-columns: 130px 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.fn-bar { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.fn-bar i { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.fn-num small { color: var(--muted); }
@media (max-width: 560px) { .fn-row { grid-template-columns: 1fr auto; } .fn-bar { grid-column: 1 / -1; grid-row: 2; } }
.invite-row { display: flex; gap: 6px; margin: 6px 0 2px; }
.invite-link { flex: 1; min-width: 0; height: 34px; padding: 0 10px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--bg); color: var(--text); font: 13px var(--mono); }

/* ---- accessibility: page titles are h1 / sections h2, styled as before ---- */
h1.h2 { font-size: 22px; font-weight: 600; line-height: 1.25; margin: 0 0 6px; letter-spacing: 0; }
h2.h3 { font-size: 15px; font-weight: 600; margin: 28px 0 10px; line-height: 1.3; }
h1.codes { margin: 0; line-height: 1.15; }
.eyebrow a { text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 900px) { h1.h2 { font-size: 20px; } h2.h3 { font-size: 16px; margin-top: 20px; } }
/* Links inside sentences are underlined, so they don't rely on colour alone. */
p a:not(.btn):not(.chip), .disclaimer a, li a:not(.btn) { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }

/* ---- wiki family shell: phones and mid widths ---- */
@media (max-width: 1200px) and (min-width: 901px) { .nav .installbtn span, .findbtn span { display: none; } .nav .btn { width: 38px; padding: 0; justify-content: center; } }
@media (max-width: 1100px) and (min-width: 901px) { .navlink { padding: 8px 7px; } .topsearch { flex-basis: 200px; } }
@media (max-width: 900px) {
  .topbar { gap: 10px; padding-left: 16px; padding-right: 16px; }
  .topbar .brand > span { display: none; }
  .site-foot { margin: 40px -14px 0; }
  .foot-in { padding: 24px 14px 16px; }
  .legal { padding: 14px 14px 18px; }
  .tabbar { background: var(--nav); border-top-color: var(--nav-line); align-items: end; }
  .tabbar a { color: var(--nav-muted); }
  .tabbar a.active { color: var(--nav-ink); }
  .tabbar a.active svg { color: var(--nav-accent); }
  .tabbar .i { width: 22px; height: 22px; }
  .tabbar a.tab-main { align-self: center; justify-self: center; display: grid; place-items: center; width: 54px; height: 54px; margin-top: -22px; border-radius: 999px; background: var(--primary); color: var(--on-primary); box-shadow: 0 4px 14px rgb(0 0 0 / .35); }
  .tabbar a.tab-main.active { color: var(--on-primary); }
  .tabbar a.tab-main.active svg { color: var(--on-primary); }
  .tabbar a.tab-main .i { width: 24px; height: 24px; }
}

/* My flights segments and admin subnav (as on Plant Wiki) */
#viewTop:empty { display: none; }
#viewTop { margin: -6px 0 16px; }
.mine-seg { display: flex; width: max-content; max-width: 100%; }
.subnav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.subnav a { padding: 6px 10px; border-radius: var(--radius); color: var(--muted); font-weight: 600; font-size: 14px; }
.subnav a.on { color: var(--accent); background: var(--accent-soft); }
.subnav a:hover { text-decoration: none; color: var(--text); }
.subnav a.console { margin-left: auto; font-weight: 500; }
.hunt-filters { margin: 12px 0 4px; }
.hunt-day { margin-top: 18px; }
.home-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.home-tile { display: grid; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--text); }
.home-tile:hover { border-color: var(--accent); text-decoration: none; }
.home-tile b { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 15px; }
.home-tile b .i { color: var(--accent); }
.home-tile small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.home-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 16px 0 4px; padding: 0; list-style: none; font-size: 13px; line-height: 1.3; color: var(--muted); }
.home-stats li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.home-stats b { display: block; font-size: 22px; font-weight: 600; line-height: 1.15; color: var(--ink); font-variant-numeric: tabular-nums; }
.foot-play { margin: 10px 0 0 -8px; }
.foot-play img { height: 52px; }
/* The still Earth shown until the 3D globe's library loads (globe.js) */
.globe-poster { position: absolute; left: 50%; top: 50%; width: min(70%, 70vh, 520px); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  /* Gradients only (blurred shadows are slow to paint on phones): a lit sphere, its shaded edge, and the blue rim. */
  background: radial-gradient(circle at 50% 50%, transparent 66%, rgba(110, 168, 254, 0.28) 70.5%, transparent 71%),
    radial-gradient(circle at 65% 70%, rgba(0, 0, 0, 0.45) 0%, transparent 55%),
    radial-gradient(circle at 35% 30%, #2b5c9c 0%, #17345e 38%, #0b1a33 70%, #060d1a 100%);
  pointer-events: none; }
@media (max-width: 900px) { .globe-poster { width: min(82vw, 40vh, 380px); } }
.hunt-find { display: grid; gap: 6px; }
.hunt-find .btn { justify-self: start; }
/* The footer waits for the first view, so it does not jump down when the page draws (CLS). */
body:not(.ready) .site-foot { display: none; }
/* The view fills at least one screen, so the footer always starts below the fold and redraws never move it in view (CLS). */
#view { min-height: calc(100dvh - var(--top-h) - 60px); }
@media (max-width: 900px) { #view { min-height: 100dvh; } }
/* Below the fold: laid out only when scrolled near (cheaper first layout, TBT). */
.site-foot { content-visibility: auto; contain-intrinsic-size: auto 560px; }
.home-tiles, #view > .disclaimer, .deal-grid { content-visibility: auto; contain-intrinsic-size: auto 240px; }
/* Holds the search form's height until it is drawn just after first paint (app.js viewHome). */
#formSlot:empty { min-height: 327px; }
@media (max-width: 900px) { #formSlot:empty { min-height: 433px; } }

/* ---- adapting to each person (shared adaptive.js; Claude-admin docs/ADAPTIVE-FLOW-AND-ENGAGEMENT.md) ---- */
a.why { display: inline-block; font-size: 12px; color: var(--muted); text-decoration: none; line-height: 1.4; }
a.why:hover { color: var(--accent); text-decoration: underline; }
.why-row { margin: -4px 0 0; }
.home-card {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding: 10px 12px; margin-bottom: 10px;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--text); font-size: 14px;
}
.home-card > span { flex: 1 1 200px; min-width: 0; }
.home-card .install-x { margin-left: auto; }
.home-card.trip-card a.why { display: block; margin-top: 2px; }
.save-offer { margin: 10px 0 0; }
.fy-card { display: grid; gap: 4px; align-content: start; min-width: 0; }
.fy-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 2px; }
.fy-foot .linkbtn { font-size: 12px; color: var(--muted); white-space: nowrap; }
.fy-foot .linkbtn:hover { color: var(--accent); }
.pers { margin: 24px 0 8px; padding-top: 4px; }
.pers h3 { font-size: 18px; margin: 0 0 6px; }
.pers h4 { font-size: 14px; margin: 16px 0 6px; }
.pers label.geo { display: flex; align-items: center; gap: 8px; margin: 10px 0; font-size: 14px; }
.pers-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pers-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font-size: 14px; }
.pers select { margin-left: 6px; height: 30px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--field); color: var(--text); }
.pers .actions { margin-top: 12px; }
.pers .actions button {
  height: 34px; padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--line-2);
  background: transparent; color: var(--text); font-size: 14px; cursor: pointer;
}
.pers .actions button:hover { background: var(--hover); }

/* Main header button uses the same 600 weight as the other four wikis' Identify button. The header itself stays full
   width here because every Flight Wiki page is the full-width sidebar and globe, not a centred column. */
.topbar .findbtn { font-weight: 600; }

/* Buttons match the other wikis: 14px/600, 40px tall in the side panel, small ones 30px. The header keeps its 38px. */
.btn { font-weight: 600; }
.layout .btn:not(.sm) { height: 40px; }
.btn.sm { height: 30px; }
