:root[data-theme="dark"] {
  /* surfaces */
  --lw-bg: #060708;          --lw-surface-1: #0C0E10;
  --lw-surface-2: #14161A;   --lw-surface-3: #1C1F24;
  --lw-divider: #191C20;     --lw-border-subtle: #1E2126;
  --lw-border: #2A2D33;
  /* chart chrome */
  --lw-chart-grid: #16181C;  --lw-chart-axis: #262930;
  /* text */
  --lw-text-1: #ECEBE6;      --lw-text-2: #A5A49C;
  --lw-text-3: #706F68;      --lw-text-disabled: #4B4B46;
  /* brand */
  --lw-gold: #FFBF00;        --lw-gold-hover: #FFCE3A;
  --lw-on-gold: #060708;
  --lw-focus: #7FC4FF;       --lw-focus-width: 2px;
  --lw-focus-offset: 2px;
  --lw-gold-text: #FFBF00;
  /* price series: gold, 1.8px + dark halo — hue-isolated from the cool ramp */
  --lw-price: #FFBF00;       --lw-price-halo: #060708;
  /* semantics (reserved: market direction + alert only) */
  --lw-up: #2FD9A4;          --lw-down: #DE3555;
  --lw-alert: #F0761A;
  --lw-up-hover: #5FE4B8;    --lw-down-hover: #E85E77;
  --lw-up-muted: #14342A;    --lw-down-muted: #3A1620;
  /* overlay ramp D0–D9 — ADJACENT degrees are the pairs that must not be confused, so each
     neighbour differs in LIGHTNESS as well as hue; the hue order is deliberately not a smooth
     teal→magenta sweep and must not be "tidied" back into one. Measured CIEDE2000: min adjacent
     25.3, min two-apart 16.8, min all-pairs 7.6; contrast 5.0–12.5:1 on --lw-bg. Cool-only, each
     ≥ 16 ΔE from up/down/alert/price/text — the same clearance the previous ramp shipped with.
     Hue per index matches the light ramp below, so a theme flip never restyles a degree. */
  --lw-d0: #CE80FE;
  --lw-d1: #427BE7;
  --lw-d2: #1EBFC0;
  --lw-d3: #AF92FE;
  --lw-d4: #0886D3;
  --lw-d5: #FFB2FD;
  --lw-d6: #0090A5;
  --lw-d7: #949DFE;
  --lw-d8: #FF64C8;
  --lw-d9: #108CB7;
}
:root[data-theme="light"] {
  --lw-bg: #F7F5EF;          --lw-surface-1: #FFFFFF;
  --lw-surface-2: #FBFAF5;   --lw-surface-3: #EFEDE4;
  --lw-divider: #EAE7DD;     --lw-border-subtle: #E6E3D8;
  --lw-border: #D8D5C9;
  --lw-chart-grid: #ECEAE1;  --lw-chart-axis: #D3D0C4;
  --lw-text-1: #16150F;      --lw-text-2: #57554D;
  --lw-text-3: #8A887E;      --lw-text-disabled: #B9B6AB;
  --lw-gold: #FFBF00;        --lw-gold-hover: #E5AE0A;
  --lw-gold-text: #84660A;   /* 4.96:1 on bg, 5.40:1 on white */
  --lw-on-gold: #16150F;
  --lw-focus: #0B5FBF;       --lw-focus-width: 2px;
  --lw-focus-offset: 2px;
  --lw-price: #84660A;       --lw-price-halo: #FFFFFF;
  --lw-up: #0E8A63;          --lw-down: #A62743;
  --lw-alert: #A94E09;       /* 5.09:1 on bg */
  --lw-up-hover: #0A6E4E;    --lw-down-hover: #871E35;
  --lw-up-muted: #DCEFE7;    --lw-down-muted: #F6DDE2;
  /* overlay ramp D0–D9 — the dark ramp's hues at light-theme lightnesses (same hue per index).
     Measured CIEDE2000: min adjacent 22.5, min two-apart 16.0, min all-pairs 4.3; contrast
     4.5–13.3:1 on --lw-bg. Was min adjacent 3.5 when the ramp varied in hue alone. */
  --lw-d0: #7502A3;
  --lw-d1: #015CF9;
  --lw-d2: #0B5B5C;
  --lw-d3: #6003BF;
  --lw-d4: #0674B7;
  --lw-d5: #4F0050;
  --lw-d6: #137C8D;
  --lw-d7: #4207D8;
  --lw-d8: #8C0667;
  --lw-d9: #06799F;
}
/* type */
:root {
  --lw-font-ui: 'Archivo', system-ui, sans-serif;
  --lw-font-data: 'IBM Plex Mono', ui-monospace, monospace;
  --lw-display-1: 600 28px/34px var(--lw-font-ui);
  --lw-display-2: 600 22px/28px var(--lw-font-ui);
  --lw-title:     600 17px/24px var(--lw-font-ui);
  --lw-body:      400 14px/21px var(--lw-font-ui);
  --lw-ui:        500 13px/18px var(--lw-font-ui);
  --lw-data:      400 12px/16px var(--lw-font-data);
  --lw-micro:     400 11px/14px var(--lw-font-data);
}