/* ============================================================================
   Evidencia Sellada · páginas legales (términos, privacidad, supresión) y 404 en el diseño nuevo (23-10-2026).
   Se carga después de app.css: los colores y las letras salen de sus tokens (--tinta, --accion, --coral-vivo…).
   Legales: una hoja blanca centrada con ancho de lectura (~72 caracteres), titulares gruesos en mayúsculas,
   una rayita coral sobre cada punto y la versión en una etiqueta. El texto legal no se toca: todo es por CSS.
   Regla de Seba (styles.css: «.legal, .legal * { color: negro }»): toda la letra de lo legal va en NEGRO, también
   los enlaces (se distinguen por el subrayado coral). El coral queda solo en rayitas, viñetas y subrayados.
   ============================================================================ */

/* ---------- Hoja de lectura ---------- */
.legal { padding-top: 40px; }
.legal__hoja {
  width: 100%; max-width: calc(34em + 2 * 56px); margin: 0 auto;   /* 34em ≈ 72 letras por línea con Red Hat Text a 17 px */
  background: var(--hoja); border: 1px solid var(--linea); border-radius: var(--radio); box-shadow: var(--sombra);
  padding: 44px 56px 52px;
  font-size: 1.0625rem; line-height: 1.7; color: #000;
  overflow-wrap: break-word;
}
.legal__hoja > :first-child { margin-top: 0; }
.legal__hoja > :last-child { margin-bottom: 0; }

/* Miga: letra de máquina con la rayita coral (como .ceja) */
.legal .legal__miga { margin: 0 0 16px; font: 700 .78rem/1.4 var(--f-etiqueta); letter-spacing: .08em; text-transform: uppercase; color: #000; }
.legal__miga::before { content: ""; display: inline-block; width: 22px; height: 2px; margin-right: 10px; vertical-align: middle; background: var(--coral-vivo); }
.legal__miga a { display: inline-block; padding: 13.5px 0; margin: -7.5px 0; }   /* 44 px para el dedo sin mover la línea */

/* Título de la página: el titular grueso del diseño nuevo */
.legal h1 {
  margin: 0; font-family: var(--f-titulo); font-weight: 800; font-size: clamp(1.9rem, 4.2vw, 2.9rem);
  line-height: 1.02; letter-spacing: -.03em; text-wrap: balance;
}

/* Versión: etiqueta tipo píldora */
.legal .legal__version {
  display: inline-block; margin: 20px 0 0; padding: 8px 14px; border: 1px solid var(--linea-fuerte); border-radius: 999px;
  font: 700 .76rem/1.2 var(--f-etiqueta); letter-spacing: .08em; text-transform: uppercase; color: #000;
}

/* Puntos numerados: rayita coral arriba, mayúsculas gruesas */
.legal h2 {
  margin: 2.4em 0 .7em; font-family: var(--f-titulo); font-weight: 800; font-size: 1.22rem; line-height: 1.25;
  letter-spacing: .01em; text-wrap: balance;
}
.legal h2::before { content: ""; display: block; width: 28px; height: 3px; margin-bottom: 14px; border-radius: 2px; background: var(--coral-vivo); }
.legal__version + h2 { margin-top: 2em; }
.legal h3 { margin: 1.7em 0 .45em; font-family: var(--f-titulo); font-weight: 800; font-size: 1.06rem; line-height: 1.3; }
.legal h2 + h3 { margin-top: .9em; }

/* Texto */
.legal p { margin: 0 0 1em; }
.legal ul { margin: 0 0 1.1em; padding-left: 1.3em; }
.legal li { margin: 0 0 .4em; padding-left: .2em; }
.legal li::marker { color: var(--coral-vivo); }
.legal strong { font-weight: 600; }
.legal__hoja a { color: #000; text-decoration-color: var(--coral-vivo); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.legal__hoja a:hover { text-decoration-color: currentColor; }

/* Los anclas (#retracto, #cuenta, #conservacion…) no quedan tapadas por la barra fija (en el celular la barra tiene dos filas: 120 px) */
.legal [id] { scroll-margin-top: 96px; }
@media (max-width: 760px) { .legal [id] { scroll-margin-top: 144px; } }

/* «Lo que hace y lo que no hace» (términos, punto 20): ✓ y ✕ en vez de viñetas */
#lo-que-hace + h3 + ul, #lo-que-hace + h3 + ul + h3 + ul { list-style: none; padding-left: 0; }
#lo-que-hace + h3 + ul li, #lo-que-hace + h3 + ul + h3 + ul li { position: relative; padding-left: 1.7em; }
#lo-que-hace + h3 + ul li::before, #lo-que-hace + h3 + ul + h3 + ul li::before { position: absolute; left: 0; top: 0; font-weight: 700; }
#lo-que-hace + h3 + ul li::before { content: "✓"; color: var(--coral-vivo); }
#lo-que-hace + h3 + ul + h3 + ul li::before { content: "✕"; color: #000; }

/* ---------- 404 ---------- */
.pagina-error .contenido { align-content: center; justify-items: center; padding-block: 64px 80px; }
.error404 { display: grid; justify-items: center; text-align: center; gap: 18px; max-width: 640px; }
.error404__sello {
  margin: 0 0 6px; display: grid; place-items: center; padding: 14px 26px 10px; border: 3px solid var(--coral-vivo); border-radius: 14px;
  outline: 1.5px dashed var(--coral-vivo); outline-offset: -10px;
  font: 800 clamp(3.6rem, 11vw, 5.6rem)/1 var(--f-titulo); letter-spacing: .02em; color: var(--coral-vivo);
  transform: rotate(-4deg);
}
.error404 .titular { font-size: clamp(2rem, 5vw, 3.1rem); max-width: 14ch; }
.error404 .bajada { margin-inline: auto; max-width: 44ch; }
.error404 .acciones { justify-content: center; margin-top: 8px; }

/* ---------- Celular ---------- */
@media (max-width: 640px) {
  /* La hoja ocupa todo el ancho, de la barra al pie, para dejarle más espacio a la lectura (sin franjas grises) */
  body.pagina-legal { background: var(--hoja); }
  .legal { padding-top: 0; padding-bottom: 0; }
  .legal__hoja { margin-inline: calc(-1 * var(--lado)); width: auto; max-width: none; border: 0; border-radius: 0; box-shadow: none;
    padding: 28px 18px 36px; font-size: 1rem; line-height: 1.65; }
  .legal h2 { font-size: 1.08rem; margin-top: 2.1em; }
  .pagina-error .contenido { padding-block: 40px 56px; }
  .error404 .acciones { flex-direction: column; align-items: stretch; width: 100%; }
  .error404 .acciones .btn { width: 100%; }
}
