/* =============================================================================
   Legioval — Hoja de estilos única
   =============================================================================
   Sin dependencias externas: ni Tailwind CDN, ni AOS, ni Google Fonts.
   Todo el contenido es visible por defecto aunque el JavaScript falle.
   ============================================================================= */

/* ---------- Variables ---------- */
:root {
    --azul-900: #0c4a6e;
    --azul-800: #075985;
    --azul-700: #0369a1;
    --azul-600: #0284c7;
    --azul-500: #0ea5e9;
    --azul-50:  #f0f9ff;
    --azul-100: #e0f2fe;

    --gris-900: #111827;
    --gris-800: #1f2937;
    --gris-700: #374151;
    --gris-600: #4b5563;
    --gris-500: #6b7280;
    --gris-300: #d1d5db;
    --gris-200: #e5e7eb;
    --gris-100: #f3f4f6;
    --gris-50:  #f9fafb;

    --rojo-700: #b91c1c;
    --rojo-600: #dc2626;
    --rojo-50:  #fef2f2;
    --ambar-50: #fffbeb;
    --ambar-300:#fcd34d;
    --ambar-800:#92400e;
    --verde-50: #f0fdf4;
    --verde-300:#86efac;
    --verde-800:#166534;

    --ancho-max: 1140px;
    --radio: 10px;
    --sombra: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    --sombra-md: 0 4px 12px rgba(0,0,0,.08);
    --sombra-lg: 0 10px 30px rgba(0,0,0,.12);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    color: var(--gris-800);
    background: #fff;
}

.saltar-contenido {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1000;
    transform: translateY(-160%);
    padding: 10px 14px;
    border-radius: 7px;
    background: #fff;
    color: var(--azul-900);
    font-weight: 700;
    box-shadow: var(--sombra-md);
}
.saltar-contenido:focus { transform: translateY(0); }

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--ambar-300);
    outline-offset: 3px;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--azul-700); }

h1, h2, h3, h4 { line-height: 1.25; color: var(--azul-900); margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 1.2rem; font-weight: 650; }
h4 { font-size: 1.05rem; font-weight: 650; }
p  { margin: 0 0 1.1em; }

/* ---------- Estructura ---------- */
.contenedor {
    width: 100%;
    max-width: var(--ancho-max);
    margin: 0 auto;
    padding: 0 20px;
}
.estrecho { max-width: 800px; }

.seccion { padding: 72px 0; }
.seccion-gris { background: var(--gris-50); }
.seccion-azul { background: var(--azul-50); }

.centrado { text-align: center; }

.rejilla { display: grid; gap: 28px; }
@media (min-width: 760px) {
    .rejilla-2 { grid-template-columns: repeat(2, 1fr); }
    .rejilla-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Cabecera ---------- */
.cabecera {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid var(--gris-200);
    box-shadow: var(--sombra);
}
.cabecera-interior {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    max-width: var(--ancho-max);
    margin: 0 auto;
}
.logo {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    white-space: nowrap;
}
.logo-icono { width: 27px; height: auto; flex-shrink: 0; }
.logo-texto {
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--azul-800);
    letter-spacing: -.01em;
}
.logo-texto b { color: var(--azul-600); font-weight: 800; }
.logo:hover .logo-texto { color: var(--azul-900); }
@media (min-width: 420px) { .logo-texto { font-size: 1.18rem; } }
@media (min-width: 950px) {
    .logo-icono { width: 32px; }
    .logo-texto { font-size: 1.3rem; }
}

.menu-boton {
    display: block;
    background: none;
    border: 1px solid var(--gris-300);
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    color: var(--gris-700);
    line-height: 0;
}
.menu-boton svg { width: 22px; height: 22px; }

