/* ===========================================================================
 * tokens.css —— freechat 设计令牌（浅色主题 + 主题无关层）
 *
 * 本文件由 tools/gen-tokens-css.py 从 packages/ui-kit/src/tokens/tokens.json 生成：**禁止手改**。
 * 改令牌 = 改 tokens.json（机读真源）→ 重跑 python3 tools/gen-tokens-css.py。
 * 人读规范：docs/design/ui-tokens.md（两者冲突时以 tokens.json 为准，见该页 §8.3）。
 * 深色主题覆盖在 css/themes.css（[data-theme="dark"]）；本文件必须先于 themes.css 加载。
 * 单位：数值型 token 一律补 px（ui-tokens.md §2.5「长度单位 px」）；--fc-hairline = 1 物理像素。
 * 计数：raw=32 semantic=28 elevation=3 typography=9 space=10 size=23 radius=6 motion=5
 * ======================================================================== */

:root {

  /* ---- raw 层 · §3.2 中性灰阶 / §3.3 主色阶 / §3.7 头像色相档 ---- */
  /* §3.2 中性灰阶 14 档（L* 锚定，a*=b*=0） */
  --fc-gray-0: #FCFCFC;
  --fc-gray-1: #F6F6F6;
  --fc-gray-2: #EEEEEE;
  --fc-gray-3: #E2E2E2;
  --fc-gray-4: #D1D1D1;
  --fc-gray-5: #BBBBBB;
  --fc-gray-6: #A0A0A0;
  --fc-gray-7: #868686;
  --fc-gray-8: #6D6D6D;
  --fc-gray-9: #555555;
  --fc-gray-10: #3E3E3E;
  --fc-gray-11: #303030;
  --fc-gray-12: #222222;
  --fc-gray-13: #181818;

  /* §3.3 主色阶 10 档（H = 300°，色度 = 0.90·Cmax） */
  --fc-primary-0: #F7F5FE;
  --fc-primary-1: #EDE8FD;
  --fc-primary-2: #E0D8FC;
  --fc-primary-3: #CBBFF9;
  --fc-primary-4: #AEA0F7;
  --fc-primary-5: #8F81F4;
  --fc-primary-6: #5F5EF0;
  --fc-primary-7: #2F46E5;
  --fc-primary-8: #2437B9;
  --fc-primary-9: #1B2B95;

  /* §3.7 生成式头像色相档 8 档（L* = 45） */
  --fc-avatar-0: #AB496C;
  --fc-avatar-1: #AA5032;
  --fc-avatar-2: #7B6936;
  --fc-avatar-3: #467637;
  --fc-avatar-4: #41736A;
  --fc-avatar-5: #44717E;
  --fc-avatar-6: #4B6D96;
  --fc-avatar-7: #9148C1;

  /* ---- semantic 层 · 浅色（§3.5 语义表 + §3.6 非色值 token） ---- */
  --fc-bg-canvas: #F6F6F6;
  --fc-bg-surface: #FCFCFC;
  --fc-bg-sunken: #EEEEEE;
  --fc-bg-hover: #EEEEEE;
  --fc-bg-selected: #E5E0F4;
  --fc-line-subtle: #D1D1D1;
  --fc-line-strong: #868686;
  --fc-text-primary: #303030;
  --fc-text-secondary: #555555;
  --fc-text-tertiary: #6D6D6D;
  --fc-text-disabled: #A0A0A0;
  --fc-text-on-brand: #FFFFFF;
  --fc-text-brand: #5F5EF0;
  --fc-brand-solid: #5F5EF0;
  --fc-brand-hover: #2F46E5;
  --fc-focus-ring: #8F81F4;
  --fc-bubble-in-bg: #EEEEEE;
  --fc-bubble-in-text: #303030;
  --fc-bubble-out-bg: #E5E0F4;
  --fc-bubble-out-text: #303030;
  --fc-bubble-meta: #555555;
  --fc-badge-bg: #5F5EF0;
  --fc-badge-text: #FFFFFF;
  --fc-danger: #DA2742;
  --fc-warning: #9A6815;
  --fc-success: #208247;
  --fc-bg-overlay: rgba(24,26,34,0.32);
  --fc-shadow-rgb: 24 26 34;

  /* ---- elevation 层 · §5.4 阴影 3 档（浅色；取值引用 semantic 层的 --fc-shadow-rgb） ---- */
  --fc-elevation-1: 0 1px 3px rgb(var(--fc-shadow-rgb) / 0.08);
  --fc-elevation-2: 0 4px 12px rgb(var(--fc-shadow-rgb) / 0.12);
  --fc-elevation-3: 0 12px 32px rgb(var(--fc-shadow-rgb) / 0.16);

  /* ---- typography · §4.2 阶梯 8 档（`-size` / `-line-height` / `-weight` 是同一行的三列）+ §4.2 注 4 字号缩放 ---- */
  --fc-font-display: 24px;
  --fc-font-display-size: 24px;
  --fc-font-display-line-height: 32px;
  --fc-font-display-weight: 600;
  --fc-font-title: 20px;
  --fc-font-title-size: 20px;
  --fc-font-title-line-height: 28px;
  --fc-font-title-weight: 600;
  --fc-font-heading: 17px;
  --fc-font-heading-size: 17px;
  --fc-font-heading-line-height: 24px;
  --fc-font-heading-weight: 600;
  --fc-font-body: 15px;
  --fc-font-body-size: 15px;
  --fc-font-body-line-height: 24px;
  --fc-font-body-weight: 400;
  --fc-font-body-strong: 15px;
  --fc-font-body-strong-size: 15px;
  --fc-font-body-strong-line-height: 24px;
  --fc-font-body-strong-weight: 500;
  --fc-font-label: 13px;
  --fc-font-label-size: 13px;
  --fc-font-label-line-height: 20px;
  --fc-font-label-weight: 400;
  --fc-font-caption: 12px;
  --fc-font-caption-size: 12px;
  --fc-font-caption-line-height: 16px;
  --fc-font-caption-weight: 400;
  --fc-font-micro: 11px;
  --fc-font-micro-size: 11px;
  --fc-font-micro-line-height: 16px;
  --fc-font-micro-weight: 500;
  --fc-font-scale: 1;

  /* ---- space · §5.1 间距阶梯 ---- */
  --fc-space-4: 4px;
  --fc-space-8: 8px;
  --fc-space-12: 12px;
  --fc-space-16: 16px;
  --fc-space-20: 20px;
  --fc-space-24: 24px;
  --fc-space-32: 32px;
  --fc-space-40: 40px;
  --fc-space-48: 48px;
  --fc-space-64: 64px;

  /* ---- size · §2.2 尺寸 token ---- */
  --fc-window-min-w: 1024px;
  --fc-window-min-h: 640px;
  --fc-titlebar-h: 40px;
  --fc-rail-w: 64px;
  --fc-rail-w-expanded: 208px;
  --fc-list-w: 300px;
  --fc-list-w-min: 240px;
  --fc-list-w-max: 420px;
  --fc-list-header-h: 56px;
  --fc-item-h: 64px;
  --fc-item-h-compact: 48px;
  --fc-content-min-w: 680px;
  --fc-content-header-h: 56px;
  --fc-stream-min-h: 216px;
  --fc-composer-h: 96px;
  --fc-composer-h-max: 240px;
  --fc-composer-toolbar-h: 36px;
  --fc-bubble-max-w: 560px;
  --fc-avatar-sm: 24px;
  --fc-avatar-md: 32px;
  --fc-avatar-lg: 40px;
  --fc-hit-min: 32px;
  --fc-hairline: 1px;

  /* ---- radius · §5.2 圆角 ---- */
  --fc-radius-none: 0;
  --fc-radius-sm: 4px;
  --fc-radius-md: 8px;
  --fc-radius-lg: 12px;
  --fc-radius-xl: 16px;
  --fc-radius-full: 999px;

  /* ---- motion · §5.5 动效 ---- */
  --fc-motion-fast: 120ms;
  --fc-motion-base: 180ms;
  --fc-motion-slow: 240ms;
  --fc-motion-emphasis: 320ms;
  --fc-ease-standard: cubic-bezier(0.2, 0, 0, 1);
}
