:root {
  color-scheme: light dark;
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f3f1ec;
  --text: #1c1f23;
  --muted: #5d6570;
  --line: #e3e0d8;
  --brand: #0f766e;
  --brand-ink: #ffffff;
  --brand-soft: #e6f4f1;
  --accent: #c2410c;
  --warn-bg: #fff7e6;
  --warn-line: #f3d18b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px rgba(16, 24, 40, .06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111416;
    --surface: #181c1f;
    --surface-2: #1f2427;
    --text: #e8eaec;
    --muted: #9aa3ab;
    --line: #2c3338;
    --brand: #2dd4bf;
    --brand-ink: #062522;
    --brand-soft: #123330;
    --accent: #fb923c;
    --warn-bg: #2a2212;
    --warn-line: #5c4819;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); }
img, svg { max-width: 100%; }
a { color: var(--brand); text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); margin: .2em 0 .4em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 1.8em 0 .5em; }
h3 { font-size: 1.15rem; margin: 1.4em 0 .4em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 30; }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.1rem; color: var(--brand); text-decoration: none; }
.brand span { color: var(--text); }
.nav-links { display: flex; gap: 22px; }
.nav-links a { color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--brand); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; color: var(--text); font: inherit; }
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 60px; flex-direction: column; gap: 0; background: var(--surface); border-bottom: 1px solid var(--line); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 16px; border-top: 1px solid var(--line); }
}

/* Hero */
.hero { padding: 64px 0 40px; }
.hero .eyebrow { display: inline-block; background: var(--brand-soft); color: var(--brand); font-weight: 600; font-size: .85rem; padding: 4px 12px; border-radius: 99px; }
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 640px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 10px; border: 1px solid transparent; font: 600 1rem var(--font); cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 8px 14px; font-size: .9rem; }
.btn-link { background: none; border: 0; color: var(--brand); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }

/* Cards / grid */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.card .icon { width: 44px; height: 44px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 12px; }
a.card { color: inherit; text-decoration: none; transition: transform .15s ease, border-color .15s ease; }
a.card:hover { transform: translateY(-2px); border-color: var(--brand); }
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-weight: 700; margin-bottom: 8px; }
.compare { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.compare th, .compare td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare th { background: var(--surface-2); font-weight: 600; }
.table-scroll { overflow-x: auto; }

/* Notices */
.notice { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 10px; padding: 14px 16px; margin: 16px 0; }
.notice strong { display: block; margin-bottom: 2px; }
.tip { background: var(--brand-soft); border-radius: 10px; padding: 14px 16px; margin: 16px 0; }

/* FAQ */
details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: 8px; }

/* Forms */
.tool { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; padding: 32px 0 48px; }
@media (max-width: 960px) { .tool { grid-template-columns: 1fr; } }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 0 0 18px; background: var(--surface); }
legend { font-weight: 600; padding: 0 6px; }
label { display: block; font-size: .88rem; font-weight: 500; margin-bottom: 4px; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
textarea { min-height: 90px; resize: vertical; }
.row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 12px; }
.repeat { border: 1px dashed var(--line); border-radius: 10px; padding: 14px; margin-bottom: 12px; position: relative; }
.repeat .remove { position: absolute; top: 8px; right: 10px; font-size: .85rem; }
.repeat-title { font-weight: 600; font-size: .9rem; margin: 0 0 10px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.sticky { position: sticky; top: 80px; }

/* Checklist */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.checklist input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--brand); }
.checklist label { font-size: 1rem; font-weight: 400; margin: 0; cursor: pointer; }
.checklist .note { display: block; color: var(--muted); font-size: .88rem; }
.progress { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin: 8px 0 16px; }
.progress > div { height: 100%; background: var(--brand); width: 0; transition: width .2s; }

