/* ==========================================================
   Nunca Sin Luz — hoja de estilos
   Tokens: papel, tinta, señal (amarillo de aviso eléctrico),
   pizarra, línea, verde (suficiente), rojo (insuficiente)
   ========================================================== */

:root {
  --papel: #F1F2EC;
  --papel-2: #E6E8DF;
  --superficie: #FFFFFF;
  --tinta: #172238;
  --tinta-suave: #2B3852;
  --pizarra: #58626C;
  --linea: #D6D9CE;
  --senal: #F2B705;
  --senal-suave: #FCEBB0;
  --verde: #2F7A57;
  --rojo: #B8412C;
  --panel: #172238;
  --panel-borde: transparent;

  --f-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --f-texto: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;

  --ancho: 1180px;
  --texto: 68ch;
  --r-s: 6px;
  --r-m: 14px;
  --r-l: 28px;

  --paso--1: 0.875rem;
  --paso-0: 1.0625rem;
  --paso-1: 1.25rem;
  --paso-2: 1.6rem;
  --paso-3: 2.2rem;
  --paso-4: clamp(2.4rem, 5vw, 3.6rem);
  --paso-5: clamp(2.8rem, 7vw, 5.4rem);

  color-scheme: light dark;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --papel: #10182A;
    --papel-2: #18223A;
    --superficie: #1C2842;
    --tinta: #ECEEE6;
    --tinta-suave: #C9CEC2;
    --pizarra: #A3ACB5;
    --linea: #2E3B57;
    --senal-suave: #3A3316;
    --verde: #5DBB8C;
    --rojo: #E27A62;
    --panel: #1C2842;
    --panel-borde: #34426A;
  }
}
:root[data-theme="dark"] {
    --papel: #10182A;
    --papel-2: #18223A;
    --superficie: #1C2842;
    --tinta: #ECEEE6;
    --tinta-suave: #C9CEC2;
    --pizarra: #A3ACB5;
    --linea: #2E3B57;
    --senal-suave: #3A3316;
    --verde: #5DBB8C;
    --rojo: #E27A62;
    --panel: #1C2842;
    --panel-borde: #34426A;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

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

html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 84px); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--f-texto);
  font-size: var(--paso-0);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }

a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--senal); }

:focus-visible { outline: 3px solid var(--senal); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 {
  font-family: var(--f-display);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: var(--paso-5); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: var(--paso-4); font-weight: 700; }
h3 { font-size: var(--paso-2); font-weight: 700; }
h4 { font-size: var(--paso-1); font-weight: 700; }
p { margin: 0 0 1em; }

.salto { position: absolute; left: -999px; top: 0; background: var(--senal); color: #172238; padding: .6rem 1rem; z-index: 100; }
.salto:focus { left: 1rem; top: 1rem; }

.contenedor { width: min(100% - 2.5rem, var(--ancho)); margin-inline: auto; }
.prosa { max-width: var(--texto); }

/* ---------- Cabecera ---------- */
.cabecera {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: color-mix(in srgb, var(--papel) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--linea);
}
.cabecera .contenedor { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }

.marca { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font-family: var(--f-display); font-weight: 800; font-size: 1.25rem; letter-spacing: -0.03em; }
.marca svg { width: 42px; height: 24px; flex: none; }

.menu { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.menu a { display: block; padding: .5rem .8rem; border-radius: var(--r-s); text-decoration: none; font-weight: 700; font-size: .98rem; }
.menu a:hover { background: var(--papel-2); }
.menu a[aria-current="page"] { background: var(--tinta); color: var(--papel); }

.boton-menu { display: none; background: none; border: 1px solid var(--linea); border-radius: var(--r-s); padding: .45rem .7rem; font: inherit; font-weight: 700; color: inherit; cursor: pointer; }

@media (max-width: 820px) {
  .boton-menu { display: inline-block; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--papel); border-bottom: 1px solid var(--linea); display: none; }
  .nav.abierta { display: block; }
  .menu { flex-direction: column; padding: .75rem 1.25rem 1.25rem; }
  .menu a { padding: .8rem; }
}

/* ---------- Botones ---------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--f-display); font-weight: 700; font-size: 1.05rem;
  padding: .85rem 1.35rem; border-radius: 999px; border: 2px solid var(--tinta);
  text-decoration: none; cursor: pointer; transition: transform .15s ease, background-color .15s ease;
}
.boton-principal { background: var(--senal); border-color: var(--senal); color: #172238; }
.boton-principal:hover { background: #FFCB2E; }
.boton-secundario { background: transparent; color: var(--tinta); }
.boton-secundario:hover { background: var(--tinta); color: var(--papel); }
.boton:active { transform: translateY(1px); }

/* ---------- Hero ---------- */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 6vw, 5rem); }
.hero .contenedor { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.hero h1 { margin-bottom: .35em; }
.hero .entradilla { font-size: var(--paso-1); color: var(--tinta-suave); max-width: 34ch; }
.hero-datos { display: flex; flex-wrap: wrap; gap: 1.75rem 2.5rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--linea); }
.hero-datos p { margin: 0; font-size: var(--paso--1); color: var(--pizarra); max-width: 22ch; }
.hero-datos strong { display: block; font-family: var(--f-display); font-size: var(--paso-2); color: var(--tinta); line-height: 1.1; }
@media (max-width: 960px) { .hero .contenedor { grid-template-columns: 1fr; } }

