/* Design tokens — the `default` theme, extracted verbatim from
   core/public/css/style.css at the refactor (pixel-faithful).
   Themes in themes/ reassign these custom properties; stylesheets and
   module views reference tokens only — never raw colors. */

/* ── Tokens ──────────────────────────────────────────────────────────────── */
:root {
  /* Palette — warm, cream + burnt sienna */
  --bg:        #f5f5f5;
  --surface:   #fbf9f5;
  --surface-2: #efeae0;
  --border:    #e3ddd3;
  --text:      #7a7470;
  --muted:     #7a7268;
  --accent:    #9BB392;
  --accent-h:  #7a9271;
  --quote-bar: #c9a96e;
  --code-bg:   #1f1b16;
  --code-fg:   #ece6db;
  --mark-bg:   #f4e6a8;

  /* Callout palette — derived, warm */
  --cl-note-bg:     #eaf2fb;  --cl-note-bar:     #3b82f6;  --cl-note-fg:     #1d4ed8;
  --cl-tip-bg:      #ecf6ec;  --cl-tip-bar:      #4f9d4f;  --cl-tip-fg:      #2f6d2f;
  --cl-warning-bg:  #fbf1dd;  --cl-warning-bar:  #d39024;  --cl-warning-fg:  #8a5a14;
  --cl-danger-bg:   #fbe9e6;  --cl-danger-bar:   #c44a3a;  --cl-danger-fg:   #8d2a1f;
  --cl-info-bg:     #e6f3f6;  --cl-info-bar:     #2c9bb0;  --cl-info-fg:     #1a6573;
  --cl-quote-bg:    #f3edf8;  --cl-quote-bar:    #8b5cf6;  --cl-quote-fg:    #5b3e9a;

  /* Type scale (1.25 ratio, 17px base) */
  --fs-xs:   0.75rem;
  --fs-sm:   0.9rem;
  --fs-base: 1rem;
  --fs-md:   1.1rem;
  --fs-lg:   1.25rem;
  --fs-xl:   1.5rem;
  --fs-2xl:  1.9rem;
  --fs-3xl:  2.4rem;
  --lh-tight: 1.25;
  --lh-snug:  1.4;
  --lh-base:  1.65;

  /* Spacing scale */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 2.5rem;
  --s-8: 4rem;
  --s-9: 6rem;

  /* Layout */
  --radius:   10px;
  --radius-sm: 4px;
  --max-w:    780px;
  --max-w-wide: 960px;

  /* Fonts */
  --font:       'Inter', system-ui, -apple-system, sans-serif;
  --font-ui:    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-title: 'Raleway', system-ui, sans-serif;
  --mono:    'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #14110d;
    --surface:   #1c1814;
    --surface-2: #251f18;
    --border:    #2e2820;
    --text:      #ece6db;
    --muted:     #8a8175;
    --accent:    #b5ccad;
    --accent-h:  #9BB392;
    --quote-bar: #b8956a;
    --code-bg:   #0e0c09;
    --code-fg:   #ece6db;
    --mark-bg:   #6b5a1f;

    --cl-note-bg:     #1a2436;  --cl-note-fg:     #a8c5ee;
    --cl-tip-bg:      #1d2a1d;  --cl-tip-fg:      #a3d0a3;
    --cl-warning-bg:  #2e2412;  --cl-warning-fg:  #e0b366;
    --cl-danger-bg:   #2e1916;  --cl-danger-fg:   #e89886;
    --cl-info-bg:     #16282c;  --cl-info-fg:     #88c5d2;
    --cl-quote-bg:    #251c33;  --cl-quote-fg:    #b89fe0;
  }
}
