/* Páginas interiores: guías, política de cookies, textos legales y 404.
   Se cargan después de styles.css, app-theme.css y navigation.css: reutilizan
   su letra, sus colores y sus componentes (navegación, pie, tarjetas), y aquí
   solo vive lo que pide la lectura larga: medida de línea, jerarquía de
   títulos, avisos, migas de pan y tablas. Sin estilos en línea: la CSP del
   servidor (style-src 'self') los bloquearía. */

.page {
  display: block;
  background: var(--cream);
  color: var(--ink);
}

/* Cabecera de cada página: la luz lavanda y melocotón de «Planes». */
.page-hero {
  padding: 34px 0 46px;
  background:
    radial-gradient(ellipse at 88% 0%, #f1ecffb3, transparent 60%),
    linear-gradient(135deg, #fff9f4, #f2f6ff 70%);
  border-bottom: 1px solid var(--line);
}
.page-narrow {
  max-width: 48rem;
}
.page-hero .eyebrow {
  margin-bottom: 16px;
  color: #56729f;
}
.page-hero h1 {
  max-width: 44rem;
  color: var(--ink);
  font-size: clamp(2.3rem, 5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.page h1 em,
.page h2 em {
  color: #4d82cb;
}
.page-lead {
  max-width: 38rem;
  margin-top: 20px;
  color: #4a5d7e;
  font-size: 1.1rem;
  line-height: 1.7;
}
.page-meta {
  margin-top: 18px;
  color: #5d6f8a;
  font-size: 0.84rem;
}

/* Migas de pan: discretas, con objetivo táctil de 44 px. */
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  color: #5d6f8a;
  font-size: 0.8rem;
}
.breadcrumbs li {
  display: flex;
  align-items: center;
  min-width: 0;
}
.breadcrumbs li + li::before {
  content: "";
  width: 6px;
  height: 6px;
  margin: 0 12px 0 8px;
  border-top: 1.5px solid #8fa0bb;
  border-right: 1.5px solid #8fa0bb;
  transform: rotate(45deg);
  flex-shrink: 0;
}
.breadcrumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #2f62b0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.breadcrumbs [aria-current] {
  padding-block: 11px;
  color: #475a78;
  overflow-wrap: anywhere;
}

/* Portada opcional de una guía: solo existe si la guía tiene «cover». */
.guide-cover {
  max-width: 980px;
  margin: 32px auto 0;
}
.guide-cover img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 26px;
  box-shadow: 0 18px 42px #8093c51f;
}

.page-body {
  padding: 36px 0 76px;
}

/* Índice de secciones de la guía. */
.toc {
  max-width: 38rem;
  margin-bottom: 44px;
  padding: 20px 24px 10px;
  border: 1px solid #e4eaf4;
  border-radius: 22px;
  background: #ffffffb8;
}
.toc .eyebrow {
  color: #56729f;
}
.toc ol {
  margin: 4px 0 0;
  padding-left: 1.4em;
  color: #5d6f8a;
}
.toc a {
  display: inline-block;
  padding: 11px 0;
  color: #2f62b0;
  font-size: 0.95rem;
  line-height: 1.45;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.toc a:hover {
  color: #1f4f98;
}

/* Texto largo: unos 70 caracteres por línea, más aire sobre cada título que
   debajo y enlaces subrayados. */
.prose {
  max-width: 38rem;
  color: #283b5c;
  font-size: 1.0625rem;
  line-height: 1.8;
  overflow-wrap: break-word;
}
.prose > * + * {
  margin-top: 1.05em;
}
.prose h2 {
  margin-top: 2.1em;
  color: var(--ink);
  font-size: clamp(1.75rem, 3.4vw, 2.2rem);
  line-height: 1.18;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.prose h3 {
  margin-top: 1.8em;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.35;
}
.prose h2 + *,
.prose h3 + * {
  margin-top: 0.6em;
}
.prose ul,
.prose ol {
  padding-left: 1.35em;
}
.prose li + li {
  margin-top: 0.5em;
}
.prose li::marker {
  color: #4d82cb;
}
.prose a {
  color: #2f62b0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.prose a:hover {
  color: #1f4f98;
  text-decoration-thickness: 2px;
}
.prose strong {
  color: var(--ink);
  font-weight: 800;
}
.prose code {
  padding: 1px 6px;
  border-radius: 6px;
  background: #eef3fb;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

/* Bloques de la guía: nota, alerta (señales para consultar) y lista final. */
.callout,
.prose .box {
  margin-top: 1.7em;
  padding: 20px 22px;
  border: 1px solid #dce8fb;
  border-radius: 20px;
  background: #eef4ff;
  font-size: 1rem;
  line-height: 1.7;
}
.callout > * + * {
  margin-top: 0.7em;
}
.callout-title {
  color: var(--ink);
  font-weight: 800;
}
.callout ul,
.callout ol {
  padding-left: 1.25em;
}
.callout li + li {
  margin-top: 0.4em;
}
.callout-alerta {
  border-color: #f5d3c8;
  background: #fff0eb;
}
.callout-alerta .callout-title {
  color: #8a3f2e;
}
.callout-alerta li::marker {
  color: #b0604d;
}
.callout-checklist {
  border-color: #c6eadc;
  background: #e8faf5;
}
.callout-checklist .callout-title {
  color: #1f5c50;
}
.callout-checklist ul {
  padding-left: 0;
  list-style: none;
}
.callout-checklist li {
  position: relative;
  padding-left: 30px;
}
.callout-checklist li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.5em;
  width: 13px;
  height: 7px;
  border-bottom: 2px solid #2a7560;
  border-left: 2px solid #2a7560;
  transform: rotate(-45deg);
}
.legal-terminos .box {
  border-color: #c6eadc;
  background: #e8faf5;
}

/* Tabla de la política de cookies: se desplaza dentro de su marco en móvil. */
.table-scroll {
  margin-top: 1.4em;
  overflow-x: auto;
  border: 1px solid #e4eaf4;
  border-radius: 18px;
  background: #fff;
}
.table-scroll:focus-visible {
  outline: 3px solid #438ede;
  outline-offset: 4px;
}
.prose table {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  font-size: 0.92rem;
  line-height: 1.55;
}
.prose caption {
  padding: 16px 18px 4px;
  color: var(--ink);
  font-weight: 800;
  text-align: left;
}
.prose th,
.prose td {
  padding: 12px 18px;
  border-bottom: 1px solid #e7edf7;
  text-align: left;
  vertical-align: top;
}
.prose thead th {
  color: #475a78;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.prose tbody tr:last-child > * {
  border-bottom: 0;
}

/* Aviso al pie de cada guía y del índice. */
.page-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  max-width: 38rem;
  margin-top: 56px;
  padding: 20px 22px;
  border: 1px solid #e3dbf7;
  border-radius: 20px;
  background: #f5f1ff;
  color: #3c4a6b;
  font-size: 0.92rem;
  line-height: 1.7;
}
.page-disclaimer .icon {
  width: 21px;
  height: 21px;
  margin-top: 3px;
  color: #6a519a;
}
.page-disclaimer strong {
  color: var(--ink);
  font-weight: 800;
}

/* «Sigue leyendo» al final de cada guía. */
.related {
  padding: 64px 0 84px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #f5f8ff, var(--cream) 70%);
}
.related-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 26px;
}
.related-head h2 {
  font-size: clamp(2rem, 3.6vw, 2.6rem);
}
.related-head .text-link,
.guides-index .text-link {
  color: #2f62b0;
}
.related-head .text-link:hover {
  color: #1f4f98;
}

.guides-index {
  padding: 44px 0 84px;
}
.guides-index .page-disclaimer {
  max-width: 48rem;
  margin-inline: auto;
}

/* Página 404 (antes con estilos en línea, que la CSP bloquearía). */
.not-found {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 40px 24px;
  background: url("/assets/bg-welcome.webp") center / cover #fffdf8;
  text-align: center;
}
.not-found main {
  max-width: 570px;
  padding: 40px 26px;
  border: 1px solid #fff;
  border-radius: 30px;
  background: #ffffffd9;
}
.not-found main img {
  width: 110px;
  margin: 0 auto 22px;
}
.not-found h1 {
  font-size: clamp(2.1rem, 6vw, 3rem);
}
.not-found p {
  margin: 20px 0 25px;
  color: #5d7090;
}

@media (max-width: 800px) {
  .page-hero {
    padding: 26px 0 36px;
  }
  .page-lead {
    font-size: 1.02rem;
  }
  .page-body {
    padding: 28px 0 60px;
  }
  .prose {
    font-size: 1.02rem;
    line-height: 1.75;
  }
  .callout,
  .prose .box {
    padding: 18px;
  }
  .related {
    padding: 48px 0 64px;
  }
  .guides-index {
    padding: 32px 0 64px;
  }
}
@media (max-width: 480px) {
  .page-hero h1 {
    font-size: clamp(2.05rem, 9vw, 2.5rem);
  }
  .toc {
    padding-inline: 18px;
  }
  .page-disclaimer {
    padding: 18px;
  }
}
@media print {
  .site-nav,
  .nana-footer,
  .related,
  .toc,
  .cookie-notice {
    display: none !important;
  }
  .page-hero {
    background: none;
  }
}
