/* Base común de las páginas generadas (guías, plantillas, comparativas, legales).
   Los colores, botones, cabecera y pie son copia de los de la portada (index.html): si cambian allí, cambiar aquí. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fuentes/inter.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fuentes/archivo.woff2") format("woff2"); }

:root {
  --azul: #2563eb;
  --azul-hover: #1d4ed8;
  --azul-tinta: #0b1d44;
  --azul-tinta-2: #10275c;
  --cielo: #e8f0fe;
  --cielo-borde: #c7d7fb;
  --fondo: #ffffff;
  --fondo-suave: #f3f6fc;
  --texto: #0f1b33;
  --texto-suave: #4d5a78;
  --borde: #dde5f3;
  --ok: #15803d;
  --ok-fondo: #dcfce7;
  --aviso: #b45309;
  --aviso-fondo: #fef3c7;
  --sombra: 0 24px 60px -24px rgba(11, 29, 68, .35);
  --display: "Archivo", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --cuerpo: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radio: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --azul: #5b8cf9; --azul-hover: #7ea4fb; --azul-tinta: #060e21; --azul-tinta-2: #0b1733;
    --cielo: #13224a; --cielo-borde: #23407a; --fondo: #0a1324; --fondo-suave: #0f1a30;
    --texto: #e8eefb; --texto-suave: #a3b1cc; --borde: #22304f;
    --ok: #4ade80; --ok-fondo: #0f2e1d; --aviso: #fbbf24; --aviso-fondo: #3a2a07;
    --sombra: 0 24px 60px -24px rgba(0,0,0,.8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --azul: #5b8cf9; --azul-hover: #7ea4fb; --azul-tinta: #060e21; --azul-tinta-2: #0b1733;
  --cielo: #13224a; --cielo-borde: #23407a; --fondo: #0a1324; --fondo-suave: #0f1a30;
  --texto: #e8eefb; --texto-suave: #a3b1cc; --borde: #22304f;
  --ok: #4ade80; --ok-fondo: #0f2e1d; --aviso: #fbbf24; --aviso-fondo: #3a2a07;
  --sombra: 0 24px 60px -24px rgba(0,0,0,.8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--fondo); color: var(--texto); font-family: var(--cuerpo); font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.suave { color: var(--texto-suave); }
.ojo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--azul); }
.ojo::before { content: ""; width: 22px; height: 3px; border-radius: 2px; background: var(--azul); }
:focus-visible { outline: 3px solid var(--azul); outline-offset: 3px; border-radius: 6px; }
.saltar { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: var(--azul); color: #fff; font-weight: 600; text-decoration: none; }
.saltar:focus { top: 12px; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 22px; border-radius: 12px; font-family: var(--display); font-weight: 700; font-size: 1rem; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: transform .15s ease, background .15s ease, border-color .15s ease; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-azul { background: var(--azul); color: #fff; }
.btn-azul:hover { background: var(--azul-hover); }
.btn-borde { background: transparent; color: var(--texto); border-color: var(--borde); }
.btn-borde:hover { border-color: var(--azul); color: var(--azul); }
.btn-blanco { background: #fff; color: #0b1d44; }
.btn-blanco:hover { background: #e8f0fe; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* Navegación */
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--fondo) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--borde); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; }
.logo svg { width: 34px; height: 34px; }
.nav-enlaces { display: flex; gap: 22px; align-items: center; }
.nav-enlaces a { text-decoration: none; font-weight: 500; font-size: .95rem; color: var(--texto-suave); white-space: nowrap; }
.nav-enlaces a:hover, .nav-enlaces a[aria-current] { color: var(--azul); }
.nav-acciones { display: flex; gap: 10px; align-items: center; }
.nav-acciones .btn { padding: 10px 16px; font-size: .92rem; }
@media (max-width: 900px) { .nav-enlaces { display: none; } }
@media (max-width: 640px) { .nav-acciones .btn-borde { display: none; } }

/* Pie */
.pie { background: var(--azul-tinta); color: #b9c7ea; border-top: 1px solid rgba(143,176,255,.15); }
.pie .wrap { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; align-items: center; padding-block: 28px; font-size: .9rem; }
.pie .logo { color: #fff; font-size: 1.1rem; }
.pie nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.pie a { color: #b9c7ea; text-decoration: none; }
.pie a:hover { color: #fff; }
.pie .credito { flex-basis: 100%; font-size: .75rem; color: #8a9bc4; }
.pie .credito a { color: inherit; text-decoration: underline; }
