/* Theme tokens. Dark values are the original palette; light ones keep the same
   roles with contrast fit for a white background. data-theme on <html>:
   "dark" | "light" | "auto" (follows the OS), set by the switcher in the sidebar. */
:root {
  color-scheme: dark;
  --bg: #141414;       /* app background */
  --bg0: #0a0a0a;      /* insets, inputs */
  --bg1: #171717;      /* cards */
  --bg2: #1f1f1f;
  --bg3: #232323;
  --bg4: #2a2a2a;
  --bg5: #303030;
  --bg6: #3a3a3a;
  --bgx: #181818;
  --bgy: #0f0f0f;
  --line: #404040;     /* borders */
  --line2: #262626;    /* hairlines */
  --fg: #fafafa;       /* main text */
  --fg2: #e5e5e5;
  --fg3: #d4d4d4;
  --muted: #a3a3a3;
  --muted2: #737373;
  --muted3: #8a8a8a;
  --dim: #525252;
  --accent: #b6d086;
  --on-accent: #171717;
  --accent-t1: #d9ecc0;  /* light-green text on dark tints */
  --accent-t2: #c5dc9f;
  --green: #4ade80;
  --red: #f87171;
  --red2: #fca5a5;
  --amber: #f59e0b;
  --amber2: #fbbf24;
  --yellow: #facc15;
  --gold: #f0c67a;
  --blue: #6cc4ff;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f3f0;
  --bg0: #f8f8f6;
  --bg1: #ffffff;
  --bg2: #eeeeea;
  --bg3: #e9e9e5;
  --bg4: #deded9;
  --bg5: #d6d6d0;
  --bg6: #c9c9c3;
  --bgx: #f5f5f2;
  --bgy: #fafaf8;
  --line: #d9d9d3;
  --line2: #e8e8e3;
  --fg: #171717;
  --fg2: #262626;
  --fg3: #3a3a3a;
  --muted: #5c5c57;
  --muted2: #74746e;
  --muted3: #85857f;
  --dim: #a8a8a2;
  --accent: #5c8a24;
  --on-accent: #ffffff;
  --accent-t1: #3f6212;
  --accent-t2: #4d7c0f;
  --green: #15803d;
  --red: #dc2626;
  --red2: #b91c1c;
  --amber: #b45309;
  --amber2: #b45309;
  --yellow: #a16207;
  --gold: #92400e;
  --blue: #0369a1;
}

@media (prefers-color-scheme: light) {
  :root[data-theme="auto"] {
    color-scheme: light;
    --bg: #f3f3f0;
    --bg0: #f8f8f6;
    --bg1: #ffffff;
    --bg2: #eeeeea;
    --bg3: #e9e9e5;
    --bg4: #deded9;
    --bg5: #d6d6d0;
    --bg6: #c9c9c3;
    --bgx: #f5f5f2;
    --bgy: #fafaf8;
    --line: #d9d9d3;
    --line2: #e8e8e3;
    --fg: #171717;
    --fg2: #262626;
    --fg3: #3a3a3a;
    --muted: #5c5c57;
    --muted2: #74746e;
    --muted3: #85857f;
    --dim: #a8a8a2;
    --accent: #5c8a24;
    --on-accent: #ffffff;
    --accent-t1: #3f6212;
    --accent-t2: #4d7c0f;
    --green: #15803d;
    --red: #dc2626;
    --red2: #b91c1c;
    --amber: #b45309;
    --amber2: #b45309;
    --yellow: #a16207;
    --gold: #92400e;
    --blue: #0369a1;
  }
}
