/* Colour themes for both views, the cards and the controls strip.
   Components read these tokens. The default lives on :root; alternatives
   are chosen with <html data-theme="signal|braun|ink">.
   --page / --ink / --muted: the canvas and text on it
   --surface*: raised panels (cards, controls), which can be dark on a light page
   --accent: the one colour for the one control (slider, active tab) */

:root {
  /* Default: white smoke page, flat grey panels, black for what's selected,
     one signal red for the active control (Dot-matrix equalizer inspo) */
  --page: #f5f5f5;
  --ink: #060606;
  --muted: #6a7070;
  --outline: #9aa0a0;

  --surface: rgba(230, 232, 236, 0.97);
  --surface-solid: #e6e8ec;
  --surface-ink: #060606;
  --surface-muted: #6a7070;
  --surface-line: rgba(0, 0, 0, 0.1);
  --surface-shadow: none;
  --tile: #d9dcdf;
  --tab-hover: #dadde0;

  --button: #e6e8ec;
  --button-hover: #e6e8ec;
  --button-shadow: 0 0 0 1px #a9aeae;
  --button-shadow-hover: 0 0 0 1px #060606;
  --thumb-shadow: none;

  --accent: #d8121e;
  --accent-ink: #ffffff;
  --accent-soft: rgba(216, 18, 30, 0.22);
  --accent-wash: rgba(216, 18, 30, 0.08);

  --line: rgba(0, 0, 0, 0.1);
  --track: #c0c4c4;
  --grid: rgba(0, 0, 0, 0.12);
  --grid-soft: rgba(0, 0, 0, 0.06);
  --pos: #1f7a4c;
  --neg: #d8121e;

  /* Type: Poppins throughout (Grey wave finance inspo) */
  --font: "Poppins", system-ui, sans-serif;

  /* Selected tab / segment, slider thumb, big numbers */
  --select: #060606;
  --select-ink: #ffffff;
  --switch-on: #060606;
  --switch-on-ink: #ffffff;
  --thumb: #060606;
  --display-font: inherit;
  --display-weight: 300;

  /* Team bubbles: soft warm-to-cool pastels */
  --team-stops: #e07a84, #eb9a8d, #e8c27a, #7fa3d8, #56b5ba, #6f7a94;
}

/* Alternatives (<html data-theme="…">): the accent marks the selection,
   white segments, plain numerals */
:root[data-theme="signal"],
:root[data-theme="braun"],
:root[data-theme="ink"] {
  --select: var(--accent);
  --select-ink: var(--accent-ink);
  --switch-on: #ffffff;
  --switch-on-ink: #222222;
  --thumb: var(--button);
  --display-font: inherit;
  --display-weight: 300;
}

/* Bold team colours, with <html data-palette="pop"> */
:root[data-palette="pop"] {
  --team-stops: #ff4d4d, #ff8c1a, #ffc400, #2ec27e, #00b3b3, #3d7eff, #7b5cff, #e94fd1;
}

/* signal: white, black and one signal red (Hardware panel, Health cards) */
:root[data-theme="signal"] {
  --page: #ffffff;
  --ink: #111111;
  --muted: #8c8c8c;
  --outline: #cfcfcf;

  --surface: rgba(255, 255, 255, 0.96);
  --surface-solid: #ffffff;
  --surface-ink: #111111;
  --surface-muted: #8c8c8c;
  --surface-line: rgba(0, 0, 0, 0.08);
  --surface-shadow: 0 0 0 1px rgba(0, 0, 0, 0.07), 0 10px 30px rgba(0, 0, 0, 0.07);
  --tile: #f4f4f4;
  --tab-hover: #f2f2f2;

  --button: #ffffff;
  --button-hover: #ffffff;
  --button-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
  --button-shadow-hover: 0 0 0 1px rgba(0, 0, 0, 0.25);
  --thumb-shadow: 0 0 0 1.5px #111111;

  --accent: #e5322d;
  --accent-ink: #ffffff;
  --accent-soft: rgba(229, 50, 45, 0.22);
  --accent-wash: rgba(229, 50, 45, 0.06);

  --line: rgba(0, 0, 0, 0.08);
  --track: #e4e4e4;
  --grid: rgba(0, 0, 0, 0.1);
  --grid-soft: rgba(0, 0, 0, 0.05);
  --pos: #1f8a4c;
  --neg: #e5322d;
}

/* braun: white, black and Braun yellow, black text on yellow (Braun AB 1) */
:root[data-theme="braun"] {
  --page: #ffffff;
  --ink: #111111;
  --muted: #8c8c8c;
  --outline: #cfcfcf;

  --surface: rgba(255, 255, 255, 0.96);
  --surface-solid: #ffffff;
  --surface-ink: #111111;
  --surface-muted: #8c8c8c;
  --surface-line: rgba(0, 0, 0, 0.08);
  --surface-shadow: 0 0 0 1px rgba(0, 0, 0, 0.07), 0 10px 30px rgba(0, 0, 0, 0.07);
  --tile: #f3f3f3;
  --tab-hover: #f2f2f2;

  --button: #ffffff;
  --button-hover: #ffffff;
  --button-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
  --button-shadow-hover: 0 0 0 1px rgba(0, 0, 0, 0.25);
  --thumb-shadow: 0 0 0 1.5px #111111;

  --accent: #fcca00;
  --accent-ink: #111111;
  --accent-soft: rgba(252, 202, 0, 0.4);
  --accent-wash: rgba(252, 202, 0, 0.12);

  --line: rgba(0, 0, 0, 0.08);
  --track: #e4e4e4;
  --grid: rgba(0, 0, 0, 0.1);
  --grid-soft: rgba(0, 0, 0, 0.05);
  --pos: #1f8a4c;
  --neg: #d63a2f;
}

/* ink: white page, near-black panels, orange accent (Cycling HUD, Route load) */
:root[data-theme="ink"] {
  --page: #ffffff;
  --ink: #111111;
  --muted: #8c8c8c;
  --outline: #cfcfcf;

  --surface: rgba(22, 22, 22, 0.96);
  --surface-solid: #161616;
  --surface-ink: #f5f5f5;
  --surface-muted: #9a9a9a;
  --surface-line: rgba(255, 255, 255, 0.1);
  --surface-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  --tile: #242424;
  --tab-hover: #2a2a2a;

  --button: #2a2a2a;
  --button-hover: #333333;
  --button-shadow: none;
  --button-shadow-hover: none;
  --thumb-shadow: 0 0 0 2px #161616;

  --accent: #ff6a3d;
  --accent-ink: #111111;
  --accent-soft: rgba(255, 106, 61, 0.3);
  --accent-wash: rgba(255, 106, 61, 0.1);

  --line: rgba(255, 255, 255, 0.1);
  --track: #3a3a3a;
  --grid: rgba(255, 255, 255, 0.14);
  --grid-soft: rgba(255, 255, 255, 0.08);
  --pos: #7ddc9a;
  --neg: #ff8a7a;
}
