/* Udha: one soft, light look. Misty white page, limestone land, Ionian-blue accent. */
:root {
  --bg: #F7F8F8;
  --surface: #FFFFFF;
  --ink: #26333C;
  --muted: #6E7A83;
  --line: #E3E7EA;
  --land: #E8E4DC;
  --land-edge: #FFFFFF;
  --sea: #6F9FB2;
  --accent: #2F8A9B;
  --accent-ink: #FFFFFF;
  --accent-soft: #E5F2F5;
  --red: #E0505A;
  --best: #2F8A9B;
  --good: #A9D5DD;
  --peak: #EDBC66;
  --quiet: #E6E9EC;
  --shadow: 0 1px 2px rgba(38,51,60,.04), 0 10px 30px rgba(38,51,60,.07);
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --header-h: 60px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 15px; line-height: 1.55;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; text-wrap: balance; margin: 0; }
p { margin: 0; }
a { color: var(--accent); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 16px; }

.gutter { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.wrap { max-width: 1240px; margin: 0 auto; }

/* Header and footer */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand b { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.brand b i { font-style: normal; color: var(--red); }
.brand span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-nav { margin-left: auto; display: flex; gap: 20px; font-size: 14px; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; }
.site-footer .wrap { padding-block: 22px 30px; font-size: 13px; color: var(--muted); display: grid; gap: 10px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer nav a { color: var(--ink); text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }

/* Shared bits */
.eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.coords, .checked { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.summary { font-size: 15px; }
.tagline { font-family: var(--font-mono); font-size: 11px; color: var(--accent); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.facts div { background: var(--bg); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.facts dt { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.facts dd { margin: 2px 0 0; font-size: 13px; font-weight: 600; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 600; border: 0; cursor: pointer;
}
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.list li { display: grid; gap: 2px; }
.list b { font-size: 14.5px; }
.list p { color: var(--muted); font-size: 14px; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.timeline li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; font-size: 14px; }
.timeline time { font-family: var(--font-mono); font-size: 12px; color: var(--accent); padding-top: 2px; }
.bullets { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; }

/* Home: map + preview card */
.map-view .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 430px); gap: 32px; padding-block: 28px 40px; align-items: start; }
.intro { display: grid; gap: 14px; margin-bottom: 18px; }
.intro h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 700; letter-spacing: -.02em; }
.intro p { color: var(--muted); max-width: 54ch; }
.search { position: relative; max-width: 360px; }
.search input {
  width: 100%; height: 42px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); padding: 0 12px 0 36px; font: inherit; font-size: 15px;
}
.search svg { position: absolute; left: 12px; top: 13px; width: 16px; height: 16px; color: var(--muted); }
.results { position: absolute; top: 46px; left: 0; right: 0; z-index: 15; list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.results button { width: 100%; display: flex; justify-content: space-between; gap: 8px; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.results button:hover, .results button.on { background: var(--accent-soft); }
.results small { color: var(--muted); font-size: 12px; }

.map-frame svg { display: block; width: 100%; height: auto; max-height: min(80vh, 780px); margin: 0 auto; }
.land { filter: drop-shadow(0 2px 6px rgba(38,51,60,.10)); }
.county { fill: var(--land); stroke: var(--land-edge); stroke-width: 1.4; stroke-linejoin: round; }
.grat { stroke: var(--line); stroke-width: .8; stroke-dasharray: 2 4; fill: none; }
.grat-label { font-family: var(--font-mono); font-size: 9px; fill: var(--muted); }
.neighbour { font-family: var(--font-body); font-size: 9.5px; letter-spacing: .18em; fill: var(--muted); opacity: .75; }
.sea { font-family: var(--font-display); font-style: italic; font-size: 13px; fill: var(--sea); letter-spacing: .04em; }
.scale line { stroke: var(--ink); stroke-width: 1.5; }
.scale text { font-family: var(--font-mono); font-size: 9px; fill: var(--muted); }
.place { cursor: pointer; }
.place .hit { fill: transparent; }
.place .dot { fill: var(--red); stroke: var(--surface); stroke-width: 2.5; transition: r .15s; }
.place .name { font-family: var(--font-display); font-weight: 700; font-size: 13px; fill: var(--ink); paint-order: stroke; stroke: var(--land-edge); stroke-width: 3px; stroke-linejoin: round; }
.place:hover .dot, .place:focus-visible .dot { r: 8; }
.place:hover .name, .place.selected .name { fill: var(--accent); }
.place:focus { outline: none; }
.place:focus-visible .hit { stroke: var(--accent); stroke-width: 2; }
.ring { fill: none; stroke: var(--red); stroke-width: 2; opacity: 0; pointer-events: none; }
.place.selected .ring { opacity: 1; animation: pulse 1.8s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pulse { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }
.map-credit { text-align: center; font-size: 12px; color: var(--muted); margin-top: 8px; }

/* Category buttons */
.cat-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.cat {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 14px; cursor: pointer;
}
.cat:hover { border-color: var(--accent); }
.cat .count { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.cat[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.cat[aria-pressed="true"] .count { color: var(--accent-ink); opacity: .8; }
.chips [hidden] { display: none; }

/* Zoomable map */
.map-box { position: relative; height: min(78vh, 760px); min-height: 440px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #EDF3F4; }
.map-box.svg-mode { height: auto; min-height: 0; border: 0; border-radius: 0; overflow: visible; background: none; }
.map-box .maplibregl-canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.gl-place { display: flex; align-items: center; gap: 6px; border: 0; background: none; padding: 4px; margin: -4px; cursor: pointer; }
.gl-place[hidden] { display: none !important; }
.gl-place.end { flex-direction: row-reverse; }
.gl-place .dot { flex: none; width: 13px; height: 13px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2.5px var(--surface), 0 1px 4px rgba(38,51,60,.25); transition: transform .15s; }
.gl-place .name {
  font-family: var(--font-display); font-weight: 700; font-size: 13.5px; color: var(--ink); white-space: nowrap;
  text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 3px #fff, 0 0 4px #fff;
}
.gl-place:hover .dot, .gl-place:focus-visible .dot { transform: scale(1.3); }
.gl-place:hover .name, .gl-place.selected .name { color: var(--accent); }
.gl-place:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.gl-place.selected .dot { animation: glpulse 1.8s ease-out infinite; }
@keyframes glpulse { 0% { box-shadow: 0 0 0 2.5px var(--surface), 0 0 0 2.5px rgba(224,80,90,.6); } 100% { box-shadow: 0 0 0 2.5px var(--surface), 0 0 0 14px rgba(224,80,90,0); } }
.map-box.tight .gl-place .name { display: none; }
.map-box.tight .gl-place.selected .name, .map-box.tight .gl-place:hover .name { display: inline; }
.gl-pin { display: none; align-items: center; gap: 5px; border: 0; background: none; padding: 3px; margin: -3px; cursor: pointer; }
.map-box.show-pins .gl-pin { display: flex; }
.map-box .gl-pin.off { display: none; }
.gl-pin .pin { flex: none; width: 11px; height: 11px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); box-shadow: 0 1px 3px rgba(38,51,60,.25); }
.gl-pin .name { display: none; font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap; text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 3px #fff; }
.map-box.show-pin-names .gl-pin .name, .gl-pin:hover .name, .gl-pin:focus-visible .name { display: inline; }
.gl-pin:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.map-reset button { width: auto !important; padding: 0 10px; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.maplibregl-popup-content { border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); font-family: var(--font-body); }
.maplibregl-popup-close-button { font-size: 18px; width: 28px; height: 28px; }
.pin-pop { display: grid; gap: 4px; padding-right: 12px; }
.pin-pop b { font-family: var(--font-display); font-size: 16px; }
.pin-pop p { color: var(--muted); font-size: 13px; line-height: 1.45; }
.pin-pop a { font-size: 13px; font-weight: 600; }
.when { display: grid; gap: 6px; }

/* Guide page map */
.map-box.guide-map { height: 440px; min-height: 0; }
.guide-map.map-failed { height: auto; display: grid; place-items: center; padding: 28px 16px; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); font-size: 14px; text-align: center; }
.gl-place.solo { cursor: default; }
.map-note { font-size: 13px; color: var(--muted); }
.map-link {
  justify-self: start; display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; min-height: 32px; padding: 0 10px 0 8px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--accent); font-size: 13px; font-weight: 600; cursor: pointer;
}
.map-link:hover { border-color: var(--accent); background: var(--accent-soft); }
.map-link svg { width: 15px; height: 15px; }
.months.mini span { height: 16px; border-radius: 4px; }
.months.mini small { font-size: 9.5px; }

.panel { position: sticky; top: calc(var(--header-h) + 20px); max-height: calc(100vh - var(--header-h) - 40px); overflow: auto; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--line); }
.sheet-close { display: none; }
.card { display: grid; gap: 16px; padding: 20px; }
.card-head { display: grid; gap: 4px; }
.card-head h2 { font-size: 34px; font-weight: 700; letter-spacing: -.02em; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tab { border: 0; background: none; padding: 8px 10px; font-size: 14px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.tabpanel { min-height: 150px; padding-top: 14px; }
.card-foot { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.card-band { height: 8px; border-radius: 16px 16px 0 0; background: linear-gradient(90deg, var(--c1), var(--c2)); opacity: .55; }

/* Guide page */
.page .wrap { padding-block: 24px 16px; display: grid; gap: 36px; }
.page.narrow .wrap { max-width: 1080px; }
.crumbs { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.crumbs a { text-decoration: none; }
.guide-hero { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 40px; align-items: center; }
.guide-hero:has(.hero-photo) { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.guide-hero .text { display: grid; gap: 14px; min-width: 0; }
.guide-hero h1 { font-size: clamp(40px, 7vw, 72px); font-weight: 700; letter-spacing: -.03em; }
.guide-hero .summary { font-size: 17px; max-width: 56ch; }
.locator { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: grid; gap: 6px; justify-items: center; }
.locator svg { width: 100%; max-width: 150px; height: auto; display: block; }
.locator figcaption { text-align: center; }
.locator .county { stroke-width: 2; }
.locator .here { fill: var(--red); stroke: var(--surface); stroke-width: 4; }
.locator .here-ring { fill: none; stroke: var(--red); stroke-width: 2.5; opacity: .35; }
.locator figcaption { font-size: 12px; color: var(--muted); }
.hero-photo { margin: 0; border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.hero-photo img { display: block; width: 100%; height: auto; }
.hero-photo figcaption { font-size: 12px; color: var(--muted); padding: 8px 12px; }
.hero-photo figcaption a { color: inherit; }
.review-thumb { display: block; width: 100%; max-width: 240px; height: auto; border-radius: 8px; margin-bottom: 6px; }
.guide-section { display: grid; gap: 16px; }
.guide-section > h2 { font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.places-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.place-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.place-card .body { padding: 14px 16px 16px; display: grid; gap: 4px; align-content: start; }
.place-card h3 { font-size: 19px; }
.place-card p { color: var(--muted); font-size: 14px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.stack { display: grid; gap: 32px; min-width: 0; }
.months { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; }
.months div { display: grid; gap: 4px; text-align: center; }
.months span { height: 28px; border-radius: 6px; }
.months small { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); }
.m-best { background: var(--best); } .m-good { background: var(--good); } .m-peak { background: var(--peak); } .m-quiet { background: var(--quiet); }
.month-key { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--muted); }
.month-key i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -2px; }
.sources { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.note { color: var(--muted); font-size: 13.5px; max-width: 70ch; }
.draft-banner { border: 1px solid var(--line); border-left: 3px solid var(--peak); border-radius: 12px; background: var(--surface); padding: 12px 16px; font-size: 14px; }

/* Guides index */
.guides-head { display: grid; gap: 10px; }
.guides-head h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 700; letter-spacing: -.02em; }
.guides-head p { color: var(--muted); max-width: 62ch; }
.guides-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.guide-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: grid; grid-template-rows: auto 1fr; text-decoration: none; color: inherit; }
.guide-tile:hover { border-color: var(--accent); }
.guide-tile .body { padding: 14px 16px 16px; display: grid; gap: 6px; align-content: start; }
.guide-tile h2 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.guide-tile .tile-sum { color: var(--muted); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.region-group { display: grid; gap: 14px; }
.region-group[hidden], .guide-tile[hidden] { display: none; }
.region-group > h2 { font-size: 20px; font-weight: 700; }

/* Text pages (about, privacy) */
.prose { max-width: 70ch; display: grid; gap: 14px; font-size: 16px; }
.prose h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 700; letter-spacing: -.02em; margin-bottom: 6px; }
.prose h2 { font-size: 22px; font-weight: 700; margin-top: 12px; }
.prose ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

/* Review page (local preview only) */
.confirm-group { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: grid; gap: 12px; max-width: 860px; }
.confirm-group h2 { font-size: 20px; font-weight: 700; }
.confirm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.confirm-list li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; font-size: 14px; align-items: baseline; }
.confirm-list a { font-family: var(--font-mono); font-size: 12px; text-decoration: none; }

/* Phone and small tablet */
@media (max-width: 860px) {
  .map-box.guide-map { height: 360px; }
  .site-nav { gap: 14px; }
  .brand span { display: none; }
  .map-view .wrap { grid-template-columns: minmax(0, 1fr); gap: 0; padding-block: 18px 28px; }
  .map-frame svg { max-height: none; }
  .panel {
    position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 30; max-height: 74vh; max-height: 74dvh;
    border-radius: 18px 18px 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom, 0px);
    transform: translateY(105%); transition: transform .28s ease; visibility: hidden;
  }
  .panel.open { transform: none; visibility: visible; }
  .card { padding-inline: max(16px, env(safe-area-inset-left, 0px)); }
  .sheet-close {
    display: grid; place-items: center; position: sticky; top: 8px; margin: 8px 10px -44px auto; z-index: 2;
    width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(38,51,60,.55); color: #fff; cursor: pointer; font-size: 20px; line-height: 1;
  }
  .guide-hero, .guide-hero:has(.hero-photo), .two-col { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .locator { display: none; }
}
@media (max-width: 420px) {
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
  .facts dd { text-align: right; margin: 0; }
  .card-head h2 { font-size: 30px; }
  .confirm-list li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
@media (prefers-reduced-motion: reduce) { .panel { transition: none; } .place.selected .ring { animation: none; opacity: .8; } }

/* Proposed places (only in --drafts previews) */
.place-card.proposed { border-style: dashed; }
.place-card.proposed .sources { margin-top: 8px; font-size: 12.5px; }

/* Online-check results on /review/ (only in --drafts previews) */
.confirm-list .check { display: grid; gap: 4px; min-width: 0; }
.confirm-list .check p { margin: 0; }
.confirm-list .check .sources { font-size: 12.5px; gap: 2px; }
.pill { display: inline-block; font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); vertical-align: 2px; }
.pill-answered { background: #E3F1F2; color: #1F6470; }
.pill-partly { background: #F6EEDC; color: #7A5B22; }
.pill-local { background: #EEEEEA; color: #55554E; }
.confirm-list .check .sources li { display: block; }
.confirm-list .check a { font-family: inherit; font-size: inherit; text-decoration: underline; }
