:root {
  --ink: #10241f;
  --muted: #65756f;
  --paper: #f4f1e8;
  --card: rgba(255, 254, 248, 0.92);
  --forest: #1d684d;
  --forest-dark: #104834;
  --lime: #c9f06b;
  --line: rgba(16, 36, 31, 0.14);
  --shadow: 0 30px 80px rgba(24, 50, 42, 0.13);
}

* { box-sizing: border-box; }

html { min-height: 100%; scroll-behavior: smooth; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: 'Manrope', sans-serif;
  overflow-x: hidden;
}

.terrain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 82% 18%, rgba(201, 240, 107, 0.2), transparent 28rem),
    radial-gradient(circle at 12% 82%, rgba(29, 104, 77, 0.08), transparent 32rem),
    repeating-radial-gradient(ellipse at 88% 38%, transparent 0 34px, rgba(29, 104, 77, 0.045) 35px 36px, transparent 37px 53px);
  opacity: 0.9;
}

.site-header,
main,
footer {
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  min-height: 108px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  gap: 13px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50% 50% 48% 52% / 46% 46% 54% 54%;
  color: white;
  background: var(--forest);
  font: 500 20px/1 'DM Mono', monospace;
  box-shadow: inset 0 0 0 5px rgba(255,255,255,.12);
}

.brand strong,
.brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: .08em; text-transform: uppercase; }
.brand small { margin-top: 2px; color: var(--muted); font: 400 10px/1.2 'DM Mono', monospace; letter-spacing: .05em; }

.local-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font: 500 11px/1 'DM Mono', monospace;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.local-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--forest); box-shadow: 0 0 0 4px rgba(29,104,77,.12); }

main { padding: 86px 0 54px; }
.intro { max-width: 820px; animation: rise .7s ease both; }
.eyebrow { margin: 0 0 22px; color: var(--forest); font: 500 12px/1 'DM Mono', monospace; letter-spacing: .11em; text-transform: uppercase; }

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(48px, 7vw, 90px);
  line-height: .96;
  letter-spacing: -.06em;
  font-weight: 600;
}

h1 em { color: var(--forest); font-style: normal; position: relative; }
h1 em::after { content: ''; position: absolute; left: 3%; right: -3%; bottom: 3px; height: 10px; z-index: -1; background: var(--lime); transform: rotate(-1deg); border-radius: 50%; }
.lede { max-width: 590px; margin: 30px 0 0; color: var(--muted); font-size: 17px; line-height: 1.7; }

.search-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr);
  gap: 0;
  margin-top: 64px;
  box-shadow: var(--shadow);
  animation: rise .7s .12s ease both;
}

.search-card {
  position: relative;
  z-index: 2;
  min-height: 258px;
  padding: 36px 42px 40px;
  background: var(--card);
  border: 1px solid rgba(16,36,31,.1);
  backdrop-filter: blur(12px);
}

.search-card label { display: block; margin-bottom: 15px; font: 500 11px/1 'DM Mono', monospace; letter-spacing: .11em; text-transform: uppercase; }
.input-wrap { position: relative; }
.input-wrap svg { position: absolute; left: 0; top: 20px; width: 25px; fill: none; stroke: var(--forest); stroke-width: 1.8; }

