:root {
  --primary: #275c4a;
  --ink: #243c35;
  --muted: #61756d;
  --surface: #fff;
  --background: #f4f6f2;
  --ocean: #dce8e8;
  --border: #dce3dc;
  --accent: #b08a47;
  --rail: #203f35;
  --radius: 8px;
  color-scheme: light;
}
* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: #a7b8ad #edf1ec;
}
*::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
*::-webkit-scrollbar-thumb {
  background: #a7b8ad;
  border-radius: 8px;
}
*::-webkit-scrollbar-track {
  background: #edf1ec;
}
body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font:
    14px/1.5 Arial,
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button {
  border: 0;
  background: none;
  color: inherit;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #b08a47;
  outline-offset: 3px;
}
button:hover {
  filter: brightness(0.96);
}
button:active {
  transform: translateY(1px);
}
svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.icon-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.app {
  display: grid;
  grid-template-columns: 64px 278px minmax(0, 1fr);
  min-height: 100dvh;
}
.rail {
  background: var(--rail);
  color: #bfd3c8;
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 27px 8px 16px;
  position: sticky;
  top: 0;
  height: 100dvh;
  z-index: 5;
}
.brand-mark {
  color: #f1f5ea;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
}
.brand-mark svg {
  width: 30px;
  height: 30px;
  stroke-width: 1;
}
.rail-links {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 61px;
}
.rail-btn {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  position: relative;
}
.rail-btn svg {
  width: 21px;
  height: 21px;
}
.rail-btn.active {
  background: #456252;
  color: #fff;
}
.rail-btn.active:before {
  content: "";
  position: absolute;
  left: -9px;
  top: 12px;
  height: 18px;
  width: 3px;
  background: #cfdbb5;
  border-radius: 3px;
}
.rail-btn.bottom {
  margin-top: auto;
}
.version {
  font:
    9px Consolas,
    monospace;
  letter-spacing: 1px;
  margin-top: 16px;
  opacity: 0.7;
}
.sidebar {
  background: #fbfcf9;
  border-right: 1px solid var(--border);
  padding: 26px 23px 22px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow: auto;
}
.wordmark {
  font:
    28px Georgia,
    serif;
  letter-spacing: -1.4px;
  margin-bottom: 37px;
}
.wordmark span {
  display: block;
  letter-spacing: 2px;
  font:
    8px Arial,
    sans-serif;
  margin-top: 4px;
  color: var(--muted);
}
.country-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.eyebrow {
  font:
    9px Consolas,
    monospace;
  letter-spacing: 1.5px;
  color: var(--muted);
}
.text-button {
  font-size: 10px;
  color: var(--primary);
  padding: 4px 0;
}
.country-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 8px;
}
.country-title h1 {
  font:
    34px/1.2 Georgia,
    serif;
  letter-spacing: -1px;
  margin: 0;
  overflow-wrap: anywhere;
}
.flag {
  display: block;
  background: #c5a95f;
  width: 30px;
  height: 23px;
  border-radius: 3px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.flag:before {
  content: "";
  position: absolute;
  width: 40px;
  height: 20px;
  transform: rotate(-35deg);
  background: #527b61;
  left: -5px;
  top: -5px;
}
.flag i {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #fff8d7;
  border-radius: 50%;
  left: 12px;
  top: 8px;
}
.country-system {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
}
.scenario-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  margin-top: 17px;
  color: var(--muted);
}
.scenario-status > span:first-child,
.live-dot,
.dot-green {
  display: inline-block;
  background: #648b65;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.small-label {
  margin-left: auto;
  border: 1px solid var(--border);
  padding: 1px 5px;
  font:
    9px Consolas,
    monospace;
  border-radius: 3px;
}
.sidebar-section {
  border-top: 1px solid var(--border);
  margin-top: 25px;
  padding-top: 20px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 17px;
}
.section-heading > span {
  font-size: 9px;
  color: var(--muted);
  font-weight: 400;
}
.national-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 24px;
  gap: 10px;
}
.national-stats > div > span {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-bottom: 5px;
}
.national-stats strong {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.7px;
  white-space: nowrap;
}
.national-stats small {
  font-size: 10px;
  letter-spacing: 0;
}
.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 13px;
  font-size: 11px;
}
.metric-row > span {
  color: var(--muted);
}
.metric-value {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.mini-bar {
  width: 37px;
  height: 4px;
  background: #e5eae2;
  border-radius: 3px;
  overflow: hidden;
}
.mini-bar i {
  display: block;
  background: #73917a;
  height: 100%;
}
.territory-list {
  margin-top: 23px;
  padding-top: 18px;
}
.region-list-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 9px 10px;
  border-radius: 6px;
  font-size: 11px;
  text-align: left;
  gap: 10px;
  margin: 2px 0;
}
.region-list-item .region-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8d9c73;
}
.region-list-item span:last-child {
  margin-left: auto;
  font:
    10px Consolas,
    monospace;
  color: var(--muted);
}
.region-list-item.selected {
  background: #e8eee4;
  color: var(--primary);
  font-weight: 600;
}
.region-list-item:hover {
  background: #eef2eb;
}
.sidebar-note {
  display: flex;
  gap: 9px;
  color: var(--muted);
  font-size: 10px;
  margin-top: auto;
  padding-top: 25px;
  margin-bottom: 17px;
  line-height: 1.7;
}
.sidebar-note svg {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}
.primary,
.secondary {
  border-radius: var(--radius);
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  min-height: 38px;
}
.primary {
  background: var(--primary);
  color: #fff;
}
.secondary {
  border: 1px solid var(--border);
  background: #fff;
}
.primary svg,
.secondary svg {
  width: 15px;
  height: 15px;
}
.full {
  width: 100%;
}
main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
.topbar {
  height: 99px;
  padding: 24px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fbfcf9;
  border-bottom: 1px solid var(--border);
  gap: 20px;
}
.breadcrumb {
  color: var(--muted);
  font-size: 10px;
  display: flex;
  gap: 10px;
  margin-bottom: 5px;
}
.breadcrumb span:last-child {
  color: var(--ink);
}
h2 {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.5px;
  margin: 0;
}
.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.local-status {
  color: var(--muted);
  font-size: 10px;
  margin-right: 8px;
}
.view {
  display: none;
}
.view.active {
  display: block;
}
#view-territorio {
  padding: 22px 24px 0;
  flex: 1;
}
.map-shell {
  height: calc(100dvh - 229px);
  min-height: 480px;
  position: relative;
  background: var(--ocean);
  border: 1px solid #cad9d4;
  border-radius: 12px;
  overflow: hidden;
}
.map-shell:after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 75px #afc5bf25;
  border-radius: 12px;
}
#mapViewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}
#mapViewport.dragging {
  cursor: grabbing;
}
#atlas {
  width: 100%;
  height: 100%;
  stroke: none;
}
.map-top {
  position: absolute;
  z-index: 2;
  left: 22px;
  right: 22px;
  top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}
