:root {
  --paper: #f4ead6;
  --paper-deep: #ead7b7;
  --ink: #17213d;
  --muted: #695f53;
  --red: #b4362c;
  --red-dark: #7d1f1a;
  --gold: #c99a3b;
  --line: rgba(23, 33, 61, 0.16);
  --shadow: 0 24px 80px rgba(49, 36, 20, 0.22);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  color: var(--ink);
  font-family: "Source Sans 3", system-ui, sans-serif;
  background:
    radial-gradient(circle at 20% 10%, rgba(201, 154, 59, 0.16), transparent 30%),
    linear-gradient(135deg, #fbf6eb 0%, var(--paper) 48%, #efe0c3 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(90deg, rgba(23, 33, 61, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(23, 33, 61, 0.04) 1px, transparent 1px);
  background-size: 19px 19px;
  mix-blend-mode: multiply;
  z-index: 3;
}

.atlas-shell {
  display: grid;
  grid-template-columns: minmax(340px, 410px) 1fr;
  min-height: 100vh;
}

.panel {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 100vh;
  padding: 1.35rem;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: rgba(250, 246, 238, 0.88);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.brand-row {
  display: flex;
  gap: 0.9rem;
  align-items: center;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 3.25rem;
  aspect-ratio: 1;
  color: #fff;
  font: 700 1.05rem "Cormorant Garamond", serif;
  background: var(--red);
  border: 2px solid rgba(255, 255, 255, 0.74);
  box-shadow: 0 12px 24px rgba(180, 54, 44, 0.24);
  clip-path: polygon(50% 0%, 92% 18%, 92% 72%, 50% 100%, 8% 72%, 8% 18%);
}

.eyebrow,
.detail-kicker {
  margin: 0;
  color: var(--red-dark);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.94;
}

.intro {
  max-width: 34rem;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
}

.intro a {
  color: var(--red-dark);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

.intro a:hover {
  color: var(--red);
}

.intro + .intro {
  margin-top: -0.35rem;
}

.info-sections {
  display: grid;
  gap: 0.55rem;
}

.info-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.58);
  overflow: hidden;
}

.info-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 2.45rem;
  padding: 0 0.85rem;
  color: var(--red-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}

.info-section summary::-webkit-details-marker {
  display: none;
}

.info-section summary::after {
  content: "+";
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
}

.info-section[open] summary::after {
  content: "−";
}

.info-copy {
  display: grid;
  gap: 0.65rem;
  padding: 0 0.85rem 0.85rem;
}

.info-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.43;
}

.info-copy a {
  color: var(--red-dark);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

.info-copy a:hover {
  color: var(--red);
}

.search-wrap,
.filter-wrap {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  border: 0;
}

.filter-wrap legend {
  padding: 0;
}

.filter-wrap[hidden] {
  display: none;
}

.search-wrap input {
  width: 100%;
  min-height: 2.8rem;
  padding: 0 0.9rem;
  color: var(--ink);
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf0;
  outline: none;
}

.feature-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.feature-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  min-height: 2rem;
  padding: 0 0.55rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.68);
  cursor: pointer;
}

.feature-filter-pill input {
  width: 0.9rem;
  height: 0.9rem;
  margin: 0;
  accent-color: var(--red);
}

.feature-filter-pill:has(input:checked) {
  color: var(--red-dark);
  border-color: rgba(180, 54, 44, 0.34);
  background: rgba(180, 54, 44, 0.09);
}

.search-wrap input:focus {
  border-color: rgba(180, 54, 44, 0.55);
  box-shadow: 0 0 0 4px rgba(180, 54, 44, 0.12);
}

.stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-weight: 700;
}

.layer-select-wrap {
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.layer-select-primary {
  padding-bottom: 0.2rem;
  border-bottom: 1px solid var(--line);
}

.layer-select-wrap select {
  width: 100%;
  min-height: 2.4rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: none;
  padding: 0.45rem 0.55rem;
}

.layer-select-wrap[hidden] {
  display: none;
}

.census-legend {
  display: grid;
  gap: 0.45rem;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.68);
}

.census-legend[hidden] {
  display: none;
}

