/* agenttail themes: the colour variables for matrix (the default) and each
   :root[data-theme] variant. Shared by the app and the project site. */
  :root {
    /* surfaces */
    --bg: #050807;
    --bg-2: #07130d;
    --bg-3: #0b1a13;
    --bg-deep: #050a08;
    --bg-bar: #04120b;
    --bg-chat: #050c09;
    --bg-menu: rgba(5, 12, 9, .99);
    --bg-composer: #040a07;
    --bg-scroll: #060c09;
    --bg-boot: #020504;
    --bg-tag: #06110c;
    --bg-approval: #070d09;
    --bg-code: #020906;
    --bg-inline: #0a1a12;
    --bg-warn: #171306;
    --bg-danger: #1a0709;
    --bg-user: #0d2a1c;
    --bg-hover: #0c1a14;
    --bg-badge: #123522;
    --bg-meter: #10241a;
    --bg-topbar: #08120e;
    --bg-term: #000000;
    --bg-modal: #06100c;
    --bg-modal-99: rgba(6, 16, 12, .99);
    --bg-badge-88: rgba(6, 16, 12, .88);
    --bg-label: rgba(0, 0, 0, .25);
    --bg-count: #123a26;
    --bg-count-err: #3a1620;
    --bg-dot: #3a4a40;
    --bg-thumb: #163a27;
    --bg-selection: #123a26;
    --bg-line-highlight: #08130e;
    --bg-widget: #07100c;
    --panel: #070d0b;
    --panel-2: #0a1411;
    /* borders */
    --line: #12301f;
    --line-soft: #0d2118;
    --border: #12301f;
    --border-soft: #0d2118;
    --border-strong: #173a27;
    --border-contrast: #000000;
    --border-cyan: #143a3a;
    --border-warn: #5a4517;
    --border-warn-soft: #40320f;
    --border-danger: #5a1f27;
    --border-danger-soft: #6b2c33;
    --border-approve: #2f7a4a;
    --border-btn: #3d5a3f;
    --border-user: #1c5133;
    --border-chat: #1c3a2a;
    --border-link: #1f4d4d;
    /* accents */
    --green: #37f28a;
    --ok: var(--green);         /* success marks: exit 0, finished jobs, SAFE */
    --green-dim: #1d7a4d;
    --green-soft: #9fe8bd;
    --cyan: #5ce1e6;
    --amber: #ffd166;
    --red: #ff5f6d;
    --purple: #c792ea;
    --orange: #ff9f43;
    --glitch: #ff3c50;
    --accent: var(--green);
    /* text */
    --text: #c8f7d4;
    --muted: #5f7c6a;
    --text-strong: #e6fff0;
    --text-bright: #d7ffe4;
    --text-white: #ffffff;
    --text-code: #bfffd4;
    --text-approval: #e9ffd9;
    --text-amber-soft: #ffe3a3;
    --text-quote: #9fc7b0;
    --text-tree: #9dc2ab;
    --text-think: #7fa38d;
    --text-think-summary: #6f8f7c;
    --text-think-dot: #4f705d;
    --text-sys: #4f6f5d;
    --text-empty: #3f6a52;
    --text-icon: #3f6a52;
    --text-dim: #436052;
    --text-faint: #2f4a3b;
    --text-hint: #2f5a41;
    --text-placeholder: #456a55;
    --text-on-amber: #1b0d03;
    --text-approve: #7dffab;
    --text-reject: #ff9aa3;
    /* canvases */
    --matrix-fade: rgba(0, 0, 0, 0.18);
    --matrix-glyph: rgba(55, 242, 138, 0.65);
    --mono: "JetBrains Mono", "Cascadia Mono", Consolas, "Courier New", monospace;
  }

  /* ---------- themes ---------- */
  :root[data-theme="amber"] {
    --bg: #0b0803;
    --bg-2: #120d05;
    --bg-3: #1a1207;
    --bg-deep: #0d0904;
    --bg-bar: #100a03;
    --bg-chat: #0e0903;
    --bg-menu: rgba(14, 9, 3, .99);
    --bg-composer: #0c0802;
    --bg-scroll: #0b0702;
    --bg-boot: #050302;
    --bg-tag: #120c04;
    --bg-approval: #0e0a04;
    --bg-code: #080502;
    --bg-inline: #171006;
    --bg-warn: #1d1507;
    --bg-danger: #1d0b06;
    --bg-user: #2a1c08;
    --bg-hover: #1b1308;
    --bg-badge: #2a1d08;
    --bg-meter: #231806;
    --bg-topbar: #140e06;
    --bg-term: #000000;
    --bg-modal: #120c05;
    --bg-modal-99: rgba(18, 12, 5, .99);
    --bg-badge-88: rgba(18, 12, 5, .88);
    --bg-label: rgba(0, 0, 0, .25);
    --bg-count: #3a2a0c;
    --bg-count-err: #33120f;
    --bg-dot: #4a3a26;
    --bg-thumb: #4a3410;
    --bg-selection: #3a2a0c;
    --bg-line-highlight: #171006;
    --bg-widget: #120d05;
    --panel: #100b05;
    --panel-2: #150e06;
    --line: #4a3410;
    --line-soft: #33240b;
    --border: #4a3410;
    --border-soft: #33240b;
    --border-strong: #5c4315;
    --border-contrast: #241a08;
    --border-cyan: #5c4315;
    --border-warn: #6a5220;
    --border-warn-soft: #4f3d16;
    --border-danger: #6b2c1f;
    --border-danger-soft: #7a3a2a;
    --border-approve: #6f5b24;
    --border-btn: #54431d;
    --border-user: #5c4315;
    --border-chat: #40300f;
    --border-link: #6b5320;
    --green: #ffb000;
    --green-dim: #a86f00;
    --green-soft: #ffd27a;
    --cyan: #ffcf6b;
    --amber: #ffc24d;
    --red: #ff6b57;
    --purple: #ff9d5c;
    --orange: #ff9f43;
    --glitch: #ff6b57;
    --text: #ffd9a0;
    --muted: #a87e4a;
    --text-strong: #ffe9c4;
    --text-bright: #ffe6b8;
    --text-white: #fff4d6;
    --text-code: #ffe3a8;
    --text-approval: #ffedc9;
    --text-amber-soft: #ffe3a3;
    --text-quote: #d9ad70;
    --text-tree: #e0b87e;
    --text-think: #b98f58;
    --text-think-summary: #a8814f;
    --text-think-dot: #8a673a;
    --text-sys: #9c7947;
    --text-empty: #7d5e34;
    --text-icon: #7d5e34;
    --text-dim: #8a6438;
    --text-faint: #5e4525;
    --text-hint: #6b4e28;
    --text-placeholder: #7a5a30;
    --text-on-amber: #1a0f02;
    --text-approve: #ffd27a;
    --text-reject: #ff9a86;
    --matrix-fade: rgba(11, 8, 3, 0.18);
    --matrix-glyph: rgba(255, 176, 0, 0.65);
  }

  :root[data-theme="red"] {
    --bg: #0c0607;
    --bg-2: #140a0b;
    --bg-3: #1c0e10;
    --bg-deep: #0e0708;
    --bg-bar: #110809;
    --bg-chat: #100708;
    --bg-menu: rgba(18, 9, 10, .99);
    --bg-composer: #0d0607;
    --bg-scroll: #0c0607;
    --bg-boot: #060303;
    --bg-tag: #160a0c;
    --bg-approval: #130909;
    --bg-code: #090405;
    --bg-inline: #1d0e10;
    --bg-warn: #1f1209;
    --bg-danger: #200a18;
    --bg-user: #2a0f14;
    --bg-hover: #1e0e11;
    --bg-badge: #2b0f15;
    --bg-meter: #25100f;
    --bg-topbar: #150a0c;
    --bg-term: #070304;
    --bg-modal: #140a0c;
    --bg-modal-99: rgba(20, 10, 12, .99);
    --bg-badge-88: rgba(20, 10, 12, .9);
    --bg-label: rgba(0, 0, 0, .25);
    --bg-count: #3d1219;
    --bg-count-err: #3a1030;
    --bg-dot: #4a2c30;
    --bg-thumb: #4d1a20;
    --bg-selection: #3d1218;
    --bg-line-highlight: #170b0d;
    --bg-widget: #140a0b;
    --panel: #120809;
    --panel-2: #170b0d;
    --line: #4d1a20;
    --line-soft: #33121a;
    --border: #4d1a20;
    --border-soft: #33121a;
    --border-strong: #62202a;
    --border-contrast: #200b0e;
    --border-cyan: #5a2a2a;
    --border-warn: #6a4a20;
    --border-warn-soft: #4f3718;
    --border-danger: #6b1f55;
    --border-danger-soft: #7a2a62;
    --border-approve: #6a5a40;
    --border-btn: #55202a;
    --border-user: #62202a;
    --border-chat: #40141a;
    --border-link: #7a3a44;
    --green: #ff3347;
    --green-dim: #b3243a;
    --green-soft: #f5b8bf;
    --cyan: #ffb59a;
    --amber: #ffb547;
    --red: #ff4fc8;
    --purple: #d48cff;
    --orange: #ff8a4c;
    --glitch: #ff4fc8;
    --text: #f3e6e1;
    --muted: #b58a8f;
    --text-strong: #fbefe9;
    --text-bright: #fff4ef;
    --text-white: #fff7f2;
    --text-code: #f6d3cc;
    --text-approval: #fbe9e4;
    --text-amber-soft: #ffd9a8;
    --text-quote: #c9939a;
    --text-tree: #e9c9c6;
    --text-think: #c79aa0;
    --text-think-summary: #b98d93;
    --text-think-dot: #8f6a6e;
    --text-sys: #a98086;
    --text-empty: #8f6a6e;
    --text-icon: #8f6a6e;
    --text-dim: #a07479;
    --text-faint: #7a5458;
    --text-hint: #8a6267;
    --text-placeholder: #9a7176;
    --text-on-amber: #1a0606;
    --text-approve: #efe0c6;
    --text-reject: #ff9ae4;
    --matrix-fade: rgba(12, 6, 7, 0.18);
    --matrix-glyph: rgba(255, 51, 71, 0.6);
    --ok: #efe0c6;
  }

  :root[data-theme="ice"] {
    --bg: #050b14;
    --bg-2: #081422;
    --bg-3: #0b1c2e;
    --bg-deep: #07111e;
    --bg-bar: #071321;
    --bg-chat: #06101c;
    --bg-menu: rgba(6, 16, 28, .99);
    --bg-composer: #050e19;
    --bg-scroll: #050d18;
    --bg-boot: #02060d;
    --bg-tag: #081727;
    --bg-approval: #07121f;
    --bg-code: #030a12;
    --bg-inline: #0a1a2a;
    --bg-warn: #0b1a26;
    --bg-danger: #180b12;
    --bg-user: #0d2840;
    --bg-hover: #0b1a2b;
    --bg-badge: #10344f;
    --bg-meter: #0c2236;
    --bg-topbar: #071321;
    --bg-term: #00060d;
    --bg-modal: #081421;
    --bg-modal-99: rgba(8, 20, 33, .99);
    --bg-badge-88: rgba(8, 20, 33, .88);
    --bg-label: rgba(0, 0, 0, .25);
    --bg-count: #123a52;
    --bg-count-err: #331420;
    --bg-dot: #31465c;
    --bg-thumb: #16405a;
    --bg-selection: #123a52;
    --bg-line-highlight: #0a1a2a;
    --bg-widget: #0a1826;
    --panel: #07101c;
    --panel-2: #0a1826;
    --line: #123a4d;
    --line-soft: #0c2838;
    --border: #123a4d;
    --border-soft: #0c2838;
    --border-strong: #17475e;
    --border-contrast: #04121a;
    --border-cyan: #1b4c5e;
    --border-warn: #5a4a24;
    --border-warn-soft: #40351a;
    --border-danger: #5a2430;
    --border-danger-soft: #6b3040;
    --border-approve: #2f7a62;
    --border-btn: #3d5a68;
    --border-user: #1c5170;
    --border-chat: #1c3a4a;
    --border-link: #2f5a72;
    --green: #5ce1e6;
    --green-dim: #2a8fa0;
    --green-soft: #a8f0f5;
    --cyan: #6fb7ff;
    --amber: #ffd166;
    --red: #ff5f7a;
    --purple: #9d8cff;
    --orange: #ff9f43;
    --glitch: #ff5f7a;
    --text: #cfeaf7;
    --muted: #6f8fa6;
    --text-strong: #e6f7ff;
    --text-bright: #d6f2ff;
    --text-white: #ffffff;
    --text-code: #c3f1ff;
    --text-approval: #e2f7ff;
    --text-amber-soft: #ffe3a3;
    --text-quote: #9cc7db;
    --text-tree: #a9c9db;
    --text-think: #7fa3b8;
    --text-think-summary: #6f92a7;
    --text-think-dot: #54788f;
    --text-sys: #54788f;
    --text-empty: #3f627a;
    --text-icon: #3f627a;
    --text-dim: #466880;
    --text-faint: #2f4d63;
    --text-hint: #345a72;
    --text-placeholder: #4b6f86;
    --text-on-amber: #04121a;
    --text-approve: #7dffc0;
    --text-reject: #ff9aa6;
    --matrix-fade: rgba(5, 11, 20, 0.18);
    --matrix-glyph: rgba(92, 225, 230, 0.65);
  }

  :root[data-theme="dracula"] {
    --bg: #1a1723;
    --bg-2: #211d2c;
    --bg-3: #282334;
    --bg-deep: #1e1a28;
    --bg-bar: #1d1926;
    --bg-chat: #201b2a;
    --bg-menu: rgba(32, 27, 42, .99);
    --bg-composer: #1b1724;
    --bg-scroll: #191521;
    --bg-boot: #100d17;
    --bg-tag: #241f30;
    --bg-approval: #211c2b;
    --bg-code: #15111c;
    --bg-inline: #2b2538;
    --bg-warn: #292231;
    --bg-danger: #2e141d;
    --bg-user: #332a45;
    --bg-hover: #2a2436;
    --bg-badge: #3a2f4d;
    --bg-meter: #2f2940;
    --bg-topbar: #241f30;
    --bg-term: #14111b;
    --bg-modal: #201c2a;
    --bg-modal-99: rgba(32, 28, 42, .99);
    --bg-badge-88: rgba(32, 28, 42, .88);
    --bg-label: rgba(0, 0, 0, .25);
    --bg-count: #3d3152;
    --bg-count-err: #3a1b28;
    --bg-dot: #514863;
    --bg-thumb: #403850;
    --bg-selection: #3d3152;
    --bg-line-highlight: #2a2436;
    --bg-widget: #262132;
    --panel: #201c2a;
    --panel-2: #262132;
    --line: #403850;
    --line-soft: #302a3e;
    --border: #403850;
    --border-soft: #302a3e;
    --border-strong: #4d4360;
    --border-contrast: #14111b;
    --border-cyan: #3f5a70;
    --border-warn: #6a4a2a;
    --border-warn-soft: #4f3720;
    --border-danger: #6b2c40;
    --border-danger-soft: #7a3550;
    --border-approve: #3a7a55;
    --border-btn: #4a4260;
    --border-user: #4d3a6b;
    --border-chat: #3a3150;
    --border-link: #5a6c8a;
    --green: #bd93f9;
    --green-dim: #7b5fb0;
    --green-soft: #e2ccff;
    --cyan: #8be9fd;
    --amber: #ffb86c;
    --red: #ff5555;
    --purple: #ff79c6;
    --orange: #ffb86c;
    --glitch: #ff5555;
    --text: #f8f8f2;
    --muted: #8a8199;
    --text-strong: #ffffff;
    --text-bright: #f8f8f2;
    --text-white: #ffffff;
    --text-code: #f1d9ff;
    --text-approval: #f3e9ff;
    --text-amber-soft: #ffd9b0;
    --text-quote: #c3b6d9;
    --text-tree: #cfc4e2;
    --text-think: #a99bbf;
    --text-think-summary: #9687ad;
    --text-think-dot: #7b6c92;
    --text-sys: #8a8199;
    --text-empty: #6f6285;
    --text-icon: #6f6285;
    --text-dim: #7b6f92;
    --text-faint: #514a63;
    --text-hint: #5b5270;
    --text-placeholder: #776a8c;
    --text-on-amber: #1b1020;
    --text-approve: #8affc1;
    --text-reject: #ff9aa3;
    --matrix-fade: rgba(26, 23, 35, 0.18);
    --matrix-glyph: rgba(189, 147, 249, 0.65);
  }

  :root[data-theme="neon"] {
    --bg: #171520;
    --bg-2: #1e1a2c;
    --bg-3: #262335;
    --bg-deep: #1b1828;
    --bg-bar: #1a1626;
    --bg-chat: #1c1829;
    --bg-menu: rgba(30, 26, 44, .99);
    --bg-composer: #181523;
    --bg-scroll: #16131f;
    --bg-boot: #0e0c15;
    --bg-tag: #241f36;
    --bg-approval: #1f1a2e;
    --bg-code: #13101b;
    --bg-inline: #2a2440;
    --bg-warn: #2b2530;
    --bg-danger: #2e1424;
    --bg-user: #33284d;
    --bg-hover: #2a2440;
    --bg-badge: #3a2d55;
    --bg-meter: #2d2745;
    --bg-topbar: #211c33;
    --bg-term: #120f1a;
    --bg-modal: #1e1a2c;
    --bg-modal-99: rgba(30, 26, 44, .99);
    --bg-badge-88: rgba(30, 26, 44, .9);
    --bg-label: rgba(0, 0, 0, .25);
    --bg-count: #46305e;
    --bg-count-err: #45182a;
    --bg-dot: #55497a;
    --bg-thumb: #463465;
    --bg-selection: #463465;
    --bg-line-highlight: #2d2843;
    --bg-widget: #241f36;
    --panel: #1e1a2c;
    --panel-2: #241b2f;
    --line: #3b3254;
    --line-soft: #2c2640;
    --border: #3b3254;
    --border-soft: #2c2640;
    --border-strong: #4b4068;
    --border-contrast: #120f1a;
    --border-cyan: #2a5a6a;
    --border-warn: #6a5a2a;
    --border-warn-soft: #4f4420;
    --border-danger: #6b2c40;
    --border-danger-soft: #7a3550;
    --border-approve: #2f6a55;
    --border-btn: #4b4068;
    --border-user: #5a3a7a;
    --border-chat: #382f52;
    --border-link: #4a6a8a;
    --green: #ff7edb;
    --green-dim: #b34fa0;
    --green-soft: #ffc2ee;
    --cyan: #36f9f6;
    --amber: #fede5d;
    --red: #fe4450;
    --purple: #b893ce;
    --orange: #f97e72;
    --glitch: #fe4450;
    --text: #f4eeff;
    --muted: #8b84a8;
    --text-strong: #ffffff;
    --text-bright: #f9f5ff;
    --text-white: #ffffff;
    --text-code: #ffd8f3;
    --text-approval: #f6efff;
    --text-amber-soft: #fff0b0;
    --text-quote: #b6aed4;
    --text-tree: #d7d0f0;
    --text-think: #a59dc6;
    --text-think-summary: #968db8;
    --text-think-dot: #6e6691;
    --text-sys: #8b84a8;
    --text-empty: #6e6691;
    --text-icon: #6e6691;
    --text-dim: #7d769c;
    --text-faint: #575075;
    --text-hint: #625a82;
    --text-placeholder: #7a7298;
    --text-on-amber: #1a1020;
    --text-approve: #72f1b8;
    --text-reject: #ff9aa3;
    --matrix-fade: rgba(23, 21, 32, 0.18);
    --matrix-glyph: rgba(255, 126, 219, 0.55);
    --ok: #72f1b8;
  }

  /* Agent colours keep their hue on the light theme, just darker to stay readable. */
  :root[data-theme="paper"] {
    --agent-0: #118a4a; --agent-1: #0b7f86; --agent-2: #a06a00; --agent-3: #b0218f;
    --agent-4: #6b4fd1; --agent-5: #c25a00; --agent-6: #1f63c7; --agent-7: #c0343f;
  }
  :root[data-theme="paper"] {
    --bg: #f4f1e8;
    --bg-2: #ebe7dc;
    --bg-3: #e2ddd0;
    --bg-deep: #fbf9f3;
    --bg-bar: #efebe1;
    --bg-chat: #f6f3eb;
    --bg-menu: rgba(246, 243, 235, .99);
    --bg-composer: #f7f4ec;
    --bg-scroll: #e8e3d7;
    --bg-boot: #faf8f2;
    --bg-tag: #f0ece2;
    --bg-approval: #f7f4ec;
    --bg-code: #f1ede3;
    --bg-inline: #e9e4d7;
    --bg-warn: #f6eeda;
    --bg-danger: #fae9e5;
    --bg-user: #e3ecd9;
    --bg-hover: #e5e0d3;
    --bg-badge: #d7e8d5;
    --bg-meter: #ddd8ca;
    --bg-topbar: #e9e4d8;
    --bg-term: #f7f4ec;
    --bg-modal: #faf8f2;
    --bg-modal-99: rgba(250, 248, 242, .99);
    --bg-badge-88: rgba(250, 248, 242, .88);
    --bg-label: rgba(255, 255, 255, .45);
    --bg-count: #d3e4d0;
    --bg-count-err: #f3d9d3;
    --bg-dot: #b7b0a1;
    --bg-thumb: #c8c1b0;
    --bg-selection: #cfe3d3;
    --bg-line-highlight: #f1ede3;
    --bg-widget: #f6f3eb;
    --panel: #efebe2;
    --panel-2: #e7e2d6;
    --line: #c8c1b0;
    --line-soft: #ddd7c8;
    --border: #c8c1b0;
    --border-soft: #ddd7c8;
    --border-strong: #b3ab98;
    --border-contrast: #c8c1b0;
    --border-cyan: #a9c2c4;
    --border-warn: #c9a86a;
    --border-warn-soft: #d8c193;
    --border-danger: #d3a3a3;
    --border-danger-soft: #c47f7f;
    --border-approve: #6fa887;
    --border-btn: #a9b6aa;
    --border-user: #9dbb9f;
    --border-chat: #c3bdae;
    --border-link: #7aa7ad;
    --green: #1f7a4d;
    --green-dim: #4f9a72;
    --green-soft: #245c3d;
    --cyan: #0b6f86;
    --amber: #9a6200;
    --red: #b32636;
    --purple: #7b4fa8;
    --orange: #b5651d;
    --glitch: #b32636;
    --text: #26312b;
    --muted: #5f6d63;
    --text-strong: #1b241f;
    --text-bright: #26312b;
    --text-white: #111a15;
    --text-code: #1f3a2c;
    --text-approval: #24342b;
    --text-amber-soft: #6b4700;
    --text-quote: #425448;
    --text-tree: #3d4f43;
    --text-think: #667c6d;
    --text-think-summary: #5d7365;
    --text-think-dot: #7b8f81;
    --text-sys: #6b7e71;
    --text-empty: #6f7d72;
    --text-icon: #8a978c;
    --text-dim: #6f7d72;
    --text-faint: #7e8c80;
    --text-hint: #7e8c80;
    --text-placeholder: #7c897e;
    --text-on-amber: #fdf6e3;
    --text-approve: #106b3d;
    --text-reject: #a32636;
    --matrix-fade: rgba(244, 241, 232, 0.18);
    --matrix-glyph: rgba(31, 122, 77, 0.65);
  }
