/* Colour tokens: 4 palettes (plum, moss, terracotta, graphite) x light/dark. Generated from OKLCH definitions by a one-off script
   (not part of the repo); hand-edit with care. Text pairings were solved against WCAG AA (text >= 4.5:1, UI edges and focus >= 3:1);
   the --ord-1..6 funnel ramps pass the dataviz ordinal-ramp validator in every palette and mode. */

/* ---- light (default) ---- */
:root:not([data-palette]),
[data-palette="plum"] {
  color-scheme: light;
  --bg: #f9f2f8;
  --surface: #fffdfe;
  --surface2: #f4eef3;
  --sunk: #f0e8ef;
  --line: #ded6dd;
  --line-strong: #928991;
  --text: #191418;
  --text2: #4d454c;
  --text3: #6e666d;
  --accent: #8d2679;
  --accent-ink: #fefafd;
  --accent-hover: #7d136a;
  --accent-soft: #ffe4f6;
  --accent-edge: #8d2679;
  --accent-text: #8d2679;
  --viz: #8d2679;
  --focus: #8d2679;
  --good: #037e3f;
  --good-soft: #d8f6de;
  --good-text: #017137;
  --bad: #b63132;
  --bad-soft: #ffe6e4;
  --bad-text: #a12f2f;
  --warn: #b07b05;
  --warn-soft: #feeacc;
  --warn-text: #7c5500;
  --ord-1: #e77bcd;
  --ord-2: #cf65b6;
  --ord-3: #b850a0;
  --ord-4: #a03a8b;
  --ord-5: #8a2376;
  --ord-6: #730361;
}
[data-palette="moss"] {
  color-scheme: light;
  --bg: #f2f6ef;
  --surface: #fcfefb;
  --surface2: #eef2eb;
  --sunk: #e8ede5;
  --line: #d6dbd2;
  --line-strong: #898e85;
  --text: #141712;
  --text2: #454941;
  --text3: #656a61;
  --accent: #41641f;
  --accent-ink: #fafcf9;
  --accent-hover: #34550d;
  --accent-soft: #e3f3d8;
  --accent-edge: #41641f;
  --accent-text: #41641f;
  --viz: #41641f;
  --focus: #41641f;
  --good: #037e3f;
  --good-soft: #d8f6de;
  --good-text: #017137;
  --bad: #b63132;
  --bad-soft: #ffe6e4;
  --bad-text: #a12f2f;
  --warn: #b07b05;
  --warn-soft: #feeacc;
  --warn-text: #7c5500;
  --ord-1: #8fb66f;
  --ord-2: #7aa05a;
  --ord-3: #668a46;
  --ord-4: #527531;
  --ord-5: #3f611b;
  --ord-6: #2c4d01;
}
[data-palette="terracotta"] {
  color-scheme: light;
  --bg: #faf3ee;
  --surface: #fefdfd;
  --surface2: #f6efea;
  --sunk: #f2e9e4;
  --line: #e0d7d1;
  --line-strong: #948a84;
  --text: #1a1512;
  --text2: #4e4640;
  --text3: #706761;
  --accent: #a7491f;
  --accent-ink: #fffbf9;
  --accent-hover: #963a0b;
  --accent-soft: #fee7df;
  --accent-edge: #a7491f;
  --accent-text: #a7491f;
  --viz: #a7491f;
  --focus: #a7491f;
  --good: #037e3f;
  --good-soft: #d8f6de;
  --good-text: #017137;
  --bad: #b63132;
  --bad-soft: #ffe6e4;
  --bad-text: #a12f2f;
  --warn: #b07b05;
  --warn-soft: #feeacc;
  --warn-text: #7c5500;
  --ord-1: #ee8961;
  --ord-2: #d6734c;
  --ord-3: #be5e36;
  --ord-4: #a7491f;
  --ord-5: #8f3301;
  --ord-6: #712702;
}
[data-palette="graphite"] {
  color-scheme: light;
  --bg: #f2f5f9;
  --surface: #fdfdfe;
  --surface2: #eef0f4;
  --sunk: #e8ebf0;
  --line: #d6d9de;
  --line-strong: #898c92;
  --text: #141619;
  --text2: #45484d;
  --text3: #66696e;
  --accent: #b5ea26;
  --accent-ink: #131809;
  --accent-hover: #a7d91d;
  --accent-soft: #e2f6c3;
  --accent-edge: #759819;
  --accent-text: #546e0d;
  --viz: #739801;
  --focus: #2c2e31;
  --good: #037e3f;
  --good-soft: #d8f6de;
  --good-text: #017137;
  --bad: #b63132;
  --bad-soft: #ffe6e4;
  --bad-text: #a12f2f;
  --warn: #b07b05;
  --warn-soft: #feeacc;
  --warn-text: #7c5500;
  --ord-1: #8fb928;
  --ord-2: #7ba208;
  --ord-3: #698b01;
  --ord-4: #587502;
  --ord-5: #475f02;
  --ord-6: #374a02;
}

