/* =====================================================================
   Respira VLC · Marinada Labs
   Hoja de estilos única. Organización:
   1. Variables de color (tema claro y oscuro)
   2. Base y tipografía
   3. Utilidades comunes (contenedor, secciones, botones)
   4. Cabecera y navegación
   5. Portada (hero)
   6. ODS y problema
   7. Vídeos
   8. Cómo funciona (diagrama y fichas)
   9. Mapa
   10. Datos (KPI, gráficas, tabla)
   11. Catálogo, comparador, carrito y formulario
   12. Calculadora
   13. Equipo, fuentes y pie
   14. Movimiento reducido e impresión
   ===================================================================== */

/* ---------- 0. Tipografía local (vendor/fonts, licencia SIL OFL) ----------
   La guardamos en la propia web para que se vea igual sin Internet. */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../vendor/fonts/bricolage-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../vendor/fonts/bricolage-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- 1. Variables de color ---------- */
/* Paleta mediterránea: azul mar, blanco cal, azahar (naranja) y verde de aire limpio */
:root {
  color-scheme: light;
  --fondo: #f8f9f3;          /* blanco cal */
  --superficie: #ffffff;
  --tinte: #edf1e8;          /* azul muy claro para secciones alternas */
  --tinta: #193e31;          /* azul mar profundo: texto principal */
  --tinta-2: #52675a;        /* texto secundario */
  --tinta-3: #65766a;        /* texto apagado (notas, ejes) */
  --borde: #dce2d7;
  --rejilla: #e5e9df;        /* líneas de la rejilla de las gráficas */

  --mar: #276a50;            /* azul mar: enlaces, botones */
  --mar-suave: #dfebe0;
  --azahar: #d97543;         /* acento: rellenos y sellos */
  --azahar-texto: #a14b23;   /* azahar con contraste suficiente para texto */
  --verde: #347b58;          /* aire limpio */
  --verde-texto: #266345;
  --verde-suave: #e1eddd;

  /* Colores de datos (validados para daltonismo con el script de la skill dataviz) */
  --dato-cumple: #276a50;
  --dato-justo: #f4c08f;     /* justo en el límite (igual que en el notebook) */
  --dato-supera: #d9690b;

  /* Estados del mapa */
  --estado-bajo: #347b58;
  --estado-limite: #d99a00;
  --estado-alto: #c8401e;

  --sombra: 0 1px 2px rgba(12, 45, 72, .08), 0 8px 24px rgba(12, 45, 72, .06);
  --radio: 18px;
  --radio-peq: 8px;
  --alto-cabecera: 80px;

  --fuente: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Tema oscuro: se aplica si el sistema lo pide y el usuario no ha elegido el claro */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --fondo: #101f19;
    --superficie: #172b22;
    --tinte: #14271f;
    --tinta: #edf3e8;
    --tinta-2: #bfccbe;
    --tinta-3: #a1b4a4;
    --borde: #30483b;
    --rejilla: #2a4134;
    --mar: #8fc9a8;
    --mar-suave: #233e2d;
    --azahar: #f0a04b;
    --azahar-texto: #f3ac5e;
    --verde: #3fbf8a;
    --verde-texto: #5fd09f;
    --verde-suave: #123a2e;
    --dato-cumple: #3b8bd4;
    --dato-justo: #a87440;
    --dato-supera: #c8701e;
    --estado-bajo: #3fbf8a;
    --estado-limite: #e6b422;
    --estado-alto: #ef6a47;
    --sombra: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}
/* Tema oscuro elegido con el interruptor */
:root[data-theme="dark"] {
  color-scheme: dark;
  --fondo: #101f19;
  --superficie: #172b22;
  --tinte: #14271f;
  --tinta: #edf3e8;
  --tinta-2: #bfccbe;
  --tinta-3: #a1b4a4;
  --borde: #30483b;
  --rejilla: #2a4134;
  --mar: #8fc9a8;
  --mar-suave: #233e2d;
  --azahar: #f0a04b;
  --azahar-texto: #f3ac5e;
  --verde: #3fbf8a;
  --verde-texto: #5fd09f;
  --verde-suave: #123a2e;
  --dato-cumple: #3b8bd4;
  --dato-justo: #a87440;
  --dato-supera: #c8701e;
  --estado-bajo: #3fbf8a;
  --estado-limite: #e6b422;
  --estado-alto: #ef6a47;
  --sombra: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
}

/* ---------- 2. Base y tipografía ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--alto-cabecera) + 16px); /* que la cabecera fija no tape los títulos */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--fondo);
  color: var(--tinta);
  font-family: var(--fuente);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  overflow-x: hidden; /* sin scroll horizontal en móvil */
}

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -.01em;
  text-wrap: balance;
}
h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); font-weight: 780; letter-spacing: -.025em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em; }
img, svg { max-width: 100%; }
img { height: auto; }

a { color: var(--mar); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }

code {
  font-size: .9em;
  background: var(--tinte);
  padding: .1em .35em;
  border-radius: 4px;
}

