:root {
  --bg: #EEF3F8;
  --paper: #FFFFFF;
  --ink: #18233A;
  --muted: #5E6B80;
  --line: #D4DCE6;
  --sea: #0B6E79;
  --sea-ink: #FFFFFF;
  --stamp: #C2343E;
  --radius: 18px;
  --display: 'Secular One', 'Assistant', system-ui, sans-serif;
  --body: 'Assistant', system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1726; --paper: #182236; --ink: #E8EEF6; --muted: #9AA8BC;
    --line: #2C3A52; --sea: #3DB3BF; --sea-ink: #0F1726; --stamp: #FF6B73;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 400 17px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}
.top {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 980px; margin: 0 auto; padding: 18px 16px;
}
.brand { font: 400 20px/1 var(--display); display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand .mark { width: 30px; height: 30px; flex: none; }
.lang {
  background: none; border: 1px solid var(--line); color: var(--ink);
  border-radius: 999px; padding: 6px 14px; font: 600 14px var(--body); cursor: pointer;
}
main { max-width: 980px; margin: 0 auto; padding: 8px 16px 48px; }
h1 {
  font: 400 clamp(30px, 5vw, 48px)/1.12 var(--display);
  margin: 18px 0 10px; max-width: 22ch; letter-spacing: -0.01em;
}
.lede { color: var(--muted); max-width: 60ch; margin: 0 0 28px; }

/* The boarding pass: ticket + stub, joined by a perforation. */
.pass {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px;
  background: var(--paper); border-radius: var(--radius);
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgba(24, 35, 58, .35);
  position: relative;
}
.ticket { padding: 26px 28px; }
/* grid and flex children must be allowed to shrink below their inputs' natural width */
.pass > section, .port, .field, .route > * { min-width: 0; }
.port input, .field input, .field select { min-width: 0; max-width: 100%; }
.port input { width: 100%; }
.stub {
  padding: 26px 24px; position: relative;
  border-inline-start: 2px dashed var(--line);
  display: flex; flex-direction: column; gap: 16px;
}
/* punched notches at the perforation */
.stub::before, .stub::after {
  content: ''; position: absolute; inset-inline-start: -13px;
  width: 24px; height: 24px; border-radius: 50%; background: var(--bg);
}
.stub::before { top: -12px; }
.stub::after { bottom: -12px; }

.trip-type { display: flex; gap: 18px; margin-bottom: 18px; color: var(--muted); }
.trip-type label { cursor: pointer; }

.route { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 12px; margin-bottom: 20px; }
.port label { display: block; color: var(--muted); font-size: 14px; }
.port input {
  width: 100%; border: 0; border-bottom: 2px solid var(--line); background: transparent;
  font: 400 clamp(40px, 7vw, 64px)/1.05 var(--display); color: var(--ink);
  text-transform: uppercase; padding: 2px 0; direction: ltr; text-align: start;
}
[dir="rtl"] .port input { text-align: right; }
.port input:focus { outline: none; border-bottom-color: var(--sea); }
.port-name { display: block; color: var(--muted); font-size: 14px; min-height: 21px; }
.swap {
  border: 1px solid var(--line); background: var(--paper); color: var(--sea);
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer; margin-bottom: 26px; font-size: 20px;
}
[dir="rtl"] .plane { display: inline-block; transform: scaleX(-1); }

.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row.three > .field { flex: 1 1 140px; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; flex: 1 1 180px; }
.field > label, legend { color: var(--muted); font-size: 14px; }
input[type="date"], input[type="number"], input[type="email"], select {
  font: 600 16px var(--body); color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; min-height: 42px;
}
input:focus-visible, select:focus-visible, button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--sea) 45%, transparent); outline-offset: 2px;
}
/* When do you fly: two modes, departure-day chips, and a sentence saying what will be checked */
.when { margin: 4px 0 10px; }
.q { font: 400 20px/1.2 var(--display); color: var(--ink); padding: 0; margin-bottom: 10px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin-bottom: 14px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 7px 16px; border-radius: 999px; font-weight: 600; font-size: 15px; color: var(--muted); }
.seg input:checked + span { background: var(--sea); color: var(--sea-ink); }
.seg input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--sea) 45%, transparent); outline-offset: 1px; }
.len { display: flex; align-items: center; gap: 8px; }
#trip_days { width: 84px; }
.label { color: var(--muted); font-size: 14px; }
.days { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 6px; }
.chip {
  min-width: 44px; min-height: 40px; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: 600 15px var(--body);
}
.chip[aria-pressed="true"] { background: color-mix(in srgb, var(--sea) 14%, var(--paper)); border-color: var(--sea); color: var(--sea); }
.chip:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }
fieldset { border: 0; padding: 0; margin: 0 0 6px; }
.choice, .check { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; margin-bottom: 8px; }
.hint { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
/* fixed dates: several options ("Dec 3-8 or Dec 10-15"); the header shows only with 2+ options */
.opt + .opt { border-top: 1px dashed var(--line); padding-top: 12px; }
.opt-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; }
.opt-name { font-weight: 700; font-size: 15px; color: var(--ink); }
.opt-x {
  width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper);
  color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; display: inline-grid; place-items: center;
}
.opt-x:hover { color: var(--stamp); border-color: var(--stamp); }
.add-opt {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 0 14px; padding: 8px 16px; border-radius: 999px;
  border: 1px dashed var(--sea); background: transparent; color: var(--sea); font: inherit; font-weight: 600; font-size: 15px; cursor: pointer;
}
/* the plus is its own flex item, so it leads the label in both reading directions */
.add-opt::before { content: '+'; font-size: 18px; line-height: 1; }
.add-opt:hover { background: color-mix(in srgb, var(--sea) 8%, var(--paper)); }
.opt-x:focus-visible, .add-opt:focus-visible { outline: 3px solid color-mix(in srgb, var(--sea) 45%, transparent); outline-offset: 1px; }
.pairs {
  color: var(--sea); font-weight: 600; font-size: 15px; margin: 4px 0 16px; min-height: 21px;
  background: color-mix(in srgb, var(--sea) 8%, var(--paper)); border-radius: 10px; padding: 10px 12px;
}
.pairs:empty { display: none; }
.pairs.bad { color: var(--stamp); background: color-mix(in srgb, var(--stamp) 8%, var(--paper)); }