input[type='search'] {
  width: 100%;
  height: 68px;
  padding: 0 48px 0 42px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--ink);
  border-radius: 0;
  outline: none;
  font: 600 clamp(22px, 3vw, 34px)/1 'Manrope', sans-serif;
  letter-spacing: -.03em;
  appearance: none;
}
input[type='search']::placeholder { color: #a8b0ab; }
input[type='search']:focus { border-color: var(--forest); }
input[type='search']::-webkit-search-cancel-button { display: none; }

.clear-button { position: absolute; right: 0; top: 13px; width: 42px; height: 42px; border: 0; border-radius: 50%; color: var(--muted); background: transparent; font-size: 27px; cursor: pointer; opacity: 0; pointer-events: none; }
.clear-button.visible { opacity: 1; pointer-events: auto; }
.clear-button:hover, .clear-button:focus-visible { color: var(--ink); background: rgba(16,36,31,.07); outline: none; }
.hint { margin: 16px 0 0 42px; color: var(--muted); font-size: 12px; }

.suggestions {
  position: absolute;
  z-index: 10;
  top: 142px;
  left: 42px;
  right: 42px;
  max-height: 392px;
  overflow-y: auto;
  background: #fffef8;
  border: 1px solid var(--line);
  box-shadow: 0 22px 50px rgba(16,36,31,.16);
}
.suggestion {
  width: 100%;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 14px 18px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(16,36,31,.08);
  cursor: pointer;
}
.suggestion:last-child { border-bottom: 0; }
.suggestion:hover, .suggestion.active { background: rgba(201,240,107,.24); }
.suggestion:focus { outline: none; }
.road-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--forest); background: rgba(29,104,77,.09); font: 500 12px/1 'DM Mono', monospace; }
.suggestion strong { display: block; font-size: 15px; }
.suggestion small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.district-chip { padding: 7px 10px; color: var(--forest-dark); background: rgba(29,104,77,.08); border-radius: 100px; font: 500 10px/1 'DM Mono', monospace; white-space: nowrap; }
.no-results { padding: 24px; color: var(--muted); font-size: 13px; }

.selection {
  min-height: 258px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 38px;
  color: white;
  background: var(--forest-dark);
}
.selection-pin { flex: 0 0 auto; width: 58px; height: 70px; display: grid; place-items: start center; border: 1px solid rgba(255,255,255,.22); border-radius: 45% 45% 50% 50% / 38% 38% 62% 62%; padding-top: 15px; }
.selection-pin span { width: 16px; height: 16px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 6px rgba(201,240,107,.15); }
.selection-label { margin: 0 0 10px; color: rgba(255,255,255,.58); font: 500 10px/1 'DM Mono', monospace; letter-spacing: .1em; text-transform: uppercase; }
.selection-empty { margin: 0; max-width: 180px; color: rgba(255,255,255,.72); font-size: 14px; line-height: 1.5; }
.selection-value strong, .selection-value b, .selection-value span { display: block; }
.selection-value strong { font-size: 19px; line-height: 1.25; }
.selection-value span { margin: 11px 0 3px; color: rgba(255,255,255,.62); font-size: 12px; }
.selection-value b { color: var(--lime); font-size: 25px; line-height: 1.1; letter-spacing: -.03em; }

.facts { display: flex; gap: 52px; margin-top: 32px; padding-left: 2px; animation: rise .7s .22s ease both; }
.facts div { display: flex; align-items: baseline; gap: 8px; }
.facts strong { font: 500 18px/1 'DM Mono', monospace; }
.facts span { color: var(--muted); font-size: 11px; }

footer { min-height: 92px; display: flex; justify-content: space-between; align-items: center; gap: 20px; color: var(--muted); border-top: 1px solid var(--line); font: 400 10px/1.4 'DM Mono', monospace; }
footer a { color: var(--forest); }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@media (max-width: 760px) {
  .site-header, main, footer { width: min(100% - 28px, 1160px); }
  .site-header { min-height: 84px; }
  main { padding-top: 58px; }
  .search-shell { grid-template-columns: 1fr; margin-top: 44px; }
  .search-card { min-height: 230px; padding: 28px 22px 32px; }
  .suggestions { left: 22px; right: 22px; top: 132px; }
  .selection { min-height: 178px; padding: 28px; }
  .facts { gap: 22px; justify-content: space-between; }
  .facts div { display: block; }
  .facts span { display: block; margin-top: 6px; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; }
  .district-chip { max-width: 105px; overflow: hidden; text-overflow: ellipsis; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
