/* ==========================================================================
   Papás en Línea, site-wide stylesheet v2 (2026-11-18)
   Editorial Claro: light, warm, square corners, Inter, teal and coral.
   Mobile first. Base targets 375 px. Breakpoints: 600, 768, 900, 1140.

   Loaded on EVERY page by includes/v2/sitio-cabecera.php.
   1. Tokens (plus aliases for the old token names used by page <style> blocks)
   2. Base and type scale
   3. Buttons, header, search, footer
   4. Shared page components: the classes the old includes/header.php used to
      style (.section, .hero, .sec-title, .breadcrumb, .callout, .post-*,
      .blog-*, .cta-*, .faq-*, .form-*, .filter-*, tables, robot widget),
      redrawn in this system so every page reads as one site.
   5. Components shared after the page migration
   6. Risk page template
   7. Shared components, ONE definition each (.pasos, .lista-barra, .caja-caso,
      .caja-envio, .compartir-barra, .lista-relacionados, .hub-*, .video-marco,
      quiz kit, .opcion-tarjeta, .fuentes). Catalog: docs/COMPONENTES_COMPARTIDOS.md
   Home-only sections live in home-v2.css.
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/fonts/inter-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── 1. Tokens ───────────────────────────────────────────────────────────── */
:root {
  --teal: #2B6E88;           /* 5.4:1 on --bg, 5.8:1 white on teal */
  --teal-suave: #4A8FAF;     /* decorative only, never small text */
  --teal-oscuro: #245D73;    /* hover fill with white text: 7.27:1 */
  --teal-fondo: #EDF5F8;
  --coral: #E05C4A;          /* borders and accents only, never text or fills with text */
  --coral-fuerte: #C94A36;   /* white text on it: 4.65:1 (approved P1) */
  --coral-hover: #B03E2C;
  --coral-texto: #B2412F;    /* coral text on light backgrounds */
  --coral-fondo: #FCEEEB;    /* tint behind urgent notes. --coral-texto on it: 4.9:1 */
  --verde-badge: #C7E913;    /* small badges only, with --tinta text */
  --whatsapp: #25D366;       /* WhatsApp button only, with --tinta text */
  --whatsapp-hover: #1FB857;
  --gris-foto: #CFCFCD;      /* placeholder behind photos while they load */
  --video-fondo: #000;       /* video letterbox: the only dark area allowed */
  /* Traffic-light verdicts (home semáforo, /recursos/semaforo/): small square markers only, never text */
  --sem-verde: #2E8B57;
  --sem-amarillo: #D99A1E;
  --sem-rojo: var(--coral-fuerte);

  --bg: #F7F5F0;
  --bg-card: #FFFFFF;
  --tinta: #0D1726;
  --texto: #2E3947;
  --secundario: #4A5563;
  --tenue: #5F6975;          /* lowest text contrast allowed: 5.2:1 on --bg */
  --borde: rgba(13, 23, 38, 0.10);
  --borde-fuerte: rgba(13, 23, 38, 0.18);
  --borde-campo: rgba(13, 23, 38, 0.5);   /* form fields: 3:1 non-text contrast */
  --subrayado: rgba(43, 110, 136, 0.45);  /* underline under teal links */

  --glow-sm: 0 0 8px rgba(43, 110, 136, 0.28), 0 0 16px rgba(43, 110, 136, 0.10);
  --glow-md: 0 0 14px rgba(43, 110, 136, 0.30), 0 0 30px rgba(43, 110, 136, 0.12);
  --fuente: 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --max: 1200px;             /* page frame: every container on every page */
  --medida: 720px;           /* reading measure: articles, legal text, long answers */
  --px: 16px;                /* side gutter: 16 / 24 / 32 / 48 */
  --alto-cabecera: 64px;

  /* Type scale: the only sizes headings use anywhere on the site. */
  --t-portada: clamp(2rem, 1rem + 4.4vw, 4.2rem);      /* home hero h1 only: 32 to 67 px */
  --t-titulo: clamp(2rem, 1.3rem + 3.2vw, 3rem);       /* page h1: 32 to 48 px */
  --t-seccion: clamp(1.5rem, 1.1rem + 1.8vw, 2.2rem);  /* h2: 24 to 35 px */
  --t-sub: 1.25rem;                                    /* h3: 20 px */
  --t-entrada: 1.125rem;                               /* lead paragraph: 18 px */

  /* Aliases: page <style> blocks and inline styles still use the old names. */
  --accent: var(--teal);
  --accent-soft: var(--teal-oscuro);
  --teal-soft: var(--teal-oscuro);
  --green-badge: var(--verde-badge);
  --bg-card-2: var(--teal-fondo);
  --text-primary: var(--tinta);
  --text-body: var(--texto);
  --text-secondary: var(--secundario);
  --text-muted: var(--tenue);
  --border: var(--borde);
  --border-strong: var(--borde-fuerte);
  --divider: var(--borde);
  --font: var(--fuente);
}

/* ── 2. Base ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; border-radius: 0; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { font-family: var(--fuente); font-size: 16px; line-height: 1.6; color: var(--texto); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden; min-height: 100vh; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
iframe { max-width: 100%; border: 0; }
[hidden] { display: none !important; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--tinta); }
button { font-family: var(--fuente); cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: var(--fuente); font-size: 16px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
h1, h2, h3, h4, h5, h6 { color: var(--tinta); text-wrap: balance; letter-spacing: -0.015em; line-height: 1.2; }
h1 { font-size: var(--t-titulo); font-weight: 800; line-height: 1.1; letter-spacing: -0.025em; }
h2 { font-size: var(--t-seccion); font-weight: 700; line-height: 1.15; }
h3 { font-size: var(--t-sub); font-weight: 700; }
h4 { font-size: 1.0625rem; font-weight: 700; }
ul, ol { list-style-position: outside; }
strong, b { font-weight: 700; }
hr { border: none; border-top: 1px solid var(--borde); }
[id] { scroll-margin-top: calc(var(--alto-cabecera) + 12px); }

/* Links inside running text are underlined, so they never rely on color alone. */
main :where(p, li, td, dd, figcaption, blockquote) a:not(.btn):not([class*="btn"]) {
  text-decoration: underline; text-decoration-color: var(--subrayado); text-underline-offset: 3px; font-weight: 600;
}
main :where(p, li, td, dd, figcaption, blockquote) a:not(.btn):not([class*="btn"]):hover { text-decoration-color: currentColor; }