:root, [data-palette] {
  --st-saved-bg: #e8ebf1; --st-saved-fg: #4f5661; --st-saved-dot: #737b87;
  --st-applied-bg: #eae8ff; --st-applied-fg: #5740a1; --st-applied-dot: #7b67cc;
  --st-replied-bg: #f8eac6; --st-replied-fg: #695200; --st-replied-dot: #957602;
  --st-screening-bg: #fee6d6; --st-screening-fg: #824103; --st-screening-dot: #b85f05;
  --st-interview-bg: #fee2ee; --st-interview-fg: #912061; --st-interview-dot: #bc4b87;
  --st-offer-bg: #ddf3d2; --st-offer-fg: #326402; --st-offer-dot: #4a8f04;
  --st-accepted-bg: #cff6e0; --st-accepted-fg: #056641; --st-accepted-dot: #06915f;
  --st-accepted-solid-bg: #025c3b; --st-accepted-solid-fg: #ffffff;
  --st-rejected-bg: #ffe4e1; --st-rejected-fg: #9e141e; --st-rejected-dot: #cb4644;
  --st-ghosted-bg: #f0eae4; --st-ghosted-fg: #5f5346; --st-ghosted-dot: #84786b;
  --st-withdrawn-bg: #eee9f1; --st-withdrawn-fg: #5a5162; --st-withdrawn-dot: #807688;
}

