/* ============================================================================
   site.css — halfway.travel · "Paper Route" design system (v2)
   Warm travel-print aesthetic: paper cream ground, serif display type,
   terracotta accents, hairline rules, ticket-stub motifs.
   System fonts only (Rulebook D2). No images. Flat color, no decorative
   gradients — the only gradients are perforation/dashed-line motifs.
   Mobile-first. Same class names as v1 — pure re-skin.
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  --paper: #F7F3EA;      /* page background — warm cream */
  --paper-2: #EFE8D8;    /* soft alt background, wells, table hovers */
  --card: #FFFDF7;       /* card surface — brighter than paper */
  --ink: #221C14;        /* warm near-black text */
  --ink-soft: #6E6353;   /* secondary text, eyebrows */
  --line: #DCD2BE;       /* hairline borders */
  --terra: #BC4B18;      /* PRIMARY accent: links, CTAs, dots */
  --terra-deep: #963A10; /* CTA hover */
  --olive: #55663F;      /* secondary accent: town dots, badges */
  --olive-soft: #E9EADD; /* olive tint bg */
  --gold: #8A6D1F;       /* estimate badges/warnings (dark for contrast) */
  --gold-soft: #F3ECD7;
  --gold-line: #D8C48A;  /* estimate chip border */
  --gold-deep: #755C17;  /* text ink on gold-soft — keeps chips ≥ 4.5:1 */
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --maxw: 1060px;
  /* legacy v1 variable names, remapped so any stray reference still resolves */
  --bg: var(--paper);
  --soft: var(--paper-2);
  --muted: var(--ink-soft);
  --accent: var(--terra);
  --accent-2: var(--olive);
  --cta: var(--terra);
  --warn: var(--gold);
  --bad: #A03030;
  --rad: 14px;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
[hidden] { display: none !important; }

body {
  margin: 0;
  font: 17px/1.65 var(--sans);
  color: var(--ink);
  background: var(--paper);
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }

::selection { background: var(--olive-soft); color: var(--ink); }

:focus-visible { outline: 2px solid var(--terra); outline-offset: 2px; }

a { color: var(--terra); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--terra-deep); }

h1, h2, h3, h4 { text-wrap: balance; }
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
}
h1 {
  font-size: clamp(2.1rem, 5vw, 3.3rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 0.15em 0 0.25em;
}
h1 i { font-style: italic; color: var(--terra); } /* italic accent word */
h2 { font-size: 1.55rem; line-height: 1.18; letter-spacing: -0.01em; margin: 1.9em 0 0.55em; }
h3 { font-size: 1.12rem; line-height: 1.25; letter-spacing: -0.005em; margin: 1.35em 0 0.35em; }
p { margin: 0.6em 0; }
ul, ol { padding-left: 1.3em; }

input[type="radio"], input[type="checkbox"] { accent-color: var(--terra); }

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 8px; top: 8px;
  background: var(--ink); color: var(--paper);
  padding: 9px 16px; z-index: 99; border-radius: 8px;
  text-decoration: none;
}

/* ---------- utilities (new in v2) ---------- */
.eyebrow {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
  margin: 0 0 0.4em;
}
.eyebrow b { color: var(--terra); font-weight: 700; margin-right: 0.45em; }

.stat-big {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

/* Slim decorative route rule between sections: dashed line, end dots,
   central diamond. Pure CSS motif (agents place it; harmless if absent). */
.route-divider {
  height: 34px;
  margin: 1.4rem 0 2.1rem;
  background:
    radial-gradient(circle 3px at 4px 50%, var(--olive) 97%, transparent) no-repeat,
    radial-gradient(circle 3px at calc(100% - 4px) 50%, var(--terra) 97%, transparent) no-repeat;
  position: relative;
}
.route-divider::before {
  content: "";
  position: absolute; left: 14px; right: 14px; top: 50%;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--line) 0 7px, transparent 7px 14px);
}
.route-divider::after {
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: 7px; height: 7px;
  background: var(--terra);
  transform: translate(-50%, -50%) rotate(45deg);
}

/* Reveal motion — gated behind html.js so no-JS visitors see everything.
   A tiny script adds .in via IntersectionObserver. */
