.scr.civic {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 2.5rem;
}

.rp-hero {
  margin-bottom: 1.25rem;
}

.rp-back {
  display: inline-block;
  margin-bottom: 0.85rem;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}

.rp-back:hover {
  color: var(--primary);
}

.rp-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.rp-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin: 0 0 0.35rem;
  line-height: 1.1;
}

.rp-sub {
  margin: 0;
  color: var(--ink-2);
  font-size: 1rem;
  max-width: 58ch;
}

.rp-risk-chip {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  white-space: nowrap;
}

.rp-risk-label {
  font-family: var(--serif);
  font-size: 0.98rem;
}

.rp-risk-chip .badge.high {
  background: #f6e2cf;
  color: #8a4818;
}

.rp-risk-chip .badge.vlow { background: #e4ede8; color: var(--risk-vlow); }
.rp-risk-chip .badge.low { background: #edf4e6; color: var(--risk-low); }
.rp-risk-chip .badge.mod { background: #f8efd8; color: var(--risk-mod); }
.rp-risk-chip .badge.high { background: #f6e2cf; color: #8a4818; }
.rp-risk-chip .badge.vhigh { background: #fde0dc; color: var(--risk-vhigh); }

.rp-risk-chip .badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
}

.rp-row {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.filter-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
  position: relative;
  z-index: 2;
}

.filter-panel form {
  display: grid;
  gap: 1rem;
}

.fp-block {
  display: grid;
  gap: 0.45rem;
}

.fp-label {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

.panel-search-field {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.5rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
}

.panel-search-field .pin {
  color: var(--ink-3);
  display: inline-flex;
}

.panel-search-input {
  width: 100%;
  position: relative;
}

.panel-search-input input {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  padding: 0.35rem 0;
}

.panel-search-input input:focus {
  outline: none;
}

.select-field-wrap {
  position: relative;
}

.select-field {
  width: 100%;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-2);
  padding: 0.7rem 2rem 0.7rem 0.85rem;
  font: inherit;
}

.select-field-wrap .chev {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-3);
  pointer-events: none;
  font-size: 0.85rem;
}

.filter-check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.filter-check label {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
}

.filter-check input {
  margin: 0;
}

.fc-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.fc-dot.existing { background: var(--risk-vlow); }
.fc-dot.planned { background: var(--risk-mod); }
.fc-dot.proposed { background: var(--risk-high); }

.fc-count {
  font-size: 0.85rem;
  color: var(--ink-3);
  font-weight: 600;
}

.apply-btn {
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-weight: 600;
  padding: 0.75rem 1rem;
  cursor: pointer;
}

.apply-btn:hover {
  background: var(--primary-d);
}

.rp-map {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  min-height: 420px;
}

.map-shell,
#map {
  height: 100%;
  min-height: 420px;
}

.map-legend {
  position: absolute;
  left: 0.85rem;
  bottom: 0.85rem;
  z-index: 500;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  font-size: 0.82rem;
  color: var(--ink-2);
  display: grid;
  gap: 0.3rem;
  box-shadow: var(--shadow);
}

.map-legend-title {
  margin: 0 0 0.15rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

.lg-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.lg-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

.lg-dot.existing { background: var(--risk-vlow); }
.lg-dot.planned { background: var(--risk-mod); }
.lg-dot.proposed { background: var(--risk-high); }
.lg-dot.you { background: var(--primary); }
.lg-dot.radius {
  width: 12px;
  height: 12px;
  border: 2px solid var(--primary);
  background: rgba(22, 88, 76, 0.12);
}

.map-scale {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  z-index: 500;
  display: grid;
  gap: 0.2rem;
  justify-items: end;
  color: var(--ink-3);
  font-size: 0.72rem;
}

.scale-bar {
  display: block;
  width: 56px;
  height: 4px;
  background: var(--ink-2);
  border-radius: 999px;
}

.rp-results {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
}

.rp-results-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line-2);
}

.rp-sort-note {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

.rp-results-summary {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.92rem;
}

.result-list {
  display: grid;
  gap: 0.55rem;
}

.result-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem 0.65rem;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--paper-2);
}

.rr-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex-shrink: 0;
}

.rr-dot.existing { background: var(--risk-vlow); }
.rr-dot.planned { background: var(--risk-mod); }
.rr-dot.proposed { background: var(--risk-high); }

.rr-main h3 {
  margin: 0 0 0.15rem;
  font-size: 1rem;
  font-family: var(--serif);
}

.rr-meta {
  margin: 0;
  color: var(--ink-3);
  font-size: 0.88rem;
}

.rr-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.pill {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: #e4ede8;
  color: var(--risk-vlow);
}

.pill.amber {
  background: #f8efd8;
  color: #8a5d12;
}

.pill.gold {
  background: #fde8df;
  color: #8a4818;
}

.rr-dist {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
  white-space: nowrap;
}

.rr-link {
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  white-space: nowrap;
}

.rr-link:hover {
  text-decoration: underline;
}

.empty-state {
  padding: 1.25rem;
  color: var(--ink-2);
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--paper-2);
}

.status-line {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-3);
}

.status-line.notice-error {
  color: #7a2b24;
}

.suggestions {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-height: 240px;
  overflow-y: auto;
}

.suggestions li {
  padding: 0.6rem 0.8rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.suggestions li:hover,
.suggestions li.active {
  background: var(--primary-soft);
  color: var(--ink);
}

@media (min-width: 960px) {
  .rp-row {
    grid-template-columns: 300px 1fr;
    align-items: stretch;
  }

  .rp-map {
    min-height: 520px;
  }

  .map-shell,
  #map {
    min-height: 520px;
  }
}

@media (max-width: 720px) {
  .result-row {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "dot main"
      "tags tags"
      "dist link";
  }

  .rr-dot { grid-area: dot; }
  .rr-main { grid-area: main; }
  .rr-tags { grid-area: tags; justify-content: flex-start; }
  .rr-dist { grid-area: dist; }
  .rr-link { grid-area: link; justify-self: end; }
}
