:root {
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-soft: cubic-bezier(.16, 1, .3, 1);
  --ink: #222e5b;
  --ink-2: #0a519e;
  --accent: #0a519e;
  --accent-2: #60adf4;
  --paper: #f5f5f3;
  --paper-2: #e2e2e2;
  --white: rgba(255, 255, 255, .88);
  --stroke: rgba(34, 46, 91, .14);
  --stroke-2: rgba(34, 46, 91, .26);
  --muted: #5f6980;
  --success: #fca800;
  --shadow: 0 24px 70px rgba(34, 46, 91, .15);
  --soft-shadow: 0 16px 36px rgba(34, 46, 91, .10);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --maxw: 1760px;
  --focus-ring: 0 0 0 4px rgba(252, 168, 0, .18);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
*::before,
*::after { box-sizing: border-box; }

html {
  min-height: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 88%, rgba(252, 168, 0, .26), transparent 30%),
    radial-gradient(circle at 74% 18%, rgba(34, 46, 91, .10), transparent 34%),
    linear-gradient(135deg, #f7f7f5 0%, #e2e2e2 52%, #faf9f5 100%);
}

body.modal-open { overflow: hidden; }

button,
input,
select { font: inherit; }

button { cursor: pointer; }

button:focus-visible,
select:focus-visible,
.department-path:focus-visible,
.chip:focus-visible,
.tab-btn:focus-visible,
.close-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.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;
}

.app {
  min-height: 100svh;
  padding: clamp(10px, 1.6vw, 24px);
  display: grid;
  place-items: center;
}

.module {
  width: min(var(--maxw), 100%);
  height: calc(100svh - clamp(20px, 3.2vw, 48px));
  min-height: 0;
  border: 1px solid rgba(34, 46, 91, .10);
  border-radius: clamp(18px, 2vw, 34px);
  overflow: hidden;
  background: linear-gradient(140deg, rgba(255, 255, 255, .56), rgba(255, 255, 255, .26));
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  position: relative;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px clamp(18px, 2.2vw, 34px) 0;
  position: relative;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--ink), #0a519e);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 12px 26px rgba(34, 46, 91, .18);
  font-weight: 950;
  letter-spacing: -.08em;
  flex: 0 0 auto;
}

.brand-copy { min-width: 0; }
.brand-copy strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -.02em;
}
.brand-copy small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

.version-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, .58);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 850;
  backdrop-filter: blur(14px);
  white-space: nowrap;
}

.version-pill span {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--success);
  display: inline-block;
}

.version-pill strong { font-weight: 950; }

.screen {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(280px, .82fr) minmax(560px, 1.72fr) minmax(390px, 1.06fr);
  gap: clamp(18px, 1.55vw, 30px);
  padding: clamp(14px, 2vw, 34px);
  align-items: stretch;
  overflow: hidden;
}

.panel {
  border: 1px solid rgba(34, 46, 91, .11);
  background: linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .48));
  border-radius: var(--radius-xl);
  overflow: hidden;
  backdrop-filter: blur(16px);
  box-shadow: var(--soft-shadow);
  min-width: 0;
  min-height: 0;
  transition: box-shadow .28s var(--ease-soft), transform .28s var(--ease-soft), border-color .22s ease;
}

.panel:hover { box-shadow: 0 22px 80px rgba(34, 46, 91, .11); }

.context-panel {
  padding: clamp(22px, 2.2vw, 34px);
  display: flex;
  overflow-y: auto;
  overflow-x: hidden;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
}

.eyebrow {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(252, 168, 0, .12);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: var(--accent);
  flex: 0 0 auto;
}

h1 {
  margin: 15px 0 13px;
  max-width: 11ch;
  font-size: clamp(32px, 3.2vw, 52px);
  line-height: .96;
  letter-spacing: -.055em;
  color: var(--ink);
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.intro {
  margin: 0;
  max-width: 38ch;
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.55;
  color: var(--ink-2);
}

.selector-block { margin-top: clamp(20px, 3vw, 34px); position: relative; z-index: 32; }

.selector-label {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
}

.territory-selectors {
  display: grid;
  gap: 11px;
}
.territory-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.territory-field > span,
.territory-field > label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.territory-select {
  min-height: 46px;
  padding: 11px 40px 11px 14px;
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent) 50%),
    linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 13px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.territory-select:disabled {
  opacity: .62;
  cursor: not-allowed;
}
.territory-selector-meta {
  padding: 2px 3px 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.territory-combobox {
  position: relative;
  min-width: 0;
  z-index: 60;
}
.territory-search-input {
  padding-right: 46px;
  cursor: text;
  background-image: none;
}
.territory-search-input::placeholder { color: rgba(34, 46, 91, .58); }
.territory-search-clear {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(252, 168, 0, .10);
  color: var(--accent-strong, #a81e1e);
  font-size: 18px;
  line-height: 1;
  font-weight: 900;
  cursor: pointer;
}
.territory-search-clear:hover { background: rgba(252, 168, 0, .18); }
.territory-search-clear[hidden] { display: none; }
.territory-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 7px);
  z-index: 90;
  max-height: 286px;
  overflow: auto;
  padding: 7px;
  border: 1px solid rgba(252, 168, 0, .25);
  border-radius: 16px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 42px rgba(34, 46, 91, .18);
  backdrop-filter: blur(12px);
}
.territory-suggestions[hidden] { display: none; }
.territory-suggestion {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px 11px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.territory-suggestion:hover,
.territory-suggestion:focus-visible,
.territory-suggestion.is-active {
  outline: none;
  background: rgba(252, 168, 0, .10);
}
.territory-suggestion-main {
  min-width: 0;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 900;
}
.territory-suggestion-main small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}
.territory-suggestion-count {
  color: var(--accent-strong, #a81e1e);
  font-size: 11px;
  font-weight: 950;
}
.territory-empty {
  padding: 12px 11px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.territory-field--disabled { opacity: .65; }
.territory-hint {
  margin: -1px 2px 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.35;
}

.select-wrap {
  position: relative;
  isolation: isolate;
  z-index: 44;
}

.search {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(252, 168, 0, .28);
  background: rgba(255, 255, 255, .84);
  color: var(--ink);
  border-radius: 19px;
  padding: 14px 52px 14px 17px;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .48), 0 12px 26px rgba(252, 168, 0, .13);
  font-weight: 850;
  appearance: none;
  cursor: pointer;
  line-height: 1.25;
  transition: border-color .22s ease, box-shadow .26s var(--ease-soft), transform .24s var(--ease-soft), background-color .2s ease;
}

.search:hover { border-color: rgba(252, 168, 0, .48); }
.search:focus,
.search.open {
  border-color: rgba(252, 168, 0, .72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .58), 0 18px 34px rgba(252, 168, 0, .18);
}

.custom-select-trigger {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}

.custom-select-trigger.has-selection {
  background: linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(255, 255, 255, .82));
}

.department-select-label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 8px;
}

.select-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  color: var(--accent);
  font-weight: 950;
  pointer-events: none;
  transition: transform .28s var(--ease-soft), color .2s ease;
}

.select-wrap:hover .select-icon { transform: translateY(-48%) rotate(0deg); }
.select-wrap.open .select-icon {
  transform: translateY(-50%) rotate(180deg);
  color: var(--ink);
}