.stub .field { flex: 0 0 auto; margin-bottom: 0; }
.target label { color: var(--stamp); }
.mail > label { font: 400 19px/1.25 var(--display); color: var(--ink); }
.mail input { font-size: 17px; min-height: 48px; }
.price { display: flex; align-items: center; gap: 6px; }
.price select { width: 64px; padding-inline: 6px; font: 400 22px var(--display); border-color: var(--stamp); color: var(--stamp); }
.price input {
  flex: 1; min-width: 0; font: 400 40px/1 var(--display); color: var(--stamp);
  border: 2px solid var(--stamp); border-radius: 12px; padding: 8px 10px; direction: ltr;
  transform: rotate(-1.5deg);
}
[dir="rtl"] .price input { transform: rotate(1.5deg); }
/* empty, the stamp is drawn but not yet inked: a red solid box before anything is typed read as an error */
.price input:placeholder-shown { border-style: dashed; border-color: color-mix(in srgb, var(--stamp) 45%, var(--line)); }
.usual { margin: 2px 0 0; padding: 8px 10px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--ink);
  background: color-mix(in srgb, var(--sea) 8%, var(--paper)); }
.usual bdi { color: var(--sea); white-space: nowrap; }
/* an error sits under the field it is about */
.ferr { margin: 6px 0 0; color: var(--stamp); font-size: 14px; font-weight: 600; }
.ferr::before { content: '! '; font-weight: 700; }
#f [aria-invalid="true"] { border-color: var(--stamp); }
.price input[aria-invalid="true"] { border-style: solid; border-color: var(--stamp); }
.price + .ferr { margin-top: 2px; }
.route .ferr { grid-column: 1 / -1; margin-top: -8px; }

