/* Tokens fijados en G1 §3. Sin webfonts, sin recursos externos. */
:root {
  --fuente: system-ui, sans-serif;
  --base: 16px; --interlineado: 1.5;
  --t1: 28px; --t2: 22px; --t3: 18px; --etiqueta: 14px;
  --esp-1: 4px; --esp-2: 8px; --esp-3: 12px; --esp-4: 16px;
  --esp-6: 24px; --esp-8: 32px;
  --gutter: 16px; --radio: 12px; --tactil-min: 44px;
  --fondo: #FFFFFF; --texto: #1A1A1A; --secundario: #5B6270;
  --acento: #0B5FFF; --acento-contraste: #FFFFFF;
  --perdida: #B42318; --positivo: #1F6F43;
  --borde-control: #6B7280; --neutro-banner: #F3F4F6;
}
:root[data-theme="dark"] {
  --fondo: #0F1115; --texto: #E6E8EC; --secundario: #9AA3B2;
  --acento: #7AA7FF; --acento-contraste: #0F1115;
  --perdida: #F97066;
  --positivo: #4CC38A; /* propuesto: el prompt no fija positivo oscuro; contraste medido 8,53:1 */
  --borde-control: #6B7280; --neutro-banner: #1B1F27;
  color-scheme: dark;
}
.cifra { font-variant-numeric: tabular-nums; }

/* Base y accesibilidad compartida por P1–P6. */
*, *::before, *::after { box-sizing: border-box; }
html { min-width: 0; scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 0;
  max-width: 100%;
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--fuente);
  font-size: var(--base);
  line-height: var(--interlineado);
  overflow-wrap: anywhere;
}
button, a { font: inherit; }
button { touch-action: manipulation; }
a { color: var(--acento); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--acento); outline-offset: 2px; }
[hidden] { display: none !important; }
.mc-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.mc-salto {
  position: absolute; left: var(--gutter); top: -80px; z-index: 30;
  min-height: var(--tactil-min);
  display: inline-flex; align-items: center;
  padding: var(--esp-2) var(--esp-3);
  background: var(--acento); color: var(--acento-contraste);
  border-radius: var(--radio);
}
.mc-salto:focus { top: var(--gutter); }
[id] { scroll-margin-top: calc(var(--tactil-min) + var(--esp-6)); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0ms !important;
    scroll-behavior: auto !important;
  }
}
