/* Páginas legales (privacidad, borrar datos). Mismo estilo que la web principal. */
@font-face { font-family: "Baloo 2"; src: url("/assets/fonts/baloo2-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("/assets/fonts/atkinson-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("/assets/fonts/atkinson-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --paper: #eef4fa;
  --surface: #ffffff;
  --text: #1e2b4d;
  --soft: #4a5675;
  --line: #ccd7e4;
  --outline: #2a3858;
  --shadow: #2a3858;
  --tint: #dcebfb;
  --link: #1f63b5;
  --sky: #5aa9f2;
  --mustard: #ffc93c;
  --map-base: .03;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1729;
    --surface: #1a2540;
    --text: #eaf1fa;
    --soft: #b0bdd3;
    --line: #2c3a58;
    --outline: #44557d;
    --shadow: #050a16;
    --tint: #1d2f50;
    --link: #8cc4fa;
    --map-base: .04;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  position: relative;
  color: var(--text);
  font: 400 17px/1.65 "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}
/* Fondo de mapa, igual que en la web principal (mosaico de tools/site/mkmap.cjs). */
body::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: var(--map-base);
  background: url("/assets/img/map-tile.svg") 50% 0 / 800px 800px;
}
@media (prefers-color-scheme: dark) { body::before { background-image: url("/assets/img/map-tile-dark.svg"); } }
main { max-width: 780px; margin: 0 auto; padding: 20px 16px 56px; }
header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; margin-bottom: 28px; }
header .brand { display: inline-flex; flex: none; border-radius: 10px; }
header img { height: 44px; width: auto; display: block; }
@media (max-width: 399px) { header img { height: 36px; } }
.logo-dark { display: none !important; }
@media (prefers-color-scheme: dark) { .logo-light { display: none !important; } .logo-dark { display: block !important; } }
nav a {
  color: var(--text); text-decoration: none; font-weight: 700; font-size: 15px;
  border: 2px solid var(--outline); border-radius: 999px; padding: 4px 14px;
  background: var(--surface); box-shadow: 2px 2px 0 var(--shadow);
}
nav a:hover { box-shadow: 3px 3px 0 var(--shadow); transform: translate(-1px, -1px); display: inline-block; }
article {
  overflow-wrap: break-word;
  background: var(--surface);
  border: 2px solid var(--outline);
  border-radius: 22px;
  box-shadow: 6px 6px 0 var(--shadow);
  padding: 28px 22px;
}
@media (min-width: 640px) { article { padding: 40px 44px; } }
h1, h2 { font-family: "Baloo 2", "Atkinson Hyperlegible", system-ui, sans-serif; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 6vw, 42px); line-height: 1.08; margin: 0 0 8px; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
h2 { font-size: 23px; line-height: 1.2; margin: 34px 0 8px; }
.meta { color: var(--soft); font-size: 15px; margin: 0 0 18px; }
a { color: var(--link); text-underline-offset: .18em; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }
ul, ol { padding-left: 24px; }
li { margin: 6px 0; }
li::marker { color: var(--soft); font-weight: 700; }
table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 8px 0 4px; }
th, td { text-align: left; border-bottom: 1.5px solid var(--line); padding: 10px 8px; vertical-align: top; }
th { background: var(--tint); font-weight: 700; }
th:first-child { border-top-left-radius: 10px; }
th:last-child { border-top-right-radius: 10px; }
@media (max-width: 560px) {
  table, tbody, tr, td, th { display: block; width: 100%; }
  tr:first-child { display: none; }
  tr { border: 1.5px solid var(--line); border-radius: 14px; padding: 6px 12px; margin: 10px 0; }
  td { border: 0; padding: 4px 0; }
  td:first-child { font-weight: 700; }
  td:nth-child(2) { color: var(--soft); }
}
.lead { font-size: 19px; }
.pill { display: inline-block; background: var(--mustard); color: #1e2b4d; border-radius: 999px; padding: 2px 12px; font-weight: 700; font-size: 14px; }
footer { color: var(--soft); font-size: 15px; margin-top: 28px; text-align: center; line-height: 2; overflow-wrap: break-word; }
footer a { color: var(--link); }

/* Fila de idiomas del pie (alternativa sin JS al selector de la cabecera). */
nav.lang-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px 8px; margin-top: 6px; line-height: 1.6; }
nav.lang-row a { border: 0; box-shadow: none; background: none; padding: 0 4px; border-radius: 6px; color: var(--link); font-weight: 700; font-size: 15px; }
nav.lang-row a:hover { transform: none; box-shadow: none; text-decoration: underline; }
nav.lang-row a[aria-current="page"] { color: var(--text); background: var(--tint); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Página /demo/ (antes en un <style> en línea; la CSP no lo permite) ---------- */
.demo-video { display: block; width: 100%; max-width: 360px; margin: 20px auto 8px; border-radius: 18px; border: 2px solid var(--outline); background: #000; }
.demo-steps li { margin: 8px 0; }

/* ---------- Selector de idioma ----------
   <details class="lang-picker"> con enlaces reales: funciona sin JS, los enlaces llevan hreflang
   y site.js añade Escape, clic fuera y flechas. El mismo bloque está en site.css y en style.css. */
.lang-picker { position: relative; flex: none; }
.lang-picker > summary { display: block; list-style: none; cursor: pointer; border-radius: 999px; -webkit-tap-highlight-color: transparent; }
.lang-picker > summary::-webkit-details-marker { display: none; }
.lang-picker > summary::marker { content: ""; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 11px; white-space: nowrap; user-select: none;
  font-family: inherit; font-weight: 700; font-size: 1rem; line-height: 1; color: var(--text);
  background: var(--surface); border: 2px solid var(--outline); border-radius: 999px; box-shadow: 2px 2px 0 var(--shadow);
  transition: transform .12s, box-shadow .12s;
}
.lang-btn svg { flex: none; display: block; }
.lang-btn .chev { margin-left: 2px; transition: transform .15s; }
.lang-picker > summary:hover .lang-btn { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--shadow); }
.lang-picker[open] .lang-btn { background: var(--tint); transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--shadow); }
.lang-picker[open] .chev { transform: rotate(180deg); }
.lang-picker > summary:focus-visible { outline: none; }
.lang-picker > summary:focus-visible .lang-btn { outline: 3px solid var(--sky); outline-offset: 2px; }
.lang-code { display: none; }
@media (max-width: 479px) {
  .lang-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .lang-code { display: inline; letter-spacing: .03em; }
}
.lang-list {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 70; min-width: 210px; margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 2px solid var(--outline); border-radius: 16px; box-shadow: 4px 4px 0 var(--shadow);
}
.lang-list li { margin: 0; }
.lang-list a {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 10px; border-radius: 10px;
  color: var(--text); text-decoration: none; font-weight: 700; font-size: 1rem; line-height: 1.2;
}
.lang-list a:hover { background: var(--tint); }
.lang-list a:focus-visible { outline: 3px solid var(--sky); outline-offset: -3px; border-radius: 10px; }
.lang-list a[aria-current="page"] { background: var(--mustard); color: #1e2b4d; }
.lang-badge { display: inline-grid; place-items: center; flex: none; width: 30px; height: 22px; border-radius: 6px; border: 1.5px solid currentColor; font-size: .75rem; letter-spacing: .03em; }
.lang-list .check { margin-left: auto; flex: none; }
@media (prefers-reduced-motion: no-preference) {
  .lang-picker[open] .lang-list { animation: lang-pop .14s ease-out; }
  @keyframes lang-pop { from { opacity: 0; transform: translateY(-4px); } }
}