.select-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  z-index: 24;
  border: 1px solid rgba(34, 46, 91, .12);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(250, 249, 246, .96));
  box-shadow: 0 26px 60px rgba(34, 46, 91, .20);
  overflow: hidden;
  opacity: 0;
  transform: translateY(8px) scale(.985);
  transform-origin: top center;
  pointer-events: none;
  transition: opacity .2s ease, transform .28s var(--ease-soft), filter .28s var(--ease-soft);
  filter: blur(5px);
}

.select-wrap.open .select-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  filter: blur(0);
}

.select-panel.closing {
  opacity: 0;
  transform: translateY(6px) scale(.975);
  pointer-events: none;
  filter: blur(7px);
}

.select-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(34, 46, 91, .07);
  background: linear-gradient(180deg, rgba(249, 248, 244, .98), rgba(255, 255, 255, .94));
}

.select-panel-title {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.select-panel-title::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--ink));
  box-shadow: 0 0 0 4px rgba(252, 168, 0, .12);
}

.select-panel-hint {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.select-list {
  max-height: min(360px, 45svh);
  overflow-y: auto;
  padding: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(10, 81, 158, .82) rgba(10, 81, 158, .08);
}

.select-list::-webkit-scrollbar {
  width: 12px;
}

.select-list::-webkit-scrollbar-track {
  background: rgba(10, 81, 158, .07);
  border-radius: 999px;
  margin: 12px 0;
}

.select-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(34, 46, 91, .92), rgba(252, 168, 0, .94));
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, .92);
}

.select-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(10, 81, 158, 1), rgba(252, 168, 0, 1));
}

.select-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  padding: 12px 14px;
  color: var(--ink);
  text-align: left;
  transition: background-color .18s ease, transform .2s var(--ease-soft), box-shadow .22s ease, color .18s ease;
}

.select-option-copy {
  min-width: 0;
}

.select-option-title {
  display: block;
  font-weight: 900;
  line-height: 1.2;
}

.select-option-subtitle {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.select-option-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(34, 46, 91, .07);
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 950;
  transition: background-color .18s ease, color .18s ease, transform .22s var(--ease-soft);
}

.select-option:hover,
.select-option:focus-visible {
  background: rgba(34, 46, 91, .05);
  transform: translateX(2px);
}

.select-option.active {
  background: linear-gradient(135deg, rgba(252, 168, 0, .14), rgba(34, 46, 91, .08));
  box-shadow: inset 0 0 0 1px rgba(252, 168, 0, .18);
}

.select-option.active .select-option-mark {
  background: linear-gradient(135deg, var(--accent), #ffc648);
  color: #fff;
  transform: scale(1.02);
}

.context-actions {
  display: grid;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 13px 16px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 14px 24px rgba(252, 168, 0, .28);
  font-weight: 950;
  text-decoration: none;
  overflow: hidden;
  transform: translateZ(0);
  transition: transform .22s var(--ease-soft), box-shadow .22s var(--ease-soft), background-color .2s ease;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255, 255, 255, .42), transparent 34%);
  opacity: 0;
  transition: opacity .28s ease;
  pointer-events: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(252, 168, 0, .28);
}

.btn:hover::after,
.btn:focus-visible::after { opacity: 1; }
.btn:active { transform: translateY(0) scale(.985); }
.btn.secondary {
  background: rgba(34, 46, 91, .08);
  color: var(--ink);
  box-shadow: none;
  border: 1px solid rgba(34, 46, 91, .08);
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  border: 1px solid rgba(34, 46, 91, .13);
}

.note {
  padding: 14px 15px;
  border-radius: 18px;
  border: 1px solid rgba(34, 46, 91, .10);
  background: rgba(255, 255, 255, .54);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}
.note strong { color: var(--ink); }

.map-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 640px;
  padding: clamp(10px, 1.1vw, 16px);
}

.map-stage {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 900px;
  height: 100%;
  min-height: 0;
  padding: 18px 16px 96px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rings {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(88%, 660px);
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -53%);
  pointer-events: none;
  animation: softPulse 7s ease-in-out infinite;
}

.ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: clamp(18px, 2.3vw, 34px) solid rgba(34, 46, 91, .07);
}

.ring.r2 {
  inset: 13%;
  border-width: clamp(14px, 1.9vw, 28px);
  border-color: rgba(252, 168, 0, .07);
}

@keyframes softPulse {
  0%, 100% { opacity: .92; transform: translate(-50%, -53%) scale(1); }
  50% { opacity: .68; transform: translate(-50%, -53%) scale(1.025); }
}

.map-svg {
  position: relative;
  z-index: 2;
  width: min(100%, 760px);
  max-height: calc(100% - 5px);
  height: auto;
  transform: translate(-40px, -20px);
  transform-origin: center center;
  filter: drop-shadow(0 24px 28px rgba(34, 46, 91, .18));
}

.map-svg-real { overflow: visible; padding: 4px; }

.map-svg-real #features path.department-path {
  fill: #222e5b;
  stroke: rgba(255, 255, 255, .58);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition: fill .18s ease, stroke .18s ease, stroke-width .18s ease, filter .18s ease, opacity .18s ease, transform .18s var(--ease-soft);
  outline: none;
  transform-origin: center center;
  transform-box: fill-box;
}

.map-svg-real #features path.department-path.no-data {
  fill: rgba(34, 46, 91, .30);
  cursor: default;
  opacity: .48;
}

.map-svg-real #features path.department-path:hover,
.map-svg-real #features path.department-path:focus-visible {
  fill: #60adf4;
  stroke: #fff;
  stroke-width: 2;
  filter: drop-shadow(0 8px 12px rgba(34, 46, 91, .24));
}

.map-svg-real #features path.department-path.selected {
  fill: #fca800;
  stroke: #fff;
  stroke-width: 2.6;
  filter: drop-shadow(0 12px 16px rgba(252, 168, 0, .34));
  transform: scale(1.01);
}

#selectionOverlay {
  pointer-events: none;
}
#selectionOverlay .selection-pulse {
  fill: rgba(252, 168, 0, .18);
  stroke: rgba(255, 255, 255, .88);
  stroke-width: 2.4;
  vector-effect: non-scaling-stroke;
  animation: islandPulse 1.9s ease-in-out infinite;
}
#selectionOverlay .selection-dot {
  fill: #fca800;
  stroke: #fff;
  stroke-width: 3.2;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 6px 14px rgba(252, 168, 0, .4));
}
#selectionOverlay .selection-ring {
  fill: none;
  stroke: rgba(255,255,255,.78);
  stroke-width: 1.6;
  stroke-dasharray: 4 4;
  vector-effect: non-scaling-stroke;
  opacity: .9;
}

@keyframes islandPulse {
  0%, 100% { transform: scale(1); opacity: .9; }
  50% { transform: scale(1.24); opacity: .36; }
}

.map-callout {
  position: absolute;
  left: clamp(34px, 4vw, 58px);
  bottom: clamp(26px, 3vw, 42px);
  z-index: 5;
  width: min(430px, calc(100% - 90px));
  border: 1px solid rgba(255, 255, 255, .56);
  background: rgba(255, 255, 255, .80);
  backdrop-filter: blur(16px);
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 22px 60px rgba(34, 46, 91, .12);
  animation: calloutIn .34s var(--ease-soft);
}

