/* =====================================================================
   Memoria y Resistencia — bienvenida del index con presentación animada (21 nov 2026, pedido de Daniel:
   «que muestre el widget de la línea de tiempo del mapa, después una animación de Turing, después el Mapa Político, y así,
   que vaya presentando animadamente todo lo que tiene, con un botón para ver lo que le interesó»).
   Va después de portada-hp.css (inicio.php). Marcado en parciales/portada-hero.php; rotación en js/portada-escenas.js.
   - Hero compacto: en celular, eslogan, texto, escena y su botón caben en una pantalla; las cifras pasan debajo.
   - Cada escena tiene su color (ninguno de partido: violeta, lila, rosa, turquesa, menta, luz de cempasúchil y el azul de Turing
     solo en su escena). El Memorial es la única escena solemne.
   - Con «reducir movimiento» nada se mueve solo: cada escena se ve quieta en su estado final y se cambia con la fila de escenas.
   Quitar el <link> de este archivo deja el marcado sin estilo propio (no rompe nada); para volver a la portada anterior, subir
   la carpeta base/ de la pieza.
   ===================================================================== */

html body.hp-sitio .pe-tarjeta {
  --pe-borde: rgba(255, 255, 255, .14);
  --pe-tenue: #cfc6dd;
  grid-template-areas: "texto" "pres" "cifras";
  gap: 20px;
  padding: 20px 16px 22px;
}
html body.hp-sitio .pe-tarjeta > .portada-texto { grid-area: texto; position: relative; z-index: 1; }
html body.hp-sitio .pe-tarjeta > .portada-cifras { grid-area: cifras; position: relative; z-index: 1; margin: 0; padding-top: 16px; }
html body.hp-sitio .pe-tarjeta > .pe-presentacion { grid-area: pres; position: relative; z-index: 1; }

/* Texto de bienvenida compacto */
html body.hp-sitio .pe-tarjeta .portada-sello { margin: 0 0 12px; padding: 4px 10px 4px 8px; font-size: .68rem; gap: 6px; white-space: nowrap; max-width: 100%; }
html body.hp-sitio .pe-tarjeta h1 { max-width: 16ch; font-size: clamp(1.75rem, 7.4vw, 3rem); }
html body.hp-sitio .pe-tarjeta .portada-lead { margin: 10px 0 0; font-size: .92rem; line-height: 1.48; }
@media (max-width: 575.98px) {
  html body.hp-sitio .portada-seccion:has(.pe-tarjeta) { padding-top: 12px; }
  html body.hp-sitio .pe-presentacion { gap: 8px; }
  html body.hp-sitio .pe-escena { gap: 8px; padding: 8px; }
}

@media (min-width: 576px) {
  html body.hp-sitio .pe-tarjeta { padding: 28px; gap: 24px; }
}
@media (min-width: 1100px) {
  html body.hp-sitio .pe-tarjeta {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-areas: "texto pres" "cifras pres";
    grid-template-rows: 1fr auto;
    column-gap: 40px; row-gap: 24px; padding: 36px 40px;
  }
  html body.hp-sitio .pe-tarjeta > .portada-texto { align-self: center; }
  html body.hp-sitio .pe-tarjeta .portada-sello { margin-bottom: 20px; font-size: .85rem; padding: 6px 12px; }
  html body.hp-sitio .pe-tarjeta h1 { font-size: clamp(2.2rem, 3.4vw, 3.05rem); }
  html body.hp-sitio .pe-tarjeta .portada-lead { margin-top: 20px; font-size: 1.0625rem; line-height: 1.6; }
  html body.hp-sitio .pe-tarjeta > .portada-cifras { align-self: end; padding-top: 20px; }
}

