/* WhaBuzz design tokens (brand: Midnight + Coral, 2026-10-16; see brand/README.txt). Shared by whabuzz.com (apps/landing/site) and docs.whabuzz.com (apps/docs).
   Source of truth: apps/landing/site/public/tokens.css. apps/docs/build.mjs copies it to apps/docs/tokens.css
   and inlines it, so each project still builds on its own.

   Schemes: dark is the default for every visitor, whatever the system preference. Light applies only
   when the visitor picked it with the toggle ([data-theme="light"], stored as wb-theme). :root holds the
   light values; the dark block below overrides them unless [data-theme="light"].
   The two dark blocks below must stay identical: both builds fail if they drift. */

:root {
  color-scheme: light;

  /* Type: Manrope (500, 600, 800) and JetBrains Mono (400, 500). The wordmark is Manrope 800, never mono. */
  --sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --track-display: -0.03em;
  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-md: 16px;
  --fs-lg: 18px;
  --fs-h3: 17px;
  --fs-h2: clamp(1.625rem, 1.2rem + 1.7vw, 2.375rem);
  --fs-h1: clamp(2.125rem, 1.5rem + 2.5vw, 3.25rem);
  --lh-body: 1.6;
  --lh-tight: 1.12;

  /* Spacing: 4px scale */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;

  /* Radius */
  --r-xs: 3px;
  --r-sm: 6px;
  --r-lg: 12px;

  /* Surfaces and text: Fog ground, white cards, Midnight ink, Slate muted, Lilac lines */
  --bg: #f6f5ff;
  --tint: #efeefc;
  --surface: #ffffff;
  --ink: #140f3d;
  --ink-2: #3a3566;
  --ink-3: #5b5684;
  --line: #e2dffa;
  --line-2: #cfcaf0;
  --line-3: #a9a3d6;
  --disabled-fg: #9f9ac2;
  --selection: #e2dffa;
  --shadow: 0 12px 32px rgba(20, 15, 61, 0.12);

  /* Brand (Midnight + Coral). --brand is the link/focus colour: Coral Deep on light (AA on Fog), Coral on dark.
     --brand-mark is Coral: the mark's passer and the working accent (hero rule, prompts, live dots).
     --brand-strong is coral text that sits on --brand-tint (Coral Deeper on light keeps AA on the tint).
     --btn-* is the filled primary button: Coral with Midnight text (6.4:1); hover Coral Deep with Fog text (4.66:1).
     Coral is an accent and a button, never a page or section background. */
  --brand: #c2451f;
  --brand-hover: #9e3615;
  --brand-mark: #ff6b4a;
  --brand-strong: #9e3615;
  --brand-tint: rgba(255, 107, 74, 0.1);
  --brand-line: rgba(194, 69, 31, 0.3);
  --btn-bg: #ff6b4a;
  --btn-bg-hover: #c2451f;
  --btn-bg-active: #9e3615;
  --btn-fg: #140f3d;
  --btn-fg-hover: #f6f5ff;
  --us-cell: #fff6f4;

  /* The mark: gates are neutral (Midnight on light, Fog on dark), the passer is Coral */
  --wb-mark-gate: #140f3d;
  --wb-mark-passer: #ff6b4a;

  /* Functional status only, never brand: delivered / failed */
  --ok: #2e7d5b;
  --ok-fg: #2e7d5b;
  --err: #d1322b;

  /* The one contrasting section */
  --night: #140f3d;
  --night-2: #1c1650;
  --night-line: #2b2466;
  --night-fg: #f6f5ff;
  --night-dim: #a29cd6;
  --night-strong: #ffffff;
  --night-link: #ff8e74;
  --night-link-line: #4a4092;

  /* Code panels: Midnight in both schemes, raised and bordered in dark */
  --code-bg: #140f3d;
  --code-bar: #1c1650;
  --code-line: #2b2466;
  --code-border: #140f3d;
  --code-fg: #eceafb;
  --code-dim: #a29cd6;
  --code-strong: #ffffff;
  --code-ln: #5e57a0;
  --code-hover-bg: #211a57;
  --code-hover-line: #3d3585;
  --code-ok: #7bd3a8;
  --code-ok-line: #2e7d5b;
  --code-err-line: #7a2a26;
  --t-s: #a8dcc0;   /* strings */
  --t-k: #c9c4f5;   /* keys */
  --t-kw: #9fcbf5;  /* keywords, literals, flags */
  --t-n: #f2c38b;   /* numbers */
  --t-c: #8b84c7;   /* comments */
  --t-v: #f5b3c8;   /* variables */

  /* Syntax on a light (tint) panel: inline JSON samples */
  --tj-fg: #140f3d;
  --tj-s: #2e6b4f;
  --tj-k: #3f3a9e;
  --tj-kw: #1f5f99;
  --tj-n: #8a5a12;

  /* HTTP methods (semantic, docs) */
  --m-get: #1f5f99;
  --m-post: #4b3fb8;
  --m-patch: #865611;
  --m-delete: #a3342a;

  /* Screenshots: never inverted, a hairline that reads on both backgrounds */
  --shot-border: #cfcaf0;
  --shot-bg: #f6f5ff;

  /* Theme toggle icon visibility */
  --icon-sun: none;
  --icon-moon: block;
}

