/* Alerta 360 Boyacá · Presentación v3 "Motion" (ESAP – UNODC) */
:root {
  --noche: #050f1f;
  --noche-2: #0a1d38;
  --azul-900: #0b2545;
  --azul-700: #1f5596;
  --azul-500: #2f7bd0;
  --azul-300: #7db8f2;
  --cian: #4cc9f0;
  --naranja: #f07a28;
  --naranja-2: #ffb36b;
  --ambar: #fbbf24;
  --verde: #34d399;
  --texto: #eef4ff;
  --texto-2: #b2c6e2;
  --texto-3: #7690b3;
  --tarjeta: rgba(255, 255, 255, 0.055);
  --tarjeta-borde: rgba(255, 255, 255, 0.11);
  --entrada: cubic-bezier(0.16, 1, 0.3, 1);
  --salida: cubic-bezier(0.7, 0, 0.84, 0);
  --estandar: cubic-bezier(0.4, 0, 0.2, 1);
  --barra: 68px;
  --pie: 52px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  background: radial-gradient(1200px 700px at 78% 18%, #12305a 0%, transparent 60%),
    radial-gradient(900px 600px at 10% 90%, #1a2d4f 0%, transparent 60%), var(--noche);
  color: var(--texto);
  font-family: 'Outfit', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: clamp(14px, 0.95vw, 19px);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }
svg { display: block; }
.num { font-variant-numeric: tabular-nums; }

#fondo { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* ---------- Barra superior ---------- */
.barra {
  position: fixed; inset: 0 0 auto 0; height: var(--barra); z-index: 20;
  display: flex; align-items: center; gap: 24px; padding: 0 28px;
  background: linear-gradient(180deg, rgba(5, 15, 31, 0.92), rgba(5, 15, 31, 0.55));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.marca { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.marca img { height: 34px; width: auto; }
.marca-sep { width: 1px; height: 30px; background: rgba(255, 255, 255, 0.2); }
.marca-txt { display: flex; flex-direction: column; line-height: 1.15; }
.marca-txt strong { font-size: 1.02rem; font-weight: 700; letter-spacing: 0.01em; }
.marca-txt span { font-size: 0.74rem; color: var(--texto-3); }

.pasos { position: relative; flex: 1; display: flex; justify-content: space-between; max-width: 860px; margin: 0 auto; }
.pasos-linea { position: absolute; left: 22px; right: 22px; top: 17px; height: 2px; background: rgba(255, 255, 255, 0.1); border-radius: 2px; }
.pasos-linea span { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--azul-500), var(--naranja)); border-radius: 2px; transition: width 0.7s var(--entrada); box-shadow: 0 0 12px rgba(240, 122, 40, 0.6); }
.paso { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0; padding: 0 4px; }
.paso b {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--noche-2); border: 2px solid rgba(255, 255, 255, 0.16); font-size: 0.9rem;
  transition: background 0.35s var(--estandar), border-color 0.35s var(--estandar), transform 0.35s var(--entrada), box-shadow 0.35s;
}
.paso span { font-size: 0.72rem; color: var(--texto-3); white-space: nowrap; transition: color 0.3s; }
.paso:hover b { border-color: var(--azul-300); }
.paso.hecho b { background: var(--azul-700); border-color: var(--azul-500); }
.paso.actual b { background: var(--naranja); border-color: var(--naranja-2); transform: scale(1.14); box-shadow: 0 0 0 6px rgba(240, 122, 40, 0.18), 0 0 24px rgba(240, 122, 40, 0.55); }
.paso.actual span { color: var(--texto); font-weight: 600; }

.acciones { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.chip-consulta {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  background: rgba(76, 201, 240, 0.09); border: 1px solid rgba(76, 201, 240, 0.28); font-size: 0.8rem; color: var(--texto-2);
}
.chip-consulta i { width: 8px; height: 8px; border-radius: 50%; background: var(--verde); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); animation: latido-punto 2s infinite; }
.icono { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--tarjeta); border: 1px solid var(--tarjeta-borde); transition: background 0.2s, border-color 0.2s; }
.icono:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--azul-300); }
.icono svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#btnAuto svg { fill: currentColor; stroke: none; }
#btnAuto[aria-pressed='true'] { background: var(--naranja); border-color: var(--naranja-2); }

/* ---------- Escenario y vistas ---------- */
.escenario { position: fixed; inset: var(--barra) 0 var(--pie) 0; z-index: 2; }
.vista {
  position: absolute; inset: 0; padding: 2.2vh 3.2vw 1.6vh; display: flex; flex-direction: column; gap: 2vh;
  visibility: hidden; opacity: 0; overflow: hidden;
}
.vista.activa { visibility: visible; opacity: 1; }
.vista.sale { visibility: visible; animation: vista-sale 0.55s var(--salida) forwards; }

/* Entradas escalonadas: .a con --d (índice) */
.vista .a { opacity: 0; transform: translateY(26px) scale(0.985); filter: blur(6px); }
.vista.activa .a {
  animation: entra 0.9s var(--entrada) forwards;
  animation-delay: calc(var(--d, 0) * 90ms + 120ms);
}

@keyframes entra { to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes vista-sale { to { opacity: 0; transform: scale(0.965); filter: blur(8px); } }

.cabeza { max-width: 1180px; }
.cabeza-fila { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.sobre { display: inline-block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--naranja-2); }
.cabeza h2 { margin: 0.35em 0 0.2em; font-size: clamp(1.7rem, 2.5vw, 3rem); line-height: 1.08; font-weight: 700; letter-spacing: -0.01em; }
.cabeza p { margin: 0; font-size: 1.08rem; line-height: 1.5; color: var(--texto-2); max-width: 980px; }

.tarjeta {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--tarjeta-borde); border-radius: 18px; padding: 18px 20px;
  box-shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.7);
}
.tarjeta h3 { margin: 0 0 12px; font-size: 0.98rem; font-weight: 600; color: var(--texto); }
.etq { display: block; font-size: 0.78rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--texto-3); }
.nota { font-size: 0.8rem; color: var(--texto-3); }

