/* Research uses the same chrome and palette as the main Holons site. */
:root {
  --ink: #0b0b0b;
  --muted: #6b665b;
  --olive: #0b0b0b;
  --line: rgba(35, 42, 38, 0.13);
  --line-strong: rgba(35, 42, 38, 0.28);
  --cream: #f6f0e4;
  --white: #fffdf8;
  --sand: #e9e2d5;
  --accent: #0b0b0b;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

#atlasTopbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  height: 56px;
  background: rgba(250, 245, 234, 0.9);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
}

#atlasTopbar .brandmark {
  display: flex;
  align-items: center;
  justify-self: start;
  gap: 9px;
  flex: none;
  margin-right: 10px;
  padding-left: 18px;
  padding-right: 14px;
  color: var(--ink);
  text-decoration: none;
}

#atlasTopbar .brandmark:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -4px;
}

#atlasTopbar .brandword {
  display: flex;
  align-items: center;
  line-height: 1.1;
}

#atlasTopbar .brandname {
  color: var(--ink);
  font: 600 20px var(--display);
  letter-spacing: -0.035em;
  text-transform: lowercase;
  white-space: nowrap;
}

#atlasTopbar .topTabs {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  width: auto;
  min-width: 0;
  height: 56px;
  padding: 0 12px;
  gap: 2px;
  overflow-x: auto;
  background: transparent;
  border: 0;
  scrollbar-width: none;
}

#atlasTopbar .topTabs::-webkit-scrollbar { display: none; }

#atlasTopbar .topTab {
  display: inline-flex;
  align-items: center;
  flex: none;
  height: 34px;
  margin: 11px 0;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 500 13px var(--sans);
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}

#atlasTopbar .topTab:hover {
  background: #efe6d7;
  color: var(--ink);
}

#atlasTopbar .topTab[aria-current="page"] {
  background: var(--ink);
  color: var(--cream);
}

#atlasTopbar .topactions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
  flex: none;
  margin-left: 0;
  padding: 0 20px 0 16px;
  border-left: 1px solid var(--line);
}

#atlasTopbar .topbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font: 500 12px var(--sans);
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

#atlasTopbar .topbtn:hover {
  background: #efe6d7;
  border-color: var(--line-strong);
}

#atlasTopbar .topbtn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#atlasTopbar .topbtn.primary {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--cream);
  font-weight: 700;
}

#atlasTopbar .topbtn.primary:hover {
  border-color: #242424;
  background: #242424;
  color: var(--cream);
}

@media (max-width: 1279px) {
  #atlasTopbar { display: flex; }
  #atlasTopbar .topTabs {
    flex: 1 1 auto;
    justify-content: flex-start;
    padding: 0 20px;
  }
  #atlasTopbar .topactions { margin-left: auto; }
}

@media (max-width: 820px) {
  #atlasTopbar .brandword { display: none; }
  #atlasTopbar .brandmark {
    margin-right: 4px;
    padding-right: 0;
    border-right: 0;
  }
}

@media (max-width: 620px) {
  #atlasTopbar .topactions { padding: 0 12px 0 10px; gap: 6px; }
  #atlasTopbar .topbtn { height: 30px; padding: 0 11px; font-size: 11.5px; }
}

@media (min-width: 721px) {
  body > .sidebar {
    top: 56px;
    padding-top: 22px;
  }
}

/* ---------- monochrome atlas surfaces ---------- */
body > .sidebar {
  background: #f0e9dd;
  border-right-color: var(--line);
}

.sidebar .nav button.active {
  background: var(--ink);
  color: #fff;
}

.sidebar .nav-caption,
.sidebar .side-bottom p { color: var(--muted); }

.dot { background: var(--ink); }

.hero { background: #d1c7b7; }
.hero:after {
  background: linear-gradient(90deg, rgba(11, 11, 11, 0.72), transparent 75%);
}
.hero-copy span { color: rgba(246, 240, 228, 0.74); }

.card:hover { box-shadow: 0 8px 25px rgba(11, 11, 11, 0.08); }
.card-photo .label { background: rgba(255, 253, 248, 0.92); }
.metrics { border-top-color: var(--line); }
.fav.on { color: var(--ink); }
.flag {
  color: #5f5a50;
  background: #eee8dc;
}
.clean {
  color: #5f5a50;
  background: #e9e3d7;
}

.notice {
  border-color: #d9d2c5;
  background: #f1ebdf;
  color: var(--muted);
}

.map-panel, .real-map { background: #ebe4d8; }
.map-panel [data-id]:hover circle { fill: var(--ink); }
.parcel-number {
  border-color: var(--cream);
  background: var(--ink);
}
.leaflet-container a,
.leaflet-control-attribution a { color: var(--ink); }
.leaflet-attribution-flag { filter: grayscale(1); }
.screen-note { color: var(--muted); }
.screening-banner {
  border-color: #d9d2c5;
  background: #eee8dc;
}
.screening-banner.hold,
.screening-banner.excluded {
  border-color: #d3cabd;
  background: #e9e3d7;
}
.score-pill {
  background: #e9e3d7;
  color: var(--ink);
}

.overlay { background: rgba(11, 11, 11, 0.4); }
.lightbox { background: rgba(11, 11, 11, 0.97); }
.lightbox-caption { color: rgba(246, 240, 228, 0.72); }
.about p { color: var(--muted); }
.parcel-svg { background: #ece5d9; }

.mobile-nav { background: rgba(250, 245, 234, 0.96); }
.mobile-nav button.active { color: var(--ink); }

.badge {
  background: #eee8dc;
  color: #5f5a50;
}

/* Inline SVG diagrams use tonal fills instead of green and terracotta. */
.map-panel svg [fill="#516c48"] { fill: var(--ink); }
.map-panel svg [fill="#ad795a"] { fill: #8b8478; }
.map-panel svg [fill="#58654b"],
.map-panel svg [fill="#68725f"],
.map-panel svg [fill="#7d826d"] { fill: var(--muted); }
.map-panel svg [stroke="#58654b"],
.map-panel svg [stroke="#536e4b"] { stroke: var(--muted); }
.map-panel svg [stroke="#d7d9c8"] { stroke: #ddd5c7; }

.parcel-svg [fill="#bcc4b1"] { fill: #cfc7b8; }
.parcel-svg [fill="#d2dec3"] { fill: #e3dbcc; }
.parcel-svg [fill="#536e4b"] { fill: var(--ink); }
.parcel-svg [stroke="#536e4b"] { stroke: var(--ink); }
.parcel-svg [fill="#68725f"] { fill: var(--muted); }
