/* Design tokens. Every colour in app.css comes from here, so a theme is one
   block of variables. The amber brand colour matches the terminal UI
   (keelson/ui.py), and the three --series-* colours are a colour-blind-safe
   categorical set, checked against both chart surfaces. */

@font-face {
  font-family: "Inter";
  src: url("../fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;

  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #f1efe9;
  --surface-3: #e8e5dc;
  --border: #e3e0d7;
  --border-strong: #cdc9bd;

  --text: #19191a;
  --text-2: #55534c;
  --muted: #8b887f;

  --brand: #a6630c;
  --brand-ink: #ffffff;
  --brand-soft: #f7ebd6;
  --brand-glow: rgba(166, 99, 12, .10);

  --ok: #1c8752;
  --ok-soft: #e1f3e9;
  --warn: #a56700;
  --warn-soft: #fbf0d4;
  --bad: #c73737;
  --bad-soft: #fbe5e3;
  --info: #2267be;
  --info-soft: #e2edfb;

  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --grid: #e7e4dc;

  /* syntax highlighting */
  --syn-keyword: #a02c8a;
  --syn-string: #1c7a4a;
  --syn-number: #a65a00;
  --syn-comment: #8b887f;
  --syn-func: #2267be;

  --shadow-sm: 0 1px 2px rgba(20, 18, 10, .06);
  --shadow: 0 1px 2px rgba(20, 18, 10, .05), 0 12px 32px rgba(20, 18, 10, .08);
  --radius: 12px;
  --radius-sm: 7px;

  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system,
    "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", "SF Mono", Consolas, "Microsoft YaHei", monospace;
}

/* Dark values are declared twice on purpose: once for "follow the OS" and once
   for an explicit choice, so the toggle can override the OS in both directions. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #090b0e;
    --surface: #101318;
    --surface-2: #161a20;
    --surface-3: #1f242c;
    --border: #20252d;
    --border-strong: #333a46;
    --text: #edebe5;
    --text-2: #aaa79d;
    --muted: #716e66;
    --brand: #f6c177;
    --brand-ink: #1b1305;
    --brand-soft: #2b2316;
    --brand-glow: rgba(246, 193, 119, .14);
    --ok: #56c48b;
    --ok-soft: #132a1c;
    --warn: #e5ae48;
    --warn-soft: #2f260f;
    --bad: #f17c7c;
    --bad-soft: #361a1a;
    --info: #70abf3;
    --info-soft: #14243b;
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --grid: #232830;
    --syn-keyword: #d79bf0;
    --syn-string: #8fd6a8;
    --syn-number: #f0b36a;
    --syn-comment: #716e66;
    --syn-func: #8bbcf5;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 16px 40px rgba(0, 0, 0, .45);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #090b0e;
  --surface: #101318;
  --surface-2: #161a20;
  --surface-3: #1f242c;
  --border: #20252d;
  --border-strong: #333a46;
  --text: #edebe5;
  --text-2: #aaa79d;
  --muted: #716e66;
  --brand: #f6c177;
  --brand-ink: #1b1305;
  --brand-soft: #2b2316;
  --brand-glow: rgba(246, 193, 119, .14);
  --ok: #56c48b;
  --ok-soft: #132a1c;
  --warn: #e5ae48;
  --warn-soft: #2f260f;
  --bad: #f17c7c;
  --bad-soft: #361a1a;
  --info: #70abf3;
  --info-soft: #14243b;
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --grid: #232830;
  --syn-keyword: #d79bf0;
  --syn-string: #8fd6a8;
  --syn-number: #f0b36a;
  --syn-comment: #716e66;
  --syn-func: #8bbcf5;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 16px 40px rgba(0, 0, 0, .45);
}
