/* Páginas legales y de ayuda (/legal/*, /kids-privacy, /delete-account). */
.doc { max-width: 760px; margin: 0 auto; padding: 48px 0 96px; }
.doc h1 { font-size: clamp(32px, 4.2vw, 46px); margin-bottom: 18px; }
.doc h2 { font-size: 24px; margin: 38px 0 10px; scroll-margin-top: 24px; }
.doc h3 { font-size: 19px; margin: 22px 0 6px; }
.doc p, .doc li, .doc td, .doc th { font-size: 18px; color: var(--ink); line-height: 1.55; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 4px 0; }
.doc .note, .doc .meta { color: var(--muted); }
.doc .meta { font-size: 16px; }
.doc .summary { border: 1px solid var(--line, rgba(127,127,127,.3)); border-radius: 14px; padding: 6px 20px 10px; margin: 22px 0; }
.doc .toc { columns: 2 240px; font-size: 16px; margin: 18px 0 8px; }
.doc .toc a { text-decoration: none; }
.doc .toc a:hover { text-decoration: underline; }
.doc table { width: 100%; border-collapse: collapse; margin: 10px 0; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line, rgba(127,127,127,.3)); font-size: 16px; }
html[lang="es"] [lang="en"], html[lang="en"] [lang="es"] { display: none; }
.switch { display: flex; gap: 8px; justify-content: flex-end; padding-top: 24px; }
.switch button[aria-pressed="true"] { outline: 2px solid currentColor; }
.legal-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.legal-foot a { color: var(--muted); text-decoration: none; }
.legal-foot a:hover { color: var(--ink); text-decoration: underline; }

/* Dentro de la app (?app=1, legal.js): la página va debajo de la cabecera de la app, con su tema
   (?theme=), sin el cambio de idioma ni el pie, y los enlaces a otras páginas no llevan a ningún
   sitio (la app tampoco navega fuera de la página). */
:root[data-theme="light"] {
  --brand-soft: #FFE3E5; --sky-light: #E8F3FF;
  --ink: #1B1D29; --ink-soft: #3A3E52; --muted: #5F6478; --line: #E4E6EF;
  --canvas: #F2F3F8; --surface: #FFFFFF; --surface-alt: #F7F8FB;
  --shadow: 0 1px 2px rgba(27, 29, 41, .06), 0 10px 30px rgba(27, 29, 41, .08);
  --shadow-lg: 0 30px 80px rgba(27, 29, 41, .18);
  --blob: .55;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --brand-soft: #3D2027; --sky-light: #1B2B42;
  --ink: #ECEEF6; --ink-soft: #C9CDDB; --muted: #9EA4B8; --line: #343849;
  --canvas: #121420; --surface: #1D202C; --surface-alt: #262A38;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .3);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, .55);
  --blob: .28;
  color-scheme: dark;
}
html.in-app { scroll-behavior: auto; -webkit-tap-highlight-color: transparent; }
html.in-app .switch, html.in-app .footer, html.in-app .doc h1 { display: none; }
html.in-app .wrap { width: min(760px, 100% - 40px); }
html.in-app .doc { padding: 4px 0 40px; }
html.in-app .doc h2 { font-size: 21px; margin: 30px 0 8px; }
html.in-app .doc h3 { font-size: 18px; }
html.in-app .doc p, html.in-app .doc li, html.in-app .doc td, html.in-app .doc th { font-size: 17px; }
html.in-app .doc .summary { background: var(--surface); border: 0; border-radius: var(--r-md); box-shadow: var(--shadow); margin-top: 14px; }
html.in-app .doc a:not([href^="#"]) { pointer-events: none; color: inherit; text-decoration: none; font-weight: 500; }
html.in-app .doc .toc a { color: var(--sky-deep); }
