/* Chumbok design tokens (docs/web-redesign-plan.md §4.2; values from docs/web-redesign/mockups.html).
   Light values on :root, dark on [data-bs-theme="dark"] (set on <html> by theme.js before the page paints).
   Bootstrap 5.3 variables are mapped onto the tokens so its components follow the theme. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/inter-var-latin.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("fonts/manrope-var-latin.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap; src: url("fonts/jetbrains-mono-var-latin.woff2") format("woff2"); }

:root {
  /* colour */
  --c-bg: #f6f4f4;        --c-surface: #ffffff;   --c-sunk: #efecec;
  --c-ink: #262326;       --c-ink-2: #45403f;     --c-muted: #6b6567;    --c-line: #e4dedf;
  --c-accent: #c8102e;    --c-accent-btn: #c8102e; --c-on-accent: #ffffff;
  --c-accent-soft: #fbe9ec; --c-accent-line: #f2c9d0;
  --c-ok: #1d7a46;        --c-ok-btn: #1d7a46;    --c-ok-soft: #e2f2e8;
  --c-warn: #94570a;      --c-warn-soft: #faefd9;
  --c-bad: #b4261b;       --c-bad-soft: #fbe5e2;  --c-bad-line: #ebbab3;
  --c-info: #2459a8;      --c-info-soft: #e6eefa;
  --c-chart: #2a78d6;     /* the one chart series; validated against the surface (dataviz) */
  /* Overview (docs/overview-plan.md §9.3), validated with the dataviz validator against #ffffff / #1f1c1f:
     screenshot types = categorical slots 1-4 in their validated order (Comment, Share, Reaction, Post; worst adjacent
     CVD dE 11.8; three under 3:1 on light: legend + table + tooltips carry identity); age = one-hue ordinal ramp;
     heat = one-hue sequential ramp (h0 = none) */
  --c-ty1: #257de0; --c-ty2: #f47230; --c-ty3: #00b894; --c-ty4: #f2a600; --c-ty5: #a39a9d;
  --c-age1: #84b9f3; --c-age2: #519ced; --c-age3: #2370cd; --c-age4: #0f4a96;
  --c-h1: #cce3fd; --c-h2: #9dc8f7; --c-h3: #6aabf1; --c-h4: #338ced; --c-h5: #2370cd; --c-h6: #1757ac; --c-h7: #0f4a96;
  --c-side: #242124;      --c-side-ink: #efe9ea;  --c-side-muted: #9e9698; --c-side-active: #3a3537; --c-side-accent: #ff5a6e;
  --c-shadow: 0 1px 2px rgba(30, 20, 25, .05), 0 6px 20px -12px rgba(30, 20, 25, .18);

  /* type */
  --f-display: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --t-title: 1.625rem;    /* 26px page title */
  --t-section: 1rem;      /* 16px section heading */
  --t-body: .906rem;      /* 14.5px */
  --t-small: .8125rem;    /* 13px */

  /* shape and space */
  --r-sm: 8px; --r-md: 10px; --r-lg: 14px;
  --gap: 1rem;
  --side-w: 248px;
  --top-h: 62px;
  --tab-h: 64px;

  /* Bootstrap mapping */
  --bs-body-bg: var(--c-bg);
  --bs-body-color: var(--c-ink);
  --bs-emphasis-color: var(--c-ink);
  --bs-secondary-color: var(--c-muted);
  --bs-tertiary-bg: var(--c-sunk);
  --bs-secondary-bg: var(--c-sunk);
  --bs-border-color: var(--c-line);
  --bs-border-radius: var(--r-md);
  --bs-link-color: var(--c-accent);
  --bs-link-color-rgb: 200, 16, 46;
  --bs-link-hover-color: var(--c-accent);
  --bs-primary: var(--c-accent-btn);
  --bs-primary-rgb: 200, 16, 46;
  --bs-body-font-family: var(--f-body);
  --bs-body-font-size: var(--t-body);
  --bs-focus-ring-color: rgba(200, 16, 46, .3);
  color-scheme: light;
}

[data-bs-theme="dark"] {
  --c-bg: #161416;        --c-surface: #1f1c1f;   --c-sunk: #29252a;
  --c-ink: #eee8e9;       --c-ink-2: #d2cbcd;     --c-muted: #a49c9f;    --c-line: #353035;
  --c-accent: #ff6577;    --c-accent-btn: #e0283f; --c-on-accent: #ffffff;
  --c-accent-soft: #3a1d23; --c-accent-line: #5a2730;
  --c-ok: #62c992;        --c-ok-btn: #23864f;    --c-ok-soft: #183224;
  --c-warn: #eab159;      --c-warn-soft: #352811;
  --c-bad: #ff8577;       --c-bad-soft: #3b1f1b;  --c-bad-line: #6a2e27;
  --c-info: #8db2f2;      --c-info-soft: #1c2843;
  --c-chart: #3987e5;
  --c-ty1: #338ced; --c-ty2: #e76624; --c-ty3: #00a888; --c-ty4: #d28e05; --c-ty5: #6f676a;
  --c-age1: #1757ac; --c-age2: #2370cd; --c-age3: #519ced; --c-age4: #9dc8f7;
  --c-h1: #0e3d7e; --c-h2: #0f4a96; --c-h3: #1757ac; --c-h4: #2370cd; --c-h5: #338ced; --c-h6: #6aabf1; --c-h7: #9dc8f7;
  --c-side: #111012;      --c-side-ink: #e9e3e4;  --c-side-muted: #8e8689; --c-side-active: #252126; --c-side-accent: #ff6577;
  --c-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -14px rgba(0, 0, 0, .6);

  --bs-body-bg: var(--c-bg);
  --bs-body-color: var(--c-ink);
  --bs-emphasis-color: var(--c-ink);
  --bs-secondary-color: var(--c-muted);
  --bs-tertiary-bg: var(--c-sunk);
  --bs-secondary-bg: var(--c-sunk);
  --bs-border-color: var(--c-line);
  --bs-link-color: var(--c-accent);
  --bs-link-color-rgb: 255, 101, 119;
  --bs-link-hover-color: var(--c-accent);
  --bs-primary: var(--c-accent-btn);
  --bs-primary-rgb: 224, 40, 63;
  color-scheme: dark;
}