.legend-title {
  margin: 0;
  color: var(--red-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.legend-items span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.legend-swatch {
  width: 0.75rem;
  height: 0.75rem;
  border: 2px solid rgba(255, 246, 228, 0.96);
  border-radius: 50%;
  background: var(--legend-color);
  box-shadow: 0 0 0 1px rgba(23, 33, 61, 0.14);
}

.legend-gradient {
  height: 0.72rem;
  border: 1px solid rgba(23, 33, 61, 0.16);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--legend-gradient));
  box-shadow: inset 0 0 0 1px rgba(255, 246, 228, 0.45);
}

.legend-scale-labels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.legend-scale-labels span:nth-child(2) {
  text-align: center;
}

.legend-scale-labels span:last-child {
  text-align: right;
}

.status-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.status-filters[hidden],
body[data-mode="read-only"] .status-filters {
  display: none;
}

.status-filters label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2rem;
  padding: 0 0.55rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.68);
  cursor: pointer;
}

.status-filters input {
  width: 0.9rem;
  height: 0.9rem;
  margin: 0;
  accent-color: var(--red);
}

.status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
}

.status-finalized {
  background: #2f8f5b;
}

.status-candidate {
  background: #d9852b;
}

.status-review {
  background: #d9b13b;
}

.status-unknown {
  background: var(--red);
}

button {
  min-height: 2.25rem;
  padding: 0 0.8rem;
  color: var(--red-dark);
  font: inherit;
  font-weight: 800;
  border: 1px solid rgba(180, 54, 44, 0.32);
  border-radius: 999px;
  background: rgba(180, 54, 44, 0.08);
  cursor: pointer;
}

button:hover {
  background: rgba(180, 54, 44, 0.14);
}

.census-development-dialog {
  width: min(30rem, calc(100% - 2rem));
  padding: 0;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf0;
  box-shadow: 0 28px 90px rgba(23, 33, 61, 0.28);
}

.census-development-dialog::backdrop {
  background: rgba(23, 33, 61, 0.48);
  backdrop-filter: blur(3px);
}

.census-development-dialog form {
  display: grid;
  gap: 0.85rem;
  padding: 1.35rem;
}

.census-development-dialog h2,
.census-development-dialog p {
  margin: 0;
}

.census-development-dialog p {
  color: var(--muted);
  line-height: 1.5;
}

.census-development-dialog button {
  justify-self: start;
}

.detail-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 252, 245, 0.94), rgba(246, 235, 215, 0.9));
}

.detail-card h2 {
  margin-top: 0.1rem;
  font-size: 1.75rem;
  line-height: 1;
}

.detail-subtitle {
  margin-top: 0.25rem;
  color: var(--muted);
  font-weight: 700;
}

.detail-title-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.8rem;
  align-items: start;
}

.open-place-link {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  color: var(--red-dark);
  font-size: 1rem;
  font-weight: 900;
  text-decoration: none;
  border: 1px solid rgba(180, 54, 44, 0.28);
  border-radius: 999px;
  background: rgba(180, 54, 44, 0.08);
}

.open-place-link:hover {
  border-color: rgba(180, 54, 44, 0.42);
  background: rgba(180, 54, 44, 0.14);
}

.detail-card p {
  margin: 0.55rem 0 0;
  color: var(--muted);
  line-height: 1.42;
}

.excerpt-text p {
  margin: 0.65rem 0 0;
}

.excerpt-text p:first-child {
  margin-top: 0.55rem;
}

.detail-card .excerpt-label {
  margin-top: 0.55rem;
  color: var(--red-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.finalize-check,
.mini-finalize {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--red-dark);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.finalize-check {
  margin-top: 0.65rem;
}

.finalize-check input,
.mini-finalize input {
  width: 1rem;
  height: 1rem;
  accent-color: #2f8f5b;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.85rem;
}

.census-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0.85rem 0 0;
}

.census-stat-grid div {
  min-width: 0;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.68);
}

.census-stat-grid dt {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.15;
  text-transform: uppercase;
}

.census-stat-grid dd {
  margin: 0.25rem 0 0;
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 0.95;
}

.census-stats-popup .leaflet-popup-content {
  width: min(25rem, calc(100vw - 5rem)) !important;
  max-height: min(70vh, 34rem);
  margin: 1rem;
  padding-right: 0.2rem;
  overflow-y: auto;
  box-sizing: border-box;
}

.census-stats-popup .leaflet-popup-content-wrapper {
  overflow: hidden;
}

