:root {
  /* Change core colors here */
  --bg: #f5f7f8;
  --surface: #ffffff;
  --text: #1f2933;
  --muted: #52606d;
  --border: #d9e2ec;
  --primary: #2d4a5a;
  --shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.container {
  width: min(100% - 2rem, 72rem);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  background: #ffffff;
  color: #000000;
  padding: 0.5rem 0.75rem;
  border: 1px solid #000000;
  border-radius: 0.5rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 0.5rem;
}

.site-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  gap: 0.4rem;
  padding: 0.65rem 0;
}

.nav-link {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  border-radius: 0.5rem;
  color: #243b53;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
  background: #e9eff5;
}

.nav-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(45, 74, 90, 0.18);
}

.nav-link.is-current {
  background: var(--primary);
  color: #ffffff;
}

.site-header {
  padding: 3.5rem 0 1.5rem;
}

.site-title {
  margin: 0;
  font-size: clamp(1.8rem, 2vw + 1rem, 2.8rem);
  letter-spacing: 0.01em;
  color: var(--primary);
}

.site-intro {
  margin: 1rem 0 0;
  max-width: 44rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.main-content {
  padding-bottom: 3rem;
}

.search-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.search-label {
  display: inline-block;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.search-input {
  width: 100%;
  border: 1px solid #bcccdc;
  border-radius: 0.8rem;
  padding: 0.95rem 1rem;
  font-size: 1.05rem;
  color: var(--text);
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input::placeholder {
  color: #7b8794;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45, 74, 90, 0.18);
}

.status-text {
  margin: 0.9rem 0 0;
  color: var(--muted);
}

.browse-wrap {
  margin-top: 0.95rem;
}

.browse-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.browse-letters {
  margin-top: 0.5rem;
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  gap: 0.35rem;
}

.browse-letter {
  border: 1px solid #bcccdc;
  background: #ffffff;
  color: #243b53;
  border-radius: 0.5rem;
  min-height: 2rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease, box-shadow 0.15s ease;
}

.browse-letter:hover {
  border-color: #829ab1;
  background: #f0f4f8;
}

.browse-letter:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45, 74, 90, 0.18);
}

.browse-letter.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.results-section {
  margin-top: 1.35rem;
}

.section-title {
  margin: 0 0 0.75rem;
  color: #102a43;
  font-size: clamp(1.2rem, 1.2vw + 0.9rem, 1.5rem);
}

.results-grid {
  display: grid;
  gap: 0.95rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  box-shadow: var(--shadow);
  padding: 1rem;
}

.record-name {
  margin: 0 0 0.6rem;
  font-size: 1.12rem;
  color: #102a43;
}

.record-line,
.record-notes-wrap {
  margin: 0.33rem 0;
}

.record-label {
  font-weight: 600;
}

.hidden {
  display: none;
}

.map-section {
  margin-top: 1.6rem;
}

.map-frame {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  padding: 0.75rem;
}

.map-interactive {
  position: relative;
  width: fit-content;
  margin: 0 auto;
}

.cemetery-map {
  display: block;
  width: 100%;
  max-width: 19rem;
  height: auto;
  margin: 0 auto;
  border-radius: 0.7rem;
}

.map-hotspot {
  position: absolute;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-decoration: none;
  z-index: 2;
}

.map-hotspot-north {
  left: 7%;
  top: 3%;
  width: 86%;
  height: 53%;
}

.map-hotspot-label {
  margin-bottom: 0.4rem;
  padding: 0.25rem 0.45rem;
  border-radius: 0.45rem;
  background: rgba(16, 42, 67, 0.76);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.map-hotspot:hover .map-hotspot-label,
.map-hotspot:focus-visible .map-hotspot-label {
  opacity: 1;
}

.map-hotspot:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: -3px;
  box-shadow: inset 0 0 0 2px var(--primary);
  border-radius: 0.7rem;
}

.map-link-row {
  margin: 0.65rem 0 0;
  text-align: center;
}

.map-link {
  color: #1f4b72;
  font-weight: 600;
}

.map-link-sep {
  margin: 0 0.35rem;
  color: var(--muted);
}

.info-stack {
  display: grid;
  gap: 1rem;
}

.info-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.info-section p {
  margin: 0;
  color: var(--text);
}

.reference-list {
  margin: 0;
  padding-left: 1.1rem;
}

.reference-list a {
  color: #1f4b72;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1rem 0 2.2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .site-header {
    padding-top: 2.2rem;
  }

  .search-panel {
    padding: 1rem;
  }

  .search-input {
    font-size: 1rem;
  }

  .browse-letters {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .nav-inner {
    justify-content: center;
  }

  .info-section {
    padding: 1rem;
  }
}