.saltar { position: absolute; left: 12px; top: -80px; z-index: 300; background: var(--tinta); color: #fff; padding: 12px 16px; font-weight: 700; }
.saltar:focus { top: 12px; color: #fff; }
.solo-lector, .sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.contenedor { max-width: var(--max); margin: 0 auto; padding-inline: var(--px); box-sizing: content-box; }

.eyebrow { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--teal); margin-bottom: 10px; }
.enlace { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; font-size: 16px; }
.enlace svg { width: 16px; height: 16px; flex-shrink: 0; transition: transform .2s; }
.enlace:hover svg { transform: translateX(3px); }
.texto-enlace a { padding-block: 10px; } /* inline padding widens the tap area without moving the line */
.texto-enlace a { text-decoration: underline; text-decoration-color: var(--subrayado); text-underline-offset: 3px; font-weight: 700; }
.texto-enlace a:hover { text-decoration-color: currentColor; }

/* ── 3a. Buttons (one family for the whole site) ────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border: 1px solid transparent; cursor: pointer;
  font-family: var(--fuente); font-size: 16px; font-weight: 700; line-height: 1.2; text-align: center;
  text-decoration: none; white-space: normal;
  transition: background-color .2s, color .2s, box-shadow .2s, border-color .2s;
}
.btn svg { width: 17px; height: 17px; flex-shrink: 0; }
.btn-teal, .btn-fill { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn-teal:hover, a.btn-teal:hover, .btn-fill:hover, a.btn-fill:hover { background: var(--teal-oscuro); border-color: var(--teal-oscuro); color: #fff !important; box-shadow: var(--glow-sm); }
.btn-coral { background: var(--coral-fuerte); border-color: var(--coral-fuerte); color: #fff; }
.btn-coral:hover, a.btn-coral:hover { background: var(--coral-hover); border-color: var(--coral-hover); color: #fff !important; }
.btn-borde, .btn-outline { background: transparent; border-color: var(--teal); color: var(--teal); }
.btn-borde:hover, a.btn-borde:hover, .btn-outline:hover, a.btn-outline:hover { background: var(--teal); border-color: var(--teal); color: #fff !important; }
.btn-whatsapp { background: var(--whatsapp); border-color: var(--whatsapp); color: var(--tinta); }
.btn-whatsapp:hover, a.btn-whatsapp:hover { background: var(--whatsapp-hover); border-color: var(--whatsapp-hover); color: var(--tinta) !important; }
.botones { display: flex; flex-wrap: wrap; gap: 10px; }

/* ── 3b. Header ──────────────────────────────────────────────────────────── */
.cabecera { position: sticky; top: 0; z-index: 100; background: var(--bg); border-bottom: 1px solid var(--borde-fuerte); }
.cabecera-fila { display: flex; align-items: center; gap: 8px; min-height: var(--alto-cabecera); }
.logo { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--teal); margin-right: auto; flex-shrink: 0; }
.logo:hover { color: var(--teal); }
.logo img { height: 32px; width: auto; display: none; }
.logo span { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; }
.cabecera-acciones { display: flex; align-items: center; gap: 6px; }
.btn-urgente { min-height: 44px; padding: 0 12px; font-size: 15px; white-space: nowrap; }
.btn-urgente svg { display: none; }
.btn-icono { width: 44px; height: 44px; display: none; align-items: center; justify-content: center; background: none; border: none; color: var(--secundario); cursor: pointer; }
.btn-icono:hover { color: var(--teal); }
.btn-icono svg { width: 22px; height: 22px; }
.btn-menu { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 0 8px; background: none; border: 1px solid var(--borde-fuerte); color: var(--tinta); font: 700 14px/1 var(--fuente); cursor: pointer; }
.btn-menu svg { width: 18px; height: 18px; }
.btn-menu .icono-cerrar, .btn-menu[aria-expanded="true"] .icono-abrir { display: none; }
.btn-menu[aria-expanded="true"] .icono-cerrar { display: inline; }

.nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--borde-fuerte); padding: 4px var(--px) 18px; max-height: calc(100vh - var(--alto-cabecera)); max-height: calc(100dvh - var(--alto-cabecera)); overflow-y: auto; box-shadow: 0 12px 24px rgba(13, 23, 38, 0.08); }
.nav.abierto { display: block; }
.nav-lista { list-style: none; }
.nav-lista a { display: flex; align-items: center; min-height: 52px; border-bottom: 1px solid var(--borde); color: var(--tinta); font-size: 17px; font-weight: 600; }
.nav-lista a:hover, .nav-lista a[aria-current="page"] { color: var(--teal); }
.nav-buscar { padding-top: 14px; }
.nav .resultados { position: static; box-shadow: none; max-height: none; border-top: none; } /* the menu scrolls, so results flow inside it */
.buscador-cabecera { border-top: 1px solid var(--borde); }
.buscador-cabecera .contenedor { padding-block: 14px; }

/* ── 3c. Search (typeahead) ──────────────────────────────────────────────── */
.buscador { position: relative; }
.buscador input {
  width: 100%; min-width: 0; height: 50px; padding: 0 14px; border: 1px solid var(--borde-campo);
  background: #fff; color: var(--tinta); font-family: var(--fuente); font-size: 16px;
  -webkit-appearance: none; appearance: none; transition: border-color .2s;
}
.buscador input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 2px var(--teal); }
.buscador input::placeholder { color: var(--tenue); }
.resultados { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 60; background: #fff; border: 1px solid var(--borde-fuerte); box-shadow: 0 12px 28px rgba(13, 23, 38, 0.14); max-height: 340px; overflow-y: auto; }
.resultados.visible { display: block; }
.resultados a { display: flex; flex-direction: column; gap: 2px; min-height: 48px; justify-content: center; padding: 10px 14px; border-top: 1px solid var(--borde); color: var(--tinta); font-size: 16px; line-height: 1.35; }
.resultados a:first-child { border-top: none; }
.resultados a:hover, .resultados a.activo { background: var(--teal-fondo); }
.resultados a:focus-visible { outline-offset: -3px; z-index: 3; }
.resultados .tipo { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--teal); }
.resultados .vacio { padding: 14px; font-size: 16px; color: var(--secundario); }

/* Older inline search boxes (/blog/, /recursos/) driven by assets/js/busqueda.js */
.busqueda-inline { margin: 20px 0 28px; max-width: 52ch; position: relative; }
.busqueda-input { width: 100%; height: 50px; padding: 0 14px; border: 1px solid var(--borde-campo); background: #fff; color: var(--tinta); font-size: 16px; }
.busqueda-input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 2px var(--teal); }
.busqueda-input::placeholder { color: var(--tenue); }
.busqueda-resultados { display: none; background: #fff; border: 1px solid var(--borde-fuerte); box-shadow: 0 12px 28px rgba(13, 23, 38, 0.14); margin-top: 4px; max-height: 360px; overflow-y: auto; }
.busqueda-inline .busqueda-resultados { position: relative; }
.busqueda-item { display: block; min-height: 48px; padding: 10px 14px; border-bottom: 1px solid var(--borde); color: var(--tinta); }
.busqueda-item:hover { background: var(--teal-fondo); }
.busqueda-item:last-child { border-bottom: none; }
.busqueda-tag { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--teal); margin-bottom: 2px; }
.busqueda-titulo { font-size: 16px; color: var(--tinta); line-height: 1.4; }
.busqueda-vacio { padding: 14px; font-size: 16px; color: var(--secundario); background: #fff; border: 1px solid var(--borde); }

/* ── 3d. Footer ──────────────────────────────────────────────────────────── */
.pie { margin-top: 72px; border-top: 1px solid var(--borde-fuerte); background: var(--bg-card); }
.pie .contenedor { padding-block: 40px 24px; }
/* Phones: the fixed Cookies button (bottom left) and robot bubble (bottom right) never cover the last line */
@media (max-width: 767px) { .pie .contenedor { padding-bottom: calc(80px + env(safe-area-inset-bottom)); } }
.pie-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
.pie-marca { grid-column: 1 / -1; }
.pie-marca strong { display: block; font-size: 17px; font-weight: 800; color: var(--teal); margin-bottom: 4px; }
.pie-marca p { font-size: 15px; color: var(--secundario); }
.pie-col h2, .pie-emergencia h2 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--tenue); margin-bottom: 4px; line-height: 1.4; }
.pie-col ul, .pie-emergencia ul { list-style: none; }
.pie-col a, .pie-cookies { display: flex; align-items: center; min-height: 44px; color: var(--texto); font-size: 16px; }
.pie-col a:hover, .pie-cookies:hover { color: var(--teal); }
.pie-cookies { padding: 0; background: none; border: none; font-family: var(--fuente); cursor: pointer; text-align: left; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--borde-fuerte); }
.pie-emergencia { margin-top: 28px; padding: 14px 16px; border: 1px solid var(--borde-fuerte); border-left: 3px solid var(--coral); }
.pie-emergencia li { font-size: 16px; line-height: 1.5; color: var(--texto); padding-block: 4px; }
.pie-emergencia a { display: inline-block; padding: 11px 2px; margin-block: -11px; color: var(--tinta); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.pie-final { display: flex; flex-direction: column; gap: 6px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--borde); font-size: 13px; color: var(--tenue); }
/* The home ends in a full-width band, so its footer sits flush. */
.inicio + .pie, main.inicio ~ .pie { margin-top: 0; }

