:root {
  color-scheme: light;
  --bg: #F2F5F5; --surface: #FFFFFF; --surface-2: #F7FAFA; --ink: #0F2330; --muted: #5A6C76; --line: #DCE5E7;
  --sea: #0A5963; --sea-2: #0C6E79; --accent: #0B7A85; --accent-ink: #FFFFFF; --accent-soft: #E1F1F2;
  --good: #1D7A4C; --good-soft: #E2F3E9; --warn: #93560F; --warn-soft: #FAEFDF; --bad: #A23B2A;
  --hero-ink: #EAF6F6; --hero-muted: #B7D6D8; --shadow: 0 1px 2px rgba(15,35,48,.06), 0 8px 24px rgba(15,35,48,.07);
  --display: "Bricolage Grotesque", "Manrope", system-ui, sans-serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0A1216; --surface: #111C22; --surface-2: #0E181D; --ink: #E4EDF0; --muted: #93A6AF; --line: #22333B;
    --sea: #073E45; --sea-2: #0A4E57; --accent: #4CC0C9; --accent-ink: #062226; --accent-soft: #13343A;
    --good: #6BC893; --good-soft: #15301F; --warn: #E3A35A; --warn-soft: #33261A; --bad: #F08A77;
    --hero-ink: #E4F3F4; --hero-muted: #9CC3C6; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.01em; text-wrap: balance; margin: 0; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-inline: 20px; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
[hidden] { display: none !important; }

.topbar { background: var(--sea); color: var(--hero-ink); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; padding-block: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font: 700 19px/1 var(--display); }
.brand svg { width: 30px; height: 30px; }
.brand-disc { fill: var(--sea-2); }
.brand-wave { fill: none; stroke: #9FE3E6; stroke-width: 2; stroke-linecap: round; }
.brand-sun { fill: #F6C66B; }
.topnav a { color: var(--hero-muted); text-decoration: none; font-weight: 600; font-size: 14px; }
.topnav a:hover { color: var(--hero-ink); }

.hero { background: var(--sea); color: var(--hero-ink); padding-block: 28px 96px; }
.eyebrow { margin: 0 0 10px; color: var(--hero-muted); font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.hero h1 { font-size: clamp(30px, 5vw, 52px); line-height: 1.05; max-width: 17ch; }
.lede { margin: 14px 0 0; max-width: 58ch; color: var(--hero-muted); font-size: 17px; }

.search-wrap { margin-top: -72px; }
.search {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  padding: 20px; display: grid; gap: 18px 22px; grid-template-columns: minmax(210px, 1fr) minmax(300px, 1.5fr) minmax(190px, 1fr) minmax(190px, auto); align-items: start;
}
.field { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
legend, .field > .legend { padding: 0; margin-bottom: 10px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.stepper-row { display: flex; flex-wrap: wrap; gap: 10px; }
.stepper { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 6px 8px; }
.stepper-label { font-weight: 600; font-size: 14px; margin-right: 4px; min-width: 64px; }
.stepper output { min-width: 1.6em; text-align: center; font: 600 16px var(--sans); font-variant-numeric: tabular-nums; }
.step { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 18px; line-height: 1; cursor: pointer; }
.step:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.step:disabled { opacity: .35; cursor: default; }
.ages { display: flex; flex-wrap: wrap; gap: 8px; }
.ages label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
select, input[type="date"] {
  font: 500 15px var(--sans); color: var(--ink); background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 10px; min-height: 42px; width: 100%;
}
.ages select { width: auto; min-width: 92px; }
.date-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.date-row input { min-width: 0; }
.date-row label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.flex { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.flex-label { font-size: 13px; font-weight: 600; color: var(--muted); margin-right: 2px; }
.flex label { position: relative; font-size: 13px; font-weight: 600; }
.flex input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.flex label { padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--muted); cursor: pointer; }
.flex label:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.flex label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.hint { margin: 0; font-size: 12.5px; color: var(--muted); }
.go { align-self: stretch; justify-content: flex-end; min-width: 190px; }
.btn-primary {
  font: 700 16px var(--sans); color: var(--accent-ink); background: var(--accent); border: 0; border-radius: 12px;
  padding: 14px 22px; min-height: 50px; cursor: pointer; transition: filter .15s;
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn-primary:disabled { opacity: .6; cursor: progress; }
.quota { margin: 0; font-size: 12.5px; color: var(--muted); }
.quota strong { color: var(--ink); }
.quota.out { color: var(--warn); }
.turnstile:empty { display: none; }
.form-error { grid-column: 1 / -1; margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-weight: 600; font-size: 14px; }

.results { margin-top: 34px; }
.results-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; }
.results-head h2 { font-size: 26px; }
.results-head p { margin: 4px 0 0; }
.progress { flex: 0 0 min(320px, 100%); height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.progress.done { visibility: hidden; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { font: 600 13px var(--sans); padding: 8px 12px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.select-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.select-inline select { width: auto; min-height: 36px; padding: 6px 8px; font-size: 14px; }

.cards { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card.best { border-color: var(--accent); box-shadow: var(--shadow); }
.card-main { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 18px 20px; align-items: start; }
.card-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; }
.card-title h3 { font-size: 22px; }
.card-region { color: var(--muted); font-size: 14px; font-weight: 600; }
.card-note { margin: 6px 0 0; color: var(--muted); font-size: 14px; max-width: 60ch; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.badge { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.plain { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.best-price { text-align: right; }
.best-price .label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.price { font: 500 30px/1.1 var(--mono); font-variant-numeric: tabular-nums; }
.price-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.btn { display: inline-flex; align-items: center; gap: 6px; font: 700 14px var(--sans); text-decoration: none; border-radius: 10px; padding: 9px 14px; border: 1px solid var(--accent); color: var(--accent); background: transparent; margin-top: 10px; }
.btn:hover { background: var(--accent-soft); }
.btn.solid { background: var(--accent); color: var(--accent-ink); }
.btn.solid:hover { filter: brightness(1.08); }
.empty-live { padding: 4px 0 0; color: var(--muted); font-size: 14px; }

.options { border-top: 1px solid var(--line); }
.options table { width: 100%; border-collapse: collapse; font-size: 14px; }
.options th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; background: var(--surface-2); }
.options td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.options th.num { text-align: right; }
.options td.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.options td.num .src { font-family: var(--sans); }
.options td.num strong { font-weight: 500; font-size: 15px; }
.options .src { font-size: 12.5px; color: var(--muted); }
.options a { font-weight: 700; text-decoration: none; white-space: nowrap; }
.options .more { padding: 10px 12px; border-top: 1px solid var(--line); }
.options .more button { font: 700 13px var(--sans); color: var(--accent); background: none; border: 0; cursor: pointer; padding: 0; }
.table-scroll { overflow-x: auto; }
.show-sm { display: none; }

.elsewhere { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface-2); }
.elsewhere span { font-size: 13px; font-weight: 700; color: var(--muted); margin-right: 4px; }
.chip-link { font-size: 13px; font-weight: 700; text-decoration: none; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.chip-link:hover { border-color: var(--accent); color: var(--accent); }
.chip-link.ba { border-color: #2B5DAA; color: #2B5DAA; }
@media (prefers-color-scheme: dark) { .chip-link.ba { border-color: #8FB4F0; color: #A9C6F6; } }

.notice { padding: 14px 16px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-weight: 600; }

.how { margin-top: 56px; }
.how h2 { font-size: 26px; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.how-grid article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.how-grid h3 { font-size: 18px; }
.how-grid p { margin: 8px 0 0; color: var(--muted); font-size: 15px; }

.footer { margin-top: 56px; padding-block: 28px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; }
.footer p { margin: 0 0 8px; max-width: 80ch; }

@media (max-width: 1060px) {
  .search { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .go { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .wrap { padding-inline: 16px; }
  .hero { padding-block: 20px 84px; }
  .search { grid-template-columns: 1fr; padding: 16px; }
  .card-main { grid-template-columns: 1fr; }
  .best-price { text-align: left; }
  .how-grid { grid-template-columns: 1fr; }
  .options .hide-sm { display: none; }
  .show-sm { display: inline; }
  .options td, .options th { padding: 10px 8px; }
  .options td:first-child, .options th:first-child { padding-left: 14px; }
  .card-main { padding: 16px 14px; }
  .elsewhere { padding: 12px 14px; }
  .price { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
