/* ============================================================
   Equant atlas — panel styles
   Every brand-specific value lives in this variable block.
   Equant atlas standard (recorded here): panel titles are set
   UPPERCASE with 0.08em letter-spacing, weight 800.
   ============================================================ */
.atlas-panel {
  /* colour ramp: quantised sequential blues, light -> dark = low -> high */
  --c1: #cde2fb;
  --c2: #9ec5f4;
  --c3: #6da7ec;
  --c4: #2a78d6;
  --c5: #1c5cab;
  --c6: #0d366b;
  --no-data-fill: #ffffff;
  --no-data-stroke: #d9d7d0;

  --panel-bg: #ffffff;
  --panel-border: #e4e2dc;
  --ink: #0b0b0b;
  --ink-secondary: #52514e;
  --ink-muted: #898781;
  --border-hairline: #c9c7c0;
  --country-stroke: #b9b7b0;
  --highlight-stroke: #0b0b0b;

  /* swap in a self-hosted brand WOFF2 here if desired (see EMBED.md) */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: transparent;
}

.atlas-panel {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  margin: 0;
  padding: 20px 24px 16px;
  max-width: 1100px;
}

/* ---------- header ---------- */
.atlas-title {
  font-size: clamp(15px, 2.6vw, 21px);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.atlas-controls { position: relative; }

.atlas-select-label {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.atlas-select-wrap {
  position: relative;
  display: inline-block;
}
.atlas-select-wrap::after {           /* custom chevron */
  content: "";
  position: absolute;
  right: 12px; top: 50%;
  width: 7px; height: 7px;
  border-right: 1.5px solid var(--ink-secondary);
  border-bottom: 1.5px solid var(--ink-secondary);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
#country-select {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  padding: 7px 34px 7px 12px;
  min-width: 220px;
  cursor: pointer;
}
#country-select:focus-visible {
  outline: 2px solid var(--c4);
  outline-offset: 1px;
}

.atlas-stat {
  display: inline-block;
  margin: 0 0 0 10px;
  font-size: 14px;
  color: var(--ink-secondary);
  vertical-align: middle;
  min-height: 1em;
}
.atlas-stat strong { color: var(--ink); font-weight: 700; }

/* ---------- map ---------- */
.atlas-map {
  position: relative;
  margin: 10px 0 4px;
}
.atlas-map svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: hidden;
  cursor: default;
}

.country {
  stroke: var(--country-stroke);
  stroke-width: 0.5;
  vector-effect: non-scaling-stroke;
  transition: opacity 200ms ease;
  cursor: pointer;
}
.country.no-data {
  fill: var(--no-data-fill);
  stroke: var(--no-data-stroke);
}
.country:hover { stroke: var(--ink-secondary); stroke-width: 1; }

/* selection state: highlight one, quieten the rest */
.has-selection .country { opacity: 0.45; }
.has-selection .country.selected {
  opacity: 1;
  stroke: var(--highlight-stroke);
  stroke-width: 1.25;
}
.country.touch-active {
  stroke: var(--highlight-stroke);
  stroke-width: 1.25;
}

/* ---------- legend ---------- */
.atlas-legend {
  position: absolute;
  right: 4px;
  bottom: 4px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 3px;
  padding: 6px 8px 4px;
  font-size: 11px;
  color: var(--ink-secondary);
  line-height: 1;
  pointer-events: none;
}
.atlas-legend .legend-title {
  font-size: 11px;
  margin: 0 0 5px;
  color: var(--ink-secondary);
}
.legend-swatches { display: flex; }
.legend-step { width: 34px; }
.legend-step .swatch {
  height: 10px;
  border-right: 1px solid var(--panel-bg);
}
.legend-step .tick {
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
.legend-nodata {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
}
.legend-nodata .swatch {
  width: 12px; height: 10px;
  background: var(--no-data-fill);
  border: 1px solid var(--no-data-stroke);
}

/* ---------- tooltip ---------- */
.atlas-tooltip {
  position: absolute;
  display: none;
  max-width: 230px;
  background: var(--ink);
  color: #fff;
  font-size: 12.5px;
  line-height: 1.45;
  padding: 7px 10px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 10;
}
.atlas-tooltip strong { font-weight: 700; }
.atlas-tooltip .tt-year { opacity: 0.75; }

/* ---------- footer ---------- */
.atlas-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}
.atlas-logo { display: block; width: 28px; height: 28px; }
.atlas-source {
  margin: 0;
  font-size: 11.5px;
  color: var(--ink-muted);
  text-align: right;
}

.atlas-noscript { font-size: 14px; color: var(--ink-secondary); }
.atlas-noscript a { color: var(--c5); }

/* ---------- narrow widths (iframe on mobile) ---------- */
@media (max-width: 560px) {
  .atlas-panel { padding: 14px 14px 12px; }
  #country-select { min-width: 170px; font-size: 13px; }
  .atlas-stat { display: block; margin: 6px 0 0; font-size: 13px; }
  /* not enough ocean to float over: drop the key below the map */
  .atlas-legend {
    position: static;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    column-gap: 16px;
    row-gap: 5px;
    padding: 2px 0 0;
    background: none;
  }
  .atlas-legend .legend-title { flex-basis: 100%; margin: 0; }
  .legend-step { width: 30px; }
  .legend-nodata { margin: 0 0 1px; white-space: nowrap; }
}
