:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --ink: #1a1d1c;
  --muted: #6b7270;
  --line: #e4dfd8;
  --accent: #0f5c56;
  --accent-soft: #e6f0ee;
  --warn: #a2542a;
  --good: #2f6b3a;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(26,29,28,.05), 0 8px 24px rgba(26,29,28,.06);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141716; --surface: #1d2120; --ink: #ecebe8; --muted: #9aa3a0;
    --line: #2e3432; --accent: #6fd0c2; --accent-soft: #1c2c29;
    --warn: #e0a375; --good: #86c894;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
header.site {
  border-bottom: 1px solid var(--line); background: var(--surface);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
}
.logo {
  font: 600 21px/1 var(--serif); letter-spacing: -.01em;
  color: var(--ink); text-decoration: none;
}
.logo span { color: var(--accent); }
.tagline { color: var(--muted); font-size: 13.5px; }

/* ---------- hero ---------- */
.hero { padding: 64px 0 30px; text-align: center; }
.hero h1 {
  font: 400 clamp(30px, 5vw, 47px)/1.12 var(--serif);
  margin: 0 0 16px; letter-spacing: -.02em;
}
.hero h1 em { color: var(--accent); font-style: italic; }
.hero p.sub {
  color: var(--muted); max-width: 620px; margin: 0 auto;
  font-size: 17.5px;
}

/* ---------- search form ---------- */
.searchcard {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px; margin: 34px 0 20px;
}
.fieldrow {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
label.f { display: block; }
label.f > span {
  display: block; font-size: 12.5px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
input[type=number], input[type=text], select {
  width: 100%; padding: 10px 12px; font: inherit;
  color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px;
}
input:focus, select:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
.budgetfield { position: relative; }
.budgetfield input { padding-left: 28px; font-size: 19px; font-weight: 600; }
.budgetfield::before {
  content: "$"; position: absolute; left: 12px; top: 34px;
  color: var(--muted); font-size: 18px; font-weight: 600;
}
.tags { margin-top: 20px; }
.tags .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--bg);
  border-radius: 999px; padding: 6px 13px; font-size: 13.5px;
  cursor: pointer; user-select: none;
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked) {
  background: var(--accent-soft); border-color: var(--accent); color: var(--accent);
  font-weight: 600;
}
button.go {
  margin-top: 22px; width: 100%; padding: 14px 20px;
  font: 600 16.5px var(--sans); color: #fff; background: var(--accent);
  border: 0; border-radius: 9px; cursor: pointer;
}
button.go:hover { filter: brightness(1.1); }