/* passengers stays in view; cabin, stops, airline and departure days fold into one line */
.pax { max-width: 200px; }
.more { border-top: 1px dashed var(--line); margin-top: 4px; }
.more > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px;
  padding: 14px 0 4px; min-height: 44px; }
.more > summary::-webkit-details-marker { display: none; }
.more-t { font-weight: 700; color: var(--sea); display: inline-flex; align-items: center; gap: 8px; }
.more-t::before { content: '+'; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--sea); font-size: 16px; line-height: 1; }
.more[open] .more-t::before { content: '−'; }
.more-sub { color: var(--muted); font-size: 14px; }
.more-sub.set { color: var(--ink); font-weight: 600; }
.more > summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--sea) 45%, transparent); outline-offset: 2px; border-radius: 8px; }
.more-body { padding-top: 10px; }

.go {
  margin-top: auto; background: var(--sea); color: var(--sea-ink); border: 0; border-radius: 12px;
  padding: 14px 16px; font: 700 18px var(--body); cursor: pointer;
}
.go[disabled] { opacity: .6; cursor: progress; }
.msg { min-height: 24px; margin: 0; font-size: 15px; }
.msg.err { color: var(--stamp); }
.msg.ok { color: var(--sea); font-weight: 600; }

/* Fares we found this week: a quiet list under the pass, one row per route. */
.finds { margin-top: 34px; max-width: 760px; }
.finds h2 { font: 400 22px/1.2 var(--display); margin: 0 0 10px; }
.finds ul { list-style: none; margin: 0 0 10px; padding: 0; background: var(--paper); border-radius: var(--radius);
  box-shadow: 0 1px 0 var(--line); }
#finds-list li + li { border-top: 2px dashed var(--line); }
.find { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; padding: 14px 20px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; align-items: baseline; }
.find:focus-visible { outline: 2px solid var(--sea); outline-offset: -2px; border-radius: var(--radius); }
.find:hover .find-route { color: var(--sea); }
.find-route { font-weight: 700; font-size: 17px; }
.find-when { font-weight: 400; color: var(--muted); }
.find-price { font: 400 22px/1 var(--display); color: var(--sea); text-align: end; }
.find-why { grid-column: 1 / -1; color: var(--muted); font-size: 14px; }
.find-why b { color: var(--ink); font-weight: 600; }
/* The hero (owner, 2026-11-19): the first screen is night. Logo colours are the base (navy, the
   mint of the plane's trail, the red dot); the page below the form stays the light site.
   Only on the home page (body.home): My flights mode removes the class and keeps the plain look. */
