/* ==========================================================
   MAPA ESTRATÉGICO DE LA HISPANIDAD — componente
   Todas las clases empiezan por mh- para no chocar con la web.
   Colores del mapa del PDF; el panel usa la paleta de la web.
   ========================================================== */
.mh{
  --mh-mar:#0A0A0A; --mh-tierra:#252525; --mh-borde:#0A0A0A;
  --mh-nucleo:#F3C301; --mh-hermandad:#C88A13; --mh-diaspora:#5A1723; --mh-puentes:#E8743B;
  --mh-eje:#D8323F; --mh-a:#E3C98A; --mh-b:#7FC8E8; --mh-ext:#8FA3B3;
  --mh-cabecera:79px;
  position:relative;
  height:calc(100svh - var(--mh-cabecera));
  min-height:520px; max-height:1100px;
  background:var(--mh-mar);
  color:var(--hueso);
  overflow:hidden;
  font-family:var(--texto);
  isolation:isolate;
  -webkit-tap-highlight-color:transparent;
}
.mh--pantalla{ height:100vh; max-height:none; }
.mh noscript img, .mh-sin-js{ display:block; width:100%; height:auto; }
.mh--error::after{ content:"No se ha podido cargar el mapa."; position:absolute; inset:auto 0 50% 0; text-align:center; color:var(--oro-claro); }

.mh-lienzo{ position:absolute; inset:0; }
.mh-svg{ display:block; width:100%; height:100%; touch-action:pan-y; cursor:grab; user-select:none; -webkit-user-select:none; }
.mh--moviendo .mh-svg{ cursor:grabbing; }
.mh-mar{ fill:var(--mh-mar); }