@media all {
  :root:not([data-theme="light"]) {
    /* dark:begin */
    color-scheme: dark;
    --bg: #140f3d;
    --tint: #19134a;
    --surface: #1c1650;
    --ink: #f6f5ff;
    --ink-2: #c8c4ec;
    --ink-3: #8b84c7;
    --line: #2b2466;
    --line-2: #3a3280;
    --line-3: #554d9e;
    --disabled-fg: #5f58a3;
    --selection: #3a3185;
    --shadow: 0 12px 32px rgba(5, 3, 20, 0.55);
    --brand: #ff6b4a;
    --brand-hover: #ff8e74;
    --brand-mark: #ff6b4a;
    --brand-strong: #ff6b4a;
    --brand-tint: rgba(255, 107, 74, 0.14);
    --brand-line: rgba(255, 107, 74, 0.4);
    --btn-bg: #ff6b4a;
    --btn-bg-hover: #c2451f;
    --btn-bg-active: #9e3615;
    --btn-fg: #140f3d;
    --btn-fg-hover: #f6f5ff;
    --us-cell: #2a1b50;
    --wb-mark-gate: #f6f5ff;
    --wb-mark-passer: #ff6b4a;
    --ok: #2e7d5b;
    --ok-fg: #7bd3a8;
    --err: #d1322b;
    --night: #0e0a2e;
    --night-2: #19134a;
    --night-line: #2b2466;
    --night-fg: #f6f5ff;
    --night-dim: #9c96d4;
    --night-strong: #ffffff;
    --night-link: #ff8e74;
    --night-link-line: #4a4092;
    --code-bg: #1a1449;
    --code-bar: #211a57;
    --code-line: #2f2870;
    --code-border: #2f2870;
    --code-fg: #eceafb;
    --code-dim: #a29cd6;
    --code-strong: #ffffff;
    --code-ln: #615aa6;
    --code-hover-bg: #261f62;
    --code-hover-line: #463e8e;
    --code-ok: #7bd3a8;
    --code-ok-line: #2e7d5b;
    --code-err-line: #7a2a26;
    --t-c: #948dcf;
    --tj-fg: #f6f5ff;
    --tj-s: #a8dcc0;
    --tj-k: #c9c4f5;
    --tj-kw: #9fcbf5;
    --tj-n: #f2c38b;
    --m-get: #8ac2f0;
    --m-post: #b3abf7;
    --m-patch: #e2b665;
    --m-delete: #f1958a;
    --shot-border: #3a3280;
    --shot-bg: #f6f5ff;
    --icon-sun: block;
    --icon-moon: none;
    /* dark:end */
  }
}

:root[data-theme="dark"] {
  /* dark:begin */
  color-scheme: dark;
  --bg: #140f3d;
  --tint: #19134a;
  --surface: #1c1650;
  --ink: #f6f5ff;
  --ink-2: #c8c4ec;
  --ink-3: #8b84c7;
  --line: #2b2466;
  --line-2: #3a3280;
  --line-3: #554d9e;
  --disabled-fg: #5f58a3;
  --selection: #3a3185;
  --shadow: 0 12px 32px rgba(5, 3, 20, 0.55);
  --brand: #ff6b4a;
  --brand-hover: #ff8e74;
  --brand-mark: #ff6b4a;
  --brand-strong: #ff6b4a;
  --brand-tint: rgba(255, 107, 74, 0.14);
  --brand-line: rgba(255, 107, 74, 0.4);
  --btn-bg: #ff6b4a;
  --btn-bg-hover: #c2451f;
  --btn-bg-active: #9e3615;
  --btn-fg: #140f3d;
  --btn-fg-hover: #f6f5ff;
  --us-cell: #2a1b50;
  --wb-mark-gate: #f6f5ff;
  --wb-mark-passer: #ff6b4a;
  --ok: #2e7d5b;
  --ok-fg: #7bd3a8;
  --err: #d1322b;
  --night: #0e0a2e;
  --night-2: #19134a;
  --night-line: #2b2466;
  --night-fg: #f6f5ff;
  --night-dim: #9c96d4;
  --night-strong: #ffffff;
  --night-link: #ff8e74;
  --night-link-line: #4a4092;
  --code-bg: #1a1449;
  --code-bar: #211a57;
  --code-line: #2f2870;
  --code-border: #2f2870;
  --code-fg: #eceafb;
  --code-dim: #a29cd6;
  --code-strong: #ffffff;
  --code-ln: #615aa6;
  --code-hover-bg: #261f62;
  --code-hover-line: #463e8e;
  --code-ok: #7bd3a8;
  --code-ok-line: #2e7d5b;
  --code-err-line: #7a2a26;
  --t-c: #948dcf;
  --tj-fg: #f6f5ff;
  --tj-s: #a8dcc0;
  --tj-k: #c9c4f5;
  --tj-kw: #9fcbf5;
  --tj-n: #f2c38b;
  --m-get: #8ac2f0;
  --m-post: #b3abf7;
  --m-patch: #e2b665;
  --m-delete: #f1958a;
  --shot-border: #3a3280;
  --shot-bg: #f6f5ff;
  --icon-sun: block;
  --icon-moon: none;
  /* dark:end */
}

body { background: var(--bg); color: var(--ink); }
::selection { background: var(--selection); }