/* ---------- Calculadora (el elemento protagonista) ---------- */
.calculadora {
  background: var(--panel);
  border: 1px solid var(--panel-borde);
  color: #ECEEE6;
  border-radius: var(--r-l);
  padding: clamp(1.25rem, 3vw, 2rem);
  position: relative;
}
.calculadora h2 { font-size: var(--paso-2); margin-bottom: .25rem; color: #fff; }
.calculadora .ayuda { color: #A9B1BD; font-size: var(--paso--1); margin-bottom: 1.25rem; }

.bateria { position: relative; margin: 0 0 1.25rem; }
.bateria-cuerpo {
  position: relative; height: 92px; border: 3px solid #ECEEE6; border-radius: 16px; padding: 6px;
  display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px;
}
.bateria-cuerpo::after {
  content: ""; position: absolute; right: -13px; top: 50%; width: 9px; height: 34px; transform: translateY(-50%);
  background: #ECEEE6; border-radius: 0 5px 5px 0;
}
.celda { background: #25324D; border-radius: 7px; transition: background-color .25s ease, box-shadow .25s ease; }
.celda.llena { background: var(--senal); box-shadow: 0 0 18px -4px rgba(242,183,5,.8); }
.celda.exceso { background: var(--rojo); box-shadow: none; }

.lectura { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.lectura-cifra { font-family: var(--f-display); font-weight: 800; font-size: clamp(2.4rem, 6vw, 3.4rem); line-height: 1; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.lectura-cifra small { font-size: .45em; font-weight: 700; color: #A9B1BD; margin-left: .15em; }
.lectura-pico { text-align: right; font-size: var(--paso--1); color: #A9B1BD; }
.lectura-pico strong { display: block; color: #fff; font-family: var(--f-display); font-size: 1.35rem; }

.duracion { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0 0 1rem; padding: 0; border: 0; }
.duracion legend { font-weight: 700; font-size: var(--paso--1); margin-bottom: .5rem; color: #fff; }
.duracion label { position: relative; }
.duracion input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.duracion span { display: inline-block; padding: .45rem .9rem; border: 1.5px solid #3A4866; border-radius: 999px; font-weight: 700; font-size: .95rem; }
.duracion input:checked + span { background: #ECEEE6; color: #172238; border-color: #ECEEE6; }
.duracion input:focus-visible + span { outline: 3px solid var(--senal); outline-offset: 2px; }

.aparatos { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.aparato { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem .7rem; border-radius: 10px; background: #1F2B45; }
.aparato-nombre { font-size: .95rem; line-height: 1.2; }
.aparato-nombre small { display: block; color: #A9B1BD; font-size: .78rem; }
.contador { display: flex; align-items: center; gap: .3rem; flex: none; }
.contador button { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid #3A4866; background: transparent; color: #ECEEE6; font-weight: 700; font-size: 1rem; line-height: 1; cursor: pointer; }
.contador button:hover { border-color: var(--senal); }
.contador output { min-width: 1.2ch; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; }
.aparato.activo { background: #2A3858; box-shadow: inset 3px 0 0 var(--senal); }
@media (max-width: 480px) { .aparatos { grid-template-columns: 1fr; } }

.veredicto { background: #ECEEE6; color: #172238; border-radius: var(--r-m); padding: 1rem 1.15rem; }
.veredicto p { margin: 0 0 .6rem; }
.veredicto strong { font-family: var(--f-display); font-size: 1.15rem; }
.veredicto .boton { padding: .6rem 1.1rem; font-size: .98rem; border-color: #172238; }

/* ---------- Secciones ---------- */
.seccion { padding: clamp(3rem, 7vw, 6rem) 0; }
.seccion-alterna { background: var(--papel-2); }
.seccion-cabeza { display: flex; justify-content: space-between; align-items: end; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2.25rem; }
.seccion-cabeza p { color: var(--tinta-suave); max-width: 52ch; margin: 0; }
.seccion-cabeza h2 { margin: 0; max-width: 18ch; }

/* Rutas de lectura: tres tamaños distintos para marcar jerarquía */
.rutas { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: auto auto; gap: 1.25rem; }
.ruta { display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem; padding: 1.75rem; border-radius: var(--r-m); text-decoration: none; border: 1.5px solid var(--linea); background: var(--superficie); min-height: 220px; }
.ruta:hover { border-color: var(--tinta); }
.ruta p { color: var(--tinta-suave); margin: 0; }
.ruta h3 { margin-bottom: .4rem; }
.ruta-mayor { grid-row: span 2; background: var(--senal); border-color: var(--senal); color: #172238; }
.ruta-mayor p { color: #3A3413; }
.ruta-mayor h3 { font-size: var(--paso-3); max-width: 14ch; }
.ruta-pie { font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 760px) { .rutas { grid-template-columns: 1fr; } .ruta-mayor { grid-row: auto; } }

/* Tabla comparativa */
.tabla-envoltorio { overflow-x: auto; border: 1.5px solid var(--linea); border-radius: var(--r-m); background: var(--superficie); }
table { width: 100%; border-collapse: collapse; min-width: 720px; font-variant-numeric: tabular-nums; }
th, td { padding: .9rem 1rem; text-align: left; border-bottom: 1px solid var(--linea); vertical-align: middle; }
thead th { font-family: var(--f-display); font-size: .95rem; background: var(--papel-2); }
tbody tr:last-child td { border-bottom: 0; }
td.modelo { font-weight: 700; }
td.modelo small { display: block; font-weight: 400; color: var(--pizarra); }
.etiqueta { display: inline-block; font-size: .8rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; background: var(--senal-suave); color: var(--tinta); white-space: nowrap; }

/* Fichas de producto */
.ficha { display: grid; grid-template-columns: 240px 1fr; gap: 2rem; padding: 2rem 0; border-top: 1.5px solid var(--linea); }
.ficha:first-of-type { border-top: 0; }
.ficha-visual { aspect-ratio: 1; border-radius: var(--r-m); background: var(--papel-2); display: grid; place-items: center; padding: 1.5rem; }
.ficha-visual svg { width: 100%; height: auto; }
.ficha h3 { margin-bottom: .2rem; }
.ficha-subtitulo { color: var(--pizarra); margin-bottom: 1rem; }
.specs { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; margin: 0 0 1.25rem; padding: 0; list-style: none; }
.specs li { font-size: var(--paso--1); color: var(--pizarra); }
.specs strong { display: block; font-family: var(--f-display); font-size: 1.2rem; color: var(--tinta); }
.pros-contras { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 1.25rem; }
.pros-contras h4 { font-size: 1rem; margin-bottom: .4rem; }
.pros-contras ul { margin: 0; padding-left: 1.1rem; }
.pros-contras li { margin-bottom: .3rem; }
.pros h4 { color: var(--verde); }
.contras h4 { color: var(--rojo); }
@media (max-width: 760px) { .ficha { grid-template-columns: 1fr; } .ficha-visual { max-width: 220px; } .pros-contras { grid-template-columns: 1fr; } }

/* Aviso de afiliación */
.aviso-afiliacion { font-size: var(--paso--1); color: var(--tinta-suave); background: var(--superficie); border: 1px solid var(--linea); border-left: 4px solid var(--senal); border-radius: var(--r-s); padding: .75rem 1rem; margin: 0 0 2rem; }

/* Cabecera de artículo */
.articulo-cabeza { padding: clamp(2.5rem, 6vw, 4.5rem) 0 2rem; border-bottom: 1.5px solid var(--linea); }
.articulo-cabeza h1 { font-size: var(--paso-4); max-width: 20ch; }
.articulo-cabeza .entradilla { font-size: var(--paso-1); color: var(--tinta-suave); max-width: 58ch; }
.migas { font-size: var(--paso--1); color: var(--pizarra); margin-bottom: 1.25rem; }
.migas a { color: var(--pizarra); }
.autoria { display: flex; align-items: center; gap: .75rem; margin-top: 1.5rem; font-size: var(--paso--1); color: var(--pizarra); }
.autoria-inicial { width: 40px; height: 40px; border-radius: 50%; background: var(--tinta); color: var(--papel); display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; }

.articulo-cuerpo { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); padding: 3rem 0 5rem; }
.indice { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 92px); align-self: start; font-size: var(--paso--1); }
.indice p { font-weight: 700; margin-bottom: .5rem; }
.indice ol { margin: 0; padding-left: 1.1rem; }
.indice li { margin-bottom: .45rem; }
.indice a { text-decoration: none; color: var(--tinta-suave); }
.indice a:hover { color: var(--tinta); text-decoration: underline; }
.articulo-cuerpo .prosa h2 { font-size: var(--paso-3); margin-top: 2.5rem; }
.articulo-cuerpo .prosa h2:first-child { margin-top: 0; }
@media (max-width: 900px) { .articulo-cuerpo { grid-template-columns: 1fr; } .indice { position: static; border: 1px solid var(--linea); border-radius: var(--r-m); padding: 1rem 1.25rem; } }

/* Pasos (secuencia real) */
.pasos { list-style: none; counter-reset: paso; padding: 0; margin: 1.5rem 0 2rem; }
.pasos li { counter-increment: paso; position: relative; padding: 0 0 1.5rem 3.5rem; }
.pasos li::before { content: counter(paso); position: absolute; left: 0; top: -.1rem; width: 2.3rem; height: 2.3rem; border-radius: 50%; background: var(--tinta); color: var(--papel); display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; }
.pasos li:not(:last-child)::after { content: ""; position: absolute; left: 1.12rem; top: 2.4rem; bottom: .2rem; width: 2px; background: var(--linea); }
.pasos h3 { font-size: var(--paso-1); margin-bottom: .25rem; }

/* Lista de comprobación del kit */
.progreso-kit { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 76px); z-index: 5; background: var(--papel); padding: .75rem 0; margin-bottom: 1rem; }
.progreso-barra { height: 12px; border-radius: 999px; background: var(--papel-2); border: 1px solid var(--linea); overflow: hidden; }
.progreso-barra span { display: block; height: 100%; width: 0; background: var(--senal); transition: width .3s ease; }
.progreso-texto { display: flex; justify-content: space-between; font-size: var(--paso--1); margin-bottom: .4rem; }
.progreso-texto button { background: none; border: 0; color: var(--pizarra); text-decoration: underline; cursor: pointer; font: inherit; }

.grupo-kit { margin-bottom: 2.5rem; }
.grupo-kit h2 { display: flex; align-items: baseline; gap: .75rem; }
.grupo-kit h2 small { font-family: var(--f-texto); font-size: var(--paso--1); font-weight: 400; color: var(--pizarra); letter-spacing: 0; }
.item-kit { display: grid; grid-template-columns: auto 1fr auto; gap: .9rem; align-items: start; padding: 1rem 0; border-top: 1px solid var(--linea); }
.item-kit input { width: 22px; height: 22px; margin-top: .2rem; accent-color: var(--verde); cursor: pointer; }
.item-kit label { cursor: pointer; }
.item-kit label strong { display: block; font-size: 1.05rem; }
.item-kit label span { color: var(--tinta-suave); font-size: .96rem; }
.item-kit a { font-weight: 700; font-size: .92rem; white-space: nowrap; }
.item-kit:has(input:checked) label strong { text-decoration: line-through; text-decoration-color: var(--verde); text-decoration-thickness: 2px; }
@media (max-width: 560px) { .item-kit { grid-template-columns: auto 1fr; } .item-kit a { grid-column: 2; } }

/* Preguntas frecuentes */
.faq details { border-top: 1.5px solid var(--linea); }
.faq details:last-child { border-bottom: 1.5px solid var(--linea); }
.faq summary { cursor: pointer; list-style: none; padding: 1.15rem 2.5rem 1.15rem 0; position: relative; font-family: var(--f-display); font-weight: 700; font-size: var(--paso-1); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: 50%; transform: translateY(-50%); font-size: 1.6rem; font-weight: 400; transition: transform .2s ease; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details > div { padding: 0 0 1.25rem; max-width: var(--texto); color: var(--tinta-suave); }

/* Bloque de confianza */
.confianza { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.confianza ul { list-style: none; margin: 0; padding: 0; }
.confianza li { padding: 1rem 0; border-top: 1.5px solid var(--linea); }
.confianza li strong { display: block; font-family: var(--f-display); font-size: var(--paso-1); }
@media (max-width: 860px) { .confianza { grid-template-columns: 1fr; } }

/* Destacado */
.destacado { border: 1px solid var(--panel-borde); background: var(--panel); color: #ECEEE6; border-radius: var(--r-l); padding: clamp(2rem, 5vw, 3.5rem); display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; }
.destacado h2 { color: #fff; font-size: var(--paso-3); margin: 0 0 .4rem; max-width: 22ch; }
.destacado p { margin: 0; color: #A9B1BD; max-width: 48ch; }

.nota { background: var(--senal-suave); border-radius: var(--r-m); padding: 1.1rem 1.25rem; margin: 1.5rem 0; }
.nota p:last-child { margin: 0; }

/* Páginas legales */
.legal h2 { font-size: var(--paso-2); margin-top: 3rem; padding-top: 1.5rem; border-top: 1.5px solid var(--linea); }
.legal h3 { font-size: var(--paso-1); margin-top: 1.75rem; }
.relleno { background: var(--senal-suave); padding: 0 .3em; border-radius: 3px; font-weight: 700; }

/* ---------- Pie ---------- */
.pie { border-top: 1px solid var(--panel-borde); background: var(--panel); color: #C9CEC2; padding: 4rem 0 2rem; margin-top: 0; }
.pie a { color: #ECEEE6; }
.pie-rejilla { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2rem; margin-bottom: 3rem; }
.pie .marca { color: #fff; margin-bottom: 1rem; }
.pie h2 { font-size: 1rem; color: #fff; margin-bottom: .75rem; letter-spacing: 0; }
.pie ul { list-style: none; margin: 0; padding: 0; }
.pie li { margin-bottom: .5rem; }
.pie-legal { border-top: 1px solid #2E3B57; padding-top: 1.5rem; font-size: var(--paso--1); color: #A9B1BD; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.pie-legal p { margin: 0; max-width: 70ch; }
@media (max-width: 760px) { .pie-rejilla { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ficha-acciones { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.ficha-acciones small { color: var(--pizarra); }
.gama { padding-top: 1rem; }
.gama > h2 { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.gama > h2 small { font-family: var(--f-texto); font-size: var(--paso--1); font-weight: 400; color: var(--pizarra); letter-spacing: 0; }

/* Ajustes tras revisión visual */
.hero h1 { font-size: clamp(2.6rem, 5.4vw, 4.5rem); max-width: 13ch; }
.hero-datos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 560px) { .hero-datos { grid-template-columns: 1fr; } }
td { white-space: nowrap; }
td:nth-child(1), td:nth-child(4) { white-space: normal; }
.gama > h2 { font-size: var(--paso-3); margin-top: 2rem; }
.grupo-kit h2 { flex-wrap: wrap; font-size: var(--paso-2); }
.ficha-visual svg { width: 88%; }
@media (max-width: 480px) { .lectura-pico { text-align: left; } .hero-datos { gap: 1rem; } }

/* Enlazado interno al final de cada guía */
.relacionadas { padding: 3rem 0 5rem; border-top: 1.5px solid var(--linea); }
.relacionadas h2 { font-size: var(--paso-3); }
.relacionadas ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.relacionadas a { display: block; height: 100%; padding: 1.25rem 1.4rem; border: 1.5px solid var(--linea); border-radius: var(--r-m); background: var(--superficie); text-decoration: none; }
.relacionadas a:hover { border-color: var(--tinta); }
.relacionadas strong { display: block; font-family: var(--f-display); font-size: var(--paso-1); line-height: 1.2; margin-bottom: .35rem; }
.relacionadas span { color: var(--tinta-suave); font-size: .96rem; }
@media (max-width: 760px) { .relacionadas ul { grid-template-columns: 1fr; } }
.autoria a { color: inherit; }

/* Interruptor del logo: modo claro / oscuro */
.marca-nombre { text-decoration: none; color: inherit; }
.interruptor { background: none; border: 0; padding: 4px; margin: -4px; color: inherit; cursor: pointer; border-radius: 999px; display: inline-flex; }
.interruptor svg { width: 42px; height: 24px; }
.interruptor-bola { fill: var(--senal); transform: translateX(0); transition: transform .25s ease, fill .25s ease; }
.interruptor[aria-pressed="true"] .interruptor-bola { transform: translateX(-17px); fill: var(--pizarra); }
.interruptor:hover .interruptor-bola { filter: brightness(1.08); }

/* Botón flotante para volver arriba */
.subir {
  position: fixed; z-index: 60;
  right: calc(1.25rem + env(safe-area-inset-right, 0px));
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--senal); color: #172238; border: 2px solid var(--senal);
  box-shadow: 0 6px 20px -6px rgba(23, 34, 56, .45);
  cursor: pointer; opacity: 0; transform: translateY(12px);
  transition: opacity .2s ease, transform .2s ease;
}
.subir svg { width: 24px; height: 24px; }
.subir.visible { opacity: 1; transform: translateY(0); }
.subir:hover { background: #FFCB2E; }
.subir[hidden] { display: none; }
.subir:not(.visible) { pointer-events: none; }
