/* ==========================================================================
   Design tokens — derived from the beforeyoufly wireframes
   ========================================================================== */
:root {
  /* Surfaces */
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #fbfcfd;
  --border: #e8eaef;
  --border-strong: #d8dce4;

  /* Ink */
  --ink: #10182b;
  --ink-2: #3d4757;
  --muted: #6b7280;
  --muted-2: #9aa2b1;

  /* Brand */
  --brand: #6366f1;
  --brand-ink: #4f46e5;
  --brand-soft: #eef0fe;
  --cta: #101828;
  --cta-hover: #1f2a3d;

  /* Semantic */
  --ok: #16a34a;
  --ok-soft: #e9f9ef;
  --warn: #d97706;
  --warn-soft: #fef6e7;
  --stop: #dc2626;
  --stop-soft: #fdecec;
  --info: #2563eb;
  --info-soft: #eef4ff;

  /* Category tints */
  --tint-blue: #eef4ff;      --tint-blue-ink: #2563eb;
  --tint-green: #e9f9ef;     --tint-green-ink: #15803d;
  --tint-violet: #f0edfe;    --tint-violet-ink: #6d28d9;
  --tint-amber: #fef6e7;     --tint-amber-ink: #b45309;
  --tint-peach: #feefe9;     --tint-peach-ink: #c2410c;
  --tint-teal: #e7f6f5;      --tint-teal-ink: #0f766e;
  --tint-sky: #eaf2fe;       --tint-sky-ink: #1d4ed8;
  --tint-pink: #fdebf3;      --tint-pink-ink: #be185d;

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --step--1: clamp(0.8rem, 0.78rem + 0.1vw, 0.85rem);
  --step-0: clamp(0.95rem, 0.92rem + 0.15vw, 1rem);
  --step-1: clamp(1.1rem, 1.05rem + 0.25vw, 1.2rem);
  --step-2: clamp(1.3rem, 1.2rem + 0.5vw, 1.55rem);
  --step-3: clamp(1.6rem, 1.4rem + 1vw, 2.1rem);
  --step-4: clamp(2rem, 1.6rem + 2vw, 3.2rem);

  /* Space */
  --sp-1: 0.25rem; --sp-2: 0.5rem; --sp-3: 0.75rem; --sp-4: 1rem;
  --sp-5: 1.5rem;  --sp-6: 2rem;   --sp-7: 3rem;    --sp-8: 4rem;

  /* Shape */
  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 22px; --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 43, 0.04);
  --shadow: 0 1px 3px rgba(16, 24, 43, 0.06), 0 6px 16px -8px rgba(16, 24, 43, 0.08);
  --shadow-lg: 0 2px 8px rgba(16, 24, 43, 0.06), 0 18px 40px -20px rgba(16, 24, 43, 0.18);

  --container: 1180px;
  --header-h: 64px;
}

/* ============================================================ base ======= */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  /* The design is light only — this stops browsers applying dark-mode chrome
     to form controls and scrollbars on a device set to dark. */
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }

/* Inline icons ship without width/height so they inherit colour and scale with
   text. Anything with explicit dimensions (generated artwork) is left alone. */
svg:not([width]) { width: 1.15em; height: 1.15em; flex: none; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; text-wrap: balance; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p { text-wrap: pretty; }

a { color: var(--brand-ink); text-decoration-color: color-mix(in srgb, var(--brand-ink) 35%, transparent); text-underline-offset: 2px; }
a:hover { text-decoration-color: currentColor; }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--cta); color: var(--surface); padding: 0.75rem 1rem; border-radius: 0 0 var(--r) 0;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 720px) { .container { padding-inline: 1.5rem; } }

.serif-accent { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--brand); letter-spacing: -0.01em; }

.muted { color: var(--muted); }
.small { font-size: var(--step--1); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.stack > * + * { margin-top: var(--sp-4); }
.mt-0 { margin-top: 0; }

.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }

/* ======================================================= components ====== */

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-header[data-scrolled="true"] { border-bottom-color: var(--border); }
.site-header .container { display: flex; align-items: center; gap: var(--sp-4); min-height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 700; font-size: 1.05rem; color: var(--ink); text-decoration: none; letter-spacing: -0.03em; flex: none; }
.brand svg { width: 18px; height: 18px; color: var(--brand); }