/* ── 4. Shared page components ──────────────────────────────────────────── */

/* Page frame. .section is the old wrapper: same width and gutters as .contenedor. */
.section { max-width: var(--max); margin: 0 auto; padding: 48px var(--px); box-sizing: content-box; }
.section-band { background: var(--bg-card); border-top: 1px solid var(--borde); border-bottom: 1px solid var(--borde); }
.section-band + .section, .section + .section-band { margin-top: 0; }
.divider { border: none; border-top: 1px solid var(--borde); max-width: var(--max); margin: 0 auto; }
.section-lead { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--tenue); margin-bottom: 12px; }
.section > p, .section > .callout, .section > ul, .section > ol { max-width: var(--medida); }

/* Page header: breadcrumb, eyebrow, one h1, one lead. Same on every interior page. */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; max-width: var(--max); margin: 0 auto; padding: 6px var(--px) 0; box-sizing: content-box; font-size: 14px; color: var(--tenue); }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; color: var(--secundario); text-decoration: underline; text-decoration-color: var(--borde-fuerte); text-underline-offset: 3px; }
.breadcrumb [aria-current="page"] { color: var(--tenue); }
.breadcrumb a:hover { color: var(--teal); }
.hero { max-width: var(--max); margin: 0 auto; padding: 28px var(--px) 32px; box-sizing: content-box; }
.breadcrumb + .hero { padding-top: 12px; } /* every interior page: breadcrumb, then the h1 at the same height */
.hero h1, h1.sec-title, .post-h1, .page-title { font-size: var(--t-titulo); font-weight: 800; line-height: 1.1; letter-spacing: -0.025em; color: var(--tinta); text-wrap: balance; margin: 0 0 14px; max-width: 24ch; }
.hero h1 .hl { color: var(--teal); }
.hero-sub, .lead { font-size: var(--t-entrada); line-height: 1.6; color: var(--texto); max-width: 64ch; margin: 0 0 16px; }
.hero-credentials { font-size: 14px; font-weight: 600; color: var(--secundario); margin: 0 0 24px; }
.sec-title { font-size: var(--t-seccion); font-weight: 700; line-height: 1.15; letter-spacing: -0.015em; color: var(--tinta); text-wrap: balance; margin: 0 0 10px; }
.sec-sub { font-size: 16px; line-height: 1.65; color: var(--secundario); max-width: 64ch; margin-bottom: 28px; }
h1.sec-title + .sec-sub { font-size: var(--t-entrada); color: var(--texto); }

/* Section headings written without a class (h2 id="..." in sesion, sesiones, guia, ponencias).
   Zero specificity, so every component rule that sets a margin still wins. Headings
   inside cards, links, FAQ answers and side boxes, and the home, are left alone. */
:where(main:not(.inicio)) :where(h2, h3):where(:not([class])):where(:not(a *, [class*="card"] *, .card-glow *, .articulo *, .app *, .sidebar-box *, .faq-a *, .callout *)) { margin-bottom: 10px; }
:where(main:not(.inicio)) :where(h3):where(:not([class])):where(:not(a *, [class*="card"] *, .card-glow *, .articulo *, .app *, .sidebar-box *, .faq-a *, .callout *)) { margin-bottom: 8px; }
:where(main:not(.inicio) h2 + .cta-grid, main:not(.inicio) h2 + .blog-grid) { margin-top: 14px; }

/* Card grids: 1px gaps over the border color, top bar on hover */
.cta-grid, .blog-grid { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--borde); border: 1px solid var(--borde); }
.cta-card, .blog-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px 20px; background: var(--bg-card); color: var(--texto); text-decoration: none; transition: background-color .2s, box-shadow .2s; }
.cta-card::before, .blog-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--teal); transform: scaleX(0); transform-origin: left; transition: transform .3s; }
.cta-card:hover, .blog-card:hover { background: var(--teal-fondo); color: var(--texto); }
.cta-card:hover::before, .blog-card:hover::before { transform: scaleX(1); }
.cta-card:focus-visible, .blog-card:focus-visible { outline-offset: -3px; z-index: 3; }
.cta-card.cta-emergencia::before { background: var(--coral-fuerte); transform: scaleX(1); }
.cta-card.cta-emergencia .cta-icon { border-color: var(--coral); }
.cta-card.cta-emergencia .cta-icon svg { stroke: var(--coral-texto); }
.cta-icon { width: 36px; height: 36px; border: 1px solid var(--borde-fuerte); display: flex; align-items: center; justify-content: center; margin-bottom: 4px; flex-shrink: 0; }
.cta-icon svg { width: 16px; height: 16px; stroke: var(--teal); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cta-label { font-size: 18px; font-weight: 800; color: var(--tinta); line-height: 1.25; }
.cta-desc { font-size: 16px; color: var(--secundario); line-height: 1.5; flex: 1; }
.cta-arrow { font-size: 15px; font-weight: 700; color: var(--teal); margin-top: 6px; }
.bc-cat, .post-cat { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--teal); }
.bc-title { font-size: 19px; font-weight: 800; color: var(--tinta); line-height: 1.3; text-wrap: balance; }
.bc-excerpt { font-size: 16px; color: var(--secundario); line-height: 1.55; flex: 1; }
.bc-meta { font-size: 14px; color: var(--tenue); }
.bc-read { font-size: 15px; font-weight: 700; color: var(--teal); margin-top: 4px; }

/* Bracket card (Editorial Claro card-glow) */
.card-glow { position: relative; background: var(--bg-card); border: 1px solid var(--borde); padding: 24px; }
.card-glow::before, .card-glow::after { content: ''; position: absolute; width: 16px; height: 16px; pointer-events: none; }
.card-glow::before { top: -1px; left: -1px; border-top: 2px solid var(--teal); border-left: 2px solid var(--teal); }
.card-glow::after { bottom: -1px; right: -1px; border-bottom: 2px solid var(--teal); border-right: 2px solid var(--teal); }

/* About block */
.bio-grid { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: start; }
.photo-wrap { position: relative; max-width: 360px; }
.photo-box { width: 100%; aspect-ratio: 3 / 4; overflow: hidden; border: 1px solid var(--borde-fuerte); background: var(--gris-foto); }
.photo-box img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.photo-wrap::before { content: ''; position: absolute; top: -4px; left: -4px; width: 18px; height: 18px; border-top: 2px solid var(--teal); border-left: 2px solid var(--teal); z-index: 1; }
.photo-caption { border: 1px solid var(--borde-fuerte); border-top: none; padding: 12px 16px; background: var(--bg-card); }
.photo-name { font-size: 16px; font-weight: 700; color: var(--tinta); }
.photo-role { font-size: 14px; color: var(--tenue); margin-top: 2px; }
.bio-text h2 { margin: 0 0 6px; }
.bio-meta, .bio-text .bio-meta { font-size: 14px; font-weight: 600; color: var(--secundario); margin-bottom: 20px; }
.bio-text p { font-size: 17px; color: var(--texto); line-height: 1.7; margin-bottom: 16px; max-width: 64ch; }
.bio-text p strong { color: var(--tinta); }
.bio-callout { border-left: 3px solid var(--teal); padding: 14px 20px; background: var(--bg-card); margin: 22px 0; font-size: 17px; color: var(--texto); max-width: 64ch; }

