:root[data-palette="navy"] { --brand-from: #2f5f93; --brand-to: #1b3557; }
:root[data-palette="navy"][data-mode="light"] {
    --bg: #f3f5f8;
    --surface-2: #f8f9fb;
    --ink: #18202b;
    --ink-2: #4a5361;
    --ink-3: #858c97;
    --line: #dfe3ea;
    --line-strong: #c6ccd6;
    --accent: #1f3f66;
    --accent-hover: #172f4d;
    --accent-soft: #e8eef6;
    --accent-line: #bccbe0;
    --page-glow: #e9eff7;
    --duty-bg: #eef3f9;
    --muted-tile: #eff3f8;
    --today-bg: #f9fafc;
    --grid-half: #eceff4;
}
:root[data-palette="navy"][data-mode="dark"] {
    --bg: #10151c;
    --surface: #161d27;
    --surface-2: #1b2430;
    --ink: #e3e9f1;
    --ink-2: #b2bdcb;
    --ink-3: #848f9e;
    --line: #273140;
    --line-strong: #364254;
    --accent: #3a6ea8;
    --accent-hover: #4a82bf;
    --accent-soft: #1c2c40;
    --accent-line: #2c4566;
    --link: #8db8e8;
    --link-hover: #aacdf2;
    --page-glow: #131c28;
    --duty-bg: #182536;
    --muted-tile: #1b2430;
    --today-bg: #18212c;
    --grid-half: #1c2430;
}

:root[data-palette="saddle"] { --brand-from: #8a5634; --brand-to: #4f2e1b; }
:root[data-palette="saddle"][data-mode="light"] {
    --bg: #f6f2ec;
    --surface-2: #fbf8f4;
    --ink: #231b16;
    --ink-2: #55493f;
    --ink-3: #8e847b;
    --line: #e6ddd2;
    --line-strong: #d0c3b3;
    --accent: #6b3f22;
    --accent-hover: #54301a;
    --accent-soft: #f4ebe3;
    --accent-line: #dcc5b3;
    --page-glow: #f3eadf;
    --duty-bg: #f6efe7;
    --muted-tile: #f5eee6;
    --today-bg: #fcf9f4;
    --grid-half: #f1ebe3;
}
:root[data-palette="saddle"][data-mode="dark"] {
    --bg: #17120e;
    --surface: #1f1914;
    --surface-2: #251e18;
    --ink: #efe7df;
    --ink-2: #c6b8aa;
    --ink-3: #978a7d;
    --line: #352b23;
    --line-strong: #463a2f;
    --accent: #a0613a;
    --accent-hover: #b5744b;
    --accent-soft: #3a2a1e;
    --accent-line: #5e4330;
    --link: #e0a77c;
    --link-hover: #ecbf9c;
    --page-glow: #1e1710;
    --duty-bg: #2a2018;
    --muted-tile: #261f19;
    --today-bg: #221b15;
    --grid-half: #261f18;
}

:root[data-palette="burgundy"] { --brand-from: #8c3049; --brand-to: #4e1826; }
:root[data-palette="burgundy"][data-mode="light"] {
    --bg: #f6f3f3;
    --surface-2: #fbf9f9;
    --ink: #22191c;
    --ink-2: #54474b;
    --ink-3: #8d8286;
    --line: #e7dfe0;
    --line-strong: #d2c6c8;
    --accent: #6e2438;
    --accent-hover: #561b2b;
    --accent-soft: #f5e9ec;
    --accent-line: #dfc0c8;
    --page-glow: #f4e9eb;
    --duty-bg: #f7eff1;
    --muted-tile: #f6eef0;
    --today-bg: #fcf9f9;
    --grid-half: #f1eaeb;
}
:root[data-palette="burgundy"][data-mode="dark"] {
    --bg: #171113;
    --surface: #1f171a;
    --surface-2: #261c20;
    --ink: #eee4e7;
    --ink-2: #c4b3b8;
    --ink-3: #958489;
    --line: #36282d;
    --line-strong: #47353b;
    --accent: #a33d58;
    --accent-hover: #b9506c;
    --accent-soft: #3a1f28;
    --accent-line: #5f3341;
    --link: #e892a8;
    --link-hover: #f0b0c0;
    --page-glow: #1e1418;
    --duty-bg: #2a1b21;
    --muted-tile: #261c20;
    --today-bg: #22181c;
    --grid-half: #261b20;
}

:root[data-palette="teal"] { --brand-from: #237782; --brand-to: #123f45; }
:root[data-palette="teal"][data-mode="light"] {
    --bg: #f2f5f5;
    --surface-2: #f8fafa;
    --ink: #162022;
    --ink-2: #455355;
    --ink-3: #828d8e;
    --line: #dde4e4;
    --line-strong: #c4cfcf;
    --accent: #165a63;
    --accent-hover: #10454c;
    --accent-soft: #e4f0f1;
    --accent-line: #b3d2d5;
    --page-glow: #e6f1f1;
    --duty-bg: #edf5f5;
    --muted-tile: #eef4f4;
    --today-bg: #f8fbfb;
    --grid-half: #ebf0f0;
}
:root[data-palette="teal"][data-mode="dark"] {
    --bg: #0f1617;
    --surface: #151e20;
    --surface-2: #1a2527;
    --ink: #e2ecec;
    --ink-2: #b0c1c2;
    --ink-3: #839495;
    --line: #263335;
    --line-strong: #344446;
    --accent: #237f8a;
    --accent-hover: #2e94a0;
    --accent-soft: #173438;
    --accent-line: #285257;
    --link: #79c9d1;
    --link-hover: #9bd8de;
    --page-glow: #122023;
    --duty-bg: #172a2d;
    --muted-tile: #1a2527;
    --today-bg: #172124;
    --grid-half: #1a2527;
}

:root[data-palette="slate"] { --brand-from: #4a5866; --brand-to: #232b33; }
:root[data-palette="slate"][data-mode="light"] {
    --bg: #f4f4f5;
    --surface-2: #f9f9fa;
    --ink: #1b1e22;
    --ink-2: #4b5058;
    --ink-3: #878b92;
    --line: #e3e4e7;
    --line-strong: #cbcdd2;
    --accent: #2f3a45;
    --accent-hover: #222b34;
    --accent-soft: #eceef1;
    --accent-line: #c9ced5;
    --page-glow: #eeeff1;
    --duty-bg: #f1f2f4;
    --muted-tile: #f1f2f4;
    --today-bg: #fafafb;
    --grid-half: #eeeff1;
}
:root[data-palette="slate"][data-mode="dark"] {
    --bg: #121315;
    --surface: #1a1c1f;
    --surface-2: #202226;
    --ink: #e6e8eb;
    --ink-2: #b8bcc3;
    --ink-3: #8a8f97;
    --line: #2d3035;
    --line-strong: #3c4047;
    --accent: #5a6878;
    --accent-hover: #6b7a8b;
    --accent-soft: #262b31;
    --accent-line: #3f4750;
    --link: #aab8c7;
    --link-hover: #c4cfdb;
    --page-glow: #16181b;
    --duty-bg: #1f2226;
    --muted-tile: #202226;
    --today-bg: #1c1e21;
    --grid-half: #202226;
}

.palette[data-palette-set="forest"] { --swatch-from: #2b6a50; --swatch-to: #1b4232; }
.palette[data-palette-set="navy"] { --swatch-from: #2f5f93; --swatch-to: #1b3557; }
.palette[data-palette-set="saddle"] { --swatch-from: #8a5634; --swatch-to: #4f2e1b; }
.palette[data-palette-set="burgundy"] { --swatch-from: #8c3049; --swatch-to: #4e1826; }
.palette[data-palette-set="teal"] { --swatch-from: #237782; --swatch-to: #123f45; }
.palette[data-palette-set="slate"] { --swatch-from: #4a5866; --swatch-to: #232b33; }
