/* =====================================================================
   mecmex.css — ESTILOS DEL SITIO PÚBLICO (marca v2, noviembre 2026)
   ---------------------------------------------------------------------
   Idea del diseño: ingeniería con tecnología. El lenguaje es el del plano
   técnico y el tablero de datos.
   - Colores: tinta (azul casi negro) + papel (blanco frío) + cobalto
     (acciones) + menta (solo sobre fondo oscuro). Los colores de estado
     (verde / ámbar / rojo) se usan SOLO para decir "vigente / por vencer /
     vencido" en las maquetas del sistema.
   - Motivo: la COTA, la línea de medida de los planos (línea con topes en
     los extremos). Se repite bajo los títulos de sección.
   - Tipografía: Bricolage Grotesque (títulos), IBM Plex Sans (texto) e
     IBM Plex Mono (datos reales: folios, numerales de norma, fechas).
   Orden del archivo: 1 variables · 2 fuentes · 3 base · 4 cabecera ·
   5 botones · 6 héroe · 7 tablero · 8 secciones y servicios · 9 pasos ·
   10 autor · 11 ficha (extintores) · 12 obligaciones · 13 piloto ·
   14 pie · 15 responsivo
   ===================================================================== */

/* ---------- 1. VARIABLES (cambiar un color aquí lo cambia en todo) ---------- */
:root {
  --tinta: #0D1B2A;         /* texto principal y bloques oscuros */
  --papel: #EFF3F2;         /* fondo general */
  --superficie: #FFFFFF;    /* paneles y bandas claras */
  --acero: #53636F;         /* texto secundario */
  --linea: #CFD8D6;         /* divisiones suaves */
  --cobalto: #2147E8;       /* acciones y enlaces */
  --cobalto-oscuro: #1837BA;
  --menta: #3FE0B5;         /* acento sobre fondo oscuro */

  /* Estado de equipos (solo dentro de maquetas del sistema) */
  --vigente: #1F9D63;
  --por-vencer: #D98A00;    /* ámbar con contraste suficiente sobre fondo claro */
  --vencido: #D92D45;

  --fuente-titulo: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fuente: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fuente-datos: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Escala tipográfica (cada paso ≈ ×1.25) */
  --t-0: 1.0625rem;   /* 17 px texto */
  --t-1: 1.3125rem;   /* 21 px */
  --t-2: 1.625rem;    /* 26 px */
  --t-3: clamp(1.8rem, 3vw, 2.5rem);
  --t-4: clamp(2.4rem, 5.2vw, 4.1rem);

  --ancho: 76rem;      /* ancho máximo del contenido */
  --margen: clamp(1.25rem, 4vw, 3rem);
  --radio: 6px;
}

/* ---------- 2. FUENTES (autoalojadas: más rápidas y sin depender de Google) ---------- */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-var.06f675bdda93.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap; /* muestra el texto de inmediato aunque la fuente tarde */
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-400.77bc02670657.woff2") format("woff2");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-600.196e3cbc5fee.woff2") format("woff2");
  font-weight: 600 800; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-400.79936b18df9f.woff2") format("woff2");
  font-weight: 400; font-display: swap;
}

/* ---------- 3. BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--fuente);
  font-size: var(--t-0);
  line-height: 1.6;
  color: var(--tinta);
  background: var(--papel);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2, h3 { font-family: var(--fuente-titulo); font-stretch: 88%; text-wrap: balance; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }

/* Foco visible para navegación con teclado (accesibilidad) */
:focus-visible { outline: 3px solid var(--cobalto); outline-offset: 3px; }

.saltar {
  position: absolute; left: -999px; top: 0;
  background: var(--tinta); color: #fff; padding: .6rem 1rem; z-index: 10;
}
.saltar:focus { left: 1rem; top: 1rem; }

/* La COTA: línea de medida con topes en los extremos. Se dibuja con fondos
   de CSS, no necesita imagen. Se usa bajo los títulos de sección. */
.seccion__titulo::after {
  content: ""; display: block; width: 6rem; height: 12px; margin-top: 1.1rem; color: var(--cobalto);
  background:
    linear-gradient(currentColor, currentColor) 0 50% / 100% 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) 0 50% / 1.5px 12px no-repeat,
    linear-gradient(currentColor, currentColor) 100% 50% / 1.5px 12px no-repeat;
}