/* Article / long text: one reading measure for blog posts, guides, legal text. */
.post-header { max-width: var(--max); margin: 0 auto; padding: 24px var(--px) 24px; box-sizing: content-box; border-bottom: 1px solid var(--borde); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 14px; color: var(--tenue); margin-bottom: 14px; }
.post-sep { color: var(--borde-fuerte); }
.post-h1 { margin-bottom: 0; max-width: 28ch; }
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; max-width: var(--max); margin: 0 auto; padding: 32px var(--px) 24px; box-sizing: content-box; }
.post-content, .prosa { max-width: var(--medida); font-size: 17px; line-height: 1.75; color: var(--texto); }
.post-content > * + *, .prosa > * + * { margin-top: 1em; }
.post-content h2, .prosa h2 { font-size: 1.5rem; line-height: 1.25; margin-top: 2.2em; margin-bottom: .2em; padding-left: 14px; border-left: 3px solid var(--teal); }
.post-content h3, .prosa h3 { font-size: 1.2rem; line-height: 1.3; margin-top: 1.8em; }
.post-content h2 + *, .prosa h2 + *, .post-content h3 + *, .prosa h3 + * { margin-top: .6em; }
.post-content p, .prosa p { font-size: inherit; color: var(--texto); line-height: inherit; max-width: none; }
.post-content ul, .post-content ol, .prosa ul, .prosa ol { padding-left: 1.4em; }
.post-content li + li, .prosa li + li { margin-top: .4em; }
.post-content li::marker, .prosa li::marker { color: var(--teal); }
.post-content strong, .prosa strong { color: var(--tinta); }
.post-content em, .prosa em { color: inherit; }
.post-content img, .prosa img { border: 1px solid var(--borde); }
.post-content blockquote, .prosa blockquote { border-left: 3px solid var(--teal); padding: 4px 0 4px 18px; color: var(--tinta); font-size: 1.1em; }
.post-sidebar { display: flex; flex-direction: column; gap: 20px; } /* phones: stacked after the article, so the talks CTA is never lost */
.sidebar-box { background: var(--bg-card); border: 1px solid var(--borde); padding: 20px; }
.sidebar-box .sidebar-tag { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--teal); margin-bottom: 8px; }
.sidebar-box h4 { font-size: 17px; font-weight: 700; color: var(--tinta); margin-bottom: 10px; }
.sidebar-box p { font-size: 16px; color: var(--secundario); margin-bottom: 14px; }
.sidebar-box .btn { width: 100%; }

/* Callout: one highlighted note style everywhere (85 uses inside data/blogs.php and data/recursos.php) */
.callout { background: var(--bg-card); border-left: 3px solid var(--teal); padding: 16px 20px; margin: 24px 0; color: var(--texto); }
.callout p { margin: 0; font-size: inherit; }
.callout p + p { margin-top: .6em; }
.callout strong { color: var(--tinta); }

/* Tables: always scroll inside their wrapper on small screens */
.blog-table-wrap, .tabla-scroll { overflow-x: auto; margin: 24px 0; border: 1px solid var(--borde); background: var(--bg-card); -webkit-overflow-scrolling: touch; }
.blog-table-wrap table, .tabla-scroll table { width: 100%; border-collapse: collapse; font-size: 15px; }
.blog-table-wrap th, .tabla-scroll th { padding: 10px 14px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--secundario); border-bottom: 2px solid var(--teal); text-align: left; background: var(--teal-fondo); vertical-align: bottom; }
.blog-table-wrap td, .tabla-scroll td { padding: 12px 14px; border-bottom: 1px solid var(--borde); vertical-align: top; color: var(--texto); }
.blog-table-wrap tr:last-child td, .tabla-scroll tr:last-child td { border-bottom: none; }
.row-accent td { background: var(--teal-fondo) !important; }
.stage-num { font-weight: 800; color: var(--teal); font-size: 1rem; }

/* Filters (blog, recursos, glossary) */
.filter-hint { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--tenue); margin-bottom: 10px; }
.filter-hint svg { flex-shrink: 0; }
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
/* THE toggle chip of the site. Buttons (aria-pressed) or links. Selected: .on, .is-active or [aria-pressed="true"].
   .role-btn (ciberacoso), .medios-links a (en-los-medios) and .chip (sesion) add this class. */