.hero { position: relative; }
.hero-text { position: relative; z-index: 1; min-width: 0; }
body.home {
  --night: #0B1220; --mint: #3DD9C1; --red: #E8434D;
  background:
    radial-gradient(700px 420px at 85% 8%, rgba(61, 217, 193, .28), transparent 70%),
    radial-gradient(520px 380px at 8% 40%, rgba(232, 67, 77, .20), transparent 70%),
    radial-gradient(900px 500px at 50% 120%, rgba(11, 110, 121, .55), transparent 70%),
    linear-gradient(180deg, var(--night), #0E1A2E) 0 0 / 100% var(--band, 900px) no-repeat,
    var(--bg);
  background-repeat: no-repeat;
}
/* the globe and the full-width cards hang past the edges: never a sideways scroll */
html:has(> body.home), body.home { overflow-x: clip; }
body.home .top, body.home .brand { color: #F2F7FB; }
body.home .topnav .mine, body.home .langbtn { color: #F2F7FB; border-color: rgba(242, 247, 251, .25); background: transparent; }
body.home .topnav .mine:hover { color: var(--mint); border-color: var(--mint); }

.globe { display: none; }
body.home .globe { display: block; position: absolute; z-index: 0; width: 540px; height: 540px; inset-inline-end: -190px; top: 0;
  opacity: 0; transition: opacity 1.2s ease; pointer-events: none; filter: drop-shadow(0 0 60px rgba(61, 217, 193, .35)); }
body.home .globe.on { opacity: .9; }

.live { display: inline-flex; align-items: center; gap: 10px; margin: 18px 0 0; padding: 7px 14px; border-radius: 999px;
  color: #CFE9E5; font: 600 14px var(--body); background: rgba(61, 217, 193, .10); border: 1px solid rgba(61, 217, 193, .35); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mint); flex: none; animation: live-ping 1.6s infinite; }
@keyframes live-ping { 0% { box-shadow: 0 0 0 0 rgba(61, 217, 193, .7); } 70%, 100% { box-shadow: 0 0 0 10px rgba(61, 217, 193, 0); } }

body.home .hero-text { max-width: 640px; }
body.home h1 { display: grid; gap: 6px; max-width: none; margin: 18px 0 18px; color: #F2F7FB;
  font: 400 clamp(34px, 4.3vw, 54px)/1.1 var(--display); }
body.home h1 > span { text-wrap: balance; } /* no word alone on the last line */
body.home h1 .h1-b { color: var(--mint); text-shadow: 0 0 28px rgba(61, 217, 193, .55), 0 0 2px rgba(61, 217, 193, .9); }
body.home .lede { color: #B8C7D8; font-size: 19px; max-width: 44ch; margin: 0; }

/* the rail's title, in view; each card says how long ago it was found (from minutes to a few days) */
.rail-h { position: relative; z-index: 1; margin: 30px 0 -8px; font: 600 15px/1.3 var(--body); color: #CFE9E5; }
.z-ago { white-space: nowrap; }
/* the running cards: two passes of the same list, moved by half their width, so the loop has no seam */
.rail { position: relative; z-index: 1; margin: 18px calc(50% - 50vw) 0; overflow: hidden; direction: ltr;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.rail-track { display: flex; gap: 18px; width: max-content; margin: 0; padding: 22px 0 34px; list-style: none;
  animation: rail-run var(--dur, 50s) linear infinite; }
.rail:hover .rail-track, .rail:focus-within .rail-track, .rail.paused .rail-track { animation-play-state: paused; }
/* the cards can be stopped by anyone, a phone included (WCAG 2.2.2) */
.rail-pause { position: relative; z-index: 2; margin: -30px 0 0; margin-inline-start: auto; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: #F2F7FB; background: rgba(11, 18, 32, .55);
  border: 1px solid rgba(242, 247, 251, .3); }
.rail-pause:hover { border-color: var(--mint); color: var(--mint); }
.rail-pause:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; }
.rail-ico { width: 10px; height: 12px; border-inline: 3px solid currentColor; }
.rail.paused .rail-ico { width: 0; height: 0; border: 0; border-block: 6px solid transparent; border-left: 10px solid currentColor; margin-left: 3px; }
@keyframes rail-run { to { transform: translateX(-50%); } }
.z-card { flex: none; width: 230px; height: 286px; transform: rotate(-1.5deg); }
.z-card.z-tilt { transform: rotate(1.5deg) translateY(14px); }
.z-go { all: unset; box-sizing: border-box; position: relative; display: block; width: 100%; height: 100%; cursor: pointer;
  border-radius: 22px; overflow: hidden; background: linear-gradient(160deg, #12324A, #0B1220);
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .08); transition: transform .25s ease; }
.z-card.z-glow .z-go { box-shadow: 0 0 0 2px var(--mint), 0 0 34px rgba(61, 217, 193, .55), 0 24px 50px -24px rgba(0, 0, 0, .8); }
.z-go:hover { transform: translateY(-6px); }
.z-go:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; }
.z-go img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.z-stamp { position: absolute; top: 14px; inset-inline-start: 14px; z-index: 1; padding: 8px 12px; border-radius: 999px;
  /* #C2343E, not the logo red: white on it reads at 5.5:1 (the logo red gave 3.9:1) */
  font: 400 17px/1 var(--display); color: #fff; background: #C2343E; box-shadow: 0 0 22px rgba(232, 67, 77, .7); transform: rotate(-4deg); }
.z-cap { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; padding: 18px;
  color: #fff; text-align: start; background: linear-gradient(180deg, rgba(11, 18, 32, 0) 35%, rgba(11, 18, 32, .92)); }
html[dir="rtl"] .z-cap { direction: rtl; }
.z-from { align-self: flex-start; margin-bottom: 6px; padding: 7px 10px; border-radius: 999px; font: 600 13px/1 var(--body); white-space: nowrap;
  background: rgba(11, 18, 32, .62); border: 1px solid rgba(255, 255, 255, .22); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.z-city { font: 400 30px/1.05 var(--display); }
.z-price { font: 400 40px/1 var(--display); color: var(--mint); text-shadow: 0 0 18px rgba(61, 217, 193, .6); }
.z-meta { font-size: 13px; color: #C9D6E4; white-space: nowrap; }
.z-meta s { opacity: .8; }
body.home #f { box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .6), 0 0 0 1px rgba(61, 217, 193, .25); }

@media (max-width: 760px) {
  /* phone: the globe is not behind the words; it rises like a horizon behind the running cards */
  body.home .hero { clip-path: inset(-100vh -100vw 0 -100vw); }
  body.home .globe { width: 640px; height: 640px; top: auto; bottom: -300px; left: 50%; right: auto; transform: translateX(-50%); }
  body.home .globe.on { opacity: .75; }
  body.home .lede { font-size: 17px; }
  .rail { margin-top: 22px; }
  .z-card { width: 200px; height: 262px; }
  .z-city { font-size: 24px; } .z-price { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  /* nothing runs by itself: the cards can be scrolled sideways instead */
  .rail { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .rail-track { animation: none; padding-inline: 16px; }
  .live-dot { animation: none; }
  .rail-pause { display: none; } /* nothing runs, nothing to stop */
}

/* The live board: latest real checks, one coming in every few seconds (finds-motion.js). */
.feed { background: var(--paper); border-radius: var(--radius); box-shadow: 0 1px 0 var(--line); padding: 14px 20px 4px; margin: 0 0 18px; overflow: hidden; }
.feed-h { margin: 0 0 4px; color: var(--muted); font-size: 13px; font-weight: 600; }
.feed ol { list-style: none; margin: 0; padding: 0; }
.tick { position: relative; display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; grid-template-rows: auto auto;
  align-items: center; column-gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.tick:first-child { border-top: 0; }
.tick-mark { grid-row: 1 / 3; width: 10px; height: 10px; border-radius: 50%; background: var(--line); justify-self: center; }
.tick.done .tick-mark { background: var(--sea); }
.tick.is-deal .tick-mark { box-shadow: 0 0 0 4px color-mix(in srgb, var(--sea) 22%, transparent); }
.tick-route { grid-column: 2; grid-row: 1; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tick-meta { grid-column: 2; grid-row: 2; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tick-wait, .tick-res { grid-column: 3; grid-row: 1 / 3; justify-self: end; text-align: end; }
.tick-res { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.tick-price { font-weight: 700; font-size: 15px; white-space: nowrap; }
.tick-wait { color: var(--muted); font-size: 14px; }
.tick.checking .tick-res, .tick.done .tick-wait { display: none; }
.tick.checking .tick-mark { background: transparent; border: 2px solid var(--line); border-top-color: var(--sea); width: 12px; height: 12px; animation: tick-spin .7s linear infinite; }
@keyframes tick-spin { to { transform: rotate(360deg); } }
.tick-bar { position: absolute; inset-inline-start: 0; bottom: -1px; height: 2px; width: 0; background: var(--sea); }
.tick.checking .tick-bar { animation: tick-bar 1.1s ease-in-out forwards; }
@keyframes tick-bar { to { width: 100%; } }
.tick.checking { animation: tick-in .35s ease-out; }
@keyframes tick-in { from { opacity: 0; transform: translateY(-8px); } }
.tick.landed .tick-res { animation: price-land .45s cubic-bezier(.3, 1.6, .5, 1); }
.tick.landed.is-deal { animation: new-flash 2.6s ease-out; }
.tick.leaving { opacity: 0; transition: opacity .35s ease; }
.verdict { font-size: 12px; font-weight: 600; line-height: 1.5; border-radius: 999px; padding: 0 9px; white-space: nowrap;
  background: color-mix(in srgb, var(--muted) 12%, var(--paper)); color: var(--muted); }
.verdict-low { background: color-mix(in srgb, var(--sea) 12%, var(--paper)); color: var(--sea); }
.verdict-deal { background: var(--sea); color: var(--sea-ink); }

/* Motion (finds-motion.js): the live dot, rows coming in, the price dropping to the find,
   a new route flashing in on refresh. All of it off for people who ask for less motion. */
.finds-live { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; margin: -4px 0 12px; }
.finds-live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sea); flex: none;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--sea) 55%, transparent); animation: live-pulse 2s ease-out infinite; }
@keyframes live-pulse { 70% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--sea) 0%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }
.finds li.pre { opacity: 0; transform: translateY(10px); }
.finds li.in { opacity: 1; transform: none; transition: opacity .45s ease, transform .45s cubic-bezier(.2, .7, .2, 1); }
.finds li.in .find-why { animation: why-in .5s ease .7s both; }
@keyframes why-in { from { opacity: 0; } to { opacity: 1; } }
.find-price.dropping { color: var(--muted); }
.find-price.landed { animation: price-land .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes price-land { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
.finds li.is-new .find { animation: new-flash 2.6s ease-out; }
@keyframes new-flash { 0%, 30% { background: color-mix(in srgb, var(--sea) 12%, var(--paper)); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) {
  .finds-live .dot, .finds li.in .find-why, .find-price.landed, .finds li.is-new .find { animation: none; }
  .finds li.pre { opacity: 1; transform: none; }
  .tick.checking .tick-mark, .tick.checking .tick-bar, .tick.checking, .tick.landed .tick-res, .tick.landed.is-deal { animation: none; }
}
.foot { color: var(--muted); font-size: 14px; margin-top: 22px; max-width: 70ch; }
.foot a { color: var(--sea); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Plain document pages (verify, manage, privacy) */
.doc { background: var(--paper); border-radius: var(--radius); padding: 26px 28px; max-width: 680px; }
.doc h1 { font-size: clamp(26px, 4vw, 36px); max-width: none; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; }
.doc td, .doc th { padding: 7px 4px; border-bottom: 1px solid var(--line); text-align: start; }
.doc .actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.btn { background: var(--sea); color: var(--sea-ink); border: 0; border-radius: 10px; padding: 10px 16px; font: 700 15px var(--body); cursor: pointer; }
.btn.big { font-size: 18px; padding: 14px 22px; }
.ask { border: 2px solid var(--stamp); border-radius: 14px; padding: 18px 20px; margin-bottom: 22px; }
.ask h1 { margin-top: 0; }
.btn.quiet { background: none; color: var(--stamp); border: 1px solid var(--stamp); }

@media (max-width: 760px) {
  .pass { grid-template-columns: 1fr; }
  .ticket { padding: 22px 18px; }
  .stub { border-inline-start: 0; border-top: 2px dashed var(--line); padding: 22px 18px; }
  .stub::before, .stub::after { top: -13px; bottom: auto; }
  .stub::before { inset-inline-start: -12px; }
  .stub::after { inset-inline-start: auto; inset-inline-end: -12px; }
  .route { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Header: My flights link + language menu */
.topnav { display: flex; align-items: center; gap: 10px; }
.topnav .mine { color: var(--ink); font: 700 15px var(--body); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; }
.topnav .mine:hover { border-color: var(--sea); color: var(--sea); }

/* Sign-in window */
dialog.auth { border: 0; border-radius: var(--radius); padding: 0; width: min(420px, calc(100vw - 32px)); background: var(--paper); color: var(--ink); box-shadow: 0 30px 60px -20px rgba(24,35,58,.5); }
dialog.auth::backdrop { background: rgba(24,35,58,.45); }
dialog.auth form { padding: 26px 24px 22px; display: flex; flex-direction: column; gap: 10px; position: relative; }
dialog.auth h2 { font: 400 24px/1.2 var(--display); margin: 0; padding-inline-end: 28px; }
dialog.auth .x { position: absolute; top: 12px; inset-inline-end: 12px; background: none; border: 0; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; width: 36px; height: 36px; }
.gbtn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font: 700 16px var(--body); cursor: pointer; }
.gbtn:hover { border-color: var(--sea); }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
dialog.auth .field { margin-bottom: 0; }
dialog.auth input { font: 600 16px var(--body); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; min-height: 44px; }
dialog.auth .go { margin-top: 4px; }
.linkbtn { background: none; border: 0; color: var(--sea); font: 600 15px var(--body); cursor: pointer; padding: 6px; text-decoration: underline; }
/* inside a column, a field must not grow tall (the shared .field rule is for rows) */
dialog.auth .field { flex: 0 0 auto; }
#inForm input { flex: 0 0 auto; font: 600 16px var(--body); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; min-height: 44px; }

/* Language menu: a pill like the other header buttons, opening a small paper card */
.langpick { position: relative; }
.langbtn { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--ink); font: 600 15px var(--body); cursor: pointer; }
.langbtn .code { display: none; }
.langbtn:hover, .langbtn[aria-expanded="true"] { border-color: var(--sea); color: var(--sea); }
.langbtn .chev { transition: transform .15s; opacity: .7; }
.langbtn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.langlist { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 20; min-width: 190px; padding: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px -18px rgba(24,35,58,.45); display: flex; flex-direction: column; }
.langlist[hidden] { display: none; }
.langlist button { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; padding: 8px 12px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: 600 16px var(--body); cursor: pointer; text-align: start; }
.langlist button:hover, .langlist button:focus-visible { background: color-mix(in srgb, var(--sea) 9%, var(--paper)); outline: none; }
.langlist button svg { color: var(--sea); visibility: hidden; }
.langlist button[aria-checked="true"] { color: var(--sea); }
.langlist button[aria-checked="true"] svg { visibility: visible; }
@media (max-width: 440px) {
  .top { gap: 8px; }
  .brand { font-size: 17px; white-space: nowrap; }
  .brand .mark { width: 26px; height: 26px; }
  .topnav { gap: 6px; }
  .topnav .mine, .langbtn { padding: 6px 10px; font-size: 14px; }
  .langbtn > svg:first-child { display: none; }
  .langbtn .cur { display: none; }
  .langbtn .code { display: inline; }
}

/* The date picker (calendar.js, owner 2026-11-19): the native input stays as the value holder, hidden;
   a button shows the date and opens the site's own calendar. */
.cal-native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.field:has(> .cal-native) { position: relative; }
.cal-field { font: 600 16px var(--body); color: var(--ink); background: var(--paper); text-align: start; cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px 9px 38px; min-height: 42px; width: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%230B6E79' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 12px center; }
html[dir="rtl"] .cal-field { padding: 9px 38px 9px 11px; background-position: calc(100% - 12px) center; }
.cal-field.empty { color: var(--muted); font-weight: 400; }
.cal-field:hover { border-color: var(--sea); }

.cal-back { position: fixed; inset: 0; z-index: 40; }
.cal-back.dim { background: rgba(11, 18, 32, .45); }
.cal { position: absolute; z-index: 41; background: var(--paper); color: var(--ink); border-radius: var(--radius);
  box-shadow: 0 30px 70px -20px rgba(11, 18, 32, .45), 0 0 0 1px var(--line); padding: 14px 16px 16px;
  opacity: 0; transform: translateY(-6px); transition: opacity .16s ease, transform .16s ease; }
.cal.open { opacity: 1; transform: none; }
.cal-top { display: grid; grid-template-columns: 36px 1fr 36px 36px; align-items: center; gap: 6px; margin-bottom: 4px; }
.cal-step { margin: 0; text-align: center; font-weight: 700; color: var(--sea); font-size: 15px; }
.cal-nav, .cal-x { all: unset; box-sizing: border-box; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font: 400 24px/1 var(--body); color: var(--ink); cursor: pointer; }
.cal-nav:hover, .cal-x:hover { background: color-mix(in srgb, var(--sea) 10%, transparent); }
.cal-nav:disabled { opacity: .25; cursor: default; background: none; }
/* no flip for RTL: ‹ and › are mirrored by the browser itself in right-to-left text */
.cal-nav:focus-visible, .cal-x:focus-visible, .cal-day:focus-visible { outline: 3px solid color-mix(in srgb, var(--sea) 45%, transparent); outline-offset: 1px; }
.cal-months { display: flex; gap: 28px; }
.cal-title { margin: 4px 0 8px; text-align: center; font: 400 19px/1.2 var(--display); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 40px); row-gap: 2px; }
.cal-dow { text-align: center; color: var(--muted); font-size: 12px; font-weight: 600; padding: 4px 0 6px; }
.cal-day { all: unset; box-sizing: border-box; position: relative; height: 40px; display: grid; place-items: center; cursor: pointer;
  font: 600 15px var(--body); color: var(--ink); border-radius: 50%; isolation: isolate; }
.cal-day:hover:not(:disabled):not(.end) { background: color-mix(in srgb, var(--sea) 12%, transparent); }
.cal-day:disabled { color: color-mix(in srgb, var(--muted) 45%, transparent); cursor: default; font-weight: 400; }
.cal-day.today::after { content: ''; position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 50%; background: var(--stamp); }
/* the trip: a band from the departure to the return, the two ends filled */
.cal-day.mid, .cal-day.hover { border-radius: 0; background: color-mix(in srgb, var(--sea) 13%, transparent); }
.cal-day.end { background: var(--sea); color: var(--sea-ink); }
.cal-day.end.from::before, .cal-day.end.to::before { content: ''; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--sea) 13%, transparent); }
.cal-day.end.from::before { inset-inline-start: 50%; }
.cal-day.end.to::before { inset-inline-end: 50%; }
.cal-day.end.from.to::before { display: none; }

/* phone: a sheet from the bottom, one month, big targets */
.cal.sheet { position: fixed; left: 0; right: 0; bottom: 0; top: auto !important; border-radius: 22px 22px 0 0; padding: 16px 16px max(20px, env(safe-area-inset-bottom));
  transform: translateY(24px); }
.cal.sheet.open { transform: none; }
.cal.sheet .cal-grid { grid-template-columns: repeat(7, 1fr); }
.cal.sheet .cal-day { height: 46px; }
.cal.sheet .cal-months { justify-content: center; }
.cal.sheet .cal-month { width: 100%; max-width: 420px; }
@media (prefers-reduced-motion: reduce) { .cal { transition: none; } }
