:root {
  --bg: #1c232b;
  --panel: #f6f4ef;
  --ink: #1c232b;
  --muted: #5c656e;
  --line: #d9d3c7;
  --public: #b03a2e;
  --private: #1a5276;
  --early: #a07d0a;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font: 14px/1.4 "Segoe UI", Liberation Sans, sans-serif;
  color: var(--ink);
  display: flex;
  flex-direction: column;
}
header {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--bg);
  color: #f6f4ef;
  padding: 8px 14px;
}
.brand strong { font-size: 16px; letter-spacing: 0.01em; }
.brand .muted, header .muted { color: #c5cdc6; margin-left: 8px; }
.search { position: relative; flex: 1; max-width: 460px; }
.search input {
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
}
#hits {
  position: absolute;
  z-index: 1000;
  top: 36px;
  left: 0;
  right: 0;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: white;
  color: var(--ink);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  max-height: 320px;
  overflow: auto;
}
#hits button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 7px 12px;
  font: inherit;
  cursor: pointer;
}
#hits button:hover { background: #f3efe6; }
#hits small { color: var(--muted); }
#panel-toggle { display: none; }
#layout { flex: 1; display: flex; min-height: 0; }
#panel {
  width: 320px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  overflow: auto;
  padding: 12px 14px 24px;
}
#map { flex: 1; min-width: 0; background: #e7e2d8; }
.note { margin: 0 0 10px; }
.fine, .muted { color: var(--muted); }
.fine { font-size: 12px; }
.filters, .row { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 10px; }
.filters label, .row { align-items: center; }
.sw {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 4px;
}
.sw.public { background: var(--public); }
.sw.private { background: var(--private); }
.sw.early { background: var(--early); }
button {
  font: inherit;
  border: 1px solid var(--line);
  background: white;
  border-radius: 5px;
  padding: 4px 8px;
  cursor: pointer;
}
#counties { list-style: none; margin: 0; padding: 0; }
#counties li.letter { border-top: 1px solid var(--line); padding: 0; }
#counties details > ul { list-style: none; margin: 0; padding: 0 0 6px 8px; }
#counties details li { border-top: 0; padding: 6px 0; }
#counties summary {
  cursor: pointer;
  font-weight: 650;
  padding: 8px 0;
  color: var(--ink);
}
#counties label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
#counties .meta { color: var(--muted); font-size: 12px; }
#status {
  position: absolute;
  z-index: 800;
  left: 336px;
  bottom: 12px;
  background: rgba(255,255,255,.92);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--muted);
}
.popup b { font-size: 14px; }
.popup .src { margin-top: 6px; font-size: 12px; color: #5c656e; }
@media (max-width: 640px) {
  #panel-toggle { display: inline-block; color: inherit; border-color: #445; background: transparent; }
  #panel { display: none; position: absolute; z-index: 900; top: 48px; bottom: 0; left: 0; }
  #panel.open { display: block; }
  #status { left: 12px; }
}