.menu-movil { position: relative; }
.menu-movil summary {
    display: block;
    list-style: none;
    border: 1px solid var(--gris-300);
    border-radius: 8px;
    padding: 8px 10px;
    color: var(--gris-700);
    cursor: pointer;
    line-height: 0;
}
.menu-movil summary::-webkit-details-marker { display: none; }
.menu-movil summary svg { width: 22px; height: 22px; }
.menu-movil[open] summary { background: var(--azul-50); color: var(--azul-700); }
.menu-movil .navegacion-movil {
    display: block;
    position: fixed;
    top: 67px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--gris-200);
    box-shadow: var(--sombra-md);
    padding: 8px 0;
}

.navegacion { display: none; }
.navegacion.abierto {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--gris-200);
    box-shadow: var(--sombra-md);
    padding: 8px 0;
}
.navegacion a {
    display: block;
    padding: 12px 20px;
    color: var(--gris-700);
    text-decoration: none;
    font-size: .95rem;
    font-weight: 500;
}
.navegacion a:hover { background: var(--azul-50); color: var(--azul-700); }
.navegacion a.activo { color: var(--azul-700); font-weight: 650; }

@media (min-width: 950px) {
    .menu-movil { display: none; }
    .menu-boton { display: none; }
    .navegacion,
    .navegacion.abierto {
        display: flex;
        align-items: center;
        gap: 4px;
        position: static;
        border: 0;
        box-shadow: none;
        padding: 0;
    }
    .navegacion a { padding: 8px 12px; border-radius: 6px; }
    .navegacion a.activo { background: var(--azul-50); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

.nav-cta {
    background: var(--azul-600);
    color: #fff !important;
    border-radius: 8px;
    font-weight: 650 !important;
    text-align: center;
    margin: 8px 20px;
}
.nav-cta:hover { background: var(--azul-700) !important; color: #fff !important; }
@media (min-width: 950px) {
    .nav-cta { margin: 0 0 0 8px; padding: 9px 18px !important; }
}

/* ---------- Hero ---------- */
.hero {
    background:
        radial-gradient(at 12% 18%, rgba(14,165,233,.45) 0, transparent 55%),
        radial-gradient(at 88% 78%, rgba(2,132,199,.55) 0, transparent 55%),
        linear-gradient(135deg, var(--azul-800) 0%, var(--azul-900) 100%);
    color: #fff;
    padding: 84px 0;
    text-align: center;
}
.hero h1 { color: #fff; max-width: 20ch; margin-inline: auto; }
.hero .entradilla {
    font-size: 1.15rem;
    color: rgba(255,255,255,.92);
    max-width: 62ch;
    margin: 0 auto 32px;
}
.hero .aviso {
    margin-top: 34px;
    font-size: .88rem;
    color: rgba(255,255,255,.75);
    max-width: 60ch;
    margin-inline: auto;
}
.etiqueta {
    display: inline-block;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 999px;
    padding: 6px 16px;
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: 22px;
}

/* Cabecera de páginas interiores */
.cabecera-pagina {
    background: linear-gradient(135deg, var(--azul-700) 0%, var(--azul-900) 100%);
    color: #fff;
    padding: 56px 0;
    text-align: center;
}
.cabecera-pagina h1 { color: #fff; margin-bottom: .3em; }
.cabecera-pagina p {
    font-size: 1.1rem;
    color: rgba(255,255,255,.9);
    max-width: 65ch;
    margin: 0 auto;
}

/* ---------- Botones ---------- */
.boton {
    display: inline-block;
    padding: 14px 30px;
    border-radius: var(--radio);
    font-size: 1.02rem;
    font-weight: 650;
    text-decoration: none;
    text-align: center;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background-color .18s, color .18s, transform .18s;
    font-family: inherit;
}
.boton:hover { transform: translateY(-1px); }
.boton-primario { background: var(--azul-600); color: #fff; }
.boton-primario:hover { background: var(--azul-700); }
.boton-claro { background: #fff; color: var(--azul-800); }
.boton-claro:hover { background: var(--azul-50); }
.boton-borde { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.boton-borde:hover { background: rgba(255,255,255,.12); }
.boton-bloque { display: block; width: 100%; }
.boton:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.grupo-botones {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}

/* ---------- Tarjetas ---------- */
.tarjeta {
    background: #fff;
    border: 1px solid var(--gris-200);
    border-radius: var(--radio);
    padding: 30px;
    box-shadow: var(--sombra);
    transition: box-shadow .2s, transform .2s;
}
.tarjeta:hover { box-shadow: var(--sombra-md); transform: translateY(-2px); }
.tarjeta h3 { color: var(--azul-700); }
.tarjeta p:last-child { margin-bottom: 0; }
.tarjeta-plana { background: var(--azul-50); border-color: var(--azul-100); box-shadow: none; }
.tarjeta-plana:hover { transform: none; box-shadow: none; }

.icono { color: var(--azul-500); margin-bottom: 14px; }
.icono svg { width: 52px; height: 52px; }

.numero-paso {
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--azul-600);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.enlace-mas {
    color: var(--azul-600);
    font-weight: 600;
    text-decoration: none;
}
.enlace-mas:hover { text-decoration: underline; }

/* ---------- Avisos ---------- */
.aviso-caja {
    border-radius: var(--radio);
    padding: 20px 24px;
    border-left: 4px solid;
    margin: 28px 0;
}
.aviso-caja p:last-child { margin-bottom: 0; }
.aviso-info  { background: var(--azul-50);  border-color: var(--azul-500);  }
.aviso-ambar { background: var(--ambar-50); border-color: var(--ambar-300); color: var(--ambar-800); }
.aviso-rojo  { background: var(--rojo-50);  border-color: var(--rojo-600);  color: var(--rojo-700); }
.aviso-caja h3 { margin-bottom: .4em; }
.aviso-rojo h3 { color: var(--rojo-700); }
.aviso-ambar h3 { color: var(--ambar-800); }

.nota-modelo {
    background: var(--gris-50);
    border: 1px solid var(--gris-200);
    border-radius: var(--radio);
    padding: 22px 26px;
    max-width: 760px;
    margin: 44px auto 0;
}
.nota-modelo h3 { font-size: 1rem; color: var(--gris-800); }
.nota-modelo p { font-size: .92rem; color: var(--gris-600); margin-bottom: 0; }

/* ---------- Contenido editorial ---------- */
.contenido { max-width: 800px; margin: 0 auto; }
.contenido h2 { margin-top: 2.2em; padding-top: .2em; }
.contenido h3 { margin-top: 1.6em; color: var(--azul-700); }
.contenido ul, .contenido ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.contenido li { margin-bottom: .5em; }
.contenido li > ul, .contenido li > ol { margin-top: .5em; }
.contenido a { font-weight: 500; }
.contenido img { border-radius: var(--radio); box-shadow: var(--sombra-md); margin: 32px auto; }
.contenido strong { color: var(--gris-900); }

.lista-dos-columnas { columns: 1; }
@media (min-width: 700px) { .lista-dos-columnas { columns: 2; column-gap: 36px; } }

/* ---------- Tablas ---------- */
.tabla-envoltorio {
    overflow-x: auto;
    border-radius: var(--radio);
    box-shadow: var(--sombra);
    margin: 28px 0;
    border: 1px solid var(--gris-200);
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: .93rem;
    background: #fff;
}
thead { background: var(--azul-700); color: #fff; }
th, td { padding: 12px 16px; text-align: left; }
th { font-weight: 650; white-space: nowrap; }
tbody tr { border-top: 1px solid var(--gris-200); }
tbody tr:nth-child(even) { background: var(--gris-50); }
td ul { margin: 6px 0 0; padding-left: 1.2em; }

/* ---------- Formulario ---------- */
.formulario {
    background: var(--gris-50);
    border: 1px solid var(--gris-200);
    border-radius: 14px;
    padding: 30px;
}
@media (max-width: 600px) { .formulario { padding: 22px 18px; } }

.formulario fieldset {
    border: 0;
    padding: 0;
    margin: 0 0 34px;
}
.formulario fieldset + fieldset {
    border-top: 1px solid var(--gris-200);
    padding-top: 30px;
}
.formulario legend {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--azul-700);
    padding: 0;
    margin-bottom: 20px;
}

.campo { margin-bottom: 20px; }
.campo:last-child { margin-bottom: 0; }
.campo > label,
.campo > .etiqueta-grupo {
    display: block;
    font-size: .92rem;
    font-weight: 600;
    color: var(--gris-700);
    margin-bottom: 6px;
}
.opcional { color: var(--gris-500); font-weight: 400; }
.obligatorio { color: var(--rojo-600); }

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 11px 13px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--gris-800);
    background: #fff;
    border: 1px solid var(--gris-300);
    border-radius: 8px;
    transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--azul-500);
    box-shadow: 0 0 0 3px rgba(14,165,233,.18);
}
textarea { resize: vertical; min-height: 100px; }
select { cursor: pointer; }

.campos-fila { display: grid; gap: 20px; }
@media (min-width: 640px) { .campos-fila { grid-template-columns: 1fr 1fr; } }

.opciones { display: grid; gap: 10px; }
@media (min-width: 640px) { .opciones { grid-template-columns: 1fr 1fr; } }
.opciones label,
.consentimiento label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .93rem;
    font-weight: 400;
    color: var(--gris-700);
    cursor: pointer;
    line-height: 1.5;
}
input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--azul-600);
    cursor: pointer;
}

.consentimiento { margin-bottom: 16px; }

/* Información básica de protección de datos (primera capa AEPD) */
.caja-rgpd {
    background: #fff;
    border: 1px solid var(--gris-200);
    border-radius: 8px;
    padding: 16px 18px;
    font-size: .82rem;
    color: var(--gris-600);
    line-height: 1.55;
    margin-bottom: 22px;
}
.caja-rgpd p { margin: 0 0 5px; }
.caja-rgpd p:last-child { margin-bottom: 0; }
.caja-rgpd .titulo {
    font-size: .92rem;
    font-weight: 700;
    color: var(--gris-800);
    margin-bottom: 10px;
}
.caja-rgpd strong { color: var(--gris-700); }

/* Errores de validación */
.error-campo {
    display: none;
    color: var(--rojo-700);
    font-size: .84rem;
    margin-top: 5px;
}
.error-campo.visible { display: block; }
[aria-invalid="true"] { border-color: var(--rojo-600) !important; }

/* Trampa antispam */
.trampa {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.pie-formulario {
    border-top: 1px solid var(--gris-200);
    padding-top: 24px;
}
.letra-pequena {
    font-size: .82rem;
    color: var(--gris-500);
    text-align: center;
    margin: 12px 0 0;
}

.mensaje-estado {
    display: none;
    border-radius: 8px;
    padding: 16px 18px;
    font-size: .93rem;
    margin-top: 20px;
    border: 1px solid;
}
.mensaje-estado.visible { display: block; }
.mensaje-estado p:last-child { margin-bottom: 0; }
.estado-ok    { background: var(--verde-50); border-color: var(--verde-300); color: var(--verde-800); }
.estado-aviso { background: var(--ambar-50); border-color: var(--ambar-300); color: var(--ambar-800); }
.estado-error { background: var(--rojo-50);  border-color: #fca5a5;          color: var(--rojo-700); }
.mensaje-estado code {
    background: rgba(0,0,0,.06);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: .9em;
}

/* ---------- CTA intermedia ---------- */
.cta-franja {
    background: linear-gradient(135deg, var(--azul-700) 0%, var(--azul-900) 100%);
    color: #fff;
    padding: 56px 0;
    text-align: center;
}
.cta-franja h2 { color: #fff; }
.cta-franja p {
    color: rgba(255,255,255,.9);
    max-width: 60ch;
    margin: 0 auto 26px;
}

/* ---------- Pie ---------- */
.pie {
    background: var(--gris-800);
    color: var(--gris-300);
    padding: 52px 0 28px;
    font-size: .92rem;
}
.pie h4 { color: #fff; margin-bottom: .7em; }
.pie a { color: var(--gris-300); text-decoration: none; }
.pie a:hover { color: var(--azul-500); text-decoration: underline; }
.pie ul { list-style: none; margin: 0; padding: 0; }
.pie li { margin-bottom: 9px; }
.pie img { height: 56px; margin-bottom: 14px; }
.pie .descargo { font-size: .84rem; color: var(--gris-500); margin-top: 14px; }
.pie-inferior {
    border-top: 1px solid var(--gris-700);
    margin-top: 36px;
    padding-top: 24px;
    text-align: center;
    font-size: .87rem;
}
.pie-inferior p { margin-bottom: 10px; }
.pie-enlaces-legales {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    justify-content: center;
}

/* ---------- Volver arriba ---------- */
.volver-arriba {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--azul-600);
    color: #fff;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--sombra-lg);
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s;
}
.volver-arriba.visible { opacity: 1; visibility: visible; }
.volver-arriba:hover { background: var(--azul-700); }
.volver-arriba svg { width: 22px; height: 22px; }

/* ---------- Utilidades ---------- */
.sr-solo {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
.sin-margen-arriba { margin-top: 0; }
.texto-secundario { color: var(--gris-600); }
.entradilla-seccion {
    font-size: 1.08rem;
    color: var(--gris-600);
    max-width: 62ch;
    margin: 0 auto 44px;
    text-align: center;
}

/* ---------- Diagramas SVG incrustados ---------- */
.diagrama {
    margin: 36px 0;
}
.diagrama svg {
    display: block;
    width: 100%;
    max-width: 640px;
    height: auto;
    margin: 0 auto;
    border: 1px solid var(--gris-200);
    border-radius: var(--radio);
    box-shadow: var(--sombra-md);
    background: #fff;
}
.diagrama figcaption {
    font-size: .88rem;
    color: var(--gris-600);
    text-align: center;
    margin-top: 12px;
}

/* ---------- Ficha de autoría ---------- */
.ficha-autor {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 22px;
    background: var(--azul-50);
    border: 1px solid var(--azul-100);
    border-radius: var(--radio);
    padding: 24px;
    margin-bottom: 36px;
}
.ficha-autor img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--gris-200);
}
.ficha-autor h2 { margin-bottom: .2em; }
.ficha-autor .credencial {
    color: var(--gris-600);
    font-size: .96rem;
    margin: 0;
}

/* Firma al pie de cada artículo */
.firma-articulo {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    border-top: 1px solid var(--gris-200);
    margin-top: 48px;
    padding-top: 20px;
    font-size: .9rem;
    color: var(--gris-600);
}
.firma-articulo a { font-weight: 600; }
.firma-articulo .actualizado { color: var(--gris-500); }

/* ---------- Logo del pie ---------- */
.pie-marca { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.pie-marca svg { width: 34px; height: auto; flex-shrink: 0; }
.pie-marca span { font-size: 1.15rem; font-weight: 700; color: #fff; line-height: 1.15; }

/* ---------- Artículo del blog ---------- */
.meta-articulo {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    font-size: .88rem;
    color: rgba(255,255,255,.82);
    justify-content: center;
    margin-top: 18px;
}

.indice {
    background: var(--azul-50);
    border: 1px solid var(--azul-100);
    border-radius: var(--radio);
    padding: 22px 26px;
    margin: 0 0 40px;
}
.indice h2 {
    font-size: 1.05rem;
    margin: 0 0 12px;
    color: var(--azul-800);
}
.indice ol { margin: 0; padding-left: 1.3em; }
.indice li { margin-bottom: 6px; }
.indice a { text-decoration: none; font-weight: 500; }
.indice a:hover { text-decoration: underline; }

.contenido h2[id] { scroll-margin-top: 90px; }

/* Gráfico de temperaturas */
.grafico-temp { margin: 38px 0; }
.grafico-temp-titulo {
    font-size: 1.02rem;
    font-weight: 650;
    color: var(--azul-800);
    text-align: center;
    margin-bottom: 14px;
}
.grafico-temp-barra {
    display: flex;
    height: 74px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--sombra-md);
}
.grafico-temp-tramo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .68rem;
    font-weight: 650;
    text-align: center;
    padding: 4px 2px;
    line-height: 1.3;
}
.grafico-temp-tramo span { display: block; }
.grafico-temp-tramo .rango { font-size: .78rem; }
.t-frio    { background: #3b82f6; flex: 20; }
.t-riesgo  { background: #dc2626; flex: 25; }
.t-parada  { background: #ea580c; flex: 15; }
.t-lenta   { background: #a855f7; flex: 20; }
.t-rapida  { background: #6b21a8; flex: 20; }
.grafico-temp-escala {
    display: flex;
    justify-content: space-between;
    font-size: .74rem;
    color: var(--gris-500);
    margin-top: 7px;
}
.grafico-temp-pie {
    font-size: .84rem;
    color: var(--gris-600);
    text-align: center;
    margin-top: 12px;
}
@media (max-width: 560px) {
    .grafico-temp-barra { height: 92px; }
    .grafico-temp-tramo { font-size: .6rem; }
    .grafico-temp-tramo .rango { font-size: .68rem; }
}

/* ---------- Listado de guías ---------- */
.listado-guias { display: grid; gap: 22px; }
@media (min-width: 760px) { .listado-guias { grid-template-columns: repeat(2, 1fr); } }

.tarjeta-guia {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--gris-200);
    border-radius: var(--radio);
    padding: 26px;
    box-shadow: var(--sombra);
    transition: box-shadow .2s, transform .2s;
}
.tarjeta-guia:hover { box-shadow: var(--sombra-md); transform: translateY(-2px); }
.tarjeta-guia h3 { margin-bottom: .5em; }
.tarjeta-guia h3 a { color: var(--azul-700); text-decoration: none; }
.tarjeta-guia h3 a:hover { text-decoration: underline; }
.tarjeta-guia p { color: var(--gris-600); font-size: .95rem; flex-grow: 1; }
.tarjeta-guia .fecha { font-size: .82rem; color: var(--gris-500); margin: 0; }

.proximamente {
    background: var(--gris-50);
    border: 1px dashed var(--gris-300);
    box-shadow: none;
}
.proximamente:hover { transform: none; box-shadow: none; }
.proximamente h3 { color: var(--gris-600); }

/* ---------- Impresión ---------- */
@media print {
    .cabecera, .volver-arriba, .cta-franja, .formulario { display: none; }
    body { font-size: 12pt; }

    /* Un diagrama normativo es justo lo que alguien imprime para llevarlo a
       una junta o enseñárselo al administrador. Que no se parta entre hojas. */
    .diagrama {
        break-inside: avoid;
        page-break-inside: avoid;
        margin: 1.5em 0;
    }
    .diagrama svg {
        max-width: 100%;
        max-height: 21cm;
        box-shadow: none;
        border-color: #999;
    }
    .diagrama figcaption { color: #000; }

    /* Las tablas y los avisos tampoco deberían cortarse a la mitad */
    .tabla-envoltorio, .aviso-caja { break-inside: avoid; page-break-inside: avoid; }

    /* Al imprimir se pierde el destino de los enlaces: mostrarlo */
    .contenido a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: .85em;
        color: #555;
        word-break: break-all;
    }
}