/* ---- dark: follows the OS unless the theme is forced to light ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-palette]),
  :root:not([data-theme="light"]) [data-palette="plum"],
  :root:not([data-theme="light"])[data-palette="plum"] {
    color-scheme: dark;
    --bg: #120c11;
    --surface: #1b151a;
    --surface2: #241e24;
    --sunk: #0c070c;
    --line: #322b31;
    --line-strong: #6b6269;
    --text: #f2eff2;
    --text2: #bdb4bc;
    --text3: #9e959d;
    --accent: #e491ce;
    --accent-ink: #170e15;
    --accent-hover: #f4a1de;
    --accent-soft: #3c2035;
    --accent-edge: #e491ce;
    --accent-text: #e491ce;
    --viz: #e491ce;
    --focus: #e491ce;
    --good: #5dc47e;
    --good-soft: #12361e;
    --good-text: #6ad18a;
    --bad: #ff7e77;
    --bad-soft: #47211e;
    --bad-text: #ff958e;
    --warn: #d7a03d;
    --warn-soft: #3e2903;
    --warn-text: #e8ab3e;
    --ord-1: #823871;
    --ord-2: #984c86;
    --ord-3: #ae619b;
    --ord-4: #c576b1;
    --ord-5: #dd8bc7;
    --ord-6: #f4a1de;
  }

  :root:not([data-theme="light"]) [data-palette="moss"],
  :root:not([data-theme="light"])[data-palette="moss"] {
    color-scheme: dark;
    --bg: #0c1009;
    --surface: #151912;
    --surface2: #1e221b;
    --sunk: #070a05;
    --line: #2b2f28;
    --line-strong: #62675e;
    --text: #eff1ed;
    --text2: #b4b9af;
    --text3: #959a91;
    --accent: #96c172;
    --accent-ink: #0e130a;
    --accent-hover: #a5d182;
    --accent-soft: #213112;
    --accent-edge: #96c172;
    --accent-text: #96c172;
    --viz: #96c172;
    --focus: #96c172;
    --good: #5dc47e;
    --good-soft: #12361e;
    --good-text: #6ad18a;
    --bad: #ff7e77;
    --bad-soft: #47211e;
    --bad-text: #ff958e;
    --warn: #d7a03d;
    --warn-soft: #3e2903;
    --warn-text: #e8ab3e;
    --ord-1: #3f6515;
    --ord-2: #52792c;
    --ord-3: #668e42;
    --ord-4: #7ba457;
    --ord-5: #90ba6c;
    --ord-6: #a5d182;
  }

  :root:not([data-theme="light"]) [data-palette="terracotta"],
  :root:not([data-theme="light"])[data-palette="terracotta"] {
    color-scheme: dark;
    --bg: #130d09;
    --surface: #1c1611;
    --surface2: #261f1a;
    --sunk: #0e0805;
    --line: #342c27;
    --line-strong: #6c635d;
    --text: #f3efed;
    --text2: #bfb5ae;
    --text3: #a09690;
    --accent: #e89270;
    --accent-ink: #190f0b;
    --accent-hover: #f9a17f;
    --accent-soft: #422114;
    --accent-edge: #e89270;
    --accent-text: #e89270;
    --viz: #e89270;
    --focus: #e89270;
    --good: #5dc47e;
    --good-soft: #12361e;
    --good-text: #6ad18a;
    --bad: #ff7e77;
    --bad-soft: #47211e;
    --bad-text: #ff958e;
    --warn: #d7a03d;
    --warn-soft: #3e2903;
    --warn-text: #e8ab3e;
    --ord-1: #8b3e1d;
    --ord-2: #a25232;
    --ord-3: #b96746;
    --ord-4: #d07c5b;
    --ord-5: #e89270;
    --ord-6: #ffa886;
  }

  :root:not([data-theme="light"]) [data-palette="graphite"],
  :root:not([data-theme="light"])[data-palette="graphite"] {
    color-scheme: dark;
    --bg: #0c0e12;
    --surface: #15171b;
    --surface2: #1e2125;
    --sunk: #07090d;
    --line: #2b2e32;
    --line-strong: #62656a;
    --text: #eff0f2;
    --text2: #b4b8bd;
    --text3: #95989e;
    --accent: #b5ea26;
    --accent-ink: #131809;
    --accent-hover: #a7d91d;
    --accent-soft: #27330e;
    --accent-edge: #b5ea26;
    --accent-text: #a6cf51;
    --viz: #b2e240;
    --focus: #b6ea3a;
    --good: #5dc47e;
    --good-soft: #12361e;
    --good-text: #6ad18a;
    --bad: #ff7e77;
    --bad-soft: #47211e;
    --bad-text: #ff958e;
    --warn: #d7a03d;
    --warn-soft: #3e2903;
    --warn-text: #e8ab3e;
    --ord-1: #4a6203;
    --ord-2: #5a7803;
    --ord-3: #6c8e03;
    --ord-4: #7ea602;
    --ord-5: #93bc2d;
    --ord-6: #a8d349;
  }

  :root:not([data-theme="light"]), :root:not([data-theme="light"]) [data-palette] {
    --st-saved-bg: #2b2e33; --st-saved-fg: #b6becb; --st-saved-dot: #a4abb8;
    --st-applied-bg: #2e284a; --st-applied-fg: #bcb2ff; --st-applied-dot: #aa99ff;
    --st-replied-bg: #392c01; --st-replied-fg: #e1b942; --st-replied-dot: #cda629;
    --st-screening-bg: #44250c; --st-screening-fg: #ffa666; --st-screening-dot: #f28e42;
    --st-interview-bg: #442032; --st-interview-fg: #ff98ca; --st-interview-dot: #f47db9;
    --st-offer-bg: #203414; --st-offer-fg: #8cd55e; --st-offer-dot: #79c24a;
    --st-accepted-bg: #0a3723; --st-accepted-fg: #52db9c; --st-accepted-dot: #38c789;
    --st-accepted-solid-bg: #099864; --st-accepted-solid-fg: #101010;
    --st-rejected-bg: #47211e; --st-rejected-fg: #ffa098; --st-rejected-dot: #ff7e77;
    --st-ghosted-bg: #322d27; --st-ghosted-fg: #c9bbad; --st-ghosted-dot: #b5a89a;
    --st-withdrawn-bg: #302c34; --st-withdrawn-fg: #c4b9cd; --st-withdrawn-dot: #b1a6b9;
  }
}

/* ---- dark: forced ---- */
:root[data-theme="dark"]:not([data-palette]),
:root[data-theme="dark"] [data-palette="plum"],
:root[data-theme="dark"][data-palette="plum"] {
  color-scheme: dark;
  --bg: #120c11;
  --surface: #1b151a;
  --surface2: #241e24;
  --sunk: #0c070c;
  --line: #322b31;
  --line-strong: #6b6269;
  --text: #f2eff2;
  --text2: #bdb4bc;
  --text3: #9e959d;
  --accent: #e491ce;
  --accent-ink: #170e15;
  --accent-hover: #f4a1de;
  --accent-soft: #3c2035;
  --accent-edge: #e491ce;
  --accent-text: #e491ce;
  --viz: #e491ce;
  --focus: #e491ce;
  --good: #5dc47e;
  --good-soft: #12361e;
  --good-text: #6ad18a;
  --bad: #ff7e77;
  --bad-soft: #47211e;
  --bad-text: #ff958e;
  --warn: #d7a03d;
  --warn-soft: #3e2903;
  --warn-text: #e8ab3e;
  --ord-1: #823871;
  --ord-2: #984c86;
  --ord-3: #ae619b;
  --ord-4: #c576b1;
  --ord-5: #dd8bc7;
  --ord-6: #f4a1de;
}
:root[data-theme="dark"] [data-palette="moss"],
:root[data-theme="dark"][data-palette="moss"] {
  color-scheme: dark;
  --bg: #0c1009;
  --surface: #151912;
  --surface2: #1e221b;
  --sunk: #070a05;
  --line: #2b2f28;
  --line-strong: #62675e;
  --text: #eff1ed;
  --text2: #b4b9af;
  --text3: #959a91;
  --accent: #96c172;
  --accent-ink: #0e130a;
  --accent-hover: #a5d182;
  --accent-soft: #213112;
  --accent-edge: #96c172;
  --accent-text: #96c172;
  --viz: #96c172;
  --focus: #96c172;
  --good: #5dc47e;
  --good-soft: #12361e;
  --good-text: #6ad18a;
  --bad: #ff7e77;
  --bad-soft: #47211e;
  --bad-text: #ff958e;
  --warn: #d7a03d;
  --warn-soft: #3e2903;
  --warn-text: #e8ab3e;
  --ord-1: #3f6515;
  --ord-2: #52792c;
  --ord-3: #668e42;
  --ord-4: #7ba457;
  --ord-5: #90ba6c;
  --ord-6: #a5d182;
}
:root[data-theme="dark"] [data-palette="terracotta"],
:root[data-theme="dark"][data-palette="terracotta"] {
  color-scheme: dark;
  --bg: #130d09;
  --surface: #1c1611;
  --surface2: #261f1a;
  --sunk: #0e0805;
  --line: #342c27;
  --line-strong: #6c635d;
  --text: #f3efed;
  --text2: #bfb5ae;
  --text3: #a09690;
  --accent: #e89270;
  --accent-ink: #190f0b;
  --accent-hover: #f9a17f;
  --accent-soft: #422114;
  --accent-edge: #e89270;
  --accent-text: #e89270;
  --viz: #e89270;
  --focus: #e89270;
  --good: #5dc47e;
  --good-soft: #12361e;
  --good-text: #6ad18a;
  --bad: #ff7e77;
  --bad-soft: #47211e;
  --bad-text: #ff958e;
  --warn: #d7a03d;
  --warn-soft: #3e2903;
  --warn-text: #e8ab3e;
  --ord-1: #8b3e1d;
  --ord-2: #a25232;
  --ord-3: #b96746;
  --ord-4: #d07c5b;
  --ord-5: #e89270;
  --ord-6: #ffa886;
}
:root[data-theme="dark"] [data-palette="graphite"],
:root[data-theme="dark"][data-palette="graphite"] {
  color-scheme: dark;
  --bg: #0c0e12;
  --surface: #15171b;
  --surface2: #1e2125;
  --sunk: #07090d;
  --line: #2b2e32;
  --line-strong: #62656a;
  --text: #eff0f2;
  --text2: #b4b8bd;
  --text3: #95989e;
  --accent: #b5ea26;
  --accent-ink: #131809;
  --accent-hover: #a7d91d;
  --accent-soft: #27330e;
  --accent-edge: #b5ea26;
  --accent-text: #a6cf51;
  --viz: #b2e240;
  --focus: #b6ea3a;
  --good: #5dc47e;
  --good-soft: #12361e;
  --good-text: #6ad18a;
  --bad: #ff7e77;
  --bad-soft: #47211e;
  --bad-text: #ff958e;
  --warn: #d7a03d;
  --warn-soft: #3e2903;
  --warn-text: #e8ab3e;
  --ord-1: #4a6203;
  --ord-2: #5a7803;
  --ord-3: #6c8e03;
  --ord-4: #7ea602;
  --ord-5: #93bc2d;
  --ord-6: #a8d349;
}

