:root {
  color-scheme: dark;
  /* DM Sans has proportional digits; retain tabular system figures for data. */
  --font-terminal: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, sans-serif;
  --font-sans: "DM Sans", var(--font-terminal);
  font-family: var(--font-sans);
  font-optical-sizing: auto;
  font-variant-numeric: tabular-nums;
  font-synthesis: none;
  text-rendering: optimizeLegibility;

  --bg: #0a0b0c;
  --surface-0: #0d0f11;
  --surface-1: #121518;
  --surface-2: #181c20;
  --surface-3: #20252a;
  --surface-header: #15191d;
  --surface-hover: #191f24;
  --border: #2b3137;
  --border-strong: #3d454d;
  --text: #f5f3ee;
  --text-secondary: #b9b7b2;
  --text-muted: #8e918f;

  --brand-gold: #c8a85d;
  --brand-gold-strong: #e2c77f;
  --brand-gold-soft: #2b2518;
  --positive: #55efbd;
  --positive-soft: #123c30;
  --positive-border: #329574;
  --positive-cell: #124536;
  --score-positive-1-bg: #0f6d55;
  --score-positive-1-border: #42d8aa;
  --score-positive-1-text: #f7fffc;
  --score-positive-2-bg: #057e5d;
  --score-positive-2-border: #55f3c5;
  --score-positive-2-text: #ffffff;
  --negative: #ff8c94;
  --negative-soft: #472329;
  --negative-border: #98454f;
  --negative-cell: #4e262c;
  --score-negative-1-bg: #83313b;
  --score-negative-1-border: #e66e79;
  --score-negative-1-text: #fff8f7;
  --score-negative-2-bg: #b33949;
  --score-negative-2-border: #ff8c94;
  --score-negative-2-text: #ffffff;
  --warning: #ddb24e;
  --warning-soft: #3b321e;
  --warning-border: #755f2c;
  --info: #69bfd1;
  --info-soft: #18343b;
  --info-border: #377584;
  --violet: #a899df;
  --focus: #9bdceb;

  --score-zero-bg: #273139;
  --score-zero-border: #46545e;
  --score-zero-text: #d7ddd9;
  --unavailable-bg: #11171b;
  --unavailable-stripe: #1a2227;
  --unavailable-border: #3b444c;
  --missing-border: #535e68;
  --axis: #5b646d;
  --bias-very-positive-bg: #057e5d;
  --bias-very-positive-border: #55f3c5;
  --bias-very-positive-text: #ffffff;
  --bias-very-negative-bg: #c43d52;
  --bias-very-negative-border: #ff8b92;
  --bias-very-negative-text: #ffffff;
  --bias-positive-wash: linear-gradient(90deg, rgb(15 109 85 / 58%), rgb(18 21 24 / 94%));
  --bias-very-positive-wash: linear-gradient(90deg, rgb(5 126 93 / 75%), rgb(18 21 24 / 94%));
  --bias-negative-wash: linear-gradient(90deg, rgb(131 49 59 / 58%), rgb(18 21 24 / 94%));
  --bias-very-negative-wash: linear-gradient(90deg, rgb(196 61 82 / 72%), rgb(18 21 24 / 94%));
  --group-output-accent: #e6c76e;
  --group-market-accent: #5ed6e8;
  --group-positioning-accent: #c2a8ff;
  --group-growth-accent: #61e6b8;
  --group-prices-accent: #ffcc63;
  --group-jobs-accent: #ff8d9a;
  --group-output-wash: linear-gradient(180deg, rgb(230 199 110 / 22%), rgb(24 28 32 / 96%));
  --group-market-wash: linear-gradient(180deg, rgb(94 214 232 / 20%), rgb(24 28 32 / 96%));
  --group-positioning-wash: linear-gradient(180deg, rgb(194 168 255 / 20%), rgb(24 28 32 / 96%));
  --group-growth-wash: linear-gradient(180deg, rgb(97 230 184 / 20%), rgb(24 28 32 / 96%));
  --group-prices-wash: linear-gradient(180deg, rgb(255 204 99 / 20%), rgb(24 28 32 / 96%));
  --group-jobs-wash: linear-gradient(180deg, rgb(255 141 154 / 20%), rgb(24 28 32 / 96%));
  --terminal-bg: rgb(10 11 12 / 96%);
  --scrim: rgb(0 0 0 / 62%);
  --drawer-scrim: rgb(0 0 0 / 55%);

  --rail-bg: #0c0e0f;
  --rail-surface: #131618;
  --rail-hover: #191d20;
  --rail-border: #282d31;
  --rail-text: #f2f0eb;
  --rail-muted: #929590;
  --rail-accent: #e2c77f;

  --radius: 6px;
  --radius-large: 10px;
  --rail-width: 260px;
  --terminal-height: 52px;
  --shadow-drawer: -16px 0 40px rgb(0 0 0 / 45%);
}