html.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
html.js .reveal.in { opacity: 1; transform: none; }

/* ---------- header / nav ---------- */
.site-head {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.site-head .wrap {
  display: flex; align-items: center; gap: 14px 22px; flex-wrap: wrap;
  padding-top: 12px; padding-bottom: 12px;
}
.logo {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
  padding: 3px 0;
}
/* the <b> in the wordmark "halfway<b>.</b>travel" is the terra terminal dot */
.logo b { color: var(--terra); font-weight: 600; }
.site-head nav { display: flex; gap: 4px 16px; flex-wrap: wrap; font-size: 0.9rem; }
.site-head nav a {
  position: relative;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 3px 0;
  transition: color 0.25s ease;
}
.site-head nav a::after {
  content: "";
  position: absolute; left: 0; bottom: -1px;
  width: 100%; height: 2px;
  background: var(--terra);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.site-head nav a:hover { color: var(--terra); }
.site-head nav a:hover::after { transform: scaleX(1); }
.site-head nav a[aria-current] { color: var(--terra); font-weight: 650; }
.site-head nav a[aria-current]::after { transform: scaleX(1); }

/* ---------- breadcrumbs ---------- */
.crumbs {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-soft);
  padding-top: 14px;
}
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; }
.crumbs li + li::before { content: "›"; margin: 0 7px; color: var(--line); }
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--terra); text-decoration: underline; }

/* ---------- H1 block + chips ---------- */
.h1block { padding: 2.4rem 0 0.6rem; }
.subtitle {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.45;
  color: var(--ink-soft);
  margin: 0.35em 0 0.9em;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.chip {
  display: inline-block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink);
}
.chip b { font-weight: 800; }
.chip-est {
  background: var(--gold-soft);
  border-color: var(--gold-line);
  color: var(--gold-deep);
  font-weight: 600;
}

/* ---------- blocks + cards ---------- */
.blk { margin: 2.6rem 0; }
.cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 16px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
}
.card h3 { margin-top: 0; }
.card .meta { color: var(--ink-soft); font-size: 0.9rem; }
@media (hover: hover) {
  .card {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  }
  .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(60, 48, 25, 0.08);
    border-color: #C7B99D;
  }
}

.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--olive-soft);
  color: var(--olive);
  border: 1px solid rgba(85, 102, 63, 0.3);
  border-radius: 999px;
  padding: 2px 9px;
  margin-left: 7px;
  vertical-align: 2px;
}
.badge.alt {
  background: var(--gold-soft);
  color: var(--gold-deep);
  border-color: var(--gold-line);
}

/* Ticket-stub variant: punched side notches + dashed inner divider.
   Notches are punched INTO the card via radial-gradients (page-colored
   half-circles on the card edges) so nothing floats into the grid gap. */
.card.ticket {
  position: relative;
  margin: 14px 0;
  padding: 20px 20px 20px calc(56px + 22px);
  background-image:
    radial-gradient(circle 9px at 0 55%, var(--paper) 97%, transparent 100%),
    radial-gradient(circle 9px at 100% 55%, var(--paper) 97%, transparent 100%),
    repeating-linear-gradient(180deg, var(--line) 0 6px, transparent 6px 12px);
  background-repeat: no-repeat;
  background-position: left center, right center, 56px 10px;
  background-size: 51% 100%, 51% 100%, 1px calc(100% - 20px);
}

/* ---------- meeting-town cards (pair guides) ---------- */
/* Lead town is a full-width feature card (copy + embedded Kayak widget
   side by side) so the widget always gets its ~300px minimum. Runners-up
   are compact comparison cards with a deep-link CTA — no nested widget. */
/* ---------- meeting-town card: folder tabs + 2-column body ---------- */
/* ONE card: town tabs (folder style, centered) swap the whole card content;
   mode tabs (Hotels/Cars/Flights, centered above the widget) swap the search.
   Body is a balanced 2-column layout on desktop, stacked on mobile. */
