:root {
  --navy: #074a83;
  --navy-dark: #053762;
  --gold: #ddb329;
  --gold-dark: #9b7610;
  --ink: #243449;
  --muted: #647184;
  --paper: #f3f6f9;
  --line: #d9e1e9;
  --white: #fff;
  --shadow: 0 12px 30px rgba(12, 55, 91, .12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Arial, Helvetica, sans-serif; }
button, input { font: inherit; }
.wrap { width: min(1120px, calc(100% - 30px)); margin: 0 auto; }
.hero { position: relative; overflow: hidden; color: white; background: linear-gradient(135deg, var(--navy-dark), var(--navy)); border-bottom: 7px solid var(--gold); }
.hero::after { position: absolute; right: -130px; bottom: -250px; width: 500px; height: 500px; content: ""; border: 85px solid rgba(255,255,255,.045); border-radius: 50%; }
.hero-inner { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 34px 0; }
.eyebrow { margin: 0 0 8px; color: #f6d96e; font-size: .75rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.35rem); line-height: 1.04; letter-spacing: -.03em; }
.hero-copy { max-width: 720px; margin: 13px 0 0; color: #e4edf6; font-size: 1.02rem; line-height: 1.55; }
.hero-aside { flex: 0 0 320px; display: flex; align-items: center; gap: 14px; }
.mac-logo { display: block; width: 122px; height: 122px; object-fit: cover; border-radius: 50%; clip-path: circle(49% at 50% 50%); filter: drop-shadow(0 9px 14px rgba(0,0,0,.28)); }
.hero-stat { flex: 1 1 170px; padding: 18px; color: var(--navy); background: white; border-top: 6px solid var(--gold); border-radius: 10px; box-shadow: 0 14px 30px rgba(0,0,0,.2); text-align: center; }
.hero-stat strong { display: block; font-size: 2.5rem; line-height: 1; }
.hero-stat span { display: block; margin-top: 7px; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
main { padding: 24px 0 36px; }
.controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 24px; padding: 22px; background: white; border: 1px solid var(--line); border-top: 6px solid var(--gold); border-radius: 12px 12px 0 0; box-shadow: var(--shadow); }
.control-copy h2 { margin: 0; color: var(--navy); font-size: 1.35rem; }
.control-copy p { max-width: 700px; margin: 7px 0 0; color: var(--muted); font-size: .92rem; line-height: 1.5; }
.view-switch { display: flex; align-items: center; gap: 8px; }
.view-button { min-height: 44px; padding: 10px 15px; color: var(--navy); background: white; border: 1px solid var(--navy); border-radius: 6px; font-size: .82rem; font-weight: 800; cursor: pointer; }
.view-button:hover, .view-button.active { color: white; background: var(--navy); }
.search-field { grid-column: 1 / 2; }
.search-field span { display: block; margin: 0 0 7px; color: var(--navy); font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.search-field input { width: 100%; min-height: 46px; padding: 11px 13px; color: var(--ink); background: white; border: 1px solid #aeb9c5; border-radius: 6px; }
.search-field input:focus { border-color: var(--navy); outline: 3px solid rgba(7,74,131,.14); }
.search-results { grid-column: 1 / -1; display: none; gap: 7px; max-height: 155px; overflow: auto; padding: 10px; background: #f7f9fb; border: 1px solid var(--line); border-radius: 7px; }
.search-results.open { display: grid; }
.result-button { padding: 9px 11px; color: var(--navy); background: white; border: 1px solid var(--line); border-radius: 5px; text-align: left; cursor: pointer; }
.result-button:hover { color: white; background: var(--navy); }
.map-card { position: relative; overflow: hidden; background: white; border: 1px solid var(--line); border-top: 0; box-shadow: var(--shadow); }
#map { width: 100%; height: 660px; min-height: 520px; background: #dfe9f1; }
.map-key { position: absolute; z-index: 500; left: 14px; bottom: 14px; padding: 9px 12px; color: var(--ink); background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 5px; box-shadow: 0 5px 15px rgba(0,0,0,.12); font-size: .78rem; font-weight: 700; }
.key-dot { display: inline-block; width: 12px; height: 12px; margin-right: 7px; background: var(--gold); border: 2px solid var(--navy); border-radius: 50%; vertical-align: -2px; }
.information-bar { display: grid; grid-template-columns: 1fr 1.4fr; gap: 1px; overflow: hidden; background: var(--line); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px; box-shadow: var(--shadow); }
.information-bar div { padding: 17px 19px; background: white; }
.information-bar strong, .information-bar span { display: block; }
.information-bar strong { color: var(--navy); font-size: .82rem; }
.information-bar span { margin-top: 5px; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.member-marker { display: grid; width: 24px !important; height: 24px !important; margin: -12px 0 0 -12px !important; place-items: center; color: white; background: var(--gold); border: 3px solid var(--navy); border-radius: 50%; box-shadow: 0 3px 9px rgba(0,0,0,.34); }
.member-marker::after { width: 5px; height: 5px; content: ""; background: white; border-radius: 50%; }
.leaflet-popup-content-wrapper { border-radius: 7px; }
.leaflet-popup-content { min-width: 210px; margin: 15px 17px; }
.popup-name { color: var(--navy); font-size: 1rem; font-weight: 800; line-height: 1.3; }
.popup-county { margin-top: 6px; color: var(--muted); font-size: .84rem; }
.leaflet-control-zoom a { color: var(--navy); }
@media (max-width: 760px) {
  .hero-inner { align-items: flex-start; padding: 26px 0; }
  .hero-aside { flex-basis: 225px; }
  .mac-logo { width: 92px; height: 92px; }
  .hero-stat { padding: 14px 10px; }
  .controls { grid-template-columns: 1fr; }
  .view-switch, .search-field { grid-column: 1; }
  .view-switch { flex-wrap: wrap; }
  #map { height: 560px; }
  .information-bar { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .hero-inner { display: block; }
  .hero-aside { margin-top: 20px; }
  .view-button { flex: 1 1 150px; }
  #map { height: 520px; min-height: 480px; }
}