/* Foco visible y claro para quien navega con teclado */
:focus-visible {
  outline: 3px solid var(--azahar);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Texto que solo leen los lectores de pantalla */
.solo-lector {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Enlace para saltar la navegación (accesibilidad) */
.saltar {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  background: var(--tinta);
  color: var(--fondo);
  padding: .6em 1em;
  border-radius: var(--radio-peq);
}
.saltar:focus { top: 12px; }

/* ---------- 3. Utilidades comunes ---------- */
.contenedor {
  width: min(1240px, 100% - 80px); /* 16 px de margen a cada lado en móvil */
  margin-inline: auto;
}

.seccion { padding-block: clamp(64px, 9vw, 112px); }
.seccion--tinte { background: var(--tinte); }

.entradilla {
  max-width: 68ch;
  font-size: 1.15rem;
  color: var(--tinta-2);
  margin-bottom: 2.25rem;
}

.subtitulo { margin-top: 3rem; font-size: 1.5rem; }

.nota {
  font-size: .9rem;
  color: var(--tinta-3);
  max-width: 80ch;
}

/* Botones */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 48px;
  padding: .7em 1.4em;
  border-radius: 9px;
  border: 2px solid transparent;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.boton--principal { background: var(--mar); color: #fff; }
.boton--principal:hover { background: var(--tinta); }
:root[data-theme="dark"] .boton--principal,
:root:not([data-theme="light"]) .boton--principal { color: #fff; }
.boton--secundario { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.boton--secundario:hover { background: rgba(255, 255, 255, .12); }
.boton--borde { background: transparent; color: var(--mar); border-color: currentColor; }
.boton--borde:hover { background: var(--mar-suave); }
.boton--texto {
  background: none;
  border: 0;
  padding: .4em 0;
  min-height: 44px;
  color: var(--tinta-2);
  text-decoration: underline;
}

/* En modo oscuro el azul de botón se oscurece un poco para que el texto blanco contraste */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .boton--principal { background: #347653; }
  :root:not([data-theme="light"]) .boton--principal:hover { background: #428763; }
}
:root[data-theme="dark"] .boton--principal { background: #347653; }
:root[data-theme="dark"] .boton--principal:hover { background: #428763; }

/* ---------- 4. Cabecera y navegación ---------- */
.cabecera {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--alto-cabecera);
  color: var(--tinta);
  background: color-mix(in srgb, var(--fondo) 95%, transparent);
  border-bottom: 1px solid var(--borde);
  backdrop-filter: blur(16px);
  transition: background-color .25s, color .25s, box-shadow .25s;
}
/* La navegación mantiene su contraste en toda la página. */
.cabecera.cabecera--solida {
  background: color-mix(in srgb, var(--fondo) 92%, transparent);
  backdrop-filter: blur(10px);
  color: var(--tinta);
  box-shadow: 0 1px 0 var(--borde);
}
.cabecera__dentro {
  height: 100%;
  width: min(1240px, 100% - 80px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.marca {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: inherit;
  text-decoration: none;
  font-weight: 750;
  font-size: 1.1rem;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.marca span { line-height: 1.15; }
.marca small { display: block; font-size: .62rem; font-weight: 450; letter-spacing: .02em; margin-top: 5px; color: var(--tinta-3); }
.marca img { flex: none; }
.nav { margin-left: auto; }
.nav ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: block;
  padding: .5em .7em;
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
  font-weight: 550;
  font-size: .83rem;
}
.nav a:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.nav a[aria-current="true"] { background: color-mix(in srgb, currentColor 14%, transparent); }

.cabecera__acciones { display: flex; align-items: center; gap: .35rem; }
.boton-tema, .boton-menu, .boton-carrito {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.boton-tema:hover, .boton-menu:hover, .boton-carrito:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.boton-carrito__num {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--azahar);
  color: #193e31;
  font-size: .75rem;
  font-weight: 750;
  line-height: 20px;
  text-align: center;
}
/* El icono del tema muestra la acción: luna en modo claro, sol en modo oscuro */
.icono-sol { display: none; }
:root[data-theme="dark"] .icono-sol { display: block; }
:root[data-theme="dark"] .icono-luna { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icono-sol { display: block; }
  :root:not([data-theme="light"]) .icono-luna { display: none; }
}
.boton-menu { display: none; }

/* Menú plegable en pantallas estrechas */
@media (max-width: 1020px) {
  .boton-menu { display: inline-grid; }
  .nav {
    position: absolute;
    top: var(--alto-cabecera);
    left: 0;
    right: 0;
    background: var(--fondo);
    color: var(--tinta);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .15);
    border-top: 1px solid var(--borde);
    display: none;
  }
  .nav.nav--abierta { display: block; }
  .nav ul { flex-direction: column; padding: .5rem 16px 1rem; }
  .nav a { padding: .8em .8em; border-radius: var(--radio-peq); }
  .cabecera__acciones { margin-left: auto; }
}
@media (max-width: 380px) {
  .marca span { font-size: 1rem; }
  .marca img { width: 30px; height: 30px; }
}

/* ---------- 5. Portada: un observatorio de barrio ---------- */
.hero {
  position: relative;
  padding: calc(var(--alto-cabecera) + 64px) 0 0;
  background: var(--fondo);
  color: var(--tinta);
  overflow: hidden;
  isolation: isolate;
}
.hero__lienzo { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .12; pointer-events: none; }
.hero__contenido { width: min(1240px, 100% - 80px); margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.hero__texto { padding-bottom: 28px; }
.hero__etiqueta { display: flex; align-items: center; gap: 9px; font-size: .68rem; letter-spacing: .12em; font-weight: 700; margin-bottom: 28px; }
.hero__etiqueta > span { width: 8px; height: 8px; border-radius: 50%; background: var(--azahar); box-shadow: 0 0 0 4px color-mix(in srgb, var(--azahar) 13%, transparent); }
.hero h1 { font-size: clamp(4rem, 6.8vw, 6.25rem); font-weight: 750; letter-spacing: -.065em; line-height: .98; margin: 0 0 24px; }
.hero__resalte { color: var(--verde); position: relative; }
.hero__eslogan { font-size: clamp(1.1rem, 1.7vw, 1.35rem); line-height: 1.5; font-weight: 550; margin-bottom: 14px; }
.hero__descripcion { font-size: .97rem; color: var(--tinta-2); max-width: 44ch; margin-bottom: 28px; }
.hero__botones { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__botones .boton { font-size: .88rem; min-height: 50px; gap: 20px; }
.hero__botones .boton--principal { background: var(--tinta); color: var(--fondo); }
.hero__botones .boton--principal:hover { background: var(--verde); color: #fff; }
.hero__botones .boton--secundario { color: var(--tinta); border: 1px solid var(--borde); background: transparent; }
.hero__botones .boton--secundario:hover { background: var(--tinte); border-color: var(--tinta); }
.hero__botones .boton span { font-size: 1.25rem; font-weight: 400; }
.hero__nota { display: flex; align-items: center; gap: 7px; margin: 22px 0 0; font-size: .71rem; color: var(--tinta-3); }
.hero__nota svg { flex: none; }
.hero__texto > * { animation: subir .65s cubic-bezier(.2,.7,.2,1) both; }
.hero__texto > :nth-child(2) { animation-delay: .06s; }
.hero__texto > :nth-child(3) { animation-delay: .12s; }
.hero__texto > :nth-child(4) { animation-delay: .18s; }
@keyframes subir { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.aire-vista { margin: 0; min-width: 0; }
.aire-vista__mapa { position: relative; border: 1px solid #d3dfd1; border-radius: 22px; overflow: hidden; background: #edf2e9; color: #193e31; color-scheme: light; aspect-ratio: 1.06; }
.aire-plano { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.aire-vista__cabecera { position: absolute; inset: 22px 22px auto; z-index: 2; display: flex; align-items: center; gap: 10px; font-size: .6rem; letter-spacing: .14em; line-height: 1.8; }
.aire-vista__cabecera strong { font-size: .86rem; letter-spacing: -.02em; font-weight: 600; }
.aire-vista__senal { display: grid; place-items: center; width: 39px; height: 39px; border: 1px solid #b7cbbb; border-radius: 50%; font-size: 2.1rem; line-height: 1; background: #edf2e9; }
.aire-vista__anio { margin-left: auto; align-self: flex-start; border: 1px solid #b7cbbb; border-radius: 20px; padding: 3px 10px; font-size: .7rem; letter-spacing: .03em; background: #edf2e9; }
.aire-vista figcaption { padding-top: 12px; font-size: .69rem; color: var(--tinta-3); line-height: 1.6; }
.aire-vista figcaption a { color: inherit; }
.aire-nodo { fill: #2d7559; stroke: #f7faf4; stroke-width: 3; }
.aire-nodo__halo { fill: #2d7559; fill-opacity: .12; stroke: none; opacity: 0; transition: opacity .25s; }
.aire-nodo__centro { fill: #f7faf4; stroke: none; }
.aire-nodo[data-nodo="Olivereta"] { fill: #d46c37; }
.aire-nodo[data-nodo="Centre"] { fill: #a77717; }
.aire-nodo--activo .aire-nodo__halo { opacity: 1; }
.aire-nodo--activo { stroke-width: 4; }
.estacion-card { position: absolute; z-index: 3; left: 24px; bottom: 44px; width: 270px; padding: 22px; background: #fffefa; border: 1px solid #d8e1d5; border-radius: 16px; box-shadow: 0 12px 35px #193e3112; }
.estacion-card label { display: block; font-size: .57rem; letter-spacing: .11em; font-weight: 700; color: #5e7367; margin-bottom: 4px; }
.estacion-card select { display: block; width: 100%; border: 0; background: transparent; color: #193e31; font: 650 1.3rem var(--fuente); padding: 7px 24px 7px 0; cursor: pointer; }
.estacion-card__valor { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.estacion-card__valor strong { font-size: 4.3rem; font-weight: 650; line-height: 1; letter-spacing: -.065em; font-variant-numeric: tabular-nums; }
.estacion-card__valor > span { font-size: .88rem; color: #536c5e; }
.estacion-card__valor small { display: block; font-size: .65rem; margin-top: 2px; }
.estacion-card__estado { font-size: .69rem; line-height: 1.45; font-weight: 650; color: #a14b23; margin-bottom: 15px; }
.estacion-card__estado[data-estado="bajo"] { color: #216347; }
.estacion-card__estado[data-estado="limite"] { color: #896010; }
.estacion-card__escala { height: 6px; border-radius: 8px; background: linear-gradient(to right,#72a987 0%,#a7bf84 35%,#e7ba6a 50%,#d77950 75%,#b94832 100%); position: relative; }
.estacion-card__escala i { position: absolute; top: -4px; left: var(--medida); translate: -50% 0; width: 5px; height: 14px; background: #193e31; border: 1px solid #fff; border-radius: 3px; transition: left .3s; }
.estacion-card__escala > span { position: absolute; top: -3px; left: 50%; height: 12px; border-left: 1px dashed #193e31; }
.estacion-card__referencia { font-size: .62rem; color: #5e7367; margin: 8px 0 16px; }
.estacion-card > a { display: flex; justify-content: space-between; padding-top: 12px; border-top: 1px solid #e0e5dc; font-size: .74rem; font-weight: 650; color: #193e31; text-decoration: none; }
.estacion-card > a:hover { text-decoration: underline; }
.aire-vista__norte { position: absolute; right: 24px; bottom: 52px; display: grid; justify-items: center; font-size: .6rem; font-weight: 700; }
.aire-vista__norte span { font-size: 2rem; font-weight: 400; line-height: 1.3; }
.aire-vista__pie { position: absolute; bottom: 13px; left: 24px; font-size: .52rem; letter-spacing: .1em; font-weight: 600; color: #536c5e; }
.hero__balance { width: min(1240px, 100% - 80px); margin: 50px auto 0; border-top: 1px solid var(--borde); display: grid; grid-template-columns: 160px 1fr; gap: 32px; align-items: center; padding: 28px 0 32px; }
.hero__balance-titulo { font-size: .84rem; line-height: 1.5; margin: 0; color: var(--tinta-2); }
.hero__balance-titulo > span { display: inline-block; margin-left: 18px; font-size: 1.3rem; }
.hero__cifras { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.hero__cifras li { border-left: 1px solid var(--borde); padding-left: 28px; }
.hero__cifras strong { display: flex; flex-wrap: wrap; align-items: baseline; gap: 9px; font-size: 2.5rem; line-height: 1.2; letter-spacing: -.05em; font-weight: 650; }
.hero__cifras strong > span { font-size: .8rem; letter-spacing: -.01em; font-weight: 500; }
.hero__cifras li > span { display: block; font-size: .7rem; line-height: 1.5; color: var(--tinta-3); margin-top: 4px; }
@media (min-width: 1500px) { .hero { padding-top: calc(var(--alto-cabecera) + 80px); } }
@media (max-width: 1100px) {
  .hero__contenido { gap: 32px; }
  .hero h1 { font-size: 5rem; }
  .estacion-card { width: 245px; padding: 18px; left: 18px; bottom: 36px; }
  .estacion-card__valor strong { font-size: 3.5rem; }
  .hero__balance { grid-template-columns: 120px 1fr; gap: 20px; }
  .hero__cifras li { padding-left: 20px; }
}
@media (max-width: 900px) {
  .hero { padding-top: calc(var(--alto-cabecera) + 44px); }
  .hero__contenido { grid-template-columns: 1fr 1fr; width: calc(100% - 48px); gap: 24px; }
  .hero h1 { font-size: 4.2rem; }
  .hero__etiqueta { font-size: .55rem; letter-spacing: .08em; }
  .hero__eslogan { font-size: 1.05rem; }
  .hero__descripcion { font-size: .87rem; }
  .aire-vista__mapa { aspect-ratio: .8; }
  .aire-vista__cabecera { inset: 14px 14px auto; gap: 6px; }
  .aire-vista__cabecera strong { font-size: .7rem; }
  .aire-vista__senal { width: 30px; height: 30px; }
  .aire-vista__anio { padding: 2px 6px; }
  .estacion-card { width: calc(100% - 32px); left: 16px; }
  .aire-vista__norte { display: none; }
  .hero__balance { width: calc(100% - 48px); grid-template-columns: 1fr; gap: 16px; margin-top: 28px; }
  .hero__balance-titulo br { display: none; }
  .hero__cifras li:first-child { border-left: 0; padding-left: 0; }
}
@media (max-width: 650px) {
  .hero__contenido { grid-template-columns: 1fr; gap: 16px; width: calc(100% - 40px); }
  .hero__texto { padding-bottom: 8px; }
  .hero__etiqueta { font-size: .6rem; margin-bottom: 24px; }
  .hero h1 { font-size: clamp(4rem, 17vw, 5.7rem); }
  .hero__eslogan { font-size: 1.16rem; }
  .hero__descripcion { max-width: 50ch; font-size: .95rem; }
  .hero__botones { gap: 8px; }
  .hero__botones .boton { padding-inline: 16px; gap: 12px; font-size: .8rem; }
  .hero__nota { font-size: .66rem; }
  .aire-vista__mapa { aspect-ratio: 1.02; max-height: 500px; }
  .aire-vista__cabecera { inset: 18px 18px auto; }
  .aire-vista__cabecera strong { font-size: .8rem; }
  .estacion-card { width: 235px; bottom: 34px; }
  .estacion-card__valor { margin-block: 8px; }
  .estacion-card__valor strong { font-size: 3.2rem; }
  .estacion-card__estado { margin-bottom: 12px; font-size: .64rem; }
  .estacion-card__referencia { margin-bottom: 10px; }
  .hero__balance { width: calc(100% - 40px); margin-top: 28px; padding-block: 24px; }
  .hero__cifras { gap: 12px; }
  .hero__cifras li { padding-left: 12px; }
  .hero__cifras strong { font-size: 2rem; gap: 2px; }
  .hero__cifras strong > span { flex-basis: 100%; font-size: .7rem; line-height: 1.8; }
  .hero__cifras li > span { font-size: .66rem; }
}
@media (max-width: 360px) {
  .hero__etiqueta { letter-spacing: .02em; }
  .hero__botones { flex-direction: column; align-items: stretch; }
  .hero__nota { align-items: flex-start; }
  .aire-vista__mapa { aspect-ratio: .86; }
}

/* ---------- 6. ODS y problema ---------- */
.ods-cabecera {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: start;
  margin-bottom: 1rem;
}
/* Insignia del ODS 11 dibujada con CSS (color oficial naranja-ámbar del ODS 11) */
.ods-insignia {
  width: clamp(110px, 16vw, 168px);
  aspect-ratio: 1;
  background: #fd9d24;
  color: #fff;
  border-radius: var(--radio);
  padding: .8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.ods-insignia__num { font-size: clamp(2.6rem, 6vw, 4rem); font-weight: 800; line-height: .9; letter-spacing: -.04em; }
.ods-insignia__texto { font-size: clamp(.72rem, 1.2vw, .88rem); font-weight: 700; line-height: 1.15; }
#titulo-ods { font-size: clamp(2.2rem, 5.6vw, 4.2rem); letter-spacing: -.035em; max-width: 22ch; }
/* En móvil la insignia va encima del título para que el texto tenga todo el ancho */
@media (max-width: 600px) {
  .ods-cabecera { grid-template-columns: 1fr; }
  .ods-insignia { width: 104px; }
}

.hechos {
  list-style: none;
  margin: 2.5rem 0 3.5rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 2rem 2.5rem;
}
.hecho { display: flex; gap: 1rem; align-items: flex-start; }
.hecho svg { flex: none; color: var(--verde); }
.hecho h3 { font-size: 1.15rem; margin-bottom: .3em; }
.hecho p { color: var(--tinta-2); margin: 0; }

/* Bloque "Cumplimos hoy / No cumplimos mañana" */
.veredicto {
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: clamp(1.25rem, 3vw, 2.25rem);
}
.veredicto__titulo { font-size: 1.3rem; }
.veredicto__ayuda { color: var(--tinta-2); }
.clave {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  vertical-align: -2px;
  margin-inline: .15em .1em;
}
.clave--cumple { background: var(--dato-cumple); }
.clave--supera { background: var(--dato-supera); }
.clave--justo { background: var(--dato-justo); }

.veredicto__rejilla {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 1.5rem 0 1rem;
}
.liston { padding: 1rem clamp(.75rem, 2vw, 1.5rem); }
.liston + .liston { border-left: 1px solid var(--borde); }
.liston h4 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -.03em; margin: 0; }
.liston__norma { font-size: .9rem; color: var(--tinta-3); min-height: 2.6em; margin-bottom: 1rem; }
.liston__fila { display: grid; grid-template-columns: 1fr auto; gap: .2rem .75rem; align-items: center; margin-bottom: 1rem; }
.liston__contaminante { grid-column: 1 / -1; font-weight: 650; font-size: .95rem; }
.liston__cuenta { font-size: .85rem; color: var(--tinta-2); white-space: nowrap; }
.liston__frase { font-size: 1.35rem; font-weight: 780; margin: .5rem 0 0; }
.liston--hoy .liston__frase { color: var(--verde-texto); }
.liston--2030 .liston__frase, .liston--oms .liston__frase { color: var(--azahar-texto); }

/* Fila de puntos: uno por estación. Azul = por debajo; naranja = lo supera; naranja claro = justo en el límite */
.puntos { display: flex; flex-wrap: wrap; gap: 5px; }
.punto {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--dato-cumple);
}
.punto--supera { background: var(--dato-supera); }
.punto--justo { background: var(--dato-justo); }

@media (max-width: 760px) {
  .veredicto__rejilla { grid-template-columns: 1fr; }
  .liston + .liston { border-left: 0; border-top: 1px solid var(--borde); }
  .liston__norma { min-height: 0; }
}

/* Ilustración de la calle (colores mediante variables, así cambia con el tema) */
.ilustracion-calle { margin: 3.5rem 0 0; }
.ilustracion-calle svg { display: block; width: 100%; height: auto; border-radius: var(--radio); }
.ilustracion-calle figcaption { font-size: .9rem; color: var(--tinta-3); margin-top: .6rem; }
.il-cielo { fill: var(--mar-suave); }
.il-mar { fill: var(--mar); opacity: .35; }
.il-ola { stroke: var(--superficie); opacity: .8; }
.il-edificio { fill: var(--superficie); stroke: var(--borde); stroke-width: 2; }
.il-ventana { fill: var(--tinte); }
.il-rotulo { fill: var(--verde); }
.il-texto-rotulo { fill: #fff; font: 700 12px var(--fuente); letter-spacing: .08em; }
.il-calle { fill: var(--tinta-3); opacity: .35; }
.il-linea { stroke: var(--superficie); }
.il-tronco { stroke: #8a6a45; }
.il-hoja { fill: var(--verde); }
.il-farola { stroke: var(--tinta-2); }
.il-panel { fill: var(--mar); }
.il-sensor { fill: var(--azahar); }
.il-bus { fill: #c8401e; }
.il-ventana-bus { fill: var(--mar-suave); }
.il-rueda { fill: var(--tinta); }
.il-bici { stroke: var(--tinta); }
.il-ondas { stroke: var(--azahar); }

/* ---------- 7. Vídeos ---------- */
.videos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 2rem;
}
.video { margin: 0; }
.video__fachada, .video iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: var(--radio);
  overflow: hidden;
  background: #000;
}
.video__fachada {
  position: relative;
  padding: 0;
  cursor: pointer;
}
.video__fachada img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* recorta las franjas negras de la miniatura 4:3 */
  opacity: .88;
  transition: opacity .2s;
}
.video__fachada:hover img { opacity: 1; }
.video__play {
  position: absolute;
  inset: 50% auto auto 50%;
  translate: -50% -50%;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #f0a04b;
  color: #193e31;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
}
.video figcaption { margin-top: .75rem; color: var(--tinta-2); font-size: .95rem; }
.video figcaption strong { color: var(--tinta); }

/* ---------- 8. Cómo funciona ---------- */
.diagrama { margin: 0 0 2.5rem; }
.diagrama svg { display: block; width: 100%; height: auto; }
.diagrama__estrecho { display: none !important; max-width: 360px; margin-inline: auto; }
@media (max-width: 700px) {
  .diagrama__ancho { display: none !important; }
  .diagrama__estrecho { display: block !important; }
}
.dg-caja { fill: var(--superficie); stroke: var(--borde); stroke-width: 2; }
.dg-caja--ia { fill: var(--mar-suave); stroke: var(--mar); }
.dg-caja--salida { fill: var(--verde-suave); stroke: var(--verde); }
.dg-titulo { fill: var(--tinta); font: 700 19px var(--fuente); }
.dg-texto { fill: var(--tinta-2); font: 400 15px var(--fuente); }
.dg-flecha { stroke: var(--tinta-3); }
.dg-punta { fill: var(--tinta-3); }

.principios {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1rem 2rem;
}
.principios li {
  padding-left: 1rem;
  border-left: 3px solid var(--verde);
  color: var(--tinta-2);
}
.principios strong { color: var(--tinta); display: block; }

.fichas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1.25rem;
}
.ficha {
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 1.25rem 1.4rem;
}
.ficha h4 { font-size: 1.2rem; }
.ficha dl { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1rem; margin: 0; font-size: .97rem; }
.ficha dt { color: var(--tinta-3); }
.ficha dd { margin: 0; }

/* ---------- 9. Mapa ---------- */
.mapa-envoltorio {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.25rem;
  align-items: start;
}
.mapa {
  height: min(70vh, 560px);
  min-height: 380px;
  border-radius: var(--radio);
  border: 1px solid var(--borde);
  background: var(--superficie);
  z-index: 0;
}
.mapa-leyenda {
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 1.1rem 1.25rem;
}
.mapa-leyenda h3 { font-size: 1.1rem; }
.mapa-leyenda ul { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .6rem; font-size: .95rem; }
.mapa-leyenda li { display: flex; gap: .6rem; align-items: flex-start; }
.ley { flex: none; width: 18px; height: 18px; border-radius: 50%; margin-top: .2em; border: 2px solid var(--superficie); box-shadow: 0 0 0 1px var(--tinta-3); }
.ley--bajo { background: var(--estado-bajo); }
.ley--limite { background: var(--estado-limite); }
.ley--alto { background: var(--estado-alto); }
.ley--sin { background: #8a99a6; }
.ley--propuesto { border-radius: 3px; rotate: 45deg; width: 14px; height: 14px; margin: .3em 2px 0; background: var(--superficie); box-shadow: 0 0 0 3px var(--verde); }
@media (max-width: 860px) {
  .mapa-envoltorio { grid-template-columns: 1fr; }
}

/* Marcadores personalizados de Leaflet */
.marcador-estacion {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  font: 750 13px var(--fuente);
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
.marcador-estacion--bajo { background: #347b58; }
.marcador-estacion--limite { background: #d99a00; color: #193e31; }
.marcador-estacion--alto { background: #c8401e; }
.marcador-estacion--sin { width: 22px; height: 22px; background: #8a99a6; }
/* Sin Internet no hay calles de fondo: dejamos un fondo suave para que los puntos se lean */
.mapa--sin-red { background: repeating-linear-gradient(45deg, var(--tinte), var(--tinte) 12px, var(--superficie) 12px, var(--superficie) 24px); }
.marcador-propuesto {
  display: block;
  width: 20px;
  height: 20px;
  rotate: 45deg;
  border-radius: 4px;
  background: #fff;
  border: 4px solid #347b58;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}
/* Ventanas emergentes del mapa con la tipografía y colores de la web */
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--superficie); color: var(--tinta); }
.leaflet-popup-content { font: 400 .95rem/1.45 var(--fuente); margin: 14px 16px; }
.leaflet-popup-content h3 { font-size: 1.05rem; margin-bottom: .3em; }
.leaflet-popup-content p { margin: 0 0 .4em; }
.leaflet-container a.leaflet-popup-close-button { color: var(--tinta-3); }
.leaflet-container { font-family: var(--fuente); }
.popup-aprox { color: var(--tinta-3); font-size: .85rem; }

/* ---------- 10. Datos ---------- */
.kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--borde);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  overflow: hidden;
  margin-bottom: 2.5rem;
}
.kpi { background: var(--superficie); padding: 1.1rem 1.25rem; }
.kpi__etiqueta { font-size: .9rem; color: var(--tinta-2); margin: 0 0 .25rem; }
.kpi__valor { font-size: clamp(1.9rem, 4vw, 2.5rem); font-weight: 700; line-height: 1.1; margin: 0; letter-spacing: -.02em; }
.kpi__valor small { font-size: .95rem; font-weight: 500; color: var(--tinta-3); letter-spacing: 0; }
.kpi__detalle { margin: .2rem 0 0; color: var(--tinta-3); font-size: .9rem; min-height: 1.4em; }
@media (max-width: 760px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .kpis { grid-template-columns: 1fr; } }

.graficas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}
@media (max-width: 900px) { .graficas { grid-template-columns: minmax(0, 1fr); } }
.grafica {
  margin: 0;
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 1.25rem 1.25rem 1rem;
  min-width: 0;
}
.grafica--ancha { grid-column: 1 / -1; }
.grafica figcaption h3 { font-size: 1.15rem; margin-bottom: .2em; }
.grafica figcaption p { font-size: .92rem; color: var(--tinta-3); margin-bottom: .75rem; }
.grafica__lienzo { position: relative; height: 340px; }
.grafica--ancha .grafica__lienzo { height: 300px; }
.grafica__leyenda { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: .88rem; color: var(--tinta-2); margin-bottom: .5rem; }
.grafica__leyenda span { display: inline-flex; align-items: center; gap: .4rem; }
.grafica__leyenda i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.grafica__leyenda i.linea { width: 18px; height: 0; border-top: 2px dashed var(--tinta-2); border-radius: 0; }

.tabla-datos { margin-top: 1.5rem; }
.tabla-datos summary {
  cursor: pointer;
  font-weight: 650;
  color: var(--mar);
  padding: .5rem 0;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.tabla-scroll { position: relative; overflow-x: auto; max-width: 100%; } /* relative: contiene el texto oculto para lectores */
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
caption { text-align: left; color: var(--tinta-3); font-size: .9rem; padding-bottom: .5rem; }
th, td { padding: .6rem .75rem; border-bottom: 1px solid var(--borde); text-align: left; }
thead th { font-weight: 650; color: var(--tinta-2); }
.tabla-datos td:not(:first-child), .tabla-datos th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }

.explicaciones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 2rem 3rem;
  margin-top: 3rem;
}
.explicaciones h3 { font-size: 1.3rem; }
.explicaciones p { color: var(--tinta-2); max-width: 62ch; }

/* Así lo hemos analizado con pandas: tarjetas con el código y el resultado */
.pandas { margin-top: 1rem; }
.pandas__intro { color: var(--tinta-2); max-width: 70ch; }
.pandas__lista {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 1rem;
  counter-reset: paso;
}
.operacion {
  counter-increment: paso;
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 1rem 1.1rem 1.1rem;
}
.operacion__que { font-weight: 700; margin: 0 0 .5rem; padding-right: 2rem; }
/* Número de paso arriba a la derecha */
.operacion::after {
  content: counter(paso);
  position: absolute;
  top: .8rem;
  right: .9rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: .8rem;
  font-weight: 750;
  background: var(--mar-suave);
  color: var(--tinta);
}
.operacion pre {
  margin: 0 0 .75rem;
  padding: .6rem .7rem;
  border-radius: var(--radio-peq);
  background: #193e31;
  color: #dbe8f1;
  font-size: .85rem;
  white-space: pre-wrap;       /* el código se parte en varias líneas en vez de salirse de la tarjeta */
  overflow-wrap: anywhere;
}
.operacion pre code { background: none; padding: 0; font-size: inherit; color: inherit; }
.operacion__res { margin: auto 0 0; color: var(--tinta-2); font-size: .97rem; }
.operacion__res strong { color: var(--tinta); font-size: 1.15em; }

/* Avisos cuando falta la conexión (mapa, vídeos) */
.aviso-red {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  max-width: 80ch;
  margin: 1rem 0 1.5rem;
  padding: .75rem 1rem;
  border-radius: var(--radio-peq);
  border-left: 4px solid var(--azahar);
  background: color-mix(in srgb, var(--azahar) 12%, var(--superficie));
  color: var(--tinta);
  font-size: .95rem;
}
.aviso-red[hidden] { display: none; }
.aviso-red::before { content: "!"; flex: none; width: 1.4rem; height: 1.4rem; border-radius: 50%; display: grid; place-items: center; background: var(--azahar); color: #193e31; font-weight: 800; font-size: .85rem; }

/* Miniatura de vídeo sin conexión: en lugar de una imagen rota, un fondo con texto */
.video__fachada--sin-red img { visibility: hidden; }
.video__fachada--sin-red { background: #193e31; }
.video__fachada--sin-red::after {
  content: "Vídeo no disponible sin conexión";
  position: absolute;
  inset: auto 0 1rem;
  text-align: center;
  color: #dbe8f1;
  font-weight: 600;
  font-size: .95rem;
}

/* Aparición suave al bajar (main.js añade las clases) */
.aparece { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--retraso, 0ms); }
.aparece.aparece--visto { opacity: 1; transform: none; }

/* ---------- 11. Catálogo ---------- */
/* Cinco tarjetas en fila, de la gama más pequeña (un aula) a la más grande (toda la ciudad) */
.catalogo {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
  padding-top: 14px; /* hueco para el sello "Recomendado" */
}
.producto {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 1.4rem 1.2rem 1.25rem;
}
.producto:hover { border-color: var(--mar); }
.producto { transition: border-color .2s, opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
.producto__nombre { font-size: 1.3rem; margin-bottom: .15em; }
/* Ilustraciones propias de cada producto (colores del tema) */
.producto__dibujo { display: block; width: 100%; height: 72px; margin-bottom: .9rem; background: var(--tinte); border-radius: var(--radio-peq); padding: 6px 0; }
.pd-borde { fill: var(--superficie); stroke: var(--tinta-2); stroke-width: 2.5; stroke-linejoin: round; }
.pd-pantalla { fill: var(--mar-suave); }
.pd-aro { fill: none; stroke: var(--azahar); stroke-width: 4; }
.pd-linea { stroke: var(--tinta-3); stroke-width: 3; stroke-linecap: round; }
.pd-relleno { fill: var(--tinta-2); }
.pd-verde { fill: var(--estado-bajo); }
.pd-ambar { fill: var(--estado-limite); }
.pd-rojo { fill: var(--estado-alto); }
.pd-sensor { fill: var(--azahar); }
.pd-panel { fill: var(--mar); }
.pd-poste { fill: none; stroke: var(--tinta-2); stroke-width: 4; stroke-linecap: round; }
.pd-onda { fill: none; stroke: var(--azahar); stroke-width: 2.5; stroke-linecap: round; }
.producto__ahorro { font-size: .88rem; font-weight: 600; color: var(--verde-texto); background: var(--verde-suave); border-radius: var(--radio-peq); padding: .4rem .6rem; margin: -.25rem 0 1rem; }
.producto__para { color: var(--tinta-3); font-size: .95rem; margin-bottom: 1rem; }
.producto__precio { margin-bottom: 1rem; line-height: 1.15; }
.precio { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; }
.precio__unidad { display: block; font-size: .9rem; color: var(--tinta-3); }
.producto__lista { padding-left: 1.1rem; margin: 0 0 1.25rem; color: var(--tinta-2); font-size: .97rem; }
.producto__lista li + li { margin-top: .35rem; }
.producto .boton { margin-top: auto; width: 100%; padding-inline: .6em; font-size: .97rem; white-space: nowrap; }
.producto--recomendado {
  border: 2px solid var(--azahar);
  box-shadow: var(--sombra);
}
.producto__sello {
  position: absolute;
  top: -14px;
  left: 1.2rem;
  margin: 0;
  padding: .15em .7em;
  border-radius: 999px;
  background: var(--azahar);
  color: #193e31;
  font-size: .85rem;
  font-weight: 750;
}
@media (max-width: 1100px) {
  .catalogo { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); row-gap: 1.75rem; }
}

/* Comparador */
.comparador-envoltorio { background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio); }
.comparador { min-width: 640px; }
.comparador th[scope="col"], .comparador td { position: relative; text-align: center; }
.comparador tbody th { font-weight: 500; }
.comparador tbody tr:last-child th, .comparador tbody tr:last-child td { border-bottom: 0; }
.comparador .col-recomendada { background: color-mix(in srgb, var(--azahar) 12%, transparent); }
.comparador thead .col-recomendada { color: var(--tinta); font-weight: 750; }
.comparador__precio td { font-weight: 650; font-size: .92rem; }
.marca-si, .marca-no { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; }
.marca-si { background: var(--verde-suave); color: var(--verde-texto); }
.marca-no { color: var(--tinta-3); }

/* Pedido: carrito + formulario */
.pedido {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 1.5rem;
  margin-top: 3.5rem;
  align-items: start;
}
@media (max-width: 860px) { .pedido { grid-template-columns: minmax(0, 1fr); } }
.carrito, .formulario {
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: clamp(1.1rem, 3vw, 1.75rem);
}
.carrito__vacio { color: var(--tinta-2); }
.carrito__lista { list-style: none; margin: 0; padding: 0; }
.linea-carrito {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .4rem 1rem;
  padding: .9rem 0;
  border-bottom: 1px solid var(--borde);
}
.linea-carrito__nombre { font-weight: 650; }
.linea-carrito__detalle { grid-column: 1; font-size: .88rem; color: var(--tinta-3); }
.linea-carrito__importe { grid-row: 1; grid-column: 2; text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.cantidad { grid-column: 1 / -1; display: flex; align-items: center; gap: .4rem; }
.cantidad button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--borde);
  background: var(--fondo);
  color: var(--tinta);
  font: inherit;
  font-size: 1.2rem;
  cursor: pointer;
}
.cantidad button:hover { border-color: var(--mar); }
.cantidad input {
  width: 4.2em;
  height: 40px;
  text-align: center;
  font: inherit;
  border: 1px solid var(--borde);
  border-radius: var(--radio-peq);
  background: var(--fondo);
  color: var(--tinta);
}
.cantidad .quitar { width: auto; border-radius: 999px; padding: 0 .9em; font-size: .9rem; margin-left: auto; }
.carrito__totales { display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; margin: 1rem 0 .5rem; }
.carrito__totales dt { color: var(--tinta-2); }
.carrito__totales dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.carrito__total { font-size: 1.3rem; font-weight: 780; color: var(--tinta) !important; padding-top: .4rem; border-top: 1px solid var(--borde); }

.formulario__aviso {
  background: var(--mar-suave);
  border-radius: var(--radio-peq);
  padding: .75rem 1rem;
  font-size: .95rem;
}
.campo { margin-bottom: 1rem; }
.campo label { display: block; font-weight: 600; margin-bottom: .3rem; }
.opcional { font-weight: 400; color: var(--tinta-3); }
.campo input:not([type="checkbox"]), .campo select, .campo textarea {
  width: 100%;
  min-height: 46px;
  padding: .6rem .8rem;
  font: inherit;
  color: var(--tinta);
  background: var(--fondo);
  border: 1.5px solid var(--borde);
  border-radius: var(--radio-peq);
}
.campo textarea { resize: vertical; }
.campo [aria-invalid="true"] { border-color: var(--estado-alto) !important; }
.campo__error { color: var(--estado-alto); font-size: .9rem; margin: .3rem 0 0; min-height: 0; }
.campo__error:empty { display: none; }
.campo--check { display: grid; grid-template-columns: auto 1fr; gap: .2rem .6rem; align-items: start; }
.campo--check input { width: 22px; height: 22px; margin: .15rem 0 0; accent-color: var(--mar); }
.campo--check label { font-weight: 450; margin: 0; }
.campo--check .campo__error { grid-column: 1 / -1; }
.formulario__ok {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radio-peq);
  background: var(--verde-suave);
  border-left: 4px solid var(--verde);
}
.formulario__ok p { margin: 0 0 .4em; }
.formulario__ok p:last-child { margin: 0; }

/* ---------- 12. Calculadora ---------- */
.calculadora {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  margin-bottom: 1rem;
}
@media (max-width: 860px) { .calculadora { grid-template-columns: minmax(0, 1fr); } }
.control { margin-bottom: 1.75rem; }
.control label { display: block; font-weight: 650; margin-bottom: .4rem; }
.control__fila { display: flex; align-items: center; gap: 1rem; }
.control input[type="range"] { flex: 1; min-width: 0; accent-color: var(--mar); height: 32px; }
.control output {
  min-width: 3.2em;
  text-align: center;
  font-weight: 750;
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
  background: var(--tinte);
  border-radius: var(--radio-peq);
  padding: .2em .4em;
}
.calculadora__resultados {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--borde);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  overflow: hidden;
}
.resultado { background: var(--superficie); padding: 1.1rem 1.25rem; }
.resultado--grande, .resultado--coste { grid-column: 1 / -1; }
.resultado--grande { background: var(--mar-suave); }
.resultado__valor { font-size: clamp(1.9rem, 4vw, 2.5rem); font-weight: 750; line-height: 1.1; margin: 0 0 .2rem; letter-spacing: -.02em; }
.resultado--grande .resultado__valor { font-size: clamp(3rem, 8vw, 4.75rem); letter-spacing: -.04em; }
.resultado__texto { color: var(--tinta-2); margin: 0; font-size: .97rem; }
.resultado--coste .resultado__valor { margin-top: .2rem; }
@media (max-width: 420px) { .calculadora__resultados { grid-template-columns: 1fr; } }

/* ---------- 13. Equipo, fuentes y pie ---------- */
.equipo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.25rem;
}
.persona {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 1.4rem;
}
.persona__avatar { flex: none; width: 72px; height: 72px; }
.av-fondo { fill: var(--mar-suave); }
.av-figura { fill: var(--mar); }
.av-iniciales { fill: var(--tinta); font: 800 26px var(--fuente); letter-spacing: -.02em; }
.persona h3 { margin-bottom: .1em; }
.persona__papel { color: var(--tinta-3); font-size: .95rem; margin-bottom: .5rem; }
.persona p:last-child { margin: 0; color: var(--tinta-2); }

.fuentes { padding-left: 1.2rem; max-width: 85ch; color: var(--tinta-2); }
.fuentes li + li { margin-top: .6rem; }
.fuentes a { overflow-wrap: anywhere; }

.pie {
  background: #193e31;
  color: #dbe8f1;
  padding: 3rem 0;
}
.pie__dentro { display: grid; gap: 1.25rem; }
.pie__marca { display: flex; align-items: center; gap: .8rem; }
.pie__marca p { margin: 0; line-height: 1.35; }
.pie__marca strong { color: #fff; }
/* El logo de Marinada en el pie lleva el verde y azul sobre fondo oscuro: le damos un fondo claro */
.pie__marca img { background: #f8f9f3; border-radius: 10px; padding: 4px; }
.pie__aviso { font-weight: 600; color: #fff; max-width: 70ch; margin: 0; }
.pie__creditos { font-size: .9rem; color: #a9c2d4; margin: 0; }

/* ---------- Detalles de lectura y navegación ---------- */
.seccion { border-top: 1px solid var(--borde); }
.seccion__etiqueta { color: var(--verde-texto); font-size: .65rem; letter-spacing: .15em; font-weight: 700; margin: 0 0 20px; }
.seccion h2 { max-width: 23ch; font-size: clamp(2rem, 4.2vw, 3.6rem); line-height: 1.06; letter-spacing: -.045em; }
.entradilla { font-size: 1.05rem; line-height: 1.75; margin-top: 18px; max-width: 72ch; }
.ods-cabecera { grid-template-columns: 1fr 176px; }
.ods-cabecera > .ods-insignia { grid-column: 2; grid-row: 1; width: 160px; justify-self: end; border-radius: 10px; }
.ods-cabecera > div:last-child { grid-column: 1; grid-row: 1; }
#titulo-ods { max-width: 22ch; }
.ods-cabecera .entradilla { margin-bottom: 0; }
.hechos { gap: 32px; }
.hecho { padding-top: 24px; border-top: 1px solid var(--borde); }
.hecho p { font-size: .95rem; line-height: 1.7; }
.ficha, .persona, .grafica, .producto, .operacion { box-shadow: 0 2px 3px #193e3103; }
.ficha { padding: 26px; }
.producto { padding: 24px 18px 20px; }
.producto__dibujo { height: 100px; padding: 14px 0; margin-bottom: 24px; }
.producto__nombre { font-size: 1.2rem; }
.producto__lista { font-size: .87rem; line-height: 1.6; }
.producto__para, .producto__ahorro { font-size: .82rem; }
.producto .boton { font-size: .85rem; min-height: 46px; }
.producto--recomendado { border-color: var(--verde); }
.producto__sello { background: var(--verde); color: #fff; border-radius: 5px; }
.grafica { padding: clamp(18px, 2.5vw, 30px); }
.grafica h3 { font-size: 1.18rem; }
.kpi__valor { letter-spacing: -.045em; }
.tabla-datos summary { padding-block: 15px; }
.pie { background: #193e31; padding-block: 56px 28px; }
.pie__dentro { gap: 20px; }
.pie__marca { margin-bottom: 12px; }
.pie__marca img { background: #f8f9f3; }
.pie__marca strong { font-size: 1.4rem; }
.pie__marca p { color: #c4d8c7; font-size: .9rem; }
.pie__aviso { font-size: .88rem; color: #e6eee2; font-weight: 450; }
.pie__creditos { font-size: .74rem; color: #b5cdbd; }
.pie__nav { display: flex; flex-wrap: wrap; gap: 12px 30px; margin-top: 16px; border-top: 1px solid #496654; padding-top: 20px; }
.pie__nav a { display: inline-flex; align-items: center; color: #e6eee2; font-size: .78rem; min-height: 44px; text-decoration: none; }
.pie__nav a:hover { text-decoration: underline; }
.pie__nav a:last-child { margin-left: auto; }
.cabecera::after { content: ''; position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--verde); transform: scaleX(var(--progreso, 0)); transform-origin: left; }
.nav a[aria-current="true"] { background: var(--verde-suave); color: var(--verde-texto); }
.nav a { min-height: 44px; display: flex; align-items: center; }
.boton-carrito__num { background: var(--verde-suave); color: var(--verde-texto); font-size: .65rem; min-width: 17px; height: 17px; line-height: 17px; top: 0; right: 0; }
.estacion-card select:disabled { opacity: 1; cursor: default; }
@media (max-width: 1020px) {
  .nav { max-height: calc(100dvh - var(--alto-cabecera)); overflow-y: auto; }
  .nav a { font-size: 1rem; }
}
@media (max-width: 900px) {
  .contenedor, .cabecera__dentro { width: calc(100% - 48px); }
  .ods-cabecera { grid-template-columns: 1fr 120px; gap: 24px; }
  .ods-cabecera > .ods-insignia { width: 120px; }
}
@media (max-width: 650px) {
  :root { --alto-cabecera: 72px; }
  .contenedor, .cabecera__dentro { width: calc(100% - 40px); }
  .seccion { padding-block: 60px; }
  .seccion__etiqueta { margin-bottom: 16px; font-size: .59rem; }
  .entradilla { font-size: .95rem; line-height: 1.7; }
  .ods-cabecera { grid-template-columns: 1fr; gap: 24px; }
  .ods-cabecera > .ods-insignia { grid-column: 1; grid-row: 1; width: 88px; justify-self: start; }
  .ods-cabecera > div:last-child { grid-column: 1; grid-row: 2; }
  .ods-insignia__num { font-size: 2.5rem; }
  .ods-insignia__texto { font-size: .57rem; }
  .persona { padding: 20px; gap: 14px; }
  .persona__avatar { width: 52px; height: 52px; }
  .pie__nav { gap: 4px 24px; }
  .pie__nav a:last-child { margin-left: 0; }
}
@media (max-width: 380px) {
  .marca span { font-size: .93rem; }
  .marca small { font-size: .55rem; }
  .marca img { width: 30px; }
  .cabecera__acciones { gap: 0; }
  .boton-menu, .boton-tema, .boton-carrito { width: 40px; height: 44px; }
  .ficha dl { grid-template-columns: 1fr; gap: 4px; }
  .ficha dd { margin-bottom: 10px; }
}

/* ---------- 14. Movimiento reducido e impresión ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media print {
  .cabecera, .hero__lienzo, .videos, .mapa-envoltorio, .formulario, .boton { display: none !important; }
  .hero { min-height: 0; background: none; color: #000; }
  .hero__eslogan, .hero__producto p { color: #000; }
}