.census-stats-popup .detail-kicker {
  padding-top: 0.05rem;
}

.census-stats-popup .detail-title-row {
  align-items: center;
}

.census-stats-popup .detail-meta {
  margin-top: 0.8rem;
}

.census-stats-popup .census-stat-grid {
  margin-top: 0.9rem;
}

.census-stats-popup .census-stat-grid div {
  min-height: 5rem;
}

.census-stats-popup .census-stat-grid dd {
  font-size: 1.45rem;
}

@media (max-width: 560px) {
  .census-stats-popup .census-stat-grid {
    grid-template-columns: 1fr;
  }
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0 0.55rem;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
}

.chip-link,
.source-link {
  color: var(--red-dark);
  text-decoration: none;
}

.chip-link:hover,
.source-link:hover {
  border-color: rgba(180, 54, 44, 0.38);
  background: rgba(180, 54, 44, 0.08);
}

.source-link {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 800;
  border: 1px solid rgba(180, 54, 44, 0.28);
  border-radius: 999px;
  background: rgba(180, 54, 44, 0.06);
}

.private-editor {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px dashed rgba(23, 33, 61, 0.22);
}

.private-editor .editor-title {
  margin: 0;
  color: var(--red-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.private-editor label {
  display: grid;
  gap: 0.28rem;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.private-editor input[type="text"],
.private-editor input[type="url"] {
  width: 100%;
  min-height: 2.3rem;
  padding: 0 0.65rem;
  color: var(--ink);
  font: 500 0.92rem "Source Sans 3", system-ui, sans-serif;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.78);
  outline: none;
}

.private-editor input:focus {
  border-color: rgba(180, 54, 44, 0.55);
  box-shadow: 0 0 0 3px rgba(180, 54, 44, 0.11);
}

.private-editor .unresolved-check {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 0.45rem;
  text-transform: none;
}

.private-editor .unresolved-check input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--red);
}

.private-editor button {
  justify-self: start;
}

.private-editor button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.editor-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
  text-transform: none;
}

.editor-status.success {
  color: #2f6d46;
}

.editor-status.warning {
  color: var(--red-dark);
}

.place-list {
  display: grid;
  gap: 0.55rem;
  padding-bottom: 1rem;
}

.place-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.62);
}

.place-row.finalized {
  border-color: rgba(49, 114, 80, 0.24);
  background: rgba(240, 249, 240, 0.62);
}

.place-row.candidate {
  border-color: rgba(217, 133, 43, 0.2);
  background: rgba(255, 246, 232, 0.66);
}

.place-row.review {
  border-color: rgba(217, 177, 59, 0.24);
  background: rgba(255, 249, 224, 0.68);
}

.place-row.unknown {
  border-color: rgba(180, 54, 44, 0.14);
}

.place-item {
  display: grid;
  gap: 0.18rem;
  width: 100%;
  padding: 0.75rem 0.85rem;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
}

.place-item:hover,
.place-item.active {
  border-color: rgba(180, 54, 44, 0.26);
  background: #fffaf0;
}

.place-item strong {
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.22rem;
}

.place-item span {
  color: var(--muted);
  font-size: 0.88rem;
}

.mini-finalize {
  min-width: 6rem;
  padding-right: 0.75rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.map-wrap {
  position: relative;
  min-height: 100vh;
}

#map {
  position: absolute;
  inset: 0;
  background: #efe0c3;
}

.census-dot {
  border: 1.5px solid rgba(255, 255, 255, 0.96);
  background: radial-gradient(circle at 34% 30%, color-mix(in srgb, var(--dot-fill) 58%, white 42%) 0 16%, var(--dot-fill) 46%, var(--dot-fill-dark) 100%);
  box-shadow:
    0 0 0 1.5px var(--dot-ring),
    0 1px 4px rgba(12, 18, 34, 0.34);
  filter: saturate(1.18) contrast(1.06);
}

.census-dot::after {
  display: none;
}

.census-dot:hover {
  transform: scale(1.25);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.82),
    0 2px 7px rgba(23, 33, 61, 0.32);
}

