/* Design tokens of the demo pages and the visitor page («آرام»).

   Warm paper (light) and warm charcoal (dark), following the device's
   prefers-color-scheme. The identity's colors arrive on <html> as custom
   properties written by chatbot/views_demo.brand_style():
     --brand-fill-l / -d   the brand as a fill (buttons, the selected item)
     --brand-on-l / -d     text and icons on that fill (4.5:1 or more)
     --brand-ink-l / -d    the brand as text or an icon on the surface
     --brand-soft-l / -d   a light wash of the brand
   computed by the panel's rule (settings/panel_tokens.py), so the page, the
   panel and the widget agree. The fallbacks below are the default identity.
   Every other stylesheet of the demo pages uses these tokens only. */

:root {
  color-scheme: light;
  --paper: #f4f1ea;
  --surface: #fbf9f4;
  --surface-2: #eeeae1;
  --surface-3: #e7e2d7;
  --line: #e2dccf;
  --line-strong: #cfc8b9;
  --ink: #1e1b16;
  --ink-2: #514b43;
  --ink-3: #6b645a;
  --ok: #2e6a45;
  --warn: #875600;
  --danger: #b1261c;
  --note: #f5ebcb;
  --note-line: #d9c489;
  --scrim: rgb(30 27 22 / .28);
  --shadow: 0 1px 2px rgb(60 48 28 / .05), 0 16px 40px -20px rgb(60 48 28 / .22);
  --shadow-soft: 0 1px 2px rgb(60 48 28 / .04), 0 8px 24px -16px rgb(60 48 28 / .16);
  --dots: rgb(60 48 28 / .16);

  --accent: var(--brand-fill-l, #155e75);
  --on-accent: var(--brand-on-l, #ffffff);
  --brand-ink: var(--brand-ink-l, #155e75);
  --brand-soft: var(--brand-soft-l, #f0f8fc);
  --tint: 10%;

  /* Code samples: the same hues as the panel's code blocks. */
  --code-key: var(--brand-ink);
  --code-str: var(--ok);
  --code-num: var(--warn);
  --code-com: var(--ink-3);
  --code-mth: var(--danger);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #191815;
    --surface: #211f1b;
    --surface-2: #2a2823;
    --surface-3: #34312b;
    --line: #33302a;
    --line-strong: #4a463e;
    --ink: #f0ebe2;
    --ink-2: #c7c0b4;
    --ink-3: #a0988c;
    --ok: #86c9a0;
    --warn: #e2b661;
    --danger: #f38b80;
    --note: #352f21;
    --note-line: #6a5b37;
    --scrim: rgb(0 0 0 / .5);
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 20px 48px -20px rgb(0 0 0 / .7);
    --shadow-soft: 0 1px 2px rgb(0 0 0 / .25), 0 8px 24px -16px rgb(0 0 0 / .6);
    --dots: rgb(255 255 255 / .09);

    --accent: var(--brand-fill-d, #4690ab);
    --on-accent: var(--brand-on-d, #ffffff);
    --brand-ink: var(--brand-ink-d, #70adc4);
    --brand-soft: var(--brand-soft-d, #012631);
    --tint: 16%;
  }
}

:root {
  /* Washes of the brand over the current surface. */
  --brand-tint: color-mix(in oklch, var(--accent) var(--tint), var(--surface));
  --brand-tint-2: color-mix(in oklch, var(--accent) calc(var(--tint) * 2), var(--surface));
  --brand-line: color-mix(in oklch, var(--accent) 40%, var(--line));
  --ok-tint: color-mix(in oklch, var(--ok) 13%, var(--surface));
  --warn-tint: color-mix(in oklch, var(--warn) 13%, var(--surface));
  --danger-tint: color-mix(in oklch, var(--danger) 11%, var(--surface));
  --ring: var(--brand-ink);

  --font-fa: "Chat Widget Vazirmatn", "Chat Widget Inter", Tahoma, sans-serif;
  --font-en: "Chat Widget Inter", "Chat Widget Vazirmatn", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Chat Widget Vazirmatn", monospace;

  /* 8px grid (4px only as a half step inside components) */
  --s-1: 4px; --s-2: 8px; --s-3: 16px; --s-4: 24px; --s-5: 32px; --s-6: 40px; --s-7: 48px; --s-8: 64px; --s-9: 80px; --s-10: 96px;
  --r: 12px; --r-sm: 8px; --r-lg: 16px;
  --dur: 160ms; --ease: cubic-bezier(.2, 0, 0, 1);
}
