/*
 * Theme tokens. Every colour, font and spacing value used by the app and its
 * charts comes from here; charts read these properties at draw time. To apply
 * a different visual theme, change only this file.
 */
:root {
  color-scheme: light dark;

  /* Body text uses the system face; headings, the wordmark and big numbers
     use a heavy rounded face where the platform has one. No web fonts: the
     CSP only allows same-origin resources and the app ships none. */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", "Nunito", "Quicksand", "Varela Round", "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-size: 15px;
  --font-size-small: 13px;
  --font-size-large: 22px;
  --font-size-hero: 32px;
  --font-size-jumbo: 56px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 40px;
  --radius-large: 20px;
  --radius: 12px;
  --radius-small: 8px;
  --radius-pill: 999px;
  --content-width: 1100px;
  --bar-height: 60px;

  /* Two-ink palette: riso pink for marks and actions, highlighter yellow
     for the few things that are "you are here" (current section, top
     ranks, selection). Everything else is ink on paper. */
  --page: #f4f3f7;
  --surface: #ffffff;
  --surface-2: #ecebf1;
  --text: #1a1726;
  --text-2: #4c4859;
  --muted: #6b667a;
  --border: rgba(26, 23, 38, 0.11);
  --grid: #e6e4ec;
  --axis: #c4c0cf;
  --accent: #c8246f;
  --accent-text: #ffffff;
  --accent-soft: #fbe3ee;
  --highlight: #ffe14d;
  --highlight-text: #1a1726;
  --focus: #c8246f;
  --danger: #c73a2f;
  --good: #1d7a45;
  --tooltip-bg: #1a1726;
  --tooltip-text: #ffffff;
  --drop-bg: #fbe3ee;

  /* Categorical series, fixed order. */
  --series-1: #c8246f;
  --series-2: #2a78d6;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #7b5ce0;
  --series-6: #eb6834;
  --series-7: #0f8b9c;
  --series-8: #898781;

  /* Sequential (magnitude) ramp, near-zero first. */
  --seq-1: #ecebf1;
  --seq-2: #fad3e4;
  --seq-3: #f5a9ca;
  --seq-4: #ec7cad;
  --seq-5: #dc4b8f;
  --seq-6: #c02572;
  --seq-7: #941757;
  --seq-8: #640d3b;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #12101a;
    --surface: #1c1926;
    --surface-2: #29253a;
    --text: #f5f3fa;
    --text-2: #c9c4d6;
    --muted: #9c96ad;
    --border: rgba(245, 243, 250, 0.11);
    --grid: #2b2738;
    --axis: #4b4660;
    --accent: #f0619f;
    --accent-text: #1a1726;
    --accent-soft: #3b1a2d;
    --highlight: #ffe14d;
    --highlight-text: #1a1726;
    --focus: #f0619f;
    --danger: #f07167;
    --good: #3cc47a;
    --tooltip-bg: #f5f3fa;
    --tooltip-text: #1a1726;
    --drop-bg: #3b1a2d;

    --series-1: #f0619f;
    --series-2: #4a92ea;
    --series-3: #22b884;
    --series-4: #e0a100;
    --series-5: #9d85f2;
    --series-6: #e8703c;
    --series-7: #26a9ba;
    --series-8: #898781;

    --seq-1: #29253a;
    --seq-2: #4a1632;
    --seq-3: #6c1b45;
    --seq-4: #91205a;
    --seq-5: #b82b72;
    --seq-6: #da4c8f;
    --seq-7: #ef84b4;
    --seq-8: #fac6dd;
  }
}

:root[data-theme="dark"] {
  --page: #12101a;
  --surface: #1c1926;
  --surface-2: #29253a;
  --text: #f5f3fa;
  --text-2: #c9c4d6;
  --muted: #9c96ad;
  --border: rgba(245, 243, 250, 0.11);
  --grid: #2b2738;
  --axis: #4b4660;
  --accent: #f0619f;
  --accent-text: #1a1726;
  --accent-soft: #3b1a2d;
  --highlight: #ffe14d;
  --highlight-text: #1a1726;
  --focus: #f0619f;
  --danger: #f07167;
  --good: #3cc47a;
  --tooltip-bg: #f5f3fa;
  --tooltip-text: #1a1726;
  --drop-bg: #3b1a2d;

  --series-1: #f0619f;
  --series-2: #4a92ea;
  --series-3: #22b884;
  --series-4: #e0a100;
  --series-5: #9d85f2;
  --series-6: #e8703c;
  --series-7: #26a9ba;
  --series-8: #898781;

  --seq-1: #29253a;
  --seq-2: #4a1632;
  --seq-3: #6c1b45;
  --seq-4: #91205a;
  --seq-5: #b82b72;
  --seq-6: #da4c8f;
  --seq-7: #ef84b4;
  --seq-8: #fac6dd;
}