.town-card-wrap { margin-top: 18px; }
.card.town {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.card.town .town-heading { margin: 0; }
.card.town .meta { margin: 4px 0 0; }
.town-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  margin: 16px 0 4px;
}
.town-stats > div {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
}
.town-stats dt {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}
.town-stats dd {
  margin: 2px 0 0;
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--ink);
}
.town-story { margin: 14px 0 0; }
.card.town .kyk-cta { margin-top: auto; align-self: flex-start; }
.badge--lead {
  background: var(--terra);
  color: #FFFDF7;
  border-color: var(--terra-deep);
}

/* Folder-style town tabs: centered, active tab merges into the card body */
.town-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px 0;
}
.town-tab {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 20px 12px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: var(--paper-2);
  color: var(--ink-soft);
  cursor: pointer;
  position: relative;
  top: 1px;
  margin-bottom: -1px;
}
.town-tab:hover { color: var(--terra-deep); }
.town-tab.is-active {
  background: var(--card);
  border-color: var(--line);
  color: var(--terra-deep);
  box-shadow: 0 2px 0 0 var(--card);
}

/* Body: balanced 2 columns on desktop — info left, search panel right */
.town-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--line);
  padding: 22px 24px 24px;
}
.card.town .town-copy { text-align: left; }
@media (min-width: 900px) {
  .card.town--lead .town-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 10px 30px;
    align-items: start;
  }
  .card.town--lead .town-widget {
    border-left: 1px dashed var(--line);
    padding: 8px 4px 8px 30px;
    align-self: center;
  }
}

