:root {
  --paper: #f4efe4;
  --card: #fffdf8;
  --ink: #1c2416;
  --muted: #4e5846;
  --pine: #1e4a38;
  --pine-deep: #14352a;
  --wheat: #a67c3d;
  --wheat-soft: #f3e6cf;
  --clay: #9c4632;
  --line: #e3d7c4;
  --focus: #8d5e1a;
  --danger: #8d2f24;
  --shadow: 0 16px 40px rgba(28, 36, 22, 0.08);
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.5;
}
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 560; line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 4vw, 3.4rem); margin: 0.2rem 0 0.6rem; }
h2 { font-size: clamp(1.6rem, 2.5vw, 2.1rem); margin: 0 0 0.6rem; }
h3 { font-size: 1.25rem; margin: 0 0 0.4rem; }
p { margin: 0.4rem 0 0.8rem; }
a { color: var(--pine-deep); }
a:hover { color: var(--clay); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--ink);
  color: white;
  padding: 0.4rem 0.7rem;
  z-index: 50;
}
.skip:focus { top: 0.5rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.wrap { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244, 239, 228, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  width: min(1280px, calc(100% - 1.5rem));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  padding: 0.65rem 0;
}
.brand { display: flex; gap: 0.65rem; align-items: center; text-decoration: none; color: inherit; }
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand-name { display: block; font-family: var(--serif); font-size: 1.25rem; line-height: 1; }
.brand-place { display: block; color: var(--muted); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; }
.nav { display: flex; flex-wrap: wrap; gap: 0.2rem 0.85rem; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 650; padding: 0.2rem 0; }
.nav a[aria-current="page"] { color: var(--pine); box-shadow: inset 0 -2px 0 var(--wheat); }

.page { padding: 1.25rem 0 3rem; }
.lede { font-size: 1.15rem; max-width: 42rem; }
.eyebrow {
  margin: 0;
  color: var(--wheat);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
}
.note { color: var(--muted); font-size: 0.95rem; }
.fine { color: var(--muted); font-size: 0.92rem; }

.map-layout {
  width: min(1280px, calc(100% - 1.25rem));
  margin: 0 auto 1.5rem;
  display: grid;
  gap: 0.9rem;
}
.intro { order: 1; }
.search-address { order: 2; }
.map-frame { order: 3; }
.search-tools { order: 4; }
.results-col { order: 5; }
.page .map-frame { height: 480px; min-height: 480px; position: relative; margin: 1rem 0 1.25rem; }
@media (min-width: 980px) {
  .map-layout {
    grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
    grid-template-areas:
      "intro map"
      "address map"
      "tools map"
      "results map";
    align-items: start;
  }
  .intro { grid-area: intro; }
  .search-address { grid-area: address; }
  .search-tools { grid-area: tools; }
  .results-col { grid-area: results; }
  .map-layout .map-frame {
    grid-area: map;
    position: sticky;
    top: 5.2rem;
    height: calc(100vh - 6.4rem);
    min-height: 560px;
    margin: 0;
  }
}

.map-frame {
  position: relative;
  min-height: 68vh;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #d7e0d6;
  box-shadow: var(--shadow);
}
#map { position: absolute; inset: 0; }
.map-loading {
  position: absolute;
  z-index: 1;
  left: 1rem;
  top: 1rem;
  margin: 0;
  background: var(--card);
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
}
.map-fallback {
  position: absolute;
  z-index: 2;
  left: 1rem;
  right: 1rem;
  top: 1rem;
  margin: 0;
  background: var(--card);
  color: var(--ink);
  padding: 0.85rem 1rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.map-fallback .button { margin-top: 0.7rem; }
.map-types {
  position: absolute;
  z-index: 2;
  top: 0.7rem;
  left: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  background: rgba(255, 253, 248, 0.94);
  border-radius: 999px;
  padding: 0.25rem;
}
.map-types button {
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  min-height: 36px;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
}
.map-types button[aria-pressed="true"] { background: var(--pine); color: #f6f1e7; }
.well-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #9c4632;
  border: 2px solid #fffdf8;
  box-shadow: 0 0 0 1px #1c2416;
}
.gm-cluster {
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  border-radius: 999px;
  background: #1e4a38;
  color: #f6f1e7;
  border: 2px solid #f4efe4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}
gmp-place-autocomplete,
.places-widget { display: block; width: 100%; margin: 0 0 0.45rem; color-scheme: light; }
.map-detail {
  position: absolute;
  z-index: 2;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.7rem;
  max-height: 48%;
  overflow: auto;
  background: var(--card);
  border-radius: 14px;
  padding: 0.85rem 0.95rem 1rem;
  box-shadow: var(--shadow);
}
.map-detail h2 { font-size: 1.35rem; }
.stack { display: grid; gap: 0.55rem; }
label, .label { font-weight: 700; }
.hint { font-weight: 450; color: var(--muted); }
input, select, textarea {
  width: 100%;
  margin-top: 0.28rem;
  padding: 0.65rem 0.7rem;
  font: inherit;
  color: inherit;
  background: white;
  border: 1px solid #d5cbb8;
  border-radius: 10px;
  min-height: 44px;
}
textarea { min-height: 8rem; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0.2rem 0 0; }
legend { font-weight: 700; padding: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.35rem; }
.pill {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  background: white;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.pill input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.pill:has(input:checked) { background: var(--pine); color: #f6f1e7; border-color: var(--pine); }
.pill:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

.button, button.button, a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--pine-deep);
  background: var(--pine);
  color: #f6f1e7;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.button.secondary, a.button.secondary { background: transparent; color: var(--pine-deep); }
.button:hover { background: var(--pine-deep); color: white; }
.button.secondary:hover { background: var(--wheat-soft); color: var(--ink); }
.button:disabled { opacity: 0.65; cursor: wait; }
.button.small { min-height: 40px; }

.result {
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.6rem 0.75rem;
  margin: 0 0 0.4rem;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 0.1rem;
}
.result strong { font-size: 1rem; }
.result span { color: var(--muted); font-size: 0.92rem; }
.result[aria-pressed="true"], .result:hover { border-color: var(--pine); background: #f8f3ea; }
#results { list-style: none; padding: 0; margin: 0.4rem 0 0; max-height: 420px; overflow: auto; }
#status-line { min-height: 1.4em; }

.facts { display: grid; grid-template-columns: 9.2rem 1fr; gap: 0.2rem 0.7rem; margin: 0.4rem 0 0.8rem; }
.facts dt { color: var(--muted); font-weight: 650; }
.facts dd { margin: 0; }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } }

.band { padding: 0.5rem 0 1.2rem; }
.steps, .price-grid, .county-grid {
  display: grid;
  gap: 0.75rem;
}
@media (min-width: 800px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .price-grid { grid-template-columns: 1fr 1fr; }
}
.step, .price-card, .form-card, .panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem 1.1rem 1.15rem;
  box-shadow: var(--shadow);
}
.step-num { font-family: var(--serif); font-size: 1.8rem; color: var(--wheat); margin: 0; }
.price-card.soon { background: #fffaf1; border-color: #e2c48a; }
.badge {
  display: inline-block;
  background: var(--wheat-soft);
  color: #6d4a12;
  font-weight: 750;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.85rem;
}
.price { font-family: var(--serif); font-size: 2rem; margin: 0.3rem 0; }
.county-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.county-grid a {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.75rem 0.85rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
}
.county-grid a:hover { border-color: var(--pine); }
.county-grid strong { font-weight: 650; }
.zero { color: var(--muted); }

.form-card { max-width: 42rem; }
.check { display: flex; gap: 0.65rem; align-items: flex-start; font-weight: 450; margin-top: 0.9rem; }
.check input { width: 1.15rem; height: 1.15rem; margin-top: 0.2rem; flex: none; }
.errors { color: var(--danger); font-weight: 700; min-height: 1.2em; }
.turnstile { min-height: 68px; margin: 0.8rem 0; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.5rem 0.65rem; border-bottom: 1px solid var(--line); vertical-align: top; }
td:first-child, th:first-child { white-space: nowrap; }
th { font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
tr:last-child td { border-bottom: 0; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem 0 2rem;
  color: var(--muted);
}
.site-footer a { color: var(--pine-deep); }
.footer-grid { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; justify-content: space-between; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