/* ---------- results ---------- */
.resbar {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: baseline;
  justify-content: space-between; padding: 30px 0 6px;
}
.resbar h2 { font: 400 26px/1.2 var(--serif); margin: 0; }
.resbar .count { color: var(--muted); font-size: 14.5px; }
.grid {
  display: grid; gap: 18px; padding: 18px 0 10px;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
}
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
}
.card:hover { border-color: var(--accent); }
.card .city { font: 600 19px/1.25 var(--serif); }
.card .country { color: var(--muted); font-size: 13.5px; margin-bottom: 12px; }
.total { font: 700 27px/1 var(--sans); letter-spacing: -.02em; }
.range { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.badge {
  font-size: 11.5px; font-weight: 600; letter-spacing: .03em;
  padding: 3px 9px; border-radius: 999px; text-transform: uppercase;
  background: var(--accent-soft); color: var(--accent);
}
.badge.season { background: rgba(47,107,58,.12); color: var(--good); }
.badge.neutral { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.bar { display: flex; height: 7px; border-radius: 4px; overflow: hidden; margin: 15px 0 8px; }
.bar i { display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11.5px; color: var(--muted); }
.legend b { font-weight: 600; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; }
.headroom { margin-top: auto; padding-top: 13px; font-size: 13px; color: var(--good); font-weight: 600; }
.stretchnote { color: var(--warn); font-weight: 600; font-size: 13px; margin-top: auto; padding-top: 13px; }

/* ---------- destination detail ---------- */
.dhead { padding: 34px 0 8px; }
.dhead h1 { font: 400 38px/1.1 var(--serif); margin: 0 0 6px; letter-spacing: -.02em; }
.dhead .where { color: var(--muted); }
.tiers { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); padding: 22px 0; }
.tier { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.tier.fits { border-color: var(--accent); border-width: 2px; }
.tier h3 { margin: 0 0 2px; font: 600 17px var(--sans); }
.tier .sub { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
table.items { width: 100%; border-collapse: collapse; font-size: 14px; }
table.items td { padding: 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.items td.amt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
table.items td .note { display: block; color: var(--muted); font-size: 12px; }
table.items tr.sum td { border-bottom: 0; padding-top: 13px; font-size: 17px; font-weight: 700; }

.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 40px; text-align: center; color: var(--muted); }
.section-h { font: 400 22px/1.2 var(--serif); margin: 34px 0 0; }
.section-h + p { color: var(--muted); font-size: 14.5px; margin: 6px 0 0; }
.disclaimer { background: var(--accent-soft); border-radius: var(--radius); padding: 15px 18px; font-size: 13.5px; color: var(--ink); margin: 26px 0; }
footer.site { border-top: 1px solid var(--line); margin-top: 56px; padding: 26px 0 40px; color: var(--muted); font-size: 13px; }
.backlink { display: inline-block; margin: 22px 0 0; font-size: 14px; }

/* ---------- affiliate offers ---------- */
.offers {
  display: grid; gap: 12px; padding: 14px 0 4px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.offer {
  display: flex; flex-direction: column; gap: 3px;
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: 10px;
  padding: 14px 16px; text-decoration: none; color: inherit;
  box-shadow: var(--shadow);
}
.offer:hover { border-color: var(--accent); filter: brightness(1.02); }
.offer-label { font-weight: 600; font-size: 15px; color: var(--accent); }
.offer-meta { color: var(--muted); font-size: 12.5px; }
.afd {
  color: var(--muted); font-size: 12.5px; line-height: 1.5;
  border-top: 1px solid var(--line); padding-top: 12px; margin-top: 18px;
}
table.admin { width: 100%; border-collapse: collapse; font-size: 14px; margin: 20px 0; }
table.admin th { text-align: left; font-size: 12px; text-transform: uppercase;
  letter-spacing: .04em; color: var(--muted); padding: 8px 10px 8px 0;
  border-bottom: 1px solid var(--line); }
table.admin td { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); }
.linkrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.linkrow a, .linkrow .cur {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line); font-size: 13.5px; text-decoration: none;
  background: var(--surface);
}
.linkrow .cur { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.linkrow a:hover { border-color: var(--accent); }
.prose { max-width: 640px; }
.prose h2 { font: 600 16px var(--sans); margin: 26px 0 6px; }
.prose p { color: var(--ink); font-size: 15px; line-height: 1.65; margin: 0 0 12px; }
.badge.est { background: rgba(162,84,42,.12); color: var(--warn); }
.confnote { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.agebox { margin-top: 20px; }
.agechip { gap: 8px; }
.agechip select {
  width: auto; padding: 3px 6px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); color: var(--ink);
}
.agehint { color: var(--muted); font-size: 12.5px; margin: 8px 0 0; }
.petnote {
  background: rgba(162,84,42,.10); border-left: 3px solid var(--warn);
  border-radius: 8px; padding: 12px 15px; font-size: 13.5px; margin: 16px 0;
}
.whenblock { margin-top: 18px; }
.modetabs { display: inline-flex; gap: 4px; padding: 3px; margin-bottom: 14px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px; }
.modetab { border: 0; background: none; cursor: pointer; font: 500 13.5px var(--sans);
  color: var(--muted); padding: 6px 15px; border-radius: 999px; }
.modetab.is-on { background: var(--accent); color: #fff; font-weight: 600; }
input[type=date] { width: 100%; padding: 10px 12px; font: inherit; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.petrow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }
.petrow .agehint { margin: 0; flex: 1 1 260px; }
.chip input[type=checkbox] { position: absolute; opacity: 0; pointer-events: none; }

/* ---------- accessibility ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: 10px 16px;
  border-radius: 0 0 8px 0; font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 0; }
main:focus { outline: none; }

/* A visible focus ring everywhere, including the custom chips whose real
   checkbox is visually hidden but still keyboard-focusable. */
a:focus-visible, button:focus-visible, select:focus-visible,
input:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px;
}
.chip:has(input:focus-visible) {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
.card:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.reshead { font: 400 26px/1.2 var(--serif); margin: 0; }
.sortgo {
  margin-left: 8px; padding: 9px 16px; font: 600 14px var(--sans);
  color: #fff; background: var(--accent); border: 0; border-radius: 8px;
  cursor: pointer; align-self: end;
}
.resbar form { display: flex; align-items: flex-end; gap: 4px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
/* :focus-visible does not always match programmatic focus, and a checkbox
   hidden with opacity:0 has no ring of its own -- so key off :focus too. */
.chip:has(input:focus) { outline: 3px solid var(--accent); outline-offset: 2px; }
.morerow { color: var(--muted); font-size: 14px; margin: 18px 0 0; }
.morelink { font-weight: 600; margin-left: 8px; }

/* ---------- map narrowing ---------- */
.mapblock { margin-top: 20px; }
.maptoggle {
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; font: 500 13.5px var(--sans); color: var(--ink);
  cursor: pointer;
}
.maptoggle[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.mapsummary { color: var(--muted); font-weight: 400; margin-left: 6px; }
.mappanel { margin-top: 14px; }
.regionchips { margin-bottom: 12px; }
.map {
  height: 340px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); overflow: hidden;
}
.maprow { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 12px; }
.radiuswrap { flex: 1 1 240px; }
.radiuswrap input[type=range] { width: 100%; accent-color: var(--accent); }
.clearcircle {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 8px; padding: 7px 13px; font: 500 13px var(--sans); cursor: pointer;
}
.mapcount { color: var(--accent); font-weight: 600; font-size: 13.5px; }
.leaflet-container { font: inherit; }