/* ---------- 4. CABECERA ---------- */
.cabecera { border-bottom: 1px solid var(--linea); background: var(--papel); }
.cabecera__dentro {
  max-width: var(--ancho); margin: 0 auto; padding: .55rem var(--margen);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.marca { display: block; text-decoration: none; line-height: 0; }
.marca img { height: 44px; width: auto; }
.menu { display: flex; align-items: center; gap: 1.5rem; font-weight: 600; }
.menu a { text-decoration: none; padding: .3rem 0; }
.menu a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--cobalto); }
.menu a:hover { color: var(--cobalto); }
.menu__accion { background: var(--cobalto); color: #fff; border-radius: var(--radio); padding: .45rem 1rem !important; }
.menu__accion:hover { background: var(--cobalto-oscuro); color: #fff !important; }

/* ---------- 5. BOTONES Y ENLACES ---------- */
.botones { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.boton {
  display: inline-block; text-decoration: none; font-weight: 600;
  padding: .85rem 1.4rem; border-radius: var(--radio); border: 2px solid transparent;
  transition: background-color .15s, color .15s, border-color .15s;
}
.boton--primario { background: var(--cobalto); color: #fff; }
.boton--primario:hover { background: var(--cobalto-oscuro); }
.boton--secundario { border-color: var(--tinta); }
.boton--secundario:hover { background: var(--tinta); color: var(--papel); }
.boton--claro { background: var(--papel); color: var(--tinta); }
.boton--claro:hover { background: #fff; }
.enlace { font-weight: 600; color: var(--cobalto); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.enlace:hover { color: var(--cobalto-oscuro); }

/* ---------- 6. HÉROE ---------- */
.heroe {
  position: relative;
  /* Retícula de plano técnico, muy tenue */
  background-image:
    linear-gradient(#DCE5E4 1px, transparent 1px),
    linear-gradient(90deg, #DCE5E4 1px, transparent 1px);
  background-size: 36px 36px;
}
.heroe__dentro {
  max-width: var(--ancho); margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) var(--margen) clamp(3rem, 6vw, 5rem);
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.titular {
  font-size: var(--t-4); font-weight: 700;
  line-height: 1.02; letter-spacing: -.025em; max-width: 15ch;
}
.entrada { font-size: var(--t-1); line-height: 1.5; color: var(--acero); margin-top: 1.5rem; max-width: 38ch; }
.entrada-equipo { margin-top: 1.6rem; color: var(--acero); max-width: 44ch; }

/* Héroe con foto (solo el inicio): la foto es la protagonista, solo lleva el titular.
   Velo ligero: más oscuro abajo (donde va el texto) y casi transparente arriba. */
.heroe--foto { background: var(--tinta); background-image: none; color: var(--papel); overflow: hidden; }
.heroe__foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% center; }
.heroe--foto picture { display: contents; }
.heroe--foto::after {
  content: ""; position: absolute; inset: 0;
  /* Velo solo en la parte baja, donde va el titular; arriba se ve la foto casi limpia */
  background: linear-gradient(0deg, rgba(13, 27, 42, .82) 0%, rgba(13, 27, 42, .4) 34%, rgba(13, 27, 42, 0) 70%);
}
.heroe--foto .heroe__dentro {
  position: relative; z-index: 1; display: flex; align-items: flex-end;
  min-height: clamp(24rem, 62vh, 38rem); padding-top: 4rem; padding-bottom: clamp(2.4rem, 5vw, 3.6rem);
}
.heroe--foto .titular { font-size: clamp(2.7rem, 7vw, 5.4rem); max-width: 14ch; text-shadow: 0 2px 24px rgba(8, 18, 29, .45); }
.heroe__credito { position: absolute; z-index: 1; right: var(--margen); bottom: .6rem; font-size: .75rem; color: #B6C4CE; max-width: calc(100% - 2 * var(--margen)); text-align: right; }
.heroe__credito a { text-underline-offset: 2px; }

/* Franja de presentación bajo la foto: mensaje + botones a la izquierda, tablero a la derecha */
.presenta {
  max-width: var(--ancho); margin: 0 auto; padding: clamp(2.5rem, 6vw, 4.5rem) var(--margen);
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center;
}

/* ---------- 7. TABLERO (maqueta del sistema en el héroe) ---------- */
.tablero { width: 100%; max-width: 31rem; justify-self: end; }
.tablero__panel {
  background: var(--tinta); color: var(--papel); border-radius: 10px;
  padding: 1.15rem 1.3rem 1.3rem; box-shadow: 0 24px 40px -24px rgba(13, 27, 42, .6);
}
.tablero__cabeza { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; margin-bottom: .4rem; }
.tablero__titulo { font-family: var(--fuente-titulo); font-stretch: 88%; font-weight: 700; font-size: 1.15rem; }
.tablero__nota { font-size: .8rem; color: #9FB0BC; }
.tablero__lista { list-style: none; padding: 0; }
.fila {
  display: grid; grid-template-columns: auto 1fr auto; gap: .2rem .9rem; align-items: center;
  padding: .75rem 0; border-top: 1px solid #22364A; font-size: .94rem;
}
.fila code { font-family: var(--fuente-datos); font-size: .82rem; color: var(--menta); }
.fila__lugar { color: #D5DEE4; min-width: 0; }
.estado-fila {
  font-size: .8rem; font-weight: 600; padding: .12rem .6rem; border-radius: 999px; white-space: nowrap;
  background: color-mix(in srgb, var(--c) 24%, transparent); color: var(--cc, var(--c));
}
.estado-fila--vigente { --c: var(--vigente); --cc: #6BE3A3; }
.estado-fila--pronto { --c: #F5A524; --cc: #FFC561; }
.estado-fila--vencido { --c: var(--vencido); --cc: #FF8A9A; }
.tablero__pie { margin-top: 1rem; font-size: .9rem; color: var(--acero); max-width: 42ch; }

/* ---------- 8. SECCIONES Y SERVICIOS ---------- */
.seccion { max-width: var(--ancho); margin: 0 auto; padding: clamp(3rem, 7vw, 5.5rem) var(--margen); }
.seccion__titulo { font-size: var(--t-3); font-weight: 700; line-height: 1.08; letter-spacing: -.02em; max-width: 24ch; }
.seccion__entrada { margin-top: 1.2rem; color: var(--acero); max-width: 58ch; }
.seccion__mas { margin-top: 1.6rem; }
.banda { background: var(--superficie); border-block: 1px solid var(--linea); }

/* Lista de servicios: renglones con línea, no tarjetas */
.servicios { list-style: none; padding: 0; margin-top: 2.5rem; border-bottom: 1px solid var(--tinta); }
.servicio {
  display: grid; grid-template-columns: 15rem 1fr; column-gap: 3rem; row-gap: .4rem;
  padding: 2rem 0; border-top: 1px solid var(--tinta);
}
.servicio__cabeza { grid-row: span 3; display: flex; flex-direction: column; align-items: flex-start; gap: .7rem; }
.servicio__nombre { font-size: var(--t-2); font-weight: 700; line-height: 1.1; letter-spacing: -.015em; }
.servicio--activo .servicio__nombre { color: var(--cobalto); }
.servicio__para { font-weight: 600; }
.servicio__texto { color: var(--acero); max-width: 60ch; }
.servicio .enlace { justify-self: start; margin-top: .6rem; }

.estado {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .85rem; font-weight: 600; padding: .2rem .65rem; border-radius: 999px;
  background: var(--superficie); border: 1px solid var(--linea);
}
.estado::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; }
.estado--verde::before { background: var(--vigente); }
.estado--amarillo::before { background: #F5A524; }

/* Últimos artículos del blog (renglones con línea, igual que los servicios) */
.articulos { list-style: none; padding: 0; margin-top: 2.5rem; border-bottom: 1px solid var(--tinta); }
.articulo { padding: 1.6rem 0; border-top: 1px solid var(--tinta); }
.articulo__area { font-size: .9rem; font-weight: 600; color: var(--cobalto); }
.articulo__titulo { font-size: var(--t-1); font-weight: 700; line-height: 1.25; margin-top: .3rem; max-width: 40ch; }
.articulo__titulo a { text-decoration: none; }
.articulo__titulo a:hover { color: var(--cobalto); }
.articulo__resumen { color: var(--acero); margin-top: .4rem; max-width: 60ch; }

/* ---------- 9. PASOS (sí son secuencia, por eso van numerados) ---------- */
.pasos { list-style: none; padding: 0; margin-top: 2.5rem; counter-reset: paso;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.paso { counter-increment: paso; border-top: 1px solid var(--tinta); padding-top: 1.2rem; }
.paso::before {
  content: counter(paso); display: block; font-family: var(--fuente-datos); font-size: 1.1rem;
  color: var(--cobalto); margin-bottom: .7rem;
}
.paso__titulo { font-size: var(--t-1); font-weight: 700; line-height: 1.25; }
.paso__texto { color: var(--acero); margin-top: .5rem; }

/* ---------- 10. AUTOR: franja tinta que da peso a la firma ---------- */
.seccion--autor { max-width: none; padding-left: 0; padding-right: 0; background: var(--tinta); color: var(--papel); }
.autor {
  max-width: var(--ancho); margin: 0 auto; padding: 0 var(--margen);
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; align-items: end;
}
.autor__frase { font-size: var(--t-3); font-weight: 700; line-height: 1.15; letter-spacing: -.02em; max-width: 26ch; }
.autor__firma { border-left: 3px solid var(--menta); padding-left: 1.25rem; }
.autor__nombre { font-weight: 600; font-size: var(--t-1); }
.autor__perfil, .autor__cedula { color: #B6C4CE; margin-top: .3rem; }

/* ---------- 11. FICHA DEL EXTINTOR (página extintores) ---------- */
.ficha { justify-self: end; width: 100%; max-width: 26rem; }
.ficha__cuerpo {
  background: var(--superficie); border: 1px solid var(--linea); border-radius: 10px;
  box-shadow: 0 24px 40px -26px rgba(13, 27, 42, .45); padding: 1.4rem 1.5rem 1.4rem;
}
.ficha__cabeza { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.ficha__codigo { font-family: var(--fuente-datos); font-size: 1.5rem; line-height: 1.1; }
.ficha__qr { width: 3.2rem; height: 3.2rem; fill: var(--tinta); }
.ficha__tipo { font-weight: 600; margin-top: .7rem; }
.ficha__lugar { color: var(--acero); font-size: .95rem; }
.ficha__datos { margin-top: 1.3rem; border-top: 1px solid var(--linea); }
.ficha__datos div {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .6rem 0; border-bottom: 1px solid var(--linea); font-size: .95rem;
}
.ficha__datos dt { color: var(--acero); }
.ficha__datos dd { font-weight: 600; display: flex; align-items: center; gap: .45rem; text-align: right; }
.punto { width: .6rem; height: .6rem; border-radius: 50%; flex: none; }
.punto--verde { background: var(--vigente); }
.punto--amarillo { background: #F5A524; }
.ficha__barra { margin-top: 1.3rem; height: .5rem; background: var(--linea); border-radius: 999px; overflow: hidden; }
.ficha__relleno {
  display: block; height: 100%; background: #F5A524;
  transform-origin: left; transform: scaleX(var(--avance, .67));
}
.ficha__aviso { margin-top: .6rem; font-size: .9rem; color: var(--acero); }
.ficha__pie { margin-top: 1.1rem; font-size: .9rem; color: var(--acero); }

.migas { max-width: var(--ancho); margin: 0 auto; padding: 1.2rem var(--margen) 0; font-size: .9rem; color: var(--acero); }
.migas a { color: var(--tinta); }

/* ---------- 12. OBLIGACIONES (casillas que se marcan al bajar) ---------- */
.obligaciones { list-style: none; padding: 0; margin-top: 2.5rem; max-width: 52rem; }
.obligacion {
  display: grid; grid-template-columns: 2.4rem 1fr; gap: 1.2rem; align-items: start;
  padding: 1.4rem 0; border-top: 1px solid var(--linea);
}
.obligacion:last-child { border-bottom: 1px solid var(--linea); }
.casilla {
  width: 2.4rem; height: 2.4rem; border-radius: var(--radio);
  display: grid; place-items: center; background: var(--cobalto); border: 2px solid var(--cobalto);
}
.casilla svg { width: 1.4rem; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.casilla path { stroke-dasharray: 20; stroke-dashoffset: 0; }
/* Estado "sin marcar": solo cuando el JavaScript va a animar */
.por-marcar .casilla { background: transparent; border-color: var(--tinta); transition: background-color .35s, border-color .35s; }
.por-marcar .casilla path { stroke-dashoffset: 20; transition: stroke-dashoffset .45s .15s ease-out; }
/* Cuando el scroll llega a la obligación, el JavaScript le pone "marcada" */
.por-marcar .marcada .casilla { background: var(--cobalto); border-color: var(--cobalto); }
.por-marcar .marcada .casilla path { stroke-dashoffset: 0; }
.obligacion__texto { font-size: var(--t-1); line-height: 1.4; font-weight: 600; max-width: 44ch; }
.obligacion__cita { margin-top: .35rem; font-family: var(--fuente-datos); font-size: .85rem; color: var(--acero); }
.obligacion__cita a { color: var(--cobalto); text-underline-offset: 3px; }

/* ---------- 12b. PÁGINAS DE NORMATIVA (dos capas: palabras simples / texto literal) ---------- */
.norma-pagina { max-width: 52rem; margin: 0 auto; padding: 1.5rem var(--margen) clamp(3rem, 7vw, 5rem); }
.norma-pagina__titulo { font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 700; line-height: 1.06; letter-spacing: -.025em; }
.respuesta { margin-top: 1.6rem; padding: 1.2rem 1.4rem; background: var(--superficie); border: 1px solid var(--linea); border-left: 4px solid var(--cobalto); border-radius: var(--radio); }
.respuesta__rotulo, .capa__rotulo, .toc__rotulo { font-size: .85rem; font-weight: 600; color: var(--acero); margin-bottom: .4rem; }
.respuesta p + p { margin-top: .6rem; }
.toc { margin-top: 1.6rem; }
.toc ol { margin: 0; padding-left: 1.2rem; display: grid; gap: .2rem; }
.toc a { color: var(--cobalto); text-underline-offset: 3px; }

.norma-sec { margin-top: clamp(2.2rem, 5vw, 3.4rem); }
.norma-sec__titulo { font-size: var(--t-3); font-weight: 700; line-height: 1.1; letter-spacing: -.02em; margin-bottom: 1rem; scroll-margin-top: 1rem; }
.simple p + p, .norma-sec > p + p { margin-top: .7rem; }
.simple { margin-bottom: 1.2rem; }
/* Lo interpretado por MECMEX se distingue de lo que dice la norma */
.interp { padding: .6rem .9rem; background: #FFF6E0; border-left: 3px solid #D98A00; border-radius: 0 var(--radio) var(--radio) 0; margin-top: .8rem; }
.interp__marca { font-weight: 600; color: #7A4F00; margin-right: .3rem; }

.norma { margin-top: 1.4rem; }
.cita { margin: 0 0 1rem; padding: .9rem 1.1rem; background: var(--superficie); border: 1px solid var(--linea); border-left: 4px solid var(--tinta); border-radius: 0 var(--radio) var(--radio) 0; }
.cita blockquote { margin: 0; }
.cita blockquote p { font-size: 1rem; }
.cita figcaption, .norma__fuente { margin-top: .6rem; font-family: var(--fuente-datos); font-size: .8rem; color: var(--acero); }
.cita figcaption a, .norma__fuente a { color: var(--cobalto); }
.incisos { margin: .5rem 0 0; padding-left: 1.4rem; display: grid; gap: .25rem; font-size: .95rem; }

.tabla-envoltura { overflow-x: auto; margin: 1rem 0; }
.tabla-norma, .tabla-puntos { width: 100%; border-collapse: collapse; background: var(--superficie); font-size: .95rem; }
.tabla-norma caption { text-align: left; font-weight: 600; padding-bottom: .5rem; }
.tabla-norma th, .tabla-norma td, .tabla-puntos th, .tabla-puntos td { border: 1px solid var(--linea); padding: .55rem .75rem; text-align: left; vertical-align: top; }
.tabla-norma thead th, .tabla-puntos thead th { background: var(--tinta); color: var(--papel); font-weight: 600; }
.tabla-norma tbody th { font-weight: 600; }
.tabla-puntos { min-width: 38rem; }
.tabla-puntos tbody th { width: 3.2rem; font-family: var(--fuente-datos); font-weight: 400; }
.tabla-puntos td p { margin: 0; }
.tabla-pie { margin-top: .5rem; font-size: .85rem; color: var(--acero); }
.formula { margin: 1rem 0; padding: 1rem 1.2rem; background: var(--superficie); border: 1px solid var(--linea); border-radius: var(--radio); }
.formula__titulo { font-weight: 600; margin-bottom: .5rem; }
.formula__linea { font-family: var(--fuente-datos); font-size: .9rem; }
.formula__linea + .formula__linea { margin-top: .3rem; }
.formula__fuente { margin-top: .6rem; font-size: .85rem; }
.formula__fuente a, .casa a, .relacionadas a { color: var(--cobalto); text-underline-offset: 3px; }
.casa { margin-top: .9rem; font-size: .95rem; }

.faq { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--linea); }
.faq__pregunta { font-size: var(--t-1); font-weight: 700; line-height: 1.25; margin-bottom: .5rem; }
.faq__cita { margin-top: .5rem; font-size: .88rem; color: var(--acero); }
.relacionadas { margin-top: clamp(2.2rem, 5vw, 3.4rem); padding-top: 1.4rem; border-top: 1px solid var(--tinta); }
.relacionadas ul { margin: 0; padding-left: 1.2rem; display: grid; gap: .4rem; }
.relacionadas__sistema { margin-top: 1.2rem; }
.firma { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid var(--linea); font-size: .9rem; color: var(--acero); }
.firma p + p { margin-top: .4rem; }
.solo-lectores { position: absolute; left: -999px; }

/* Modo borrador: banner y etiquetas de ID para la auditoría */
.borrador { background: #FFF6E0; border-bottom: 1px solid #E8C26A; padding: .7rem var(--margen); font-size: .9rem; }
.borrador p { max-width: var(--ancho); margin: 0 auto; }
.aud { display: inline-block; font-family: var(--fuente-datos); font-size: .7rem; line-height: 1.5; padding: 0 .4rem; border-radius: 3px; background: #DDE3E1; color: #3A4750; vertical-align: middle; white-space: nowrap; }

/* Ligas dentro del contenido de normativa ([texto](destino) en normativa_paginas.py) */
.enlace-norma { color: var(--cobalto); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.enlace-norma:hover { color: var(--cobalto-oscuro); }
/* Al llegar por una liga a una tabla o renglón, se resalta para ubicarlo */
.tabla-envoltura:target, .formula:target, tr:target { outline: 2px solid var(--cobalto); outline-offset: 2px; scroll-margin-top: 5rem; }
tr:target > * { background: #E8EDFF; }

/* ---------- 12c. PANTALLA DE AUDITORÍA (/auditoria/, herramienta interna con DEBUG) ---------- */
.aud-pag { max-width: 50rem; margin: 0 auto; padding: 0 var(--margen) 3rem; }
.aud-pag .migas { padding-left: 0; padding-right: 0; }
.aud-pag__titulo { font-family: var(--fuente-titulo); font-stretch: 88%; font-size: var(--t-3); line-height: 1.1; margin: 1rem 0 .4rem; }
.aud-pag__sub { color: var(--acero); margin: 0 0 1.5rem; }
.aud-pasos { margin: 1.5rem 0 2rem; padding-left: 1.3rem; display: grid; gap: .4rem; }
.aud-aviso { padding: .7rem 1rem; border-radius: var(--radio); background: #E3F6EE; border: 1px solid var(--vigente); margin: 0 0 1.5rem; }
.aud-aviso--error { background: #FCE8EB; border-color: var(--vencido); }
.aud-indice { width: 100%; border-collapse: collapse; background: var(--superficie); font-size: .95rem; }
.aud-indice th, .aud-indice td { padding: .6rem .7rem; border-bottom: 1px solid var(--linea); text-align: left; vertical-align: middle; }
.aud-indice thead th { font-size: .85rem; color: var(--acero); font-weight: 600; }
.aud-indice td { white-space: nowrap; }
.aud-indice progress { width: 5rem; vertical-align: middle; accent-color: var(--vigente); }
.aud-bloque { margin: 2.5rem 0 0; }
.aud-bloque__titulo { font-family: var(--fuente-titulo); font-stretch: 88%; font-size: var(--t-1); margin: 0 0 .8rem; padding-bottom: .4rem; border-bottom: 2px solid var(--tinta); }
.aud-tarjeta { background: var(--superficie); border: 1px solid var(--linea); border-left: 5px solid var(--linea); border-radius: var(--radio); padding: 1rem 1.1rem; margin: 0 0 .9rem; }
.aud-tarjeta--cita, .aud-tarjeta--tabla { background: #F7F9F9; }
.aud-tarjeta.est-ok { border-left-color: var(--vigente); }
.aud-tarjeta.est-corregir { border-left-color: var(--vencido); }
.aud-tarjeta.est-duda { border-left-color: var(--por-vencer); }
.aud-tarjeta__cabeza { margin: 0; font-weight: 600; font-size: .95rem; }
.aud-tarjeta__pregunta { margin: .35rem 0 .7rem; color: var(--acero); font-size: .9rem; }
.aud-tarjeta__q { font-weight: 600; margin: 0 0 .3rem; }
.aud-tarjeta__texto { margin: 0 0 .7rem; padding: 0 0 0 .9rem; border-left: 3px solid var(--linea); }
.aud-tarjeta__texto p { margin: 0; }
.aud-tarjeta__texto--cita { border-left-color: var(--cobalto); }
.aud-tarjeta--interp .aud-tarjeta__texto { border-left-color: var(--por-vencer); }
.aud-tarjeta__compara { font-size: .85rem; color: var(--acero); margin: 0 0 .6rem; }
.aud-dof { font-size: .85rem; padding: .35rem .8rem; }
.aud-estado { border: 0; padding: 0; margin: .4rem 0 .5rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.aud-estado__op input { position: absolute; opacity: 0; }
.aud-estado__op span { display: inline-block; padding: .35rem .9rem; border: 1px solid var(--linea); border-radius: var(--radio); cursor: pointer; font-size: .9rem; background: var(--superficie); }
.aud-estado__op input:focus-visible + span { outline: 3px solid var(--cobalto); outline-offset: 2px; }
.aud-estado__op--ok input:checked + span { background: var(--vigente); border-color: var(--vigente); color: #fff; }
.aud-estado__op--corregir input:checked + span { background: var(--vencido); border-color: var(--vencido); color: #fff; }
.aud-estado__op--duda input:checked + span { background: var(--por-vencer); border-color: var(--por-vencer); color: #fff; }
.aud-estado__op--pendiente input:checked + span { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.aud-coment textarea { width: 100%; font: inherit; font-size: .95rem; padding: .5rem .6rem; border: 1px solid var(--linea); border-radius: var(--radio); resize: vertical; }
.aud-barra { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 0; margin-top: 1.5rem; background: var(--papel); border-top: 1px solid var(--linea); }

/* ---------- 12d. COTIZAR EXTINTORES (/cotizar/) + AVISO DE PRIVACIDAD ---------- */
.cotizar { max-width: var(--ancho); margin: 0 auto; padding: clamp(2rem, 5vw, 4rem) var(--margen); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.cotizar--gracias { grid-template-columns: minmax(0, 40rem); }
.cotizar__titulo { font-family: var(--fuente-titulo); font-stretch: 88%; font-weight: 700; font-size: var(--t-3); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 1rem; }
.cotizar__texto { max-width: 46ch; margin: 0 0 1.5rem; }
.cotizar__sub { font-size: var(--t-0); font-weight: 600; margin: 2rem 0 .6rem; }
.cotizar__pasos { padding-left: 1.3rem; display: grid; gap: .5rem; color: var(--acero); max-width: 46ch; }
.formulario { background: var(--superficie); border: 1px solid var(--linea); border-radius: var(--radio); padding: clamp(1.2rem, 3vw, 2rem); display: grid; gap: 1.1rem; }
.formulario__fila { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.campo { display: grid; gap: .35rem; }
.campo label, .formulario__grupo legend { font-weight: 600; font-size: .95rem; }
.campo__opcional { font-weight: 400; color: var(--acero); }
.campo input, .campo select, .campo textarea { width: 100%; font: inherit; padding: .6rem .7rem; border: 1px solid #B4C0BE; border-radius: var(--radio); background: #fff; color: var(--tinta); }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: 3px solid var(--cobalto); outline-offset: 1px; border-color: var(--cobalto); }
.con-error input, .con-error select, .con-error textarea { border-color: var(--vencido); }
.formulario__error { color: var(--vencido); font-size: .875rem; margin: 0; }
.formulario__grupo { border: 0; padding: 0; margin: 0; }
.formulario__grupo legend { margin-bottom: .5rem; }
.formulario__opciones { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.opcion { display: flex; gap: .5rem; align-items: center; padding: .6rem .7rem; border: 1px solid var(--linea); border-radius: var(--radio); cursor: pointer; font-size: .95rem; }
.opcion:has(input:checked) { border-color: var(--cobalto); background: #EEF2FF; }
.opcion input, .formulario__acepto input { accent-color: var(--cobalto); width: 1.1rem; height: 1.1rem; flex: none; }
.formulario__acepto label { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; color: var(--acero); }
.formulario__acepto a { color: var(--cobalto); }
.formulario .boton { justify-self: start; }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.texto-legal { max-width: 46rem; margin: 0 auto; padding: clamp(2rem, 5vw, 4rem) var(--margen); }
.texto-legal__titulo { font-family: var(--fuente-titulo); font-stretch: 88%; font-size: var(--t-3); margin: 0 0 .3rem; }
.texto-legal__fecha { color: var(--acero); font-family: var(--fuente-datos); font-size: .85rem; margin: 0 0 2rem; }
.texto-legal h2 { font-size: var(--t-1); margin: 2rem 0 .5rem; }
.texto-legal a { color: var(--cobalto); }
@media (max-width: 760px) {
  .cotizar, .formulario__fila, .formulario__opciones { grid-template-columns: 1fr; }
}

/* ---------- 12e. BOTÓN FLOTANTE + GLOBO "¿NECESITAS AYUDA?" ---------- */
.flotante { position: fixed; right: max(1.1rem, env(safe-area-inset-right)); bottom: max(1.1rem, env(safe-area-inset-bottom)); z-index: 50; display: flex; flex-direction: column; align-items: flex-end; gap: .7rem; pointer-events: none; }
.flotante > * { pointer-events: auto; }
/* Círculo cobalto con el engrane. Cada 5 s da un bote grande (3 rebotes que se apagan) y suelta una onda. */
.flotante__boton { position: relative; display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; background: var(--cobalto); box-shadow: 0 8px 22px rgba(33, 71, 232, .38), 0 2px 6px rgba(13, 27, 42, .2); animation: brinco 5s cubic-bezier(.3, 0, .3, 1) 1.5s infinite; transition: background .2s; }
.flotante__boton::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--cobalto); opacity: 0; animation: onda 5s ease-out 1.5s infinite; pointer-events: none; }
/* Con el cursor encima deja de botar y se queda en su lugar (no congelado en el aire) */
.flotante__boton:hover, .flotante__boton:focus-visible { background: var(--cobalto-oscuro); animation: none; }
.flotante__boton:hover::after, .flotante__boton:focus-visible::after { animation: none; }
.flotante__boton:focus-visible { outline: 3px solid var(--cobalto); outline-offset: 4px; }
.flotante__boton svg { transition: transform .4s ease; }
.flotante__boton:hover svg { transform: rotate(60deg); } /* el engrane gira un poco al acercar el cursor */
@keyframes brinco {
  0%, 36%, 100% { transform: translateY(0) scale(1); }
  3%  { transform: translateY(0) scale(1.14, .86); }      /* se agacha */
  10% { transform: translateY(-38px) scale(.92, 1.1); }   /* bote alto */
  17% { transform: translateY(0) scale(1.12, .88); }      /* cae y se aplasta */
  22% { transform: translateY(-16px) scale(.97, 1.04); }  /* segundo bote */
  27% { transform: translateY(0) scale(1.05, .95); }
  31% { transform: translateY(-5px); }                    /* tercer bote chiquito */
}
@keyframes onda { 0%, 15% { transform: scale(1); opacity: 0; } 17% { opacity: .6; } 40%, 100% { transform: scale(1.9); opacity: 0; } }

.globo { position: relative; display: flex; align-items: center; gap: .15rem; background: var(--superficie); border: 1px solid var(--linea); border-radius: 999px; padding: .25rem .3rem .25rem .3rem; box-shadow: 0 10px 26px rgba(13, 27, 42, .18); opacity: 0; transform: translateY(8px) scale(.9); transform-origin: bottom right; transition: opacity .2s ease, transform .35s cubic-bezier(.2, .9, .3, 1.4); }
.globo[hidden] { display: none; }
.globo--visible { opacity: 1; transform: none; }
.globo::after { content: ""; position: absolute; right: 1.55rem; bottom: -6px; width: 10px; height: 10px; background: var(--superficie); border-right: 1px solid var(--linea); border-bottom: 1px solid var(--linea); transform: rotate(45deg); }
.globo__texto { border: 0; background: none; font: inherit; font-weight: 600; font-size: .98rem; color: var(--tinta); padding: .45rem .3rem .45rem .8rem; cursor: pointer; }
.globo__texto:hover { color: var(--cobalto); }
.globo__cerrar { border: 0; background: none; width: 2rem; height: 2rem; border-radius: 50%; font-size: 1.2rem; line-height: 1; color: var(--acero); cursor: pointer; }
.globo__cerrar:hover { background: var(--papel); color: var(--tinta); }
.pie { padding-bottom: 5rem; } /* que el botón flotante no tape el pie */

/* ---------- 12f. MODAL "COTIZAR EXTINTORES" (<dialog>) ---------- */
html.modal-abierto { overflow: hidden; } /* la página de atrás no se mueve */
.modal { width: min(38rem, calc(100% - 2rem)); max-height: min(92dvh, 46rem); padding: 0; border: 0; border-radius: 12px; background: var(--superficie); color: var(--tinta); box-shadow: 0 30px 80px rgba(13, 27, 42, .35); overflow: auto; overscroll-behavior: contain; }
.modal::backdrop { background: rgba(13, 27, 42, .55); backdrop-filter: blur(3px); }
.modal[open] { animation: modal-entra .32s cubic-bezier(.2, .9, .3, 1.15); }
.modal[open]::backdrop { animation: fondo-entra .25s ease; }
.modal--saliendo { animation: modal-sale .18s ease forwards !important; }
@keyframes modal-entra { from { opacity: 0; transform: translateY(18px) scale(.97); } }
@keyframes modal-sale { to { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes fondo-entra { from { opacity: 0; } }

.modal__cabeza { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1.4rem 1.5rem 1.1rem; background: var(--superficie); border-bottom: 1px solid var(--linea); }
.modal__pasos { margin: 0 0 .25rem; font-family: var(--fuente-datos); font-size: .78rem; color: var(--acero); }
.modal__titulo { margin: 0; font-family: var(--fuente-titulo); font-stretch: 88%; font-weight: 700; font-size: 1.55rem; line-height: 1.1; letter-spacing: -.015em; }
.modal__cerrar { flex: none; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border: 0; border-radius: 50%; background: var(--papel); color: var(--tinta); cursor: pointer; transition: background .15s; }
.modal__cerrar:hover { background: #DDE3E1; }
.modal__cerrar:focus-visible, .elegido__cambiar:focus-visible, .modal__atras:focus-visible { outline: 3px solid var(--cobalto); outline-offset: 2px; }
/* Barra de avance bajo la cabecera: 50% en el paso 1, completa en el 2 y 3 */
.modal__barra { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; }
.modal__barra span { display: block; height: 100%; width: 50%; background: var(--cobalto); transition: width .4s ease; }
.modal[data-paso="2"] .modal__barra span, .modal[data-paso="3"] .modal__barra span { width: 100%; }
.modal[data-paso="3"] .modal__barra span { background: var(--vigente); }

.modal__panel { padding: 1.4rem 1.5rem 1.6rem; }
.modal__panel:not([hidden]) { animation: panel-entra .28s ease; }
@keyframes panel-entra { from { opacity: 0; transform: translateX(14px); } }
.modal__pregunta { font-weight: 600; font-size: 1.05rem; margin: 0 0 .9rem; padding: 0; }

/* Paso 1: tarjetas de servicio (clases "elige" para no chocar con .elige__op del inicio) */
.elige { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.elige__op { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .8rem; row-gap: .15rem; align-items: center; padding: 1rem; border: 1.5px solid var(--linea); border-radius: 10px; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.elige__op:last-of-type:nth-of-type(odd) { grid-column: 1 / -1; } /* el 5º servicio ocupa todo el ancho */
.elige__op:hover { border-color: var(--cobalto); transform: translateY(-1px); }
.elige__op input { position: absolute; opacity: 0; pointer-events: none; }
.elige__op:has(input:focus-visible) { outline: 3px solid var(--cobalto); outline-offset: 2px; }
.elige__op:has(input:checked) { border-color: var(--cobalto); background: #EEF2FF; }
.elige__icono { grid-row: span 2; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--papel); color: var(--cobalto); transition: background .15s, color .15s; }
.elige__icono svg { width: 1.35rem; height: 1.35rem; }
.elige__op:has(input:checked) .elige__icono { background: var(--cobalto); color: #fff; }
.elige__nombre { font-weight: 600; line-height: 1.25; }
.elige__desc { font-size: .84rem; color: var(--acero); line-height: 1.35; }

/* Paso 2: datos */
.elegido { margin: 0 0 1.1rem; font-size: .92rem; color: var(--acero); }
.elegido strong { color: var(--tinta); }
.elegido__cambiar, .modal__atras { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--cobalto); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.modal__campos { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1rem; margin-bottom: 1.1rem; }
.campo--ancho { grid-column: 1 / -1; }
.modal .campo textarea { min-height: 4.5rem; }
.modal__error { color: var(--vencido); font-size: .85rem; margin: .3rem 0 0; }
.modal__error--general { padding: .6rem .8rem; background: #FCE8EB; border-radius: var(--radio); }
.modal__acciones { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.3rem; }
.modal__panel--listo .boton { background: transparent; }
.modal__acciones .boton[disabled] { opacity: .7; cursor: progress; }

/* Paso 3: listo (la palomita se dibuja) */
.modal__panel--listo { text-align: center; padding: 2.4rem 1.5rem 2.2rem; }
.listo__marca { display: block; margin: 0 auto; }
.listo__marca circle { stroke-dasharray: 190; stroke-dashoffset: 190; animation: trazo .5s ease forwards; }
.listo__marca path { stroke-dasharray: 50; stroke-dashoffset: 50; animation: trazo .35s ease .4s forwards; }
@keyframes trazo { to { stroke-dashoffset: 0; } }
.listo__titulo { font-family: var(--fuente-titulo); font-stretch: 88%; font-size: 1.6rem; margin: 1rem 0 .4rem; outline: none; }
.listo__texto { color: var(--acero); max-width: 32ch; margin: 0 auto 1.5rem; }

/* Celular: el modal sale como hoja desde abajo */
@media (max-width: 600px) {
  .modal { width: 100%; max-width: 100%; margin: auto 0 0; max-height: 94dvh; border-radius: 16px 16px 0 0; }
  .modal[open] { animation: hoja-entra .32s cubic-bezier(.2, .9, .3, 1); }
  .modal--saliendo { animation: hoja-sale .18s ease forwards !important; }
  .modal__cabeza { padding: 1.1rem 1.1rem .9rem; }
  .modal__titulo { font-size: 1.3rem; }
  .modal__panel { padding: 1.1rem 1.1rem 1.4rem; }
  .elige, .modal__campos { grid-template-columns: 1fr; }
  .elige__op { padding: .85rem; }
}
@keyframes hoja-entra { from { transform: translateY(100%); } }
@keyframes hoja-sale { to { transform: translateY(100%); } }

@media (prefers-reduced-motion: reduce) {
  .flotante__boton, .flotante__boton::after, .modal[open], .modal[open]::backdrop, .modal__panel:not([hidden]) { animation: none; }
  .globo, .modal__barra span { transition: none; }
  .listo__marca circle, .listo__marca path { animation: none; stroke-dashoffset: 0; }
}

/* ---------- 13. PROGRAMA PILOTO (franja cobalto) ---------- */
.piloto {
  background: var(--cobalto); color: #fff;
  padding: clamp(3rem, 7vw, 5rem) max(var(--margen), calc((100% - var(--ancho)) / 2 + var(--margen)));
}
.piloto__titulo { font-size: var(--t-3); font-weight: 700; line-height: 1.12; letter-spacing: -.02em; max-width: 24ch; }
.piloto__texto { margin: 1rem 0 2rem; max-width: 52ch; color: #DCE4FF; }

/* ---------- 14. PIE DE PÁGINA ---------- */
.pie { background: var(--tinta); color: var(--papel); }
.pie__dentro {
  max-width: var(--ancho); margin: 0 auto; padding: 2.5rem var(--margen);
  display: grid; grid-template-columns: 1fr auto; gap: .6rem 2rem; font-size: .95rem; align-items: start;
}
.pie__logo { height: 40px; width: auto; margin-bottom: .4rem; }
.pie__texto { color: #B6C4CE; grid-column: 1; max-width: 46ch; }
.pie__menu { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; gap: .3rem; align-items: flex-end; }
.pie__menu a { text-decoration: none; }
.pie__menu a:hover { color: var(--menta); }

/* ---------- 15. RESPONSIVO (celular y tableta) ---------- */
@media (max-width: 860px) {
  .heroe__dentro, .autor { grid-template-columns: 1fr; }
  .presenta { grid-template-columns: 1fr; }
  .heroe--foto .heroe__dentro { min-height: 32rem; }
  .heroe__foto { object-position: center; }
  .heroe--foto .heroe__dentro { padding-bottom: 3.2rem; }
  .tablero, .ficha { justify-self: start; }
  .servicio { grid-template-columns: 1fr; }
  .servicio__cabeza { grid-row: auto; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .pasos { grid-template-columns: 1fr; }
  .pie__dentro { grid-template-columns: 1fr; }
  .pie__menu { grid-column: 1; grid-row: auto; align-items: flex-start; margin-top: 1rem; }
}
@media (max-width: 560px) {
  /* En celular el menú baja a una segunda línea en lugar de esconderse */
  .cabecera__dentro { flex-wrap: wrap; row-gap: .3rem; }
  .menu { gap: .9rem; font-size: .95rem; flex-wrap: wrap; }
  .marca img { height: 38px; }
  .fila { grid-template-columns: auto 1fr; }
  .fila .estado-fila { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 480px) {
  .ficha__datos div { flex-direction: column; gap: .1rem; }
  .ficha__datos dd { text-align: left; }
}

/* Quien pidió "reducir movimiento" en su sistema no ve animaciones */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