.census-heat-point {
  position: relative;
  width: var(--heat-size);
  height: var(--heat-size);
  border-radius: 50%;
  background:
    radial-gradient(circle,
      color-mix(in srgb, var(--heat-fill) 92%, white 8%) 0 10%,
      color-mix(in srgb, var(--heat-fill) 72%, transparent) 26%,
      color-mix(in srgb, var(--heat-fill) 32%, transparent) 54%,
      transparent 76%);
  opacity: var(--heat-opacity);
  filter: saturate(1.12);
  transform: translateZ(0);
  transition: opacity 160ms ease, transform 160ms ease;
}

.census-heat-point span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  background: var(--heat-dark);
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 3px rgba(23, 33, 61, 0.26);
}

.census-heat-point:hover {
  opacity: 1;
  transform: scale(1.18);
}

.place-page {
  position: relative;
  z-index: 4;
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 3rem;
}

.place-nav {
  display: flex;
  justify-content: flex-start;
  padding: 0.4rem 0 1rem;
}

.place-nav a {
  color: var(--red-dark);
  font-weight: 800;
  text-decoration: none;
}

.place-nav a:hover {
  text-decoration: underline;
}

.place-detail-shell {
  display: grid;
  gap: 1.1rem;
}

.place-hero {
  padding: clamp(1.2rem, 4vw, 2.4rem) 0 0.4rem;
}

.place-hero h1 {
  margin-top: 0.2rem;
  font-size: clamp(3rem, 9vw, 6.6rem);
  line-height: 0.9;
}

.place-hero p {
  max-width: 44rem;
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.place-map-section {
  position: relative;
  min-height: 18rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #efe0c3;
  box-shadow: 0 18px 48px rgba(49, 36, 20, 0.14);
}

#place-map {
  position: absolute;
  inset: 0;
}

.place-map-open {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 500;
  display: inline-flex;
  align-items: center;
  min-height: 2.35rem;
  padding: 0 0.85rem;
  color: var(--red-dark);
  font-weight: 900;
  text-decoration: none;
  border: 1px solid rgba(180, 54, 44, 0.28);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.92);
  box-shadow: 0 10px 28px rgba(49, 36, 20, 0.18);
}

.place-map-open:hover {
  border-color: rgba(180, 54, 44, 0.42);
  background: #fffaf0;
}

.place-section {
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(250, 246, 238, 0.78);
}

.place-section h2 {
  font-size: 2rem;
}

.census-match-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.75rem;
}

.census-match-card {
  padding: 0.85rem;
  border: 1px solid rgba(37, 111, 159, 0.2);
  border-radius: 8px;
  background: rgba(241, 248, 250, 0.62);
}

.census-match-card h3 {
  margin-top: 0.15rem;
  font-size: 1.75rem;
  line-height: 1;
}

.census-match-card p:not(.detail-kicker) {
  margin: 0.5rem 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.source-page-grid {
  display: grid;
  gap: 1rem;
  margin-top: 0.85rem;
}

.source-page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 0.85rem;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 250, 240, 0.68);
}

.table-wrap th,
.table-wrap td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-align: left;
}

.table-wrap th {
  color: var(--ink);
  font-weight: 900;
  text-transform: capitalize;
}

.table-wrap tr:last-child th,
.table-wrap tr:last-child td {
  border-bottom: 0;
}

.source-page-frame {
  display: grid;
  gap: 0.45rem;
}

.source-page-frame img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.source-page-frame figcaption {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.source-excerpt {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.source-excerpt.excerpt-text p {
  margin-top: 0.9rem;
}

.source-excerpt.excerpt-text p:first-child {
  margin-top: 0.45rem;
}

.nearby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.7rem;
  margin-top: 0.85rem;
}

.nearby-card {
  display: grid;
  gap: 0.18rem;
  min-height: 5.4rem;
  padding: 0.8rem;
  color: inherit;
  text-decoration: none;
  border: 1px solid rgba(23, 33, 61, 0.14);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.76);
}

.nearby-card:hover {
  border-color: rgba(180, 54, 44, 0.3);
  background: #fffaf0;
}

.nearby-card strong {
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.38rem;
  line-height: 1;
}

.nearby-card span,
.empty-nearby {
  color: var(--muted);
}

@media (max-width: 820px) {
  .atlas-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 52vh auto;
  }

  .map-wrap {
    grid-row: 1;
    min-height: 52vh;
  }

  .panel {
    grid-row: 2;
    max-height: none;
    border-right: 0;
    border-top: 1px solid var(--line);
  }
}
