/* Extra color themes. Each one sets the same tokens as tokens.css, so every page picks them up.
   Light themes keep a dark sidebar (white text on it), dark themes keep their own accent.
   Text and accent contrast of every theme was checked (body text 9:1 or better, muted text 4.5:1 or better). */

html[data-palette="ocean"]:not([data-theme="dark"]) {
  --page: #d6e8ee; --surface: #ffffff; --surface-2: #f1f8fa; --surface-3: #e2f0f4;
  --line: #a9cbd6; --line-soft: #e4eff3; --hover: #e3f3f7;
  --ink: #0b3440; --ink-2: #38586a; --ink-3: #51707d; --ink-4: #5f7c88;
  --chip-on: #d0ecf3; --chip-on-fg: #084657; --chip-on-line: #86c3d2;
  --flag-tint: #fdf2f1; --warm-tint: #fffaf0;
  --blue-700: #0a5568; --blue-600: #0b6b82; --blue-500: #0d7490; --blue-400: #2f9db8; --blue-300: #7ac5d8;
  --navy-800: #0e3d4a;
  --shadow-btn: 0 8px 20px rgba(13,116,144,0.32);
}

html[data-palette="sand"]:not([data-theme="dark"]) {
  --page: #ebe2d2; --surface: #fffdf8; --surface-2: #faf5ea; --surface-3: #f2ead9;
  --line: #d3c5ab; --line-soft: #f0e8d6; --hover: #f6edd9;
  --ink: #34251a; --ink-2: #5f4b37; --ink-3: #76614c; --ink-4: #8b7762;
  --chip-on: #f2dfc2; --chip-on-fg: #6a3209; --chip-on-line: #dbb987;
  --flag-tint: #fdf2f1; --warm-tint: #fff6e0;
  --blue-700: #7c2d0a; --blue-600: #9a3f0c; --blue-500: #b45309; --blue-400: #d97706; --blue-300: #eeaa5a;
  --navy-800: #44301f;
  --shadow-btn: 0 8px 20px rgba(180,83,9,0.32);
}

html[data-palette="mint"]:not([data-theme="dark"]) {
  --page: #d8eadf; --surface: #ffffff; --surface-2: #f2faf5; --surface-3: #e4f2ea;
  --line: #b0d2bf; --line-soft: #e6f2eb; --hover: #e2f3e9;
  --ink: #103a29; --ink-2: #3a5a49; --ink-3: #51705f; --ink-4: #617e6e;
  --chip-on: #d0eedd; --chip-on-fg: #0a5033; --chip-on-line: #8ccaa8;
  --flag-tint: #fdf2f1; --warm-tint: #fffaf0;
  --blue-700: #0b5a3a; --blue-600: #0f6b45; --blue-500: #15803d; --blue-400: #33a061; --blue-300: #7bc89a;
  --navy-800: #12402c;
  --shadow-btn: 0 8px 20px rgba(21,128,61,0.32);
}

html[data-theme="dark"][data-palette="midnight"] {
  --page: #090b0f; --surface: #12151b; --surface-2: #181c24; --surface-3: #20252f;
  --line: #2e3542; --line-soft: #1d222b; --hover: #1d2331;
  --ink: #eef1f6; --ink-2: #bcc4d2; --ink-3: #97a1b3; --ink-4: #8590a3;
  --chip-on: #1a2d4d; --chip-on-fg: #b8d0fb; --chip-on-line: #2e4e82;
  --flag-tint: #3a2429; --warm-tint: #2d2a1c;
  --blue-700: #1d4ed8; --blue-600: #2f6df0; --blue-500: #3578f0; --blue-400: #5b9bff; --blue-300: #93bbff;
  --navy-800: #111827;
  --shadow-btn: 0 8px 20px rgba(53,120,240,0.32);
}

html[data-theme="dark"][data-palette="forest"] {
  --page: #0b1410; --surface: #121e18; --surface-2: #18281f; --surface-3: #1f3429;
  --line: #2c4637; --line-soft: #1e3328; --hover: #1c3327;
  --ink: #e9f4ee; --ink-2: #b6ccbf; --ink-3: #8fa99b; --ink-4: #7f998b;
  --chip-on: #17402b; --chip-on-fg: #aee8c8; --chip-on-line: #2a6a47;
  --flag-tint: #3a2429; --warm-tint: #2d2a1c;
  --blue-700: #116b3a; --blue-600: #15803d; --blue-500: #1a9449; --blue-400: #3fbf79; --blue-300: #86dcae;
  --navy-800: #0f2418;
  --shadow-btn: 0 8px 20px rgba(26,148,73,0.32);
}

html[data-theme="dark"][data-palette="dusk"] {
  --page: #110f1b; --surface: #1a1728; --surface-2: #211d33; --surface-3: #2a2541;
  --line: #3b3559; --line-soft: #272238; --hover: #2a2545;
  --ink: #f1eefb; --ink-2: #c5bfe2; --ink-3: #9f98c3; --ink-4: #8d86b3;
  --chip-on: #35296b; --chip-on-fg: #d3caff; --chip-on-line: #5b49b3;
  --flag-tint: #3a2429; --warm-tint: #2d2a1c;
  --blue-700: #5b21b6; --blue-600: #8247f2; --blue-500: #9061f9; --blue-400: #a58bff; --blue-300: #c8b6ff;
  --navy-800: #1a1433;
  --shadow-btn: 0 8px 20px rgba(144,97,249,0.32);
}

/* theme picker in the settings popover */
.theme-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.theme-opt { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-family: var(--font-body); font-size: 12px; cursor: pointer; text-align: left; }
.theme-opt:hover { background: var(--hover); }
.theme-opt.is-on { border-color: var(--blue-500); box-shadow: 0 0 0 1px var(--blue-500) inset; font-weight: 700; }
.theme-swatch { flex: none; display: inline-flex; width: 30px; height: 20px; border-radius: 6px; overflow: hidden; border: 1px solid rgba(128,128,128,0.35); }
.theme-swatch i { flex: 1; display: block; }