.map-caption {
  font:
    9px Consolas,
    monospace;
  letter-spacing: 1.4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.map-sub {
  color: #657f77;
  font-size: 8px;
  letter-spacing: 0.6px;
}
.map-country {
  font-size: 10px;
  background: #f8faf4d9;
  border: 1px solid #b5c9bc80;
  padding: 7px 10px;
  border-radius: 5px;
  pointer-events: auto;
}
.layer-bar {
  position: absolute;
  left: 20px;
  top: 62px;
  z-index: 2;
  background: #fffffff0;
  border: 1px solid #cdd8cc;
  border-radius: 7px;
  display: flex;
  padding: 4px;
  box-shadow: 0 3px 10px #34534909;
  align-items: center;
  gap: 1px;
}
.layer-bar > span {
  font-size: 10px;
  padding: 0 12px 0 7px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-right: 1px solid var(--border);
  margin-right: 3px;
}
.layer-bar svg {
  width: 14px;
  height: 14px;
}
.layer-bar button {
  font-size: 10px;
  padding: 7px 10px;
  border-radius: 4px;
  color: var(--muted);
}
.layer-bar button.active {
  background: #e8eee2;
  color: var(--primary);
  font-weight: 600;
}
.compass {
  position: absolute;
  right: 27px;
  top: 79px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font:
    11px Georgia,
    serif;
  color: #345c50;
  pointer-events: none;
}
.compass svg {
  height: 48px;
  width: 32px;
  stroke: none;
}
.map-zoom {
  position: absolute;
  right: 22px;
  bottom: 102px;
  background: #fffffff0;
  border: 1px solid #c2d0c4;
  border-radius: 7px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 2px 8px #3453490d;
}
.map-zoom button {
  width: 34px;
  height: 34px;
  font-size: 20px;
}
.map-zoom button + button {
  border-top: 1px solid var(--border);
}
.region-card {
  position: absolute;
  right: 20px;
  top: 161px;
  width: 235px;
  background: #fffffff2;
  border: 1px solid #d4ddd2;
  border-radius: 10px;
  z-index: 2;
  box-shadow: 0 5px 20px #3453490c;
  padding: 16px 17px;
}
.region-card.hidden {
  display: none;
}
.region-overline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font:
    8px Consolas,
    monospace;
  letter-spacing: 1px;
  color: var(--muted);
}
.region-overline button {
  padding: 0;
  width: 18px;
  height: 18px;
}
.region-overline svg {
  width: 13px;
  height: 13px;
}
.region-card h3 {
  font:
    23px Georgia,
    serif;
  letter-spacing: -0.6px;
  margin: 8px 0 5px;
}
.region-card p {
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 12px;
}
.region-data {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 9px;
  border-top: 1px solid var(--border);
  padding-top: 13px;
}
.region-data span {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-bottom: 3px;
}
.region-data strong {
  font-size: 13px;
  font-weight: 500;
}
.region-footer {
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 11px;
  font-size: 9px;
  color: var(--muted);
}
.region-footer button {
  padding: 0;
  color: var(--primary);
  font-weight: 600;
  font-size: 9px;
}
.map-bottom {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 20px;
  display: flex;
  align-items: flex-end;
  gap: 34px;
  pointer-events: none;
}
.map-bottom > div:first-child {
  width: 146px;
}
.map-bottom > div > span {
  font:
    8px Consolas,
    monospace;
  letter-spacing: 1.3px;
  color: #4c6960;
}
.legend-gradient {
  height: 6px;
  background: linear-gradient(
    90deg,
    #bfd0a8,
    #a6bb8b,
    #cad1a2,
    #e4dec5,
    #f2efdd
  );
  margin: 8px 0 5px;
  border-radius: 2px;
}
.legend-labels {
  display: flex;
  justify-content: space-between;
  font:
    8px Consolas,
    monospace;
  color: #4c6960;
}
.scale {
  width: 106px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  font:
    8px Consolas,
    monospace;
  color: #4c6960;
}
.scale div {
  width: 100%;
  height: 4px;
  border: 1px solid #527469;
  border-top: 0;
  margin-top: 4px;
  background: linear-gradient(90deg, #527469 50%, transparent 50%);
}
.map-attribution {
  margin-left: auto;
  font-size: 8px;
  color: #58746a;
}
.map-hint {
  position: absolute;
  left: 50%;
  bottom: 62px;
  transform: translateX(-50%);
  font-size: 9px;
  color: #4d6d61;
  pointer-events: none;
  white-space: nowrap;
}
.below-map {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 2px;
  font-size: 10px;
  color: var(--muted);
  gap: 15px;
}
.below-map .dot-green {
  margin-right: 6px;
}
.below-map strong {
  font-weight: 600;
  color: #50695b;
}
.below-map button {
  font-size: 10px;
  white-space: nowrap;
}
.timeline {
  margin-top: auto;
  min-height: 86px;
  background: #fbfcf9;
  border-top: 1px solid var(--border);
  padding: 17px 28px;
  display: flex;
  align-items: center;
  gap: 30px;
}
.timeline-date strong {
  font-size: 17px;
  font-weight: 500;
  display: block;
  white-space: nowrap;
  margin-top: 4px;
}
.timeline-date strong span {
  font-size: 11px;
  color: var(--muted);
  margin-left: 8px;
}
.timeline-track {
  display: flex;
  justify-content: space-between;
  position: relative;
  flex: 1;
  max-width: 700px;
}
.timeline-track:before {
  content: "";
  position: absolute;
  top: 5px;
  height: 1px;
  background: var(--border);
  left: 0;
  right: 0;
}
.time-stop {
  position: relative;
  text-align: center;
  font:
    8px Consolas,
    monospace;
  color: #7c8c81;
}
.time-stop:before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ced8cc;
  margin: 3px auto 10px;
  position: relative;
  box-shadow: 0 0 0 5px #fbfcf9;
}
.time-stop.current:before {
  background: var(--primary);
  box-shadow: 0 0 0 4px #e3ebdc;
}
.time-stop.current {
  color: var(--primary);
  font-weight: bold;
}
.timeline-end {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.experiment {
  font:
    7px Consolas,
    monospace;
  letter-spacing: 1px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 6px;
}
.content-view {
  padding: 35px;
  flex: 1;
  max-width: 1400px;
  width: 100%;
  align-self: center;
}
.content-heading {
  margin-bottom: 27px;
}
.content-heading h3 {
  font:
    31px Georgia,
    serif;
  letter-spacing: -0.7px;
  margin: 9px 0;
}
.content-heading p {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}
.policies {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}
.policy {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 22px;
}
.policy-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
}
.policy-icon {
  width: 34px;
  height: 34px;
  background: #edf2e9;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--primary);
  font-size: 17px;
}
.policy h4 {
  font-size: 14px;
  font-weight: 500;
  margin: 13px 0 6px;
}
.policy p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  min-height: 39px;
  margin: 0 0 19px;
}
.policy label {
  font-size: 10px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}
