@charset "UTF-8";
/* ============================================================================
   AISESA Africa Map — Voronoi-tessellated country regions clipped to coastline
   ============================================================================ */

.am-root {
  position: relative;
  font-family: var(--font-sans, "Roboto", sans-serif);
}

/* ---- Compact (homepage) -------------------------------------------------- */
.am-root--compact {
  width: 100%;
  display: flex;
  flex-direction: column;
}
.am-root--compact .am-stage--compact {
  position: relative;
  width: 100%;
  aspect-ratio: 820 / 945;
  max-height: 80vh;
}

/* ---- Full (Maps tool / Resources) --------------------------------------- */
.am-root--full {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  background: #fff;
  border: 1px solid #e2e2dc;
  border-radius: 6px;
  padding: 32px;
}
.am-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}
.am-control-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: "Roboto Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #3F8A3A;
}
.am-select {
  font-family: "Roboto", sans-serif;
  font-size: 0.92rem;
  padding: 8px 36px 8px 14px;
  border: 1.5px solid #1F1F18;
  border-radius: 4px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23222' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center;
  background-size: 10px;
  appearance: none;
  -webkit-appearance: none;
  min-width: 320px;
  letter-spacing: 0.005em;
  color: #1F1F18;
  cursor: pointer;
}
.am-select:focus {
  outline: 2px solid #5CAD59;
  outline-offset: 2px;
}
.am-desc {
  max-width: 80ch;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #4a4a44;
}
.am-desc p { margin: 0 0 6px; }
.am-src {
  font-family: "Roboto Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: #6D6650;
}
.am-src a { color: #3F8A3A; text-decoration: underline; }

/* ---- SVG stage ---------------------------------------------------------- */
.am-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 820 / 945;
}
.am-root--full .am-stage { max-height: 720px; margin: 0 auto; }
.am-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Country regions */
.am-region {
  stroke: #ffffff;            /* hairline white border between countries */
  stroke-width: 1.2;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition: filter .15s, stroke .15s;
}
.am-region:hover {
  filter: brightness(1.06) drop-shadow(0 2px 8px rgba(31,31,24,0.18));
  stroke: #1F1F18;
  stroke-width: 1.5;
}
.am-region--empty {
  stroke: rgba(31,31,24,0.25);
  stroke-dasharray: 2 2;
}

/* Coastline accent on top of the regions */
.am-coastline {
  fill: none;
  stroke: rgba(31, 31, 24, 0.55);
  stroke-width: 1.5;
  stroke-linejoin: round;
  pointer-events: none;
}

/* ---- Legend ------------------------------------------------------------- */
.am-legend-wrap { margin-top: 8px; }
.am-legend {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 18px;
  row-gap: 6px;
  align-items: center;
  max-width: 460px;
}
.am-legend-label {
  font-family: var(--font-serif, "Roboto Slab"), serif;
  font-weight: 700;
  font-size: 0.98rem;
  color: #1F1F18;
}
.am-legend-unit {
  font-family: "Roboto Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6D6650;
}
.am-legend-bar {
  grid-column: 1 / -1;
  height: 10px;
  border-radius: 2px;
  border: 1px solid rgba(31,31,24,0.18);
}
.am-legend-ticks {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  font-family: "Roboto Mono", monospace;
  font-size: 0.7rem;
  color: #6D6650;
}

/* Compact-legend variant: right-aligned under the homepage map */
.am-legend-wrap--compact {
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
}
.am-legend-wrap--compact .am-legend {
  max-width: 280px;
}

/* ---- Tooltip ------------------------------------------------------------ */
.am-tooltip {
  position: absolute;
  pointer-events: none;
  background: #1F1F18;
  color: #fff;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 0.84rem;
  line-height: 1.35;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  opacity: 0;
  transform: translateY(2px);
  transition: opacity .12s, transform .12s;
  z-index: 10;
  max-width: 220px;
}
.am-tooltip strong {
  font-family: var(--font-serif, "Roboto Slab"), serif;
  font-weight: 700;
}
.am-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Homepage frame & smaller CTA --------------------------------------- */
.am-home-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.am-home-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Roboto Mono", monospace;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #3F8A3A;
  text-decoration: none;
  padding: 8px 14px;
  border: 1.5px solid #5CAD59;
  border-radius: 999px;
  align-self: flex-start;
  transition: background .15s, color .15s, transform .15s;
}
.am-home-cta:hover {
  background: #5CAD59;
  color: #fff;
  transform: translateY(-1px);
  text-decoration: none;
}

/* ---- Maps page header (dedicated tool) ---------------------------------- */
.maps-hero {
  padding: 120px 0 28px;
  background: linear-gradient(180deg, #fff 0%, #f8f8f3 100%);
  border-bottom: 1px solid #e7e4d8;
}
.maps-hero .eyebrow { color: #3F8A3A; }
.maps-hero h1 {
  font-family: var(--font-serif, "Roboto Slab"), serif;
  font-weight: 700;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #1F1F18;
  margin: 6px 0 12px;
}
.maps-hero .lead {
  max-width: 78ch;
  font-size: 1.04rem;
  line-height: 1.55;
  color: #4a4a44;
}
.maps-section {
  padding: 30px 0 80px;
  background: #fff;
}
.maps-notes {
  margin-top: 22px;
  max-width: 80ch;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #4a4a44;
}
.maps-notes p { margin: 0 0 6px; }
.maps-notes strong { color: #1F1F18; }

@media (max-width: 900px) {
  .am-root--full { padding: 22px; }
  .am-select { min-width: 0; width: 100%; }
  .am-legend-wrap--compact { justify-content: flex-start; }
}

@media (max-width: 480px) {
  .am-root--full { padding: 16px; }
  .am-select { padding: 12px 36px 12px 12px; min-height: 44px; font-size: 14px; }
  .am-control-label { font-size: 0.65rem; gap: 8px; }
  .am-desc { font-size: 0.9rem; }
  .am-legend { max-width: 100%; }
  .am-legend-wrap--compact .am-legend { max-width: 100%; }
}

/* v59 — Island country markers (small dots positioned at each island's centroid). */
.am-island-halo {
  fill: rgba(255, 255, 255, 0.6);
  stroke: rgba(31, 31, 24, 0.12);
  stroke-width: 1;
  pointer-events: none;
}
.am-island-dot {
  stroke: rgba(31, 31, 24, 0.55);
  stroke-width: 1.2;
  cursor: pointer;
  transition: r 0.15s, stroke 0.15s, filter 0.15s;
}
.am-island-dot:hover {
  stroke: #1F1F18;
  stroke-width: 2;
  filter: drop-shadow(0 2px 6px rgba(31,31,24,0.25));
}