/* Document preview (itinerary / letter) */
.paper { background: #fff; color: #1c1f23; border: 1px solid var(--line); border-radius: 6px; padding: 36px 40px; box-shadow: var(--shadow); font-size: 14px; line-height: 1.5; }
.paper h2 { font-family: var(--font); font-size: 20px; margin: 0; letter-spacing: 0; }
.paper .doc-kicker { font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: 11px; color: #0f766e; margin-bottom: 6px; }
.paper .doc-head { display: flex; justify-content: space-between; gap: 16px; border-bottom: 2px solid #0f766e; padding-bottom: 12px; margin-bottom: 16px; }
.paper .doc-section { font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: .06em; color: #0f766e; margin: 18px 0 8px; }
.paper table { width: 100%; border-collapse: collapse; }
.paper th, .paper td { text-align: left; padding: 7px 8px; border-bottom: 1px solid #e3e0d8; vertical-align: top; }
.paper th { font-size: 11px; text-transform: uppercase; color: #5d6570; font-weight: 600; }
.paper .doc-foot { margin-top: 22px; font-size: 11px; color: #5d6570; border-top: 1px solid #e3e0d8; padding-top: 10px; }
.paper .empty { color: #9aa3ab; font-style: italic; }
.letter { white-space: pre-wrap; font-family: Georgia, "Times New Roman", serif; font-size: 15px; }
@media (max-width: 560px) { .paper { padding: 22px 18px; } .paper table { font-size: 12px; } }

/* Articles */
.article { padding: 40px 0 56px; }
.article p, .article li { font-size: 1.05rem; }
.article .meta { color: var(--muted); font-size: .9rem; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; }

/* Ads */
.ad { margin: 28px auto; min-height: 90px; text-align: center; }
.ad-placeholder { display: grid; place-items: center; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: .8rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 48px; padding: 40px 0 16px; }
.footer-grid { display: grid; gap: 24px; grid-template-columns: 2fr 1fr 1fr 1fr; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
.footer-grid a { display: block; color: var(--muted); text-decoration: none; font-size: .92rem; padding: 3px 0; }
.footer-grid a:hover { color: var(--brand); }
.brand-foot { font-family: var(--display); font-size: 1.3rem; font-weight: 700; margin: 0 0 6px; }
.foot-h { font-weight: 600; margin: 0 0 6px; }
.legal { font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: 24px; padding-top: 12px; }

/* Print: only the document preview */
@media print {
  body { background: #fff; }
  .no-print, .site-header, .site-footer, .ad, .skip { display: none !important; }
  main:has(.tool) > *:not(.tool), .tool > :not(.print-area) { display: none !important; }
  .tool { display: block; padding: 0; }
  .print-area .sticky { position: static; }
  /* The document sits inside .sticky; hide its siblings (label, ad), not the wrapper itself. */
  .print-area .sticky > :not(.paper) { display: none !important; }
  .paper { border: 0; box-shadow: none; padding: 0; }
  @page { margin: 16mm; }
}

/* Flight finder */
.finder { background: var(--brand-soft); border-radius: 12px; padding: 16px; }
.finder-h { font-weight: 600; margin: 0 0 10px; }
.finder-status { font-size: .9rem; margin: 10px 0 0; min-height: 1.2em; }
.finder-status.err { color: var(--accent); }
.f-group { margin-top: 14px; }
.f-group h4 { margin: 0 0 6px; font-size: .95rem; }
.f-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.f-opt { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: .9rem; }
.f-opt.picked { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.f-opt .f-main { font-weight: 600; }
.f-opt .f-sub { color: var(--muted); font-size: .82rem; }
.f-opt .f-act { grid-row: span 2; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.f-opt .f-act a { font-size: .8rem; }

/* Trip-type toggle + airport autocomplete */
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 3px; margin-bottom: 12px; }
.seg label { margin: 0; padding: 5px 14px; border-radius: 99px; cursor: pointer; font-size: .88rem; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label:has(input:checked) { background: var(--brand); color: var(--brand-ink); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.ac { position: relative; }
.ac-list { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.18); max-height: 300px; overflow-y: auto; }
.ac-list li { display: flex; gap: 10px; align-items: baseline; padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: .92rem; }
.ac-list li[aria-selected="true"], .ac-list li:hover { background: var(--brand-soft); }
.ac-list .ac-code { font-weight: 700; min-width: 36px; color: var(--brand); }
.ac-list .ac-sub { color: var(--muted); font-size: .8rem; display: block; }
.ac-list .ac-empty { color: var(--muted); cursor: default; }
.ac-list li.ac-child { padding-left: 26px; }

/* Date inputs: whole field is clickable (opens the calendar), icon clearly visible */
input[type="date"] { cursor: pointer; min-height: 44px; }
input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .85; padding: 4px; border-radius: 6px; }
input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; background: var(--brand-soft); }

/* From/To swap button, centred between the two fields */
.route-row { position: relative; }
.swap { position: absolute; left: 50%; top: 29px; transform: translateX(-50%); z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--brand); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); transition: transform .2s ease; }
.swap:hover { border-color: var(--brand); }
.swap.spun { transform: translateX(-50%) rotate(180deg); }
.swap:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 400px) { .route-row { grid-template-columns: 1fr 1fr; } }

/* Hotel links */
.hotel-cta { margin: 10px 0 0; font-size: .88rem; }
.hotel-cta .muted { display: block; font-size: .8rem; margin-top: 2px; }
.f-group + .hotel-cta, #f-results > .hotel-cta { margin-top: 14px; }

/* ---- Itinerary document (preview + PDF) ----
   Classic travel-itinerary email layout: plain white page, blue headings, hairline rules,
   small grey labels, bold times and codes. Hex colours on purpose: html2canvas can't parse oklch(). */
.paper.exp {
  --ink: #1b1f24; --ink-2: #4b5563; --ink-3: #6b7280; --line: #d6d9de; --line-2: #eceef1; --band: #f4f6f8;
  --blue: #1f4f8f; --ok: #1d6b47; --ok-bg: #e8f4ee; --held: #8a5a0a; --held-bg: #fdf4e2;
  background: #ffffff; color: var(--ink); font: 13px/1.45 "Public Sans", Arial, sans-serif; padding: 32px 36px;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.exp h2, .exp h3, .exp p, .exp dl, .exp dd, .exp ul { margin: 0; padding: 0; }
.exp .ex-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.exp h2 { font-family: "Public Sans", Arial, sans-serif; font-size: 26px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.exp .ex-range { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }
.exp .ex-doc { text-align: right; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.exp .ex-doc span { display: block; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }

.exp .ex-trip { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; background: var(--band); padding: 10px 12px; margin-top: 14px; }
.exp .ex-tripline { font-size: 15px; font-weight: 700; color: var(--blue); }
.exp .ex-tripmeta { font-size: 12.5px; color: var(--ink-2); align-self: center; }
.exp .ex-arrow { color: var(--ink-3); font-weight: 400; }

.exp .ex-block { margin-top: 18px; }
.exp h3 { font-family: "Public Sans", Arial, sans-serif; font-size: 14px; font-weight: 700; color: var(--blue); padding-bottom: 6px; border-bottom: 2px solid var(--blue); margin-bottom: 8px; }
.exp .ex-travs { list-style: none; }
.exp .ex-travs li { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid var(--line-2); }
.exp .ex-travs li span { color: var(--ink-3); font-size: 12px; }
.exp .ex-facts { display: flex; flex-wrap: wrap; gap: 4px 28px; margin-top: 8px; }
.exp .ex-facts dt { font-size: 11px; color: var(--ink-3); }
.exp .ex-facts dd { font-weight: 600; }

.exp .ex-journey { margin-bottom: 14px; break-inside: avoid; page-break-inside: avoid; }
.exp .ex-jhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 7px 0 6px; border-bottom: 1px solid var(--line); }
.exp .ex-jdate { font-weight: 700; font-size: 14px; }
.exp .ex-jtitle { font-weight: 700; font-size: 14px; }
.exp .ex-jstops { font-size: 12.5px; color: var(--ink-2); }
.exp .ex-jtotal { margin-left: auto; font-size: 12.5px; color: var(--ink-2); }

.exp .ex-seg { padding: 10px 0 10px 12px; border-bottom: 1px solid var(--line-2); break-inside: avoid; page-break-inside: avoid; }
.exp .ex-seghead { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.exp .ex-dur { color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.exp .ex-segbody { display: grid; grid-template-columns: 1fr minmax(150px, 42%); gap: 12px; }
.exp .ex-ends { display: grid; gap: 3px; }
.exp .ex-end { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.exp .ex-code { font-weight: 700; font-size: 14px; width: 36px; }
.exp .ex-time { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; min-width: 62px; }
.exp .ex-plus { font-size: 11.5px; font-weight: 700; color: #b3441b; }
.exp .ex-term { font-size: 12px; color: var(--ink-3); }
.exp .ex-arrives { font-size: 12px; color: var(--ink-2); margin-left: 46px; }
.exp .ex-carrier { text-align: right; font-size: 12.5px; }
.exp .ex-airline { font-weight: 600; }
.exp .ex-airline span { font-weight: 700; }
.exp .ex-cabin { color: var(--ink-2); }
.exp .ex-status { display: inline-block; margin-top: 5px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: 2px; }
.exp .is-plan { color: var(--ink-2); background: var(--line-2); }
.exp .is-held { color: var(--held); background: var(--held-bg); }
.exp .is-booked { color: var(--ok); background: var(--ok-bg); }
.exp .ex-lay { padding: 5px 0 5px 12px; font-size: 12.5px; color: var(--ink-2); background: var(--band); }
.exp .ex-lay strong { color: var(--ink); }

.exp .ex-stay { padding: 8px 0 10px; border-bottom: 1px solid var(--line-2); break-inside: avoid; page-break-inside: avoid; }
.exp .ex-stayhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13.5px; }
.exp .ex-stayhead .ex-status { margin-top: 0; }
.exp .ex-stayaddr { color: var(--ink-2); font-size: 12.5px; margin: 1px 0 6px; }
.exp .ex-staydates { display: flex; flex-wrap: wrap; gap: 4px 28px; font-weight: 600; }
.exp .ex-staydates em { display: block; font-style: normal; font-weight: 400; font-size: 11px; color: var(--ink-3); }

.exp .ex-plan { width: 100%; border-collapse: collapse; }
.exp .ex-plan td { padding: 6px 10px 6px 0; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.exp .ex-plan tr { break-inside: avoid; page-break-inside: avoid; }
.exp .ex-pdate { white-space: nowrap; font-weight: 700; width: 1%; }
.exp .ex-pcity { white-space: nowrap; color: var(--blue); font-weight: 600; width: 1%; }
.exp .ex-notes { white-space: pre-wrap; color: var(--ink-2); }
.exp .ex-empty { color: var(--ink-3); font-style: italic; }

@media (max-width: 560px) {
  .paper.exp { padding: 20px 16px; }
  .exp .ex-top { flex-direction: column; align-items: flex-start; }
  .exp .ex-doc { text-align: left; }
  .exp .ex-segbody { grid-template-columns: 1fr; }
  .exp .ex-carrier { text-align: left; }
  .exp .ex-jtotal { margin-left: 0; }
}

/* "Include in itinerary" chooser */
.include { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.include label { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .95rem; font-weight: 500; cursor: pointer; }
.include input { width: 18px; height: 18px; accent-color: var(--brand); }
fieldset[hidden] { display: none; }