:root[data-theme='light'] {
  color-scheme: light;

  --bg: #f2f0eb;
  --surface-0: #f8f6f1;
  --surface-1: #fffefa;
  --surface-2: #f5f2ec;
  --surface-3: #ebe7df;
  --surface-header: #efebe4;
  --surface-hover: #f3efe8;
  --border: #d6d0c5;
  --border-strong: #b8afa1;
  --text: #1d1b18;
  --text-secondary: #514c43;
  --text-muted: #696258;

  --brand-gold: #856219;
  --brand-gold-strong: #6e5012;
  --brand-gold-soft: #f3ead3;
  --positive: #087653;
  --positive-soft: #e2f2ea;
  --positive-border: #64a68d;
  --positive-cell: #d8ede4;
  --score-positive-1-bg: #cbf4e7;
  --score-positive-1-border: #63b49a;
  --score-positive-1-text: #0a5d45;
  --score-positive-2-bg: #087256;
  --score-positive-2-border: #075541;
  --score-positive-2-text: #ffffff;
  --negative: #a83532;
  --negative-soft: #fae8e7;
  --negative-border: #d28c89;
  --negative-cell: #f5dcda;
  --score-negative-1-bg: #f9d5d6;
  --score-negative-1-border: #d78487;
  --score-negative-1-text: #7c2729;
  --score-negative-2-bg: #a73544;
  --score-negative-2-border: #7f2730;
  --score-negative-2-text: #ffffff;
  --warning: #876218;
  --warning-soft: #f5ecd4;
  --warning-border: #c4a65d;
  --info: #1f697b;
  --info-soft: #e1eff2;
  --info-border: #78aeba;
  --violet: #66519a;
  --focus: #175f72;

  --score-zero-bg: #efede8;
  --score-zero-border: #c8c2b8;
  --score-zero-text: #344047;
  --unavailable-bg: #f8f6f1;
  --unavailable-stripe: #ece8e0;
  --unavailable-border: #bcb5aa;
  --missing-border: #9b9489;
  --axis: #898277;
  --bias-very-positive-bg: #087256;
  --bias-very-positive-border: #075541;
  --bias-very-positive-text: #ffffff;
  --bias-very-negative-bg: #a73544;
  --bias-very-negative-border: #7f2730;
  --bias-very-negative-text: #ffffff;
  --bias-positive-wash: linear-gradient(90deg, rgb(203 239 227 / 72%), rgb(255 254 250 / 95%));
  --bias-very-positive-wash: linear-gradient(90deg, rgb(116 207 177 / 76%), rgb(255 254 250 / 95%));
  --bias-negative-wash: linear-gradient(90deg, rgb(246 210 209 / 72%), rgb(255 254 250 / 95%));
  --bias-very-negative-wash: linear-gradient(90deg, rgb(238 166 170 / 72%), rgb(255 254 250 / 95%));
  --group-output-accent: #9b741f;
  --group-market-accent: #126f80;
  --group-positioning-accent: #7355aa;
  --group-growth-accent: #137359;
  --group-prices-accent: #855c0f;
  --group-jobs-accent: #a43d4a;
  --group-output-wash: linear-gradient(180deg, rgb(200 168 93 / 18%), rgb(239 235 228 / 96%));
  --group-market-wash: linear-gradient(180deg, rgb(94 214 232 / 17%), rgb(239 235 228 / 96%));
  --group-positioning-wash: linear-gradient(180deg, rgb(194 168 255 / 17%), rgb(239 235 228 / 96%));
  --group-growth-wash: linear-gradient(180deg, rgb(97 230 184 / 17%), rgb(239 235 228 / 96%));
  --group-prices-wash: linear-gradient(180deg, rgb(255 204 99 / 17%), rgb(239 235 228 / 96%));
  --group-jobs-wash: linear-gradient(180deg, rgb(255 141 154 / 17%), rgb(239 235 228 / 96%));
  --terminal-bg: rgb(248 246 241 / 96%);
  --scrim: rgb(14 15 16 / 46%);
  --drawer-scrim: rgb(14 15 16 / 38%);

  /* The dark rail remains a stable Caberg navigation anchor in both themes. */
  --rail-bg: #0c0e0f;
  --rail-surface: #131618;
  --rail-hover: #191d20;
  --rail-border: #282d31;
  --rail-text: #f2f0eb;
  --rail-muted: #929590;
  --rail-accent: #e2c77f;

  --shadow-drawer: -14px 0 36px rgb(52 45 34 / 18%);
}
