/* Terp-Assist's look: the one copy of its design tokens (palette "Harbour" in five themes, type
   scale, radius, motion). Terp loads it (index.html, booth.html) and so does the bundled
   Glossarizer (glossary.html, via Terp at /look/tokens.css), so a theme, accent, text size or
   font picked anywhere in Terp is the same everywhere. The pick itself is set on <html> as
   data-theme and --accent-h / --scale / --font (store.svelte.js applyLook; Glossarizer's
   shared/core.js initTheme). Served as a plain file, never bundled: edit it here only. */

:root {
  --accent-h: 190;
  --scale: 1;
  --font: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 10px;
  --radius-sm: 6px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: 150ms;
  --t: 220ms;
  --fs-xs: calc(12.5px * var(--scale));
  --fs-sm: calc(14px * var(--scale));
  --fs: calc(16px * var(--scale));
  --fs-md: calc(17.5px * var(--scale));
  --fs-lg: calc(21px * var(--scale));
  --fs-xl: calc(28px * var(--scale));
  --fs-read: calc(19px * var(--scale));
}

/* Light (default when the OS is light, or chosen) */
:root, :root[data-theme='light'] {
  --bg: oklch(98.4% .004 230); --bg2: oklch(96% .007 235); --panel: oklch(100% 0 0); --line: oklch(89% .01 240);
  --fg: oklch(21% .02 250); --fg2: oklch(33% .02 250); --muted: oklch(47% .02 245);
  --accent: oklch(47% .1 calc(var(--accent-h) + 10)); --accent-fill: oklch(50% .1 calc(var(--accent-h) + 8));
  --on-accent: oklch(99% .005 calc(var(--accent-h) + 10)); --accent-soft: oklch(95% .03 var(--accent-h));
  --good: oklch(47% .12 150); --bad: oklch(52% .19 27); --warn: oklch(52% .11 70);
  --good-soft: oklch(95% .04 150); --bad-soft: oklch(95% .03 27); --warn-soft: oklch(96% .05 85);
  --hl: oklch(86% .1 var(--accent-h) / .55); --hl-line: oklch(55% .11 calc(var(--accent-h) + 5));
  --row-hover: oklch(96.5% .008 235); --shadow: oklch(20% .03 250 / .12);
  --lamp: oklch(80% .15 80); --term-line: oklch(55% .12 255);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: oklch(17.5% .012 245); --bg2: oklch(20.5% .014 245); --panel: oklch(23% .016 245); --line: oklch(31% .018 245);
    --fg: oklch(94% .008 230); --fg2: oklch(83% .012 235); --muted: oklch(72% .016 240);
    --accent: oklch(82% .11 var(--accent-h)); --accent-fill: oklch(80% .12 calc(var(--accent-h) - 2));
    --on-accent: oklch(19% .03 calc(var(--accent-h) + 10)); --accent-soft: oklch(28% .04 var(--accent-h));
    --good: oklch(78% .13 150); --bad: oklch(72% .16 27); --warn: oklch(82% .13 80);
    --good-soft: oklch(28% .04 150); --bad-soft: oklch(28% .05 27); --warn-soft: oklch(29% .04 80);
    --hl: oklch(78% .12 var(--accent-h) / .26); --hl-line: oklch(80% .12 calc(var(--accent-h) - 2));
    --row-hover: oklch(21.5% .015 245); --shadow: oklch(0% 0 0 / .45);
    --lamp: oklch(80% .15 80); --term-line: oklch(76% .09 255);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: oklch(17.5% .012 245); --bg2: oklch(20.5% .014 245); --panel: oklch(23% .016 245); --line: oklch(31% .018 245);
  --fg: oklch(94% .008 230); --fg2: oklch(83% .012 235); --muted: oklch(72% .016 240);
  --accent: oklch(82% .11 var(--accent-h)); --accent-fill: oklch(80% .12 calc(var(--accent-h) - 2));
  --on-accent: oklch(19% .03 calc(var(--accent-h) + 10)); --accent-soft: oklch(28% .04 var(--accent-h));
  --good: oklch(78% .13 150); --bad: oklch(72% .16 27); --warn: oklch(82% .13 80);
  --good-soft: oklch(28% .04 150); --bad-soft: oklch(28% .05 27); --warn-soft: oklch(29% .04 80);
  --hl: oklch(78% .12 var(--accent-h) / .26); --hl-line: oklch(80% .12 calc(var(--accent-h) - 2));
  --row-hover: oklch(21.5% .015 245); --shadow: oklch(0% 0 0 / .45);
  --lamp: oklch(80% .15 80); --term-line: oklch(76% .09 255);
  color-scheme: dark;
}
/* Paper: warm, low-glare light */
:root[data-theme='paper'] {
  --bg: oklch(97% .012 85); --bg2: oklch(94.5% .015 85); --panel: oklch(99% .006 85); --line: oklch(87% .02 80);
  --fg: oklch(24% .02 60); --fg2: oklch(34% .02 60); --muted: oklch(48% .02 60);
  --accent: oklch(47% .1 calc(var(--accent-h) + 10)); --accent-fill: oklch(50% .1 calc(var(--accent-h) + 8));
  --on-accent: oklch(99% .005 90); --accent-soft: oklch(93% .03 var(--accent-h));
  --good: oklch(46% .12 150); --bad: oklch(52% .19 27); --warn: oklch(50% .11 70);
  --good-soft: oklch(94% .04 150); --bad-soft: oklch(94% .03 27); --warn-soft: oklch(94% .05 85);
  --hl: oklch(86% .1 var(--accent-h) / .5); --hl-line: oklch(55% .11 calc(var(--accent-h) + 5));
  --row-hover: oklch(95% .014 85); --shadow: oklch(30% .03 60 / .12);
  --lamp: oklch(78% .15 75); --term-line: oklch(52% .12 255);
  color-scheme: light;
}
/* Night booth: graphite, dim, for a dark booth */
:root[data-theme='night'] {
  --bg: oklch(21% .004 250); --bg2: oklch(23.5% .005 250); --panel: oklch(26% .006 250); --line: oklch(33% .008 250);
  --fg: oklch(88% .01 80); --fg2: oklch(80% .01 80); --muted: oklch(68% .01 80);
  --accent: oklch(80% .12 80); --accent-fill: oklch(78% .13 80); --on-accent: oklch(20% .03 80); --accent-soft: oklch(30% .04 80);
  --good: oklch(78% .13 150); --bad: oklch(72% .16 27); --warn: oklch(82% .13 80);
  --good-soft: oklch(30% .04 150); --bad-soft: oklch(30% .05 27); --warn-soft: oklch(31% .04 80);
  --hl: oklch(78% .12 80 / .24); --hl-line: oklch(80% .12 80);
  --row-hover: oklch(24.5% .005 250); --shadow: oklch(0% 0 0 / .5);
  --lamp: oklch(80% .15 80); --term-line: oklch(76% .09 255);
  color-scheme: dark;
}
/* High contrast */
:root[data-theme='contrast'] {
  --bg: #fff; --bg2: #f2f2f2; --panel: #fff; --line: #000;
  --fg: #000; --fg2: #000; --muted: #2b2b2b;
  --accent: #003d99; --accent-fill: #003d99; --on-accent: #fff; --accent-soft: #e3ecff;
  --good: #005a1e; --bad: #a00000; --warn: #6b4400;
  --good-soft: #e3f6e8; --bad-soft: #ffe5e5; --warn-soft: #fff1d6;
  --hl: #ffe066; --hl-line: #000; --row-hover: #f2f2f2; --shadow: #0003;
  --lamp: #ffb300; --term-line: #003d99;
  color-scheme: light;
}
