/* ============================================================
   CAFÉ IQ — LABORATORIO
   Interfaz científica · papel milimétrico · instrumentos vivos
   ------------------------------------------------------------
   ÍNDICE
   00 · Variables y reset
   01 · Fondo milimétrico y utilidades
   02 · Tipografía base
   03 · Barra de instrumento (sticky)
   04 · Hero / tablero
   05 · Cluster de instrumentos
   06 · Diagnosticador
   07 · Protocolos (servicios)
   08 · Esquema interactivo
   09 · Registro (bitácora)
   10 · Garantías (certificado)
   11 · CTA final
   12 · Footer
   13 · Guía (overrides en guide/)
   14 · Responsive
   15 · Reduced motion
   ============================================================ */

/* ---------- 00 · VARIABLES Y RESET ---------- */
:root {
  --blanco: #FAFAF7;
  --grafito: #1F2421;
  --gris-medio: #8A8F8A;
  --gris-texto: #6B706B;
  --reticula: #E4E2D9;
  --azul: #2851E3;
  --azul-suave: rgba(40, 81, 227, 0.06);
  --naranja: #FF5A1F;
  --verde: #0E9F6E;
  --verde-texto: #0A7A54;

  --fuente-ui: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --fuente-mono: "JetBrains Mono", "SF Mono", Menlo, monospace;

  --borde: 1px solid var(--grafito);
  --radio: 3px;
  --sombra-dura: 3px 3px 0 rgba(31, 36, 33, 0.12);

  --ancho-max: 1240px;
  --pad-x: clamp(1.25rem, 4vw, 3rem);
  --alto-barra: 52px;

  --paso-seccion: clamp(4.5rem, 9vw, 8rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--alto-barra) + 16px);
}