/* ---------- La presentación ---------- */
html body.hp-sitio .pe-presentacion { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
html body.hp-sitio .pe-escenario { display: grid; order: 2; min-width: 0; }
html body.hp-sitio .pe-riel { order: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
@media (min-width: 1100px) { html body.hp-sitio .pe-escenario { order: 1; } html body.hp-sitio .pe-riel { order: 2; } }

/* Colores de cada escena (ninguno de partido) */
html body.hp-sitio [data-pe-color="mapa"] { --pe-c: #ffd59a; --pe-c2: #a77bf0; }
html body.hp-sitio [data-pe-color="turing"] { --pe-c: #9fbcff; --pe-c2: #6f8cff; }
html body.hp-sitio [data-pe-color="politico"] { --pe-c: #f7a8d2; --pe-c2: #b48cff; }
html body.hp-sitio [data-pe-color="congresos"] { --pe-c: #8fe3c2; --pe-c2: #7fb7ff; }
html body.hp-sitio [data-pe-color="perfiles"] { --pe-c: #d2c0ff; --pe-c2: #f7a8d2; }
html body.hp-sitio [data-pe-color="prensa"] { --pe-c: #7fdbe6; --pe-c2: #c9b3ff; }
html body.hp-sitio [data-pe-color="comunidad"] { --pe-c: #ffc3e1; --pe-c2: #a9e6ff; }
html body.hp-sitio [data-pe-color="memorial"] { --pe-c: #f6dcae; --pe-c2: #e9b866; }
html body.hp-sitio [data-pe-color="datos"] { --pe-c: #b5ecc6; --pe-c2: #9fbcff; }

/* Escenas apiladas en la misma celda: el escenario mide lo que la más alta (no salta al cambiar). */
html body.hp-sitio .pe-escena {
  grid-area: 1 / 1; display: flex; flex-direction: column; gap: 10px; min-width: 0;
  padding: 10px; border-radius: 18px; border: 1px solid var(--pe-borde);
  background:
    radial-gradient(120% 90% at 85% 0%, color-mix(in srgb, var(--pe-c) 22%, transparent), transparent 60%),
    radial-gradient(90% 80% at 0% 100%, color-mix(in srgb, var(--pe-c2) 18%, transparent), transparent 65%),
    rgba(9, 6, 22, .5);
}
html body.hp-sitio .pe-listo .pe-escena { visibility: hidden; opacity: 0; transition: opacity .5s ease, visibility 0s linear .5s; }
html body.hp-sitio .pe-listo .pe-escena.pe-activa { visibility: visible; opacity: 1; transition: opacity .5s ease; }
/* Sin JavaScript: solo la primera escena. */
html body.hp-sitio .pe-presentacion:not(.pe-listo) .pe-escena:not(:first-child) { display: none; }

/* El arte de cada escena */
html body.hp-sitio .pe-arte {
  position: relative; flex: 1 1 auto; min-height: 210px; border-radius: 12px; overflow: hidden;
  display: grid; place-items: center;
}
html body.hp-sitio .pe-mapa .pe-arte { display: flex; flex-direction: column; place-items: stretch; overflow: visible; min-height: 0; }
html body.hp-sitio .pe-presentacion .linea-mapa-marco { background: rgba(9, 6, 22, .35); border-color: rgba(255, 255, 255, .1); border-radius: 12px; }
html body.hp-sitio .pe-presentacion .linea-mapa { height: 172px; }
html body.hp-sitio .pe-presentacion .linea-control { margin-top: 8px; }
html body.hp-sitio .pe-presentacion .linea-leyenda { display: none; }
html body.hp-sitio .pe-presentacion .portada-anio > span { font-size: 1.9rem; }
html body.hp-sitio .pe-presentacion .portada-anio > span.decada { font-size: 1.5rem; }
@media (min-width: 576px) {
  html body.hp-sitio .pe-presentacion .linea-mapa { height: 260px; }
  html body.hp-sitio .pe-presentacion .linea-leyenda { display: flex; }
  html body.hp-sitio .pe-escena { padding: 12px; }
}
@media (min-width: 1100px) {
  html body.hp-sitio .pe-presentacion .linea-mapa { height: clamp(260px, 24vw, 320px); }
  html body.hp-sitio .pe-presentacion .portada-anio > span { font-size: clamp(2rem, 3.4vw, 2.8rem); }
  html body.hp-sitio .pe-presentacion .portada-anio > span.decada { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
}
html body.hp-sitio .pe-arte-vacia { font-size: 4rem; color: var(--pe-c); }
/* Controles del mapa más bajos: botón de 40 px y barras cortas; en el celular, sin el selector de velocidad. */
html body.hp-sitio .pe-presentacion .linea-control { grid-template-columns: auto 1fr auto; gap: 2px 10px; align-items: center; }
html body.hp-sitio .pe-presentacion .linea-boton { width: 40px; height: 40px; grid-row: 1 / span 2; font-size: .95rem; }
html body.hp-sitio .pe-presentacion .linea-barras { height: 26px; }
html body.hp-sitio .pe-presentacion .linea-velocidad { grid-column: 3; grid-row: 1 / span 2; justify-self: auto; }
@media (max-width: 575.98px) {
  html body.hp-sitio .pe-presentacion .linea-control { grid-template-columns: auto 1fr; }
  html body.hp-sitio .pe-presentacion .linea-velocidad { display: none; }
}

/* Pie de cada escena: qué es y su botón */
html body.hp-sitio .pe-pie { display: flex; flex-direction: column; gap: 10px; padding: 2px 4px 2px; }
html body.hp-sitio .pe-pie-texto { min-width: 0; }
html body.hp-sitio .pe-chip {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 0 4px; color: var(--pe-c);
  font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}
html body.hp-sitio .pe-chip .turing-logo { width: 1.05em !important; height: 1.05em !important; }
html body.hp-sitio .pe-titulo { margin: 0; color: #fff; font-family: "Source Serif 4", Georgia, serif; font-weight: 600; font-size: 1.15rem; line-height: 1.25; }
html body.hp-sitio .pe-texto { display: none; margin: 4px 0 0; color: var(--pe-tenue); font-size: .875rem; line-height: 1.45; max-width: none; }
html body.hp-sitio .pe-texto a { color: #e4d6fb; }
html body.hp-sitio .pe-mapa .pe-texto { display: block; font-size: .78rem; }
html body.hp-sitio .pe-mapa .pe-texto-largo { display: none; }
html body.hp-sitio .pe-ir {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border-radius: 12px; background: #fff; color: #15122b; border: 2px solid #fff;
  font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; white-space: nowrap;
}
html body.hp-sitio .pe-ir:hover { background: color-mix(in srgb, var(--pe-c) 30%, #fff); border-color: color-mix(in srgb, var(--pe-c) 30%, #fff); color: #15122b; }
html body.hp-sitio .pe-ir:focus-visible { outline: 3px solid var(--pe-c); outline-offset: 3px; }
html body.hp-sitio .pe-ir i { transition: transform .2s; }
html body.hp-sitio .pe-ir:hover i { transform: translateX(3px); }
@media (min-width: 576px) {
  html body.hp-sitio .pe-pie { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 16px; }
  html body.hp-sitio .pe-texto { display: block; }
  html body.hp-sitio .pe-mapa .pe-texto-largo { display: inline; }
  html body.hp-sitio .pe-titulo { font-size: 1.3rem; }
  html body.hp-sitio .pe-ir { flex: none; }
}

/* ---------- Fila de escenas y pausa ---------- */
html body.hp-sitio .pe-pausa,
html body.hp-sitio .pe-pestana {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 32px; height: 32px; padding: 0 8px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .06); color: #f4f1f8;
  font-size: .85rem; font-weight: 700; line-height: 1; text-decoration: none; cursor: pointer;
}
html body.hp-sitio .pe-pausa { width: 32px; padding: 0; }
html body.hp-sitio .pe-pausa:hover, html body.hp-sitio .pe-pestana:hover { background: rgba(255, 255, 255, .14); color: #fff; }
html body.hp-sitio .pe-pausa:focus-visible, html body.hp-sitio .pe-pestana:focus-visible { outline: 3px solid #ffd59a; outline-offset: 2px; }
html body.hp-sitio .pe-pestanas {
  display: flex; align-items: center; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 3px 2px;
}
html body.hp-sitio .pe-pestanas::-webkit-scrollbar { display: none; }
html body.hp-sitio .pe-pestana { position: relative; overflow: hidden; color: var(--pe-c); }
html body.hp-sitio .pe-pestana-ic { display: inline-flex; font-size: .95rem; }
html body.hp-sitio .pe-pestana-ic .turing-logo { width: 1.05em !important; height: 1.05em !important; }
html body.hp-sitio .pe-pestana-txt { display: none; color: #fff; white-space: nowrap; }
html body.hp-sitio .pe-pestana.pe-activa { border-color: var(--pe-c); background: color-mix(in srgb, var(--pe-c) 18%, transparent); }
/* Lo que falta para la siguiente escena: una línea que se llena debajo de la escena activa. */
html body.hp-sitio .pe-pestana::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--pe-c);
  transform: scaleX(0); transform-origin: left;
}
html body.hp-sitio .pe-girando .pe-pestana.pe-activa::after { animation: pe-avance var(--pe-dura, 8s) linear forwards; }
html body.hp-sitio .pe-detenida .pe-pestana.pe-activa::after { animation-play-state: paused; }
@keyframes pe-avance { to { transform: scaleX(1); } }
@media (min-width: 576px) {
  html body.hp-sitio .pe-pestana.pe-activa .pe-pestana-txt { display: inline; }
  html body.hp-sitio .pe-pausa, html body.hp-sitio .pe-pestana { height: 34px; min-width: 34px; }
  html body.hp-sitio .pe-pausa { width: 34px; }
}
@media (min-width: 1100px) {
  html body.hp-sitio .pe-pestanas { flex-wrap: wrap; overflow: visible; }
}

/* Cifras animadas y datos */
html body.hp-sitio .pe-dato { color: var(--pe-tenue); font-size: .85rem; }
html body.hp-sitio .pe-dato strong { color: #fff; font-family: "Source Serif 4", Georgia, serif; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
html body.hp-sitio .pe-dato-grande { position: absolute; right: 12px; bottom: 8px; }

/* =========================== Escenas =========================== */
/* Todas las animaciones viven solo en la escena activa: así empiezan de nuevo cada vez que aparece. */

/* --- Turing: una nota que se lee, una frase marcada, la sugerencia y la calificación --- */
html body.hp-sitio .pe-turing .pe-arte { grid-template-columns: minmax(0, 1fr) auto; gap: 14px; padding: 12px; place-items: center stretch; }
@media (min-width: 1100px) {
  html body.hp-sitio .pe-turing .pe-arte { gap: 28px; padding: 16px 28px; }
  html body.hp-sitio .pe-nota { gap: 10px; padding: 18px 20px 16px; }
  html body.hp-sitio .pe-renglon { height: 10px; }
  html body.hp-sitio .pe-frase { font-size: 1.25rem; }
  html body.hp-sitio .pe-sugerencia { font-size: .85rem; }
}
html body.hp-sitio .pe-nota {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 7px; padding: 14px 14px 12px; border-radius: 12px;
  background: #fbf9fe; color: #211a2c; box-shadow: 0 18px 36px -20px rgba(0, 0, 0, .8); transform: rotate(-1.2deg);
}
html body.hp-sitio .pe-nota-medio { font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #6d6380; }
html body.hp-sitio .pe-renglon { display: block; height: 8px; width: var(--w); border-radius: 99px; background: #e5dff0; }
html body.hp-sitio .pe-frase { font-family: "Source Serif 4", Georgia, serif; font-weight: 600; font-size: .98rem; line-height: 1.3; }
html body.hp-sitio .pe-frase mark, html body.hp-sitio .pe-marca {
  padding: 0 2px; color: inherit; background: linear-gradient(transparent 55%, rgba(244, 114, 182, .45) 55%);
  text-decoration: underline wavy #d6337c; text-decoration-thickness: 1.5px; text-underline-offset: 4px;
}
html body.hp-sitio .pe-marca { background: #f6c6dd; }
html body.hp-sitio .pe-sugerencia {
  align-self: flex-start; display: inline-flex; gap: 6px; align-items: center; padding: 5px 9px; border-radius: 9px;
  background: #e5f5ee; color: #155c43; font-size: .78rem; font-weight: 700; line-height: 1.3;
}
html body.hp-sitio .pe-escaner {
  position: absolute; left: 0; right: 0; top: 0; height: 34px; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(111, 140, 255, .28) 70%, rgba(111, 140, 255, .65) 96%, transparent);
  transform: translateY(-40px);
}
html body.hp-sitio .pe-turing-lado { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; max-width: 7.5rem; }
html body.hp-sitio .pe-turing-logo { display: grid; place-items: center; width: 4.2rem; height: 4.2rem; border-radius: 18px; background: rgba(159, 188, 255, .16); box-shadow: 0 0 0 1px rgba(159, 188, 255, .35); }
html body.hp-sitio .pe-anillo { position: relative; display: grid; place-items: center; width: 4.6rem; height: 4.6rem; }
html body.hp-sitio .pe-anillo svg { position: absolute; inset: 0; transform: rotate(-90deg); }
html body.hp-sitio .pe-anillo circle { fill: none; stroke-width: 5; }
html body.hp-sitio .pe-anillo-pista { stroke: rgba(255, 255, 255, .14); }
html body.hp-sitio .pe-anillo-arco { stroke: var(--pe-c); stroke-linecap: round; stroke-dasharray: var(--v) 100; }
html body.hp-sitio .pe-anillo strong { color: #fff; font-family: "Source Serif 4", Georgia, serif; font-size: 1.45rem; font-variant-numeric: tabular-nums; }
html body.hp-sitio .pe-turing-lado .pe-dato { font-size: .75rem; line-height: 1.3; }
html body.hp-sitio .pe-turing.pe-activa .pe-escaner { animation: pe-escanear 2.6s ease-in-out .3s 2 both; }
html body.hp-sitio .pe-turing.pe-activa .pe-frase mark, html body.hp-sitio .pe-turing.pe-activa .pe-marca { animation: pe-marcar .6s ease 1.5s both; }
html body.hp-sitio .pe-turing.pe-activa .pe-sugerencia { animation: pe-subir .5s ease 2.4s both; }
html body.hp-sitio .pe-turing.pe-activa .pe-anillo-arco { animation: pe-arco 1.6s cubic-bezier(.2, .7, .2, 1) 1s both; }
@keyframes pe-escanear { from { transform: translateY(-40px); } to { transform: translateY(240px); } }
@keyframes pe-marcar { from { background-size: 0 100%; text-decoration-color: transparent; } to { background-size: 100% 100%; } }
@keyframes pe-arco { from { stroke-dasharray: 0 100; } }

/* --- Mapa político: dos grupos que se suman por dentro y chocan entre sí --- */
html body.hp-sitio .pe-politico .pe-arte { padding: 8px 8px 30px; }
html body.hp-sitio .pe-red { width: 100%; height: 100%; max-height: 260px; overflow: visible; }
html body.hp-sitio .pe-lazo { fill: none; stroke-width: 2.5; stroke-linecap: round; }
html body.hp-sitio .pe-alianza, html body.hp-sitio .pe-suma { stroke: rgba(210, 192, 255, .75); }
html body.hp-sitio .pe-suma { stroke-dasharray: 2 6; }
html body.hp-sitio .pe-choque { stroke: #f7a8d2; stroke-width: 3; stroke-dasharray: 10 8; }
html body.hp-sitio .pe-nodo { stroke: rgba(255, 255, 255, .7); stroke-width: 2; }
html body.hp-sitio .pe-n1 { fill: #8e6ae0; }
html body.hp-sitio .pe-n2 { fill: #3aa7b8; }
html body.hp-sitio .pe-n3 { fill: #d2c0ff; }
html body.hp-sitio .pe-chispa { fill: #fff3d6; opacity: 0; }
html body.hp-sitio .pe-leyenda { position: absolute; left: 12px; bottom: 6px; list-style: none; margin: 0; padding: 0; display: flex; gap: 14px; font-size: .75rem; color: var(--pe-tenue); }
html body.hp-sitio .pe-leyenda li { display: inline-flex; align-items: center; gap: 6px; }
html body.hp-sitio .pe-leyenda span { width: 18px; height: 0; border-top: 2.5px solid rgba(210, 192, 255, .8); }
html body.hp-sitio .pe-leyenda .pe-l-choque { border-top: 3px dashed #f7a8d2; }
html body.hp-sitio .pe-politico.pe-activa .pe-nodo { animation: pe-aparecer .6s cubic-bezier(.2, .9, .3, 1.4) both, pe-flotar 4s ease-in-out .8s infinite alternate; transform-box: fill-box; transform-origin: center; }
html body.hp-sitio .pe-politico.pe-activa .pe-alianza, html body.hp-sitio .pe-politico.pe-activa .pe-suma { animation: pe-trazo 1.2s ease .5s both; stroke-dashoffset: 0; }
html body.hp-sitio .pe-politico.pe-activa .pe-alianza { stroke-dasharray: 400; }
html body.hp-sitio .pe-politico.pe-activa .pe-choque { animation: pe-choque 1s linear 1.3s infinite; }
html body.hp-sitio .pe-politico.pe-activa .pe-chispa { animation: pe-chispa 1.6s ease-out 1.6s infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pe-aparecer { from { transform: scale(0); opacity: 0; } }
@keyframes pe-flotar { to { transform: translateY(-5px); } }
@keyframes pe-trazo { from { stroke-dashoffset: 400; opacity: .2; } }
@keyframes pe-choque { to { stroke-dashoffset: -36; } }
@keyframes pe-chispa { 0% { opacity: 0; transform: scale(.3); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(2.6); } }

/* --- Congresos: propuestas que avanzan por el camino y el semáforo --- */
html body.hp-sitio .pe-congresos .pe-arte { grid-template-rows: 1fr auto; padding: 14px; gap: 14px; place-items: stretch; }
html body.hp-sitio .pe-ruta {
  align-self: center;
  position: relative; display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; min-height: 118px;
  padding-bottom: 22px; border-bottom: 3px solid rgba(255, 255, 255, .18);
}
html body.hp-sitio .pe-parada { position: relative; text-align: center; font-size: .75rem; font-weight: 700; color: var(--pe-tenue); }
html body.hp-sitio .pe-parada::after { content: ""; position: absolute; left: 50%; bottom: -30px; width: 13px; height: 13px; margin-left: -6.5px; border-radius: 50%; background: #2a1d56; border: 3px solid rgba(255, 255, 255, .45); }
html body.hp-sitio .pe-ficha {
  position: absolute; bottom: 52px; left: calc(16.6% - 20px); display: grid; place-items: center; width: 40px; height: 48px; border-radius: 8px;
  background: #fbf9fe; color: #2a1d56; font-size: 1.1rem; box-shadow: 0 10px 20px -12px rgba(0, 0, 0, .8);
}
html body.hp-sitio .pe-ficha::after { content: ""; position: absolute; top: -6px; right: -6px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #15122b; background: var(--mr-verde, #1f7a5a); }
html body.hp-sitio .pe-f2 { left: calc(50% - 20px); }
html body.hp-sitio .pe-f2::after { background: #e0a019; }
html body.hp-sitio .pe-f1 { left: calc(83.3% - 20px); }
html body.hp-sitio .pe-f3 { left: calc(33% - 20px); color: #3aa7b8; }
html body.hp-sitio .pe-f3::after { background: var(--mr-rojo, #b42318); }
html body.hp-sitio .pe-semaforo .pe-barra { display: flex; gap: 2px; height: 14px; border-radius: 99px; overflow: hidden; background: rgba(255, 255, 255, .1); }
html body.hp-sitio .pe-semaforo .pe-barra > span { flex: 0 0 var(--v); }
/* Colores del semáforo (los mismos de portada.css, por si esa hoja no está) */
html body.hp-sitio .pe-congresos .pl-aprobada { background: #2c9a72; }
html body.hp-sitio .pe-congresos .pl-dictaminada { background: #4f7fd9; }
html body.hp-sitio .pe-congresos .pl-tramite { background: #6f9bd6; }
html body.hp-sitio .pe-congresos .pl-ambar { background: #e0a019; }
html body.hp-sitio .pe-congresos .pl-congeladora { background: #d8483a; }
html body.hp-sitio .pe-congresos .pl-cerrada { background: #9b95a3; }
html body.hp-sitio .pe-congresos .pl-punto { width: .65rem; height: .65rem; border-radius: 3px; flex: none; }
html body.hp-sitio .pe-semaforo-leyenda { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .75rem; color: var(--pe-tenue); }
html body.hp-sitio .pe-semaforo-leyenda li { display: inline-flex; align-items: center; gap: 5px; }
html body.hp-sitio .pe-semaforo-leyenda strong { color: #fff; }
html body.hp-sitio .pe-congresos.pe-activa .pe-f1 { animation: pe-avanzar1 3.2s cubic-bezier(.5, 0, .3, 1) .4s both; }
html body.hp-sitio .pe-congresos.pe-activa .pe-f2 { animation: pe-avanzar2 2.6s cubic-bezier(.5, 0, .3, 1) 1s both; }
html body.hp-sitio .pe-congresos.pe-activa .pe-f3 { animation: pe-congelar 2.4s ease 1.6s both; }
html body.hp-sitio .pe-congresos.pe-activa .pe-barra > span { animation: pe-crecer-ancho 1.4s cubic-bezier(.2, .7, .2, 1) .3s both; }
@keyframes pe-avanzar1 { 0% { left: calc(16.6% - 20px); opacity: 0; } 12% { opacity: 1; } 50% { left: calc(50% - 20px); } 100% { left: calc(83.3% - 20px); } }
@keyframes pe-avanzar2 { 0% { left: calc(16.6% - 20px); opacity: 0; } 20% { opacity: 1; } 100% { left: calc(50% - 20px); } }
@keyframes pe-congelar { 0% { left: calc(16.6% - 20px); opacity: 0; } 25% { opacity: 1; } 60% { left: calc(33% - 20px); transform: none; } 75% { transform: rotate(-8deg); } 90% { transform: rotate(5deg); } 100% { left: calc(33% - 20px); transform: none; } }
@keyframes pe-crecer-ancho { from { flex-basis: 0; } }

/* --- Directorio político: lo que dice y lo que hace --- */
html body.hp-sitio .pe-cotejo { position: relative; width: min(100%, 22rem); height: 180px; }
html body.hp-sitio .pe-persona {
  position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%;
  display: grid; place-items: center; font-size: 2rem; color: #2a1d56; background: linear-gradient(160deg, #efe6ff, #d2c0ff);
  box-shadow: 0 0 0 6px rgba(210, 192, 255, .18);
}
html body.hp-sitio .pe-globo, html body.hp-sitio .pe-coincide {
  position: absolute; display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 12px;
  font-size: .8rem; font-weight: 800; white-space: nowrap; box-shadow: 0 10px 22px -14px rgba(0, 0, 0, .9);
}
html body.hp-sitio .pe-dice { left: 0; top: 8px; background: #fbf9fe; color: #2a1d56; }
html body.hp-sitio .pe-hace { right: 0; top: 8px; background: #e7f6f8; color: #135e6b; }
html body.hp-sitio .pe-coincide { left: 50%; bottom: 0; transform: translateX(-50%); background: color-mix(in srgb, var(--pe-c) 26%, #15122b); color: #fff; border: 1px solid var(--pe-c); }
html body.hp-sitio .pe-perfiles.pe-activa .pe-persona { animation: pe-aparecer .6s cubic-bezier(.2, .9, .3, 1.4) both; }
html body.hp-sitio .pe-perfiles.pe-activa .pe-dice { animation: pe-globo-izq .55s ease .6s both; }
html body.hp-sitio .pe-perfiles.pe-activa .pe-hace { animation: pe-globo-der .55s ease 1.3s both; }
html body.hp-sitio .pe-perfiles.pe-activa .pe-coincide { animation: pe-subir-centro .55s ease 2.1s both, pe-latir 1.8s ease-in-out 2.8s infinite; }
@keyframes pe-globo-izq { from { opacity: 0; transform: translate(30px, 20px) scale(.6); } }
@keyframes pe-globo-der { from { opacity: 0; transform: translate(-30px, 20px) scale(.6); } }
@keyframes pe-subir-centro { from { opacity: 0; transform: translate(-50%, 14px); } }
@keyframes pe-latir { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--pe-c) 22%, transparent); } }

/* --- Prensa: tres notas en abanico con su calificación y su sello --- */
html body.hp-sitio .pe-abanico { position: relative; width: min(100%, 20rem); height: 170px; }
html body.hp-sitio .pe-periodico {
  position: absolute; left: 50%; top: 10px; width: 150px; height: 128px; margin-left: -75px; padding: 30px 12px 12px; border-radius: 10px;
  display: flex; flex-direction: column; gap: 8px; background: #fbf9fe; box-shadow: 0 14px 28px -16px rgba(0, 0, 0, .9);
}
html body.hp-sitio .pe-periodico::before { content: ""; position: absolute; left: 12px; right: 12px; top: 12px; height: 9px; border-radius: 3px; background: #c9c1d8; }
html body.hp-sitio .pe-p1 { transform: translateX(-78px) rotate(-9deg); }
html body.hp-sitio .pe-p3 { transform: translateX(78px) rotate(9deg); }
html body.hp-sitio .pe-p1, html body.hp-sitio .pe-p3 { z-index: 2; }
html body.hp-sitio .pe-p2 { z-index: 1; top: 0; }
html body.hp-sitio .pe-nota-cal { position: absolute; right: 10px; bottom: 10px; min-width: 2.4rem; padding: 3px 7px; border-radius: 99px; text-align: center; color: #fff; font-size: .85rem; }
html body.hp-sitio .pe-bien { background: #1f7a5a; }
html body.hp-sitio .pe-medio { background: #a15c07; }
html body.hp-sitio .pe-mal { background: #b42318; }
html body.hp-sitio .pe-sello {
  position: absolute; left: 10px; bottom: 10px; padding: 2px 7px; border: 2px solid currentColor; border-radius: 6px;
  font-style: normal; font-size: .68rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; transform: rotate(-8deg);
}
html body.hp-sitio .pe-sello-bien { color: #1f7a5a; }
html body.hp-sitio .pe-sello-mal { color: #b42318; }
html body.hp-sitio .pe-boletin { position: absolute; left: 12px; bottom: 8px; display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; color: var(--pe-c); }
html body.hp-sitio .pe-prensa .pe-dato { position: absolute; right: 12px; bottom: 6px; }
html body.hp-sitio .pe-prensa.pe-activa .pe-p1 { animation: pe-abrir-izq .7s cubic-bezier(.2, .8, .3, 1.2) .2s both; }
html body.hp-sitio .pe-prensa.pe-activa .pe-p3 { animation: pe-abrir-der .7s cubic-bezier(.2, .8, .3, 1.2) .35s both; }
html body.hp-sitio .pe-prensa.pe-activa .pe-p2 { animation: pe-subir .5s ease both; }
html body.hp-sitio .pe-prensa.pe-activa .pe-nota-cal { animation: pe-aparecer .45s cubic-bezier(.2, .9, .3, 1.5) 1.1s both; }
html body.hp-sitio .pe-prensa.pe-activa .pe-sello { animation: pe-sellar .4s ease-in 1.8s both; }
html body.hp-sitio .pe-prensa.pe-activa .pe-boletin { animation: pe-subir .5s ease 2.4s both; }
@keyframes pe-abrir-izq { from { transform: none; } }
@keyframes pe-abrir-der { from { transform: none; } }
@keyframes pe-sellar { from { opacity: 0; transform: rotate(-8deg) scale(2.2); } }

/* --- Sociedad civil: banderas de la comunidad que se van uniendo en un mismo tejido --- */
html body.hp-sitio .pe-tejido { position: relative; width: 210px; height: 210px; }
html body.hp-sitio .pe-tejido::before {
  content: ""; position: absolute; inset: 22px; border-radius: 50%;
  border: 2px dashed color-mix(in srgb, var(--pe-c) 55%, transparent);
}
html body.hp-sitio .pe-centro {
  position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.6rem; color: #2a1d56; background: linear-gradient(160deg, #fff, #ffe3f1);
}
html body.hp-sitio .pe-bandera {
  --a: calc(var(--i) * 45deg);
  position: absolute; left: 50%; top: 50%; display: inline-flex; padding: 3px; border-radius: 6px; background: rgba(255, 255, 255, .9);
  transform: translate(-50%, -50%) rotate(var(--a)) translateY(-84px) rotate(calc(-1 * var(--a)));
}
html body.hp-sitio .pe-bandera > * { border-radius: 3px; }
html body.hp-sitio .pe-comunidad.pe-activa .pe-bandera { animation: pe-unirse .9s cubic-bezier(.2, .8, .3, 1.15) calc(.15s + var(--i) * .16s) both; }
html body.hp-sitio .pe-comunidad.pe-activa .pe-tejido::before { animation: pe-girar 24s linear infinite; }
html body.hp-sitio .pe-comunidad.pe-activa .pe-centro { animation: pe-aparecer .6s cubic-bezier(.2, .9, .3, 1.4) 1.4s both, pe-latir 2.2s ease-in-out 2.2s infinite; }
@keyframes pe-unirse { from { opacity: 0; transform: translate(-50%, -50%) rotate(var(--a)) translateY(-150px) rotate(calc(-1 * var(--a))) scale(.5); } }
@keyframes pe-girar { to { transform: rotate(360deg); } }

/* --- Memorial (la única escena solemne): velas que se encienden una a una --- */
html body.hp-sitio .pe-memorial .pe-escena, html body.hp-sitio .pe-escena.pe-memorial {
  background: radial-gradient(70% 70% at 50% 85%, rgba(246, 220, 174, .2), transparent 70%), rgba(9, 6, 22, .62);
}
html body.hp-sitio .pe-velas { display: flex; align-items: flex-end; gap: 22px; height: 150px; padding-bottom: 6px; }
html body.hp-sitio .pe-vela {
  position: relative; width: 22px; height: var(--h); border-radius: 4px 4px 3px 3px;
  background: linear-gradient(90deg, #efe3cc, #fbf6ec 45%, #e3d4b8);
}
html body.hp-sitio .pe-vela::before { content: ""; position: absolute; left: 50%; top: -7px; width: 2px; height: 8px; margin-left: -1px; background: #3b2f25; }
html body.hp-sitio .pe-flama {
  position: absolute; left: 50%; top: -30px; width: 14px; height: 24px; margin-left: -7px;
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  background: radial-gradient(circle at 50% 70%, #fff8e0 0 22%, #ffd59a 45%, rgba(233, 184, 102, .85) 70%, transparent 72%);
  box-shadow: 0 0 22px 8px rgba(246, 200, 120, .35);
}
html body.hp-sitio .pe-memorial.pe-activa .pe-flama { animation: pe-encender .7s ease calc(.3s + var(--i) * .35s) both, pe-titilar 2.4s ease-in-out calc(1s + var(--i) * .35s) infinite; transform-origin: 50% 90%; }
@keyframes pe-encender { from { opacity: 0; transform: scale(.2); } }
@keyframes pe-titilar { 0%, 100% { transform: scale(1) rotate(0); } 30% { transform: scale(1.04, .96) rotate(-2deg); } 60% { transform: scale(.97, 1.05) rotate(2deg); } }

/* --- Datos abiertos: columnas reales de los últimos años y lo que puedes descargar --- */
html body.hp-sitio .pe-datos .pe-arte { grid-template-rows: 1fr auto; padding: 14px 14px 12px; gap: 12px; place-items: stretch; }
html body.hp-sitio .pe-grafica { display: flex; align-items: flex-end; gap: 8px; min-height: 120px; padding-bottom: 18px; border-bottom: 1px solid rgba(255, 255, 255, .2); }
html body.hp-sitio .pe-columna {
  position: relative; flex: 1 1 0; height: var(--v); min-height: 6px; border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--pe-c), color-mix(in srgb, var(--pe-c2) 70%, transparent));
  transform-origin: bottom;
}
html body.hp-sitio .pe-columna small { position: absolute; left: 50%; bottom: -18px; transform: translateX(-50%); font-size: .66rem; color: var(--pe-tenue); }
html body.hp-sitio .pe-archivos { display: flex; flex-wrap: wrap; gap: 8px; }
html body.hp-sitio .pe-archivos span {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 9px; font-size: .78rem; font-weight: 800;
  color: #15122b; background: color-mix(in srgb, var(--pe-c) 70%, #fff);
}
html body.hp-sitio .pe-datos.pe-activa .pe-columna { animation: pe-crecer .9s cubic-bezier(.2, .7, .2, 1) both; }
html body.hp-sitio .pe-datos.pe-activa .pe-columna:nth-child(2) { animation-delay: .08s; }
html body.hp-sitio .pe-datos.pe-activa .pe-columna:nth-child(3) { animation-delay: .16s; }
html body.hp-sitio .pe-datos.pe-activa .pe-columna:nth-child(4) { animation-delay: .24s; }
html body.hp-sitio .pe-datos.pe-activa .pe-columna:nth-child(5) { animation-delay: .32s; }
html body.hp-sitio .pe-datos.pe-activa .pe-columna:nth-child(6) { animation-delay: .4s; }
html body.hp-sitio .pe-datos.pe-activa .pe-columna:nth-child(7) { animation-delay: .48s; }
html body.hp-sitio .pe-datos.pe-activa .pe-columna:nth-child(8) { animation-delay: .56s; }
html body.hp-sitio .pe-datos.pe-activa .pe-archivos span { animation: pe-subir .45s ease both; }
html body.hp-sitio .pe-datos.pe-activa .pe-archivos span:nth-child(1) { animation-delay: 1.1s; }
html body.hp-sitio .pe-datos.pe-activa .pe-archivos span:nth-child(2) { animation-delay: 1.35s; }
html body.hp-sitio .pe-datos.pe-activa .pe-archivos span:nth-child(3) { animation-delay: 1.6s; }
@keyframes pe-crecer { from { transform: scaleY(0); } }

@keyframes pe-subir { from { opacity: 0; transform: translateY(10px); } }

/* Turing y la escena del Directorio en el celular: más compactas */
@media (max-width: 575.98px) {
  html body.hp-sitio .pe-arte { min-height: 190px; }
  html body.hp-sitio .pe-turing .pe-arte { gap: 10px; padding: 10px; }
  html body.hp-sitio .pe-turing-logo { width: 3.4rem; height: 3.4rem; }
  html body.hp-sitio .pe-sugerencia { font-size: .72rem; }
  html body.hp-sitio .pe-frase { font-size: .9rem; }
  html body.hp-sitio .pe-turing-logo img { width: 2.4rem !important; height: 2.4rem !important; }
  html body.hp-sitio .pe-anillo { width: 3.8rem; height: 3.8rem; }
  html body.hp-sitio .pe-tejido { transform: scale(.84); }
  html body.hp-sitio .pe-abanico { transform: scale(.86); }
  html body.hp-sitio .pe-periodico { width: 136px; margin-left: -68px; }
  html body.hp-sitio .pe-p1 { transform: translateX(-64px) rotate(-9deg); }
  html body.hp-sitio .pe-p3 { transform: translateX(64px) rotate(9deg); }
}

/* «Reducir movimiento»: todo quieto, en su estado final; el cambio de escena es inmediato. */
@media (prefers-reduced-motion: reduce) {
  html body.hp-sitio .pe-presentacion *, html body.hp-sitio .pe-presentacion *::before, html body.hp-sitio .pe-presentacion *::after { animation: none !important; transition: none !important; }
  html body.hp-sitio .pe-escaner { display: none; }
}

/* Celulares bajitos (740 px o menos de alto): mapa y arte más bajos para que el botón de la escena quede lo más arriba posible. */
@media (max-width: 575.98px) and (max-height: 760px) {
  html body.hp-sitio .pe-presentacion .linea-mapa { height: 140px; }
  html body.hp-sitio .pe-arte { min-height: 160px; }
  html body.hp-sitio .pe-tarjeta h1 { font-size: 1.6rem; }
  html body.hp-sitio .pe-tarjeta .portada-lead { font-size: .88rem; }
  html body.hp-sitio .pe-chip { display: none; }
}
