/* MSP design tokens. The only place colour, shadow and step colours are defined.
   Add a theme by adding a [data-theme="name"] block; set data-theme on the app root. */

:root,
[data-theme="night"] {
  /* brand palette from design.txt */
  --c-primary: #252422;          /* actions, nav, cards */
  --c-secondary: #403d39;        /* surfaces / page */
  --c-text: #fffcf2;
  --c-highlight: #eb5e28;        /* active + hover */
  --c-on-highlight: #252422;     /* text on highlight (cream on orange fails contrast) */

  /* derived */
  --c-muted: rgba(255, 252, 242, .7);
  --c-line: rgba(255, 252, 242, .16);
  --c-line-strong: rgba(255, 252, 242, .35);
  --c-highlight-tint: rgba(235, 94, 40, .14);
  --c-hover-tint: rgba(235, 94, 40, .22);
  --c-well: rgba(37, 36, 34, .38);
  --c-shadow: rgba(0, 0, 0, .5);
  --c-skeleton: rgba(255, 252, 242, .08);
  --c-skeleton-hi: rgba(255, 252, 242, .16);

  /* chart series, in this fixed order (never cycled; a 9th folds into "Other"). Validated with the dataviz
     validate_palette.js against the card surface #252422 (dark): every check passes. A single series uses
     --c-highlight. Never colour alone: legends, labels and a table view carry identity too. */
  --c-series-1: #3987e5;
  --c-series-2: #d95926;
  --c-series-3: #199e70;
  --c-series-4: #c98500;
  --c-series-5: #d55181;
  --c-series-6: #008300;
  --c-series-7: #9085e9;
  --c-series-8: #e66767;
  --c-series-other: #8a8578;
  --c-grid: rgba(255, 252, 242, .1);
  --c-axis: rgba(255, 252, 242, .3);

  --font-sans: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --radius: 10px;
}

[data-theme="day"] {
  --c-primary: #fffcf2;
  --c-secondary: #e9e4d6;
  --c-text: #252422;
  --c-highlight: #eb5e28;
  --c-on-highlight: #252422;

  --c-muted: rgba(37, 36, 34, .72);
  --c-line: rgba(37, 36, 34, .16);
  --c-line-strong: rgba(37, 36, 34, .4);
  --c-highlight-tint: rgba(235, 94, 40, .14);
  --c-hover-tint: rgba(235, 94, 40, .22);
  --c-well: rgba(37, 36, 34, .06);
  --c-shadow: rgba(37, 36, 34, .25);
  --c-skeleton: rgba(37, 36, 34, .08);
  --c-skeleton-hi: rgba(37, 36, 34, .16);

  /* validated against the day card surface #fffcf2 (light): all checks pass; slots 3, 4, 5 are below 3:1,
     so charts always ship visible labels or the table view */
  --c-series-1: #2a78d6;
  --c-series-2: #eb6834;
  --c-series-3: #1baf7a;
  --c-series-4: #eda100;
  --c-series-5: #e87ba4;
  --c-series-6: #008300;
  --c-series-7: #4a3aa7;
  --c-series-8: #e34948;
  --c-series-other: #8a8578;
  --c-grid: rgba(37, 36, 34, .1);
  --c-axis: rgba(37, 36, 34, .35);
}
