*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; width: 100%; max-width: 100vw; margin: 0; overflow: hidden; }
body.map-home {
  --ink: #17332b;
  --ink-soft: #263d36;
  --paper: #fffaf0;
  --paper-warm: #f3ede2;
  --muted: #53645d;
  --line: rgba(23, 51, 43, 0.14);
  --focus: #f2c14e;
  --red: #B93829;
  --purple: #6B3FA0;
  --green: #1E6B4B;
  background: #17332b;
  color: var(--paper);
  font-family: 'Public Sans', Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
}

#map { position: fixed; inset: 0; background: #263d36; z-index: 1; }

.map-strip {
  position: fixed;
  z-index: 1000;
  inset: 0 0 auto;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  background: rgba(23, 51, 43, 0.96);
  border-bottom: 1px solid rgba(243, 237, 226, 0.14);
}

.account-dot, .help-button {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--paper-warm);
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.account-dot::before {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 8px 0 3px var(--ink);
  transform: translateY(-3px);
}
.help-button { font: 700 15px/1 ui-sans-serif, system-ui, sans-serif; }

.search-strip { position: relative; flex: 1; min-width: 0; }
.search-strip input {
  display: block;
  width: 100%;
  height: 34px;
  border: 0;
  border-radius: 17px;
  padding: 0 14px;
  background: #fffdf7;
  color: var(--ink);
  font: 400 14px/1 ui-sans-serif, system-ui, sans-serif;
  outline: 0;
}
.search-strip input:focus { box-shadow: 0 0 0 2px var(--focus); }

.search-examples {
  position: fixed;
  z-index: 1050;
  top: 48px;
  left: 50px;
  right: 50px;
  max-width: 440px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(23, 51, 43, 0.97);
  border: 1px solid rgba(243, 237, 226, 0.18);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}
.search-examples[hidden] { display: none; }
.account-menu {
  position: fixed;
  z-index: 1060;
  top: 48px;
  left: 8px;
  min-width: 190px;
  display: flex;
  flex-direction: column;
  padding: 6px;
  border-radius: 12px;
  background: rgba(23, 51, 43, 0.98);
  border: 1px solid rgba(243, 237, 226, 0.18);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}
.account-menu[hidden] { display: none; }
.account-menu a[hidden] { display: none; }
.account-menu a {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--paper);
  font: 500 15px/1.2 ui-sans-serif, system-ui, sans-serif;
  text-decoration: none;
}
.account-menu a:hover, .account-menu a:focus-visible { background: rgba(255, 250, 240, 0.12); outline: none; }
.example-chip {
  height: 28px;
  border: 1px solid rgba(243, 237, 226, 0.28);
  border-radius: 14px;
  padding: 0 10px;
  background: rgba(255, 250, 240, 0.1);
  color: var(--paper);
  font: 500 12px/1 ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
}

