/* Tokens de tema compartidos entre index.html y las páginas legales
   (privacidad.html, terminos.html) — un único sitio que editar cuando
   cambie la paleta, en vez de tres copias divergiendo con el tiempo. */
:root {
  /* Light (default) — Fluent-style neutrals + Microsoft blue, à la Power Automate. */
  --ink: #faf9f8;
  --ink-2: #ffffff;
  --ink-3: #f3f2f1;
  --ink-4: #edebe9;
  --line: #e1dfdd;
  --line-soft: #ececea;
  --paper: #ffffff;
  --paper-dim: #f3f2f1;
  --paper-line: #e1dfdd;
  --text: #201f1e;
  --text-dim: #605e5c;
  --text-faint: #a19f9d;
  --paper-text: #201f1e;
  --paper-text-dim: #605e5c;
  --focus: #0078d4;
  --focus-text: #005a9e;
  --on-focus: #ffffff;
  --focus-tint-bg: color-mix(in srgb, var(--focus) 10%, transparent);
  --focus-tint-border: color-mix(in srgb, var(--focus) 28%, transparent);
  --scrim: rgba(32,31,30,.4);
  --shadow-color: 32,31,30;
  --shadow-strong: .14;
  --shadow-soft: .08;

  --nom: #c9861f;
  --fin: #3f9463;
  --hac: #c2483a;
  --fra: #3f7fb0;
  --fsc: #8a5aa0;

  --font-ui: 'Segoe UI', system-ui, -apple-system, 'Segoe UI Historic', sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', Consolas, monospace;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #201f1e;
    --ink-2: #292827;
    --ink-3: #323130;
    --ink-4: #3b3a39;
    --line: #3b3a39;
    --line-soft: #323130;
    --paper: #292827;
    --paper-dim: #323130;
    --paper-line: #3b3a39;
    --text: #f3f2f1;
    --text-dim: #c8c6c4;
    --text-faint: #979593;
    --paper-text: #f3f2f1;
    --paper-text-dim: #c8c6c4;
    --focus: #2899f5;
    --focus-text: #6cb8f6;
    --on-focus: #ffffff;
    --focus-tint-bg: color-mix(in srgb, var(--focus) 16%, transparent);
    --focus-tint-border: color-mix(in srgb, var(--focus) 32%, transparent);
    --scrim: rgba(0,0,0,.6);
    --shadow-color: 0,0,0;
    --shadow-strong: .45;
    --shadow-soft: .3;

    --nom: #d99a2b;
    --fin: #4aa572;
    --hac: #c2584a;
    --fra: #4c8dbd;
    --fsc: #9868ae;
  }
}

/* Manual override (theme-toggle) — wins over prefers-color-scheme regardless of
   system setting, via the [data-theme] attribute selector's higher specificity. */
:root[data-theme="light"] {
  --ink: #faf9f8; --ink-2: #ffffff; --ink-3: #f3f2f1; --ink-4: #edebe9;
  --line: #e1dfdd; --line-soft: #ececea;
  --paper: #ffffff; --paper-dim: #f3f2f1; --paper-line: #e1dfdd;
  --text: #201f1e; --text-dim: #605e5c; --text-faint: #a19f9d;
  --paper-text: #201f1e; --paper-text-dim: #605e5c;
  --focus: #0078d4; --focus-text: #005a9e; --on-focus: #ffffff;
  --focus-tint-bg: color-mix(in srgb, var(--focus) 10%, transparent);
  --focus-tint-border: color-mix(in srgb, var(--focus) 28%, transparent);
  --scrim: rgba(32,31,30,.4);
  --shadow-color: 32,31,30; --shadow-strong: .14; --shadow-soft: .08;
  --nom: #c9861f; --fin: #3f9463; --hac: #c2483a; --fra: #3f7fb0; --fsc: #8a5aa0;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --ink: #201f1e; --ink-2: #292827; --ink-3: #323130; --ink-4: #3b3a39;
  --line: #3b3a39; --line-soft: #323130;
  --paper: #292827; --paper-dim: #323130; --paper-line: #3b3a39;
  --text: #f3f2f1; --text-dim: #c8c6c4; --text-faint: #979593;
  --paper-text: #f3f2f1; --paper-text-dim: #c8c6c4;
  --focus: #2899f5; --focus-text: #6cb8f6; --on-focus: #ffffff;
  --focus-tint-bg: color-mix(in srgb, var(--focus) 16%, transparent);
  --focus-tint-border: color-mix(in srgb, var(--focus) 32%, transparent);
  --scrim: rgba(0,0,0,.6);
  --shadow-color: 0,0,0; --shadow-strong: .45; --shadow-soft: .3;
  --nom: #d99a2b; --fin: #4aa572; --hac: #c2584a; --fra: #4c8dbd; --fsc: #9868ae;
  color-scheme: dark;
}
