/* Flynira — iOS-style, minimal, in the Flynira brand colours.
   Deep navy text, sky-blue actions, royal-blue gradients, turquoise for "cheapest".
   Grouped lists, hairline separators, segmented controls, sheets. Phone first; no zoom, no sideways scroll. */
:root {
  --navy: #062451;
  --sky: #0789F5;
  --royal: #0750B8;
  --teal: #05C4BE;
  --brand-gradient: linear-gradient(135deg, #062451 0%, #0789F5 60%, #05C4BE 100%);
  --bg: #F3F7FC;
  --cell: #ffffff;
  --cell-press: #e7eef8;
  --fill: rgba(7, 80, 184, .08);
  --fill-2: rgba(7, 80, 184, .15);
  --label: #062451;
  --label-2: rgba(6, 36, 81, .62);
  --label-3: rgba(6, 36, 81, .32);
  --sep: rgba(6, 36, 81, .14);
  --accent: #0789F5;
  --accent-text: #0750B8;
  --action: linear-gradient(135deg, #0750B8 0%, #0789F5 100%);
  --action-shadow: 0 6px 16px rgba(7, 137, 245, .28);
  --green: #05C4BE;
  --green-text: #04857f;
  --orange: #c93400;
  --red: #e5372b;
  --seg-on: #ffffff;
  --bar: rgba(243, 247, 252, .82);
  --shadow-seg: 0 3px 8px rgba(6, 36, 81, .12), 0 3px 1px rgba(6, 36, 81, .04);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #03132b;
    --cell: #0a2246;
    --cell-press: #12305c;
    --fill: rgba(120, 170, 240, .14);
    --fill-2: rgba(120, 170, 240, .24);
    --label: #ffffff;
    --label-2: rgba(222, 234, 252, .64);
    --label-3: rgba(222, 234, 252, .3);
    --sep: rgba(120, 160, 220, .22);
    --accent: #2b9bff;
    --accent-text: #4aaaff;
    --action: linear-gradient(135deg, #0750B8 0%, #0789F5 100%);
    --action-shadow: 0 6px 18px rgba(7, 137, 245, .3);
    --green: #05C4BE;
    --green-text: #2fe0d9;
    --orange: #ff9f0a;
    --red: #ff5a4f;
    --seg-on: #1b3d6e;
    --bar: rgba(3, 19, 43, .8);
    color-scheme: dark;
  }
}

/* ---------------------------------------------------------------- app shell: no zoom, no sideways scroll */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { overflow-x: hidden; overscroll-behavior-x: none; max-width: 100%; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--label);
  font-family: var(--font); font-size: 17px; line-height: 1.3; letter-spacing: -.2px;
  -webkit-font-smoothing: antialiased;
  touch-action: pan-y;            /* vertical scrolling only: no pinch, no sideways pan */
  -webkit-user-select: none; user-select: none;
  padding-bottom: env(safe-area-inset-bottom);
}
button, a, label, input, select { touch-action: manipulation; } /* no double-tap zoom */
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select { font: inherit; font-size: 17px; }  /* >=16px: iOS never zooms on focus */
svg { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

main { max-width: 560px; margin: 0 auto; padding: 0 16px 24px; }

/* ---------------------------------------------------------------- navigation */
.bar {
  position: sticky; top: 0; z-index: 10;
  height: calc(44px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top);
  display: grid; place-items: center;
  background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid transparent; transition: border-color .2s;
}
.bar-title { font-weight: 600; font-size: 17px; opacity: 0; transition: opacity .2s; }
.bar.scrolled { border-bottom-color: var(--sep); }
.bar.scrolled .bar-title { opacity: 1; }
/* brand header on the search screen */
.brand { margin: 6px 0 18px; }
.brand h1 { margin: 0; }
.brand img { display: block; height: 44px; width: auto; }
.brand .on-dark { display: none; }
@media (prefers-color-scheme: dark) { .brand .on-light { display: none; } .brand .on-dark { display: block; } }
.tagline { margin: 6px 0 0 2px; font-size: 15px; color: var(--label-2); }
.large-title { font-family: var(--display); font-size: 34px; font-weight: 700; letter-spacing: .37px; margin: 4px 0 14px; }

/* ---------------------------------------------------------------- grouped lists */
.group { position: relative; background: var(--cell); border-radius: 12px; overflow: hidden; margin-bottom: 20px; }
.cell {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 48px; padding: 8px 16px;
}
.cell + .cell::before, .group > * + .cell::before {
  content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--sep);
}
.cell .k { color: var(--label); }
.cell .v { color: var(--label-2); text-align: right; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell.pick .v { color: var(--accent-text); }
.cell.pick:active { background: var(--cell-press); }
/* Native pickers sit invisibly on top of the row, so the phone's own wheel / calendar opens. */
.cell.pick select, .cell.pick input {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; margin: 0; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.section {
  font-size: 13px; font-weight: 400; text-transform: uppercase; letter-spacing: -.08px;
  color: var(--label-2); margin: 0 16px 7px;
}

/* swap button floats on the From/To divider */
.group:has(.swap) .cell .v { padding-right: 40px; }
.swap {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--fill); color: var(--accent);
}
.swap svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.swap:active { background: var(--fill-2); }

/* stepper */
.stepper { display: flex; align-items: center; background: var(--fill); border-radius: 8px; height: 32px; }
.stepper button { width: 44px; height: 32px; font-size: 22px; font-weight: 400; color: var(--label); line-height: 1; }
.stepper button:disabled { color: var(--label-3); cursor: default; }
.stepper button:active:not(:disabled) { background: var(--fill-2); border-radius: 8px; }
.stepper output { min-width: 24px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

/* segmented control */
.segmented {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px;
  background: var(--fill); border-radius: 9px; padding: 2px; margin-bottom: 20px;
}
.segmented button {
  height: 30px; border-radius: 7px; font-size: 14px; font-weight: 500; color: var(--label);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 6px;
  transition: background .2s, box-shadow .2s;
}
.segmented button.on { background: var(--seg-on); box-shadow: var(--shadow-seg); font-weight: 600; }
.segmented.small button { height: 28px; font-size: 13px; }

/* buttons */
.primary {
  display: block; width: 100%; height: 50px; border-radius: 14px;
  background: var(--action); color: #fff; font-size: 17px; font-weight: 600;
  box-shadow: var(--action-shadow);
}
.primary:active { opacity: .7; }
.primary:disabled { opacity: .5; cursor: progress; }
.link { color: var(--accent-text); font-size: 17px; }
.icon-btn {
  position: relative; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--fill); color: var(--accent); flex: none;
}
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:active { background: var(--fill-2); }
.icon-btn .dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); border: 1.5px solid var(--bg); }
.form-error { color: var(--red); font-size: 15px; margin: -8px 16px 12px; }