.map-summary-bar {
  position: fixed;
  z-index: 950;
  top: 48px;
  left: 0;
  right: 0;
  padding: 7px 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  background: rgba(23, 51, 43, 0.91);
  border-bottom: 1px solid rgba(243, 237, 226, 0.12);
}
.map-h1 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--paper);
}
.map-worth-line {
  margin: 0;
  font-size: 12px;
  line-height: 1.25;
  color: rgba(255, 250, 240, 0.86);
}
.map-worth-line strong { color: #f2c14e; font-weight: 600; font-variant-numeric: tabular-nums; }

.map-first-paint {
  position: absolute;
  z-index: 450;
  top: 96px;
  left: 12px;
  right: 12px;
  max-width: 520px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(23, 51, 43, 0.94);
  color: var(--paper);
  border: 1px solid rgba(243, 237, 226, 0.18);
  font-size: 13px;
  line-height: 1.45;
}
.map-first-paint[hidden] { display: none; }
.map-first-paint p { margin: 0 0 8px; }
.map-first-paint p:last-child { margin-bottom: 0; }
.map-first-paint a, .map-noscript a { color: #f3c969; text-underline-offset: 2px; }
.map-noscript {
  position: absolute;
  z-index: 460;
  bottom: 124px;
  left: 12px;
  right: 12px;
  max-width: 520px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
}

.map-legend {
  position: fixed;
  z-index: 900;
  left: 10px;
  right: 10px;
  bottom: 66px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  border: 1px solid rgba(243, 237, 226, 0.22);
  border-radius: 14px;
  padding: 5px 10px;
  background: rgba(23, 51, 43, 0.92);
  color: var(--paper);
  font: 500 11px/1 ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.24);
}
.legend-chip.is-muted { opacity: 0.48; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; border: 1.5px solid rgba(255, 250, 240, 0.88); }
.legend-dot.red { background: var(--red); }
.legend-dot.purple { background: var(--purple); }
.legend-dot.green { background: var(--green); }
.legend-dot.gold { background: #E0A91B; }
.legend-chip[hidden] { display: none; }

.map-handle {
  position: fixed;
  z-index: 1000;
  right: 0;
  bottom: 0;
  left: 0;
  height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  background: rgba(23, 51, 43, 0.97);
  color: var(--paper);
  font-size: 13px;
  line-height: 1.15;
  border-top: 1px solid rgba(243, 237, 226, 0.15);
  box-shadow: 0 -3px 14px rgba(0, 0, 0, 0.25);
}
.grip { width: 38px; height: 4px; border-radius: 4px; background: rgba(243, 237, 226, 0.5); }

.house-drawer {
  position: fixed;
  z-index: 1100;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 16px 18px;
  border-radius: 16px 16px 0 0;
  background: var(--paper);
  color: var(--ink);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.34);
}
.house-drawer[hidden] { display: none; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.drawer-kicker {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.drawer-addr { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.25; color: var(--ink); }
.drawer-close {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper-warm);
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.drawer-photo { margin: 10px 0 0; }
.drawer-photo[hidden] { display: none; }
.drawer-photo img { display: block; width: 100%; height: auto; aspect-ratio: 11 / 8; object-fit: cover; border-radius: 6px; background: #1b2b26; }
.drawer-photo figcaption { margin-top: 3px; font-size: 11px; line-height: 1.3; color: var(--ink); opacity: .7; }
.drawer-why { margin: 10px 0 4px; font-size: 14px; font-weight: 600; line-height: 1.38; color: var(--ink); }
.drawer-facts { margin: 0 0 4px; font-size: 13px; line-height: 1.38; color: var(--ink); font-variant-numeric: tabular-nums; }
.drawer-facts:empty { display: none; }
.drawer-lines, .hc-lines { display: grid; grid-template-columns: max-content 1fr; gap: 3px 10px; margin: 6px 0 8px; font-size: 13px; line-height: 1.35; }
.drawer-lines:empty, .hc-lines:empty { display: none; }
.drawer-lines dt, .hc-lines dt { color: var(--muted); font-size: 12px; padding-top: 1px; }
.drawer-lines dd, .hc-lines dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.house-hover { position: fixed; z-index: 1050; width: 320px; max-width: calc(100vw - 16px); padding: 10px 12px 10px; border-radius: 12px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); pointer-events: none; }
.house-hover[hidden] { display: none; }
.house-hover .hc-photos { display: flex; gap: 6px; margin-bottom: 8px; }
.house-hover .hc-photo { display: block; flex: 1 1 0; min-width: 0; width: 100%; height: auto; aspect-ratio: 11 / 8; object-fit: cover; border-radius: 6px; background: #1b2b26; }
.house-hover .hc-photo[hidden] { display: none; }
.drawer-streetlink { margin: 6px 0 0; font-size: 13px; }
.drawer-streetlink a { color: var(--ink); font-weight: 600; }
.drawer-streetlink a[hidden] { display: none; }
.house-hover .hc-addr { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.25; }
.house-hover .hc-why { margin: 3px 0 2px; font-size: 13px; font-weight: 600; line-height: 1.35; }
.house-hover .hc-wait, .house-hover .hc-foot { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
@media (hover: none) { .house-hover { display: none; } }
.drawer-src { margin: 0 0 10px; font-size: 12px; color: var(--muted); }
.drawer-offer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--paper-warm);
  border: 1px solid var(--line);
  font-size: 13px;
}
.drawer-offer strong { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--ink); }
.drawer-owner-slot { margin: 9px 0 12px; font-size: 12px; color: var(--muted); }
.drawer-owner-slot a { color: var(--ink); font-weight: 600; }
.drawer-actions { display: flex; gap: 8px; }
.drawer-btn {
  flex: 1;
  height: 42px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.drawer-btn.primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.map-dot {
  display: block;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 2.5px solid #fffaf0;
  border-radius: 50%;
  background: var(--dot-color);
  box-shadow: 0 2px 6px rgba(15, 36, 30, 0.62);
  cursor: pointer;
}
.map-dot.red { --dot-color: var(--red); }
.map-dot.purple { --dot-color: var(--purple); }
.map-dot.green { --dot-color: var(--green); }
.map-dot.gray { --dot-color: #aeb6b1; }
.map-dot.gold { --dot-color: #E0A91B; }
.dot-cluster {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2.5px solid #fffaf0;
  border-radius: 50%;
  background: var(--cluster-color);
  color: #fffaf0;
  font: 700 11px/1 ui-sans-serif, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 6px rgba(15, 36, 30, 0.62);
}
.leaflet-container .leaflet-control-attribution { background: rgba(23, 51, 43, 0.88); color: #e5ddd0; font-size: 10px; line-height: 24px; padding: 0 6px; }
.leaflet-container .leaflet-control-attribution a { color: #e5ddd0; display: inline-flex; align-items: center; min-height: 24px; min-width: 24px; }

@media (min-width: 1024px) {
  .map-summary-bar {
    top: 60px;
    left: 12px;
    right: auto;
    width: 452px;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(243, 237, 226, 0.18);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.24);
  }
  .map-h1 { font-size: 16px; }
  .map-handle {
    left: 12px;
    right: auto;
    bottom: 12px;
    width: 452px;
    height: 44px;
    border-radius: 10px;
    align-items: flex-start;
    padding: 0 16px;
    border: 1px solid rgba(243, 237, 226, 0.18);
    font-variant-numeric: tabular-nums;
  }
  .map-handle .grip { display: none; }
  .map-legend { left: 478px; right: auto; bottom: 16px; max-width: calc(100vw - 494px); }
  .house-drawer {
    left: 12px;
    right: auto;
    bottom: 64px;
    width: 452px;
    border-radius: 12px;
    border: 1px solid var(--line);
  }
}

/* ---- light glass (James, 2026-11-11: "Yes, light glass"; docs/REDESIGN-REFERENCES.md) ----
   The map is the picture; everything pinned over it is frosted glass. Tokens come from kit/frame.css (--gl-*). */
body.map-home {
  --ink: #14161b; --ink-soft: #2a2e37; --paper: rgba(255, 255, 255, .88); --paper-warm: rgba(255, 255, 255, .72);
  --muted: rgba(20, 22, 27, .62); --line: rgba(20, 22, 27, .12); --focus: #2f5bff;
  --red: #d6453a; --purple: #7a4cf0; --green: #12a15a;
  background: #e9edf5; color: #14161b; font-family: var(--gl-font, "Outfit", system-ui, sans-serif);
}
body.map-home #map { background: #dfe5ee; }
/* a light veil over the aerial photo, under the dots: the picture goes soft, the houses stay vivid */
body.map-home #map::after { content: ""; position: absolute; inset: 0; z-index: 350; pointer-events: none; background: linear-gradient(180deg, rgba(236, 240, 247, .50), rgba(236, 240, 247, .22) 42%, rgba(236, 240, 247, .50)); }
body.map-home .map-strip { background: transparent; border: 0; }
body.map-home .search-strip input, body.map-home .account-dot, body.map-home .help-button, body.map-home .map-summary-bar,
body.map-home .legend-chip, body.map-home .map-handle, body.map-home .map-tile, body.map-home .search-examples,
body.map-home .account-menu, body.map-home .map-first-paint, body.map-home .house-drawer, body.map-home .house-hover {
  background: var(--gl-glass, rgba(255, 255, 255, .72)); border: 1px solid var(--gl-edge, rgba(255, 255, 255, .9));
  -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 0 24px 60px rgba(40, 52, 84, .20), inset 0 1px 0 rgba(255, 255, 255, .6); color: #14161b;
}
body.map-home .search-strip input { border-radius: 999px; padding-left: 18px; font-family: inherit; }
body.map-home .search-strip input::placeholder { color: rgba(20, 22, 27, .46); }
body.map-home .account-dot, body.map-home .help-button { border-radius: 50%; font-family: inherit; font-weight: 500; }
body.map-home .map-h1 { color: #14161b; font-family: inherit; font-weight: 500; }
body.map-home .map-worth-line { color: rgba(20, 22, 27, .66); }
body.map-home .map-worth-line strong { color: #2f5bff; font-weight: 500; }
body.map-home .account-menu, body.map-home .search-examples { border-radius: 20px; }
body.map-home .account-menu a { color: #14161b; font-family: inherit; border-radius: 12px; }
body.map-home .account-menu a:hover, body.map-home .account-menu a:focus-visible { background: rgba(20, 22, 27, .06); }
body.map-home .example-chip { border: 1px solid rgba(20, 22, 27, .14); background: rgba(255, 255, 255, .7); color: #14161b; border-radius: 999px; font-family: inherit; }
body.map-home .map-first-paint { border-radius: 22px; }
body.map-home .map-first-paint a, body.map-home .map-noscript a { color: #2148d8; }
body.map-home .legend-chip { border-radius: 999px; font-family: inherit; font-size: 12.5px; padding: 9px 14px; box-shadow: 0 10px 26px rgba(40, 52, 84, .16); }
body.map-home .legend-dot { border-color: #fff; }
body.map-home .legend-dot.gold, body.map-home .map-dot.gold { --dot-color: #d99a00; background: #d99a00; }
body.map-home .map-handle { border-radius: 999px; font-family: inherit; color: rgba(20, 22, 27, .7); }
body.map-home .grip { background: rgba(20, 22, 27, .22); }
body.map-home .house-drawer, body.map-home .house-hover { background: rgba(255, 255, 255, .9); border-radius: 24px; }
body.map-home .house-hover { border-radius: 20px; }
body.map-home .drawer-photo img, body.map-home .house-hover .hc-photo { border-radius: 14px; background: #dfe5ee; }
body.map-home .drawer-close { border-radius: 50%; background: rgba(20, 22, 27, .06); border-color: transparent; }
body.map-home .drawer-btn { border-radius: 999px; font-family: inherit; }
body.map-home .drawer-btn.primary { background: #14161b; border-color: #14161b; color: #fff; }
body.map-home .drawer-offer { background: rgba(47, 91, 255, .07); border-color: rgba(47, 91, 255, .18); border-radius: 16px; }
body.map-home .drawer-offer strong { font-family: inherit; }
body.map-home .map-dot, body.map-home .dot-cluster { border-color: #fff; box-shadow: 0 2px 8px rgba(20, 22, 27, .38); }
body.map-home .leaflet-container .leaflet-control-attribution { background: rgba(255, 255, 255, .62); color: rgba(20, 22, 27, .6); border-radius: 10px 0 0 0; }
body.map-home .leaflet-container .leaflet-control-attribution a { color: rgba(20, 22, 27, .6); }
body.map-home .leaflet-bar { border: 1px solid rgba(255, 255, 255, .9); border-radius: 16px; overflow: hidden; box-shadow: 0 16px 40px rgba(40, 52, 84, .18); }
body.map-home .leaflet-bar a { background: rgba(255, 255, 255, .78); color: #14161b; -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-bottom-color: rgba(20, 22, 27, .08); width: 38px; height: 38px; line-height: 38px; }
/* the counts, one big number each */
.map-tiles { display: none; }
.map-tile { border-radius: 22px; padding: 14px 16px 15px; min-height: 104px; display: flex; flex-direction: column; }
.map-tile[hidden] { display: none; }
.map-tile .tile-lab { font-size: 12.5px; color: rgba(20, 22, 27, .66); display: flex; align-items: center; gap: 7px; }
.map-tile .tile-lab .legend-dot { flex: none; }
.map-tile .tile-num { font-size: 32px; font-weight: 500; line-height: 1.05; margin-top: auto; font-variant-numeric: tabular-nums; }
.map-tile .tile-sub { font-size: 12px; color: rgba(20, 22, 27, .46); margin-top: 3px; }
body.map-home .map-tile.is-main { background: linear-gradient(145deg, rgba(47, 91, 255, .94), rgba(86, 124, 255, .82)); color: #fff; }
.map-tile.is-main .tile-lab, .map-tile.is-main .tile-sub { color: rgba(255, 255, 255, .84); }

@media (min-width: 1024px) {
  /* each pinned piece floats by itself, clear of the rail (kit/frame.css) and of the screen edge */
  html:root body.map-home .map-strip { inset: 16px 16px auto var(--gl-rail, 248px); height: 52px; padding: 0; display: flex; align-items: center; gap: 12px; }
  html:root body.map-home .search-strip { order: 1; flex: 0 1 440px; }
  html:root body.map-home .search-strip input { height: 50px; font-size: 14.5px; }
  html:root body.map-home .help-button { order: 2; margin-left: auto; width: 50px; height: 50px; flex: none; }
  html:root body.map-home .account-dot { order: 3; width: 50px; height: 50px; flex: none; }
  html:root body.map-home .account-menu { top: 78px; left: auto; right: 16px; }
  html:root body.map-home .search-examples { top: 78px; left: var(--gl-rail, 248px); right: auto; }
  html:root body.map-home .map-summary-bar {
    top: 84px; right: 16px; left: auto; width: 328px; padding: 13px 16px 14px; gap: 4px; border-radius: 22px;
    flex-direction: column; align-items: flex-start;
  }
  html:root body.map-home .map-h1 { font-size: 17px; letter-spacing: -.2px; line-height: 1.25; margin: 0; }
  html:root body.map-home .map-worth-line { font-size: 13px; line-height: 1.35; margin: 0; color: rgba(20, 22, 27, .7); }
  html:root body.map-home .map-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; position: fixed; z-index: 1040; top: 190px; right: 16px; width: 328px; }
  html:root body.map-home .map-first-paint { left: calc(var(--gl-rail, 248px) + 4px); right: 360px; top: 84px; }
  html:root body.map-home .map-noscript { left: calc(var(--gl-rail, 248px) + 4px); }
  html:root body.map-home .map-legend { left: var(--gl-rail, 248px); right: 360px; bottom: 76px; max-width: none; }
  html:root body.map-home .map-handle { left: var(--gl-rail, 248px); right: auto; bottom: 16px; width: auto; max-width: calc(100vw - var(--gl-rail, 248px) - 376px); height: 46px; padding: 0 20px; align-items: center; }
  html:root body.map-home .house-drawer { left: var(--gl-rail, 248px); right: auto; bottom: 76px; }
  html:root body.map-home .leaflet-bottom.leaflet-right { right: 8px; bottom: 6px; }
}

body.map-home #map.leaflet-container .browse-county {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