.nav { display: none; margin-inline-start: auto; align-items: center; gap: 0.35rem; }
@media (min-width: 900px) { .nav { display: flex; } .nav--right { margin-inline-start: 0; } }
.nav a, .nav button {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.5rem 0.7rem; border-radius: var(--r-sm); border: 0; background: none;
  color: var(--ink-2); font-size: 0.925rem; font-weight: 500; text-decoration: none;
}
.nav a:hover, .nav button:hover { background: var(--surface); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

.nav-toggle {
  margin-inline-start: auto; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface); color: var(--ink);
}
@media (min-width: 900px) { .nav-toggle { display: none; } }

.mobile-nav { display: none; border-top: 1px solid var(--border); background: var(--surface); }
.mobile-nav[data-open="true"] { display: block; }
.mobile-nav ul { list-style: none; padding: 0.5rem 1rem 1rem; margin: 0; }
.mobile-nav a { display: block; padding: 0.75rem 0.25rem; color: var(--ink); text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--border); }

/* Dropdown */
.has-menu { position: relative; }
.menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 260px; padding: 0.4rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); display: none; z-index: 60;
}
.has-menu[data-open="true"] .menu { display: block; }
.menu a { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.6rem; border-radius: var(--r-sm); font-size: 0.9rem; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.7rem 1.1rem; border-radius: var(--r); border: 1px solid transparent;
  font-weight: 600; font-size: 0.925rem; text-decoration: none; line-height: 1.2;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
  min-height: 44px;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--cta); color: var(--bg); }
.btn--primary:hover { background: var(--cta-hover); }
.btn--brand { background: var(--brand); color: #fff; }
.btn--brand:hover { filter: brightness(1.05); }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--border-strong); }
.btn--quiet { background: transparent; color: var(--ink-2); }
.btn--quiet:hover { background: var(--surface); }
.btn--sm { padding: 0.45rem 0.75rem; min-height: 36px; font-size: 0.85rem; }
.btn--block { width: 100%; }
.btn--tint { border: 0; font-weight: 600; }

/* ---- Cards ---- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.card--pad { padding: var(--sp-5); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow); padding: var(--sp-5); }
@media (min-width: 720px) { .panel { padding: var(--sp-6); } }

/* ---- Badges & pills ---- */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.55rem;
  border-radius: var(--r-pill); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.02em;
  text-transform: uppercase; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
}
.badge--ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge--warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge--stop { background: var(--stop-soft); color: var(--stop); border-color: transparent; }
.badge--brand { background: var(--brand-soft); color: var(--brand-ink); border-color: transparent; }

.pill {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.8rem;
  border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--border);
  font-size: 0.85rem; color: var(--ink-2); text-decoration: none; white-space: nowrap;
}
.pill:hover { border-color: var(--border-strong); color: var(--ink); }
.pill[aria-pressed="true"], .pill--active { background: var(--cta); color: var(--bg); border-color: var(--cta); }

/* ---- Category icon chip ---- */
.chip-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--r); flex: none;
}
.chip-icon svg { width: 19px; height: 19px; }
.t-blue   { background: var(--tint-blue);   color: var(--tint-blue-ink); }
.t-green  { background: var(--tint-green);  color: var(--tint-green-ink); }
.t-violet { background: var(--tint-violet); color: var(--tint-violet-ink); }
.t-amber  { background: var(--tint-amber);  color: var(--tint-amber-ink); }
.t-peach  { background: var(--tint-peach);  color: var(--tint-peach-ink); }
.t-teal   { background: var(--tint-teal);   color: var(--tint-teal-ink); }
.t-sky    { background: var(--tint-sky);    color: var(--tint-sky-ink); }
.t-pink   { background: var(--tint-pink);   color: var(--tint-pink-ink); }

/* ---- Forms ---- */
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field > label { font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.control {
  display: flex; align-items: center; gap: 0.55rem; width: 100%;
  padding: 0.6rem 0.75rem; min-height: 46px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  color: var(--ink);
}
.control:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.control select, .control input { border: 0; background: none; width: 100%; outline: none; font-size: 0.95rem; }
.control select { appearance: none; }
.control .caret { margin-inline-start: auto; color: var(--muted-2); flex: none; }
.control svg.lead { color: var(--muted-2); flex: none; width: 18px; height: 18px; }

.input {
  width: 100%; padding: 0.7rem 0.85rem; min-height: 46px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); color: var(--ink);
}
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }

/* ---- Progress ring & bar ---- */
.ring { --pct: 0; width: 56px; height: 56px; flex: none; display: grid; place-items: center; position: relative; }
.ring svg { transform: rotate(-90deg); width: 56px; height: 56px; }
.ring circle { fill: none; stroke-width: 5; stroke-linecap: round; }
.ring .track { stroke: var(--border); }
.ring .value { stroke: var(--ok); stroke-dasharray: 151; stroke-dashoffset: calc(151 - (151 * var(--pct)) / 100); transition: stroke-dashoffset 0.5s ease; }
.ring output { position: absolute; font-size: 0.75rem; font-weight: 700; }

