/* Páginas legales estáticas (privacidad, eliminación de cuenta) con el estilo
   del "Cuaderno de Nandev". Son HTML planos servidos desde public/ porque
   Google Play enlaza a sus URLs; por eso copian aquí los tokens y piezas de
   src/styles/tokens.css y notebook.css que necesitan. Si cambian los colores
   de la app, actualízalos también aquí. */

@font-face {
  font-family: 'Grandstander';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/grandstander-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/caveat-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans-latin.woff2') format('woff2');
}

:root {
  --ds-bg-page: 246 248 255;
  --ds-bg-subtle: 238 243 255;
  --ds-surface-default: 255 255 255;
  --ds-neutral-shade: 207 217 242;
  --ds-text-primary: 27 42 85;
  --ds-text-secondary: 69 86 138;
  --ds-text-muted: 88 102 148;
  --ds-text-link: 27 92 194;
  --ds-border: 207 217 242;
  --ds-border-strong: 122 150 214;
  --ds-paper-rule: 56 110 220;
  --ds-paper-margin: 240 90 90;
  --ds-paper-rule-a: 0.13;
  --ds-paper-margin-a: 0.4;
  --ds-pen: 217 54 60;
  --ds-hl-yellow: 255 229 92;
  --ds-hl-blue: 159 217 255;
  --ds-hl-a: 1;
  --ds-hl-ink: 27 42 85;
  --ds-accent-gold: 255 200 61;

  --nb-font-heading: 'Grandstander', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --nb-font-hand: 'Caveat', 'Segoe Print', 'Bradley Hand', cursive;
  --nb-font-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --nb-margin-x: 22px;
  color-scheme: light;
}

html.dark {
  --ds-bg-page: 18 26 58;
  --ds-bg-subtle: 24 33 74;
  --ds-surface-default: 28 38 84;
  --ds-neutral-shade: 10 16 41;
  --ds-text-primary: 238 242 255;
  --ds-text-secondary: 182 192 230;
  --ds-text-muted: 140 154 204;
  --ds-text-link: 122 184 255;
  --ds-border: 48 62 118;
  --ds-border-strong: 90 120 200;
  --ds-paper-rule: 143 211 255;
  --ds-paper-margin: 255 128 128;
  --ds-paper-rule-a: 0.07;
  --ds-paper-margin-a: 0.26;
  --ds-pen: 255 142 142;
  --ds-hl-a: 0.3;
  --ds-hl-ink: 238 242 255;
  color-scheme: dark;
}

@media (min-width: 768px) {
  :root { --nb-margin-x: 36px; }
}

* { box-sizing: border-box; }

html, body { margin: 0; }

/* La hoja rayada con margen rojo. */
body {
  min-height: 100vh;
  font-family: var(--nb-font-body);
  font-size: 15.5px;
  line-height: 1.7;
  color: rgb(var(--ds-text-secondary));
  background-color: rgb(var(--ds-bg-page));
  background-image:
    linear-gradient(90deg,
      transparent 0 calc(var(--nb-margin-x) - 1px),
      rgb(var(--ds-paper-margin) / var(--ds-paper-margin-a)) calc(var(--nb-margin-x) - 1px) calc(var(--nb-margin-x) + 1px),
      transparent calc(var(--nb-margin-x) + 1px)),
    repeating-linear-gradient(to bottom,
      transparent 0 27px,
      rgb(var(--ds-paper-rule) / var(--ds-paper-rule-a)) 27px 28px);
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px 48px calc(var(--nb-margin-x) + 16px);
}

/* ---------- Encabezado ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0;
}

.brand {
  font-family: var(--nb-font-heading);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: rgb(var(--ds-text-primary));
  text-decoration: none;
  white-space: nowrap;
}
.brand .hand {
  font-family: var(--nb-font-hand);
  font-size: 21px;
  font-weight: 700;
  color: rgb(var(--ds-pen));
}

.actions { display: flex; align-items: center; gap: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 14px;
  border: 1.5px solid rgb(var(--ds-border));
  border-radius: 14px;
  background: rgb(var(--ds-surface-default));
  box-shadow: 0 3px 0 rgb(var(--ds-neutral-shade));
  color: rgb(var(--ds-text-primary));
  font-family: var(--nb-font-heading);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s, background-color 0.15s;
}
.btn:hover { background: rgb(var(--ds-bg-subtle)); }
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 rgb(var(--ds-neutral-shade)); }
.btn:focus-visible { outline: 2px solid rgb(var(--ds-text-link)); outline-offset: 2px; }
.btn--icon { width: 42px; padding: 0; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.theme-sun { color: rgb(var(--ds-accent-gold)); }
.theme-moon { display: none; color: rgb(var(--ds-hl-blue)); }
html.dark .theme-sun { display: none; }
html.dark .theme-moon { display: block; }

/* ---------- La ficha con el texto legal ---------- */

