:root {
  --fondo: #f5f7f9; --panel: #ffffff; --borde: #d5dee7; --tinta: #0f1d2b; --tenue: #4b5d6e;
  --n0: #c99a06; --n1: #e0700f; --n2: #d42020; --n3: #9333ea; --frio: #0284c7; --acento: #b45309; --boton: #f59e0b;
  --lienzo: #0c1e2e; --lienzo-borde: #1c3549; --borde-ctrl: #8aa1b4; --vidrio: #f5f7f9f2; --ok: #047857; --ok-b: #6ee7b7; --ref: #92400e; --ref-b: #fcd34d; --fuera: #f3e8ff;
  color-scheme: light;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--fondo); color: var(--tinta); font: 16px/1.55 var(--sans); -webkit-text-size-adjust: 100%; }
a { color: var(--acento); }
html[data-tema="oscuro"] {
  --fondo: #06121d; --panel: #0c1e2e; --borde: #1c3549; --tinta: #e8eef4; --tenue: #93a7b8;
  --n0: #fde68a; --n1: #fb923c; --n2: #ef4444; --n3: #f0abfc; --frio: #38bdf8; --acento: #fbbf24; --boton: #fbbf24;
  --vidrio: #06121df2; --borde-ctrl: #4a6d88; --ok: #6ee7a8; --ok-b: #2f8f5b; --ref: #fcd34d; --ref-b: #8a6d1d; --fuera: #2a0f3a;
  color-scheme: dark;
}
.tema { flex: none; white-space: nowrap; font: inherit; font-size: 0.76rem; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--borde); background: var(--panel); color: var(--tinta); cursor: pointer; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.1rem, 8vw, 4.2rem); line-height: 1.05; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 5vw, 2.2rem); line-height: 1.15; }
h3 { font-size: 1.1rem; }

.hero { padding: 28px 16px 8px; max-width: 1180px; margin: 0 auto; }
.sobre { text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.72rem; color: var(--acento); margin: 0 0 10px; }
.linea { padding-left: 18px; max-width: 78ch; }
.linea li { margin-bottom: 10px; color: var(--tenue); }
.linea b { color: var(--tinta); }
.titular { font-size: clamp(1.05rem, 3.6vw, 1.3rem); line-height: 1.45; max-width: 60ch; margin: 14px 0 0; padding: 12px 14px; border-left: 4px solid var(--n3); background: var(--panel); border-radius: 8px; }
.titular b { color: var(--tinta); }
.bajada { color: var(--tenue); max-width: 56ch; margin: 14px 0 18px; font-size: 1.02rem; }
.hero-ctrl, .fila-ctrl { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-top: 12px; }

main { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
section { padding: 44px 0 8px; border-top: 1px solid var(--borde); margin-top: 36px; }
.intro { color: var(--tenue); max-width: 68ch; margin: 10px 0 18px; }
.nota { color: var(--tenue); font-size: 0.86rem; max-width: 78ch; margin: 12px 0 0; }
.nota b, .intro b { color: var(--tinta); }

.lienzo-caja { position: relative; background: var(--lienzo); border: 1px solid var(--lienzo-borde); border-radius: 10px; overflow: hidden; }
.lienzo-caja canvas { display: block; width: 100%; height: 100%; }
.hero-lienzo { height: clamp(240px, 46vh, 430px); }
.alto-s { height: 250px; } .alto-m { height: 270px; } .alto-l { height: clamp(380px, 70vh, 560px); }

.btn { font: inherit; font-size: 0.88rem; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--boton); background: var(--boton); color: #1a1200; font-weight: 600; cursor: pointer; }
.btn.sec, .btn.b-otro2, #b-otro { background: transparent; color: var(--tinta); border-color: var(--borde); }
.btn:focus-visible, .chips button:focus-visible, .conmutador button:focus-visible { outline: 2px solid var(--frio); outline-offset: 2px; }
.btn.grabando { border-color: var(--n2); color: var(--n2); }

.leyenda { font-size: 0.78rem; color: var(--tenue); display: inline-flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.p { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-left: 6px; }
.n0 { background: var(--n0); } .n1 { background: var(--n1); } .n2 { background: var(--n2); } .n3 { background: var(--n3); box-shadow: 0 0 0 2px #f0abfc55; }

.conmutador { display: inline-flex; border: 1px solid var(--borde-ctrl); border-radius: 999px; padding: 3px; margin-bottom: 16px; }
.conmutador button, .chips button { font: inherit; font-size: 0.88rem; border: 0; background: transparent; color: var(--tenue); padding: 8px 14px; border-radius: 999px; cursor: pointer; }
.conmutador button.on { background: var(--tinta); color: var(--fondo); font-weight: 600; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { border: 1px solid var(--borde-ctrl); white-space: nowrap; flex: none; }
.chips button.on { border-color: var(--acento); color: var(--acento); background: #fbbf2414; font-weight: 600; }

.tarjetas { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
.tarjeta { background: var(--panel); border: 1px solid var(--borde); border-radius: 10px; padding: 14px; border-top: 3px solid var(--c, var(--borde)); }
.tarjeta .k { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--tenue); }
.tarjeta .v { font-family: var(--serif); font-size: clamp(1.5rem, 6vw, 2.3rem); line-height: 1.1; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.tarjeta .v small { font-size: 0.5em; color: var(--tenue); font-family: var(--sans); }
.tarjeta .d { font-size: 0.8rem; color: var(--tenue); }
.tarjeta .d b { color: var(--tinta); }

.estres { background: var(--panel); border: 1px solid var(--borde); border-radius: 10px; padding: 12px 14px; margin: 8px 0 14px; max-width: 520px; }
.estres label { display: block; font-size: 0.9rem; margin-bottom: 6px; }
.estres input { width: 100%; accent-color: var(--acento); }

.diagrama { background: var(--panel); border: 1px solid var(--borde); border-radius: 10px; padding: 6px; }
.diagrama svg { width: 100%; height: auto; display: block; }
.diagrama .d-normal, .diagrama .d-nino { transition: opacity 0.7s ease; }
.diagrama[data-est="normal"] .d-nino, .diagrama[data-est="nino"] .d-normal { opacity: 0; }
.t-geo { fill: #cbd5e1; font: 600 19px var(--sans); }
.t-eti { fill: #e2e8f0; font: 19px var(--sans); }
.pie-diag { margin: 10px 0 0; font-size: 0.95rem; max-width: 68ch; }
.termo { fill: none; stroke: #e2e8f0; stroke-width: 2; stroke-dasharray: 3 5; }
.viento path, .aflo { fill: none; stroke: currentColor; stroke-width: 3; }
.nube ellipse { fill: #cbd5e1; } .lluvia { stroke: #7dd3fc; stroke-width: 2.5; stroke-linecap: round; }

.costos { display: grid; gap: 14px; margin-top: 18px; }
.costos article { background: var(--panel); border: 1px solid var(--borde); border-radius: 10px; overflow: hidden; }
.costos img { width: 100%; height: 190px; object-fit: cover; display: block; }
.costos h3, .costos p, .costos small { margin: 0; padding: 0 14px; }
.costos h3 { padding-top: 12px; } .costos p { padding-top: 6px; color: var(--tenue); font-size: 0.92rem; }
.costos small { display: block; padding: 8px 14px 14px; color: #64788a; font-size: 0.72rem; }

.pasos { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 8px; counter-reset: p; }
.pasos li { counter-increment: p; background: var(--panel); border: 1px solid var(--borde); border-radius: 10px; padding: 10px 12px 10px 46px; position: relative; }
.pasos li::before { content: counter(p); position: absolute; left: 12px; top: 12px; width: 24px; height: 24px; border-radius: 50%; background: var(--boton); color: #1a1200; font-weight: 700; font-size: 0.8rem; display: grid; place-items: center; }
.pasos b { display: block; } .pasos span { font-size: 0.84rem; color: var(--tenue); }
.tabla-caja { overflow-x: auto; margin: 14px 0; }
table { border-collapse: collapse; font-size: 0.86rem; min-width: 460px; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: right; padding: 7px 10px; border-bottom: 1px solid var(--borde); }
th:first-child, td:first-child { text-align: left; } th { color: var(--tenue); font-weight: 500; }
caption { text-align: left; color: var(--tenue); font-size: 0.82rem; padding-bottom: 6px; }
.limites { padding-left: 18px; color: var(--tenue); max-width: 78ch; font-size: 0.93rem; }
.limites li { margin-bottom: 8px; } .limites b { color: var(--tinta); }

footer { max-width: 1180px; margin: 50px auto 0; padding: 22px 16px 40px; border-top: 1px solid var(--borde); color: var(--tenue); font-size: 0.82rem; }

.alto-mapa { height: clamp(300px, 62vw, 560px); }
.alto-mapa canvas { cursor: pointer; }
.ley-mapa { display: flex; margin: 10px 0; gap: 4px 14px; }
.ley-mapa .p { margin: 0 5px 0 0; }
.ficha { background: var(--panel); border: 1px solid var(--borde); border-radius: 10px; padding: 16px; margin-top: 4px; }
.ficha p { margin: 8px 0; color: var(--tenue); font-size: 0.94rem; }
.ficha ul { margin: 8px 0 0; padding-left: 18px; font-size: 0.92rem; }
.ficha li { margin-bottom: 8px; } .ficha small { color: var(--tenue); font-size: 0.78rem; }
.etqs { display: flex; flex-wrap: wrap; gap: 6px; }
.etq { font-size: 0.74rem; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--c, var(--borde)); color: var(--c, var(--tenue)); }
.insig { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--ok-b); color: var(--ok); white-space: nowrap; }
.insig.referencial { border-color: var(--ref-b); color: var(--ref); } .insig.sin_dato { border-color: var(--borde); color: var(--tenue); }

.barra { position: sticky; top: 0; z-index: 20; background: var(--vidrio); backdrop-filter: blur(8px); border-bottom: 1px solid var(--borde); }
.indice-in { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; max-width: 1180px; margin: 0 auto; padding: 0 10px 5px; }
.indice-in::-webkit-scrollbar { display: none; }
.indice a { flex: none; color: var(--tenue); text-decoration: none; font-size: 0.8rem; padding: 3px 9px; border-radius: 999px; }
.indice a:hover, .indice a:focus-visible { color: var(--tinta); background: var(--panel); }
.indice a.activo { color: var(--tinta); background: var(--panel); box-shadow: inset 0 0 0 1px var(--borde-ctrl); font-weight: 600; }
section { scroll-margin-top: 84px; }
.solo-lector { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.marca { flex: none; text-decoration: none; color: var(--acento); font-size: 0.84rem; font-weight: 400; display: none; margin-right: 6px; white-space: nowrap; }
.marca b { color: var(--acento); }
#hero-vistas { margin: 10px 0 0; }
#c-hero, #c-mapa { touch-action: pan-y; cursor: crosshair; }
#c-mapa { cursor: grab; touch-action: none; }
.alto-oc { height: clamp(260px, 52vw, 440px); }
.desliz { display: inline-flex; align-items: center; gap: 8px; font-size: 0.84rem; color: var(--tenue); flex: 1; min-width: 220px; max-width: 420px; }
.desliz input { flex: 1; accent-color: var(--acento); }
.detalle { margin: 10px 0 0; font-size: 0.95rem; min-height: 1.5em; }
.zoom-ctrl { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 6px; }
.zoom-ctrl button { width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--borde); background: #06121dd9; color: var(--tinta); font-size: 1.1rem; cursor: pointer; }
.tres { display: grid; gap: 12px; }
.tres article { background: var(--panel); border: 1px solid var(--borde); border-left: 4px solid var(--c); border-radius: 10px; padding: 14px 16px; }
.tres p { margin: 6px 0 0; color: var(--tenue); font-size: 0.93rem; }

.alto-calor { height: clamp(210px, 40vw, 470px); }
.alto-ysi { height: 190px; }
#ysi-mes button { padding: 6px 10px; }
.ver { margin: 12px 0 0; padding: 12px 14px; border-radius: 10px; border-left: 4px solid var(--borde); background: var(--panel); max-width: 78ch; }
.ver.bajo { border-color: #38bdf8; } .ver.conocido { border-color: #ef4444; } .ver.nunca { border-color: #f0abfc; } .ver.fuera { border-color: #a855f7; background: var(--fuera); }
#ysi-mod table { margin-top: 12px; max-width: 560px; }
[hidden] { display: none !important; }
.conmutador:empty { display: none; }
.alto-calor.planeta { height: clamp(220px, 34vw, 430px); }
#calor-zonas.on { background: var(--boton); color: #1a1200; border-color: var(--boton); }
#calor-caja canvas { background: #9ccfe2; }
.futuro-calor { border: 1px dashed var(--boton); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; }
.interruptor { display: flex; gap: 8px; align-items: center; font-size: 0.92rem; font-weight: 600; margin-bottom: 8px; }
.interruptor input { width: 18px; height: 18px; accent-color: var(--boton); }
.alto-serie { height: 96px; margin-top: 8px; }
#c-calor-serie { cursor: pointer; touch-action: pan-y; }
.cargando { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--tenue); font-size: 0.9rem; pointer-events: none; }
.leyenda-grad { margin: 10px 0 4px; max-width: 520px; }
.leyenda-grad .barra { height: 12px; border-radius: 6px; }
.leyenda-grad .marcas { position: relative; height: 16px; font-size: 0.74rem; color: var(--tenue); font-variant-numeric: tabular-nums; }
.leyenda-grad .marcas span { position: absolute; transform: translateX(-50%); top: 2px; }
.leyenda-grad p { margin: 4px 0 0; font-size: 0.8rem; color: var(--tenue); }
.conmutador.mini { margin: 0; }
.conmutador.mini button { padding: 6px 11px; font-size: 0.82rem; }

/* navegación entre páginas */
.arriba { display: flex; align-items: center; gap: 8px; max-width: 1180px; margin: 0 auto; padding: 5px 16px 3px; }
.paginas { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.paginas::-webkit-scrollbar { display: none; }
.paginas a { flex: none; text-decoration: none; color: var(--tenue); font-weight: 600; font-size: 0.86rem; padding: 6px 10px; border-bottom: 2px solid transparent; }
.paginas a:hover { color: var(--tinta); }
.paginas a[aria-current="page"] { color: var(--tinta); border-bottom-color: var(--boton); }
.hero.corto { padding: 14px 16px 12px; }
.hero.corto h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); }
.hero.corto .sobre { margin-bottom: 6px; }
.hero.corto .bajada { margin: 6px 0 0; font-size: 0.96rem; }
main > section:first-of-type { border-top: 0; margin-top: 0; padding-top: 22px; }
.hero.corto .sobre a { color: inherit; text-decoration: none; }
/* descargas */
.video-dest { margin: 14px 0 6px; display: grid; gap: 12px; align-items: start; }
.video-dest video { width: 100%; max-width: 360px; aspect-ratio: 9 / 16; border-radius: 12px; background: var(--lienzo); border: 1px solid var(--borde); }
.video-dest figcaption { color: var(--tenue); font-size: 0.92rem; max-width: 60ch; }
.video-dest figcaption b { color: var(--tinta); }
@media (max-width: 520px) { .tema { font-size: 0; padding: 7px 10px; } .tema::first-letter { font-size: 0.9rem; } }
@media (min-width: 760px) {
  .marca { display: inline; } .video-dest { grid-template-columns: 360px 1fr; } }
.descargas { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 14px; }
.desc { display: block; text-decoration: none; color: var(--tinta); background: var(--panel); border: 1px solid var(--borde); border-left: 4px solid var(--n2); border-radius: 10px; padding: 12px 14px; }
.desc.video { border-left-color: var(--n3); }
.desc b { display: block; } .desc span { font-size: 0.82rem; color: var(--tenue); }
.desc:hover, .desc:focus-visible { border-color: var(--boton); }
/* impacto */
.tabla-imp td.n { text-align: right; white-space: nowrap; }
.tabla-imp td, .tabla-imp th { text-align: left; vertical-align: top; }
.tabla-imp small { color: var(--tenue); }
.frases { max-width: 78ch; padding-left: 18px; } .frases li { margin-bottom: 6px; }
#imp-cont h3 { margin: 14px 0 6px; }
/* asistente */
.asis-boton { position: fixed; right: 14px; bottom: 14px; z-index: 40; font: inherit; font-weight: 700; font-size: 0.92rem; padding: 12px 16px; border-radius: 999px; border: 0; background: var(--boton); color: #1a1200; box-shadow: 0 6px 20px #0004; cursor: pointer; }
.asis-panel { position: fixed; right: 14px; bottom: 70px; z-index: 41; width: min(380px, calc(100vw - 28px)); height: min(560px, calc(100vh - 100px)); display: flex; flex-direction: column; background: var(--panel); color: var(--tinta); border: 1px solid var(--borde); border-radius: 14px; box-shadow: 0 12px 40px #0006; overflow: hidden; }
.asis-panel[hidden] { display: none; }
.asis-panel header { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--borde); }
.asis-cerrar { font: inherit; background: none; border: 0; color: var(--tenue); font-size: 1.1rem; cursor: pointer; }
.asis-msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.asis-msg { max-width: 92%; padding: 9px 12px; border-radius: 12px; font-size: 0.9rem; line-height: 1.45; }
.asis-msg.yo { align-self: flex-end; background: var(--boton); color: #1a1200; }
.asis-msg.bot { align-self: flex-start; background: var(--fondo); border: 1px solid var(--borde); }
.asis-msg small, .asis-msg a { display: block; margin-top: 6px; font-size: 0.78rem; }
.asis-sug { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; }
.asis-sug button { font: inherit; font-size: 0.78rem; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--borde-ctrl); background: transparent; color: var(--tinta); cursor: pointer; text-align: left; }
.asis-form { display: flex; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--borde); }
.asis-form input { flex: 1; font: inherit; font-size: 0.9rem; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--borde-ctrl); background: var(--fondo); color: var(--tinta); }
.asis-form button { font: inherit; font-weight: 600; padding: 8px 12px; border-radius: 8px; border: 0; background: var(--boton); color: #1a1200; cursor: pointer; }
.asis-pie { margin: 0; padding: 0 12px 10px; font-size: 0.72rem; color: var(--tenue); }
footer { padding-bottom: 80px; }

@media (min-width: 760px) {
  .tres { grid-template-columns: repeat(3, 1fr); }
  .hero { padding-top: 32px; }
  .hero.corto { padding-top: 18px; }
  .tarjetas { grid-template-columns: repeat(4, 1fr); }
  .costos { grid-template-columns: repeat(3, 1fr); }
  .pasos { grid-template-columns: repeat(5, 1fr); }
  .pasos li { padding: 44px 12px 12px; }
  .alto-s { height: 290px; } .alto-m { height: 320px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .diagrama .d-normal, .diagrama .d-nino { transition: none; } }

#t-caminos th, #t-caminos td { text-align: right; }
#t-caminos th:first-child, #t-caminos td:first-child { text-align: left; }
#t-caminos tr:nth-child(2) th { text-align: right; }
#t-caminos th[colspan] { text-align: center; }

/* botón de narración: dentro de la barra, no desplaza nada */
.escuchar { flex: none; display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 0.78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--boton); background: var(--boton); color: #1a1200; cursor: pointer; white-space: nowrap; }
.escuchar .ic { font-size: 0.7rem; width: 1em; text-align: center; }
.escuchar .t { font-weight: 500; font-variant-numeric: tabular-nums; opacity: 0.8; }
.escuchar.on { background: var(--panel); color: var(--tinta); }
.barra { position: sticky; }
.escuchar-prog { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--boton); transform-origin: left; transform: scaleX(0); transition: transform 0.25s linear; pointer-events: none; }
@media (max-width: 520px) { .escuchar .tx { display: none; } .escuchar { padding: 4px 8px; } }
.firma-amor { color: var(--acento); font-weight: 600; }

/* apoyo: Yape, café, PayPal, WhatsApp (pie de todas las páginas) */
.apoyo-caja { border: 1px solid var(--borde); background: var(--panel); border-radius: 14px; padding: 16px; margin: 24px 0 14px; scroll-margin-top: 90px; }
.apoyo-tit { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; margin: 0; color: var(--tinta); }
.apoyo-sub { color: var(--tenue); margin: 4px 0 12px; font-size: 0.92rem; }
.apoyo { display: flex; flex-wrap: wrap; gap: 8px; }
.b-pay { font: inherit; font-size: 0.9rem; font-weight: 700; padding: 9px 16px; border-radius: 999px; border: 0; cursor: pointer; text-decoration: none; color: #fff; }
.b-yape { background: #742284; } .b-cafe { background: #ffdd00; color: #1a1200; } .b-paypal { background: #003087; } .b-wa { background: #25d366; color: #06301a; }
.b-pay:hover, .b-pay:focus-visible { filter: brightness(1.08); outline: 2px solid var(--boton); outline-offset: 2px; }
.yape { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.yape img { border-radius: 10px; background: #fff; padding: 6px; }
.yape p { margin: 0; color: var(--tenue); font-size: 0.9rem; }
.yape b { color: var(--tinta); }
.apoya { flex: none; text-decoration: none; font-size: 0.78rem; font-weight: 700; color: #742284; border: 1px solid #74228466; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
html[data-tema="oscuro"] .apoya { color: #e9a8f5; border-color: #e9a8f566; }
@media (max-width: 520px) { .apoya span { display: none; } .apoya { padding: 4px 8px; } }

/* «Me preguntan»: escala de intensidad */
.escala-caja { margin-top: 22px; padding: 16px; border: 1px solid var(--borde); border-left: 4px solid var(--n3); border-radius: 12px; background: var(--panel); }
.escala-pre { margin: 0; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--acento); }
.escala-caja h3 { margin: 4px 0 10px; font-size: 1.2rem; }
.escala-tit { margin: 16px 0 6px; font-size: 0.82rem; font-weight: 700; color: var(--tinta); }
.escala { position: relative; height: 34px; margin-bottom: 26px; border-radius: 8px; overflow: visible; }
.escala span { position: absolute; top: 0; bottom: 0; left: calc(var(--a) * 1%); width: calc((var(--b) - var(--a)) * 1%); background: var(--c); color: #1a1200; font-size: 0.72rem; font-weight: 700; display: flex; align-items: center; justify-content: center; overflow: hidden; white-space: nowrap; }
.escala span:first-child { border-radius: 8px 0 0 8px; } .escala span:nth-child(5) { border-radius: 0 8px 8px 0; }
.escala { margin-top: 40px; }
.escala i { position: absolute; left: calc(var(--x) * 1%); top: -36px; bottom: 0; border-left: 2px solid var(--tinta); font-style: normal; font-size: 0.7rem; font-weight: 700; color: var(--tinta); padding-left: 4px; white-space: nowrap; line-height: 1; }
.escala i.izq { border-left: 0; border-right: 2px solid var(--tinta); padding: 0 4px 0 0; transform: translateX(-100%); }
.escala i.fila2 { top: -18px; }
.escala i.hoy { border-color: #7c3aed; color: #7c3aed; }
html[data-tema="oscuro"] .escala i.hoy { color: #d8b4fe; border-color: #d8b4fe; }
.escala-ejes { position: relative; height: 16px; margin-top: -20px; margin-bottom: 4px; }
.escala-ejes b { position: absolute; left: calc(var(--x) * 1%); transform: translateX(-50%); font-size: 0.68rem; font-weight: 500; color: var(--tenue); white-space: nowrap; }
.escala-ejes b:last-child { transform: translateX(-100%); }
@media (max-width: 520px) { .escala span { font-size: 0.6rem; } .escala-ejes b:nth-child(odd):not(:last-child) { display: none; } }
.picos-reales { display: grid; gap: 6px; margin: 6px 0 4px; }
.picos-reales div { display: grid; grid-template-columns: 64px 1fr 74px; align-items: center; gap: 8px; font-size: 0.8rem; }
.picos-reales span { color: var(--tenue); font-weight: 600; }
.picos-reales i { display: block; height: 14px; width: calc(var(--w) * 1%); min-width: 4px; background: linear-gradient(90deg, #fb923c, #ef4444); border-radius: 4px; }
.picos-reales .hoy i { background: linear-gradient(90deg, #ef4444, #a855f7); }
.picos-reales b { color: var(--tinta); font-variant-numeric: tabular-nums; }

/* mapa de riesgo */
.chips.mini button { font-size: 0.76rem; padding: 4px 9px; }
#riesgo-peligros button i, .r-peligro p i, .riesgo-ley i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.riesgo-grid { display: grid; gap: 14px; margin-top: 10px; }
.riesgo-mapa { height: clamp(420px, 70vh, 640px); background: #bfe3f0; }
.riesgo-lado { min-width: 0; }
.r-sel { font-size: 0.86rem; color: var(--tenue); display: block; margin-bottom: 8px; }
.r-sel select { font: inherit; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--borde-ctrl); background: var(--panel); color: var(--tinta); }
#riesgo-ficha h3 { margin: 0 0 6px; font-size: 1.3rem; }
.r-dato { font-size: 0.86rem; color: var(--tenue); margin: 4px 0; } .r-dato b { color: var(--tinta); }
.r-peligro { border-top: 1px solid var(--borde); padding-top: 8px; margin-top: 8px; }
.r-peligro p { margin: 0 0 4px; font-size: 0.9rem; } .r-peligro small { color: var(--tenue); }
.r-meses { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; }
.r-meses span { height: 12px; border-radius: 2px; } .r-meses span.hoy { outline: 2px solid var(--tinta); }
.r-plan { margin-top: 6px; font-size: 0.86rem; } .r-plan summary { cursor: pointer; font-weight: 700; color: var(--acento); }
.r-plan ul { margin: 2px 0 6px; padding-left: 18px; } .r-plan li { margin-bottom: 3px; } .r-plan small { color: var(--tenue); }
.r-fase { margin: 6px 0 0; font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--tinta); }
.riesgo-ley { display: flex; flex-wrap: wrap; gap: 12px; font-size: 0.8rem; color: var(--tenue); margin-top: 8px; }
.r-como { margin-top: 10px; } .r-como summary { cursor: pointer; font-weight: 600; }
@media (min-width: 900px) { .riesgo-grid { grid-template-columns: 1.15fr 1fr; } .riesgo-lado { max-height: 640px; overflow: auto; } }
.r-dist { border: 1px solid var(--borde); border-radius: 10px; padding: 10px; margin-bottom: 12px; background: var(--fondo); }
.r-dist h3 small { font-family: inherit; font-size: 0.8rem; color: var(--tenue); font-weight: 400; }
.r-niv { list-style: none; padding: 0; margin: 6px 0; font-size: 0.86rem; } .r-niv li { margin: 3px 0; } .r-niv i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* migración y agua */
.mig-bloque { margin-top: 18px; }
.mig-bloque.lima { padding: 16px; border: 1px solid var(--borde); border-left: 4px solid var(--frio, #38bdf8); border-radius: 12px; background: var(--panel); }
.mig-casos { display: grid; gap: 10px; } .mig-casos article { border: 1px solid var(--borde); border-radius: 10px; padding: 12px; background: var(--panel); }
.mig-casos h4 { margin: 0 0 6px; font-size: 0.98rem; } .mig-casos h4 small { color: var(--tenue); font-weight: 400; }
.mig-casos p { margin: 4px 0; font-size: 0.88rem; color: var(--tenue); } .mig-casos b { color: var(--tinta); }
.mig-res { border-top: 1px dashed var(--borde); padding-top: 6px; }
@media (min-width: 760px) { .mig-casos { grid-template-columns: repeat(2, 1fr); } }
/* plan de mitigación */
.cta-plan { margin: 12px 0 0; max-width: 46rem; }
.cta-plan a { display: inline-block; padding: 10px 14px; border-radius: 10px; background: var(--panel); border: 2px solid var(--boton); color: var(--tinta); text-decoration: none; line-height: 1.4; }
.cta-plan a:hover { background: var(--vidrio); }
.mit-deps { margin: 16px 0; }
.mit-deps select { font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--borde-ctrl); background: var(--panel); color: var(--tinta); max-width: 100%; }
.mit-niv { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--borde); white-space: nowrap; }
.mit-niv.n3 { background: var(--n3); color: #fff; border-color: var(--n3); }
.mit-niv.n2 { background: var(--n2); color: #fff; border-color: var(--n2); }
.mit-niv.n1 { background: var(--n0); color: #1a1200; border-color: var(--n0); }
.mit-ries { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 8px 0 12px; }
.mit-ries > div { background: var(--panel); border: 1px solid var(--borde); border-radius: 10px; padding: 8px 10px; }
.mit-ries span { font-weight: 700; font-size: 0.9rem; }
.mit-ries p { margin: 4px 0 0; font-size: 0.88rem; }
.mit-plazos { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.mit-tab td, .mit-tab th { font-size: 0.86rem; vertical-align: top; }
.mit-f { font-size: 0.8rem; }
.qd-tab td, .qd-tab th { font-size: 0.86rem; vertical-align: top; }
.qd-tab td.qd-mejor { background: color-mix(in srgb, var(--ok) 16%, transparent); }
.qd-tab tr.qd-nota td { border-top: 0; padding-top: 0; color: var(--tenue); }
