/* Six colour themes, all built from the kalemriah.com palette:
   green #6dbf76 / #5da963 · teal #007177 / #005a5f · slate #4b6472 / #2d3e47
   navy #1b2b34 · charcoal #2c2c2c · greys #999999 / #b9b6b6 · red #d32f2f (errors only)

   Result colours: --g first try · --y second try · --o third+ try · --x missed.
   --g2 primary buttons (white text on it) · --acc-t accent TEXT on --bg · --bad error borders.
   Mode colours (--m-*) run the palette as a gradient across the home-screen cards. */

:root {
  --font-ui: 'Libre Franklin', system-ui, sans-serif;
  --font-display: 'Zilla Slab', Georgia, serif;
  --font-num: var(--font-ui);
  --m-fs: #6dbf76; --m-bd: #5da963; --m-fit: #007177; --m-wire: #005a5f; --m-quiz: #4b6472;
  --bad: #d32f2f;
}

:root,
[data-skin="kr-dark"] {
  color-scheme: dark;
  --bg: #1b2b34; --soft: #22343e; --seg: #2d3e47; --line: #3b4f5a;
  --key: #3a4f5a; --keyon: #4b6472; --ink: #eef3f5; --mute: #a5b8c1;
  --g: #5da963; --g2: #007177; --g3: #005a5f; --y: #007177; --o: #4b6472; --x: #2c2c2c;
  --warn: #f08a8a; --acc-t: #6dbf76;
}

[data-skin="kr-light"] {
  color-scheme: light;
  --bg: #eceae8; --soft: #ffffff; --seg: #dcd9d7; --line: #c9c5c3;
  --key: #d5d1cf; --keyon: #b9b6b6; --ink: #1b2b34; --mute: #4b6472;
  --g: #5da963; --g2: #007177; --g3: #005a5f; --y: #007177; --o: #4b6472; --x: #999999;
  --warn: #b71c1c; --acc-t: #005a5f;
}

[data-skin="paper"] {
  color-scheme: light;
  --bg: #ffffff; --soft: #f4f5f6; --seg: #e9eaec; --line: #d3d6da;
  --key: #d3d6da; --keyon: #b9b6b6; --ink: #1b2b34; --mute: #4b6472;
  --g: #5da963; --g2: #007177; --g3: #005a5f; --y: #007177; --o: #4b6472; --x: #999999;
  --warn: #b71c1c; --acc-t: #005a5f;
}

[data-skin="midnight"] {
  color-scheme: dark;
  --bg: #2c2c2c; --soft: #343434; --seg: #3d3d3d; --line: #4a4a4a;
  --key: #4a4a4a; --keyon: #5e5e5e; --ink: #f2f2f2; --mute: #b9b6b6;
  --g: #5da963; --g2: #007177; --g3: #005a5f; --y: #007177; --o: #4b6472; --x: #1b2b34;
  --warn: #f08a8a; --acc-t: #6dbf76;
}

[data-skin="terminal"] {
  color-scheme: dark;
  --font-ui: ui-monospace, 'Lucida Console', 'Courier New', monospace;
  --font-display: ui-monospace, 'Lucida Console', 'Courier New', monospace;
  --bg: #111a1f; --soft: #162229; --seg: #1b2b34; --line: #2d3e47;
  --key: #1b2b34; --keyon: #2d3e47; --ink: #6dbf76; --mute: #5da963;
  --g: #5da963; --g2: #007177; --g3: #005a5f; --y: #007177; --o: #4b6472; --x: #2c2c2c;
  --warn: #f08a8a; --acc-t: #6dbf76;
}

/* High contrast keeps stronger separation between result colours for readability. */
[data-skin="contrast"] {
  color-scheme: dark;
  --bg: #000000; --soft: #111111; --seg: #262626; --line: #999999;
  --key: #333333; --keyon: #555555; --ink: #ffffff; --mute: #dddddd;
  --g: #6dbf76; --g2: #007177; --g3: #005a5f; --y: #2f8fd0; --o: #b9b6b6; --x: #4a4a4a;
  --warn: #ff8a80; --acc-t: #6dbf76; --bad: #ff5252;
}

/* Font options (Settings). They override the theme's fonts, including Terminal's. */
:root { --mono: 'JetBrains Mono', ui-monospace, 'Lucida Console', 'Courier New', monospace; }
[data-skin="terminal"] { --font-num: var(--font-ui); }
html[data-font="mono-num"] { --font-num: var(--mono); }
html[data-font="mono"] { --font-ui: var(--mono); --font-display: var(--mono); --font-num: var(--mono); }
html[data-font="system"] { --font-ui: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; --font-display: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; --font-num: var(--font-ui); }
html[data-font="default"] { --font-ui: 'Libre Franklin', system-ui, sans-serif; --font-display: 'Zilla Slab', Georgia, serif; --font-num: var(--font-ui); }