.policy output {
  color: var(--primary);
  font-weight: 600;
  font-size: 12px;
}
.policy input {
  width: 100%;
  margin: 13px 0 0;
  accent-color: var(--primary);
  cursor: pointer;
}
.policy-range {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--muted);
  margin-top: 5px;
}
.policy-cost {
  font-size: 9px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
  padding-top: 12px;
  color: var(--muted);
}
.policy-budget {
  display: flex;
  gap: 30px;
  background: #eaf0e4;
  border: 1px solid #d5dfcc;
  border-radius: 9px;
  margin-bottom: 20px;
  padding: 17px 22px;
  flex-wrap: wrap;
}
.policy-budget span {
  font-size: 10px;
  color: var(--muted);
  display: block;
}
.policy-budget strong {
  display: block;
  font-size: 18px;
  font-weight: 500;
  margin-top: 5px;
}
.policy-budget .budget-description {
  margin-left: auto;
  max-width: 250px;
  font-size: 10px;
  color: var(--muted);
  align-self: center;
  line-height: 1.7;
}
.model-note {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
  margin-top: 20px;
}
.model-note button {
  color: var(--primary);
  text-decoration: underline;
}
.indicator-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
  margin-bottom: 22px;
}
.indicator-card {
  border: 1px solid var(--border);
  padding: 19px;
  background: #fff;
  border-radius: 9px;
}
.indicator-card > span {
  font-size: 10px;
  color: var(--muted);
}
.indicator-card strong {
  display: block;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.6px;
  margin: 7px 0;
}
.indicator-card small {
  font-size: 10px;
  color: var(--muted);
}
.chart-panel,
.event-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 23px;
  margin-bottom: 18px;
}
.chart-heading {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
}
.chart-heading h4,
.event-panel h4 {
  font-size: 15px;
  font-weight: 500;
  margin: 0 0 5px;
}
.chart-heading p {
  font-size: 10px;
  color: var(--muted);
  margin: 0;
}
.chart-heading label {
  font-size: 9px;
  color: var(--muted);
}
select {
  display: block;
  border: 1px solid var(--border);
  padding: 8px;
  background: #fff;
  border-radius: 6px;
  color: var(--ink);
  max-width: 100%;
  font-size: 12px;
}
#historyChart {
  width: 100%;
  height: auto;
  min-height: 180px;
  margin-top: 20px;
  stroke: none;
}
.chart-summary {
  font-size: 11px;
  color: var(--muted);
}
.event {
  display: flex;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
}
.event:last-child {
  border: 0;
}
.event b {
  font-weight: 500;
}
.event span {
  color: var(--muted);
  display: block;
  margin-top: 3px;
  font-size: 10px;
}
.event-dot {
  width: 7px;
  height: 7px;
  background: #8caa71;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.scenario-actions {
  display: flex;
  gap: 10px;
}
.storage-note {
  font-size: 10px;
  color: var(--muted);
  margin: 16px 0 25px;
}
.empty {
  border: 1px dashed #b9c8b9;
  padding: 48px;
  text-align: center;
  border-radius: 10px;
  color: var(--muted);
}
.empty h4 {
  font:
    23px Georgia,
    serif;
  color: var(--ink);
  margin: 15px 0 8px;
}
.empty p {
  font-size: 12px;
}
.scenario-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 15px;
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}
.scenario-card h4 {
  font:
    22px Georgia,
    serif;
  margin: 0 0 6px;
}
.scenario-card p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.scenario-card .scenario-numbers {
  display: flex;
  gap: 24px;
  margin-left: auto;
}
.scenario-numbers span {
  font-size: 9px;
  color: var(--muted);
  display: block;
}
.scenario-numbers strong {
  font-size: 14px;
  font-weight: 500;
}
.scenario-card .scenario-buttons {
  display: flex;
  gap: 7px;
}
.remove {
  color: #9a5341;
  font-size: 10px;
}
.comparison {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 9px;
  margin-top: 20px;
  background: #fff;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}
td,
th {
  text-align: left;
  border-bottom: 1px solid var(--border);
  padding: 12px 8px;
}
th {
  font-weight: 500;
  color: var(--muted);
}
dialog {
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 25px;
  width: min(580px, calc(100% - 32px));
  max-height: 90dvh;
  overflow: auto;
  color: var(--ink);
  box-shadow: 0 20px 100px #1c352838;
}
dialog::backdrop {
  background: #19382b66;
  backdrop-filter: blur(3px);
}
.modal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.icon-button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
}
.icon-button svg {
  width: 17px;
  height: 17px;
}
#modalBody h3 {
  font:
    30px Georgia,
    serif;
  letter-spacing: -0.7px;
  margin: 15px 0 10px;
}
#modalBody p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
  margin: 24px 0;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 11px;
}
.field.wide {
  grid-column: 1/-1;
}
.field input,
.field select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  width: 100%;
  font-size: 13px;
}
.field input[aria-invalid="true"] {
  border-color: #a34938;
}
.field small {
  color: var(--muted);
  font-size: 10px;
}
.field-error {
  font-size: 11px;
  color: #a34938;
  min-height: 15px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 23px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}