.boton {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border-radius: 12px; border: 0;
  background: linear-gradient(135deg, var(--naranja), #e2551b); font-weight: 600; color: #fff;
  box-shadow: 0 10px 30px -10px rgba(240, 122, 40, 0.8); transition: transform 0.2s var(--entrada), box-shadow 0.2s;
}
.boton { transition: translate 0.2s var(--entrada), scale 0.15s var(--entrada), box-shadow 0.2s; }
.boton:hover { translate: 0 -2px; box-shadow: 0 16px 36px -10px rgba(240, 122, 40, 0.9); }
.boton:active { scale: 0.97; }
.boton svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.25s var(--entrada); }
.boton:hover svg { transform: translateX(4px); }
.boton-grande { padding: 16px 30px; font-size: 1.1rem; }
.boton-fantasma { background: transparent; border: 1px solid rgba(255, 255, 255, 0.25); box-shadow: none; }
.latido { animation: latido 2.4s infinite; }
@keyframes latido { 0%, 100% { box-shadow: 0 0 0 0 rgba(240, 122, 40, 0.55), 0 10px 30px -10px rgba(240, 122, 40, 0.8); } 60% { box-shadow: 0 0 0 16px rgba(240, 122, 40, 0), 0 10px 30px -10px rgba(240, 122, 40, 0.8); } }
@keyframes latido-punto { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); } 70%, 100% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.04);
  font-size: 0.86rem; color: var(--texto-2);
  transition: background 0.25s var(--estandar), border-color 0.25s, color 0.25s, transform 0.25s var(--entrada), opacity 0.3s;
}
.chip:hover { border-color: var(--azul-300); color: var(--texto); }
.chip.activo { background: var(--azul-700); border-color: var(--azul-300); color: #fff; box-shadow: 0 0 0 4px rgba(47, 123, 208, 0.22); }
.chip.apagado { opacity: 0.28; pointer-events: none; transform: scale(0.94); }
.capas { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Portada ---------- */
.portada { flex-direction: row; align-items: center; justify-content: center; gap: 4vw; padding: 0 5vw; }
.portada-mapa { flex: 0 0 auto; width: min(44vw, 72vh); height: min(62vh, 72vh); }
.portada-mapa svg, .cierre-mapa svg { width: 100%; height: 100%; overflow: visible; }
.portada-txt { max-width: 640px; }
.portada h1 { margin: 0.2em 0 0.25em; font-size: clamp(3rem, 6.4vw, 7.4rem); line-height: 0.92; font-weight: 800; letter-spacing: -0.03em; }
.portada h1 em, .cierre h2 em { font-style: normal; background: linear-gradient(120deg, var(--naranja-2), var(--naranja) 50%, var(--ambar)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.portada p { font-size: 1.22rem; line-height: 1.55; color: var(--texto-2); margin: 0 0 1.6em; }
.portada p strong { color: var(--texto); }
.portada-cifras { display: flex; gap: 34px; margin-top: 2.4em; }
.portada-cifras b { display: block; font-size: 2.2rem; font-weight: 700; color: var(--texto); }
.portada-cifras span { font-size: 0.85rem; color: var(--texto-3); }

.mun { fill: rgba(47, 123, 208, 0.12); stroke: rgba(125, 184, 242, 0.55); stroke-width: 0.6; vector-effect: non-scaling-stroke; }
.trazo { fill: rgba(47, 123, 208, 0); stroke: var(--azul-300); stroke-width: 1.3; stroke-dasharray: 1; stroke-dashoffset: 1; stroke-linejoin: round; }
.contorno-dep { fill: none; stroke: var(--naranja-2); stroke-width: 2; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 6px rgba(240, 122, 40, 0.8)); }

/* ---------- Paso 1 ---------- */
.p1-rejilla { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.05fr 1fr; gap: 2vw; }
.p1-alertas { display: flex; flex-direction: column; gap: 1.4vh; }
.alerta-card {
  position: relative; flex: 1; display: flex; gap: 18px; align-items: center; text-align: left; padding: 16px 22px;
  border-radius: 18px; border: 1px solid var(--tarjeta-borde);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  transition: border-color 0.3s, background 0.3s, transform 0.35s var(--entrada), box-shadow 0.35s;
  overflow: hidden;
}
.alerta-card::after { content: ''; position: absolute; inset: 0; background: radial-gradient(600px 160px at 0% 50%, rgba(240, 122, 40, 0.22), transparent 70%); opacity: 0; transition: opacity 0.4s; }
.alerta-card { transition: border-color 0.3s, background 0.3s, translate 0.35s var(--entrada), box-shadow 0.35s; }
.alerta-card:hover { translate: 6px 0; border-color: rgba(125, 184, 242, 0.5); }
.alerta-card.activa { border-color: var(--naranja); box-shadow: 0 0 0 1px var(--naranja), 0 20px 50px -20px rgba(240, 122, 40, 0.6); }
.alerta-card.activa::after { opacity: 1; }
.alerta-ico { position: relative; z-index: 1; flex: 0 0 auto; width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; background: rgba(47, 123, 208, 0.2); border: 1px solid rgba(125, 184, 242, 0.3); transition: background 0.3s; }
.alerta-card.activa .alerta-ico { background: rgba(240, 122, 40, 0.22); border-color: rgba(255, 179, 107, 0.5); }
.alerta-ico svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.alerta-cuerpo { position: relative; z-index: 1; }
.alerta-cuerpo small { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; color: var(--naranja-2); text-transform: uppercase; }
.alerta-cuerpo strong { display: block; font-size: 1.22rem; margin: 2px 0 4px; }
.alerta-cuerpo span { font-size: 0.92rem; color: var(--texto-2); line-height: 1.4; }
.alerta-marca { position: absolute; right: 18px; top: 16px; z-index: 1; width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.25); display: grid; place-items: center; transition: background 0.3s, border-color 0.3s, transform 0.4s var(--entrada); }
.alerta-card.activa .alerta-marca { background: var(--naranja); border-color: var(--naranja); transform: scale(1.1); }
.alerta-marca svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 3; opacity: 0; transition: opacity 0.2s; }
.alerta-card.activa .alerta-marca svg { opacity: 1; }

.p1-variables { display: flex; flex-direction: column; gap: 1.6vh; min-height: 0; }
.p1-grupo h3 { font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--texto-3); font-weight: 600; margin-bottom: 10px; }
.p1-grupo-mapa { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.p1-mun-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.p1-mun-cab h3 { margin: 0; }
.p1-minimapa { flex: 1; min-height: 120px; margin-top: 8px; }
.p1-minimapa svg { width: 100%; height: 100%; }
.p1-minimapa .mun { cursor: pointer; transition: fill 0.25s, stroke 0.25s; }
.p1-minimapa .mun:hover { fill: rgba(125, 184, 242, 0.45); }
.p1-minimapa .mun.sel { fill: var(--naranja); stroke: var(--naranja-2); }
.p1-minimapa.todo .mun { fill: rgba(47, 123, 208, 0.32); }
.p1-mun-nombre { margin: 6px 0 0; text-align: center; font-size: 0.9rem; color: var(--texto-2); }

.p1-pie { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.resumen { display: flex; flex-wrap: wrap; gap: 10px; }
.resumen span { padding: 9px 16px; border-radius: 12px; background: rgba(76, 201, 240, 0.08); border: 1px dashed rgba(76, 201, 240, 0.35); font-size: 0.92rem; animation: entra 0.5s var(--entrada) both; }
.resumen span b { color: var(--cian); font-weight: 600; margin-right: 6px; }

/* ---------- Paso 2 ---------- */
.p2-flujo { display: grid; grid-template-columns: 220px 1fr 220px; align-items: center; gap: 1vw; }
.nodo { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; transition: transform 0.4s var(--entrada); }
.nodo-icono {
  width: clamp(72px, 12vh, 118px); height: clamp(72px, 12vh, 118px); border-radius: 26%; display: grid; place-items: center; margin-bottom: 4px;
  background: radial-gradient(circle at 30% 25%, rgba(125, 184, 242, 0.35), rgba(31, 85, 150, 0.35));
  border: 1px solid rgba(125, 184, 242, 0.45); box-shadow: 0 0 0 0 rgba(76, 201, 240, 0.5);
  transition: box-shadow 0.4s, transform 0.4s var(--entrada);
}
.nodo-fuente .nodo-icono { background: radial-gradient(circle at 30% 25%, rgba(255, 179, 107, 0.4), rgba(240, 122, 40, 0.25)); border-color: rgba(255, 179, 107, 0.55); }
.nodo-icono svg { width: 50%; height: 50%; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nodo strong { font-size: 1.1rem; }
.nodo span { font-size: 0.84rem; color: var(--texto-3); }
.nodo.brilla .nodo-icono { transform: scale(1.06); box-shadow: 0 0 0 14px rgba(76, 201, 240, 0.08), 0 0 60px rgba(76, 201, 240, 0.45); }
.nodo-fuente.brilla .nodo-icono { box-shadow: 0 0 0 14px rgba(240, 122, 40, 0.08), 0 0 60px rgba(240, 122, 40, 0.5); }

.p2-canal { position: relative; height: 100%; min-height: clamp(130px, 22vh, 220px); }
.p2-canal svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.p2-canal path { fill: none; stroke: rgba(125, 184, 242, 0.22); stroke-width: 2; stroke-dasharray: 6 8; vector-effect: non-scaling-stroke; }
.p2-canal .paquete { position: absolute; left: 0; top: 0; pointer-events: none; }
.p2-canal .dato { width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: var(--naranja-2); box-shadow: 0 0 10px var(--naranja); }
.p2-filtros { position: absolute; left: 0; top: 0; display: flex; gap: 6px; transform: translate(-50%, -50%); opacity: 0; pointer-events: none; }
.p2-filtros span { padding: 6px 12px; border-radius: 999px; background: var(--azul-700); border: 1px solid var(--azul-300); font-size: 0.8rem; white-space: nowrap; box-shadow: 0 0 22px rgba(47, 123, 208, 0.7); }
.p2-etq { position: absolute; left: 50%; transform: translateX(-50%); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--texto-3); }
.p2-etq-ida { top: 2%; }
.p2-etq-vuelta { bottom: 2%; }

.p2-abajo { flex: 1; min-height: 0; display: grid; grid-template-columns: 0.75fr 1.6fr; gap: 2vw; }
.p2-contador { display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.p2-contador b { font-size: clamp(2.2rem, min(4.4vw, 8vh), 5rem); font-weight: 700; line-height: 1; background: linear-gradient(120deg, #fff, var(--azul-300)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.barra-prog { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.barra-prog span { display: block; height: 100%; width: 0; border-radius: 8px; background: linear-gradient(90deg, var(--azul-500), var(--cian)); box-shadow: 0 0 14px var(--cian); }
.p2-embudo { display: flex; flex-direction: column; }
.embudo { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: clamp(6px, 1.2vh, 12px); }
.embudo-fila { display: grid; grid-template-columns: 1fr 140px; align-items: center; gap: 16px; opacity: 0; transform: translateX(-20px); transition: opacity 0.5s var(--entrada), transform 0.6s var(--entrada); }
.embudo-fila.ver { opacity: 1; transform: none; }
.embudo-barra { position: relative; height: clamp(30px, 5vh, 46px); border-radius: 12px; background: rgba(255, 255, 255, 0.05); overflow: hidden; }
.embudo-barra span { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 12px; background: linear-gradient(90deg, rgba(47, 123, 208, 0.9), rgba(76, 201, 240, 0.85)); transition: width 1.1s var(--entrada); }
.embudo-fila:last-child .embudo-barra span { background: linear-gradient(90deg, #e2551b, var(--naranja-2)); }
.embudo-barra em { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 0.92rem; font-weight: 500; white-space: nowrap; }
.embudo-fila b { font-size: 1.5rem; text-align: right; font-weight: 700; }
.listo { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: var(--verde); font-weight: 600; opacity: 0; transform: translateY(8px); transition: opacity 0.5s, transform 0.5s var(--entrada); }
.listo.ver { opacity: 1; transform: none; }
.listo svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; }
.listo.ver svg { animation: dibuja 0.6s 0.2s var(--entrada) forwards; }
@keyframes dibuja { to { stroke-dashoffset: 0; } }

/* ---------- Paso 3 ---------- */
.p3-rejilla { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.9fr 1fr; gap: 2vw; }
.p3-grafico { display: flex; flex-direction: column; min-height: 0; }
.p3-grafico svg { flex: 1; min-height: 0; width: 100%; }
.p3-leyenda { display: flex; gap: 22px; font-size: 0.86rem; color: var(--texto-2); margin-bottom: 4px; }
.p3-leyenda span { display: inline-flex; align-items: center; gap: 8px; }
.p3-leyenda em { font-style: normal; }
.pt { width: 11px; height: 11px; border-radius: 50%; background: var(--azul-300); }
.pt-alerta { background: var(--naranja); box-shadow: 0 0 8px var(--naranja); }
#p3Svg .punto { fill: var(--azul-300); opacity: 0.85; transition: transform 0.9s var(--entrada), fill 0.4s, opacity 0.4s; }
#p3Svg .punto.alerta { fill: var(--naranja); opacity: 1; }
#p3Svg .punto.tenue { opacity: 0.35; }
#p3Svg .eje line { stroke: rgba(255, 255, 255, 0.14); }
#p3Svg .eje text { fill: var(--texto-3); font-size: 13px; font-family: inherit; }
#p3Svg .eje .titulo { fill: var(--texto-2); font-size: 14px; }
#p3Svg .umbral line { stroke: var(--ambar); stroke-width: 2.5; stroke-dasharray: 7 6; }
#p3Svg .umbral rect { fill: var(--ambar); }
#p3Svg .umbral text { fill: #2a1a00; font-size: 14px; font-weight: 700; font-family: inherit; }
#p3Svg .p3-cuentas { opacity: 0; transition: opacity 0.6s var(--estandar) 1.2s; }
#p3Svg .p3-cuentas.ver { opacity: 1; }
#p3Svg .p3-cuenta { fill: var(--texto-2); font-size: 12px; font-weight: 600; font-family: inherit; }
.chip small { font-size: 0.72em; opacity: 0.75; }
.p5-top .top-nom .nota { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#p3Svg .zona { fill: url(#p3Zona); opacity: 0; transition: opacity 0.8s; }
#p3Svg .zona.ver { opacity: 1; }
#p3Svg .halo { fill: none; stroke: var(--naranja); stroke-width: 2; animation: halo 1.8s infinite var(--entrada); transform-box: fill-box; transform-origin: center; }
@keyframes halo { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(3.6); opacity: 0; } }

.p3-lado { display: flex; flex-direction: column; gap: 1.4vh; min-height: 0; }
.p3-paso { display: flex; gap: 14px; align-items: flex-start; transition: border-color 0.4s, background 0.4s, transform 0.4s var(--entrada); }
.p3-paso b { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.08); font-size: 0.95rem; transition: background 0.4s; }
.p3-paso strong { display: block; font-size: 1.02rem; margin-bottom: 3px; }
.p3-paso span { font-size: 0.88rem; color: var(--texto-2); line-height: 1.4; }
.p3-paso { transition: border-color 0.4s, background 0.4s, translate 0.4s var(--entrada); }
.p3-paso.encendido { border-color: rgba(255, 179, 107, 0.6); background: linear-gradient(160deg, rgba(240, 122, 40, 0.16), rgba(255, 255, 255, 0.03)); translate: -6px 0; }
.p3-paso.encendido b { background: var(--naranja); }
.p3-total { flex: 1; display: flex; flex-direction: column; justify-content: center; text-align: center; border-color: rgba(240, 122, 40, 0.4); }
.p3-total b { font-size: clamp(3rem, 5vw, 5.6rem); line-height: 1; font-weight: 800; color: var(--naranja-2); text-shadow: 0 0 40px rgba(240, 122, 40, 0.55); margin: 6px 0; }

/* ---------- Paso 4 ---------- */
.p4-rejilla { flex: 1; min-height: 0; display: grid; grid-template-columns: 0.8fr 0.75fr 1.75fr; gap: 2vw; align-items: stretch; }
.p4-docs { display: flex; flex-direction: column; justify-content: center; gap: 1.3vh; }
.doc {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)); border: 1px solid var(--tarjeta-borde);
  opacity: 0; transform: translateX(-30px);
}
.doc.ver { animation: entra 0.7s var(--entrada) forwards; }
.doc-ico { flex: 0 0 auto; width: 42px; height: 50px; border-radius: 6px 14px 6px 6px; background: linear-gradient(160deg, #fff, #cfe2fb); position: relative; }
.doc-ico::before { content: ''; position: absolute; left: 8px; right: 8px; top: 14px; height: 3px; border-radius: 2px; background: var(--azul-500); box-shadow: 0 8px 0 rgba(47, 123, 208, 0.6), 0 16px 0 rgba(47, 123, 208, 0.4); }
.doc.datos .doc-ico { background: linear-gradient(160deg, #ffe2c7, #ffb36b); }
.doc.datos .doc-ico::before { background: #c2410c; box-shadow: 0 8px 0 rgba(194, 65, 12, 0.6), 0 16px 0 rgba(194, 65, 12, 0.4); }
.doc strong { display: block; font-size: 0.98rem; }
.doc span { font-size: 0.8rem; color: var(--texto-3); }

.p4-nucleo { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; }
.orbe { position: relative; width: min(19vw, 30vh); aspect-ratio: 1; display: grid; place-items: center; }
.orbe-centro {
  position: relative; z-index: 2; width: 46%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  font-size: 2.1rem; font-weight: 800; letter-spacing: 0.04em;
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #9fd2ff 18%, #2f7bd0 55%, #0b2545 100%);
  box-shadow: 0 0 50px rgba(76, 201, 240, 0.5), inset 0 0 30px rgba(255, 255, 255, 0.25);
  transition: box-shadow 0.6s, transform 0.6s var(--entrada);
}
.anillo { position: absolute; inset: 0; border-radius: 50%; border: 2px solid transparent; }
.anillo.r1 { border-top-color: var(--cian); border-right-color: rgba(76, 201, 240, 0.3); animation: gira 6s linear infinite; }
.anillo.r2 { inset: 9%; border-bottom-color: var(--naranja); border-left-color: rgba(240, 122, 40, 0.3); animation: gira 4.5s linear infinite reverse; }
.anillo.r3 { inset: 18%; border-top-color: var(--ambar); animation: gira 3.2s linear infinite; }
.orbe.activa .anillo.r1 { animation-duration: 1.6s; }
.orbe.activa .anillo.r2 { animation-duration: 1.2s; }
.orbe.activa .anillo.r3 { animation-duration: 0.9s; }
.orbe.activa .orbe-centro { transform: scale(1.08); box-shadow: 0 0 90px rgba(76, 201, 240, 0.85), 0 0 160px rgba(240, 122, 40, 0.35), inset 0 0 30px rgba(255, 255, 255, 0.35); }
.orbe.lista .orbe-centro { box-shadow: 0 0 60px rgba(52, 211, 153, 0.6), inset 0 0 30px rgba(255, 255, 255, 0.3); }
@keyframes gira { to { transform: rotate(360deg); } }
.p4-estado { margin: 0; min-height: 1.5em; font-size: 1.05rem; font-weight: 500; color: var(--texto); transition: opacity 0.25s; }
.p4-modelo { font-size: 0.78rem; color: var(--texto-3); padding: 5px 12px; border-radius: 999px; border: 1px solid var(--tarjeta-borde); }

.p4-concepto { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow: hidden; }
.p4-concepto-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sello { padding: 6px 12px; border-radius: 8px; background: rgba(52, 211, 153, 0.14); color: var(--verde); font-weight: 600; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; }
.p4-cuerpo {
  position: relative; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding-right: 6px; display: flex; flex-direction: column; gap: 1.3vh;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 22px), transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 22px), transparent 100%);
}
.ia-apoyo, .ia-sec, .ia-item { opacity: 0; transform: translateY(8px); transition: opacity 0.45s var(--estandar), transform 0.5s var(--entrada); }
.ia-apoyo.ver, .ia-sec.ver, .ia-item.ver { opacity: 1; transform: none; }
.ia-apoyo { padding: 9px 12px; border-radius: 10px; background: rgba(76, 201, 240, 0.1); border: 1px solid rgba(76, 201, 240, 0.28); font-size: 0.82rem; line-height: 1.45; color: var(--texto-2); }
.ia-apoyo b { color: var(--cian); }
.ia-sec h4 { margin: 0 0 0.6vh; font-size: 0.98rem; font-weight: 700; color: var(--texto); letter-spacing: 0.01em; display: flex; align-items: center; gap: 8px; }
.ia-sec h4::before { content: ''; width: 4px; height: 1em; border-radius: 2px; background: linear-gradient(var(--cian), var(--azul-500)); }
.ia-sec ul, .ia-sec ol { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 0.5vh; }
.ia-sec ul li::marker { color: var(--naranja); }
.ia-sec ol li::marker { color: var(--cian); font-weight: 700; }
.ia-sec p { margin: 0; }
.ia-item { font-size: 0.88rem; line-height: 1.5; color: var(--texto-2); }
.ia-item b { color: var(--texto); font-weight: 600; }
.ia-item i { color: #ffd2a8; }
.ia-pie { margin-top: 0.6vh !important; font-size: 0.84rem; color: var(--texto-3); }
.ia-item .caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; vertical-align: -0.15em; background: var(--cian); animation: parpadeo 0.8s steps(1) infinite; }
@keyframes parpadeo { 50% { opacity: 0; } }
.aviso { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 11px 14px; border-radius: 12px; background: rgba(251, 191, 36, 0.1); border: 1px solid rgba(251, 191, 36, 0.35); font-size: 0.86rem; color: #fde8b0; opacity: 0; transition: opacity 0.6s; }
.aviso.ver { opacity: 1; }
.aviso svg { flex: 0 0 auto; width: 22px; height: 22px; fill: none; stroke: var(--ambar); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }

/* ---------- Paso 5 ---------- */
.p5-rejilla { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.55fr 1fr; gap: 2vw; }
.p5-mapa-caja { position: relative; min-height: 0; border-radius: 22px; background: radial-gradient(circle at 50% 45%, rgba(31, 85, 150, 0.28), rgba(5, 15, 31, 0) 70%); perspective: 1400px; }
.p5-mapa-3d { position: absolute; inset: 0 0 34px; transform-style: preserve-3d; transform-origin: 50% 60%; }
.p5-mapa-3d.inclinado { transform: rotateX(48deg) rotateZ(-8deg) scale(0.82); }
.p5-mapa-3d.plano { transition: transform 1.8s var(--entrada); transform: rotateX(0) rotateZ(0) scale(1); }
#p5Mapa, #p5Mapa svg { width: 100%; height: 100%; }
#p5Mapa .mun {
  fill: #13284a; stroke: rgba(5, 15, 31, 0.9); stroke-width: 0.8; cursor: pointer;
  transform-box: fill-box; transform-origin: center; opacity: 0; transform: scale(0.3);
  transition: fill 0.6s var(--estandar), opacity 0.6s var(--entrada), transform 0.8s var(--entrada), stroke 0.2s;
  transition-delay: var(--retardo, 0ms);
}
#p5Mapa.ver .mun { opacity: 1; transform: scale(1); }
#p5Mapa.reinicio .mun { transition: none !important; }
#p5Mapa.listo .mun { transition-delay: 0ms; }
#p5Mapa .mun:hover { stroke: #fff; stroke-width: 2; }
#p5Mapa .mun.sel { stroke: #fff; stroke-width: 2.6; }
#p5Mapa .faro circle { fill: var(--naranja-2); }
#p5Mapa .faro .onda { fill: none; stroke: var(--naranja-2); stroke-width: 2; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: center; animation: halo 2.2s infinite var(--entrada); }
#p5Mapa .faro text { fill: #fff; font-weight: 600; font-family: inherit; paint-order: stroke; stroke: rgba(5, 15, 31, 0.9); stroke-width: 5px; pointer-events: none; }
#p5Mapa .faro { pointer-events: none; }
.p5-leyenda { position: absolute; left: 16px; bottom: 4px; flex-wrap: wrap; display: flex; align-items: center; gap: 10px; font-size: 0.8rem; color: var(--texto-2); }
.p5-leyenda .escala { display: flex; gap: 2px; }
.p5-leyenda .escala i { width: 34px; height: 10px; border-radius: 3px; transition: background 0.6s; }
.p5-fuente { position: absolute; right: 16px; top: 6px; font-size: 0.72rem; color: var(--texto-3); }

.p5-lado { display: flex; flex-direction: column; gap: 1.4vh; min-height: 0; }
.p5-kpis, .p6-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2vh 1vw; }
.p6-kpis { grid-template-columns: repeat(4, 1fr); }
.kpi { padding: 14px 18px; }
.kpi b { display: block; margin-top: 4px; font-size: clamp(1.6rem, 2.3vw, 2.6rem); font-weight: 700; line-height: 1.1; }
.kpi b small { font-size: 0.42em; font-weight: 500; color: var(--texto-3); }
.kpi-alerta { border-color: rgba(240, 122, 40, 0.45); background: linear-gradient(160deg, rgba(240, 122, 40, 0.16), rgba(255, 255, 255, 0.03)); }
.kpi-alerta b { color: var(--naranja-2); }
.p5-top { flex: 1; min-height: 0; overflow: hidden; }
.p5-top ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.p5-top li { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 10px; font-size: 0.9rem; opacity: 0; transform: translateX(20px); transition: opacity 0.5s, transform 0.6s var(--entrada); }
.p5-top li.ver { opacity: 1; transform: none; }
.p5-top li > i { font-style: normal; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(240, 122, 40, 0.18); color: var(--naranja-2); font-weight: 700; font-size: 0.8rem; }
.p5-top .top-nom { min-width: 0; }
.p5-top .top-nom strong { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p5-top .top-barra { height: 5px; margin-top: 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.p5-top .top-barra span { display: block; height: 100%; width: 0; border-radius: 5px; background: var(--naranja); transition: width 1s var(--entrada); }
.p5-top li > b { font-weight: 600; color: var(--texto); }
.desc-botones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.desc { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 8px; border-radius: 14px; border: 1px solid var(--tarjeta-borde); background: rgba(255, 255, 255, 0.04); font-size: 0.82rem; color: var(--texto-2); transition: transform 0.25s var(--entrada), border-color 0.25s, background 0.25s; }
.desc:hover { transform: translateY(-4px); border-color: var(--azul-300); background: rgba(255, 255, 255, 0.08); }
.desc-ico { width: 40px; height: 48px; border-radius: 5px 12px 5px 5px; display: grid; place-items: end center; padding-bottom: 6px; font-size: 0.68rem; font-weight: 800; color: #fff; background: linear-gradient(160deg, #ef4444, #b91c1c); }
.desc-ico.xls { background: linear-gradient(160deg, #22c55e, #15803d); }
.desc-ico.csv { background: linear-gradient(160deg, #38bdf8, #0369a1); }
.vuela { position: fixed; z-index: 60; pointer-events: none; }
.aviso-descarga { position: fixed; z-index: 61; right: 28px; bottom: calc(var(--pie) + 18px); padding: 14px 20px; border-radius: 14px; background: #0f2a4d; border: 1px solid rgba(52, 211, 153, 0.5); color: var(--texto); font-size: 0.92rem; box-shadow: 0 20px 50px -20px #000; display: flex; align-items: center; gap: 10px; opacity: 0; transform: translateY(16px); transition: opacity 0.35s, transform 0.45s var(--entrada); pointer-events: none; }
.aviso-descarga.ver { opacity: 1; transform: none; }
.aviso-descarga b { color: var(--verde); }

/* ---------- Paso 6 ---------- */
.p6-rejilla { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.35fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 1.4vh 1.4vw; }
.p6-linea { grid-column: 1; grid-row: 1 / 3; display: flex; flex-direction: column; }
.p6-linea svg { flex: 1; min-height: 0; width: 100%; }
.p6-dona { grid-column: 2; grid-row: 1; }
.p6-mun { grid-column: 3; grid-row: 1 / 3; }
.p6-anios { grid-column: 2; grid-row: 2; display: flex; flex-direction: column; }
.p6-rejilla .tarjeta { min-height: 0; overflow: hidden; }
#p6Linea .rejilla line { stroke: rgba(255, 255, 255, 0.07); }
#p6Linea text { fill: var(--texto-3); font-size: 12px; font-family: inherit; }
#p6Linea .area { fill: url(#p6Grad); }
#p6Linea .serie { fill: none; stroke: var(--cian); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
#p6Linea .marca-pt { fill: var(--noche); stroke: var(--cian); stroke-width: 2; }
#p6Linea .golpe { fill: transparent; cursor: crosshair; }
.dona-caja { display: flex; align-items: center; gap: 16px; height: calc(100% - 30px); }
.dona-caja svg { flex: 0 0 auto; height: 100%; max-height: 190px; width: auto; aspect-ratio: 1; }
#p6Dona circle { fill: none; stroke-width: 26; transition: stroke-dasharray 1.2s var(--entrada), stroke-dashoffset 1.2s var(--entrada); cursor: pointer; }
#p6Dona text { fill: var(--texto); font-family: inherit; }
.dona-ley { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 0.86rem; color: var(--texto-2); }
.dona-ley li { display: grid; grid-template-columns: 12px 1fr; column-gap: 8px; }
.dona-ley i { width: 12px; height: 12px; border-radius: 3px; margin-top: 3px; }
.dona-ley b { color: var(--texto); font-weight: 600; }
.barras-h { display: flex; flex-direction: column; gap: 11px; }
.bh { display: grid; grid-template-columns: 110px 1fr 54px; align-items: center; gap: 10px; font-size: 0.88rem; }
.bh span { color: var(--texto-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bh .pista { height: 14px; border-radius: 0 7px 7px 0; background: rgba(255, 255, 255, 0.05); overflow: hidden; }
.bh .pista i { display: block; height: 100%; width: 0; border-radius: 0 7px 7px 0; background: var(--azul-500); transition: width 1.1s var(--entrada); }
.bh b { text-align: right; font-weight: 600; }
.barras-h-mini { margin-top: 12px; gap: 7px; }
.barras-h-mini .bh { grid-template-columns: 110px 1fr 44px; font-size: 0.8rem; }
.barras-h-mini .bh .pista { height: 9px; }
.barras-v { display: flex; align-items: flex-end; gap: 10px; height: clamp(64px, 10vh, 88px); }
.bv { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; font-size: 0.78rem; color: var(--texto-3); }
.bv .col { width: 100%; max-width: 46px; height: 0; border-radius: 6px 6px 0 0; background: var(--azul-500); transition: height 1s var(--entrada); }
.bv b { color: var(--texto); font-weight: 600; font-size: 0.8rem; }

/* ---------- Cierre ---------- */
.cierre { flex-direction: row; align-items: center; justify-content: center; gap: 4vw; padding: 0 5vw; }
.cierre-mapa { width: min(40vw, 66vh); height: min(60vh, 66vh); }
.cierre-txt { max-width: 640px; }
.cierre h2 { margin: 0.3em 0 0.5em; font-size: clamp(2.4rem, 4.4vw, 5rem); line-height: 1; font-weight: 800; letter-spacing: -0.02em; }
.cierre p { font-size: 1.15rem; color: var(--texto-2); line-height: 1.5; }
.cierre-ciclo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cierre-ciclo span { padding: 7px 13px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--tarjeta-borde); font-size: 0.85rem; }
.cierre-ciclo i { width: 14px; height: 2px; background: var(--naranja); }
.cierre-logos { display: flex; align-items: center; gap: 16px; margin: 1.6em 0; color: var(--texto-3); }
.cierre-logos img { height: 44px; }

/* ---------- Pie y controles ---------- */
.controles { position: fixed; inset: auto 0 0 0; height: var(--pie); z-index: 20; display: flex; align-items: center; gap: 14px; padding: 0 28px; background: linear-gradient(0deg, rgba(5, 15, 31, 0.9), rgba(5, 15, 31, 0.3)); }
.nav { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--tarjeta); border: 1px solid var(--tarjeta-borde); transition: background 0.2s, transform 0.2s var(--entrada); }
.nav:hover { background: var(--azul-700); transform: scale(1.08); }
.nav:disabled { opacity: 0.3; pointer-events: none; }
.nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.contador { min-width: 120px; text-align: center; font-size: 0.86rem; font-weight: 600; }
.ayuda { margin-left: auto; font-size: 0.76rem; color: var(--texto-3); }

/* ---------- Cortina de transición ---------- */
.cortina { position: fixed; inset: 0; z-index: 50; pointer-events: none; overflow: hidden; }
.cortina span { position: absolute; top: -20%; bottom: -20%; width: 70%; left: -90%; transform: skewX(-18deg); }
.cortina .c1 { background: var(--naranja); }
.cortina .c2 { background: var(--azul-700); }
.cortina .c3 { background: var(--noche); }

/* ---------- Cursor de demostración ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 70; width: 30px; height: 30px; pointer-events: none; opacity: 0; transition: opacity 0.3s; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6)); }
.cursor.ver { opacity: 1; }
.cursor svg { width: 30px; height: 30px; fill: #fff; stroke: var(--noche); stroke-width: 1.4; stroke-linejoin: round; }
.onda-clic { position: fixed; z-index: 69; width: 18px; height: 18px; margin: -9px; border-radius: 50%; border: 3px solid var(--naranja-2); pointer-events: none; animation: onda-clic 0.6s var(--entrada) forwards; }
@keyframes onda-clic { from { transform: scale(0.4); opacity: 1; } to { transform: scale(3.2); opacity: 0; } }

/* ---------- Tooltip ---------- */
.tip { position: fixed; z-index: 80; pointer-events: none; padding: 10px 14px; border-radius: 12px; background: rgba(9, 24, 46, 0.96); border: 1px solid rgba(125, 184, 242, 0.35); font-size: 0.85rem; line-height: 1.45; color: var(--texto); box-shadow: 0 16px 40px -14px #000; opacity: 0; transform: translateY(6px); transition: opacity 0.15s, transform 0.2s var(--entrada); max-width: 280px; }
.tip.ver { opacity: 1; transform: none; }
.tip strong { display: block; font-size: 0.95rem; margin-bottom: 2px; }
.tip span { color: var(--texto-2); }
.tip b { color: var(--naranja-2); }

/* ---------- Pantallas pequeñas ---------- */
@media (max-width: 1100px) {
  .pasos span { display: none; }
  .chip-consulta, .ayuda { display: none; }
  .vista { overflow-y: auto; }
  .p1-rejilla, .p3-rejilla, .p4-rejilla, .p5-rejilla, .p2-abajo { grid-template-columns: 1fr; }
  .p6-rejilla { grid-template-columns: 1fr; grid-template-rows: none; }
  .p6-rejilla > * { grid-column: auto !important; grid-row: auto !important; min-height: 240px; }
  .p6-kpis { grid-template-columns: 1fr 1fr; }
  .p5-mapa-caja { min-height: 380px; }
  .p3-grafico { min-height: 320px; }
  .p2-flujo { grid-template-columns: 1fr; }
  .p2-canal { min-height: 160px; }
  .portada, .cierre { flex-direction: column; overflow-y: auto; padding-block: 3vh; }
  .portada-mapa, .cierre-mapa { width: 80vw; height: 38vh; }
}
@media (max-width: 640px) {
  .marca-txt, .marca-sep { display: none; }
  .barra { gap: 10px; padding: 0 16px; }
  .vista { padding-inline: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .vista .a, .vista.activa .a { animation-duration: 0.01ms !important; animation-delay: 0ms !important; }
  .anillo { animation-duration: 12s !important; }
}

/* =====================================================================
   Introducción · El modelo
   ===================================================================== */
[hidden] { display: none !important; }
.in-rejilla { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.15fr 1fr; gap: 2.4vw; }
.in-modelo { display: flex; flex-direction: column; gap: 1.4vh; min-height: 0; }
.in-que p { margin: 8px 0 0; font-size: 1rem; line-height: 1.55; color: var(--texto-2); }
.in-que strong { color: var(--texto); font-weight: 600; }
.in-diagrama { position: relative; flex: 1; min-height: 240px; }
.in-lineas { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; z-index: 0; }
.in-linea { stroke: var(--cian); stroke-width: 2; stroke-opacity: 0.55; stroke-dasharray: 1; stroke-dashoffset: 1; }
.in-pulso { fill: var(--naranja-2); filter: drop-shadow(0 0 6px var(--naranja)); }
.in-centro {
  position: absolute; left: 50%; top: 50%; z-index: 2; width: clamp(104px, 15vh, 148px); aspect-ratio: 1; margin: 0;
  border-radius: 50%; display: grid; place-content: center; text-align: center; gap: 2px;
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #9fd2ff 16%, #2f7bd0 52%, #0b2545 100%);
  box-shadow: 0 0 0 10px rgba(76, 201, 240, 0.08), 0 0 60px rgba(76, 201, 240, 0.55);
  transform: translate(-50%, -50%) scale(0.3); opacity: 0;
  transition: transform 0.8s var(--entrada), opacity 0.5s var(--estandar);
}
.in-centro.ver { transform: translate(-50%, -50%) scale(1); opacity: 1; animation: respira 3.2s 1s ease-in-out infinite; }
@keyframes respira { 50% { box-shadow: 0 0 0 18px rgba(76, 201, 240, 0.05), 0 0 80px rgba(76, 201, 240, 0.7); } }
.in-centro span { font-size: 1.25rem; font-weight: 800; }
.in-centro small { font-size: 0.7rem; color: #dbeafe; letter-spacing: 0.06em; }
.in-comp {
  position: absolute; z-index: 1; width: 43%; display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px;
  border-radius: 16px; border: 1px solid rgba(125, 184, 242, 0.28);
  background: linear-gradient(160deg, rgba(31, 85, 150, 0.45), rgba(10, 29, 56, 0.8));
  box-shadow: 0 18px 40px -22px #000; opacity: 0;
  transition: opacity 0.5s var(--estandar), transform 0.7s var(--entrada), border-color 0.3s;
}
.in-comp.c1 { left: 0; top: 0; transform: translate(40px, 30px) scale(0.85); }
.in-comp.c2 { right: 0; top: 0; transform: translate(-40px, 30px) scale(0.85); }
.in-comp.c3 { left: 0; bottom: 0; transform: translate(40px, -30px) scale(0.85); }
.in-comp.c4 { right: 0; bottom: 0; transform: translate(-40px, -30px) scale(0.85); }
.in-comp.ver { opacity: 1; transform: none; }
.in-comp:hover { border-color: var(--naranja-2); }
.in-comp > b { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--naranja); font-size: 0.85rem; font-weight: 700; }
.in-comp strong { display: block; font-size: 0.98rem; }
.in-comp span { font-size: 0.82rem; color: var(--texto-2); line-height: 1.35; }

.in-elementos { display: flex; flex-direction: column; gap: 1.2vh; min-height: 0; }
.in-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.8vh; }
.in-lista button {
  position: relative; overflow: hidden; width: 100%; display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: center;
  padding: clamp(7px, 1.1vh, 11px) 14px; text-align: left; border-radius: 12px; border: 1px solid var(--tarjeta-borde);
  background: rgba(255, 255, 255, 0.03); color: var(--texto-2); font-size: 0.92rem;
  transition: background 0.3s var(--estandar), border-color 0.3s, color 0.3s, translate 0.35s var(--entrada);
}
.in-lista button:hover { border-color: var(--azul-300); color: var(--texto); }
.in-lista button > b { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.08); font-size: 0.85rem; transition: background 0.3s, box-shadow 0.3s; }
.in-prog { position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background: linear-gradient(90deg, var(--naranja), var(--ambar)); transform: scaleX(0); transform-origin: left; }
.in-lista li.visto button > b { background: var(--azul-700); }
.in-lista li.activo button { border-color: var(--naranja); background: rgba(240, 122, 40, 0.12); color: var(--texto); translate: 6px 0; }
.in-lista li.activo button > b { background: var(--naranja); box-shadow: 0 0 16px rgba(240, 122, 40, 0.7); }
.intro .cabeza { margin-bottom: 0.6vh; }
.in-detalle { display: flex; gap: 16px; align-items: flex-start; min-height: 10.5em; border-color: rgba(255, 179, 107, 0.35); }
.in-detalle-ico { flex: 0 0 auto; width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: rgba(240, 122, 40, 0.16); }
.in-detalle-ico:empty { visibility: hidden; }
.in-detalle-ico svg { width: 30px; height: 30px; fill: none; stroke: var(--naranja-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.in-detalle strong { display: block; font-size: 1.08rem; }
.in-detalle p { margin: 6px 0 0; font-size: 0.96rem; line-height: 1.5; color: var(--texto-2); }
.in-final { display: flex; align-items: center; gap: 18px; margin-top: auto; opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity 0.6s var(--estandar), transform 0.7s var(--entrada); }
.in-final.ver { opacity: 1; transform: none; pointer-events: auto; }
.in-final p { flex: 1; margin: 0; font-size: 0.92rem; line-height: 1.5; color: var(--texto-2); }
.in-final strong { color: var(--naranja-2); }
.in-final .boton { flex: 0 0 auto; }

/* =====================================================================
   Paso 6 · Gestión (análisis forense)
   ===================================================================== */
.gs-rejilla { flex: 1; min-height: 0; display: grid; grid-template-columns: 0.85fr 1.65fr; gap: 2vw; }
.gs-objetivo { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow: auto; border-color: rgba(52, 211, 153, 0.3); }
.gs-objetivo .sello { align-self: flex-start; }
.gs-objetivo h3 { margin: 6px 0 0; font-size: 1.12rem; line-height: 1.3; }
.gs-sub { font-size: 0.9rem; font-weight: 600; color: var(--naranja-2); }
.gs-objetivo p { margin: 0; font-size: 1rem; line-height: 1.6; color: var(--texto); }
.gs-usuarios { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.gs-usuarios span { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--tarjeta-borde); font-size: 0.8rem; color: var(--texto-2); }
.gs-usuarios i { width: 7px; height: 7px; border-radius: 50%; background: var(--cian); }
.gs-nota { padding-top: 10px; border-top: 1px solid var(--tarjeta-borde); font-size: 0.8rem; color: var(--texto-3); line-height: 1.45; }

.gs-metodo { display: flex; flex-direction: column; min-height: 0; }
.gs-metodo-cab { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.gs-metodo-cab h3 { margin: 0; }
.gs-ruta { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 2vh; margin-top: 2vh; }
.gs-nodos { position: relative; display: flex; justify-content: space-between; gap: 6px; }
.gs-linea { position: absolute; left: 5%; right: 5%; top: 21px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); }
.gs-linea span { position: absolute; inset: 0; border-radius: 3px; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--azul-500), var(--naranja)); box-shadow: 0 0 12px rgba(240, 122, 40, 0.5); transition: transform 0.8s var(--entrada); }
.gs-nodo { position: relative; z-index: 1; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 2px; background: none; border: 0; }
.gs-nodo b { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--noche-2); border: 2px solid rgba(255, 255, 255, 0.18); font-weight: 700; transition: background 0.35s var(--estandar), border-color 0.35s, scale 0.4s var(--entrada), box-shadow 0.35s; }
.gs-nodo span { font-size: 0.76rem; line-height: 1.25; text-align: center; color: var(--texto-3); transition: color 0.3s; }
.gs-nodo:hover b { border-color: var(--azul-300); }
.gs-nodo.hecho b { background: var(--azul-700); border-color: var(--azul-500); }
.gs-nodo.activo b { background: var(--naranja); border-color: var(--naranja-2); scale: 1.15; box-shadow: 0 0 0 6px rgba(240, 122, 40, 0.18), 0 0 24px rgba(240, 122, 40, 0.55); }
.gs-nodo.activo span { color: var(--texto); font-weight: 600; }
.gs-detalle { flex: 1; min-height: 0; overflow: auto; padding: 18px 22px; border-radius: 16px; background: rgba(255, 255, 255, 0.035); border: 1px dashed rgba(255, 179, 107, 0.35); }
.gs-fase { font-size: 1.3rem; font-weight: 700; line-height: 1.25; }
.gs-fase span { display: block; margin-bottom: 4px; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--naranja-2); }
.gs-cols { display: grid; grid-template-columns: 1fr 1.3fr; gap: 2vw; margin-top: 14px; }
.gs-cols p { margin: 6px 0 0; font-size: 1rem; line-height: 1.55; color: var(--texto); }
.gs-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.gs-chips span { padding: 7px 12px; border-radius: 999px; background: rgba(76, 201, 240, 0.1); border: 1px solid rgba(76, 201, 240, 0.32); font-size: 0.86rem; }
.gs-cuadro { flex: 1; min-height: 0; overflow: auto; margin-top: 1.6vh; border-radius: 12px; }
.gs-cuadro table { width: 100%; border-collapse: separate; border-spacing: 0; }
.gs-cuadro th { position: sticky; top: 0; z-index: 1; padding: 9px 12px; text-align: left; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--texto-3); background: #0c2142; border-bottom: 1px solid var(--tarjeta-borde); }
.gs-cuadro td { padding: 9px 12px; vertical-align: top; font-size: 0.86rem; line-height: 1.42; color: var(--texto-2); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.gs-cuadro td:first-child { width: 24%; color: var(--texto); font-weight: 600; }
.gs-cuadro td:first-child b { color: var(--naranja-2); }
.gs-cuadro td:nth-child(2) { width: 33%; }
.gs-cuadro tr:hover td { background: rgba(255, 255, 255, 0.03); }

@media (max-width: 1100px) {
  .in-rejilla, .gs-rejilla { grid-template-columns: 1fr; }
  .in-diagrama { min-height: 360px; }
  .gs-cols { grid-template-columns: 1fr; }
  .gs-nodo span { display: none; }
  .in-final { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .in-centro.ver { animation: none; }
}

/* Pantallas de poca altura (p. ej. 1366x768): compactar introducción y gestión */
@media (max-height: 820px) {
  .in-que p { font-size: 0.92rem; }
  .in-lista { gap: 0.6vh; }
  .in-lista button { font-size: 0.86rem; }
  .in-detalle { min-height: 0; padding-block: 12px; }
  .in-detalle p { font-size: 0.88rem; }
  .in-final p { font-size: 0.82rem; }
  .in-final .boton-grande { padding: 13px 22px; font-size: 1rem; }
  .gs-objetivo p { font-size: 0.92rem; line-height: 1.5; }
  .gs-cuadro td { font-size: 0.8rem; padding-block: 7px; }
}