/* recent searches */
.recent { margin-top: 28px; }
.recent .cell { color: var(--label); }
.recent .cell .v { color: var(--label-2); }
.recent .cell:active { background: var(--cell-press); }

/* ---------------------------------------------------------------- results */
.results-head { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; }
.results-title { flex: 1; min-width: 0; text-align: center; }
.results-title h1 { font-family: var(--display); font-size: 20px; font-weight: 700; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.results-title p { margin: 1px 0 0; font-size: 13px; color: var(--label-2); }
.results-head:has(#share[hidden])::after { content: ""; width: 36px; flex: none; } /* keep title centred */

.progress { height: 3px; border-radius: 3px; background: var(--fill); overflow: hidden; margin: 0 0 6px; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px; transition: width .35s ease; }
.progress.done { visibility: hidden; height: 0; margin: 0; }
.status { margin: 0 0 14px; text-align: center; font-size: 13px; color: var(--label-2); }

.combo {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  background: var(--cell); border-radius: 12px; padding: 12px 16px; margin: -8px 0 20px;
}
.combo span { color: var(--label-2); font-size: 15px; }
.combo b { font-size: 17px; font-variant-numeric: tabular-nums; }

/* nearby days: 7 equal columns, never scrolls sideways */
.days { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--cell); border-radius: 12px; padding: 4px; margin-bottom: 16px; }
.day { border-radius: 9px; padding: 7px 0 8px; text-align: center; line-height: 1.2; min-width: 0; }
.day small { display: block; font-size: 11px; color: var(--label-2); text-transform: uppercase; letter-spacing: .06px; }
.day .n { display: block; font-size: 17px; font-weight: 600; margin: 1px 0; }
.day .p { display: block; font-size: 11px; color: var(--label-2); font-variant-numeric: tabular-nums; }
.day.cheap .p { color: var(--green-text); font-weight: 600; }
.day.on { background: var(--action); box-shadow: var(--action-shadow); }
.day.on small, .day.on .n, .day.on .p { color: #fff; }
.day:active:not(.on) { background: var(--fill); }

.tools { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.tools .segmented { flex: 1; margin: 0; }
.tools .icon-btn { width: 32px; height: 32px; }

/* flight rows */
.flights:empty { display: none; }
.flight {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 12px 12px 12px 16px; color: inherit; text-decoration: none;
}
.flight + .flight::before { content: ""; position: absolute; top: 0; left: 68px; right: 0; border-top: .5px solid var(--sep); }
.flight:active { background: var(--cell-press); }
.logo {
  flex: none; width: 40px; height: 40px; border-radius: 10px; background: #fff; object-fit: contain; padding: 3px;
  box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .12);
}
.f-main { flex: 1; min-width: 0; }
.f-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.f-name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-price { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; flex: none; }
.f-times { font-size: 15px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.f-times sup { font-size: 10px; color: var(--orange); font-weight: 600; margin-left: 1px; }
.f-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 2px; font-size: 13px; color: var(--label-2); }
.f-badge { flex: none; font-weight: 600; }
.f-badge.cheap { color: var(--green-text); }
.f-badge.fast { color: var(--accent); }
.f-badge.low { color: var(--orange); }
.chev { flex: none; width: 14px; height: 14px; fill: none; stroke: var(--label-3); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

.note { font-size: 13px; color: var(--label-2); margin: -12px 16px 20px; }
#filteredOut { margin-top: -12px; text-align: center; }
.checked { margin-top: -8px; line-height: 1.45; }

.empty { text-align: center; padding: 40px 24px; color: var(--label-2); }
.empty svg { width: 44px; height: 44px; margin: 0 auto 12px; fill: var(--label-3); transform: rotate(45deg); }
.empty b { display: block; color: var(--label); font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.empty p { margin: 0; font-size: 15px; }

.link-row { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.link-row .logo { width: 32px; height: 32px; border-radius: 8px; }
.link-row .k { flex: 1; }
.link-row .v { flex: none; color: var(--accent); }
a.cell:active { background: var(--cell-press); }
.link-row + .link-row::before { left: 60px !important; }


.foot { text-align: center; font-size: 12px; color: var(--label-3); margin: 8px 24px 0; line-height: 1.6; }
.foot-link { color: var(--label-2); text-decoration: none; }

/* ---------------------------------------------------------------- sheets */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .4);
  display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease;
}
.sheet {
  width: 100%; max-width: 560px; background: var(--bg); border-radius: 14px 14px 0 0;
  padding: 8px 16px calc(20px + env(safe-area-inset-bottom)); animation: up .28s cubic-bezier(.2, .9, .3, 1);
}
.grabber { display: block; width: 36px; height: 5px; border-radius: 3px; background: var(--label-3); margin: 0 auto 10px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sheet-head h3 { margin: 0; font-size: 20px; font-weight: 700; }
.sheet .section { margin-left: 4px; }
.sheet.install { text-align: center; }
.app-icon { width: 76px; height: 76px; border-radius: 17px; margin: 10px auto 12px; display: block; box-shadow: 0 6px 20px rgba(0, 0, 0, .15); }
.install h3 { margin: 0 0 6px; font-size: 22px; font-weight: 700; }
.install p { margin: 0 auto 18px; color: var(--label-2); font-size: 15px; max-width: 300px; }
.install .link { display: block; width: 100%; height: 44px; margin-top: 6px; }
.ios-steps { text-align: left; margin: 0 auto 18px; padding: 12px 16px 12px 36px; background: var(--cell); border-radius: 12px; max-width: 320px; font-size: 15px; }
.ios-steps li + li { margin-top: 8px; }
.share-glyph { display: inline-block; vertical-align: -3px; color: var(--accent); }
.share-glyph svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes up { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

/* iOS-style switch */
.switch {
  -webkit-appearance: none; appearance: none; position: relative; width: 51px; height: 31px; flex: none;
  border-radius: 31px; background: var(--fill-2); transition: background .2s; margin: 0; cursor: pointer;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 1px 1px rgba(0, 0, 0, .16); transition: transform .2s;
}
.switch:checked { background: var(--green); }
.switch:checked::after { transform: translateX(20px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------------------- home: popular routes + about */
.popular { margin-top: 28px; }
.link-list .cell { color: var(--label); text-decoration: none; }
.link-list .cell:active { background: var(--cell-press); }
.link-list .cell .v { color: var(--label-2); }
.link-list .cell .logo { width: 28px; height: 28px; border-radius: 7px; flex: none; }
.more-links, .about { font-size: 13px; color: var(--label-2); margin: -10px 16px 16px; line-height: 1.5; }
.more-links a, .about a { color: var(--accent-text); text-decoration: none; }
.about { margin-top: 8px; }

/* ---------------------------------------------------------------- route, city and airline pages */
body.seo { -webkit-user-select: auto; user-select: auto; touch-action: auto; }
.seo main { padding-top: calc(12px + env(safe-area-inset-top)); }
.seo-head { padding: 8px 0 4px; }
.seo-head .brand { display: inline-block; margin: 0; }
.seo-head .brand img { height: 36px; }
.crumbs { font-size: 13px; color: var(--label-2); margin: 6px 0 14px; }
.crumbs a { color: var(--accent-text); text-decoration: none; }
.seo h1 { font-family: var(--display); font-size: 30px; line-height: 1.15; font-weight: 700; letter-spacing: -.3px; margin: 0 0 10px; display: flex; align-items: center; gap: 10px; }
.seo h1 .logo.big { width: 40px; height: 40px; border-radius: 10px; }
.seo .lead { font-size: 17px; line-height: 1.45; color: var(--label-2); margin: 0 0 18px; }
.seo .lead b { color: var(--label); }
.seo h2.section { margin-top: 26px; }
.seo h2.section a { color: inherit; text-decoration: none; }
.cta { display: grid; place-items: center; text-decoration: none; margin-bottom: 8px; }
.seo .note { margin: 8px 4px 16px; line-height: 1.45; }
.seo p > a { color: var(--accent-text); }
.table-wrap { background: var(--cell); border-radius: 12px; overflow: hidden; }
.seo table { width: 100%; border-collapse: collapse; font-size: 15px; }
.seo th { text-align: left; font-size: 12px; font-weight: 500; text-transform: uppercase; color: var(--label-2); padding: 10px 12px 6px; }
.seo td { padding: 10px 12px; border-top: .5px solid var(--sep); vertical-align: middle; }
.seo td a { display: flex; align-items: center; gap: 8px; color: var(--label); text-decoration: none; font-weight: 600; }
.seo td .logo { width: 28px; height: 28px; border-radius: 7px; flex: none; }
.seo .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 420px) { .seo th:nth-child(4), .seo td:nth-child(4) { display: none; } .seo td { padding: 9px 8px; font-size: 14px; } }
.prose .cell.col { align-items: stretch; flex-direction: column; gap: 4px; padding: 12px 16px; }
.prose h3 { margin: 0; font-size: 16px; font-weight: 600; }
.prose p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--label-2); }
.seo-foot { margin-top: 32px; font-size: 13px; color: var(--label-2); line-height: 1.5; text-align: center; }
.seo-foot a { color: var(--accent-text); text-decoration: none; }
.seo td:nth-child(3) { font-size: 13px; color: var(--label-2); }
