[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.brand-divider {
  color: #96a19a;
  margin: 0 4px;
}
.demo-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  font-weight: 500;
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding: 47px 0 34px;
  gap: 25px;
}
.intro .eyebrow {
  color: var(--accent);
  margin: 0 0 20px;
}
.intro h1 {
  font-size: clamp(44px, 4.8vw, 68px);
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 0 0 20px;
}
.deck {
  font-size: 16px;
  color: var(--muted);
  margin: 0;
}
.edition {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-bottom: 3px;
  font-size: 12px;
  color: var(--muted);
}
.edition strong {
  font-size: 32px;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.mobile-break {
  display: none;
}
.load-status {
  padding: 25px 0;
  color: var(--muted);
}
.controls {
  padding: 24px 0 22px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 35px;
}
.source-controls > .eyebrow {
  display: block;
  margin-bottom: 12px;
}
.source-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.source-buttons button {
  border: 1px solid #bcc6bd;
  background: transparent;
  padding: 7px 14px;
  font-size: 13px;
  border-radius: 3px;
  color: var(--ink);
}
.source-buttons button:hover {
  border-color: var(--ink);
  background: #e8ece4;
}
.source-buttons button[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.year-control {
  width: 235px;
  min-width: 160px;
}
.year-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.year-heading output {
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1;
}
input[type="range"] {
  width: 100%;
  accent-color: var(--ink);
  height: 20px;
  margin: 9px 0 0;
  cursor: pointer;
}
.range-ends {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
}
.visual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(310px, 1fr);
}
.map-section {
  padding: 22px 28px 16px 0;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.section-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 10px;
  color: var(--muted);
}
.section-top h2 {
  font-size: 13px;
  color: var(--ink);
  font-weight: 650;
  letter-spacing: 0.015em;
  margin: 0;
}
.map-wrap {
  position: relative;
  margin: 10px 0 5px;
  background: radial-gradient(ellipse at 45% 45%, #e7eeea55, transparent 70%);
}
#map {
  width: 100%;
  height: auto;
  display: block;
}
.country {
  stroke: var(--paper);
  stroke-width: 1;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition: fill 0.2s;
}
.country:hover,
.country:focus {
  stroke: var(--ink);
  stroke-width: 2;
  outline: none;
  filter: brightness(1.04);
}
.country.selected {
  stroke: var(--ink);
  stroke-width: 1.6;
}
.graticule {
  fill: none;
  stroke: #cbd7d1;
  stroke-width: 0.65;
  opacity: 0.6;
}
.map-label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  text-anchor: middle;
  fill: #182c30;
  paint-order: stroke;
  stroke: #f7f5ef;
  stroke-width: 3;
  stroke-linejoin: round;
  pointer-events: none;
}
.map-label.value {
  font-size: 14px;
}
.sea {
  position: absolute;
  pointer-events: none;
  color: #788e8e;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-align: center;
  line-height: 1.8;
}
.sea-west {
  left: 4%;
  top: 47%;
  transform: rotate(-10deg);
}
.sea-south {
  left: 38%;
  bottom: 8%;
  transform: rotate(3deg);
  font-size: 8px;
}
.map-tooltip {
  position: absolute;
  background: var(--ink);
  color: white;
  z-index: 3;
  padding: 10px 13px;
  font-size: 12px;
  pointer-events: none;
  box-shadow: 0 4px 16px #182c3020;
  max-width: 200px;
}
.map-tooltip strong {
  display: block;
}
.map-legend {
  display: grid;
  grid-template-columns: 110px minmax(120px, 260px) 90px;
  justify-content: center;
  align-items: center;
  gap: 15px;
  font-size: 10px;
}
.legend-caption {
  line-height: 1.4;
}
#color-scale {
  height: 9px;
}
.legend-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-size: 9px;
}
.missing-key {
  display: flex;
  align-items: center;
  gap: 6px;
}
.missing-key i {
  width: 13px;
  height: 13px;
  background: repeating-linear-gradient(
    135deg,
    #d0d6cd 0px,
    #d0d6cd 1px,
    #e8e9e0 1px,
    #e8e9e0 5px
  );
  border: 1px solid #b3bdb3;
}
.map-hint {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  margin: 16px 0 0;
}
.comparison {
  padding: 22px 0 20px 30px;
  min-width: 0;
}
.compare-deck {
  font-size: 13px;
  color: var(--muted);
  margin: 22px 0 18px;
}
.selected-countries {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 112px;
}
.country-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.country-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.country-chip .country-value {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.country-chip button {
  padding: 2px 6px;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1;
}
.add-country {
  display: flex;
  border: 1px solid #bdc7be;
  margin-top: 15px;
}
.add-country select {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  font-size: 12px;
}
.add-country button {
  background: transparent;
  border: 0;
  border-left: 1px solid var(--line);
  padding: 0 13px;
  color: var(--ink);
  font-size: 20px;
}
.selection-message {
  font-size: 11px;
  color: var(--muted);
  min-height: 18px;
  margin: 6px 0 8px;
}
.chart-figure {
  margin: 0;
}
#chart {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.chart-grid {
  stroke: #d4dbd4;
  stroke-width: 1;
}
.chart-tick {
  fill: var(--muted);
  font-size: 10px;
  font-family: var(--sans);
}
.chart-line {
  fill: none;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chart-figure figcaption {
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}
.chart-figure figcaption span {
  font-size: 9px;
}
.insight {
  margin-top: 23px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.6;
}
.insight strong {
  font-family: var(--serif);
  display: block;
  font-size: 36px;
  font-weight: 400;
  line-height: 1.1;
  margin: 7px 0;
}
.insight .eyebrow {
  font-size: 10px;
}
.small-note {
  color: var(--muted);
  font-size: 10px;
  margin: 17px 0 0;
}
.below-atlas {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.below-atlas p {
  font-family: var(--serif);
  font-size: 22px;
  margin: 3px 0 0;
}
.downloads {
  display: flex;
  gap: 22px;
  font-size: 12px;
  align-items: center;
}
.downloads button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.data-table {
  border-bottom: 1px solid var(--line);
  padding: 19px 0;
}
.data-table summary {
  cursor: pointer;
  font-size: 13px;
}
.data-table summary span {
  font-size: 11px;
  color: var(--muted);
  padding-left: 14px;
}
.table-scroll {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  margin: 18px 0;
}
caption {
  text-align: left;
  font-size: 12px;
  color: var(--muted);
  padding-bottom: 12px;
}
th,
td {
  text-align: right;
  border-bottom: 1px solid var(--line);
  padding: 9px;
}
th:first-child,
td:first-child {
  text-align: left;
}
.method {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 70px;
  padding-top: 45px;
  font-size: 12px;
  color: var(--muted);
}
.method h2 {
  font-size: 29px;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 14px;
}
.method h3 {
  font-size: 12px;
  color: var(--ink);
  margin: 0 0 6px;
}
.method p {
  margin: 0 0 23px;
}
.method > div:first-child p {
  max-width: 300px;
}
.demo-cta {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.demo-cta p {
  font-size: 28px;
  margin: 0;
}
.demo-cta a {
  font-size: 12px;
}
.fallback img {
  max-width: 100%;
  height: auto;
}
.fallback h2 {
  font-size: 30px;
}
.fallback p {
  font-size: 13px;
}
footer {
  margin-top: 40px;
}
@media (min-width: 1500px) {
  .map-wrap {
    max-width: 720px;
    margin: auto;
  }
}
@media (max-width: 1050px) {
  .wrap {
    width: calc(100% - 48px);
  }
  .source-buttons button {
    padding: 6px 10px;
  }
  .controls {
    gap: 20px;
  }
  .map-section {
    padding-right: 20px;
  }
  .comparison {
    padding-left: 22px;
  }
  .map-legend {
    grid-template-columns: 80px 1fr 65px;
    gap: 10px;
  }
  .legend-caption {
    font-size: 9px;
  }
  .downloads {
    gap: 12px;
  }
  .visual-grid {
    grid-template-columns: 1.5fr 1fr;
  }
  .intro h1 {
    font-size: 54px;
  }
  .sea-south {
    font-size: 7px;
    bottom: 6%;
  }
}
@media (max-width: 760px) {
  .wrap {
    width: calc(100% - 36px);
  }
  .demo-label,
  .brand-divider {
    display: none;
  }
  .intro {
    padding: 32px 0 26px;
    align-items: start;
    flex-direction: column;
    gap: 20px;
  }
  .intro h1 {
    font-size: 47px;
  }
  .intro .eyebrow {
    font-size: 10px;
    margin-bottom: 18px;
  }
  .deck {
    font-size: 14px;
  }
  .edition {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    text-align: left;
    font-size: 10px;
  }
  .edition .eyebrow {
    display: none;
  }
  .edition strong {
    font-size: 20px;
  }
  .controls {
    flex-direction: column;
    padding: 19px 0;
    gap: 20px;
  }
  .source-buttons {
    gap: 5px;
  }
  .source-buttons button {
    padding: 8px 12px;
  }
  .year-control {
    width: 100%;
  }
  .visual-grid {
    grid-template-columns: 1fr;
  }
  .map-section {
    padding-right: 0;
    border-right: 0;
  }
  .section-top {
    font-size: 9px;
  }
  .map-wrap {
    margin-top: 8px;
  }
  .map-legend {
    grid-template-columns: 80px 1fr 65px;
  }
  .comparison {
    border-top: 1px solid var(--line);
    padding: 24px 0 28px;
  }
  .compare-deck {
    margin: 15px 0;
  }
  .selected-countries {
    min-height: 0;
  }
  .country-chip {
    padding: 3px 0;
  }
  .chart-figure {
    max-width: 520px;
    margin: 10px auto;
  }
  .insight {
    margin-top: 20px;
  }
  .below-atlas {
    align-items: start;
    flex-direction: column;
  }
  .downloads {
    gap: 18px;
    flex-wrap: wrap;
  }
  .method {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-top: 32px;
  }
  .method > div:first-child p {
    max-width: none;
  }
  .demo-cta {
    flex-direction: column;
    align-items: start;
  }
  .demo-cta p {
    font-size: 27px;
  }
  .sea-south {
    font-size: 7px;
    bottom: 8%;
  }
  .mobile-break {
    display: block;
  }
  .data-table summary span {
    display: block;
    padding: 5px 0 0;
  }
}
@media print {
  header,
  .controls,
  .downloads,
  .demo-cta,
  footer,
  .add-country,
  .country-chip button {
    display: none;
  }
  .wrap {
    width: 100%;
  }
  .intro {
    padding: 10px 0;
  }
  .intro h1 {
    font-size: 36px;
  }
  .visual-grid {
    grid-template-columns: 1.6fr 1fr;
  }
  .method {
    break-before: page;
  }
}

@media (max-width: 760px) {
  .map-label { font-size: 17px; }
  .map-label.value { font-size: 20px; }
}

.country:focus-visible {
  stroke: #102d31;
  stroke-width: 3;
  filter: drop-shadow(0 0 2px #fff);
}