.method-block {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.method-block h4 {
  font-size: 12px;
  margin: 0 0 5px;
}
.method-block p {
  font-size: 11px !important;
  margin: 0;
}
.method-code {
  font:
    10px/1.8 Consolas,
    monospace;
  background: var(--background);
  padding: 10px;
  border-radius: 5px;
  overflow-wrap: anywhere;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: 25px;
  transform: translate(-50%, 15px);
  z-index: 20;
  background: var(--rail);
  color: #fff;
  border: 1px solid #607960;
  box-shadow: 0 5px 20px #16352920;
  border-radius: 9px;
  padding: 12px 20px;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  max-width: calc(100% - 35px);
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.city-marker {
  cursor: pointer;
}
.city-marker:hover circle {
  fill: #b08a47;
}
.city-text {
  font:
    10px Arial,
    sans-serif;
  fill: #335446;
  paint-order: stroke;
  stroke: #edf0d8;
  stroke-width: 3px;
  stroke-linejoin: round;
  pointer-events: none;
}
.state-label {
  font:
    12px Georgia,
    serif;
  letter-spacing: 2px;
  fill: #47664f;
  paint-order: stroke;
  stroke: #e3e8ceaa;
  stroke-width: 3px;
  pointer-events: none;
}
.water-label {
  font:
    italic 17px Georgia,
    serif;
  letter-spacing: 5px;
  fill: #88a4a2;
  pointer-events: none;
}
.region-path {
  fill: transparent;
  stroke: #687f5d;
  stroke-width: 1.4;
  stroke-dasharray: 4 2;
  cursor: pointer;
  transition: fill 0.2s;
}
.region-path:hover {
  fill: #f3f5d72e;
}
.region-path.selected {
  fill: #ffffce18;
  stroke: #446b46;
  stroke-width: 2.2;
  stroke-dasharray: none;
}
.municipality {
  fill: none;
  stroke: #6e8660;
  stroke-width: 0.55;
  stroke-opacity: 0.4;
  pointer-events: none;
}
.city-marker circle {
  fill: #f5f7e9;
  stroke: #3c5e4b;
  stroke-width: 1.6;
}
.city-marker.capital circle {
  fill: #315b45;
  stroke: #f4f5d8;
  stroke-width: 2;
}
.city-marker.capital .city-text {
  font-weight: bold;
}
.map-shell.zoomed .municipality {
  stroke-opacity: 0.65;
}
.map-shell.zoomed .state-label {
  opacity: 0.5;
}
.map-shell.zoomed .minor-city {
  display: block;
}
.minor-city {
  display: none;
}
.muted {
  color: var(--muted);
}
@media (min-width: 1600px) {
  .app {
    grid-template-columns: 68px 300px minmax(0, 1fr);
  }
  .map-shell {
    min-height: 620px;
  }
  .sidebar {
    padding: 30px;
  }
  .region-card {
    top: 175px;
    width: 250px;
  }
  .region-card h3 {
    font-size: 25px;
  }
  .region-card p {
    font-size: 11px;
  }
  .region-data strong {
    font-size: 15px;
  }
  .region-list-item {
    padding-top: 11px;
    padding-bottom: 11px;
  }
}
@media (max-width: 1150px) {
  .app {
    grid-template-columns: 56px 245px minmax(0, 1fr);
  }
  .sidebar {
    padding: 22px 18px;
  }
  .topbar {
    padding: 20px;
  }
  .top-actions .local-status {
    display: none;
  }
  .top-actions {
    gap: 7px;
  }
  .primary,
  .secondary {
    padding: 9px 11px;
    font-size: 10px;
  }
  #view-territorio {
    padding: 17px 16px 0;
  }
  .map-caption .map-sub {
    display: none;
  }
  .region-card {
    width: 205px;
    top: 139px;
    right: 15px;
    padding: 13px;
  }
  .region-card h3 {
    font-size: 22px;
  }
  .layer-bar {
    left: 15px;
  }
  .layer-bar > span {
    display: none;
  }
  .map-top {
    left: 17px;
    right: 17px;
  }
  .layer-bar button {
    padding: 6px 8px;
  }
  .map-attribution {
    display: none;
  }
  .below-map {
    font-size: 9px;
  }
  .timeline {
    padding: 17px 20px;
    gap: 20px;
  }
  .timeline-end > span:first-child {
    display: none;
  }
  .national-stats strong {
    font-size: 17px;
  }
  .content-view {
    padding: 27px;
  }
  .policy {
    padding: 18px;
  }
  .indicator-card {
    padding: 15px;
  }
}
@media (max-width: 900px) {
  .app {
    grid-template-columns: 52px 210px minmax(0, 1fr);
  }
  .sidebar {
    padding: 22px 14px;
  }
  .national-stats {
    grid-template-columns: 1fr;
    gap: 13px;
  }
  .wordmark {
    font-size: 26px;
  }
  .map-shell {
    min-height: 560px;
  }
  .region-card {
    top: auto;
    bottom: 100px;
    left: 15px;
    right: auto;
    width: 195px;
  }
  .map-hint {
    display: none;
  }
  .topbar {
    height: 100px;
  }
  .topbar .secondary {
    font-size: 0;
    gap: 0;
    padding: 10px;
  }
  .topbar .secondary svg {
    width: 16px;
    height: 16px;
  }
  .topbar .primary {
    font-size: 10px;
  }
  .timeline-end {
    display: none;
  }
  .map-country {
    font-size: 9px;
  }
  .map-caption {
    font-size: 8px;
    letter-spacing: 0.5px;
  }
  .layer-bar {
    top: 60px;
  }
  .policies {
    grid-template-columns: 1fr;
  }
  .indicator-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .chart-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .below-map > span {
    line-height: 1.7;
  }
  .below-map button {
    font-size: 9px;
  }
}
@media (max-width: 760px) {
  .app {
    grid-template-columns: 48px minmax(0, 1fr);
    min-height: 100dvh;
  }
  .rail {
    grid-row: 1/3;
    width: 48px;
    padding: 17px 3px;
    position: fixed;
    left: 0;
    bottom: 0;
    height: 100dvh;
  }
  .rail-links {
    margin-top: 40px;
    gap: 13px;
  }
  .rail-btn {
    width: 38px;
  }
  .sidebar {
    grid-column: 2;
    position: static;
    height: auto;
    overflow: visible;
    padding: 20px 20px 14px;
    border-bottom: 1px solid var(--border);
    border-right: 0;
  }
  .wordmark {
    margin-bottom: 20px;
    font-size: 25px;
  }
  .wordmark span {
    font-size: 7px;
  }
  .country-heading {
    margin-top: -49px;
    margin-left: 135px;
    justify-content: flex-end;
  }
  .country-heading > .eyebrow {
    display: none;
  }
  .country-title {
    margin-top: 29px;
  }
  .country-title h1 {
    font-size: 31px;
  }
  .country-system {
    font-size: 10px;
  }
  .scenario-status {
    margin-top: 9px;
  }
  .sidebar-section,
  .sidebar-note,
  .sidebar > .full {
    display: none;
  }
  main {
    grid-column: 2;
    min-height: auto;
  }
  .topbar {
    height: 88px;
    padding: 15px 17px;
    gap: 10px;
  }
  .breadcrumb {
    font-size: 9px;
  }
  .topbar h2 {
    font-size: 18px;
  }
  .top-actions {
    gap: 7px;
  }
  .topbar .primary {
    padding: 10px;
    font-size: 9px;
  }
  .topbar .primary svg {
    display: none;
  }
  #view-territorio {
    padding: 12px 12px 0;
  }
  .map-shell {
    height: 590px;
    min-height: 550px;
    border-radius: 9px;
  }
  .map-top {
    left: 12px;
    right: 12px;
    top: 14px;
  }
  .map-caption {
    font-size: 7px;
  }
  .map-country {
    font-size: 8px;
    padding: 5px 7px;
  }
  .layer-bar {
    top: 49px;
    left: 11px;
    padding: 3px;
    max-width: calc(100% - 22px);
  }
  .layer-bar button {
    font-size: 9px;
    padding: 6px 9px;
  }
  .compass {
    right: 15px;
    top: 91px;
  }
  .region-card {
    bottom: 100px;
    left: 12px;
    width: 190px;
  }
  .region-overline {
    font-size: 7px;
  }
  .region-data strong {
    font-size: 12px;
  }
  .map-bottom {
    left: 15px;
    right: 15px;
    bottom: 17px;
    gap: 25px;
  }
  .map-bottom > div:first-child {
    width: 125px;
  }
  .scale {
    width: 88px;
  }
  .map-zoom {
    bottom: 105px;
    right: 12px;
  }
  .below-map {
    display: block;
    padding: 12px 2px;
  }
  .below-map button {
    margin-top: 7px;
    padding: 0;
  }
  .timeline {
    padding: 16px;
    gap: 20px;
    min-height: 92px;
    flex-wrap: wrap;
  }
  .timeline-date .eyebrow {
    font-size: 7px;
  }
  .timeline-date strong {
    font-size: 15px;
  }
  .timeline-date strong span {
    font-size: 9px;
    margin-left: 4px;
  }
  .timeline-track {
    min-width: 100px;
  }
  .time-stop {
    font-size: 7px;
  }
  .content-view {
    padding: 26px 17px;
  }
  .content-heading h3 {
    font-size: 27px;
  }
  .content-heading p {
    font-size: 11px;
  }
  .policy-budget {
    padding: 15px;
    gap: 18px;
  }
  .policy-budget .budget-description {
    max-width: none;
    margin: 0;
  }
  .indicator-cards {
    gap: 9px;
  }
  .indicator-card strong {
    font-size: 23px;
  }
  .indicator-card {
    padding: 13px;
  }
  .chart-panel,
  .event-panel {
    padding: 16px;
  }
  .scenario-actions {
    flex-wrap: wrap;
  }
  .empty {
    padding: 30px 15px;
  }
  .scenario-card {
    padding: 16px;
  }
  .scenario-card .scenario-numbers {
    margin: 0;
    gap: 15px;
  }
  .scenario-card .scenario-buttons {
    width: 100%;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .field.wide {
    grid-column: auto;
  }
  .comparison {
    padding: 10px;
  }
  td,
  th {
    font-size: 10px;
    padding: 10px 4px;
  }
  dialog {
    padding: 20px;
  }
  .modal-actions {
    flex-wrap: wrap;
  }
  .local-status {
    display: none;
  }
  .timeline-end {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
@media (forced-colors: active) {
  * {
    scrollbar-color: auto;
  }
  .primary,
  .rail-btn.active {
    border: 1px solid ButtonText;
  }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.map-top-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  pointer-events: auto;
}
.state-select {
  background: #f8faf4ed;
  border-color: #b5c9bc80;
  font-size: 10px;
  padding: 6px;
  max-width: 145px;
}
.municipality-picker {
  display: block;
  margin-top: 12px;
  font-size: 9px;
  color: var(--muted);
}
.municipality-picker select {
  width: 100%;
  font-size: 10px;
  margin-top: 5px;
  padding: 6px;
}
.region-footer {
  margin-top: 12px;
}
.region-path {
  pointer-events: all;
}
@media (max-width: 1150px) {
  .state-select {
    max-width: 118px;
    font-size: 9px;
  }
  .map-caption {
    max-width: 180px;
  }
  .map-country {
    font-size: 0;
  }
  .map-country:before {
    content: "⌖";
    font-size: 13px;
  }
}
@media (max-width: 760px) {
  .sidebar > .full {
    display: inline-flex;
    margin-top: 14px;
    min-height: 30px;
    width: auto;
    font-size: 10px;
    padding: 5px 10px;
  }
  .map-top-actions {
    gap: 5px;
  }
  .state-select {
    max-width: 112px;
    font-size: 9px;
  }
  .map-caption {
    max-width: 105px;
    font-size: 7px;
  }
  .region-card {
    bottom: 90px;
  }
  .map-bottom {
    gap: 20px;
  }
  .region-card .municipality-picker {
    margin-top: 9px;
  }
  .region-card .municipality-picker select {
    padding: 5px;
  }
  .region-footer {
    font-size: 8px;
  }
  .map-top {
    left: 11px;
    right: 11px;
  }
}
