:root {
  --ink: #20211e;
  --paper: #f8f6ef;
  --line: #ded9ce;
  --red: #9c201c;
  --orange: #dc6405;
  --yellow: #e8d81a;
  --green: #668d43;
  --muted: #74766d;
  --monte: #b08a6e;
  --norte: #8e2525;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Source Sans 3", Arial, sans-serif;
}
button,
input {
  font: inherit;
}
.cover {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  background: #fffefb;
  isolation: isolate;
  padding: 3rem 1.5rem;
}
.cover::before {
  content: "";
  z-index: -1;
  opacity: 0.45;
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 5.5vw,
      #efb6a6 5.6vw 5.72vw,
      transparent 5.85vw 10vw
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0 14vw,
      #efb6a6 14.1vw 14.25vw,
      transparent 14.35vw 20vw
    );
  background-size: 100% 100%;
  mask-image: linear-gradient(
    to right,
    #000 0 19%,
    transparent 39% 61%,
    #000 81%
  );
}
.tree-lines {
  position: absolute;
  width: 28vw;
  min-width: 260px;
  height: 85vh;
  background: radial-gradient(
    ellipse at center,
    transparent 0 12%,
    #edb4a1 12.2% 12.5%,
    transparent 12.8% 19%,
    #edb4a1 19.2% 19.5%,
    transparent 19.8% 28%,
    #edb4a1 28.2% 28.5%,
    transparent 28.8%
  );
  opacity: 0.45;
  z-index: -1;
}
.tree-lines--left {
  left: -10vw;
  bottom: -35vh;
}
.tree-lines--right {
  right: -12vw;
  top: -34vh;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font:
    500 0.75rem "DM Mono",
    monospace;
  margin: 0 0 0.75rem;
  color: #6e413a;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
.cover h1 {
  font:
    700 clamp(4.5rem, 12vw, 10rem)/0.72 "Newsreader",
    Georgia,
    serif;
  letter-spacing: -0.08em;
  margin: 0.75rem 0 1.75rem;
}
.cover-copy {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  max-width: 28rem;
  line-height: 1.3;
}
.axe {
  height: 58px;
  width: 170px;
  position: relative;
  opacity: 0.45;
  margin: 1rem 0;
  transform: rotate(-4deg);
}
.axe i {
  position: absolute;
  left: 78px;
  height: 60px;
  width: 10px;
  border-radius: 8px;
  background: #6e6b67;
}
.axe b {
  position: absolute;
  left: 33px;
  top: 5px;
  width: 100px;
  height: 31px;
  display: block;
  background: #6e6b67;
  clip-path: polygon(8% 8%, 88% 0, 100% 85%, 4% 100%);
  border-radius: 5px;
}
.scroll-cue {
  position: absolute;
  bottom: 2rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
}
.scroll-cue span {
  display: block;
  font-size: 1.6rem;
  line-height: 1.25;
  animation: bob 1.8s infinite;
}
@keyframes bob {
  50% {
    transform: translateY(5px);
  }
}
.explorer {
  min-height: 100vh;
  background: var(--paper);
  padding: clamp(1.25rem, 4vw, 4rem) clamp(1rem, 6vw, 7rem) 2rem;
}
.explorer-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.25rem;
}
.explorer h2 {
  font:
    700 clamp(2.2rem, 5vw, 4.2rem)/0.95 "Newsreader",
    Georgia,
    serif;
  letter-spacing: -0.045em;
  margin: 0;
}
.intro {
  max-width: 27rem;
  line-height: 1.3;
  margin: 0;
  color: #55564f;
}
.filters {
  display: grid;
  grid-template-columns: 1.05fr 1.6fr 0.8fr;
  gap: 1.5rem;
  padding: 1.2rem 0;
  align-items: start;
  border-bottom: 1px solid var(--line);
}
.filter-block {
  padding: 0;
  border: 0;
  min-width: 0;
}
.filter-label {
  color: #57584f;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font:
    500 0.68rem "DM Mono",
    monospace;
  margin: 0 0 0.55rem;
}
.year-readout {
  font:
    600 1.2rem "DM Mono",
    monospace;
  display: flex;
  gap: 0.6rem;
}
.range-wrap {
  height: 25px;
  position: relative;
  margin-top: 0.35rem;
}
.range-wrap input {
  appearance: none;
  position: absolute;
  pointer-events: none;
  width: 100%;
  height: 5px;
  margin: 0;
  top: 6px;
  border-radius: 3px;
  background: linear-gradient(
    to right,
    var(--ink) var(--start, 0%),
    var(--red) var(--start, 0%) var(--end, 100%),
    var(--ink) var(--end, 100%)
  );
}
.range-wrap input::-webkit-slider-thumb {
  appearance: none;
  pointer-events: auto;
  background: var(--paper);
  width: 15px;
  height: 15px;
  border: 2px solid var(--red);
  border-radius: 50%;
  cursor: ew-resize;
}
.range-wrap input::-moz-range-thumb {
  pointer-events: auto;
  background: var(--paper);
  width: 12px;
  height: 12px;
  border: 2px solid var(--red);
  border-radius: 50%;
  cursor: ew-resize;
}
.groups-filter {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.groups-filter legend {
  width: 100%;
}
.groups-filter label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  cursor: pointer;
}
.groups-filter input {
  accent-color: var(--red);
}
.swatch,
.status-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  display: inline-block;
}
.swatch--monte {
  background: var(--monte);
}
.swatch--norte {
  background: var(--norte);
}
.total-block {
  border-left: 1px solid var(--line);
  padding-left: 1rem;
  display: flex;
  flex-direction: column;
  line-height: 1;
  color: #5b5c54;
}
.total-block strong {
  color: var(--red);
  font:
    700 clamp(1.3rem, 2vw, 2.1rem)/1 "DM Mono",
    monospace;
  margin: 0.3rem 0 0.2rem;
}
.total-block small {
  font-size: 0.76rem;
}
.map-layout {
  position: relative;
  min-height: 600px;
}
.map-stage {
  min-height: 650px;
  position: relative;
  overflow: hidden;
}
.map-silhouette {
  position: absolute;
  width: min(67vw, 850px);
  height: 77%;
  left: 5%;
  top: 12%;
  opacity: 0.6;
  background-image: radial-gradient(circle, #cbd9c2 0 4px, transparent 5px);
  background-size: 23px 23px;
  clip-path: polygon(
    47% 0,
    57% 7%,
    58% 21%,
    65% 29%,
    60% 38%,
    68% 46%,
    60% 55%,
    66% 66%,
    57% 77%,
    51% 100%,
    45% 83%,
    37% 73%,
    39% 62%,
    30% 52%,
    36% 42%,
    29% 31%,
    39% 22%
  );
  filter: blur(0.2px);
}
.map-hint {
  position: absolute;
  top: 7%;
  left: 8%;
  color: #5c5e55;
  font-size: 0.9rem;
}
.province-dots {
  position: absolute;
  inset: 0;
}
.province {
  position: absolute;
  transform: translate(-50%, -50%);
  width: var(--size);
  height: var(--size);
  border: 2px dashed rgba(255, 255, 255, 0.95);
  outline: 2px solid rgba(44, 43, 38, 0.13);
  border-radius: 50%;
  background: var(--color);
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.08);
  transition:
    transform 0.2s,
    box-shadow 0.2s,
    opacity 0.2s;
}
.province:hover,
.province:focus-visible,
.province.is-selected {
  transform: translate(-50%, -50%) scale(1.15);
  box-shadow:
    0 0 0 5px rgba(255, 255, 255, 0.8),
    0 3px 8px rgba(0, 0, 0, 0.18);
  z-index: 3;
  outline-color: var(--ink);
}
.province:focus-visible {
  outline: 3px solid var(--ink);
}
.province span {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 7px);
  transform: translateX(-50%);
  padding: 0.12rem 0.35rem;
  border-radius: 2px;
  background: var(--ink);
  color: white;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  font:
    500 0.67rem "DM Mono",
    monospace;
}
.province:hover span,
.province:focus-visible span,
.province.is-selected span {
  opacity: 1;
}
.province.is-empty {
  opacity: 0.2;
  pointer-events: none;
}
.map-key {
  position: absolute;
  left: 2%;
  bottom: 2%;
  font-size: 0.8rem;
  color: #67685f;
}
.key-dot {
  display: inline-block;
  vertical-align: middle;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--red);
  border: 2px dashed white;
  outline: 1px solid #aaa;
  margin-right: 0.25rem;
}
.detail-card {
  position: absolute;
  width: min(410px, 42%);
  min-height: 265px;
  right: 0;
  top: 3.5rem;
  background: #fffefb;
  border: 1px solid #d8d4ca;
  box-shadow: 0 9px 25px rgba(46, 41, 35, 0.13);
  padding: 1.55rem;
  z-index: 5;
}
.close-card {
  position: absolute;
  right: 0.55rem;
  top: 0.25rem;
  background: none;
  border: 0;
  font-size: 1.7rem;
  color: #686861;
  cursor: pointer;
}
.detail-empty {
  font:
    700 1.6rem/1 "Newsreader",
    serif;
  color: #717168;
  margin: 2.5rem 0 1rem;
}
.detail-heading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.detail-heading .eyebrow {
  margin: 0 0 0.15rem;
  font-size: 0.6rem;
}
.detail-heading h3 {
  font:
    700 2rem/0.95 "Newsreader",
    serif;
  margin: 0;
}
.detail-total {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
  margin: 0.9rem 0;
}
.detail-total strong {
  color: var(--red);
  font:
    700 1.6rem/1 "DM Mono",
    monospace;
}
.detail-total span {
  font-size: 0.79rem;
  line-height: 1.05;
  color: #5e5e56;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 1rem;
}
.tree-slice {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  background: #e7e2d4 url("rodaja_de_arbol.png") center 48%/105% auto no-repeat;
  isolation: isolate;
}
.tree-slice::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.14);
  z-index: -1;
}
.tree-bubble {
  position: absolute;
  border-radius: 50%;
  opacity: 0.94;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.18);
  transition:
    width 0.25s,
    height 0.25s;
}
.tree-bubble--monte {
  background: var(--monte);
  right: 7%;
  bottom: 8%;
}
.tree-bubble--norte {
  background: var(--norte);
  left: 14%;
  bottom: 15%;
}
.breakdown {
  display: grid;
  gap: 0.65rem;
}
.breakdown-row {
  font-size: 0.78rem;
  line-height: 1.05;
}
.breakdown-row strong {
  font:
    500 0.95rem "DM Mono",
    monospace;
  display: block;
  margin-top: 0.15rem;
}
.breakdown-row .bar-line {
  height: 5px;
  background: #e5e1d8;
  margin-top: 0.35rem;
}
.breakdown-row i {
  display: block;
  height: 100%;
  background: var(--color);
}
.year-bars {
  margin-top: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
}
.year-bars .filter-label {
  margin-bottom: 0.35rem;
}
.bars {
  height: 42px;
  display: flex;
  align-items: end;
  gap: 4px;
}
.bar {
  flex: 1;
  min-width: 0;
  background: var(--red);
  position: relative;
  opacity: 0.8;
}
.bar::after {
  content: attr(data-year);
  position: absolute;
  top: calc(100% + 2px);
  font:
    400 0.51rem "DM Mono",
    monospace;
  left: 50%;
  transform: translateX(-50%);
  color: #6c6c66;
}
.source {
  color: #74756d;
  font-size: 0.75rem;
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
}
@media (max-width: 800px) {
  .cover {
    min-height: 92vh;
  }
  .explorer-header,
  .filters {
    display: block;
  }
  .intro {
    margin-top: 1rem;
  }
  .filters > * {
    margin: 0.9rem 0;
  }
  .total-block {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 0.65rem 0 0;
  }
  .map-stage {
    min-height: 600px;
  }
  .map-silhouette {
    width: 100%;
    left: -8%;
  }
  .detail-card {
    position: relative;
    width: 100%;
    right: auto;
    top: auto;
    margin: 0.5rem 0 1.25rem;
  }
  .map-layout {
    display: flex;
    flex-direction: column;
  }
  .map-stage {
    order: 1;
  }
  .detail-card {
    order: 2;
  }
  .map-hint {
    left: 2%;
  }
  .province span {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