/* ---------- Países ---------- */
.mh-malla{ fill:none; stroke:rgba(255,255,255,.055); stroke-width:.5; vector-effect:non-scaling-stroke; pointer-events:none; }
.mh-relleno{ fill:var(--mh-tierra); stroke:none; pointer-events:none; }
.mh-pais{
  fill:var(--mh-tierra); stroke:var(--mh-borde); stroke-width:.6; stroke-linejoin:round;
  vector-effect:non-scaling-stroke; cursor:pointer;
  transition:fill .2s, opacity .25s, filter .2s;
}
.mh-c-nucleo{ fill:var(--mh-nucleo); }
.mh-c-hermandad{ fill:var(--mh-hermandad); }
.mh-c-diaspora{ fill:var(--mh-diaspora); }
.mh-c-puentes{ fill:var(--mh-puentes); }
.mh-c-otro.mh-hover{ fill:#3a3a3a; }
.mh-pais.mh-hover{ filter:brightness(1.22); stroke:rgba(246,244,239,.75); stroke-width:1; }
.mh-pais:focus{ outline:none; }
.mh-pais:focus-visible{ stroke:var(--hueso); stroke-width:1.8; }
.mh-pais.mh-sel{ stroke:var(--hueso); stroke-width:2; filter:brightness(1.25) drop-shadow(0 0 7px rgba(243,195,1,.55)); }
.mh-c-otro.mh-sel{ fill:#4a4a4a; }
.mh-pais.mh-comp{ stroke:var(--mh-b); stroke-width:2; filter:brightness(1.15) drop-shadow(0 0 7px rgba(127,200,232,.6)); }
.mh-c-otro.mh-comp{ fill:#3c4a52; }
.mh-pais.mh-con{ stroke:var(--mh-a); stroke-width:1.2; }

/* En los modos con foco, se apaga lo que no participa */
.mh--foco .mh-pais{ opacity:.28; }
.mh--foco .mh-pais.mh-sel, .mh--foco .mh-pais.mh-comp, .mh--foco .mh-pais.mh-con, .mh--foco .mh-pais.mh-hover{ opacity:1; }
.mh--comparacion:not(.mh--comparando) .mh-pais{ opacity:.75; }
.mh--comparacion:not(.mh--comparando) .mh-pais.mh-hover{ opacity:1; filter:brightness(1.3); stroke:var(--mh-b); stroke-width:1.6; }
.mh--comparacion .mh-svg{ cursor:crosshair; }

.mh-toque{ fill:transparent; cursor:pointer; }
.mh-toque:hover{ fill:rgba(243,195,1,.18); stroke:rgba(243,195,1,.7); stroke-width:1; }

/* ---------- Ejes y rótulos ---------- */
.mh-eje{ fill:none; stroke:var(--mh-eje); stroke-width:2.2; stroke-linecap:round; vector-effect:non-scaling-stroke; pointer-events:none; transition:opacity .3s; }
.mh-eje--pacifico{ stroke-dasharray:9 7; }
/* Las líneas de los ejes no se ven en el mapa general: solo en el
   modo estratégico, y solo las de los ejes del país elegido */
.mh-eje{ display:none; }
.mh--estrategico .mh-eje--activo{ display:inline; opacity:1; stroke-width:3.2; }

.mh-rot{ pointer-events:none; font-family:var(--texto); font-weight:600; letter-spacing:.12em; text-anchor:middle; paint-order:stroke; stroke:rgba(10,10,10,.6); stroke-width:3px; }
.mh-rot--mar{ fill:rgba(255,255,255,.26); font-size:17px; letter-spacing:.3em; stroke:none; }
.mh-rot--ruta{ fill:rgba(216,50,63,.9); font-size:11px; }
.mh-rot--sitio{ fill:var(--oro-claro); font-size:11px; }
.mh--foco .mh-rotulos{ opacity:.35; }

/* ---------- Llaves ---------- */
.mh-llave{ cursor:pointer; outline:none; }
.mh-llave__disco{ fill:var(--grana); stroke:var(--hueso); stroke-width:2; transition:fill .2s; }
.mh-llave__n{ fill:#fff; font-family:var(--texto); font-size:11px; font-weight:700; pointer-events:none; }
.mh-llave__halo{ fill:none; stroke:var(--oro); stroke-width:2; opacity:0; }
.mh-llave:hover .mh-llave__disco, .mh-llave:focus-visible .mh-llave__disco, .mh-llave--senalada .mh-llave__disco{ fill:var(--oro); }
.mh-llave:hover .mh-llave__n, .mh-llave--senalada .mh-llave__n{ fill:var(--tinta); }
.mh-llave--activa .mh-llave__disco, .mh-llave--propia .mh-llave__disco{ fill:var(--oro); }
.mh-llave--activa .mh-llave__n, .mh-llave--propia .mh-llave__n{ fill:var(--tinta); }
.mh-llave--activa .mh-llave__halo, .mh-llave--propia .mh-llave__halo{ opacity:1; animation:mh-latir 1.8s ease-out infinite; transform-box:fill-box; transform-origin:center; }
.mh-llave--ajena{ opacity:.3; }
.mh--foco:not(.mh--estrategico) .mh-llaves{ opacity:.45; }
@keyframes mh-latir{ from{ transform:scale(1); opacity:.9; } to{ transform:scale(1.9); opacity:0; } }

/* ---------- Conexiones ---------- */
.mh-conex__linea{
  fill:none; stroke-linecap:round; vector-effect:non-scaling-stroke;
  stroke-dasharray:1; stroke-dashoffset:1; animation:mh-trazar .8s cubic-bezier(.3,.7,.3,1) forwards;
  opacity:calc(.42 + var(--mh-i) * .55); pointer-events:none; transition:opacity .2s, stroke .2s;
}
.mh-conex--h .mh-conex__linea{ stroke:var(--mh-a); }
.mh-conex--e .mh-conex__linea{ stroke:var(--mh-ext); }
.mh-conex--b .mh-conex__linea{ stroke:var(--mh-b); }
.mh-conex--directa .mh-conex__linea{ stroke:#fff; }
.mh-conex--prioritaria .mh-conex__linea{ stroke:var(--oro); }
.mh-conex__punto{ fill:var(--mh-a); vector-effect:non-scaling-stroke; pointer-events:none; }
.mh-conex--e .mh-conex__punto{ fill:var(--mh-ext); }
.mh-conex--b .mh-conex__punto{ fill:var(--mh-b); }
.mh-conex__toque{ fill:none; stroke:transparent; stroke-width:12px; vector-effect:non-scaling-stroke; pointer-events:none; cursor:pointer;
  stroke-dasharray:0 .14 .72 .14; }        /* solo el tramo central: los extremos quedan libres para pulsar el país */
.mh--conexiones .mh-conex__toque{ pointer-events:stroke; }
.mh--moviendo .mh-conex__toque{ pointer-events:none; }
.mh-conex--hover .mh-conex__linea{ opacity:1; stroke:#fff; }
.mh-conex-con-sel .mh-conex:not(.mh-conex--sel) .mh-conex__linea{ opacity:.2; }
.mh-conex--sel .mh-conex__linea{ opacity:1; stroke:#fff; filter:drop-shadow(0 0 4px rgba(255,255,255,.7)); }
@keyframes mh-trazar{ to{ stroke-dashoffset:0; } }

/* ---------- Proyectos (modo estratégico) ---------- */
.mh-tramo{ fill:none; stroke:var(--oro-claro); stroke-width:1.6; stroke-dasharray:2 5; stroke-linecap:round; vector-effect:non-scaling-stroke; pointer-events:none; opacity:.9; }
.mh-tramo--obj-1{ stroke:#B8D7E8; }
.mh-tramo--corredores{ stroke:#E89A6B; stroke-dasharray:6 4; }
.mh-lugar rect{ fill:var(--oro-claro); stroke:var(--mh-mar); stroke-width:1.5; }
.mh-lugar--obj-1 rect{ fill:#B8D7E8; }
.mh-lugar--corredores rect{ fill:#E89A6B; }
.mh-lugar text{ fill:var(--hueso); font-size:10.5px; font-weight:600; paint-order:stroke; stroke:rgba(10,10,10,.85); stroke-width:3px; pointer-events:none; }
.mh-lugar:not(.mh-lugar--propio) text{ display:none; }
.mh-lugar{ cursor:help; }

/* ---------- Capa HTML: globo y tarjetas ---------- */
.mh-capa-html{ position:absolute; inset:0; pointer-events:none; }
.mh-globo{
  position:absolute; top:0; left:0; max-width:260px;
  padding:8px 11px; border-radius:var(--radio);
  background:rgba(20,16,14,.94); border:1px solid rgba(227,201,138,.35);
  color:var(--hueso); font-size:13px; line-height:1.4; pointer-events:none;
  box-shadow:0 6px 18px rgba(0,0,0,.4);
}
.mh-globo b{ display:block; font-weight:600; }
.mh-globo small{ display:block; margin-top:2px; font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--oro-claro); }
.mh-globo span:not([aria-hidden]){ display:block; margin-top:4px; font-size:12.5px; color:rgba(246,244,239,.85); }

.mh-tarjeta{
  position:absolute; top:0; left:0; width:min(300px, calc(100% - 20px));
  padding:16px 18px 14px; border-radius:var(--radio);
  background:rgba(246,244,239,.97); color:var(--tinta);
  box-shadow:0 14px 40px rgba(0,0,0,.45); pointer-events:auto;
  font-size:14px; line-height:1.5;
  animation:mh-aparecer .3s ease both;
}
.mh-tarjeta h4{ font-family:var(--display); font-size:21px; line-height:1.15; margin:2px 0 8px; color:var(--tinta); }
.mh-tarjeta h5{ font-size:10.5px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:var(--grana); margin:12px 0 6px; }
.mh-tarjeta p{ margin:0 0 8px; }
.mh-tarjeta p em{ display:block; font-style:normal; font-size:10.5px; font-weight:700; letter-spacing:.11em; text-transform:uppercase; color:var(--oro); margin-bottom:2px; }
.mh-tarjeta__rotulo{ font-size:10.5px !important; font-weight:700; letter-spacing:.13em; text-transform:uppercase; color:var(--grana); }
.mh-tarjeta__cerrar{ position:absolute; top:6px; right:8px; width:28px; height:28px; border:0; background:none; font-size:22px; line-height:1; color:var(--tinta-suave); cursor:pointer; border-radius:50%; }
.mh-tarjeta__cerrar:hover{ background:var(--piedra); }
.mh-tarjeta--estrategica{ width:min(290px, calc(100% - 20px)); overflow:auto; padding:13px 15px 12px; font-size:13px; }
.mh-tarjeta--estrategica h5{ margin:9px 0 5px; }
.mh-chip--proyecto{ background:#FBF0D2; border-color:var(--oro); }
.mh--estrategico .mh-leyenda__cuerpo{ display:none; }
@keyframes mh-aparecer{ from{ opacity:0; transform:translateY(8px); } }

/* ---------- Controles ---------- */
.mh-controles{ position:absolute; top:14px; left:14px; z-index:5; display:flex; flex-direction:column; gap:6px; }
.mh-ctl{
  width:38px; height:38px; display:grid; place-items:center;
  border:1px solid rgba(255,255,255,.18); border-radius:var(--radio);
  background:rgba(20,16,14,.86); color:var(--hueso); font-size:20px; line-height:1; cursor:pointer;
  backdrop-filter:blur(4px); transition:background .15s, border-color .15s;
}
.mh-ctl:hover{ background:var(--grana); border-color:var(--grana); }
.mh-ctl:focus-visible{ outline:2px solid var(--oro); outline-offset:2px; }
.mh-ctl svg{ width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.mh-ctl--llaves svg{ width:22px; height:22px; stroke-width:1.6; }
.mh-ctl--llaves svg text{ fill:currentColor; stroke:none; font:700 13px var(--texto); }
.mh-ctl--activo{ background:var(--oro); border-color:var(--oro); color:var(--tinta); }
.mh-ctl--activo:hover{ background:var(--oro-claro, #f7d64a); border-color:var(--oro); color:var(--tinta); }

.mh-buscador{ position:absolute; top:14px; left:62px; z-index:5; width:min(260px, calc(100% - 76px)); }
.mh-buscador input{
  width:100%; height:38px; padding:0 12px 0 34px;
  border:1px solid rgba(255,255,255,.18); border-radius:var(--radio);
  background:rgba(20,16,14,.86) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E3C98A' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") no-repeat 10px center / 16px;
  color:var(--hueso); font-family:var(--texto); font-size:14px;
}
.mh-buscador input::placeholder{ color:rgba(246,244,239,.55); }
.mh-buscador input:focus{ outline:2px solid var(--oro); outline-offset:1px; }

.mh-pista{
  position:absolute; top:14px; left:50%; transform:translateX(-50%); z-index:4;
  padding:7px 14px 7px 26px; border-radius:20px;
  background:rgba(20,16,14,.8); color:var(--oro-claro); font-size:13px; white-space:nowrap; pointer-events:none;
}
.mh-pista::before{ content:""; position:absolute; left:12px; top:50%; width:8px; height:8px; margin-top:-4px; border-radius:50%; background:var(--oro); }

.mh-banda{
  position:absolute; top:14px; left:50%; transform:translateX(-50%); z-index:6;
  display:flex; align-items:center; gap:14px; max-width:min(560px, calc(100% - 28px));
  padding:9px 10px 9px 16px; border-radius:var(--radio);
  background:rgba(37,5,9,.95); border:1px solid rgba(227,201,138,.4);
  box-shadow:0 8px 24px rgba(0,0,0,.4); animation:mh-aparecer .25s ease both;
}
.mh-banda__t b{ display:block; font-size:14px; font-weight:600; color:var(--hueso); }
.mh-banda__t small{ display:block; font-size:12.5px; color:rgba(246,244,239,.75); }
.mh-banda__salir{
  flex:none; padding:7px 12px; border:1px solid var(--oro); border-radius:2px;
  background:transparent; color:var(--oro-claro); font-family:var(--texto); font-size:13px; font-weight:600; cursor:pointer;
}
.mh-banda__salir:hover{ background:var(--oro); color:var(--tinta); }
.mh--comparacion .mh-banda{ border-color:var(--mh-b); }

.mh-leyenda{ position:absolute; left:14px; bottom:14px; z-index:4; max-width:calc(100% - 28px); }
.mh-leyenda__boton{
  padding:6px 11px; border:1px solid rgba(255,255,255,.18); border-radius:var(--radio);
  background:rgba(20,16,14,.86); color:var(--hueso); font-family:var(--texto); font-size:12px; font-weight:600;
  letter-spacing:.08em; text-transform:uppercase; cursor:pointer;
}
.mh-leyenda__cuerpo{
  margin-top:6px; padding:10px 12px; border-radius:var(--radio); background:rgba(20,16,14,.86);
  display:grid; grid-template-columns:repeat(3, auto); gap:6px 16px;
  font-size:11.5px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:rgba(246,244,239,.82);
}
.mh-leyenda__cuerpo small{ grid-column:1 / -1; text-transform:none; letter-spacing:0; font-weight:400; color:rgba(246,244,239,.6); }
.mh-ley{ display:flex; align-items:center; gap:7px; white-space:nowrap; }
.mh-ley::before{ content:""; flex:none; width:12px; height:12px; }
.mh-ley--nucleo::before{ background:var(--mh-nucleo); }
.mh-ley--hermandad::before{ background:var(--mh-hermandad); }
.mh-ley--diaspora::before{ background:var(--mh-diaspora); }
.mh-ley--puentes::before{ background:var(--mh-puentes); }
.mh-ley--ejes::before{ height:3px; background:var(--mh-eje); }
.mh-ley--llaves::before{ border-radius:50%; background:var(--grana); box-shadow:0 0 0 1.5px var(--hueso); }
.mh-ley--conex-h::before{ height:3px; background:var(--mh-a); }
.mh-ley--conex-e::before{ height:3px; background:var(--mh-ext); }
.mh-ley--proyecto::before{ width:8px; height:8px; margin:0 2px; transform:rotate(45deg); background:var(--oro-claro); }

.mh-aviso{
  position:absolute; left:50%; bottom:22px; z-index:7; transform:translate(-50%, 12px);
  padding:9px 16px; border-radius:20px; background:rgba(20,16,14,.92); color:var(--hueso); font-size:13px;
  opacity:0; pointer-events:none; transition:opacity .25s, transform .25s; white-space:nowrap;
}
.mh-aviso--visible{ opacity:1; transform:translate(-50%, 0); }

/* ---------- Panel ---------- */
.mh-panel{
  position:absolute; z-index:8; top:12px; right:12px; bottom:12px;
  width:min(440px, 42%);
  display:flex; flex-direction:column;
  background:var(--hueso); color:var(--tinta);
  border-radius:var(--radio); box-shadow:0 18px 50px rgba(0,0,0,.5);
  transform:translateX(calc(100% + 24px)); visibility:hidden;
  transition:transform .38s cubic-bezier(.2,.75,.3,1), visibility 0s linear .38s;
}
.mh-panel--abierto{ transform:none; visibility:visible; transition:transform .38s cubic-bezier(.2,.75,.3,1); }
.mh-asa{ display:none; }
.mh-panel__scroll{ flex:1; overflow:auto; overscroll-behavior:contain; padding:22px 22px 12px; }
.mh-panel__pie{ flex:none; border-top:1px solid var(--linea); background:var(--hueso); padding:10px 64px 10px 14px; border-radius:0 0 var(--radio) var(--radio); }  /* a la derecha queda sitio para el botón «volver arriba» de la web */

.mh-cab{ display:flex; align-items:flex-start; gap:14px; margin-bottom:16px; }
.mh-cab__bandera{ font-size:42px; line-height:1; flex:none; }
.mh-cab__texto{ flex:1; min-width:0; }
.mh-cab__nombre{ font-family:var(--display); font-size:clamp(25px, 3vw, 31px); line-height:1.1; margin:4px 0 3px; color:var(--tinta); outline:none; }
.mh-cab__capital{ font-size:14px; color:var(--tinta-suave); margin:0; }
.mh-circulo{ display:inline-block; padding:3px 8px; border-radius:2px; font-size:10px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; background:var(--grana); color:#fff; }
.mh-circulo--hermandad{ background:var(--mh-hermandad); color:var(--tinta); }
.mh-circulo--diaspora{ background:var(--mh-diaspora); }
.mh-circulo--puentes{ background:var(--mh-puentes); color:var(--tinta); }
.mh-cerrar{ flex:none; width:34px; height:34px; margin:-4px -6px 0 0; border:0; border-radius:50%; background:none; color:var(--tinta-suave); font-size:26px; line-height:1; cursor:pointer; }
.mh-cerrar:hover{ background:var(--piedra); color:var(--grana); }
.mh-cerrar:focus-visible{ outline:2px solid var(--oro); }

.mh-metricas{ display:grid; grid-template-columns:repeat(3, 1fr); gap:1px; background:var(--linea); border:1px solid var(--linea); margin-bottom:16px; }
.mh-metrica{ background:var(--hueso); padding:11px 12px 12px; min-width:0; }
.mh-metrica b{ display:block; font-family:var(--display); font-size:21px; font-weight:600; line-height:1.15; color:var(--grana); font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.mh-metrica span{ display:block; margin-top:3px; font-size:11.5px; line-height:1.3; color:var(--tinta-suave); }
.mh-metrica em{ display:block; font-style:normal; font-size:10.5px; font-weight:600; color:var(--oro); }

.mh-nota{ font-size:13px; line-height:1.55; color:var(--tinta-suave); margin:8px 0 12px; }
.mh-nd{ font-style:normal; font-size:13px; color:var(--tinta-suave); opacity:.7; }
.mh-rotulo{ font-size:10.5px; font-weight:700; letter-spacing:.13em; text-transform:uppercase; color:var(--grana); margin:12px 0 7px; }
.mh-fuente{ font-size:11.5px; color:var(--tinta-suave); margin:10px 0 0; }
.mh-fuente--pie{ padding-top:12px; border-top:1px solid var(--linea); margin-top:14px; }

/* Acordeón */
.mh-sec{ border-top:1px solid var(--linea); }
.mh-sec__t{ margin:0; }
.mh-sec__t button{
  display:flex; align-items:center; width:100%; gap:10px; padding:13px 2px;
  border:0; background:none; text-align:left; cursor:pointer;
  font-family:var(--texto); font-size:14.5px; font-weight:700; letter-spacing:.02em; color:var(--grana);
}
.mh-sec__t button::after{ content:"+"; margin-left:auto; font-family:var(--display); font-size:23px; font-weight:600; line-height:.9; color:var(--oro); }
.mh-sec--abierta .mh-sec__t button::after{ content:"–"; }
.mh-sec__t button:focus-visible{ outline:2px solid var(--oro); outline-offset:2px; }
.mh-sec__c{ padding:0 0 16px; font-size:14.5px; line-height:1.6; animation:mh-aparecer .25s ease both; }
.mh-sec__c > p{ margin:0 0 10px; }

.mh-cita{ border-left:3px solid var(--oro); padding-left:14px; margin-bottom:6px; }
.mh-cita .mh-rotulo{ margin-top:0; }
.mh-cita p{ font-size:15px; margin:0; }

.mh-fila{ display:grid; grid-template-columns:118px minmax(0,1fr); gap:12px; padding:10px 0; border-top:1px solid rgba(207,200,187,.6); }
.mh-fila__et{ margin:0; font-size:10.5px; font-weight:700; letter-spacing:.09em; text-transform:uppercase; color:var(--tinta-suave); padding-top:3px; }
.mh-fila__v p{ margin:0; }

.mh-datos{ display:grid; gap:1px; background:var(--linea); border:1px solid var(--linea); margin-bottom:10px; }
.mh-datos--3{ grid-template-columns:repeat(3, 1fr); }
.mh-datos--2{ grid-template-columns:repeat(2, 1fr); }
.mh-dato{ background:var(--hueso); padding:9px 10px 10px; min-width:0; }
.mh-dato b{ display:block; font-family:var(--display); font-size:19px; font-weight:600; color:var(--grana); line-height:1.15; font-variant-numeric:tabular-nums; }
.mh-dato span{ display:block; font-size:11px; color:var(--tinta-suave); line-height:1.3; margin-top:2px; }
.mh-dato em{ display:block; font-style:normal; font-size:10px; color:var(--oro); font-weight:600; line-height:1.3; margin-top:2px; }

.mh-chips{ display:flex; flex-wrap:wrap; gap:6px; }
.mh-chip{
  display:inline-flex; align-items:center; gap:5px; padding:3px 9px; border-radius:2px;
  background:var(--piedra); border:1px solid var(--linea);
  font-family:var(--texto); font-size:12.5px; line-height:1.45; color:var(--tinta);
}
.mh-chip b{ font-weight:700; color:var(--grana); font-variant-numeric:tabular-nums; }
button.mh-chip{ cursor:pointer; }
button.mh-chip:hover{ background:var(--oro-claro); border-color:var(--oro); }
.mh-chip--hispano{ background:#FBF0D2; border-color:var(--oro); }
.mh-chip--op{ background:var(--grana); border-color:var(--grana); color:#fff; font-weight:600; }
.mh-chip--sector{ background:#EFE7D6; border-color:#D9C9A4; }
.mh-chip--mar{ background:#E4EFF5; border-color:#B8D4E2; }
.mh-chip--llave{ background:var(--grana-tinta); border-color:var(--grana-tinta); color:var(--hueso); }
.mh-chip--llave b{ color:var(--oro-claro); }
.mh-chip--llave:hover{ background:var(--grana) !important; color:#fff; }
.mh-chip--eje{ background:#F6E3E4; border-color:#E7B6BA; }
.mh-chip--camino{ background:#E4EFF5; border-color:#B8D4E2; }
.mh-chip--fosil{ background:#E6E2DC; }
.mh-chip--hidraulica, .mh-chip--eolica, .mh-chip--solar, .mh-chip--geotermica, .mh-chip--biomasa{ background:#E2F0E6; border-color:#BBD9C5; }
.mh-chip--nuclear{ background:#EDE6F2; border-color:#CFC0DC; }
.mh-chip--ir{ font-family:var(--texto); }

.mh-barra{ display:inline-block; vertical-align:middle; width:100%; max-width:120px; height:6px; border-radius:3px; background:rgba(126,18,32,.12); overflow:hidden; }
.mh-barra > span{ display:block; height:100%; background:var(--grana); border-radius:3px; }
.mh-barra--verde > span{ background:#2E7D4F; }
.mh-barra--ext > span{ background:var(--mh-ext); }
.mh-limpia{ display:flex; align-items:center; gap:8px; margin:8px 0 0; font-size:13px; color:#2E7D4F; }
.mh-limpia .mh-barra{ max-width:140px; background:rgba(46,125,79,.14); }

.mh-reparto{ display:flex; height:10px; border-radius:2px; overflow:hidden; margin:4px 0 8px; }
.mh-reparto span{ display:block; }
.mh-r-agr{ background:#7E9B2E; } .mh-r-ind{ background:#6B4A42; } .mh-r-ser{ background:#1E7F8C; }
.mh-reparto__ley{ display:flex; flex-wrap:wrap; align-items:center; gap:4px 12px; font-size:12.5px; color:var(--tinta-suave); }
.mh-reparto__ley i{ display:inline-block; width:10px; height:10px; border-radius:2px; margin-right:-6px; }

.mh-fe{ display:flex; height:12px; border-radius:2px; overflow:hidden; margin:4px 0 8px; background:var(--piedra); }
.mh-fe span{ display:block; }
.mh-fe__ley{ display:flex; flex-wrap:wrap; gap:4px 12px; font-size:12.5px; color:var(--tinta-suave); }
.mh-fe__ley span{ display:inline-flex; align-items:center; gap:5px; }
.mh-fe__ley i{ display:inline-block; width:10px; height:10px; border-radius:2px; }
.mh-fe--catolica{ background:#7E1220; } .mh-fe--evangelica{ background:#C39A4B; } .mh-fe--otras_cristianas{ background:#D9B98A; }
.mh-fe--cristiana{ background:#9E4A3A; } .mh-fe--musulmana{ background:#2E7D4F; } .mh-fe--otras{ background:#6A4C93; }
.mh-fe--sin_religion{ background:#8C8C8C; } .mh-fe--sin_especificar{ background:#CFC8BB; }

.mh-indice{ margin-top:10px; padding:12px 14px; background:var(--piedra); border-radius:var(--radio); }
.mh-indice .mh-rotulo{ margin-top:0; }
.mh-indice .mh-rotulo b{ color:var(--tinta); }
.mh-indice__f{ display:grid; grid-template-columns:96px 1fr 30px; align-items:center; gap:10px; margin:5px 0; font-size:12.5px; }
.mh-indice__f .mh-barra{ max-width:none; }
.mh-indice__f b{ text-align:right; font-variant-numeric:tabular-nums; }
.mh-indice .mh-nota{ margin:8px 0 0; font-size:12px; }

.mh-enlaces{ list-style:none; margin:0 0 6px; padding:0; }
.mh-enlace-fila{ border-top:1px solid rgba(207,200,187,.6); padding:7px 0; }
.mh-enlace-fila__b{
  display:grid; grid-template-columns:minmax(0,1fr) auto 70px; align-items:center; gap:10px; width:100%;
  padding:3px 0; border:0; background:none; text-align:left; cursor:pointer; font-family:var(--texto); color:var(--tinta);
}
.mh-enlace-fila__n{ font-size:14px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mh-enlace-fila__k{ font-size:10.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--tinta-suave); }
.mh-enlace-fila__b:hover .mh-enlace-fila__n{ color:var(--grana); }
.mh-enlace-fila__b:focus-visible{ outline:2px solid var(--oro); outline-offset:2px; }
.mh-enlace-fila__f{ list-style:none; margin:2px 0 0; padding:0; font-size:12.5px; line-height:1.5; color:var(--tinta-suave); }
.mh-enlace-fila--sel{ background:#FBF0D2; margin:0 -10px; padding:8px 10px; border-radius:var(--radio); }
.mh-enlace-fila--sel .mh-enlace-fila__f{ color:var(--tinta); }
.mh-enlace-fila--sel .mh-enlace-fila__f li::before{ content:"· "; color:var(--oro); font-weight:700; }

.mh-enlace{ margin-top:6px; padding:0; border:0; background:none; font-family:var(--texto); font-size:13px; font-weight:600; color:var(--grana); cursor:pointer; border-bottom:1px solid rgba(126,18,32,.3); }
.mh-enlace:hover{ border-bottom-color:var(--grana); }

.mh-proyectos{ list-style:none; margin:0; padding:0; }
.mh-proyectos li{ padding:9px 0; border-top:1px solid rgba(207,200,187,.6); }
.mh-proyectos b{ display:block; font-size:14px; color:var(--tinta); }
.mh-proyectos small{ display:block; font-size:11px; font-weight:600; letter-spacing:.05em; color:var(--oro); text-transform:uppercase; }
.mh-proyectos p{ margin:4px 0 0; font-size:13px; color:var(--tinta-suave); }
.mh-tarjeta .mh-proyectos li{ padding:5px 0; }

.mh-retos{ margin:0; padding:0 0 0 18px; }
.mh-retos li{ margin-bottom:8px; }
.mh-retos li::marker{ color:var(--grana); }

/* Comparación */
.mh-comp{ margin:0 0 14px; padding:12px 14px 14px; border:1px solid var(--mh-b); border-radius:var(--radio); background:#EEF5F9; }
.mh-comp__cab{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.mh-comp__cab .mh-rotulo{ margin:0; color:#1E4A63; }
.mh-comp__elige{ display:flex; flex-direction:column; gap:5px; margin:10px 0; font-size:12.5px; color:var(--tinta-suave); }
.mh-comp__elige select{ font-family:var(--texto); font-size:14px; padding:7px 9px; border:1px solid var(--linea); border-radius:2px; background:#fff; color:var(--tinta); }
.mh-comp__paises{ display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:6px 0 4px; padding-left:96px; font-size:13px; font-weight:700; }
.mh-comp__a{ color:#8A6A1E; } .mh-comp__b{ color:#1E4A63; }
.mh-comp__tabla{ width:100%; border-collapse:collapse; font-size:13px; }
.mh-comp__tabla th{ width:96px; text-align:left; font-weight:400; font-size:11.5px; color:var(--tinta-suave); padding:6px 6px 6px 0; vertical-align:top; }
.mh-comp__tabla td{ padding:6px 4px; font-weight:600; font-variant-numeric:tabular-nums; vertical-align:top; border-top:1px solid rgba(30,74,99,.12); }
.mh-comp__tabla .mh-barra{ display:block; margin-top:4px; max-width:none; height:5px; }
.mh-comp__tabla .mh-comp__a .mh-barra > span{ background:#C39A4B; }
.mh-comp__tabla .mh-comp__b .mh-barra > span{ background:#3E7295; }
.mh-comp__enlace ul{ margin:6px 0 0; padding-left:18px; font-size:13px; }
.mh-intensidad{ display:flex; align-items:center; gap:8px; font-size:12.5px; font-weight:600; margin:0; }

/* Botones */
.mh-btn{ padding:7px 12px; border:1px solid var(--grana); border-radius:2px; background:transparent; color:var(--grana); font-family:var(--texto); font-size:12.5px; font-weight:600; cursor:pointer; }
.mh-btn:hover{ background:var(--grana); color:#fff; }
.mh-btn--fino{ border-color:#3E7295; color:#1E4A63; }
.mh-btn--fino:hover{ background:#3E7295; color:#fff; }

.mh-acciones{ display:grid; grid-template-columns:repeat(3, 1fr); gap:8px; }
.mh-accion{
  display:flex; flex-direction:column; align-items:center; gap:4px; padding:8px 4px;
  border:1px solid var(--linea); border-radius:var(--radio); background:#fff;
  font-family:var(--texto); font-size:12px; font-weight:600; color:var(--grana); cursor:pointer;
  transition:background .15s, color .15s, border-color .15s;
}
.mh-accion svg{ width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.mh-accion:hover:not([disabled]){ border-color:var(--grana); }
.mh-accion[aria-pressed="true"]{ background:var(--grana); border-color:var(--grana); color:#fff; }
.mh-accion[data-modo="comparison"][aria-pressed="true"]{ background:#1E4A63; border-color:#1E4A63; }
.mh-accion[disabled]{ opacity:.4; cursor:not-allowed; }
.mh-accion:focus-visible{ outline:2px solid var(--oro); outline-offset:2px; }

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

/* Con el panel abierto, los controles no quedan debajo */
@media (min-width:900px){
  .mh--seleccion .mh-banda{ left:calc((100% - min(440px, 42%) - 24px) / 2); }
  .mh--seleccion .mh-aviso{ left:calc((100% - min(440px, 42%) - 24px) / 2); }
}

/* ---------- Móvil: hoja inferior ---------- */
@media (max-width:899px){
  .mh{ --mh-cabecera:79px; min-height:480px; }
  .mh-panel{
    top:auto; left:0; right:0; bottom:0; width:auto;
    height:52%; border-radius:12px 12px 0 0;
    transform:translateY(105%);
    transition:transform .38s cubic-bezier(.2,.75,.3,1), height .3s ease, visibility 0s linear .38s;
  }
  .mh-panel--abierto{ transform:none; transition:transform .38s cubic-bezier(.2,.75,.3,1), height .3s ease; }
  .mh-panel--completo{ height:90%; }
  .mh-asa{
    display:flex; justify-content:center; align-items:center; flex:none;
    height:24px; border:0; background:none; cursor:grab; touch-action:none;
  }
  .mh-asa span{ width:44px; height:5px; border-radius:3px; background:var(--linea); }
  .mh-panel__scroll{ padding:6px 18px 10px; }
  .mh-panel__pie{ padding:8px 62px calc(8px + env(safe-area-inset-bottom)) 10px; border-radius:0; }
  .mh-cab__bandera{ font-size:34px; }
  .mh-metrica b{ font-size:18px; }
  .mh-fila{ grid-template-columns:1fr; gap:4px; }
  .mh-leyenda__cuerpo{ grid-template-columns:repeat(2, auto); }
  .mh--seleccion .mh-leyenda, .mh--seleccion .mh-pista{ display:none; }
  .mh-buscador{ left:62px; right:14px; width:auto; }
  .mh-pista{ top:62px; font-size:12px; }
  .mh-banda{ top:62px; left:62px; right:14px; transform:none; max-width:none; padding:7px 8px 7px 12px; gap:10px; }
  .mh-banda__t b{ font-size:13px; }
  .mh-banda__t small{ display:none; }
  .mh-banda__salir{ padding:6px 10px; font-size:12px; }
  .mh-controles .mh-ctl[data-ctl="alejar"]{ display:grid; }
  .mh-rot--mar{ font-size:13px; }
}
@media (max-width:420px){
  .mh-metricas{ grid-template-columns:repeat(2, 1fr); }
  .mh-datos--3{ grid-template-columns:repeat(2, 1fr); }
  .mh-leyenda__cuerpo{ grid-template-columns:1fr; }
}

@media (prefers-reduced-motion:reduce){
  .mh-panel, .mh-panel--abierto{ transition:none; }
  .mh-conex__linea{ animation:none; stroke-dashoffset:0; }
  .mh-llave--activa .mh-llave__halo, .mh-llave--propia .mh-llave__halo{ animation:none; }
  .mh-tarjeta, .mh-banda, .mh-sec__c{ animation:none; }
}
.mh-envoltura{ margin:0 0 46px; }

/* Resto de un país con zona pulsable (Estados Unidos) */
.mh-pais--inerte{ pointer-events:none; cursor:default; }
.mh-nota--zona b{ color:var(--tinta); }

/* Territorio dividido (Sáhara Occidental): ocupado rayado, zona libre lisa, el muro entre ambos */
.mh-parte{ fill:transparent; stroke:none; cursor:pointer; transition:opacity .25s; }
.mh-parte--ocupado{ fill:url(#mh-rayado); }
.mh-rayado__linea{ stroke:rgba(15,8,8,.62); stroke-width:.6; }
.mh-parte__limite{ fill:none; stroke:var(--hueso); stroke-width:1.3; stroke-dasharray:4 2.5; vector-effect:non-scaling-stroke; pointer-events:none; }
.mh--foco .mh-partes:not(.mh-partes--activo){ opacity:.28; }
.mh-parte__rotulo{ pointer-events:none; font-family:var(--texto); font-size:10.5px; font-weight:700; letter-spacing:.06em; fill:var(--hueso); paint-order:stroke; stroke:rgba(10,10,10,.85); stroke-width:3px; }
.mh-parte__rotulo--libre{ fill:var(--oro-claro); }
.mh-globo__parte{ color:var(--oro-claro); }
.mh-parte-ficha{ margin:0 0 6px; }
.mh-parte-ficha--ocupado{ padding-left:10px; border-left:3px solid var(--tinta-suave); }
.mh-parte-ficha--libre{ padding-left:10px; border-left:3px solid var(--mh-puentes); }

/* El Rif: rayado, como la parte ocupada del Sáhara; el resto de Marruecos, sin nada */
.mh-parte--rif{ fill:url(#mh-rayado); }
.mh-parte--resto{ fill:transparent; }

/* Ceuta y Melilla: punto pulsable y nombre al acercarse */
.mh-ciudad{ cursor:pointer; }
.mh-ciudad__toque{ fill:transparent; stroke:none; }
.mh-ciudad__punto{ stroke:var(--hueso); stroke-width:1.4; transition:r .2s; }
.mh-ciudad:hover .mh-ciudad__punto, .mh-ciudad--sel .mh-ciudad__punto{ r:5; }
.mh-ciudad__nombre{ display:none; pointer-events:none; fill:var(--hueso); font-family:var(--texto); font-size:10.5px; font-weight:700; letter-spacing:.04em; paint-order:stroke; stroke:rgba(10,10,10,.85); stroke-width:3px; }
.mh-ciudad--nombre .mh-ciudad__nombre, .mh-ciudad:hover .mh-ciudad__nombre{ display:inline; }
.mh--foco .mh-ciudad:not(.mh-ciudad--sel){ opacity:.35; }
.mh-desglose small{ font-weight:500; color:var(--tinta-suave); margin-left:4px; }
.mh-metricas--4{ grid-template-columns:repeat(2, minmax(0,1fr)); }
.mh-desglose .mh-indice__f{ grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) auto; }
.mh-desglose .mh-indice__f b{ white-space:nowrap; text-align:right; min-width:86px; }
.mh-indice__f--total{ font-weight:700; }
.mh-indice__f--total:first-of-type, .mh-indice__f:not(.mh-indice__f--total) + .mh-indice__f--total{ margin-top:12px; padding-top:10px; border-top:1px solid var(--linea); }
/* Gibraltar: su nombre a la izquierda del punto, para no pisar a Ceuta */
.mh-ciudad[data-parte="ES-gibraltar-punto"] .mh-ciudad__nombre{ text-anchor:end; transform:translateX(-14px); }
.mh-ciudad[data-parte="ES-gibraltar-punto"] .mh-ciudad__punto{ fill:url(#mh-rayado); }
