html,
body {
  height: 100%;
  margin: 0;
  background: #0f0f10;
  font: 16px/1.45 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

:root {
  --status-bar-height: 38px;
}

/* Background map layer */
#map {
  position: fixed;
  top: var(--status-bar-height);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

/* Optional: soften the map so content is the focus */
#map::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      80% 60% at 30% 20%,
      rgba(255, 255, 255, 0.35),
      rgba(255, 255, 255, 0.05)
    ),
    rgba(10, 10, 12, 0.15);
  pointer-events: none;
}

/* Foreground content layer */
#content {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: calc(var(--status-bar-height) + 20px) 18px 64px;
  color: rgba(20, 20, 22, 0.92);
  opacity: 1;
  visibility: visible;
}

/* Layout */
.hero {
  max-width: 980px;
  margin: 0 auto 24px;
}

.section,
.footer {
  max-width: 980px;
  margin: 0 auto 18px;
}

/* Card system */
.card {
  border: 1px solid rgba(20, 20, 22, 0.08);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  padding: 18px 18px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: backdrop-filter 200ms ease, -webkit-backdrop-filter 200ms ease;
}

.card.subtle {
  background: rgba(245, 242, 236, 0.65);
}

.eyebrow {
  margin: 0 0 6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  opacity: 0.75;
}

h1 {
  margin: 0px;
  font-size: 34px;
  line-height: 1.1;
}

.subhead {
  margin: 0 0 14px;
  font-size: 16px;
  opacity: 0.9;
}

h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.links a {
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(20, 20, 22, 0.06);
  color: rgba(20, 20, 22, 0.92);
}

.links a:hover {
  background: rgba(20, 20, 22, 0.10);
}

.grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 720px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.tile {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(20, 20, 22, 0.08);
}

.tile:hover {
  background: rgba(255, 255, 255, 0.70);
}

.tile h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.tile p {
  margin: 0;
  font-size: 13px;
  opacity: 0.9;
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(20, 20, 22, 0.08);
}

.meta {
  opacity: 0.65;
  font-size: 13px;
}

.status-bar {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 3;
  margin: 0;
  pointer-events: auto;
}

.status-bar-inner {
  width: 100%;
  min-height: var(--status-bar-height);
  padding: 6px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(20, 20, 24, 0.92);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: rgba(232, 232, 236, 0.86);
  flex-wrap: nowrap;
  box-sizing: border-box;
}

.footer-separator {
  opacity: 0.3;
}

.footer-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.footer-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.6;
}

.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.footer-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15);
}

.footer-status-dot[data-state="ok"] {
  background: #2fbf71;
  box-shadow: 0 0 0 2px rgba(47, 191, 113, 0.35);
}

.footer-status-dot[data-state="error"] {
  background: #e34b4b;
  box-shadow: 0 0 0 2px rgba(227, 75, 75, 0.35);
}

.footer-status-dot[data-state="idle"] {
  background: rgba(255, 255, 255, 0.35);
}

.map-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.map-toggle:hover {
  background: rgba(255, 255, 255, 0.16);
}

.map-toggle:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.45);
  outline-offset: 2px;
}

.map-toggle-icon {
  font-size: 14px;
}

.map-toggle-label {
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

body.map-only #content {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.map-only .card {
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
}

@media (prefers-reduced-motion: reduce) {
  #content,
  body.map-only #content,
  .card,
  body.map-only .card {
    transition: none;
  }
}

@media (max-width: 720px) {
  .footer-item-last,
  .footer-separator-last {
    display: none;
  }
}

@media (max-width: 520px) {
  .footer-item-count,
  .footer-separator-count {
    display: none;
  }
}

/* Ensure MapLibre attribution stays visible */
.maplibregl-ctrl-bottom-right,
.maplibregl-ctrl-bottom-left {
  z-index: 2;
}