/* Mode tabs (Hotels / Cars / Flights) — centered above the widget */
.town-tabs--modes {
  justify-content: center;
  padding: 0;
  margin: 0 0 14px;
}
.mode-tab {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink-soft);
  cursor: pointer;
}
.mode-tab:hover { color: var(--terra-deep); border-color: var(--terra); }
.mode-tab.is-active {
  background: var(--terra);
  border-color: var(--terra-deep);
  color: #FFFDF7;
}
.town-tab:focus-visible,
.mode-tab:focus-visible {
  outline: 2px solid var(--terra);
  outline-offset: 2px;
  border-radius: 6px;
}
.town-widget .kyk-slot { margin: 0; }
.town-widget .kyk-sbx-host { min-height: 380px; }
/* While a tab swap remounts the widget, the empty host says so. */
.town-widget .kyk-sbx-host:empty::after {
  content: "Loading search…";
  display: block;
  padding: 40px 0;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
@media (max-width: 480px) {
  /* full-bleed the widget inside the card so it keeps ≥300px on small phones */
  .card.town .town-widget { margin: 12px -16px 0; }
}
@media print {
  .town-widget, .town-tabs { display: none; }
  .card.town--lead .town-body { grid-template-columns: 1fr; }
}

/* ---------- tables ---------- */
.tblwrap { overflow-x: auto; margin: 16px 0; }
table.tbl { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.tbl th, .tbl td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.tbl thead th {
  border-top: 1px solid var(--ink);
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}
.tbl tbody tr:hover td { background: var(--paper-2); }
.tbl td.num {
  text-align: right;
  font-family: var(--serif);
  font-variant-numeric: tabular-nums;
}
.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- CTAs (Kayak) ---------- */
.kyk-cta {
  display: inline-block;
  background: var(--terra);
  color: #fff !important;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-decoration: none !important;
  border-radius: 999px;
  padding: 12px 26px;
  font-size: 1rem;
  margin: 8px 0 2px;
  transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.kyk-cta:hover {
  background: var(--terra-deep);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(150, 58, 16, 0.25);
}
.kyk-cta:focus-visible { outline-color: var(--ink); }
.kyk-cta.small,
.kyk-cta.kyk-small {
  background: transparent;
  color: var(--terra) !important;
  border: 1.5px solid var(--terra);
  padding: 7px 16px;
  font-size: 0.85rem;
}
.kyk-cta.small:hover,
.kyk-cta.kyk-small:hover {
  background: var(--terra);
  color: #fff !important;
  box-shadow: none;
}
.kyk-cta-wrap {
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 14px 20px;
  margin: 18px 0;
}
.kyk-disc { font-size: 0.74rem; color: var(--ink-soft); margin: 6px 0 0; }
a.kyk-cta + .kyk-disc { margin-top: 8px; }

/* ---------- FAQ ---------- */
.faq details {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 10px 0;
  background: var(--card);
}
.faq summary {
  position: relative;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 13px 46px 13px 16px;
  list-style: none;
  transition: background-color 0.25s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 15px; top: 50%;
  width: 12px; height: 12px;
  transform: translateY(-50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4 2.5 8.5 6 4 9.5' fill='none' stroke='%23BC4B18' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.25s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(90deg); }
@media (hover: hover) {
  .faq summary:hover { background: var(--paper-2); border-radius: 12px; }
}
.faq .faq-a { padding: 2px 16px 15px; color: var(--ink); }

/* ---------- method / notes / citations ---------- */
.method {
  background: var(--paper-2);
  border-radius: 14px;
  padding: 6px 20px 14px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.method h2 { font-size: 1.15rem; margin: 0.9em 0 0.3em; }
.note { font-size: 0.86rem; color: var(--ink-soft); }
.est-flag { color: var(--gold-deep); font-weight: 600; }

.fn {
  font-size: 0.72em;
  vertical-align: super;
  line-height: 0;
  margin-left: 2px;
  text-decoration: none;
}
.fn:hover { text-decoration: underline; }
.cellmeta { display: block; font-size: 0.72rem; color: var(--ink-soft); margin-top: 3px; }
.formula {
  font-family: var(--mono);
  font-size: 0.85rem;
  background: var(--paper-2);
  border-radius: 10px;
  padding: 10px 14px;
  display: inline-block;
  margin: 0.4em 0;
}
.srcs { font-size: 0.88rem; }
.srcs li { margin: 0.35em 0; }

/* ---------- map / svg ---------- */
.routemap {
  display: block;
  width: 100%;
  height: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.maplegend { font-size: 0.8rem; color: var(--ink-soft); margin-top: 8px; }

/* ---------- tool pages / forms ---------- */
.tool-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 24px;
  margin: 20px 0;
  box-shadow: 0 1px 2px rgba(60, 48, 25, 0.04), 0 8px 24px rgba(60, 48, 25, 0.05);
}
.tool-row {
  display: flex;
  gap: 12px 14px;
  flex-wrap: wrap;
  align-items: end;
  margin: 12px 0;
}
/* field labels only — not the option labels inside .radioline */
.tool-row > label,
.tool-row > div > label,
.tool-row > .listbox > label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

input[type="text"], input[type="date"], input[type="number"], select, textarea {
  font: inherit;
  color: var(--ink);
  padding: 10px 16px;
  border: 1px solid var(--line);
  background: var(--card);
  min-width: 200px;
}
input[type="text"] { border-radius: 999px; }
input[type="date"], input[type="number"], select { border-radius: 10px; }
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%236E6353' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 12px;
  cursor: pointer;
}
textarea { border-radius: 14px; min-width: 0; resize: vertical; }
input[type="number"] { min-width: 90px; }
input::placeholder, textarea::placeholder { color: #A79B87; opacity: 1; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none;
  border-color: var(--terra);
  box-shadow: 0 0 0 3px rgba(188, 75, 24, 0.15);
}

.btn {
  font: inherit;
  font-weight: 650;
  background: var(--terra);
  color: #fff;
  border: 1.5px solid var(--terra);
  border-radius: 999px;
  padding: 11px 24px;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.btn:hover {
  background: var(--terra-deep);
  border-color: var(--terra-deep);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(150, 58, 16, 0.22);
}
.btn:focus-visible { outline-color: var(--ink); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.ghost {
  background: transparent;
  color: var(--terra);
}
.btn.ghost:hover { background: var(--terra); color: #fff; }

.results { min-height: 60px; }

/* Result card: ticket style with terra-tinted notches. */
.result-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px 18px calc(56px + 22px);
  margin: 14px 0;
  background-image: repeating-linear-gradient(180deg, var(--line) 0 6px, transparent 6px 12px);
  background-repeat: no-repeat;
  background-position: 56px 12px;
  background-size: 1px calc(100% - 24px);
}
.result-card::before,
.result-card::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px rgba(188, 75, 24, 0.45); /* terra die-line */
  transform: translateY(-50%);
}
.result-card::before { left: -10px; }
.result-card::after { right: -10px; }
.result-card h3 { margin-top: 0; }
.result-card .kyk-cta-wrap { background: var(--paper); }

/* Autocomplete listbox */
.listbox { position: relative; }
.autolist {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 30;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  max-height: 240px;
  overflow-y: auto;
  min-width: 240px;
  padding: 6px;
  box-shadow: 0 18px 40px rgba(60, 48, 25, 0.16);
}
.autolist div { padding: 8px 12px; cursor: pointer; font-size: 0.95rem; border-radius: 9px; }
.autolist div:hover { background: var(--paper-2); }
.autolist div.sel { background: var(--olive-soft); font-weight: 600; }

/* ---------- directory grids ---------- */
.dirgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px 22px;
  font-size: 0.95rem;
}

/* ---------- footer (dark) ---------- */
.site-foot {
  background: var(--ink);
  color: #EFE8D8;
  margin-top: 56px;
  padding: 28px 0 40px;
  font-size: 0.88rem;
}
.site-foot p {
  border-top: 1px solid rgba(247, 243, 234, 0.15);
  margin: 0;
  padding: 13px 0;
}
.site-foot p:first-child { border-top: 0; padding-top: 0; }
.site-foot .foot-attr strong { color: #E89B72; font-weight: 650; }
.site-foot .foot-links a { white-space: nowrap; }
.site-foot a { color: #CFC3A9; text-decoration: none; }
.site-foot a:hover { color: #E89B72; text-decoration: underline; text-underline-offset: 3px; }
.site-foot :focus-visible { outline-color: #E89B72; }
.site-foot .kyk-disc { color: rgba(239, 232, 216, 0.6); }

/* ---------- print (G4/G6/G7) ---------- */
.printonly { display: none; }
@media print {
  .site-head, .site-foot, .kyk-cta, .kyk-cta-wrap, .crumbs, .noprint, .route-divider { display: none !important; }
  body { font-size: 12pt; background: #fff; }
  .card, .result-card { break-inside: avoid; }
  /* tickets print as clean bordered boxes (punched circles would half-clip) */
  .card.ticket, .result-card {
    background-image: none;
    padding-left: 14pt;
  }
  .card.ticket::before, .card.ticket::after,
  .result-card::before, .result-card::after { display: none; }
  .printonly { display: block !important; }
}

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .h1block { padding-top: 1.5rem; }
  .blk { margin: 2rem 0; }
  .site-head nav { font-size: 0.84rem; }
  .tool-row input[type="text"] { min-width: 150px; }
  .tool-card { padding: 18px 16px; }
}
@media (max-width: 480px) {
  /* notches would crowd narrow cards — retire the perforation, keep the card */
  .card.ticket, .result-card {
    background-image: none;
    padding-left: 16px;
  }
  .card.ticket::before, .card.ticket::after,
  .result-card::before, .result-card::after { display: none; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
}

/* KAYAK search box widget (lib/kayak-search-box.jsx) */
.kyk-sbx {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 22px 0;
}
.kyk-sbx-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.kyk-sbx-head h2 { margin: 0; font-size: 1.15rem; }
.kyk-sbx-brand { color: var(--ink-soft); font-size: 0.8rem; }
.kyk-sbx-host { min-height: 120px; }
.kyk-sbx .kyk-disc { margin: 10px 0 0; font-size: 0.8rem; color: var(--ink-soft); }

/* Widget style variants */
.kyk-sbx--town {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-style: dashed;
  border-color: var(--line);
}
.kyk-sbx--town .kyk-sbx-head h2 { font-size: 0.95rem; }
.kyk-sbx--town .kyk-sbx-head { margin-bottom: 8px; }
.kyk-sbx--town .kyk-disc { font-size: 0.72rem; margin-top: 6px; }
.kyk-sbx--town .kyk-sbx-host { min-height: 90px; }

.kyk-sbx--fly {
  border-color: #C7B99D;
  background: linear-gradient(180deg, #fffdf6 0%, var(--card) 60%);
}
.kyk-sbx--fly .kyk-sbx-head h2::before { content: "✈ "; }
.kyk-slot { margin: 10px 0; }