body {
  font-family: var(--fuente-ui);
  color: var(--grafito);
  background-color: var(--blanco);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* OJO: NO poner tabular-nums aquí — en Schibsted Grotesk el rasgo tnum
     ensancha coma y punto a ancho de dígito y la puntuación "flota".
     Las cifras tabulares se aplican por clase (mono/.num/.dato/tablas). */
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

a {
  color: inherit;
}

::selection {
  background: var(--azul);
  color: var(--blanco);
}

/* Foco visible custom — nunca suprimido */
:focus {
  outline: none;
}

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

/* ---------- 01 · FONDO MILIMÉTRICO Y UTILIDADES ---------- */
.fondo-milimetrico {
  background-image:
    linear-gradient(rgba(228, 226, 217, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(228, 226, 217, 0.5) 1px, transparent 1px),
    linear-gradient(rgba(31, 36, 33, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 36, 33, 0.045) 1px, transparent 1px);
  background-size:
    8px 8px,
    8px 8px,
    80px 80px,
    80px 80px;
}

.contenedor {
  max-width: var(--ancho-max);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.solo-lectores {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Etiqueta de instrumento: [ PRES-01 ] */
.etiqueta {
  font-family: var(--fuente-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gris-texto);
  font-variant-numeric: tabular-nums;
}

.etiqueta--azul { color: var(--azul); }
.etiqueta--naranja { color: var(--naranja); }
.etiqueta--verde { color: var(--verde-texto); }

/* Números: SIEMPRE mono tabular */
.dato,
.num {
  font-family: var(--fuente-mono);
  font-variant-numeric: tabular-nums;
}

/* Cruces de registro en esquinas de paneles */
.panel-marcado {
  position: relative;
}

.cruz {
  position: absolute;
  width: 11px;
  height: 11px;
  pointer-events: none;
  color: var(--gris-medio);
}

.cruz::before,
.cruz::after {
  content: "";
  position: absolute;
  background: currentColor;
}

.cruz::before {
  left: 5px;
  top: 0;
  width: 1px;
  height: 11px;
}

.cruz::after {
  top: 5px;
  left: 0;
  height: 1px;
  width: 11px;
}

.cruz--tl { top: -5px; left: -5px; }
.cruz--tr { top: -5px; right: -5px; }
.cruz--bl { bottom: -5px; left: -5px; }
.cruz--br { bottom: -5px; right: -5px; }

/* Encabezado de sección estándar */
.cabecera-seccion {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  border-bottom: var(--borde);
  padding-bottom: 0.85rem;
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
}

.cabecera-seccion h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.cabecera-seccion .etiqueta {
  transform: translateY(-2px);
}

.cabecera-seccion .cabecera-nota {
  margin-left: auto;
  font-family: var(--fuente-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--gris-texto);
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

section {
  padding-block: var(--paso-seccion);
}

/* ---------- 02 · TIPOGRAFÍA BASE ---------- */
h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  max-width: 62ch;
}

.texto-secundario {
  color: var(--gris-texto);
}

/* ---------- 03 · BARRA DE INSTRUMENTO ---------- */
.barra-instrumento {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--alto-barra);
  background: var(--blanco);
  border-bottom: var(--borde);
  display: flex;
  align-items: center;
}

.barra-instrumento .contenedor {
  width: 100%;
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2.5vw, 2rem);
}

.barra-logo {
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 0.5em;
  text-decoration: none;
  white-space: nowrap;
}

.barra-logo .engrane {
  width: 18px;
  height: 18px;
}

/* Nota de marcas atendidas bajo el registro */
.registro-marcas {
  margin-top: 1rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--gris-medio, #8A8F8A);
  letter-spacing: 0.01em;
}
.registro-marcas strong { color: var(--grafito, #1F2421); font-weight: 700; }

/* ============ Reseñas (Google) ============ */
.resenas-resumen {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  flex-wrap: wrap;
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.5rem;
}
.resenas-info { display: flex; align-items: center; gap: 1rem; max-width: 66ch; }
.resenas-estrellas { color: var(--verde); font-size: 1.5rem; letter-spacing: 0.1em; line-height: 1; flex: none; }
.resenas-cifra { font-weight: 700; font-size: 1.05rem; color: var(--grafito); display: block; }
.resenas-info p { margin: 0.1rem 0 0; color: var(--gris-texto); font-size: 0.9rem; line-height: 1.5; }

.resenas-grid { columns: 3 320px; column-gap: 1.25rem; }
@media (max-width: 640px) { .resenas-grid { columns: 1; } }

.resena-card {
  break-inside: avoid;
  margin: 0 0 1.25rem;
  padding: 1.25rem 1.35rem 1.15rem;
  background: var(--papel, #FAFAF7);
  border: 1px solid var(--grafito);
  border-radius: 3px;
}
.resena-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.7rem; }
.resena-estrellas { color: var(--verde); letter-spacing: 0.08em; font-size: 0.95rem; line-height: 1; }
.resena-fuente { font-size: 0.625rem; font-weight: 700; letter-spacing: 0.14em; color: var(--gris-medio); }
.resena-card blockquote { margin: 0; font-size: 0.925rem; line-height: 1.6; color: var(--grafito); }
.resena-card figcaption { display: flex; align-items: center; gap: 0.7rem; margin-top: 1rem; padding-top: 0.85rem; border-top: 1px dotted var(--gris-medio); }
.resena-avatar {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--fuente-mono); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.02em;
  color: var(--papel, #FAFAF7);
}
.resena-avatar--azul { background: var(--azul); }
.resena-avatar--verde { background: var(--verde); }
.resena-avatar--naranja { background: var(--naranja); }
.resena-avatar--grafito { background: var(--grafito); }
.resena-quien { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.resena-nombre { font-weight: 700; font-size: 0.875rem; color: var(--grafito); }
.resena-meta { font-size: 0.625rem; letter-spacing: 0.06em; color: var(--gris-medio); }
.resena-reply {
  margin-top: 0.85rem; padding: 0.7rem 0.85rem;
  background: var(--azul-suave); border-left: 2px solid var(--azul); border-radius: 0 3px 3px 0;
}
.resena-reply-quien { display: block; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.12em; color: var(--azul); margin-bottom: 0.3rem; }
.resena-reply p { margin: 0; font-size: 0.8rem; line-height: 1.5; color: var(--gris-texto); }

.barra-logo .lab-tag {
  font-family: var(--fuente-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--azul);
  border: 1px solid var(--azul);
  border-radius: 2px;
  padding: 1px 5px;
}

.barra-dato {
  font-family: var(--fuente-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--gris-texto);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.barra-reloj {
  color: var(--grafito);
  font-weight: 600;
}

.barra-estado {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--fuente-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: var(--verde-texto);
  white-space: nowrap;
}

.led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--verde);
  box-shadow: 0 0 0 0 rgba(14, 159, 110, 0.55);
  animation: led-pulso 2s ease-out infinite; /* misma cadencia que ● REG */
}

@keyframes led-pulso {
  0%   { box-shadow: 0 0 0 0 rgba(14, 159, 110, 0.55); }
  60%  { box-shadow: 0 0 0 7px rgba(14, 159, 110, 0); }
  100% { box-shadow: 0 0 0 0 rgba(14, 159, 110, 0); }
}

/* ---------- 04 · HERO / TABLERO ---------- */
.hero {
  border-bottom: var(--borde);
  padding-block: clamp(3rem, 7vw, 6rem) clamp(3.5rem, 7vw, 6rem);
}

.hero-rejilla {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.hero-kicker {
  display: inline-block;
  margin-bottom: 1.4rem;
}

.hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 4.4rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.028em;
  margin-bottom: 1.4rem;
}

.hero h1 .h1-linea {
  display: block;
}

.hero h1 em {
  font-style: normal;
  color: var(--azul);
}

.hero-sub {
  font-size: clamp(1rem, 1.5vw, 1.16rem);
  color: var(--gris-texto);
  max-width: 46ch;
  margin-bottom: 2.2rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
}

/* Botones del sistema */
.boton {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--fuente-mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: var(--borde);
  border-radius: var(--radio);
  padding: 0.9em 1.5em;
  min-height: 44px;
  white-space: nowrap;
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.3, 1),
              box-shadow 0.18s cubic-bezier(0.2, 0.8, 0.3, 1),
              background-color 0.18s ease,
              color 0.18s ease;
}

.boton--primario {
  background: var(--naranja);
  border-color: var(--grafito);
  color: var(--grafito);
  box-shadow: var(--sombra-dura);
}

.boton--primario:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 rgba(31, 36, 33, 0.16);
}

.boton--primario:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 rgba(31, 36, 33, 0);
}

.boton--secundario {
  background: var(--blanco);
  color: var(--grafito);
}

.boton--secundario:hover {
  background: var(--grafito);
  color: var(--blanco);
}

.boton--secundario:active {
  transform: translate(1px, 1px);
}

.boton--azul {
  background: var(--azul);
  border-color: var(--azul);
  color: #FFFFFF;
  box-shadow: var(--sombra-dura);
}

.boton--azul:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 rgba(31, 36, 33, 0.16);
}