.sheet {
  position: relative;
  margin-top: 18px;
  padding: 40px 22px 28px;
  background: rgb(var(--ds-surface-default));
  border: 1.5px solid rgb(var(--ds-border));
  border-radius: 8px 8px 18px 18px;
  box-shadow: 0 3px 0 rgb(var(--ds-neutral-shade));
}
@media (min-width: 640px) {
  .sheet { padding: 44px 40px 34px; }
}

/* Cinta adhesiva. */
.tape {
  position: absolute;
  top: -10px;
  left: 50%;
  width: 84px;
  height: 20px;
  transform: translateX(-50%) rotate(-4deg);
  background: rgb(var(--ds-hl-yellow) / 0.78);
  clip-path: polygon(3% 0, 97% 0, 100% 20%, 97% 45%, 100% 70%, 97% 100%, 3% 100%, 0 75%, 3% 50%, 0 25%);
}

.eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgb(var(--ds-text-muted));
}

h1 {
  margin: 6px 0 4px;
  font-family: var(--nb-font-heading);
  font-size: clamp(26px, 5vw, 34px);
  font-weight: 900;
  line-height: 1.15;
  color: rgb(var(--ds-text-primary));
}

/* Resaltador bajo el texto. */
.hl {
  background: linear-gradient(transparent 52%, rgb(var(--ds-hl-yellow) / var(--ds-hl-a)) 52% 94%, transparent 94%);
  padding: 0 3px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.updated {
  margin: 0 0 20px;
  font-family: var(--nb-font-hand);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: rgb(var(--ds-pen));
  transform: rotate(-1.5deg);
  transform-origin: left;
}

h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 30px 0 8px;
  padding-top: 18px;
  border-top: 1.5px dashed rgb(var(--ds-border));
  font-family: var(--nb-font-heading);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.25;
  color: rgb(var(--ds-text-primary));
}

/* Número de sección como burbuja de la hoja de respuestas. */
.num {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgb(var(--ds-text-primary));
  color: rgb(var(--ds-surface-default));
  font-size: 14px;
  font-weight: 900;
}

p { margin: 0 0 12px; }

strong { color: rgb(var(--ds-text-primary)); font-weight: 800; }

code {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgb(var(--ds-bg-subtle));
  border: 1px solid rgb(var(--ds-border));
  font-size: 0.88em;
  color: rgb(var(--ds-text-primary));
  overflow-wrap: anywhere;
}

a {
  color: rgb(var(--ds-text-link));
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
}
a:hover { text-decoration: underline; }

ul, ol { margin: 0 0 12px; padding-left: 1.3rem; }
li { margin: 6px 0; padding-left: 2px; }
li::marker { color: rgb(var(--ds-pen)); font-weight: 800; }

/* Aviso tipo post-it. */
.note {
  margin: 16px 0;
  padding: 12px 16px;
  border-radius: 3px 3px 16px 3px;
  background: rgb(var(--ds-hl-yellow));
  color: rgb(27 42 85);
  box-shadow: 0 6px 14px rgb(0 0 0 / 0.14);
  transform: rotate(-0.6deg);
}
.note strong, .note a { color: rgb(27 42 85); }
.note a { text-decoration: underline; }

/* ---------- Pie ---------- */

.footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1.5px dashed rgb(var(--ds-border));
  text-align: center;
  font-size: 13px;
  color: rgb(var(--ds-text-muted));
}
.footer p { margin: 0 0 6px; }
.footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }

@media (max-width: 420px) {
  .brand { font-size: 19px; }
  .brand .hand { font-size: 18px; }
  .btn-label { display: none; }
  .btn--back { width: 42px; padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