.map-callout h2 {
  margin: 0;
  font-size: clamp(21px, 1.8vw, 27px);
  letter-spacing: -.04em;
}

.map-callout p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.42;
  font-size: 13px;
}

@keyframes calloutIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.metrics-panel {
  padding: clamp(18px, 1.8vw, 24px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(10, 81, 158, .42) transparent;
}
.metrics-panel::-webkit-scrollbar { width: 10px; }
.metrics-panel::-webkit-scrollbar-track { background: transparent; }
.metrics-panel::-webkit-scrollbar-thumb {
  background: rgba(10, 81, 158, .35);
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.08);
}

.scope {
  padding: clamp(17px, 1.8vw, 22px);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(34, 46, 91, .96), rgba(10, 81, 158, .92));
  color: #fff;
}
.scope small {
  color: rgba(255, 255, 255, .68);
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 11px;
}
.scope h2 {
  margin: 9px 0 0;
  font-size: clamp(28px, 2.6vw, 40px);
  line-height: 1;
  letter-spacing: -.05em;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.scope.scope--long h2 {
  font-size: clamp(24px, 2.05vw, 33px);
  line-height: .98;
}
.scope.scope--very-long h2 {
  font-size: clamp(21px, 1.7vw, 28px);
  line-height: .96;
}
.scope.scope--very-long p {
  font-size: 12px;
  line-height: 1.34;
}
.scope p {
  margin: 9px 0 0;
  color: rgba(255, 255, 255, .80);
  line-height: 1.42;
  font-size: 13px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, .9vw, 16px);
}

.metric {
  position: relative;
  min-width: 0;
  min-height: 112px;
  border-radius: 23px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(34, 46, 91, .10);
  padding: clamp(16px, 1.15vw, 22px);
  overflow: hidden;
  transition: transform .22s var(--ease-soft), border-color .22s ease, box-shadow .22s ease;
}

.metric.primary {
  grid-column: 1 / -1;
  background: rgba(252, 168, 0, .10);
  border-color: rgba(252, 168, 0, .18);
  padding: clamp(18px, 1.35vw, 26px);
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, .54) 42%, transparent 74%);
  transform: translateX(-130%);
  opacity: 0;
  pointer-events: none;
}

.metric.metric-updated::before { animation: metricSheen .64s ease; }
.metric.metric-updated {
  transform: translateY(-1px);
  border-color: rgba(252, 168, 0, .36);
}

@keyframes metricSheen {
  0% { transform: translateX(-130%); opacity: 0; }
  22% { opacity: 1; }
  100% { transform: translateX(130%); opacity: 0; }
}

.metric .value {
  display: block;
  max-width: 100%;
  color: var(--accent);
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  line-height: .92;
  letter-spacing: clamp(-.07em, -.35vw, -.045em);
  white-space: nowrap;
}
.metric:not(.primary) .value { font-size: clamp(31px, 2.35vw, 48px); }
.metric.primary .value { font-size: clamp(42px, 3vw, 64px); }
.metric .label {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-weight: 950;
  line-height: 1.15;
  font-size: clamp(12px, .95vw, 16px);
}
.metric .sub {
  display: block;
  color: var(--muted);
  margin-top: 6px;
  font-size: 11.5px;
  font-weight: 800;
}

.metrics-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
}
.metrics-actions .btn { flex: 1 1 180px; }

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 2.2vw, 34px);
  background: rgba(34, 46, 91, .58);
  backdrop-filter: blur(12px) saturate(1.04);
}

.drawer-backdrop.open { display: flex; }

.detail-drawer {
  width: min(94vw, 1360px);
  height: min(88svh, 840px);
  max-height: min(88svh, 840px);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: clamp(22px, 2vw, 34px);
  background:
    radial-gradient(circle at 18% 10%, rgba(252, 168, 0, .08), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, .99), rgba(252, 251, 248, .985));
  box-shadow: 0 34px 110px rgba(34, 46, 91, .38);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  transform: translateY(18px) scale(.985);
  opacity: 0;
  transition: transform .34s var(--ease-soft), opacity .28s ease;
}

.drawer-backdrop.open .detail-drawer {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.drawer-head {
  position: relative;
  padding: clamp(24px, 2.3vw, 36px) clamp(24px, 2.6vw, 42px) 18px;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid rgba(34, 46, 91, .08);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.drawer-head h2 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(28px, 2.05vw, 42px);
  line-height: .96;
  letter-spacing: -.055em;
}
.drawer-head p {
  margin: 8px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(13px, .9vw, 15px);
  line-height: 1.4;
}

.close-btn {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(34, 46, 91, .16);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(34, 46, 91, .12);
  font-weight: 950;
  flex: 0 0 auto;
}

.drawer-tabs {
  display: flex;
  gap: 10px;
  padding: 16px clamp(24px, 2.6vw, 42px) 20px;
  border-top: 1px solid rgba(34, 46, 91, .06);
  border-bottom: 1px solid rgba(34, 46, 91, .08);
  background: rgba(255, 255, 255, .97);
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(10, 81, 158, .42) rgba(10, 81, 158, .08);
}

.drawer-tabs::-webkit-scrollbar { height: 8px; }
.drawer-tabs::-webkit-scrollbar-track {
  background: rgba(10, 81, 158, .08);
  border-radius: 999px;
}
.drawer-tabs::-webkit-scrollbar-thumb {
  background: rgba(10, 81, 158, .42);
  border-radius: 999px;
}

.tab-btn,
.chip {
  border: 1px solid rgba(34, 46, 91, .12);
  background: rgba(255, 255, 255, .64);
  color: var(--ink-2);
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 950;
  transition: transform .2s var(--ease-soft), background-color .2s ease, color .2s ease, border-color .2s ease;
}

.chip { font-size: 13px; padding: 10px 12px; }
.tab-btn:hover,
.chip:hover { transform: translateY(-1px); }
.tab-btn.active,
.chip.active {
  background: var(--ink);
  color: #fff;
  border-color: transparent;
}

.drawer-content {
  min-height: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, .91);
}

.tab-panel {
  display: none;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

#tab-projects.active {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

#tab-ranking.active {
  display: block;
}

.project-filter-panel {
  display: grid;
  gap: 10px;
  padding: 12px clamp(24px, 2.6vw, 42px);
  border-bottom: 1px solid rgba(34, 46, 91, .08);
  background: rgba(255, 255, 255, .94);
}

.project-filter-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(190px, 250px);
  gap: 10px;
  align-items: center;
}

.project-search-wrap {
  position: relative;
  min-width: 0;
}

.project-search {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(34, 46, 91, .14);
  border-radius: 15px;
  background: rgba(255, 255, 255, .92);
  color: var(--ink);
  padding: 10px 42px 10px 40px;
  outline: none;
  font-size: 13px;
  font-weight: 760;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.project-search::placeholder {
  color: rgba(95, 105, 128, .82);
  font-weight: 700;
}

.project-search:hover { border-color: rgba(252, 168, 0, .34); }
.project-search:focus {
  border-color: rgba(252, 168, 0, .70);
  box-shadow: var(--focus-ring);
  background: #fff;
}

.project-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-52%);
  color: var(--accent);
  font-size: 19px;
  font-weight: 950;
  pointer-events: none;
}