.boton--azul:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 rgba(31, 36, 33, 0);
}

.hero-especificaciones {
  margin-top: 2.6rem;
  display: flex;
  gap: 0;
  border: var(--borde);
  border-radius: var(--radio);
  overflow: hidden;
  max-width: 30rem;
}

.hero-espec {
  flex: 1;
  padding: 0.7rem 0.9rem;
  border-right: var(--borde);
}

.hero-espec:last-child {
  border-right: none;
}

.hero-espec .num {
  display: block;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero-espec .etiqueta {
  font-size: 0.575rem;
  letter-spacing: 0.1em;
}

/* ---------- 05 · CLUSTER DE INSTRUMENTOS ---------- */
.cluster {
  border: var(--borde);
  border-radius: var(--radio);
  background: var(--blanco);
  box-shadow: var(--sombra-dura);
}

.cluster-cabecera {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 1rem;
  border-bottom: var(--borde);
}

.cluster-cabecera .titulo {
  font-family: var(--fuente-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.cluster-cabecera .etiqueta {
  white-space: nowrap;
}

.cluster-rejilla {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.instrumento {
  padding: 1.1rem 1.1rem 0.9rem;
  border-right: var(--borde);
  border-bottom: var(--borde);
  min-width: 0;
}

.instrumento:nth-child(2n) {
  border-right: none;
}

.instrumento--ancho {
  grid-column: 1 / -1;
  border-right: none;
  border-bottom: none;
}

.instrumento-pie {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 0.55rem;
  gap: 0.5rem;
}

.instrumento-lectura {
  font-family: var(--fuente-mono);
  font-weight: 700;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.instrumento-lectura .unidad {
  font-size: 0.7em;
  font-weight: 500;
  color: var(--gris-texto);
}

/* Manómetro */
.manometro svg {
  width: 100%;
  height: auto;
}

/* Termómetro / odómetro */
.odometro {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 1.2rem 0 0.6rem;
  font-family: var(--fuente-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: clamp(2.1rem, 3.5vw, 2.7rem);
  line-height: 1;
}

.odometro .digito {
  position: relative;
  width: 0.72em;
  height: 1.15em;
  overflow: hidden;
  border: 1px solid var(--reticula);
  border-radius: 2px;
  background: #FFFFFF;
  text-align: center;
}

.odometro .digito .rollo {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  will-change: transform;
}

.odometro .digito .rollo span {
  display: block;
  height: 1.15em;
  line-height: 1.15em;
}

.odometro .punto-decimal,
.odometro .unidad-temp {
  padding-inline: 0.08em;
}

.odometro .unidad-temp {
  font-size: 0.42em;
  font-weight: 500;
  color: var(--gris-texto);
  align-self: flex-end;
  padding-bottom: 0.4em;
}

/* Gráfica de flujo */
.grafica-flujo {
  position: relative;
}

/* Punto de registro "● REG": la gráfica está grabando */
.reg-indicador {
  position: absolute;
  top: 1rem;
  right: 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--fuente-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--naranja);
}

.reg-punto {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--naranja);
  /* parpadeo seco de grabadora, sincronizado al LED (2 s) */
  animation: reg-parpadeo 2s steps(1, end) infinite;
}

@keyframes reg-parpadeo {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.12; }
}

.grafica-flujo svg {
  width: 100%;
  height: auto;
}

.grafica-flujo .eje {
  stroke: var(--gris-medio);
  stroke-width: 1;
}

.grafica-flujo .rejilla-linea {
  stroke: var(--reticula);
  stroke-width: 1;
}

.grafica-flujo .curva {
  stroke: var(--azul);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.grafica-flujo .punto-movil {
  fill: var(--naranja);
}

.grafica-flujo .texto-eje {
  font-family: var(--fuente-mono);
  font-size: 8px;
  fill: var(--gris-texto);
}

/* ---------- 06 · DIAGNOSTICADOR ---------- */
.diagnosticador {
  border-bottom: var(--borde);
}

.diag-panel {
  border: var(--borde);
  border-radius: var(--radio);
  background: var(--blanco);
  box-shadow: var(--sombra-dura);
  overflow: hidden;
}

.diag-cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.9rem 1.4rem;
  border-bottom: var(--borde);
  background: var(--grafito);
  color: var(--blanco);
}

.diag-cabecera .titulo {
  font-family: var(--fuente-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.diag-cabecera .etiqueta {
  color: rgba(250, 250, 247, 0.65);
}

/* Stepper */
.diag-pasos {
  display: flex;
  border-bottom: var(--borde);
}

.diag-paso-indicador {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.1rem;
  border-right: var(--borde);
  font-family: var(--fuente-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gris-texto);
  transition: background-color 0.25s ease, color 0.25s ease;
}

.diag-paso-indicador:last-child {
  border-right: none;
}

.diag-paso-indicador .paso-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.6rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.diag-paso-indicador.activo {
  color: var(--azul);
  background: var(--azul-suave);
}

.diag-paso-indicador.completo {
  color: var(--verde-texto);
}

.diag-cuerpo {
  padding: clamp(1.4rem, 3.5vw, 2.5rem);
  min-height: 340px;
}

/* fieldsets del stepper: sin cromo de agente de usuario */
.diag-paso-panel {
  border: none;
  min-width: 0;
}

legend.diag-pregunta {
  float: left;
  width: 100%;
}

legend.diag-pregunta + * {
  clear: both;
}

.diag-pregunta {
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 1.4rem;
}

.diag-pregunta .etiqueta {
  display: block;
  margin-bottom: 0.45rem;
}

/* Radio-cards de equipo */
.equipo-rejilla {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
}

.equipo-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.equipo-card {
  position: relative;
  display: block;
  border: var(--borde);
  border-radius: var(--radio);
  padding: 1rem 1.1rem 0.9rem;
  cursor: pointer;
  background: var(--blanco);
  transition: border-color 0.18s ease, background-color 0.18s ease,
              transform 0.18s cubic-bezier(0.2, 0.8, 0.3, 1),
              box-shadow 0.18s ease;
}

.equipo-card:hover {
  border-color: var(--azul);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 rgba(40, 81, 227, 0.15);
}

.equipo-card:has(input:focus-visible) {
  outline: 2px solid var(--azul);
  outline-offset: 3px;
}

.equipo-card:has(input:checked) {
  border-color: var(--azul);
  background: var(--azul-suave);
  box-shadow: 3px 3px 0 rgba(40, 81, 227, 0.2);
}

.equipo-card .equipo-codigo {
  display: block;
  margin-bottom: 0.55rem;
}

.equipo-card:has(input:checked) .equipo-codigo {
  color: var(--azul);
}

.equipo-card .equipo-icono {
  width: 34px;
  height: 34px;
  margin-bottom: 0.7rem;
  color: var(--grafito);
  stroke-width: 1.5;
}

.equipo-card:has(input:checked) .equipo-icono {
  color: var(--azul);
}

.equipo-card .equipo-nombre {
  display: block;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.equipo-card .marca-radio {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--gris-medio);
  border-radius: 50%;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.equipo-card:has(input:checked) .marca-radio {
  border-color: var(--azul);
  background: var(--azul);
  box-shadow: inset 0 0 0 2.5px var(--blanco);
}

/* Chips de síntomas */
.sintomas-nube {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  border: var(--borde);
  border-radius: 999px;
  padding: 0.6em 1.1em;
  min-height: 44px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--blanco);
  transition: border-color 0.15s ease, background-color 0.15s ease,
              color 0.15s ease, transform 0.15s cubic-bezier(0.2, 0.8, 0.3, 1);
  user-select: none;
}

.chip:hover {
  border-color: var(--azul);
  color: var(--azul);
}

.chip:has(input:focus-visible) {
  outline: 2px solid var(--azul);
  outline-offset: 3px;
}

.chip:has(input:checked) {
  background: var(--azul);
  border-color: var(--azul);
  color: #FFFFFF;
}

.chip .chip-marca {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  position: relative;
  transition: background-color 0.15s ease;
}

.chip:has(input:checked) .chip-marca {
  background: #FFFFFF;
  border-color: #FFFFFF;
}

.chip:has(input:checked) .chip-marca::after {
  content: "";
  position: absolute;
  inset: 1.5px 2px 3px;
  border: solid var(--azul);
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg) translateY(-1px);
}

.sintomas-contador {
  margin-top: 1.2rem;
}

/* Navegación del stepper */
.diag-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem clamp(1.4rem, 3.5vw, 2.5rem) 1.4rem;
  border-top: 1px dashed var(--gris-medio);
}

.diag-nav .boton[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Resultado: impresión de laboratorio */
.ranura {
  position: relative;
  height: 14px;
  margin: 0 auto 0;
  max-width: 560px;
}

.ranura::before {
  content: "";
  position: absolute;
  inset: 4px 0;
  background: var(--grafito);
  border-radius: 3px;
}

.reporte-marco {
  max-width: 560px;
  margin-inline: auto;
  overflow: hidden;
  padding-bottom: 6px;
}

.reporte {
  background: #FFFFFF;
  border: var(--borde);
  border-top: none;
  border-radius: 0 0 var(--radio) var(--radio);
  font-family: var(--fuente-mono);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  box-shadow: var(--sombra-dura);
}

.reporte-cabecera {
  padding: 1rem 1.3rem 0.8rem;
  border-bottom: 1px dashed var(--gris-medio);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.reporte-cabecera .reporte-titulo {
  font-weight: 700;
  letter-spacing: 0.1em;
}

.reporte-bloque {
  padding: 0.9rem 1.3rem;
  border-bottom: 1px dashed var(--gris-medio);
}

.reporte-bloque:last-of-type {
  border-bottom: none;
}

.reporte-bloque .rotulo {
  display: block;
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  color: var(--gris-texto);
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

.reporte-hallazgos {
  list-style: none;
}

.reporte-hallazgos li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem;
  padding-block: 0.3rem;
  line-height: 1.45;
}

.reporte-hallazgos .h-sintoma {
  color: var(--naranja);
  font-weight: 700;
  white-space: nowrap;
}

.reporte-hallazgos .h-causa {
  color: var(--grafito);
}

.reporte-servicio {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.reporte-servicio .servicio-nombre {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--azul);
}

.reporte-servicio .servicio-garantia {
  color: var(--verde-texto);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.reporte-cta {
  padding: 1.1rem 1.3rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.reporte-cta .boton {
  justify-content: center;
  text-align: center;
}

.nota-honestidad {
  font-family: var(--fuente-ui);
  font-size: 0.78rem;
  color: var(--gris-texto);
  line-height: 1.5;
  border-left: 2px solid var(--reticula);
  padding-left: 0.8rem;
}

/* Pie legible por máquina: barras + folio, como ticket de instrumento */
.reporte-codigo {
  display: flex;
  flex-wrap: wrap; /* en 390 px: barras arriba, folio abajo, como ticket real */
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.75rem 1.3rem 0.15rem;
  border-top: 1px dashed var(--gris-medio);
}

.codigo-barras {
  flex: 1 1 140px;
  min-width: 120px;
  max-width: 210px;
  height: 20px;
  /* código de barras dibujado en CSS: periodo irregular de 27px */
  background-image: repeating-linear-gradient(90deg,
    var(--grafito) 0 2px,  transparent 2px 4px,
    var(--grafito) 4px 5px,  transparent 5px 9px,
    var(--grafito) 9px 12px, transparent 12px 14px,
    var(--grafito) 14px 15px, transparent 15px 18px,
    var(--grafito) 18px 20px, transparent 20px 22px,
    var(--grafito) 22px 23px, transparent 23px 27px);
}

.codigo-folio {
  margin-left: auto; /* alineado a la derecha también al envolver */
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  color: var(--gris-texto);
  text-transform: uppercase;
  white-space: nowrap;
}

.reporte-perforado {
  height: 14px;
  background-image: linear-gradient(90deg, var(--gris-medio) 40%, transparent 40%);
  background-size: 10px 1px;
  background-repeat: repeat-x;
  background-position: 0 50%;
  margin-inline: 1.3rem;
}

/* ---------- 07 · PROTOCOLOS ---------- */
.protocolos {
  border-bottom: var(--borde);
}

.protocolos-rejilla {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 1.75rem);
}

.protocolo {
  position: relative;
  border: var(--borde);
  border-radius: var(--radio);
  background: var(--blanco);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s cubic-bezier(0.2, 0.8, 0.3, 1);
  overflow: hidden;
}

.protocolo::after {
  /* esquina doblada */
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 22px 22px 0;
  border-color: transparent var(--blanco) var(--reticula) transparent;
  filter: drop-shadow(-1px 1px 0 rgba(31, 36, 33, 0.25));
  opacity: 0;
  transform: translate(6px, -6px);
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.2, 0.8, 0.3, 1);
  pointer-events: none;
}

.protocolo:hover {
  border-color: var(--azul);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 rgba(40, 81, 227, 0.18);
}

.protocolo:hover::after {
  opacity: 1;
  transform: translate(0, 0);
}

.protocolo-cabecera {
  padding: 1rem 1.3rem;
  border-bottom: var(--borde);
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
}

.protocolo-cabecera .codigo {
  font-family: var(--fuente-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--azul);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.protocolo-cabecera h3 {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  font-weight: 700;
  letter-spacing: -0.015em;
}

.protocolo-descripcion {
  padding: 1rem 1.3rem 0.4rem;
  font-size: 0.92rem;
  color: var(--gris-texto);
  line-height: 1.55;
}

.protocolo-tabla {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--fuente-mono);
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  margin-top: 0.6rem;
}

.protocolo-tabla th,
.protocolo-tabla td {
  text-align: left;
  padding: 0.55rem 1.3rem;
  border-top: 1px dashed var(--gris-medio);
  vertical-align: top;
}

.protocolo-tabla th {
  font-weight: 500;
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gris-texto);
  white-space: nowrap;
  width: 34%;
}

.protocolo-tabla .garantia {
  color: var(--verde-texto);
  font-weight: 700;
}

/* ---------- 08 · ESQUEMA INTERACTIVO ---------- */
.esquema {
  border-bottom: var(--borde);
}

.esquema-rejilla {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 3.5vw, 3rem);
  align-items: start;
}

.esquema-figura {
  position: relative;
  border: var(--borde);
  border-radius: var(--radio);
  background: #FFFFFF;
  padding: clamp(0.75rem, 2vw, 1.5rem);
}

.esquema-lienzo {
  position: relative;
}

.esquema-figura svg {
  width: 100%;
  height: auto;
}

.esquema-figura .fig-pie {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.7rem;
  margin-top: 0.4rem;
  border-top: 1px dashed var(--gris-medio);
}

/* Trazos del esquema SVG */
.esq-linea {
  stroke: var(--grafito);
  stroke-width: 1.5;
  fill: none;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.esq-fina {
  stroke: var(--gris-medio);
  stroke-width: 1;
  fill: none;
}

.esq-agua {
  stroke: var(--azul);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 6 8;
}

.esq-relleno {
  fill: rgba(40, 81, 227, 0.05);
  stroke: none;
}

.esq-texto {
  font-family: var(--fuente-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  fill: var(--gris-texto);
  text-transform: uppercase;
}

.esq-zona {
  fill: transparent;
  stroke: transparent;
  stroke-width: 1.5;
  transition: fill 0.2s ease, stroke 0.2s ease;
  pointer-events: none;
}

.esq-componente.activo .esq-zona {
  fill: rgba(40, 81, 227, 0.1);
  stroke: var(--azul);
}

.esq-componente.activo .esq-linea {
  stroke: var(--azul);
}

/* Hotspots numerados (botones HTML sobre el SVG) */
.hotspot {
  position: absolute;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.hotspot .hotspot-nucleo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--grafito);
  border-radius: 50%;
  background: var(--blanco);
  font-family: var(--fuente-mono);
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.15s ease, color 0.15s ease,
              border-color 0.15s ease, transform 0.15s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.hotspot:hover .hotspot-nucleo {
  border-color: var(--azul);
  color: var(--azul);
  transform: scale(1.12);
}

.hotspot[aria-pressed="true"] .hotspot-nucleo {
  background: var(--azul);
  border-color: var(--azul);
  color: #FFFFFF;
}

/* Ficha del componente */
.esquema-ficha {
  border: var(--borde);
  border-radius: var(--radio);
  background: var(--blanco);
  box-shadow: var(--sombra-dura);
  position: sticky;
  top: calc(var(--alto-barra) + 24px);
}

.ficha-cabecera {
  padding: 0.8rem 1.2rem;
  border-bottom: var(--borde);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.ficha-cuerpo {
  padding: 1.2rem;
}

.ficha-cuerpo h3 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 0.3rem;
}

.ficha-cuerpo .ficha-funcion {
  font-size: 0.92rem;
  color: var(--gris-texto);
  margin-bottom: 1rem;
}

.ficha-dato {
  border-top: 1px dashed var(--gris-medio);
  padding-block: 0.65rem;
  font-size: 0.85rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
}

.ficha-dato .rotulo {
  font-family: var(--fuente-mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gris-texto);
  padding-top: 0.2em;
  white-space: nowrap;
}

.ficha-dato .garantia {
  color: var(--verde-texto);
  font-weight: 600;
}

.ficha-indice {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.9rem 1.2rem;
  border-top: var(--borde);
}

.ficha-indice button {
  font-family: var(--fuente-mono);
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--reticula);
  border-radius: 2px;
  padding: 0.45em 0.7em;
  min-height: 32px;
  color: var(--gris-texto);
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.ficha-indice button:hover {
  border-color: var(--azul);
  color: var(--azul);
}

@media (pointer: coarse) {
  .ficha-indice button {
    min-height: 44px;
    padding: 0.6em 0.85em;
  }
}

.ficha-indice button[aria-pressed="true"] {
  background: var(--azul);
  border-color: var(--azul);
  color: #FFFFFF;
}

/* Plate fotográfica FIG.01 */
.figura-manual {
  margin-top: clamp(2rem, 5vw, 3.5rem);
  border: var(--borde);
  border-radius: var(--radio);
  overflow: hidden;
  background: #FFFFFF;
}

.figura-manual img {
  width: 100%;
  height: auto;
  aspect-ratio: 1920 / 1080;
  object-fit: cover;
}

.figura-manual figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.75rem 1.2rem;
  border-top: var(--borde);
}

/* ---------- 09 · REGISTRO ---------- */
.registro {
  border-bottom: var(--borde);
}

.registro-envoltura {
  border: var(--borde);
  border-radius: var(--radio);
  overflow-x: auto;
  background: #FFFFFF;
}

.registro-tabla {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-family: var(--fuente-mono);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.registro-tabla caption {
  text-align: left;
  padding: 0.8rem 1.2rem;
  border-bottom: var(--borde);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.registro-tabla caption .caption-nota {
  float: right;
  font-weight: 400;
  color: var(--gris-texto);
  letter-spacing: 0.08em;
}

.registro-tabla th {
  text-align: left;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gris-texto);
  padding: 0.7rem 1.2rem;
  border-bottom: var(--borde);
  white-space: nowrap;
}

.registro-tabla td {
  padding: 0.85rem 1.2rem;
  border-bottom: 1px dashed var(--gris-medio);
  vertical-align: top;
  line-height: 1.5;
}

.registro-tabla tbody tr:last-child td {
  border-bottom: none;
}

.registro-tabla tbody tr {
  transition: background-color 0.15s ease;
}

.registro-tabla tbody tr:hover {
  background: var(--azul-suave);
}

.registro-tabla .caso-num {
  color: var(--azul);
  font-weight: 700;
  white-space: nowrap;
}

.estado-pill {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--verde-texto);
  border: 1px solid var(--verde);
  border-radius: 2px;
  padding: 0.25em 0.6em;
  white-space: nowrap;
}

/* ---------- 10 · GARANTÍAS ---------- */
.garantias {
  border-bottom: var(--borde);
}

.certificado {
  position: relative;
  border: var(--borde);
  border-radius: var(--radio);
  background: #FFFFFF;
  box-shadow: var(--sombra-dura);
  padding: clamp(1.5rem, 4vw, 3rem);
  max-width: 880px;
  margin-inline: auto;
}

.certificado::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid var(--reticula);
  border-radius: 2px;
  pointer-events: none;
}

.certificado-cabecera {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.8rem;
}

.certificado-cabecera h3 {
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.certificado-folio {
  font-family: var(--fuente-mono);
  font-size: 0.72rem;
  color: var(--gris-texto);
  text-align: right;
  line-height: 1.7;
  font-variant-numeric: tabular-nums;
}

.certificado-tabla {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--fuente-mono);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.certificado-tabla th,
.certificado-tabla td {
  text-align: left;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--reticula);
}

.certificado-tabla thead th {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gris-texto);
  background: var(--blanco);
}

.certificado-tabla .periodo {
  font-weight: 700;
  font-size: 1rem;
  color: var(--azul);
  white-space: nowrap;
}

.certificado-pie {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.linea-firma {
  flex: 1;
  min-width: 200px;
}

.linea-firma .raya {
  border-bottom: 1px solid var(--grafito);
  height: 2.2rem;
  margin-bottom: 0.4rem;
  position: relative;
}

.linea-firma .raya .rubrica {
  position: absolute;
  bottom: -4px;
  left: 8px;
  width: 130px;
  height: auto;
  color: var(--grafito);
}

.sello {
  flex: 0 0 auto;
  width: 108px;
  height: 108px;
  color: var(--verde);
}

/* ---------- 11 · CTA FINAL ---------- */
.cta-final {
  border-bottom: var(--borde);
  text-align: center;
}

.cta-final h2 {
  font-size: clamp(1.9rem, 4.5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: 1rem;
}

.cta-final h2 .num {
  color: var(--naranja);
}

.cta-final p {
  margin-inline: auto;
  color: var(--gris-texto);
  margin-bottom: 2rem;
}

.cta-final .hero-ctas {
  justify-content: center;
}

/* ---------- 12 · FOOTER ---------- */
.pie {
  padding-block: 2.2rem 2.6rem;
  font-family: var(--fuente-mono);
  font-size: 0.72rem;
  color: var(--gris-texto);
  font-variant-numeric: tabular-nums;
}

.pie .contenedor {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.2rem 2rem;
  align-items: end;
}

.pie-datos {
  line-height: 2;
}

.pie-datos a {
  color: var(--grafito);
  text-decoration-color: var(--gris-medio);
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.pie-datos a:hover {
  color: var(--azul);
  text-decoration-color: var(--azul);
}

.pie-revision {
  text-align: right;
  line-height: 2;
}

.pie-firma-linea {
  grid-column: 1 / -1;
  border-top: var(--borde);
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------- 13 · GUÍA ---------- */
.guia-hero {
  border-bottom: var(--borde);
  padding-block: clamp(3rem, 6vw, 5rem);
}

.guia-hero h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.03;
  margin-block: 1.2rem 1rem;
  max-width: 20ch;
}

.guia-hero p {
  color: var(--gris-texto);
  max-width: 56ch;
}

.guia-seccion {
  border-bottom: var(--borde);
}

.guia-prosa p {
  margin-bottom: 1.1rem;
  max-width: 68ch;
}

.guia-prosa strong {
  font-weight: 700;
}

.guia-prosa .dato {
  font-size: 0.92em;
  color: var(--azul);
}

.tabla-stack {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--fuente-mono);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  border: var(--borde);
  background: #FFFFFF;
}

.tabla-stack th,
.tabla-stack td {
  text-align: left;
  padding: 0.75rem 1.1rem;
  border-bottom: 1px dashed var(--gris-medio);
  vertical-align: top;
  line-height: 1.55;
}

.tabla-stack tbody tr:last-child th,
.tabla-stack tbody tr:last-child td {
  border-bottom: none;
}

.tabla-stack th {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gris-texto);
  white-space: nowrap;
  width: 200px;
}

.tabla-stack tr:hover td {
  background: var(--azul-suave);
}

.pipeline-lista {
  list-style: none;
  counter-reset: paso;
  display: grid;
  gap: 0;
  border: var(--borde);
  border-radius: var(--radio);
  background: #FFFFFF;
  overflow: hidden;
}

.pipeline-lista li {
  counter-increment: paso;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem;
  padding: 1.1rem 1.3rem;
  border-bottom: 1px dashed var(--gris-medio);
  align-items: baseline;
}

.pipeline-lista li:last-child {
  border-bottom: none;
}

.pipeline-lista li::before {
  content: "0" counter(paso);
  font-family: var(--fuente-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--azul);
  font-variant-numeric: tabular-nums;
}

.pipeline-lista .paso-titulo {
  font-weight: 700;
  display: block;
  margin-bottom: 0.2rem;
}

.pipeline-lista .paso-detalle {
  font-size: 0.88rem;
  color: var(--gris-texto);
  line-height: 1.55;
}

.serie-rejilla {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.8rem;
}

.serie-card {
  display: block;
  border: var(--borde);
  border-radius: var(--radio);
  padding: 1rem 1.1rem;
  text-decoration: none;
  background: var(--blanco);
  transition: border-color 0.18s ease, transform 0.18s cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 0.18s ease;
}

.serie-card:hover {
  border-color: var(--azul);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 rgba(40, 81, 227, 0.15);
}

.serie-card .etiqueta {
  display: block;
  margin-bottom: 0.4rem;
}

.serie-card .serie-nombre {
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  display: block;
  margin-bottom: 0.15rem;
}

.serie-card .serie-desc {
  font-size: 0.82rem;
  color: var(--gris-texto);
}

.serie-card--actual {
  background: var(--azul-suave);
  border-color: var(--azul);
}

.serie-card--actual .serie-nombre {
  color: var(--azul);
}

/* ---------- 14 · RESPONSIVE ---------- */
@media (max-width: 980px) {
  .hero-rejilla {
    grid-template-columns: 1fr;
  }

  .esquema-rejilla {
    grid-template-columns: 1fr;
  }

  .esquema-ficha {
    position: static;
  }
}

@media (max-width: 760px) {
  .barra-dato {
    display: none;
  }

  .barra-estado {
    font-size: 0.6rem;
  }

  .protocolos-rejilla {
    grid-template-columns: 1fr;
  }

  .diag-paso-indicador .paso-texto {
    display: none;
  }

  .diag-paso-indicador {
    justify-content: center;
    padding: 0.75rem 0.4rem;
  }

  .diag-cuerpo {
    min-height: 0;
  }

  .cabecera-seccion .cabecera-nota {
    display: none;
  }

  .pie .contenedor {
    grid-template-columns: 1fr;
  }

  .pie-revision {
    text-align: left;
  }

  .certificado-pie {
    flex-direction: column;
    align-items: stretch;
  }

  .sello {
    align-self: flex-end;
  }
}

@media (max-width: 520px) {
  /* Instrumentos: el pie se apila para que las etiquetas [ PRES-01 ]
     no se partan a media palabra en la rejilla de 2 columnas */
  .instrumento-pie {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }

  .instrumento-pie .etiqueta {
    white-space: nowrap;
  }

  /* Reporte: síntoma arriba, causa abajo — la columna doble queda
     demasiado angosta a 390 px */
  .reporte-hallazgos li {
    grid-template-columns: 1fr;
    gap: 0.2rem;
    padding-block: 0.45rem;
  }

  /* Navegación del stepper: sin el rótulo central hay aire para
     que los botones no se partan */
  #diag-estado-nav {
    display: none;
  }

  .certificado-tabla {
    font-size: 0.72rem;
  }

  .certificado-tabla th,
  .certificado-tabla td {
    padding: 0.65rem 0.55rem;
  }

  .certificado-tabla .periodo {
    white-space: normal;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .equipo-rejilla {
    grid-template-columns: 1fr 1fr;
  }

  .equipo-card {
    padding: 0.8rem 0.8rem 0.75rem;
  }

  .equipo-card .equipo-icono {
    width: 26px;
    height: 26px;
  }

  .equipo-card .equipo-nombre {
    font-size: 0.85rem;
  }

  .hero-ctas .boton {
    width: 100%;
    justify-content: center;
  }

  .hotspot .hotspot-nucleo {
    width: 22px;
    height: 22px;
    font-size: 0.62rem;
  }

  .hero-espec .etiqueta {
    font-size: 0.52rem;
    letter-spacing: 0.06em;
    white-space: nowrap;
  }
}

/* ---------- 15 · REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .led {
    animation: none;
    box-shadow: 0 0 0 3px rgba(14, 159, 110, 0.25);
  }

  .reg-punto {
    animation: none;
    opacity: 1;
  }
}
