/* ==========================================================================
   page-atlas.css — Interactive Atlas (/data/maps/atlas.html)
   Extracted from an inline <style> block. Dropped from that block: :root token
   overrides, base resets, .btn/.skip-link/footer redefinitions, and the mobile-
   CTA main padding — all provided canonically by foundation/layout/design-system.
   ========================================================================== */

.atlas-page {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-top: 32px;
}

.atlas-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 0;
}
.atlas-topbar__intro h1 {
  margin: 4px 0;
  font-family: var(--font-head);
  font-size: clamp(32px, 4vw, 44px);
  letter-spacing: -0.02em;
  line-height: 1.12;
}
.atlas-topbar__tagline {
  margin: 0;
  color: var(--hvb-slate);
  max-width: 68ch;
  font-size: 16px;
}
.atlas-topbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Contained like the rest of the site (was full-bleed 100vw, which made the
   16:9 map enormous and inconsistent with every other section). */
.atlas-shell {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: stretch;
  box-sizing: border-box;
}
.atlas-map-wrap {
  width: 100%;
  max-width: none;
  padding-inline: 0;
}
.atlas-side {
  width: 100%;
}
/* Fixed, sensible height instead of a 16:9 box that ballooned to ~1000px
   tall — no more endless scrolling to get past the map. */
.atlas-frame {
  position: relative;
  width: 100%;
  height: clamp(440px, 58vh, 620px);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--hvb-paper);
  border: 1px solid rgba(14, 59, 46, 0.12);
  box-shadow: var(--shadow-1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.atlas-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Scroll shield: a transparent layer over the map so the page scrolls
   normally past it (the iframe no longer hijacks the wheel). Click to
   activate map pan/zoom. */
.atlas-frame__shield {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  margin: 0;
  padding: 0 0 18px;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.atlas-frame__shield span {
  background: rgba(6, 20, 14, 0.78);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(6, 20, 14, 0.28);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.atlas-frame__shield:hover span,
.atlas-frame__shield:focus-visible span {
  opacity: 1;
  transform: translateY(0);
}

.atlas-placeholder {
  text-align: center;
  padding: 24px;
  z-index: 1;
}
.atlas-placeholder p {
  margin: 0 0 10px;
  font-weight: 600;
  color: var(--hvb-slate);
}

.atlas-side {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.atlas-layer-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.atlas-layer-notes,
.atlas-layers,
.atlas-uses {
  background: #fff;
  border-radius: var(--radius-card);
  border: 1px solid rgba(14, 59, 46, 0.1);
  padding: 30px 26px;
  box-shadow: var(--shadow-1);
}

.atlas-layer-notes h2,
.atlas-layers h2,
.atlas-uses h2 {
  margin-top: 0;
  font-family: var(--font-head);
  font-size: 24px;
}

.atlas-layer-notes__disclaimer {
  margin: 8px 0 20px;
  color: var(--hvb-slate);
  font-size: 0.95rem;
}

.atlas-layer-notes__table-wrapper {
  overflow-x: auto;
}
.atlas-layer-notes__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
}
.atlas-layer-notes__table th,
.atlas-layer-notes__table td {
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}
.atlas-layer-notes__table th {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--hvb-slate);
  border-bottom: 1px solid rgba(14, 59, 46, 0.15);
}
.atlas-layer-notes__table td {
  border-bottom: 1px solid rgba(14, 59, 46, 0.06);
}
.atlas-layer-notes__table tbody tr:last-child td {
  border-bottom: none;
}
.atlas-layer-notes__placeholder {
  color: var(--hvb-slate);
  font-style: italic;
}

.atlas-uses ul {
  margin: 0;
  padding-left: 20px;
  color: var(--hvb-slate);
  line-height: 1.6;
}
.atlas-uses li {
  margin-bottom: 10px;
}
.atlas-uses li:last-child {
  margin-bottom: 0;
}

/* ── Map layer legend ─────────────────────────────────────────────────────
   Visual key for the map: each layer gets an accent icon badge, its name, and
   a plain-language description (rendered from layer-notes.json by atlas-page.js). */
.atlas-layers__head {
  margin-bottom: 20px;
}
.atlas-layers__intro {
  margin: 8px 0 0;
  color: var(--hvb-slate);
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 60ch;
}
.atlas-legend {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 12px;
}
.atlas-legend__loading {
  margin: 0;
  color: var(--hvb-slate);
  font-style: italic;
}
.atlas-legend__card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(14, 59, 46, 0.1);
  background: var(--hvb-paper);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.atlas-legend__card:hover {
  border-color: rgba(14, 59, 46, 0.2);
  box-shadow: 0 6px 18px rgba(6, 20, 14, 0.08);
  transform: translateY(-1px);
}
.atlas-legend__icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--accent, var(--hvb-teal));
  background: rgba(31, 111, 98, 0.08); /* fallback */
  background: color-mix(in srgb, var(--accent, var(--hvb-teal)) 14%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent, var(--hvb-teal)) 32%, #fff);
}
.atlas-legend__icon svg {
  width: 21px;
  height: 21px;
}
.atlas-legend__name {
  margin: 2px 0 4px;
  font-family: var(--font-head);
  font-size: 15px;
  line-height: 1.25;
  color: var(--hvb-black);
}
.atlas-legend__desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--hvb-slate);
}
.atlas-layers__cta {
  margin-top: 22px;
}

@media (max-width: 980px) {
  .atlas-topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .atlas-layer-notes__table thead {
    display: none;
  }
  .atlas-layer-notes__table,
  .atlas-layer-notes__table tbody,
  .atlas-layer-notes__table tr {
    display: block;
  }
  .atlas-layer-notes__table tr {
    margin-bottom: 16px;
    border: 1px solid rgba(14, 59, 46, 0.12);
    border-radius: 10px;
    padding: 12px 0;
  }
  .atlas-layer-notes__table td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 14px;
    border: none;
  }
  .atlas-layer-notes__table td::before {
    content: attr(data-label);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--hvb-slate);
    margin-right: 8px;
    flex: 0 0 110px;
  }
  .atlas-layer-notes__table td:last-child {
    padding-bottom: 0;
  }
}
