/* Themes: every colour in the UI comes from these variables (see docs/ARCHITECTURE.md › Design tokens).
   Add a theme = add a block defining every variable below + an entry in app/theme.js (SWATCHES) and domain/settings.js.

   Surfaces   --bg (window) · --surface (cards, inspector) · --surface-2 (inputs, chips) · --surface-3 (hover)
   Text       --text · --text-2 (secondary) · --muted (tertiary)
   Lines      --line (hairlines) · --line-strong (control borders)
   Accent     --accent · --accent-ink (accent used AS TEXT, AA on --bg) · --accent-text (text ON accent) · --accent-soft (tint)
   Selection  --sel (selected row) · --sel-line (keyboard cursor)
   Semantics  --danger (overdue) · --warn (today) · --soon · --flag · --ok
   Chrome     --sidebar-bg (translucent) · --bar-bg (toolbar/tab bar) · --chip-bg · --focus-ring · --scrim
   Elevation  --e-1 (rest) · --e-2 (raised: cards, popovers) · --e-3 (overlays: dialogs, toasts) · --shadow (legacy alias)
   Type       --font-display (view titles) */

:root, [data-theme="light"] {
  --bg: #f7f6f3; --surface: #ffffff; --surface-2: #f1f0ec; --surface-3: #ebeae5;
  --text: #1c1d21; --text-2: #4b4d55; --muted: #8b8d95; --line: #e7e5e0; --line-strong: #d8d6d0;
  --accent: #3d63dd; --accent-ink: #3358cc; --accent-text: #ffffff; --accent-soft: rgba(61, 99, 221, .10);
  --sel: rgba(61, 99, 221, .095); --sel-line: rgba(61, 99, 221, .45);
  --danger: #d4423a; --warn: #c27410; --soon: #b0802a; --flag: #e46f1b; --ok: #2f9a5c;
  --sidebar-bg: rgba(242, 241, 237, .82); --bar-bg: rgba(247, 246, 243, .82); --chip-bg: rgba(28, 29, 33, .055);
  --focus-ring: rgba(61, 99, 221, .55); --scrim: rgba(20, 22, 28, .28);
  --e-1: 0 1px 2px rgba(20, 22, 30, .05), 0 0 0 1px rgba(20, 22, 30, .04);
  --e-2: 0 2px 6px rgba(20, 22, 30, .05), 0 8px 24px rgba(20, 22, 30, .07), 0 0 0 1px rgba(20, 22, 30, .045);
  --e-3: 0 10px 30px rgba(20, 22, 30, .12), 0 30px 80px rgba(20, 22, 30, .14), 0 0 0 1px rgba(20, 22, 30, .06);
  --shadow: var(--e-2);
  --font-display: var(--font);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #111215; --surface: #17181c; --surface-2: #1e2025; --surface-3: #25272d;
  --text: #ececf0; --text-2: #b4b6bf; --muted: #7d808b; --line: #25272c; --line-strong: #33363d;
  --accent: #8090ff; --accent-ink: #9aa6ff; --accent-text: #0c0e1a; --accent-soft: rgba(128, 144, 255, .14);
  --sel: rgba(128, 144, 255, .13); --sel-line: rgba(128, 144, 255, .5);
  --danger: #ff6f66; --warn: #f2b84f; --soon: #d9b56a; --flag: #ff9a45; --ok: #4fc58c;
  --sidebar-bg: rgba(21, 22, 26, .78); --bar-bg: rgba(17, 18, 21, .8); --chip-bg: rgba(255, 255, 255, .065);
  --focus-ring: rgba(128, 144, 255, .65); --scrim: rgba(0, 0, 0, .55);
  --e-1: 0 1px 2px rgba(0, 0, 0, .3), 0 0 0 1px rgba(255, 255, 255, .04);
  --e-2: 0 4px 12px rgba(0, 0, 0, .35), 0 12px 32px rgba(0, 0, 0, .3), 0 0 0 1px rgba(255, 255, 255, .06);
  --e-3: 0 16px 40px rgba(0, 0, 0, .5), 0 40px 100px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .08);
  --shadow: var(--e-2);
  --font-display: var(--font);
  color-scheme: dark;
}
/* Champagne gold: warm ivory paper, antique-gold ink, serif display titles. */
[data-theme="gold"] {
  --bg: #f8f4ea; --surface: #fffdf8; --surface-2: #f3ede0; --surface-3: #ece4d2;
  --text: #2a2316; --text-2: #5a4e37; --muted: #988b6f; --line: #e9e0cc; --line-strong: #dccfb3;
  --accent: #b08a3a; --accent-ink: #8a6a24; --accent-text: #ffffff; --accent-soft: rgba(176, 138, 58, .14);
  --sel: rgba(176, 138, 58, .13); --sel-line: rgba(176, 138, 58, .55);
  --danger: #b5432f; --warn: #a86a12; --soon: #9a7a2e; --flag: #c46c1c; --ok: #5f8a3a;
  --sidebar-bg: rgba(243, 236, 221, .84); --bar-bg: rgba(248, 244, 234, .84); --chip-bg: rgba(120, 90, 30, .08);
  --focus-ring: rgba(176, 138, 58, .6); --scrim: rgba(40, 30, 10, .3);
  --e-1: 0 1px 2px rgba(90, 65, 20, .06), 0 0 0 1px rgba(90, 65, 20, .05);
  --e-2: 0 2px 6px rgba(90, 65, 20, .06), 0 10px 28px rgba(90, 65, 20, .09), 0 0 0 1px rgba(120, 90, 30, .07);
  --e-3: 0 12px 32px rgba(70, 50, 15, .14), 0 32px 80px rgba(70, 50, 15, .16), 0 0 0 1px rgba(120, 90, 30, .1);
  --shadow: var(--e-2);
  --font-display: "Iowan Old Style", "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  color-scheme: light;
}
[data-theme="orange"] {
  --bg: #fbf7f2; --surface: #ffffff; --surface-2: #f6efe7; --surface-3: #f0e6da;
  --text: #2a1c12; --text-2: #5d4637; --muted: #9a8170; --line: #efe3d6; --line-strong: #e3d3c2;
  --accent: #e2621d; --accent-ink: #c2500f; --accent-text: #ffffff; --accent-soft: rgba(226, 98, 29, .11);
  --sel: rgba(226, 98, 29, .1); --sel-line: rgba(226, 98, 29, .5);
  --danger: #cc3a2c; --warn: #c06410; --soon: #a8742a; --flag: #f07216; --ok: #2f8a4a;
  --sidebar-bg: rgba(246, 239, 231, .84); --bar-bg: rgba(251, 247, 242, .84); --chip-bg: rgba(120, 60, 20, .065);
  --focus-ring: rgba(226, 98, 29, .55); --scrim: rgba(40, 20, 5, .3);
  --e-1: 0 1px 2px rgba(110, 50, 10, .05), 0 0 0 1px rgba(110, 50, 10, .045);
  --e-2: 0 2px 6px rgba(110, 50, 10, .05), 0 8px 24px rgba(110, 50, 10, .08), 0 0 0 1px rgba(110, 50, 10, .05);
  --e-3: 0 10px 30px rgba(90, 40, 5, .13), 0 30px 80px rgba(90, 40, 5, .14), 0 0 0 1px rgba(110, 50, 10, .07);
  --shadow: var(--e-2);
  --font-display: var(--font);
  color-scheme: light;
}
/* Red-black: lacquer black, crimson accent, warm gold secondary, serif display titles. */
[data-theme="red-black"] {
  --bg: #09090a; --surface: #111113; --surface-2: #18181b; --surface-3: #202024;
  --text: #f4f1ec; --text-2: #c4bfb8; --muted: #86817b; --line: #212124; --line-strong: #2e2e33;
  --accent: #d93a3f; --accent-ink: #ff6066; --accent-text: #ffffff; --accent-soft: rgba(217, 58, 63, .16);
  --sel: rgba(217, 58, 63, .14); --sel-line: rgba(217, 58, 63, .6);
  --danger: #ff5b55; --warn: #e3ac55; --soon: #cfa565; --flag: #ff7a45; --ok: #7ccf98;
  --sidebar-bg: rgba(15, 15, 17, .8); --bar-bg: rgba(9, 9, 10, .82); --chip-bg: rgba(255, 255, 255, .06);
  --focus-ring: rgba(217, 58, 63, .7); --scrim: rgba(0, 0, 0, .62);
  --e-1: 0 1px 2px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .035);
  --e-2: 0 4px 14px rgba(0, 0, 0, .5), 0 14px 36px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .055);
  --e-3: 0 18px 44px rgba(0, 0, 0, .65), 0 44px 110px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .07);
  --shadow: var(--e-2);
  --font-display: "Iowan Old Style", "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  color-scheme: dark;
}
[data-theme="forest"] {
  --bg: #f2f5f1; --surface: #fbfcfa; --surface-2: #e9eee6; --surface-3: #e1e8dd;
  --text: #19261c; --text-2: #445448; --muted: #7a8a7d; --line: #dde5d9; --line-strong: #cdd8c8;
  --accent: #2f7d4f; --accent-ink: #276c43; --accent-text: #ffffff; --accent-soft: rgba(47, 125, 79, .12);
  --sel: rgba(47, 125, 79, .11); --sel-line: rgba(47, 125, 79, .5);
  --danger: #c23b2e; --warn: #b26e12; --soon: #9a7a2e; --flag: #d4661a; --ok: #2f7d4f;
  --sidebar-bg: rgba(233, 239, 230, .84); --bar-bg: rgba(242, 245, 241, .84); --chip-bg: rgba(20, 60, 30, .065);
  --focus-ring: rgba(47, 125, 79, .55); --scrim: rgba(10, 30, 15, .3);
  --e-1: 0 1px 2px rgba(15, 45, 20, .05), 0 0 0 1px rgba(15, 45, 20, .045);
  --e-2: 0 2px 6px rgba(15, 45, 20, .05), 0 8px 24px rgba(15, 45, 20, .08), 0 0 0 1px rgba(15, 45, 20, .05);
  --e-3: 0 10px 30px rgba(10, 35, 15, .13), 0 30px 80px rgba(10, 35, 15, .14), 0 0 0 1px rgba(15, 45, 20, .07);
  --shadow: var(--e-2);
  --font-display: var(--font);
  color-scheme: light;
}
[data-theme="ocean"] {
  --bg: #f2f6fa; --surface: #ffffff; --surface-2: #e9f0f6; --surface-3: #e0e9f2;
  --text: #13202d; --text-2: #3f5266; --muted: #75889b; --line: #dde6ef; --line-strong: #cdd9e5;
  --accent: #2468d1; --accent-ink: #1f5bb8; --accent-text: #ffffff; --accent-soft: rgba(36, 104, 209, .1);
  --sel: rgba(36, 104, 209, .095); --sel-line: rgba(36, 104, 209, .5);
  --danger: #cf3b3b; --warn: #c06a0e; --soon: #a8792e; --flag: #ec7016; --ok: #2b8a52;
  --sidebar-bg: rgba(233, 240, 246, .84); --bar-bg: rgba(242, 246, 250, .84); --chip-bg: rgba(15, 50, 90, .06);
  --focus-ring: rgba(36, 104, 209, .55); --scrim: rgba(5, 20, 40, .3);
  --e-1: 0 1px 2px rgba(10, 35, 70, .05), 0 0 0 1px rgba(10, 35, 70, .045);
  --e-2: 0 2px 6px rgba(10, 35, 70, .05), 0 8px 24px rgba(10, 35, 70, .08), 0 0 0 1px rgba(10, 35, 70, .05);
  --e-3: 0 10px 30px rgba(5, 25, 55, .13), 0 30px 80px rgba(5, 25, 55, .14), 0 0 0 1px rgba(10, 35, 70, .07);
  --shadow: var(--e-2);
  --font-display: var(--font);
  color-scheme: light;
}
[data-theme="sepia"] {
  --bg: #f4eddd; --surface: #fbf6ea; --surface-2: #ede4cf; --surface-3: #e6dbc2;
  --text: #392d1f; --text-2: #5f4f3b; --muted: #8f7d64; --line: #e3d6ba; --line-strong: #d6c6a5;
  --accent: #8d5c2c; --accent-ink: #7c4f24; --accent-text: #ffffff; --accent-soft: rgba(141, 92, 44, .13);
  --sel: rgba(141, 92, 44, .12); --sel-line: rgba(141, 92, 44, .55);
  --danger: #a93c2c; --warn: #9a6114; --soon: #8a6d32; --flag: #b8601f; --ok: #5a7a2e;
  --sidebar-bg: rgba(237, 228, 207, .86); --bar-bg: rgba(244, 237, 221, .86); --chip-bg: rgba(90, 60, 20, .07);
  --focus-ring: rgba(141, 92, 44, .55); --scrim: rgba(40, 28, 10, .32);
  --e-1: 0 1px 2px rgba(70, 45, 15, .06), 0 0 0 1px rgba(70, 45, 15, .05);
  --e-2: 0 2px 6px rgba(70, 45, 15, .06), 0 8px 24px rgba(70, 45, 15, .09), 0 0 0 1px rgba(70, 45, 15, .06);
  --e-3: 0 10px 30px rgba(60, 40, 10, .14), 0 30px 80px rgba(60, 40, 10, .15), 0 0 0 1px rgba(70, 45, 15, .08);
  --shadow: var(--e-2);
  --font-display: "Iowan Old Style", "Songti SC", "STSong", Georgia, serif;
  color-scheme: light;
}
[data-theme="high-contrast"] {
  --bg: #000000; --surface: #000000; --surface-2: #141414; --surface-3: #262626;
  --text: #ffffff; --text-2: #f0f0f0; --muted: #d4d4d4; --line: #8a8a8a; --line-strong: #ffffff;
  --accent: #ffd400; --accent-ink: #ffd400; --accent-text: #000000; --accent-soft: rgba(255, 212, 0, .2);
  --sel: #2b2b00; --sel-line: #ffd400;
  --danger: #ff6b6b; --warn: #ffd400; --soon: #ffe45c; --flag: #ff9d1a; --ok: #3dff9a;
  --sidebar-bg: #000000; --bar-bg: #000000; --chip-bg: #1f1f1f;
  --focus-ring: #ffd400; --scrim: rgba(0, 0, 0, .8);
  --e-1: 0 0 0 1px #8a8a8a; --e-2: 0 0 0 1px #ffffff; --e-3: 0 0 0 2px #ffffff;
  --shadow: var(--e-2);
  --font-display: var(--font);
  color-scheme: dark;
}