.filter-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 16px; font-family: var(--fuente); font-size: 14px; font-weight: 700; line-height: 1.3; letter-spacing: 0; text-align: left; text-transform: none; text-decoration: none; border: 1px solid var(--borde-fuerte); background: var(--bg-card); color: var(--secundario); cursor: pointer; transition: background-color .18s, border-color .18s, color .18s; }
.filter-btn:hover { border-color: var(--teal); color: var(--teal); }
.filter-btn.on, .filter-btn.is-active, .filter-btn[aria-pressed="true"], .filter-btn.on:hover, .filter-btn.is-active:hover, .filter-btn[aria-pressed="true"]:hover { background: var(--teal); color: #fff; border-color: var(--teal); }

/* Talks / contact data table */
.talk-grid { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: start; }
.talk-table { border: 1px solid var(--borde); border-left: 3px solid var(--teal); background: var(--bg-card); }
.td-row { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 12px 18px; border-bottom: 1px solid var(--borde); font-size: 16px; }
.td-row:last-child { border-bottom: none; }
.td-label { flex: 0 0 120px; font-weight: 700; color: var(--tinta); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; padding-top: 3px; }
.td-val { flex: 1 1 200px; color: var(--texto); line-height: 1.5; }

/* Forms */
.form-field { margin-bottom: 16px; }
.form-label { display: block; font-size: 15px; font-weight: 700; color: var(--tinta); margin-bottom: 6px; }
.form-input, .form-select, .form-textarea {
  width: 100%; min-height: 50px; background: #fff; border: 1px solid var(--borde-campo); color: var(--tinta);
  font-size: 16px; padding: 10px 14px; transition: border-color .2s; -webkit-appearance: none; appearance: none;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--tenue); }
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 2px var(--teal); }
.form-textarea { min-height: 130px; resize: vertical; line-height: 1.5; }
.form-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230D1726' stroke-width='2'/%3E%3C/svg%3E"); background-position: right 14px center; background-size: 12px 8px; background-repeat: no-repeat; padding-right: 40px; }
.form-submit { width: 100%; min-height: 50px; margin-top: 6px; padding: 0 20px; font-size: 16px; font-weight: 700; background: var(--teal); color: #fff; border: 1px solid var(--teal); cursor: pointer; transition: background-color .2s; }
.form-submit:hover { background: var(--teal-oscuro); }
.form-notice { padding: 12px 16px; font-size: 16px; margin-top: 12px; border-left: 3px solid; background: var(--bg-card); }
.form-ok { border-color: var(--teal); color: var(--tinta); }
.form-err { border-color: var(--coral-fuerte); color: var(--tinta); }

/* FAQ (accordion wired in sitio-v2.js) */
.faq-list { display: flex; flex-direction: column; gap: 8px; margin-top: 24px; max-width: var(--medida); }
.faq-item { background: var(--bg-card); border: 1px solid var(--borde); }
.faq-q { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; min-height: 52px; padding: 12px 18px; font-size: 17px; font-weight: 700; color: var(--tinta); text-align: left; cursor: pointer; }
.faq-toggle { color: var(--teal); font-size: 1.4rem; line-height: 1; flex-shrink: 0; transition: transform .2s; }
.faq-a { display: none; padding: 0 18px 16px; font-size: 16px; color: var(--texto); line-height: 1.65; }
.faq-a > * + * { margin-top: .7em; }
.faq-item.open .faq-a { display: block; }
.faq-item.open .faq-toggle { transform: rotate(45deg); }

/* Robot widget (assets/js/robot-recomendaciones.js). Square, like the rest of the system. */
.robot-bubble { position: fixed; right: 16px; bottom: 16px; z-index: 200; width: 56px; height: 56px; background: var(--bg-card); border: 2px solid var(--teal); padding: 0; cursor: pointer; overflow: hidden; box-shadow: 0 4px 14px rgba(13, 23, 38, 0.18); transition: transform .15s ease; }
.robot-bubble:hover { transform: translateY(-2px); }
.robot-bubble img { width: 100%; height: 100%; object-fit: cover; }
.robot-bubble .ping { display: none; }
.robot-panel { position: fixed; right: 12px; left: 12px; bottom: 84px; z-index: 201; max-height: 65vh; background: var(--bg-card); border: 1px solid var(--borde-fuerte); border-left: 3px solid var(--teal); box-shadow: 0 12px 32px rgba(13, 23, 38, 0.2); display: flex; flex-direction: column; transform-origin: bottom right; transform: scale(.96); opacity: 0; pointer-events: none; visibility: hidden; transition: transform .2s ease, opacity .2s ease, visibility 0s linear .2s; }
.robot-panel.open { transform: scale(1); opacity: 1; pointer-events: auto; visibility: visible; transition: transform .2s ease, opacity .2s ease, visibility 0s; }
.robot-panel-header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--borde); flex-shrink: 0; }
.robot-panel-avatar { width: 36px; height: 36px; object-fit: cover; flex-shrink: 0; }
.robot-panel-title { font-size: 16px; font-weight: 700; color: var(--tinta); flex: 1; line-height: 1.3; }
.robot-panel-close { width: 44px; height: 44px; font-size: 22px; line-height: 1; color: var(--secundario); flex-shrink: 0; }
.robot-panel-close:hover { color: var(--tinta); }
.robot-panel-body { padding: 16px; overflow-y: auto; flex: 1; }
.robot-panel-msg { font-size: 16px; color: var(--texto); line-height: 1.5; background: var(--teal-fondo); border-left: 3px solid var(--teal); padding: 10px 12px; margin: 0 0 14px; }
.robot-panel-question { font-size: 16px; font-weight: 700; color: var(--tinta); margin: 0 0 10px; }
.robot-panel-note { font-size: 15px; color: var(--coral-texto); font-weight: 600; margin: 0 0 12px; padding: 8px 10px; background: var(--coral-fondo); border-left: 3px solid var(--coral); }
.robot-menu-opt { display: block; width: 100%; min-height: 48px; text-align: left; background: var(--bg-card); border: 1px solid var(--borde-fuerte); padding: 10px 12px; margin-bottom: 8px; font-size: 16px; font-weight: 600; color: var(--tinta); cursor: pointer; transition: border-color .15s, background-color .15s; }
.robot-menu-opt:hover { border-color: var(--teal); background: var(--teal-fondo); }
.robot-menu-opt:last-child { margin-bottom: 0; }
.robot-panel-back { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 700; color: var(--teal); cursor: pointer; padding: 0 0 4px; }
.robot-panel-back:hover { text-decoration: underline; }
.robot-result-title { font-size: 17px; font-weight: 700; color: var(--tinta); margin: 0 0 6px; }
.robot-result-desc { font-size: 16px; color: var(--secundario); line-height: 1.5; margin: 0 0 14px; }
.robot-result-cta { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; font-weight: 700; color: #fff; background: var(--teal); padding: 0 16px; }
.robot-result-cta:hover { background: var(--teal-oscuro); color: #fff; }

/* Video frames keep their own black letterbox, the only dark area allowed. */
.video-wrap { background: var(--video-fondo); }

/* ── Breakpoints ─────────────────────────────────────────────────────────── */
@media (min-width: 400px) {
  .logo img { display: block; }
}

@media (min-width: 600px) {
  :root { --px: 24px; }
  .pie-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pie-final { flex-direction: row; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }
  .cta-grid, .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  :root { --px: 32px; }
  .section { padding-block: 64px; }
    .hero { padding-block: 40px 40px; }
  .post-header { padding-block: 32px; }
  .post-layout { padding-block: 40px 32px; }
  .post-content, .prosa { font-size: 18px; }
  .bio-grid { grid-template-columns: 300px minmax(0, 1fr); gap: 48px; }
  .talk-grid { grid-template-columns: 1fr 1fr; gap: 56px; }
  .robot-panel { left: auto; right: 24px; bottom: 96px; width: 360px; }
  .robot-bubble { right: 24px; bottom: 24px; }
}

@media (min-width: 900px) {
  :root { --px: 48px; }
  .cta-grid, .blog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cta-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .post-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; }
  .post-sidebar { position: sticky; top: calc(var(--alto-cabecera) + 24px); align-self: start; }
  .bio-grid { grid-template-columns: 340px minmax(0, 1fr); gap: 64px; }
}

/* Desktop header: the 6-item nav needs this width */
@media (min-width: 1140px) {
  :root { --alto-cabecera: 72px; }
  .cabecera-fila { gap: 20px; }
  .logo { margin-right: 0; }
  .logo img { height: 38px; }
  .logo span { font-size: 17px; }
  .btn-menu { display: none; }
  .btn-icono { display: inline-flex; }
  .btn-urgente { padding: 0 16px; }
  .btn-urgente svg { display: block; width: 17px; height: 17px; }
  .nav { display: flex !important; position: static; margin-left: auto; padding: 0; border: none; box-shadow: none; max-height: none; overflow: visible; background: none; }
  .nav-lista { display: flex; align-items: center; gap: 2px; }
  .nav-lista a { min-height: 44px; padding: 0 10px; border-bottom: none; font-size: 15px; font-weight: 500; color: var(--secundario); white-space: nowrap; }
  .nav-lista a:hover { background: var(--coral-fuerte); color: #fff; }
  .nav-lista a[aria-current="page"] { background: var(--teal); color: #fff; font-weight: 700; }
  .nav-buscar { display: none; }
}
@media (min-width: 1240px) {
  .nav-lista a { padding: 0 12px; }
}

/* Footer in one row */
@media (min-width: 1100px) {
  .pie-grid { grid-template-columns: 1.4fr repeat(5, minmax(0, 1fr)); }
  .pie-marca { grid-column: auto; }
}

@media print {
  .cabecera, .pie, .robot-bubble, .robot-panel, #cc-banner, #cc-reopen { display: none !important; }
  body { background: #fff; }
}

/* ── 5. Components shared after the page migration (2026-11-18) ─────────── */
/* Gap between a page header and its first section, same on every page */
.hero + .section { padding-top: 8px; }
.breadcrumb + .section { padding-top: 24px; }

/* Long words and URLs never push the page wider than the phone */
.section, .post-content, .prosa, .callout, .faq-a { overflow-wrap: break-word; }

/* Callout label: one style everywhere (data/blogs.php, data/recursos.php, tools, risk pages).
   Labels are often full sentences, so they read as a bold lead-in, not an uppercase tag. */
.co-label { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-size: 17px; font-weight: 800; line-height: 1.35; letter-spacing: -0.005em; text-transform: none; color: var(--tinta); }
.co-label img { height: 24px; width: auto; flex-shrink: 0; border: 0; }
.co-label svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--teal); }
.callout .co-label + * { margin-top: 0; }
.callout.warn { border-left-color: var(--coral-fuerte); }
.callout.warn .co-label, .callout.warn .co-label svg { color: var(--coral-texto); }
.callout { max-width: var(--medida); }
.callout ul, .callout ol { padding-left: 1.3em; margin-top: .6em; }
.callout li + li { margin-top: .45em; }
.callout li::marker { color: var(--teal); }
.callout p + ul, .callout p + ol, .callout ul + p, .callout ol + p { margin-top: .7em; }
.callout .co-label + ul, .callout .co-label + ol { margin-top: 0; }
.callout .eyebrow, .post-content .eyebrow, .prosa .eyebrow { font-size: 12px; color: var(--teal); margin: 0 0 8px; }

/* Small count / type badge on hub cards */
.etiqueta-conteo, .recurso-tipo-tag { align-self: flex-start; display: inline-block; padding: 4px 8px; background: var(--teal); color: #fff; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; line-height: 1.3; }

/* Headings inside side boxes keep document order (h2/h3) at a box size */
.sidebar-box h2, .sidebar-box h3 { font-size: 17px; font-weight: 700; line-height: 1.3; letter-spacing: 0; color: var(--tinta); margin-bottom: 10px; }

/* Figure captions inside long text */
/* !important beats the inline font-size:12px in data/blogs.php and data/recursos.php */
.post-content figcaption, .prosa figcaption { margin-top: 8px !important; font-size: 14px !important; line-height: 1.5; color: var(--tenue); }


/* Consent row under email forms, and the honeypot field every form uses */
.form-consent, .ep-consent { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 16px; }
.form-consent input, .ep-consent input { width: 22px; height: 22px; margin-top: 1px; flex-shrink: 0; accent-color: var(--teal); }
.form-consent label, .ep-consent label { font-size: 14px; color: var(--secundario); line-height: 1.5; }
.trampa, .po-trampa, .campo-trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Disabled buttons never get the hover colors */
.btn:disabled, .btn[disabled], .btn[aria-disabled="true"] { background: var(--bg-card) !important; border-color: var(--borde-fuerte) !important; color: var(--tenue) !important; box-shadow: none !important; cursor: not-allowed; }

/* A selected teal card keeps a visible focus ring */
.cta-card.active:focus-visible, .cta-card[aria-pressed="true"]:focus-visible { outline-color: var(--tinta); }

/* Robot: the urgent option goes straight to /ayuda-ahora/ */
a.robot-menu-opt { text-decoration: none; color: var(--tinta); }
.robot-menu-opt-urgente { border-left: 3px solid var(--coral); font-weight: 700; }
.robot-menu-opt-urgente:hover { border-color: var(--coral-fuerte); background: var(--coral-fondo); }

/* ── 6. Risk page template (/riesgos/<slug>/ and /riesgos/ciberacoso-y-doxxing/) ── */
.riesgo-cuerpo { padding-top: 0; }
.riesgo-cuerpo > * { max-width: var(--medida); }
.riesgo-cuerpo > .riesgo-ancho { max-width: none; }
.riesgo-cuerpo > h2 { margin: 56px 0 12px; }
.riesgo-cuerpo > h2:first-child { margin-top: 0; }
.riesgo-cuerpo > h2 + .sec-sub { margin-bottom: 20px; }
.riesgo-cuerpo > .callout:first-child { margin-top: 0; }
.riesgo-cuerpo > .faq-list { margin-top: 16px; }
.riesgo-cuerpo > .faq-list + .callout { margin-top: 40px; }
.callout.respuesta-rapida, .callout.riesgo-rapida { background: var(--teal-fondo); }

/* Two-column compare: definition vs AI angle, victim vs aggressor */
.riesgo-doble { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; background: var(--borde); border: 1px solid var(--borde); margin-top: 20px; }
.riesgo-doble > div { background: var(--bg-card); padding: 20px; border-top: 3px solid var(--teal); }
.riesgo-doble > .ia, .riesgo-doble > .aggressor { border-top-color: var(--coral); }
.rd-label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--teal); margin-bottom: 8px; }
.rd-label.ia { color: var(--coral-texto); }
.riesgo-doble h3 { margin: 0 0 12px; }
.riesgo-doble p { font-size: 16px; line-height: 1.65; color: var(--texto); }
.riesgo-doble p + p { margin-top: 10px; }

/* Bar-bullet lists: .riesgo-lista is an alias of .lista-barra (section 7) */
.riesgo-doble .riesgo-lista, .riesgo-doble .lista-barra { margin-top: 0; }

/* Action box with numbered steps (.riesgo-pasos is an alias of .pasos, section 7) */
.que-hacer, .riesgo-accion { background: var(--bg-card); border: 1px solid var(--borde); border-top: 3px solid var(--teal); padding: 20px; margin-top: 40px; }
.riesgo-paso-enlace { display: block; }

/* Video block (.riesgo-video-frame is an alias of .video-marco, section 7) */
.riesgo-video { margin-top: 32px; }
.riesgo-video-intro { font-size: 16px; line-height: 1.65; color: var(--secundario); margin: 0 0 14px; }
.riesgo-video-fuente { font-size: 14px; line-height: 1.5; color: var(--tenue); margin: 8px 0 0; }

/* Related cards: column count follows the number of cards, so no empty cells show */
.riesgo-rel { margin-top: 20px; }
@media (min-width: 600px) { .riesgo-rel-1, .riesgo-rel-3 { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 900px) { .riesgo-rel-1 { grid-template-columns: minmax(0, 1fr); } .riesgo-rel-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .riesgo-rel-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

@media (min-width: 600px) {
  .riesgo-doble { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .riesgo-doble > div { padding: 24px; }
  .que-hacer, .riesgo-accion { padding: 24px 28px; }
}

/* ── 7. Shared components: ONE definition each (2026-11-18) ────────────────
   Every repeated component lives here once. Pages keep their own hook class
   (for JS) and add the shared class; their page CSS copy is then deleted.
   Catalog with markup: docs/COMPONENTES_COMPARTIDOS.md */

/* 7a. Numbered steps: <ol class="pasos"><li>…</li></ol>. Alias: .riesgo-pasos */
.pasos, .riesgo-pasos { list-style: none; padding: 0; margin: 0; max-width: var(--medida); counter-reset: paso; }
.pasos > li, .riesgo-pasos > li { counter-increment: paso; position: relative; padding: 12px 0 12px 46px; font-size: 16px; line-height: 1.6; color: var(--texto); border-bottom: 1px solid var(--borde); }
.pasos > li:last-child, .riesgo-pasos > li:last-child { border-bottom: none; padding-bottom: 0; }
.pasos > li::before, .riesgo-pasos > li::before { content: counter(paso); position: absolute; left: 0; top: 10px; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; background: var(--teal); color: #fff; font-size: 15px; font-weight: 700; line-height: 1; }
.pasos > li strong, .riesgo-pasos > li strong { color: var(--tinta); }
/* Outlined numbers (agente de viajes): <ol class="pasos contorno"> */
.pasos.contorno > li::before { background: none; border: 2px solid var(--teal); color: var(--teal); }

/* 7b. Bar-bullet list: <ul class="lista-barra"><li>…</li></ul>. Alias: .riesgo-lista
   Variant with dividers: <ul class="lista-barra divisiones"> */
.lista-barra, .riesgo-lista { list-style: none; padding: 0; margin: 16px 0 0; max-width: var(--medida); }
.lista-barra > li, .riesgo-lista > li { position: relative; padding-left: 22px; font-size: 16px; line-height: 1.65; color: var(--texto); overflow-wrap: break-word; }
.lista-barra > li + li, .riesgo-lista > li + li { margin-top: 12px; }
.lista-barra > li::before, .riesgo-lista > li::before { content: ''; position: absolute; left: 0; top: .8em; width: 10px; height: 2px; background: var(--teal); }
.lista-barra > li strong, .riesgo-lista > li strong { color: var(--tinta); }
.lista-barra.divisiones > li { padding-bottom: 12px; border-bottom: 1px solid var(--borde); }
.lista-barra.divisiones > li:last-child { padding-bottom: 0; border-bottom: none; }

/* 7c. Case or law block: <div class="caja-caso"><span class="caja-caso-etiqueta">…</span><h3>…</h3><p>…</p></div> */
.caja-caso { max-width: var(--medida); padding: 20px; background: var(--bg-card); border: 1px solid var(--borde); border-left: 3px solid var(--teal); overflow-wrap: break-word; }
.caja-caso + .caja-caso { margin-top: 12px; }
.caja-caso-etiqueta { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 700; line-height: 1.45; text-transform: uppercase; letter-spacing: .08em; color: var(--teal); }
.caja-caso h3 { margin: 0 0 8px; }
.caja-caso p, .caja-caso li { font-size: 16px; line-height: 1.65; color: var(--texto); }
.caja-caso > * + *:not(h3) { margin-top: .7em; }
.caja-caso ul, .caja-caso ol { padding-left: 1.3em; }
.caja-caso li + li { margin-top: .4em; }
.caja-caso li::marker { color: var(--teal); }

/* 7d. "Send me my plan" card: <section class="caja-envio"><span class="eyebrow">…</span><h2>…</h2>
   <p class="caja-envio-sub">…</p><form>…</form></section> */
.caja-envio { max-width: var(--medida); margin-top: 40px; padding: 22px 20px; background: var(--bg-card); border: 1px solid var(--borde); border-top: 3px solid var(--teal); }
.caja-envio h2 { margin: 4px 0 8px; }
.caja-envio-sub { margin: 0 0 18px; font-size: 16px; color: var(--secundario); }
.caja-envio-fila { display: flex; flex-wrap: wrap; gap: 12px; }
.caja-envio-fila .form-input { flex: 1 1 220px; width: auto; min-width: 0; }
.caja-envio-fila .btn { flex: 1 1 100%; }
.caja-envio-msg { margin: 12px 0 0; font-size: 16px; font-weight: 700; }
.caja-envio-msg:empty { margin: 0; }
.caja-envio-msg.ok { color: var(--teal); }
.caja-envio-msg.error { color: var(--coral-texto); }

/* 7e. Share bar: <div class="compartir-barra"><span class="section-lead">…</span> buttons
   <span class="compartir-aviso" aria-live="polite"></span><span class="compartir-cuenta">…</span></div> */
.compartir-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 40px; padding: 20px 0; border-top: 1px solid var(--borde); border-bottom: 1px solid var(--borde); }
.compartir-barra > .section-lead { width: 100%; margin: 0; }
.compartir-barra .compartir-aviso { font-size: 14px; font-weight: 400; color: var(--secundario); }
.compartir-barra .compartir-cuenta { width: 100%; font-size: 14px; color: var(--tenue); }

/* 7f. Related links in a side box, 44 px rows:
   <div class="sidebar-box lista-relacionados"><h2>…</h2><a href="…"><span class="bc-cat">…</span>Title</a>…</div> */
.lista-relacionados a { display: flex; flex-direction: column; justify-content: center; min-height: 44px; padding-block: 8px; border-top: 1px solid var(--borde); font-size: 16px; line-height: 1.4; color: var(--texto); text-decoration: none; }
.lista-relacionados :is(h2, h3, .sidebar-tag) + a { border-top: none; }
.lista-relacionados a:hover { color: var(--teal); }
.lista-relacionados .bc-cat { display: block; margin-bottom: 2px; }

/* 7g. Hub blocks (guias/post, categorias/post): <section class="hub-bloque"><h2>…</h2> grid </section>
   and the closing <div class="hub-botones botones">…</div> */
.hub-bloque { margin-top: 40px; }
.hub-bloque h2 { margin-bottom: 16px; }
.hub-botones { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--borde); }

/* 7h. Video frame, 16:9 with the black letterbox: <div class="video-marco"><iframe …></iframe></div>
   Alias: .riesgo-video-frame */
.video-marco, .riesgo-video-frame { position: relative; width: 100%; padding-top: 56.25%; background: var(--video-fondo); border: 1px solid var(--borde); }
.video-marco iframe, .video-marco video, .riesgo-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@supports (aspect-ratio: 16 / 9) { .video-marco, .riesgo-video-frame { padding-top: 0; aspect-ratio: 16 / 9; } }

/* 7i. Quiz kit. Pages keep their own JS; these classes only draw.
   Counter:  <p class="quiz-paso">Pregunta 1 de 7</p>
   Progress: <div class="quiz-progreso" aria-hidden="true"><span class="quiz-progreso-barra" style="width:14%"></span></div>
   Options:  <div class="quiz-opciones"><button type="button" class="quiz-opcion" aria-pressed="false">…</button></div>
   Sí / No / No sé row: <div class="quiz-opciones compactas"> */
.quiz-paso { display: block; margin: 0 0 8px; font-size: 14px; font-weight: 600; line-height: 1.4; letter-spacing: 0; text-transform: none; color: var(--secundario); }
.quiz-progreso { position: relative; height: 6px; margin: 0 0 24px; overflow: hidden; background: var(--teal-fondo); border: 1px solid var(--borde); }
.quiz-progreso-barra { display: block; width: 0; height: 100%; background: var(--teal); transition: width .3s ease; }
.quiz-opciones { display: flex; flex-direction: column; gap: 10px; }
.quiz-opcion { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 12px 18px; font-family: var(--fuente); font-size: 16px; font-weight: 500; line-height: 1.45; text-align: left; color: var(--tinta); background: var(--bg-card); border: 1px solid var(--borde-fuerte); cursor: pointer; transition: border-color .15s, background-color .15s; }
.quiz-opcion:hover { border-color: var(--teal); }
.quiz-opcion[aria-pressed="true"], .quiz-opcion[aria-checked="true"], .quiz-opcion.is-selected, .quiz-opcion.selected, .quiz-opcion:has(input:checked), input:checked + .quiz-opcion { background: var(--teal-fondo); border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); color: var(--tinta); }
/* A native radio or checkbox inside the option covers it, invisible, so the whole row is the target */
.quiz-opcion > input:is([type="radio"], [type="checkbox"]) { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.quiz-opcion:has(input:focus-visible), input:focus-visible + .quiz-opcion { outline: 3px solid var(--teal); outline-offset: 3px; }
.quiz-opciones.compactas { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.quiz-opciones.compactas .quiz-opcion { flex: 1 1 0; width: auto; min-width: 88px; min-height: 48px; padding: 8px 16px; justify-content: center; text-align: center; font-weight: 600; }

/* 7j. Option cards for pickers (age, path): add .opcion-tarjeta to the .cta-card button.
   Selected (.active, .is-selected or [aria-pressed="true"]): teal border, --teal-fondo, 2px inset ring. */
.opcion-tarjeta { width: 100%; font: inherit; text-align: left; }
.opcion-tarjeta.active, .opcion-tarjeta.is-selected, .opcion-tarjeta[aria-pressed="true"], .opcion-tarjeta[aria-checked="true"],
.opcion-tarjeta.active:hover, .opcion-tarjeta.is-selected:hover, .opcion-tarjeta[aria-pressed="true"]:hover { background: var(--teal-fondo); border-color: var(--teal); box-shadow: inset 0 0 0 2px var(--teal); color: var(--tinta); }
.opcion-tarjeta.active::before, .opcion-tarjeta.is-selected::before, .opcion-tarjeta[aria-pressed="true"]::before { transform: scaleX(1); }
.opcion-tarjeta.active:focus-visible, .opcion-tarjeta.is-selected:focus-visible, .opcion-tarjeta[aria-pressed="true"]:focus-visible { outline-color: var(--tinta); }

/* 7k. Sources and review note (tu-voz, meta-ai):
   <h3 class="fuentes-grupo">…</h3><ul class="fuentes"><li>…</li></ul><p class="nota-revision">Revisado: 10 de octubre de 2026</p> */
.fuentes-grupo { margin: 24px 0 10px; font-size: 12px; font-weight: 700; line-height: 1.4; text-transform: uppercase; letter-spacing: .1em; color: var(--tinta); }
.fuentes { list-style: none; padding: 0; margin: 0; max-width: var(--medida); }
.fuentes > li { font-size: 14px; line-height: 1.6; color: var(--secundario); overflow-wrap: anywhere; }
.fuentes > li + li { margin-top: 8px; }
.nota-revision { max-width: var(--medida); margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--borde); font-size: 14px; color: var(--tenue); }

@media (min-width: 600px) {
  .caja-caso { padding: 22px 24px; }
  .caja-envio { padding: 26px 28px; }
  .caja-envio-fila .btn { flex: 0 0 auto; }
  .compartir-barra .compartir-cuenta { width: auto; margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .quiz-progreso-barra { transition: none; }
}

/* ── 8. Final consistency pass (2026-11-18) ─────────────────────────────── */
/* The callout label wins over .callout p / .post-content p everywhere. */
.callout .co-label, .que-hacer .co-label, .post-content .callout .co-label, .post-content .que-hacer .co-label { margin: 0 0 8px; font-size: 17px; font-weight: 800; color: var(--tinta); }
.callout.warn .co-label, .post-content .callout.warn .co-label { color: var(--coral-texto); }
/* "¿Qué deberías hacer ahora?" is one block on blog posts, guides and risk pages. */
.que-hacer .pasos { margin-top: 4px; }
.post-content .que-hacer { margin-top: 40px; }
/* Small notes inside data bodies (inline 12/13px) lift to 14px, once for every article. */
.post-content p[style*="font-size:12px"], .post-content p[style*="font-size:13px"], .post-content span[style*="font-size:12px"] { font-size: 14px !important; color: var(--tenue) !important; }
/* Inline text links reach a 44px tap height without moving the line. */
.texto-enlace a { padding-block: 13px; }
/* Mechanism cards (Meta AI, Tu voz) */
.mech-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; margin: 24px 0 0; background: var(--borde); border: 1px solid var(--borde); }
.mech-card { padding: 22px 20px; background: var(--bg-card); }
.mech-card h3 { margin: 0 0 10px; }
@media (min-width: 768px) { .mech-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mech-card p { font-size: 16px; line-height: 1.65; color: var(--texto); }
.mech-card p + p { margin-top: .7em; }
@media (min-width: 900px) { .mech-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ── 9. Wide screens and the reading layout (2026-11-18, David's review on a 16" laptop) ──
   Pure CSS responsive: the layout follows the real viewport width, so a phone in portrait,
   an iPad in landscape, a laptop and a large monitor each get the right arrangement.
   The frame grows on big screens without going edge to edge. */
@media (min-width: 1440px) { :root { --max: 1280px; } }
@media (min-width: 1680px) { :root { --max: 1400px; } }

/* Reading pages (blog posts, guides, risk pages, /ayuda-ahora/, /privacidad/):
   text column on the left at a comfortable measure, sticky sidebar pinned to the right edge
   of the frame, so the right side is never empty. */
.lectura > :first-child { min-width: 0; }
.lectura .riesgo-cuerpo, .lectura .emg-cuerpo { padding: 0; max-width: none; margin: 0; }
/* 2026-11-19 (David: "texto angosto"): the text column now runs up to the sidebar instead of
   stopping at 720 px with an empty gap. Inside .post-layout every block that used the 720 px
   measure fills the column. Column: up to 860 px (900 to 1279), the full space left of the sidebar (1280 to 1679),
   940 px (1680+). Type grows to 19 px from 1280 so lines stay near 85 to 90 characters. The page header matches the column.
   Applies to every .post-layout page: blog posts, guides, risk pages, tools. */
.post-layout { --medida: 100%; }
@media (min-width: 900px) {
  .post-layout { grid-template-columns: minmax(0, 860px) minmax(250px, 300px); justify-content: space-between; column-gap: 48px; }
  .post-sidebar { position: sticky; top: calc(var(--alto-cabecera) + 24px); align-self: start; max-height: calc(100vh - var(--alto-cabecera) - 48px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .hero:has(+ .post-layout) h1, .hero:has(+ .post-layout) .hero-sub, .hero:has(+ .post-layout) .lead { max-width: min(860px, calc(100% - 348px)); }
}
@media (min-width: 1280px) {
  .post-layout { grid-template-columns: minmax(0, 1fr) 320px; column-gap: 56px; }
  .hero:has(+ .post-layout) h1, .hero:has(+ .post-layout) .hero-sub, .hero:has(+ .post-layout) .lead { max-width: calc(100% - 376px); }
  .post-layout .post-content, .post-layout .prosa, .post-layout .riesgo-cuerpo { font-size: 19px; }
}
@media (min-width: 1680px) {
  .post-layout { grid-template-columns: minmax(0, 940px) 340px; column-gap: 64px; }
  .hero:has(+ .post-layout) h1, .hero:has(+ .post-layout) .hero-sub, .hero:has(+ .post-layout) .lead { max-width: 940px; }
}

/* "En esta página": built by sitio-v2.js, desktop only */
.indice h2 { font-size: 17px; margin-bottom: 8px; }
.indice-lista { list-style: none; counter-reset: none; }
.indice-lista a { display: block; padding: 7px 0 7px 12px; border-left: 2px solid var(--borde); color: var(--secundario); font-size: 15px; line-height: 1.4; text-decoration: none; }
.indice-lista a:hover { color: var(--teal); border-left-color: var(--teal-suave); }
.indice-lista a[aria-current="true"] { color: var(--tinta); font-weight: 700; border-left: 3px solid var(--teal); padding-left: 11px; }
.sidebar-urgente { border-left: 3px solid var(--coral); }
.sidebar-urgente .sidebar-tag { color: var(--coral-texto); }
@media (max-width: 899px) { .indice { display: none !important; } }

/* Pages whose body is made of .section blocks (tools, /en-los-medios/) sit in the reading
   column: the sections drop their own frame so the column and the sidebar share one grid. */
.lectura-cuerpo > .section, .lectura-cuerpo > .section-band > .section { max-width: none; padding-inline: 0; margin: 0; }
.lectura-cuerpo > .section:first-child { padding-top: 0; }
.lectura-cuerpo > .section-band { background: none; border: none; }
.lista-relacionados ul { list-style: none; }

/* 2026-11-19 blog batch QA (template level, article text untouched). */
/* QA-03: inline list styles from older generators shrank list text below paragraph size. */
.post-content > ul[style], .post-content > ol[style] { font-size: inherit !important; line-height: inherit !important; color: inherit !important; padding-left: 1.4em !important; }
.post-content > ul[style] li + li, .post-content > ol[style] li + li { margin-top: .45em; }
/* QA-04: an inline coral border marks an alert callout. Give it the same fill as .callout.warn. */
.callout[style*="--coral"], .callout.warn { background: var(--coral-fondo); border-left-width: 4px; }
/* QA-05: wide tables scroll inside their box on phones instead of squeezing. */
@media (max-width: 600px) { .blog-table-wrap table { min-width: 520px; } }
/* QA-09: the share-bar lead was 12px. */
.compartir-barra > .section-lead { font-size: 14px; }

/* SEO plan B12 (2026-11-19): byline in the page header and author box after the article.
   Byline: <p class="firma">Por <a rel="author">…</a>, …</p> in .hero (blog, guides, risk pages).
   Author box markup: rec_autor() in recursos/_recursos-ui.php (blog, recursos and riesgos templates). */
.firma { font-size: 14px; line-height: 1.5; color: var(--secundario); max-width: 64ch; margin: 12px 0 0; }
.post-autor { padding-top: 0; }
.autor-caja { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px; padding: 24px; background: var(--bg-card); border: 1px solid var(--borde); border-left: 3px solid var(--teal); }
.autor-foto { width: 72px; height: 72px; object-fit: cover; object-position: top center; flex-shrink: 0; border: 1px solid var(--borde-fuerte); }
.autor-texto { flex: 1 1 220px; min-width: 0; }
.autor-nombre { font-size: 17px; font-weight: 700; color: var(--tinta); margin-bottom: 6px; }
.autor-nombre a { color: inherit; text-decoration: underline; text-decoration-color: var(--subrayado); text-underline-offset: 3px; }
.autor-nombre a:hover { color: var(--teal); text-decoration-color: currentColor; }
.autor-texto p { font-size: 16px; color: var(--secundario); line-height: 1.65; max-width: 64ch; margin-bottom: 16px; }
