/* Trusted by Church: UK Church Finder. Brand colours from victory-connection (trustedbychurch.com). */
:root {
  --brand: #24483f;
  --brand-2: #315b4e;
  --brand-deep: #17302a;
  --brand-soft: #e5ebdd;
  --gold: #b59247;
  --gold-ink: #7a5b24;
  --gold-soft: #f1e8d3;
  --bg: #f9f6ef;
  --surface: #fffdf8;
  --ink: #1d2e28;
  --ink-2: #425249;
  --muted: #626e65;
  --line: #dedfd3;
  --line-strong: #c7cdbf;
  --ok: #1d7450;
  --ok-soft: #e3f3ea;
  --warn: #9a5700;
  --warn-soft: #fcf0dc;
  --focus: #2f6fed;
  --shadow: 0 1px 2px rgb(23 48 42 / 6%), 0 8px 24px rgb(23 48 42 / 8%);
  --shadow-lg: 0 24px 60px rgb(23 48 42 / 22%);
  --radius: 14px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'EB Garamond', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.55 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--gold-ink); }
svg { fill: currentColor; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 100; border-radius: 8px; }
.skip-link:focus { left: 8px; }
[hidden] { display: none !important; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 999px; padding: 11px 20px; font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none; transition: background .15s, transform .15s, box-shadow .15s; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-deep); color: #fff; }
.btn-gold { background: var(--gold); color: #1e1606; }
.btn-gold:hover { background: #c7a557; color: #1e1606; }
.btn-ghost { background: rgb(255 255 255 / 10%); color: #fff; border-color: rgb(255 255 255 / 28%); }
.btn-ghost:hover { background: rgb(255 255 255 / 20%); color: #fff; }
.btn-ghost-dark { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost-dark:hover { background: var(--brand-soft); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgb(255 255 255 / 55%); }
.btn-outline-light:hover { background: rgb(255 255 255 / 12%); color: #fff; }
.btn[disabled] { opacity: .6; cursor: progress; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-2); }
.icon-btn:hover { background: var(--brand-soft); }
.icon-btn svg { width: 22px; height: 22px; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px clamp(16px, 4vw, 40px); background: rgb(23 48 42 / 96%); backdrop-filter: blur(8px); color: #fff; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-mark { width: 34px; height: 34px; color: var(--gold); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: .01em; }
.brand-sub { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: #c2dcc5; }
.topnav { display: flex; align-items: center; gap: 22px; }
.topnav a { color: #e5ebdd; text-decoration: none; font-size: 15px; font-weight: 500; }
.topnav a:hover { color: #fff; }
.topnav .tbc-link { color: #e6c682; }
.btn-tbc { border-color: var(--gold); color: var(--gold-ink); }
.btn-tbc:hover { background: var(--gold-soft); }

/* Hero */
.hero { position: relative; padding-bottom: clamp(44px, 6vw, 70px); color: #fff; background:
  radial-gradient(1200px 500px at 85% -10%, rgb(181 146 71 / 35%), transparent 60%),
  radial-gradient(900px 500px at -10% 110%, rgb(49 91 78 / 90%), transparent 60%),
  linear-gradient(160deg, #17302a 0%, #24483f 60%, #2b5649 100%); overflow: visible; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .09;
  background-image: radial-gradient(circle at 1px 1px, #fff 1px, transparent 0); background-size: 22px 22px; }
/* No bottom padding here: the nation tiles overlap the hero's own padding, while search suggestions (inside this box) still layer above them. */
.hero-inner { position: relative; z-index: 5; max-width: 1040px; margin: 0 auto; padding: clamp(40px, 7vw, 84px) clamp(16px, 4vw, 40px) 0; text-align: center; }
.eyebrow { margin: 0 0 12px; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: #e6c682; font-weight: 600; }
.hero h1 { margin: 0 auto 28px; max-width: 19ch; font-family: var(--font-display); font-weight: 600; font-size: clamp(38px, 6.4vw, 68px); line-height: 1.02; letter-spacing: -.01em; }
.hero h1 em { color: #e6c682; font-style: italic; }
.search { position: relative; display: flex; align-items: center; max-width: 680px; margin: 0 auto; background: var(--surface); border-radius: 999px; padding: 6px 6px 6px 50px; box-shadow: var(--shadow-lg); }
.search-icon { position: absolute; left: 18px; width: 22px; height: 22px; color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 17px; color: var(--ink); padding: 10px 8px; outline: none; }
.search input::-webkit-search-cancel-button { display: none; }
.suggestions { position: absolute; left: 0; right: 0; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); text-align: left; z-index: 20; max-height: 380px; overflow: auto; color: var(--ink); }
.suggestions li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.suggestions li[aria-selected="true"], .suggestions li:hover { background: var(--brand-soft); }
.suggestions .s-name { font-weight: 600; }
.suggestions .s-meta { font-size: 13px; color: var(--muted); }
.suggestions .s-empty { color: var(--muted); cursor: default; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 760px; margin: 36px auto 0; }
.hero-stats div { padding: 12px 8px; border-top: 1px solid rgb(255 255 255 / 22%); }
.hero-stats dt { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: #c2dcc5; }
.hero-stats dd { margin: 2px 0 0; font-family: var(--font-display); font-size: clamp(26px, 3.6vw, 36px); font-weight: 600; color: #fff; }

/* Nations */
.nations { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; max-width: 1280px; margin: -26px auto 0; padding: 0 clamp(16px, 4vw, 40px); position: relative; z-index: 2; }
.nation { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); text-align: left; transition: transform .15s, border-color .15s; position: relative; overflow: hidden; }
.nation::after { content: ""; position: absolute; right: -18px; bottom: -22px; width: 90px; height: 90px; border-radius: 50%; background: var(--gold-soft); opacity: .8; }
.nation:hover { transform: translateY(-2px); border-color: var(--gold); }
.nation.is-on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand), var(--shadow); }
.nation-name { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--brand); position: relative; z-index: 1; }
.nation-count { font-size: 14px; color: var(--muted); position: relative; z-index: 1; }

/* Explore */
.explore { max-width: 1280px; margin: 28px auto 0; padding: 0 clamp(16px, 4vw, 40px); scroll-margin-top: 70px; }
.filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.chip { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 7px 14px 7px 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 14px; font-weight: 500; color: var(--ink-2); }
.chip .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 2px rgb(255 255 255 / 55%); }
.chip .n { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--c); }
.chip[aria-pressed="true"] { background: var(--c); border-color: var(--c); color: #fff; }
.chip[aria-pressed="true"] .n { color: rgb(255 255 255 / 85%); }
.chip[aria-pressed="true"] .dot { background: #fff; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.toggle { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.toggle input { position: absolute; opacity: 0; }
.toggle-track { width: 40px; height: 24px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background .15s; }
.toggle-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 20%); transition: transform .15s; }
.toggle input:checked + .toggle-track { background: var(--brand); }
.toggle input:checked + .toggle-track::after { transform: translateX(16px); }
.toggle input:focus-visible + .toggle-track { outline: 3px solid var(--focus); outline-offset: 2px; }
.view-switch, .mobile-switch { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--brand-soft); }
.mobile-switch { display: none; }
.seg { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.seg.is-on { background: var(--surface); color: var(--brand); box-shadow: 0 1px 3px rgb(0 0 0 / 12%); }

.explore-grid { display: grid; grid-template-columns: minmax(340px, 420px) 1fr; gap: 18px; height: min(78vh, 820px); min-height: 540px; }
.list-pane { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.results-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 16px 18px 10px; border-bottom: 1px solid var(--line); }
.results-head h2 { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 600; line-height: 1.2; }
.results { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; scroll-margin-top: 80px; }
.result { display: grid; grid-template-columns: 6px 1fr auto; gap: 12px; align-items: start; padding: 12px 12px 12px 8px; border-radius: 12px; cursor: pointer; }
.result:hover, .result.is-hover { background: var(--bg); }
.result:focus-visible { outline-offset: -3px; }
.result .bar { align-self: stretch; border-radius: 6px; background: var(--c); }
.result h3 { margin: 0 0 2px; font-size: 15px; font-weight: 600; line-height: 1.3; }
.result .meta { font-size: 13px; color: var(--muted); }
.result .denom { font-size: 13px; color: var(--ink-2); }
.result .side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.dist { font-size: 13px; font-weight: 600; color: var(--brand); font-variant-numeric: tabular-nums; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-ACTIVE { background: var(--ok-soft); color: var(--ok); }
.badge-LIKELY_ACTIVE { background: #e6eef7; color: #2d5f8f; }
.badge-UNCERTAIN { background: var(--warn-soft); color: var(--warn); }
.badge-CLOSED { background: #eee; color: #666; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-family: var(--font-display); font-size: 22px; margin-bottom: 6px; }
.skeleton { height: 64px; margin: 6px; border-radius: 12px; background: linear-gradient(90deg, #f1efe7 0%, #f8f6f0 50%, #f1efe7 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.pager .btn { padding: 7px 14px; font-size: 14px; }

.map-pane { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #e8ebe3; min-height: 0; }
#map { position: absolute; inset: 0; }
.map-area-btn { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); box-shadow: var(--shadow-lg); z-index: 2; }
.legend { position: absolute; left: 12px; bottom: 12px; z-index: 2; display: flex; flex-wrap: wrap; gap: 4px 12px; max-width: min(520px, calc(100% - 24px)); padding: 8px 12px; background: rgb(255 253 248 / 94%); border-radius: 12px; box-shadow: var(--shadow); font-size: 12px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.legend.heat i { width: 120px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, rgb(229 235 221 / 0), #c2dcc5, #b59247, #a33b3b, #5a1717); }
.maplibregl-popup-content { border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow-lg); font-family: var(--font); }
.pop h4 { margin: 0 0 2px; font-size: 15px; }
.pop p { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.pop .link-btn { font-size: 14px; }
.maplibregl-ctrl-attrib { font-size: 11px; }

/* CTA + about */
.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; max-width: 1280px; margin: 48px auto 0; padding: 30px clamp(20px, 4vw, 40px); border-radius: 22px; color: #fff; background: linear-gradient(120deg, #24483f, #315b4e 60%, #6d5a2c); width: calc(100% - 2 * clamp(16px, 4vw, 40px)); }
.cta-band h2 { margin: 0 0 4px; font-family: var(--font-display); font-size: clamp(26px, 3vw, 34px); font-weight: 600; }
.cta-band p { margin: 0; color: #dfe7da; max-width: 56ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.about { max-width: 1280px; margin: 56px auto 0; padding: 0 clamp(16px, 4vw, 40px); scroll-margin-top: 70px; }
.about h2 { font-family: var(--font-display); font-size: clamp(30px, 3.4vw, 40px); font-weight: 600; margin: 0 0 16px; color: var(--brand); }
.about h3 { margin: 0 0 10px; font-size: 16px; }
.about-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; color: var(--ink-2); }
.about-grid p { margin: 0 0 14px; }
.credits { margin: 0 0 14px; padding-left: 18px; font-size: 14px; }
.credits li { margin-bottom: 8px; }
.fine { font-size: 13px; color: var(--muted); }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; max-width: 1280px; margin: 48px auto 0; padding: 22px clamp(16px, 4vw, 40px) 36px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer .link-btn { color: var(--muted); }

/* Drawer */
.drawer { position: fixed; inset: 0; z-index: 50; }
.drawer-scrim { position: absolute; inset: 0; background: rgb(15 30 26 / 40%); animation: fade .2s; }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(520px, 100%); background: var(--surface); box-shadow: var(--shadow-lg); overflow-y: auto; animation: slide .25s ease-out; outline: none; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer-close { position: absolute; top: 12px; right: 12px; z-index: 3; background: rgb(255 253 248 / 92%); box-shadow: var(--shadow); }
.d-map { height: 220px; background: #e8ebe3; position: relative; }
.d-hero { padding: 22px 24px 8px; }
.d-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--ink-2); }
.tag .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.d-hero h2 { margin: 0 0 4px; font-family: var(--font-display); font-size: 32px; line-height: 1.1; font-weight: 600; color: var(--brand-deep); }
.d-hero .d-sub { margin: 0; color: var(--muted); }
.d-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 24px; }
.d-actions .btn { padding: 9px 16px; font-size: 14px; }
.d-section { padding: 16px 24px; border-top: 1px solid var(--line); }
.d-section h3 { margin: 0 0 10px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.status-note { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.sources { margin: 0; padding-left: 18px; font-size: 14px; }
.sources li { margin-bottom: 4px; overflow-wrap: anywhere; }
.nearby { list-style: none; margin: 0; padding: 0; }
.nearby li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.nearby li:last-child { border-bottom: 0; }
.nearby button { background: none; border: 0; padding: 0; text-align: left; font-weight: 600; color: var(--brand); }
.claim { margin: 8px 24px 28px; padding: 16px 18px; border-radius: 14px; background: var(--gold-soft); color: var(--gold-ink); }
.claim strong { display: block; color: #4d3a15; font-family: var(--font-display); font-size: 20px; }
.claim p { margin: 4px 0 12px; font-size: 14px; }
.claim .row { display: flex; flex-wrap: wrap; gap: 8px; }
.claim .btn { padding: 8px 14px; font-size: 14px; }

/* Forms */
.modal { width: min(680px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 20px; box-shadow: var(--shadow-lg); background: var(--surface); color: var(--ink); }
.modal::backdrop { background: rgb(15 30 26 / 50%); }
.form { padding: 0 24px 22px; }
.modal-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 18px 0 8px; background: var(--surface); }
.modal-head h2 { margin: 0; font-family: var(--font-display); font-size: 28px; font-weight: 600; color: var(--brand); }
.form-intro { margin: 0 0 8px; color: var(--ink-2); }
fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin: 16px 0 0; padding: 0; border: 0; }
legend { grid-column: 1 / -1; margin-bottom: 6px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--gold-ink); }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.span-2 { grid-column: 1 / -1; }
.field input, .field select, .field textarea, .picker input { font: inherit; font-weight: 400; font-size: 15px; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; width: 100%; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .picker input:focus { outline: 3px solid rgb(47 111 237 / 25%); border-color: var(--focus); }
.field.invalid input, .field.invalid select, .picker.invalid input { border-color: #b3261e; }
.picker { position: relative; }
.picker .suggestions { top: 100%; }
.picked { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--brand-soft); font-weight: 400; color: var(--ink); }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; font-size: 14px; color: var(--ink-2); }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.check.invalid { color: #b3261e; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: #fbe9e7; color: #8c1d18; font-size: 14px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.done { padding: 30px 6px 10px; text-align: center; }
.done .tick { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); margin-bottom: 10px; }
.done .tick svg { width: 32px; height: 32px; }
.done h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 28px; color: var(--brand); }
.done p { margin: 0 0 18px; color: var(--ink-2); }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; padding: 12px 18px; border-radius: 12px; background: var(--brand-deep); color: #fff; box-shadow: var(--shadow-lg); font-size: 14px; max-width: calc(100% - 32px); }

/* Responsive */
@media (max-width: 960px) {
  .topnav a { display: none; }
  .explore-grid { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .explore-grid .map-pane { height: 68vh; min-height: 420px; }
  .explore-grid .list-pane { max-height: none; }
  .results { max-height: none; overflow: visible; }
  .mobile-switch { display: inline-flex; }
  .view-switch { order: 3; }
  .explore-grid[data-pane="list"] .map-pane { display: none; }
  .explore-grid[data-pane="map"] .list-pane { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 640px) {
  .brand-sub { display: none; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .nations { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: -20px; }
  .nation { padding: 12px 14px; }
  .nation-name { font-size: 19px; }
  .search { padding-left: 44px; }
  .search-icon { left: 14px; }
  .search .btn { padding: 10px 14px; }
  fieldset { grid-template-columns: 1fr; }
  .form { padding: 0 16px 18px; }
  .d-hero, .d-actions, .d-section { padding-left: 18px; padding-right: 18px; }
  .claim { margin-left: 18px; margin-right: 18px; }
  .legend { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