.bar { height: 8px; border-radius: var(--r-pill); background: var(--border); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--ok); border-radius: inherit; transition: width 0.4s ease; }

/* ---- Comparison rows ---- */
.offer-list { display: flex; flex-direction: column; }
.offer {
  display: grid; gap: 0.6rem 1rem; padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--border);
  grid-template-columns: 44px 1fr auto;
  grid-template-areas: "logo name save" "logo meta meta" "cta cta cta";
  align-items: center;
}
.offer:last-child { border-bottom: 0; }
@media (min-width: 760px) {
  .offer {
    grid-template-columns: 52px minmax(150px, 1.4fr) minmax(160px, 1.5fr) auto auto auto;
    grid-template-areas: "logo name meta price cta save";
    gap: 1rem;
  }
}
.offer__logo { grid-area: logo; }
.offer__name { grid-area: name; min-width: 0; }
.offer__meta { grid-area: meta; min-width: 0; display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; color: var(--muted); font-size: 0.85rem; }
.offer__price { grid-area: price; font-weight: 700; white-space: nowrap; }
.offer__price small { font-weight: 500; color: var(--muted); font-size: 0.72rem; }
.offer__cta { grid-area: cta; }
.offer__save { grid-area: save; justify-self: end; }
.offer h3 { font-size: 1rem; letter-spacing: -0.01em; margin: 0; }
.offer h3 a { color: inherit; text-decoration: none; }

.logo-mark {
  width: 44px; height: 44px; border-radius: var(--r); display: grid; place-items: center;
  font-weight: 800; font-size: 0.85rem; color: #fff; letter-spacing: -0.03em; flex: none;
  overflow: hidden;
}
@media (min-width: 760px) { .logo-mark { width: 52px; height: 52px; } }

/* Brandmarks sit on white so logos with their own colour and logos with
   transparency both read correctly. */
.logo-mark--image { background: #fff; border: 1px solid var(--border); padding: 3px; }
.logo-mark--image img { width: 100%; height: 100%; object-fit: contain; }

.save-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--r-pill);
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
}
.save-btn:hover { color: var(--stop); border-color: var(--stop); }
.save-btn[aria-pressed="true"] { color: var(--stop); border-color: var(--stop); background: var(--stop-soft); }
.save-btn svg { width: 17px; height: 17px; }

/* ---- Stars ---- */
.stars { display: inline-flex; align-items: center; gap: 0.15rem; color: #f5a524; font-size: 0.8rem; }
.stars span { color: var(--muted); margin-inline-start: 0.3rem; }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 560px; }
table.data th, table.data td { padding: 0.75rem 0.9rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 700; background: var(--surface-2); position: sticky; top: 0; }
table.data tr:last-child td { border-bottom: 0; }

/* ---- Notices ---- */
.notice { display: flex; gap: 0.75rem; padding: var(--sp-4); border-radius: var(--r-lg); font-size: 0.9rem; }
.notice svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.notice--info { background: var(--info-soft); color: var(--ink-2); }
.notice--warn { background: var(--warn-soft); color: var(--ink-2); }
.notice--ok { background: var(--ok-soft); color: var(--ink-2); }
.notice--stop { background: var(--stop-soft); color: var(--ink-2); }
.notice strong { color: var(--ink); }

/* ---- Breadcrumbs ---- */
.crumbs { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; font-size: 0.8rem; color: var(--muted); padding: var(--sp-4) 0 0; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs svg { width: 12px; height: 12px; opacity: 0.5; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--border); margin-top: var(--sp-8); background: var(--surface); }
.site-footer .cols { display: grid; gap: var(--sp-5); padding: var(--sp-6) 0; grid-template-columns: 1fr; }
@media (min-width: 640px) { .site-footer .cols { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .site-footer .cols { grid-template-columns: 1.5fr repeat(3, 1fr); } }
.site-footer h2 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 0.75rem; }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: 0.45rem; }
.site-footer a { color: var(--ink-2); text-decoration: none; font-size: 0.9rem; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.site-footer .legal { border-top: 1px solid var(--border); padding: var(--sp-4) 0; display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: center; font-size: 0.8rem; color: var(--muted); }

/* ---- Cookie / consent ---- */
.consent {
  position: fixed; inset-inline: 0.75rem; bottom: 0.75rem; z-index: 200;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); padding: var(--sp-4); display: none;
  max-width: 620px; margin-inline: auto;
}
.consent[data-open="true"] { display: block; }
.consent .row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }

