/*
 * Token di colore e tipografia condivisi da pagine di proiezione e dashboard.
 * Tema scuro e chiaro sono due scelte distinte (stesse tinte, passi diversi),
 * non un'inversione automatica. I colori categoriali sono validati come
 * insieme (tutte le coppie, anche per daltonismo) per il grafico a bolle.
 */

:root {
  color-scheme: light;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --surface: #ffffff;
  --page: #f9f9f7;
  --raised: #ffffff;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --text-muted: #6f6e69;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --axis-strong: #898781;
  --border: rgba(11, 11, 11, 0.12);

  /* Serie singola (punti dei Boston) */
  --series-1: #2a78d6;

  /* Categoriali per le bolle: blu, giallo, magenta, verde */
  --cat-1: #2a78d6;
  --cat-2: #eda100;
  --cat-3: #e87ba4;
  --cat-4: #008300;
  --cat-other: #898781;

  /* Stato: riservati, sempre accompagnati da un testo */
  --status-good: #0ca30c;
  --status-warning: #fab219;
  --status-critical: #d03b3b;
  --status-neutral: #898781;

  --accent: #2a78d6;
  --accent-ink: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --surface: #121211;
    --page: #0d0d0d;
    --raised: #1a1a19;
    --text-primary: #ffffff;
    --text-secondary: #c3c2b7;
    --text-muted: #9d9c95;
    --grid: #2c2c2a;
    --axis: #3d3d3a;
    --axis-strong: #6b6a65;
    --border: rgba(255, 255, 255, 0.12);
    --series-1: #3987e5;
    --cat-1: #3987e5;
    --cat-2: #c98500;
    --cat-3: #d55181;
    --cat-4: #008300;
    --cat-other: #6b6a65;
    --accent: #3987e5;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --surface: #121211;
  --page: #0d0d0d;
  --raised: #1a1a19;
  --text-primary: #ffffff;
  --text-secondary: #c3c2b7;
  --text-muted: #9d9c95;
  --grid: #2c2c2a;
  --axis: #3d3d3a;
  --axis-strong: #6b6a65;
  --border: rgba(255, 255, 255, 0.12);
  --series-1: #3987e5;
  --cat-1: #3987e5;
  --cat-2: #c98500;
  --cat-3: #d55181;
  --cat-4: #008300;
  --cat-other: #6b6a65;
  --accent: #3987e5;
}