:root[data-theme="dark"], :root[data-theme="dark"] [data-palette] {
  --st-saved-bg: #2b2e33; --st-saved-fg: #b6becb; --st-saved-dot: #a4abb8;
  --st-applied-bg: #2e284a; --st-applied-fg: #bcb2ff; --st-applied-dot: #aa99ff;
  --st-replied-bg: #392c01; --st-replied-fg: #e1b942; --st-replied-dot: #cda629;
  --st-screening-bg: #44250c; --st-screening-fg: #ffa666; --st-screening-dot: #f28e42;
  --st-interview-bg: #442032; --st-interview-fg: #ff98ca; --st-interview-dot: #f47db9;
  --st-offer-bg: #203414; --st-offer-fg: #8cd55e; --st-offer-dot: #79c24a;
  --st-accepted-bg: #0a3723; --st-accepted-fg: #52db9c; --st-accepted-dot: #38c789;
  --st-accepted-solid-bg: #099864; --st-accepted-solid-fg: #101010;
  --st-rejected-bg: #47211e; --st-rejected-fg: #ffa098; --st-rejected-dot: #ff7e77;
  --st-ghosted-bg: #322d27; --st-ghosted-fg: #c9bbad; --st-ghosted-dot: #b5a89a;
  --st-withdrawn-bg: #302c34; --st-withdrawn-fg: #c4b9cd; --st-withdrawn-dot: #b1a6b9;
}