/* ---- Toast ---- */
.toast-host { position: fixed; inset-block-end: 1rem; inset-inline: 1rem; display: grid; gap: 0.5rem; z-index: 300; pointer-events: none; justify-items: center; }
.toast { background: var(--cta); color: var(--bg); padding: 0.65rem 1rem; border-radius: var(--r-pill); font-size: 0.875rem; box-shadow: var(--shadow-lg); }

/* ---- Modal / auth sheet ---- */
dialog.sheet {
  border: 0; border-radius: var(--r-xl); padding: 0; background: var(--surface); color: var(--ink);
  max-width: 420px; width: calc(100% - 2rem); box-shadow: var(--shadow-lg);
}
dialog.sheet::backdrop { background: rgba(16, 24, 43, 0.45); backdrop-filter: blur(2px); }
dialog.sheet .sheet__body { padding: var(--sp-6); }

/* ========================================================== layout ======= */

.section { padding-block: var(--sp-6); }
@media (min-width: 720px) { .section { padding-block: var(--sp-7); } }
.section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.75rem; margin-bottom: var(--sp-4); }
.section__head h2 { font-size: var(--step-2); }
.section__head a { font-size: 0.9rem; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 0.3rem; }

/* Grid items default to min-width:auto, which lets long content push a track
   wider than the viewport. Every grid in the system opts out. */
.grid > *, .with-aside > *, .essentials-grid > *, .facts > *, .props > *,
.checklist > *, .rail > *, .offer > * { min-width: 0; }

.grid { display: grid; gap: var(--sp-4); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Two-column article layout with sticky sidebar */
.with-aside { display: grid; gap: var(--sp-5); align-items: start; }
@media (min-width: 1000px) { .with-aside { grid-template-columns: minmax(0, 1fr) 320px; gap: var(--sp-6); } }
.aside-sticky { position: sticky; top: calc(var(--header-h) + 1rem); display: grid; gap: var(--sp-4); }

/* Horizontal scroller for cards on mobile */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 78%); gap: var(--sp-4); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 0.5rem; margin-inline: -1rem; padding-inline: 1rem; }
.rail > * { scroll-snap-align: start; }
@media (min-width: 720px) { .rail { grid-auto-columns: minmax(230px, 1fr); grid-auto-flow: column; margin-inline: 0; padding-inline: 0; overflow-x: auto; } }
@media (min-width: 1000px) { .rail { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; } }

/* ---------------------------------------------------------- hero -------- */
.hero { padding-block: var(--sp-6) var(--sp-5); }
@media (min-width: 900px) { .hero { padding-block: var(--sp-7) var(--sp-6); } }
.hero__grid { display: grid; gap: var(--sp-5); align-items: center; }
@media (min-width: 900px) { .hero__grid { grid-template-columns: 1.05fr 1fr; gap: var(--sp-7); } }
.hero h1 { font-size: var(--step-4); letter-spacing: -0.035em; }
.hero h1 .serif-accent { display: block; }
.hero__lede { font-size: var(--step-1); color: var(--muted); margin-top: var(--sp-4); max-width: 34ch; }
.hero__media { position: relative; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4 / 3.4; }
.hero__media > img, .hero__media > svg,
.hero__media > picture, .hero__media > picture > img { width: 100%; height: 100%; object-fit: cover; }

/* Trip search widget */
.trip-search { display: grid; gap: 0.75rem; }
@media (min-width: 560px) { .trip-search__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; } }
@media (min-width: 560px) { .trip-search__row--3 { grid-template-columns: 1.3fr 1fr auto; align-items: end; } }

.social-proof { display: flex; align-items: center; gap: 0.6rem; margin-top: var(--sp-4); font-size: 0.85rem; color: var(--muted); }
.avatars { display: flex; }
.avatars span { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--bg); margin-inline-start: -8px; display: grid; place-items: center; font-size: 0.62rem; font-weight: 700; color: #fff; }
.avatars span:first-child { margin-inline-start: 0; }