.project-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  width: 28px;
  height: 28px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  background: rgba(34, 46, 91, .08);
  color: var(--ink);
  font-weight: 950;
  line-height: 1;
}

.project-search-clear:hover { background: rgba(252, 168, 0, .14); }

.project-sort-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.project-sort-wrap > span,
.intervention-filter-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .045em;
  text-transform: uppercase;
  white-space: nowrap;
}

.project-sort-select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(34, 46, 91, .14);
  border-radius: 15px;
  background: rgba(255, 255, 255, .92);
  color: var(--ink);
  padding: 9px 34px 9px 12px;
  outline: none;
  font-size: 12.5px;
  font-weight: 900;
  cursor: pointer;
}

.project-sort-select:hover { border-color: rgba(252, 168, 0, .34); }
.project-sort-select:focus { border-color: rgba(252, 168, 0, .70); box-shadow: var(--focus-ring); }

.intervention-filter-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 7px;
  min-width: 0;
  max-height: none;
  padding: 1px 2px 3px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(10, 81, 158, .38) rgba(10, 81, 158, .07);
}

.filters .chip {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 7px 11px;
  font-size: 11.5px;
}

.project-list,
.rank-list,
.filters {
  scrollbar-width: thin;
  scrollbar-color: rgba(10, 81, 158, .55) rgba(10, 81, 158, .07);
}

.project-list::-webkit-scrollbar,
.rank-list::-webkit-scrollbar,
.filters::-webkit-scrollbar { width: 10px; height: 10px; }
.project-list::-webkit-scrollbar-track,
.rank-list::-webkit-scrollbar-track,
.filters::-webkit-scrollbar-track {
  background: rgba(10, 81, 158, .07);
  border-radius: 999px;
}
.project-list::-webkit-scrollbar-thumb,
.rank-list::-webkit-scrollbar-thumb,
.filters::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(10, 81, 158, .55), rgba(252, 168, 0, .62));
  border: 2px solid rgba(255, 255, 255, .78);
  border-radius: 999px;
}
.project-list::-webkit-scrollbar-thumb:hover,
.rank-list::-webkit-scrollbar-thumb:hover,
.filters::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(10, 81, 158, .78), rgba(252, 168, 0, .84));
}

.project-list {
  min-height: 0;
  overflow-y: auto;
  padding: 22px clamp(24px, 2.6vw, 42px) 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  gap: clamp(18px, 1.35vw, 24px);
  align-content: start;
}

.project-loadmore {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  padding: 0 clamp(24px, 2.6vw, 42px) 18px;
  background: rgba(255, 255, 255, .94);
}

.project-loadmore[hidden] {
  display: none !important;
}

.project-loadmore-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  min-height: 236px;
  padding: 18px;
  border: 1px solid rgba(34, 46, 91, .11);
  border-radius: 24px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 10px 26px rgba(34, 46, 91, .055);
  transition: transform .22s var(--ease-soft), box-shadow .22s ease, border-color .22s ease;
}
.project-card:hover,
.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 38px rgba(34, 46, 91, .10);
  border-color: rgba(252, 168, 0, .28);
}
.project-card-head {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.project-card .tag,
.project-code {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(252, 168, 0, .12);
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
  line-height: 1.1;
}
.project-code {
  background: rgba(34, 46, 91, .07);
  color: var(--ink-2);
}
.project-card h3 {
  margin: 0;
  flex-shrink: 0;
  font-size: clamp(13px, 0.9vw, 15px);
  line-height: 1.28;
  letter-spacing: -.02em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.project-card p {
  margin: 0;
  flex-shrink: 0;
  max-width: 100%;
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.project-facts {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.fact {
  border-top: 1px solid rgba(34, 46, 91, .10);
  padding-top: 8px;
}
.fact b {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fact span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  margin-top: 2px;
}

.data-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 14px clamp(24px, 2.6vw, 42px);
  border-top: 1px solid rgba(34, 46, 91, .08);
  background: rgba(255, 255, 255, .96);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.data-footer b { color: var(--ink); }

.rank-list {
  height: 100%;
  max-height: none;
  overflow-y: auto;
  padding: 22px clamp(24px, 2.6vw, 42px) 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
}

.rank-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(34, 46, 91, .08);
  border-radius: 18px;
  transition: transform .22s var(--ease-soft), box-shadow .22s ease, border-color .22s ease;
}
.rank-num {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: rgba(34, 46, 91, .08);
  display: grid;
  place-items: center;
  font-weight: 950;
}
.rank-item button {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0;
  color: var(--ink);
  font-weight: 950;
}
.rank-item small {
  color: var(--muted);
  display: block;
  margin-top: 2px;
  font-weight: 700;
}
.rank-value {
  color: var(--accent);
  font-weight: 950;
}

.data-toast {
  position: fixed;
  left: 50%;
  bottom: max(28px, env(safe-area-inset-bottom));
  transform: translate(-50%, 16px);
  z-index: 1000;
  border: 1px solid rgba(255, 255, 255, .56);
  background: rgba(34, 46, 91, .92);
  color: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: -.01em;
  box-shadow: 0 18px 46px rgba(34, 46, 91, .24);
  opacity: 0;
  pointer-events: none;
  transition: transform .28s var(--ease-soft), opacity .28s ease;
}
.data-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-height: 820px) and (min-width: 1181px) {
  .topbar { padding-top: 12px; }
  .brand-mark { width: 38px; height: 38px; border-radius: 13px; font-size: 14px; }
  .brand-copy strong { font-size: 13px; }
  .brand-copy small { font-size: 12px; }
  .screen { padding: 14px 22px 18px; gap: 14px; }
  .context-panel { padding: 22px; gap: 14px; }
  .eyebrow { font-size: 10.5px; padding: 6px 10px; }
  h1 { font-size: clamp(30px, 3vw, 44px); margin: 12px 0 10px; line-height: .98; }
  .intro { font-size: 13px; line-height: 1.42; }
  .selector-block { margin-top: 18px; }
  .note { display: none; }
  .map-panel { min-height: 560px; padding: 6px; }
  .map-callout { padding: 12px 14px; border-radius: 18px; }
  .map-callout h2 { font-size: 21px; }
  .map-callout p {
    font-size: 12px;
    line-height: 1.34;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .metrics-panel { padding: 16px; gap: 10px; }
  .scope { padding: 16px; border-radius: 20px; }
  .scope h2 { font-size: 30px; }
  .scope.scope--long h2 { font-size: 25px; }
  .scope.scope--very-long h2 { font-size: 22px; }
  .scope p {
    font-size: 12px;
    line-height: 1.34;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .metric { min-height: 92px; padding: 12px; border-radius: 18px; }
  .metric:not(.primary) .value { font-size: clamp(28px, 2.55vw, 38px); letter-spacing: -.075em; }
  .metric.primary .value { font-size: clamp(38px, 3.2vw, 50px); }
  .metric .label { font-size: 12px; margin-top: 6px; }
  .metric .sub { font-size: 10px; margin-top: 4px; }
  .btn { padding: 11px 15px; font-size: 13px; }
}

@media (min-width: 1600px) {
  .screen {
    grid-template-columns: minmax(300px, .82fr) minmax(650px, 1.82fr) minmax(430px, 1.08fr);
  }
  .metric:not(.primary) .value { font-size: clamp(38px, 2.15vw, 56px); }
  .metric.primary .value { font-size: clamp(48px, 2.9vw, 70px); }
}

@media (max-width: 1320px) and (min-width: 1181px) {
  .screen {
    grid-template-columns: minmax(240px, .78fr) minmax(470px, 1.45fr) minmax(350px, 1.05fr);
    gap: 18px;
  }
  .metric:not(.primary) .value { font-size: clamp(28px, 2.55vw, 38px); letter-spacing: -.075em; }
  .metric.primary .value { font-size: clamp(38px, 3.2vw, 50px); }
}

@media (max-width: 1180px) {
  html,
  body { overflow-y: auto; }
  body.modal-open { overflow: hidden; }
  .app { min-height: 100svh; padding: 0; display: block; }
  .module {
    width: 100%;
    height: auto;
    min-height: 100svh;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    overflow: visible;
  }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 80;
    padding: max(12px, env(safe-area-inset-top)) 14px 8px;
    background: linear-gradient(180deg, rgba(248, 248, 246, .96), rgba(248, 248, 246, .82));
    backdrop-filter: blur(16px);
  }
  .brand-mark { width: 36px; height: 36px; border-radius: 12px; font-size: 13px; }
  .brand-copy strong { max-width: calc(100vw - 146px); font-size: 13px; }
  .brand-copy small { display: none; }
  .version-pill { display: none; }
  .screen {
    width: 100%;
    height: auto;
    min-height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "context" "map" "metrics";
    align-items: stretch;
    gap: 10px;
    padding: 8px 12px 18px;
    overflow: visible;
  }
  .context-panel { grid-area: context; padding: 14px; gap: 11px; display: grid; }
  .eyebrow { font-size: 10px; padding: 6px 9px; white-space: nowrap; }
  h1 { max-width: 100%; margin: 8px 0 6px; font-size: clamp(28px, 8.4vw, 40px); line-height: .96; }
  .intro {
    max-width: 100%;
    font-size: 12.2px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .selector-block { margin-top: 10px; }
  .selector-label { display: none; }
  .select-panel {
    top: calc(100% + 8px);
    border-radius: 22px;
  }
  .select-panel-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
  .select-list {
    max-height: min(46svh, 340px);
  }
  .context-actions { display: none; }
  .note { display: none; }
  .map-panel {
    grid-area: map;
    height: clamp(340px, 49svh, 470px);
    min-height: clamp(340px, 49svh, 470px);
    padding: 6px;
    overflow: hidden;
  }
  .map-stage {
    width: 100%;
    height: 100%;
    padding: 8px 8px 104px;
  }
  .rings {
    width: min(86vw, 360px);
    transform: translate(-50%, -54%);
    animation-name: softPulseMobile;
  }
  @keyframes softPulseMobile {
    0%, 100% { opacity: .92; transform: translate(-50%, -54%) scale(1); }
    50% { opacity: .70; transform: translate(-50%, -54%) scale(1.018); }
  }
  .ring { border-width: clamp(18px, 5.6vw, 28px); }
  .ring.r2 { border-width: clamp(14px, 4.4vw, 22px); }
  .map-svg {
    width: min(84vw, 320px);
    max-width: 100%;
    max-height: 100%;
    transform: translate(10px, -18px);
  }
  .map-callout {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    padding: 10px 14px;
    border-radius: 18px;
  }
  .map-callout h2 { font-size: 22px; line-height: 1.02; }
  .map-callout p {
    font-size: 12px;
    line-height: 1.3;
    margin-top: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .metrics-panel {
    grid-area: metrics;
    padding: 12px;
    gap: 10px;
    display: grid;
    grid-template-columns: 1fr;
  }
  .metrics-panel .scope { display: none; }
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .metric,
  .metric.primary {
    grid-column: auto;
    min-height: 82px;
    padding: 12px 10px;
    border-radius: 17px;
  }
  .metric.extra { display: none; }
  .metric .value,
  .metric:not(.primary) .value,
  .metric.primary .value {
    font-size: clamp(20px, 5.8vw, 28px);
    line-height: .95;
    letter-spacing: -.06em;
    white-space: nowrap;
    overflow: hidden;
  }
  .metric .label { margin-top: 6px; font-size: 10.8px; line-height: 1.08; }
  .metric .sub { display: none; }
  .metrics-actions { display: block; margin-top: 0; }
  .metrics-actions .btn { width: 100%; min-height: 52px; font-size: 15px; }
  .drawer-backdrop { padding: 8px; align-items: flex-end; }
  .detail-drawer {
    width: min(100%, 100vw - 16px);
    height: min(92svh, 820px);
    max-height: 92svh;
    border-radius: 24px 24px 18px 18px;
  }
  .drawer-head { padding: 18px 16px 12px; }
  .drawer-head h2 { font-size: 24px; }
  .drawer-head p { font-size: 12px; }
  .drawer-tabs { padding: 14px 16px 16px; }
  .project-filter-panel,
  .project-list,
  .rank-list,
  .data-footer { padding-left: 16px; padding-right: 16px; }
  .project-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .rank-list { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .topbar { padding-left: 12px; padding-right: 12px; }
  .screen { padding: 8px 10px 16px; }
  .panel { border-radius: 22px; }
  .map-panel {
    height: clamp(300px, 43svh, 400px);
    min-height: clamp(300px, 43svh, 400px);
  }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric.primary { grid-column: 1 / -1; }
  .metric .value,
  .metric:not(.primary) .value,
  .metric.primary .value { font-size: clamp(22px, 7vw, 30px); }
  .project-filter-panel { padding-top: 10px; padding-bottom: 10px; gap: 8px; }
  .project-filter-toolbar { grid-template-columns: 1fr; gap: 8px; }
  .project-sort-wrap { grid-template-columns: 54px minmax(0, 1fr); }
  .intervention-filter-row { grid-template-columns: 1fr; gap: 5px; }
  .intervention-filter-label { display: none; }
  .filters { width: 100%; padding-bottom: 2px; }
  .project-list { grid-template-columns: 1fr; gap: 16px; padding-top: 18px; }
  .project-loadmore { padding: 0 16px 16px; }
  .project-card { min-height: 220px; padding: 16px; }
  .rank-item { grid-template-columns: 34px minmax(0, 1fr); }
  .rank-value { grid-column: 2; }
  .data-toast { display: none; }
}

@media (max-width: 420px) {
  .intro { display: none; }
  h1 { font-size: clamp(26px, 8vw, 34px); }
  .map-panel {
    height: clamp(286px, 40svh, 380px);
    min-height: clamp(286px, 40svh, 380px);
  }
  .project-card-head { gap: 7px; }
  .project-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-height: 720px) and (max-width: 1180px) {
  .intro { display: none; }
  .map-panel {
    height: clamp(270px, 42svh, 360px);
    min-height: clamp(270px, 42svh, 360px);
  }
  .metric,
  .metric.primary { min-height: 74px; }
}

@media (hover: none) and (pointer: coarse) {
  .panel:hover,
  .project-card:hover,
  .rank-item:hover,
  .btn:hover,
  .chip:hover,
  .tab-btn:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms;
    animation-iteration-count: 1;
    scroll-behavior: auto;
    transition-duration: .001ms;
  }
}

  
/* V4 — escala tipográfica y combobox territoriales */
h1 { font-size: clamp(29px, 2.75vw, 45px); }
.map-callout h2 { font-size: clamp(18px, 1.55vw, 23px); }
.scope h2 { font-size: clamp(24px, 1.75vw, 34px); }
.scope.scope--long h2 { font-size: clamp(21px, 1.55vw, 29px); }
.scope.scope--very-long h2 { font-size: clamp(19px, 1.4vw, 26px); }
.detail-header h2, .detail-title, .modal-title { font-size: clamp(18px, 1.5vw, 24px); }
.project-card h3 { font-size: 16.5px; line-height: 1.23; }
#metricInvestment { font-size: clamp(25px, 1.8vw, 35px) !important; letter-spacing: -.065em; }

.territory-field { position: relative; }
.territory-field:focus-within { z-index: 180; }
.territory-combobox:focus-within { z-index: 190; }
.territory-search-input { padding-right: 48px; }
.territory-combobox::after {
  content: "⌄";
  position: absolute;
  right: 17px;
  top: 50%;
  transform: translateY(-53%);
  color: var(--accent);
  font-size: 17px;
  font-weight: 950;
  pointer-events: none;
  transition: transform .2s ease;
}
.territory-combobox:focus-within::after { transform: translateY(-45%) rotate(180deg); }

.territory-suggestions {
  position: relative;
  inset: auto;
  margin-top: 7px;
  max-height: min(248px, 32svh);
  overflow-y: scroll;
  padding: 7px 5px 7px 7px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(46,10,79,.72) rgba(46,10,79,.08);
  box-shadow: 0 14px 30px rgba(34, 46, 91, .14);
}
.territory-suggestions--department { max-height: min(248px, 32svh); }
.territory-suggestions--municipality { max-height: min(248px, 32svh); }
.territory-suggestions::-webkit-scrollbar { width: 11px; }
.territory-suggestions::-webkit-scrollbar-track {
  margin: 8px 0;
  border-radius: 999px;
  background: rgba(46,10,79,.065);
}
.territory-suggestions::-webkit-scrollbar-thumb {
  min-height: 42px;
  border: 3px solid rgba(255,255,255,.96);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(46,10,79,.90), rgba(218,90,112,.94));
}
.territory-suggestions::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(46,10,79,1), rgba(218,90,112,1));
}
.territory-suggestion { min-height: 48px; padding: 9px 10px; border-radius: 10px; }
.territory-suggestion.is-selected {
  background: linear-gradient(135deg, rgba(218,90,112,.15), rgba(46,10,79,.075));
  box-shadow: inset 0 0 0 1px rgba(218,90,112,.22);
}
.territory-suggestion-main { font-size: 12.5px; }
.territory-suggestion-count { min-width: 34px; text-align: right; }

@media (max-width: 1180px) {
  h1 { font-size: clamp(27px, 3vw, 39px); }
  .scope h2 { font-size: 27px; }
  .scope.scope--long h2 { font-size: 23px; }
  .scope.scope--very-long h2 { font-size: 21px; }
}
@media (max-width: 760px) {
  h1 { font-size: clamp(25px, 7.4vw, 35px); }
  .map-callout h2 { font-size: 18px; }
  .scope h2 { font-size: 25px; }
  .project-card h3 { font-size: 15.5px; }
  .territory-suggestions { max-height: min(220px, 30svh); }
}


/* V5 — panel izquierdo sin scrollbar; listas territoriales flotantes */
@media (min-width: 1181px) {
  .context-panel {
    position: relative;
    z-index: 70;
    overflow: visible !important;
    justify-content: flex-start;
    gap: 12px;
    padding: clamp(18px, 1.55vw, 26px);
  }
  .context-panel > div:first-child { min-height: 0; }
  .context-panel .selector-block {
    margin-top: 15px;
    z-index: 90;
  }
  .context-panel .selector-label { margin-bottom: 7px; font-size: 12px; }
  .context-panel .territory-selectors { gap: 8px; }
  .context-panel .territory-field { gap: 4px; }
  .context-panel .territory-field > span,
  .context-panel .territory-field > label > span { font-size: 10px; }
  .context-panel .search,
  .context-panel .territory-select { min-height: 42px; padding-top: 10px; padding-bottom: 10px; border-radius: 16px; }
  .context-panel .territory-hint { display: none; }
  .context-panel .territory-selector-meta { padding-top: 0; font-size: 10px; line-height: 1.25; }

  .context-panel .territory-combobox { position: relative; z-index: 95; }
  .context-panel .territory-suggestions {
    position: absolute !important;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    margin-top: 0 !important;
    max-height: min(232px, 30vh) !important;
    overflow-y: auto;
    z-index: 240;
    box-shadow: 0 20px 44px rgba(34, 46, 91, .20);
  }
  .context-panel .territory-field:focus-within { z-index: 220; }
  .context-panel .territory-field:focus-within .territory-combobox { z-index: 230; }

  .context-actions {
    margin-top: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
  }
  .context-actions .btn { min-height: 40px; padding: 10px 12px; font-size: 12px; }
  .context-actions .note {
    grid-column: 1 / -1;
    padding: 9px 11px;
    border-radius: 14px;
    font-size: 10.5px;
    line-height: 1.28;
  }
}

@media (max-height: 900px) and (min-width: 1181px) {
  .context-panel { padding: 18px; gap: 9px; }
  .context-panel h1 { margin: 10px 0 8px; }
  .context-panel .intro {
    font-size: 12.5px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .context-panel .selector-block { margin-top: 11px; }
  .context-panel .territory-selectors { gap: 7px; }
  .context-actions .note { display: none; }
}


/* ===== Variante cromática ampliada — SOLO COLOR =====
   Paleta: #222e5b #0a519e #60adf4 #fca800 #ffc648 #ffdc8f #710e0f #a81e1e #e2e2e2
   Esta capa no modifica estructura, dimensiones, tipografía ni interacción. */
body {
  background:
    radial-gradient(circle at 8% 88%, rgba(96, 173, 244, .22), transparent 30%),
    radial-gradient(circle at 74% 18%, rgba(252, 168, 0, .16), transparent 34%),
    linear-gradient(135deg, #f7f7f5 0%, #e2e2e2 52%, #faf9f5 100%);
}
.module {
  border-color: rgba(34, 46, 91, .12);
  background: linear-gradient(140deg, rgba(255, 255, 255, .68), rgba(255, 220, 143, .12));
  box-shadow: 0 24px 70px rgba(34, 46, 91, .14);
}
.brand-mark {
  background: linear-gradient(135deg, #222e5b, #0a519e);
  box-shadow: 0 12px 26px rgba(10, 81, 158, .18);
}
.version-pill {
  border-color: rgba(10, 81, 158, .16);
  background: rgba(255, 255, 255, .72);
  color: #222e5b;
}
.version-pill span { background: #fca800; }
.panel {
  border-color: rgba(34, 46, 91, .12);
  background: linear-gradient(145deg, rgba(255, 255, 255, .88), rgba(226, 226, 226, .42));
  box-shadow: 0 16px 36px rgba(34, 46, 91, .09);
}
.panel:hover { box-shadow: 0 22px 80px rgba(10, 81, 158, .10); }
.eyebrow {
  background: rgba(255, 198, 72, .20);
  color: #710e0f;
}
.eyebrow::before { background: #a81e1e; }
.territory-field > span,
.territory-field > label > span,
.territory-selector-meta,
.territory-hint { color: #5f6980; }
.search {
  border-color: rgba(10, 81, 158, .22);
  background: rgba(255, 255, 255, .90);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.48), 0 12px 26px rgba(96, 173, 244, .10);
}
.search:hover { border-color: rgba(10, 81, 158, .42); }
.search:focus,
.search.open {
  border-color: rgba(252, 168, 0, .72);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.58), 0 18px 34px rgba(252,168,0,.14);
}
.territory-search-clear {
  background: rgba(168, 30, 30, .09);
  color: #a81e1e;
}
.territory-search-clear:hover { background: rgba(168, 30, 30, .16); }
.territory-suggestions {
  border-color: rgba(10, 81, 158, .20);
  background: rgba(255,255,255,.98);
  box-shadow: 0 18px 42px rgba(34,46,91,.15);
}
.territory-suggestion:hover,
.territory-suggestion:focus-visible,
.territory-suggestion.is-active { background: rgba(96, 173, 244, .12); }
.territory-suggestion.is-selected {
  background: linear-gradient(135deg, rgba(255, 198, 72, .22), rgba(255, 220, 143, .16));
  box-shadow: inset 0 0 0 1px rgba(252,168,0,.26);
}
.territory-suggestion-count { color: #a81e1e; }
.select-icon { color: #fca800; }
.select-wrap.open .select-icon { color: #0a519e; }
.select-panel {
  border-color: rgba(34,46,91,.12);
  background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(255,220,143,.10));
  box-shadow: 0 26px 60px rgba(34,46,91,.18);
}
.select-panel-head {
  border-bottom-color: rgba(34,46,91,.08);
  background: linear-gradient(180deg, rgba(226,226,226,.52), rgba(255,255,255,.96));
}
.select-panel-title::before {
  background: linear-gradient(135deg, #fca800, #a81e1e);
  box-shadow: 0 0 0 4px rgba(255,198,72,.16);
}
.select-list { scrollbar-color: rgba(10,81,158,.82) rgba(96,173,244,.10); }
.select-list::-webkit-scrollbar-track { background: rgba(96,173,244,.10); }
.select-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #222e5b, #0a519e);
  border-color: rgba(255,255,255,.92);
}
.select-list::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #0a519e, #60adf4); }
.select-option-mark {
  background: rgba(96,173,244,.12);
  color: #0a519e;
}
.select-option:hover,
.select-option:focus-visible { background: rgba(96,173,244,.10); }
.select-option.active {
  background: linear-gradient(135deg, rgba(255,198,72,.22), rgba(255,220,143,.18));
  box-shadow: inset 0 0 0 1px rgba(252,168,0,.22);
}
.select-option.active .select-option-mark {
  background: linear-gradient(135deg, #fca800, #ffc648);
  color: #222e5b;
}
.btn {
  background: #0a519e;
  color: #fff;
  box-shadow: 0 14px 24px rgba(10,81,158,.24);
}
.btn:hover { box-shadow: 0 18px 38px rgba(10,81,158,.26); }
.btn.secondary {
  background: rgba(255,198,72,.22);
  color: #710e0f;
  border-color: rgba(252,168,0,.18);
}
.btn.ghost {
  color: #0a519e;
  border-color: rgba(10,81,158,.18);
}
.note {
  border-color: rgba(10,81,158,.10);
  background: rgba(96,173,244,.07);
  color: #5f6980;
}
.map-panel {
  background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(96,173,244,.06));
}
.ring { border-color: rgba(34,46,91,.06); }
.ring.r2 { border-color: rgba(255,198,72,.12); }
.map-svg { filter: drop-shadow(0 24px 28px rgba(10,81,158,.15)); }
.map-svg-real #features path.department-path {
  fill: #0a519e;
  stroke: rgba(255,255,255,.72);
}
.map-svg-real #features path.department-path.no-data { fill: rgba(34,46,91,.28); }
.map-svg-real #features path.department-path:hover,
.map-svg-real #features path.department-path:focus-visible {
  fill: #60adf4;
  filter: drop-shadow(0 8px 12px rgba(10,81,158,.22));
}
.map-svg-real #features path.department-path.selected {
  fill: #fca800;
  filter: drop-shadow(0 12px 16px rgba(252,168,0,.30));
}
#selectionOverlay .selection-pulse {
  fill: rgba(255,198,72,.20);
  stroke: rgba(255,255,255,.90);
}
#selectionOverlay .selection-dot {
  fill: #a81e1e;
  stroke: #fff;
  filter: drop-shadow(0 6px 14px rgba(168,30,30,.30));
}
#selectionOverlay .selection-ring { stroke: rgba(34,46,91,.48); }
.map-callout {
  border-color: rgba(255,255,255,.62);
  background: rgba(255,255,255,.86);
  box-shadow: 0 22px 60px rgba(34,46,91,.10);
}
.metrics-panel { scrollbar-color: rgba(10,81,158,.42) transparent; }
.metrics-panel::-webkit-scrollbar-thumb { background: rgba(10,81,158,.34); }
.scope {
  background: linear-gradient(145deg, #222e5b, #0a519e);
  color: #fff;
}
.scope small { color: #ffdc8f; }
.scope p { color: rgba(255,255,255,.84); }
.metric {
  background: rgba(255,255,255,.82);
  border-color: rgba(34,46,91,.09);
}
.metric.primary {
  background: linear-gradient(135deg, rgba(255,198,72,.22), rgba(255,220,143,.18));
  border-color: rgba(252,168,0,.25);
}
.metric.primary .value { color: #710e0f; }
.metric-grid .metric:nth-child(2) {
  background: rgba(96,173,244,.10);
  border-color: rgba(10,81,158,.14);
}
.metric-grid .metric:nth-child(2) .value { color: #0a519e; }
.metric-grid .metric:nth-child(3) {
  background: rgba(255,220,143,.18);
  border-color: rgba(252,168,0,.16);
}
.metric-grid .metric:nth-child(3) .value { color: #a81e1e; }
.metric-grid .metric:nth-child(4) {
  background: rgba(226,226,226,.54);
  border-color: rgba(34,46,91,.10);
}
.metric-grid .metric:nth-child(4) .value { color: #222e5b; }
.metric-grid .metric:nth-child(5) {
  background: rgba(96,173,244,.07);
  border-color: rgba(10,81,158,.12);
}
.metric-grid .metric:nth-child(5) .value { color: #0a519e; }
.metric .label { color: #222e5b; }
.metric .sub { color: #5f6980; }
.metric.metric-updated { border-color: rgba(252,168,0,.38); }
.drawer-backdrop { background: rgba(34,46,91,.62); }
.detail-drawer {
  border-color: rgba(255,255,255,.74);
  background: radial-gradient(circle at 18% 10%, rgba(96,173,244,.09), transparent 34%), linear-gradient(135deg, rgba(255,255,255,.99), rgba(255,220,143,.08));
  box-shadow: 0 34px 110px rgba(34,46,91,.34);
}
.drawer-head,
.drawer-tabs,
.data-footer { border-color: rgba(34,46,91,.08); }
.close-btn {
  border-color: rgba(168,30,30,.18);
  color: #710e0f;
  box-shadow: 0 12px 28px rgba(34,46,91,.10);
}
.drawer-tabs { scrollbar-color: rgba(10,81,158,.42) rgba(96,173,244,.08); }
.drawer-tabs::-webkit-scrollbar-track { background: rgba(96,173,244,.08); }
.drawer-tabs::-webkit-scrollbar-thumb { background: rgba(10,81,158,.42); }
.tab-btn,
.chip {
  border-color: rgba(10,81,158,.14);
  background: rgba(96,173,244,.07);
  color: #0a519e;
}
.tab-btn.active,
.chip.active {
  background: #222e5b;
  color: #fff;
}
.project-filter-panel { border-bottom-color: rgba(34,46,91,.08); }
.project-search,
.project-sort-select {
  border-color: rgba(10,81,158,.14);
  background: rgba(255,255,255,.94);
}
.project-search:hover,
.project-sort-select:hover { border-color: rgba(10,81,158,.34); }
.project-search:focus,
.project-sort-select:focus { border-color: rgba(252,168,0,.68); }
.project-search-icon { color: #0a519e; }
.project-card {
  border-color: rgba(34,46,91,.10);
  background: rgba(255,255,255,.98);
  box-shadow: 0 10px 26px rgba(34,46,91,.05);
}
.project-card:hover,
.rank-item:hover {
  box-shadow: 0 16px 38px rgba(10,81,158,.09);
  border-color: rgba(252,168,0,.28);
}
.project-card .tag {
  background: rgba(168,30,30,.09);
  color: #a81e1e;
}
.project-code {
  background: rgba(10,81,158,.08);
  color: #0a519e;
}
.fact { border-top-color: rgba(34,46,91,.10); }
.rank-item {
  background: rgba(255,255,255,.97);
  border-color: rgba(34,46,91,.08);
}
.rank-num {
  background: rgba(255,198,72,.18);
  color: #710e0f;
}
.rank-value { color: #a81e1e; }
.project-list,
.rank-list,
.filters { scrollbar-color: rgba(10,81,158,.54) rgba(96,173,244,.07); }
.project-list::-webkit-scrollbar-track,
.rank-list::-webkit-scrollbar-track,
.filters::-webkit-scrollbar-track { background: rgba(96,173,244,.07); }
.project-list::-webkit-scrollbar-thumb,
.rank-list::-webkit-scrollbar-thumb,
.filters::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(34,46,91,.64), rgba(10,81,158,.62));
  border-color: rgba(255,255,255,.80);
}
.project-list::-webkit-scrollbar-thumb:hover,
.rank-list::-webkit-scrollbar-thumb:hover,
.filters::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #222e5b, #0a519e); }
.data-toast {
  background: rgba(113,14,15,.94);
  border-color: rgba(255,220,143,.40);
  color: #fff;
  box-shadow: 0 18px 46px rgba(113,14,15,.22);
}

/* ===== v22 — Modo embebido (iframe en WordPress) y ajustes de detalle =====
   Se activa con la clase .is-embed que agrega js/embed.js. Fuera de un iframe no cambia nada. */
.is-embed body { background: transparent; }
.is-embed .topbar { display: none; }
.is-embed .module { grid-template-rows: minmax(0, 1fr); }
.is-embed .drawer-backdrop { align-items: flex-start; }
.is-embed .detail-drawer {
  height: min(calc(var(--host-vh, 100svh) * .92), 840px);
  max-height: min(calc(var(--host-vh, 100svh) * .92), 840px);
}

/* Diseño apilado: la altura la decide el contenido, no el alto del iframe
   (evita el ciclo iframe más alto → mapa más alto → iframe más alto). */
@media (max-width: 1180px) {
  .is-embed .app,
  .is-embed .module { min-height: 0; }
  .is-embed .map-panel { height: 440px; min-height: 440px; }
}
@media (max-width: 760px) {
  .is-embed .map-panel { height: 380px; min-height: 380px; }
}
@media (max-width: 420px) {
  .is-embed .map-panel { height: 330px; min-height: 330px; }
}

/* Tarjetas de proyecto: las filas toman la altura real del contenido. Antes Chromium comprimía la fila
   a la altura mínima (236 px) y, con ubicaciones largas, los datos se salían del borde de la tarjeta. */
.project-list { grid-auto-rows: max-content; }

/* Filtro por gobierno en el detalle */
.project-card .tag.tag-government {
  background: rgba(10, 81, 158, .08);
  color: #0a519e;
}
.data-footer .data-cut { white-space: nowrap; }
@media (max-width: 760px) {
  /* Más espacio para la lista de proyectos en celular */
  #detailDescription { display: none; }
}

/* ===== v22 — Botón × de Departamento / Municipio =====
   Reglas únicas para ambos campos. La visibilidad la decide solo el atributo hidden
   (lo pone updateClearButton en app.js); tamaño, posición y hover no dependen del foco. */
/* Los campos ahora son type="text" (sin × nativa). Esto queda como respaldo por si algún
   navegador o una versión anterior del HTML los deja como type="search". */
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration,
.territory-search-input::-webkit-search-cancel-button,
.territory-search-input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;          /* la × nativa del input type=search aparecía solo con foco y se cruzaba con la propia */
}
input::-ms-clear { display: none; }
.territory-combobox .territory-search-clear {
  position: absolute;
  right: 36px;
  top: 50%;
  transform: translateY(-50%);
  width: 27px;
  height: 27px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(168, 30, 30, .09);
  color: #a81e1e;
  font-size: 16px;
  line-height: 1;
  z-index: 3;
  transition: background-color .15s ease, color .15s ease;
}
.territory-combobox .territory-search-clear[hidden] { display: none !important; }
.territory-combobox .territory-search-clear:hover,
.territory-combobox .territory-search-clear:focus-visible {
  background: rgba(168, 30, 30, .18);
  color: #710e0f;
}
/* Pasar el cursor por la × no apaga el resaltado del campo */
.territory-combobox:hover .territory-search-input { border-color: rgba(10, 81, 158, .42); }
.territory-combobox:hover .territory-search-input:focus,
.territory-combobox .territory-search-input:focus { border-color: rgba(252, 168, 0, .72); }
/* El texto no queda debajo de la × */
.territory-combobox.has-value .territory-search-input { padding-right: 70px; }

/* v22.7 — En escritorio "Ver proyectos" ya está en el panel izquierdo: se oculta el del panel derecho.
   En pantallas de 1180 px o menos el botón izquierdo se oculta, así que allí el derecho se mantiene. */
@media (min-width: 1181px) {
  .metrics-actions { display: none; }
  /* Sin el botón, las tarjetas ocupan todo el alto del panel en proporción:
     Proyectos un poco más alta y las cuatro restantes iguales. */
  .metrics-panel .metric-grid {
    flex: 1 1 auto;
    min-height: 0;
    grid-template-rows: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
  }
  .metrics-panel .metric {
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

/* v22.9 — Signo de peso en la tarjeta de Inversión: mismo tamaño y línea base que la cifra.
   La cifra se reduce un poco para que "$4.407.692" quepa completa. */
#metricInvestment .currency {
  font-size: 1em;
  vertical-align: baseline;
  margin-right: .02em;
}
#metricInvestment { font-size: clamp(24px, 1.75vw, 30px) !important; }