/* ------------------------------------------------- essentials grid ------ */
.essentials-grid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .essentials-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.essential-card { display: flex; flex-direction: column; gap: 0.7rem; padding: var(--sp-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); text-decoration: none; color: inherit; position: relative; }
.essential-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.essential-card__head { display: flex; align-items: center; gap: 0.6rem; }
.essential-card__head h3 { font-size: 0.95rem; letter-spacing: -0.01em; }
.essential-card__body { color: var(--muted); font-size: 0.85rem; flex: 1; display: grid; gap: 0.3rem; align-content: start; }
.essential-card__price { color: var(--ink); font-weight: 600; }
.essential-card__price b { color: var(--ok); }
.essential-card .status { position: absolute; top: 0.85rem; right: 0.85rem; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; }
.essential-card .status svg { width: 12px; height: 12px; }
.status--done { background: var(--ok); color: #fff; }
.status--todo { background: var(--warn); color: #fff; }
.check-list { list-style: none; padding: 0; display: grid; gap: 0.35rem; font-size: 0.85rem; }
.check-list li { display: flex; align-items: center; gap: 0.45rem; color: var(--ink-2); }
.check-list svg { width: 14px; height: 14px; color: var(--ok); flex: none; }

/* ------------------------------------------------- destination cards ---- */
.dest-card { position: relative; border-radius: var(--r-lg); overflow: hidden; text-decoration: none; color: #fff; display: block; aspect-ratio: 4 / 3; background: var(--surface-2); }
.dest-card__art { position: absolute; inset: 0; }
.dest-card__art > svg, .dest-card__art > img,
.dest-card__art > picture, .dest-card__art > picture > img { width: 100%; height: 100%; object-fit: cover; }
.dest-card__body { position: absolute; inset-inline: 0; bottom: 0; padding: 0.9rem; background: linear-gradient(to top, rgba(9,12,22,0.85), rgba(9,12,22,0)); }
.dest-card h3 { font-size: 1.05rem; display: flex; align-items: center; gap: 0.4rem; }
.dest-card p { font-size: 0.8rem; opacity: 0.85; }

/* Destination hero banner */
.dest-hero { position: relative; border-radius: var(--r-xl); overflow: hidden; color: #fff; min-height: 210px; display: flex; align-items: flex-end; }
.dest-hero__art { position: absolute; inset: 0; }
.dest-hero__art > svg, .dest-hero__art > img,
.dest-hero__art > picture, .dest-hero__art > picture > img { width: 100%; height: 100%; object-fit: cover; }
.dest-hero__body { position: relative; padding: var(--sp-5); background: linear-gradient(to top, rgba(9,12,22,0.86), rgba(9,12,22,0.15)); width: 100%; }
.dest-hero h1 { font-size: var(--step-3); display: flex; align-items: center; gap: 0.5rem; }
.dest-hero p { opacity: 0.9; max-width: 60ch; margin-top: 0.35rem; }

/* Quick facts strip */
.facts { display: grid; gap: 0.75rem; grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (min-width: 760px) { .facts { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.fact { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.85rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); }
.fact svg { width: 18px; height: 18px; color: var(--muted-2); flex: none; margin-top: 2px; }
.fact b { display: block; font-size: 0.9rem; letter-spacing: -0.01em; }
.fact span { font-size: 0.78rem; color: var(--muted); }

/* Tabs */
.tabs { display: flex; gap: 0.25rem; overflow-x: auto; border-bottom: 1px solid var(--border); margin-bottom: var(--sp-5); }
.tabs a, .tabs button { padding: 0.7rem 0.85rem; font-size: 0.9rem; font-weight: 600; color: var(--muted); text-decoration: none; border: 0; background: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a[aria-current="page"], .tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brand); }

/* ------------------------------------------------------- checklist ------ */
.checklist { display: grid; gap: var(--sp-5); }
@media (min-width: 760px) { .checklist { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.checklist__group h3 { font-size: 0.95rem; margin-bottom: 0.65rem; }
.checklist__items { list-style: none; padding: 0; display: grid; gap: 0.15rem; }
.check-item { display: flex; gap: 0.65rem; align-items: flex-start; padding: 0.55rem 0.4rem; border-radius: var(--r-sm); }
.check-item:hover { background: var(--surface-2); }
.check-item input[type="checkbox"] { width: 20px; height: 20px; flex: none; margin-top: 1px; accent-color: var(--ok); cursor: pointer; }
.check-item label { cursor: pointer; font-size: 0.9rem; }
.check-item small { display: block; color: var(--muted); font-size: 0.78rem; }
.check-item[data-done="true"] label { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--muted-2); }

/* ------------------------------------------------------------ prose ---- */
.prose { max-width: 68ch; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: var(--step-2); margin-top: 2em; }
.prose h3 { font-size: var(--step-1); margin-top: 1.6em; }
.prose ul, .prose ol { padding-inline-start: 1.3em; display: grid; gap: 0.4em; }
.prose li { padding-inline-start: 0.15em; }
.prose blockquote { border-inline-start: 3px solid var(--brand); padding-inline-start: 1rem; color: var(--ink-2); font-style: italic; }
.prose code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 0.1em 0.35em; font-family: var(--font-mono); font-size: 0.88em; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin-block: 2em; }
.prose img { border-radius: var(--r-lg); }
.prose em { color: var(--ink-2); }

.toc { font-size: 0.875rem; }
.toc ol { list-style: none; padding: 0; display: grid; gap: 0.45rem; counter-reset: toc; }
.toc a { color: var(--ink-2); text-decoration: none; display: block; }
.toc a:hover { color: var(--brand-ink); }

/* -------------------------------------------------------- FAQ ---------- */
.faq { display: grid; gap: 0.5rem; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.faq summary { padding: var(--sp-4); font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; font-size: 0.95rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.25rem; color: var(--muted); font-weight: 400; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 var(--sp-4) var(--sp-4); color: var(--ink-2); font-size: 0.925rem; }

/* --------------------------------------------------- value props ------- */
.props { display: grid; gap: var(--sp-4); grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (min-width: 900px) { .props { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.prop { display: flex; gap: 0.7rem; align-items: flex-start; }
.prop svg { width: 20px; height: 20px; color: var(--muted-2); flex: none; margin-top: 2px; }
.prop b { display: block; font-size: 0.9rem; }
.prop span { font-size: 0.82rem; color: var(--muted); }

/* --------------------------------------------------------- ad slots ---- */
.ad-slot { display: grid; place-items: center; min-height: 90px; border: 1px dashed var(--border-strong); border-radius: var(--r-lg); background: var(--surface-2); color: var(--muted-2); font-size: 0.78rem; text-align: center; padding: var(--sp-4); }
.ad-slot[data-filled="true"] { border-style: solid; border-color: var(--border); background: var(--surface); }
.ad-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); display: block; margin-bottom: 0.35rem; }
.sponsored { outline: 1px solid var(--brand-soft); background: color-mix(in srgb, var(--brand-soft) 45%, var(--surface)); }

/* ------------------------------------------------------------ auth ----- */
.sso-buttons { display: grid; gap: 0.6rem; }
.sso {
  display: flex; align-items: center; justify-content: center; gap: 0.65rem;
  padding: 0.75rem 1rem; min-height: 48px; width: 100%;
  border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--surface);
  font-weight: 600; font-size: 0.95rem; color: var(--ink); text-decoration: none;
}
.sso:hover { background: var(--surface-2); }
.sso svg { width: 19px; height: 19px; flex: none; }
.sso--apple { background: #000; color: #fff; border-color: #000; }
.sso--apple:hover { background: #1a1a1a; }
.divider { display: flex; align-items: center; gap: 0.75rem; color: var(--muted-2); font-size: 0.78rem; margin-block: var(--sp-4); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* -------------------------------------------------------- utilities --- */
[hidden] { display: none !important; }
.js-only { display: none; }
html.js .js-only { display: revert; }
html.js .no-js-only { display: none; }
.print-only { display: none; }

@media print {
  .site-header, .site-footer, .consent, .ad-slot, .btn, .save-btn { display: none !important; }
  body { background: #fff; }
  .card, .panel { break-inside: avoid; box-shadow: none; border-color: #ccc; }
  .print-only { display: revert; }
}

/* ============================================================ admin ===== */
/* The console shares the site's tokens but uses a denser, tool-like layout. */

.admin { display: grid; min-height: 100dvh; grid-template-columns: 1fr; }
@media (min-width: 900px) { .admin { grid-template-columns: 232px minmax(0, 1fr); } }

.admin__nav {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: var(--sp-4); display: flex; flex-wrap: wrap; gap: .35rem; align-items: center;
}
@media (min-width: 900px) {
  .admin__nav {
    border-bottom: 0; border-inline-end: 1px solid var(--border);
    flex-direction: column; align-items: stretch; gap: .15rem;
    position: sticky; top: 0; height: 100dvh; overflow-y: auto;
  }
}
.admin__brand { display: flex; align-items: center; gap: .45rem; font-weight: 700; letter-spacing: -.03em; color: var(--ink); text-decoration: none; margin-bottom: .35rem; }
.admin__brand small { display: block; font-size: .68rem; font-weight: 600; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.admin__nav a {
  display: flex; align-items: center; gap: .55rem; padding: .55rem .65rem;
  border-radius: var(--r-sm); color: var(--ink-2); text-decoration: none; font-size: .9rem; font-weight: 500;
}
.admin__nav a:hover { background: var(--surface-2); color: var(--ink); }
.admin__nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.admin__nav .spacer { flex: 1; }
.admin__who { font-size: .78rem; color: var(--muted); padding: .5rem .65rem; border-top: 1px solid var(--border); margin-top: .5rem; }

.admin__main { padding: var(--sp-5) var(--sp-4) var(--sp-8); min-width: 0; }
@media (min-width: 900px) { .admin__main { padding: var(--sp-6); } }
.admin__head { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-start; justify-content: space-between; margin-bottom: var(--sp-5); }
.admin__head h1 { font-size: var(--step-2); }
.admin__head p { color: var(--muted); font-size: .9rem; margin-top: .3rem; max-width: 62ch; }

.stat-row { display: grid; gap: var(--sp-4); grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: var(--sp-5); }
@media (min-width: 860px) { .stat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-4); }
.stat b { display: block; font-size: var(--step-2); letter-spacing: -.03em; }
.stat span { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

.admin-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; margin-bottom: var(--sp-5); }
.admin-card__head { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; padding: var(--sp-4); border-bottom: 1px solid var(--border); }
.admin-card__head h2 { font-size: 1rem; }
.admin-card__body { padding: var(--sp-4); }

.admin-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.admin-table th, .admin-table td { padding: .7rem .85rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.admin-table th { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); font-weight: 700; white-space: nowrap; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table td .row-actions { display: flex; gap: .35rem; flex-wrap: wrap; }
.admin-table code { font-size: .8em; background: var(--surface-2); padding: .1em .35em; border-radius: 4px; word-break: break-all; }

.form-grid { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
@media (min-width: 720px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { display: block; font-size: .78rem; font-weight: 600; color: var(--muted); margin-bottom: .3rem; }
.form-grid .hint { font-size: .76rem; color: var(--muted); margin-top: .3rem; }
.form-grid select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-inline-end: 2rem; }
textarea.input { min-height: 92px; resize: vertical; font-family: inherit; }

.admin-empty { padding: var(--sp-6); text-align: center; color: var(--muted); font-size: .9rem; }
.admin-msg { padding: .7rem .9rem; border-radius: var(--r); font-size: .875rem; margin-bottom: var(--sp-4); }
.admin-msg--ok { background: var(--ok-soft); color: var(--ink-2); }
.admin-msg--err { background: var(--stop-soft); color: var(--ink-2); }

.status-dot { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; }
.status-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); }
.status-dot[data-status="active"]::before { background: var(--ok); }
.status-dot[data-status="paused"]::before { background: var(--warn); }

.gate { max-width: 460px; margin: 12vh auto; text-align: center; }
.spark { display: flex; align-items: flex-end; gap: 2px; height: 42px; margin-top: .6rem; }
.spark i { flex: 1; background: var(--brand); border-radius: 2px 2px 0 0; min-height: 2px; opacity: .8; }

/* ============================================================== FX ====== */
/* One series, so the ink budget is: a 2px line, a 10% wash, hairline grid. */

.fx { position: relative; }
.fx[data-loading="true"] { opacity: 0.6; }

.fx__head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; justify-content: space-between; }
.fx__rate { font-size: var(--step-3); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.fx__rate small { font-size: 0.5em; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.fx__asof { font-size: 0.78rem; color: var(--muted); margin-top: 0.2rem; }

.fx__ranges { display: flex; gap: 0.35rem; }
.fx__ranges .pill { padding: 0.3rem 0.7rem; font-size: 0.8rem; }

.fx__verdict { display: flex; gap: 0.65rem; align-items: flex-start; padding: 0.8rem 0.9rem; border-radius: var(--r); margin-top: var(--sp-4); font-size: 0.875rem; }
.fx__verdict b { display: block; }
.fx__verdict span { color: var(--ink-2); }
.fx__verdict svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.fx__verdict[data-level="good"] { background: var(--ok-soft); }
.fx__verdict[data-level="good"] svg { color: var(--ok); }
.fx__verdict[data-level="ok"], .fx__verdict[data-level="neutral"] { background: var(--info-soft); }
.fx__verdict[data-level="ok"] svg, .fx__verdict[data-level="neutral"] svg { color: var(--info); }
.fx__verdict[data-level="watch"] { background: var(--warn-soft); }
.fx__verdict[data-level="watch"] svg { color: var(--warn); }

.fx__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin-top: var(--sp-4); }
.fx__stats span { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.fx__stats b { font-size: 0.95rem; }

.fx__chart { position: relative; margin-top: var(--sp-4); }
.fx-chart { width: 100%; height: auto; display: block; overflow: visible; touch-action: pan-y; }

.fx-line { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.fx-end { fill: var(--brand); stroke: var(--surface); stroke-width: 2; }
.fx-grid { stroke: var(--border); stroke-width: 1; }
.fx-avg { stroke: var(--muted-2); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0.65; }
.fx-tick, .fx-axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.fx-avg-label { fill: var(--muted-2); font-size: 10px; font-family: var(--font); letter-spacing: 0.02em; }
.fx-axis--end { text-anchor: end; }
.fx-cross { stroke: var(--border-strong); stroke-width: 1; }
.fx-dot { fill: var(--brand); stroke: var(--surface); stroke-width: 2; }

.fx-tip {
  position: absolute; top: 2px; transform: translateX(-50%);
  background: var(--cta); color: var(--bg); padding: 0.3rem 0.55rem; border-radius: var(--r-sm);
  font-size: 0.78rem; white-space: nowrap; pointer-events: none; box-shadow: var(--shadow);
}
.fx-tip b { font-weight: 700; }
.fx-tip span { opacity: 0.75; margin-inline-start: 0.4rem; }

.fx__disclaimer { font-size: 0.78rem; color: var(--muted); margin-top: var(--sp-4); }
.fx__table { margin-top: var(--sp-4); }
.fx__table table { font-size: 0.85rem; }
.fx__table summary { cursor: pointer; font-size: 0.85rem; color: var(--ink-2); }

/* ========================================================== account ===== */
/* Same tokens as the rest of the site: white cards, soft border, one accent. */

.account-gate { max-width: 460px; margin-inline: auto; }

.account { display: grid; gap: var(--sp-5); align-items: start; }
@media (min-width: 900px) { .account { grid-template-columns: 280px minmax(0, 1fr); gap: var(--sp-6); } }

/* ---- sidebar ---- */
.account__side { display: grid; gap: var(--sp-4); }
@media (min-width: 900px) { .account__side { position: sticky; top: calc(var(--header-h) + 1rem); } }

.account__identity { text-align: center; padding: var(--sp-5) var(--sp-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); }
.avatar {
  display: grid; place-items: center; width: 76px; height: 76px; margin-inline: auto;
  border-radius: 50%; background: var(--brand); color: #fff;
  font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em;
}
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.account__greeting { font-size: var(--step-2); font-weight: 700; line-height: 1.2; margin-top: var(--sp-4); }
.account__email { font-size: 0.82rem; color: var(--muted); margin-top: 0.2rem; word-break: break-all; }

.account__nav { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); overflow: hidden; }
.account__nav-item {
  display: flex; align-items: center; gap: 0.7rem; padding: 0.85rem 1rem;
  color: var(--ink-2); text-decoration: none; font-size: 0.925rem; font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.account__nav-item:last-child { border-bottom: 0; }
.account__nav-item:hover { background: var(--surface-2); color: var(--ink); }
.account__nav-item[aria-current="true"] { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.account__nav-item span { flex: 1; }
.account__nav-item svg:last-child { color: var(--muted-2); width: 15px; height: 15px; }

/* ---- cards ---- */
.account__main { display: grid; gap: var(--sp-5); min-width: 0; }
.account-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); overflow: hidden; }
.account-card__head { padding: var(--sp-4) var(--sp-5); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.account-card__head h2 { font-size: 0.95rem; letter-spacing: -0.01em; }
.account-card__body { padding: var(--sp-5); }
.account-card__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: var(--sp-5); }

.field-grid { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
@media (min-width: 620px) { .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.field-grid .full { grid-column: 1 / -1; }
.field__optional { font-weight: 500; color: var(--muted-2); text-transform: none; letter-spacing: 0; }
.field__hint { font-size: 0.78rem; color: var(--muted); margin-top: 0.35rem; }
.input:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }

/* ---- preference switches ---- */
.switch-row { display: flex; gap: 0.8rem; align-items: flex-start; padding: 0.85rem 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.switch-row:last-of-type { border-bottom: 0; }
.switch-row input { width: 20px; height: 20px; flex: none; margin-top: 2px; accent-color: var(--brand); cursor: pointer; }
.switch-row b { display: block; font-size: 0.925rem; font-weight: 600; }
.switch-row small { display: block; font-size: 0.82rem; color: var(--muted); margin-top: 0.15rem; }

.sso--facebook { background: #1877F2; color: #fff; border-color: #1877F2; }
.sso--facebook:hover { background: #166fe0; }
.sso--facebook svg { fill: #fff; }
