/* ============================================================================
   tokens.css — 主题令牌的唯一真源（唯一例外：color-scheme）。

   由 consolidate-css.mjs 从 11 个样式层里抽出全部自定义属性声明得到。
   此前同一批令牌在 styles.css / pro-skin.css / product-polish.css 里各声明
   一遍，靠加载顺序决胜，于是"改了 styles.css 顶部却没反应"——修一个颜色要
   先搞清楚哪个文件最后加载。现在只有这里有权声明令牌。

   重名的令牌保留最后一次声明，与合并前的取胜者一致（已用像素对照验证）。
   ============================================================================ */
:root {
  color-scheme: light;
  --blue: #2563eb;
  --orange: #d97706;
  --orange-text: #854d0e;
  --surface-1:var(--panel);
  --surface-2:var(--panel-raised);
  --font-label: ui-monospace, 'SF Mono', SFMono-Regular, 'JetBrains Mono',
    'Cascadia Code', Menlo, Consolas, 'Liberation Mono', monospace;
  /* 字阶：正文/日志/表格 13px，辅助元数据（chip、标签、kicker）12px，
     10.5px 仅限 mono 微标签（ui-layout-invariants 的 12px 地板唯一豁免）。
     阅读面一律引用 --fs-body，不要再写死 12px。 */
  --fs-body: 13px;
  --fs-meta: 12px;
  --fs-mono-micro: 10.5px;
  --bg: #f8fafc;
  --bg-deep: #eef2f6;
  --bg-soft: #f1f5f9;
  --panel: #ffffff;
  --panel-raised: #ffffff;
  --panel-soft: #f8fafc;
  --line: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(15, 23, 42, 0.15);
  --text: #0f172a;
  --muted: #64748b;
  --muted-strong: #334155;
  --orange-50: #fff7ed;
  --orange-100: #ffedd5;
  --orange-200: #fed7aa;
  --orange-300: #fdba74;
  --orange-400: #fb923c;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --orange-700: #c2410c;
  --accent: #ea580c;
  --accent-hover: #f97316;
  --accent-strong: #c2410c;
  --accent-text: #c2410c;
  --accent-soft: rgba(234, 88, 12, 0.07);
  --accent-ring: rgba(234, 88, 12, 0.28);
  --accent-glow: rgba(234, 88, 12, 0.08);
  /* Cyan and violet carry different evidence tiers. Keeping both mapped to
     accent-text made every status read as the same warning color. */
  --cyan: #0f766e;
  --violet: #6d28d9;
  --green: #16a34a;
  --green-soft: #f0fdf4;
  --green-border: #bbf7d0;
  --green-text: #15803d;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --red-border: #fecaca;
  --red-text: #b91c1c;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --amber-border: #fde68a;
  --amber-text: #b45309;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-strong: 0 10px 25px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --ui-radius-lg: 12px;
  --ui-radius-md: 10px;
  --ui-border-soft: rgba(15, 23, 42, 0.08);
  --ui-surface-tint: rgba(15, 23, 42, 0.03);
  --z-sticky: 100;
  --z-chat-backdrop: 1090;
  --z-chat-panel: 1100;
  --z-drawer-backdrop: 1150;
  --z-drawer: 1160;
  --z-agent-fab: 1190;
  --z-tour: 1200;
  --z-toast: 1300;

  /* ---- app.css literal 收容区（2026-09-21 批量迁移）----------------------
     以下 token 的值与被替换的字面量逐字节相同，且保持主题无关
     （原字面量就不随主题变化），计算样式可证不变。--dk-* 是暗色
     作用域里历史分层留下的近似重复色，先按值保真收容，视觉统一
     留给专门的设计批次。命名按色系 + 用途，不加新主题语义。 */
  --muted-cool: #91a4bd;
  --mint: #74e6b0;
  --coral: #ff9098;
  --gold: #ffd36b;
  --white: #ffffff;
  --warm-ink: #14100b;
  --red-bright: #f87171;
  --navy-deep: #101925;
  --sky: #38bdf8;
  --sky-soft: #58c4dd;
  --red-fill: #ef4444;
  --accent-pale: #ffb377;
  --flame: #ff7a2c;
  --flame-bright: #ff8a2b;
  --teal-bright: #34d2b5;
  --stop-red: #d92b2b;
  --mist: #d8e2f0;
  --mint-bright: #8df0bf;
  --periwinkle: #aeb8ff;
  --sky-text: #9fc5ff;
  --stone: #887f75;
  --black: #000000;
  --ice: #e7edf7;
  --ice-soft: #f4f7fc;
  --muted-cool-soft: #9aa9bd;
  --mist-soft: #c3cfe0;
  --frame-navy: #0b1219;
  --frost: #edf4fb;
  --flame-hot: #ff6f1c;
  --paper: #f7f7f5;
  --royal: #2563eb;
  --paper-warm: #fbfbf9;
  --pink: #ef8dce;
  --attest-green: #1e7f4f;
  --attest-amber: #b3660a;
  --cream: #fff7ee;
  --float-orange: #ef5d12;
  --mint-pale: #9af2c4;
  --slate: #687993;
  --gold-fill: #fbbf24;
  --gold-deep: #f59e0b;
  --emerald: #10b981;
  --slider-orange: #f05a1a;
  --stop-hover: #b81f1f;
  --accent-blush: #ffb08a;
  --coral-pale: #ff9a9a;
  --gold-soft: #ffd27a;
  --gold-bright: #ffbe3c;
  --olive-gray: #6e716a;
  --stop-deep: #b71f1f;
  --slate-soft: #8990a6;
  --step-gray: #667085;
  --lavender-gray: #aeb4c7;
  --slate-deep: #727b92;
  --mist-bright: #cbd2e6;
  --peach: #f29a52;
  --sand-border: #e8e3dc;
  --mist-deep: #b9c6d8;
  --gold-glow: #ffc06d;
  --teal-ink: #2f8c9d;
  --gold-pale: #ffd28a;
  --frost-bright: #f7fbff;
  --mist-text: #b7c6d6;
  --peach-bright: #ffbf73;

}

html.theme-dark {
  color-scheme: dark;
  --blue: #73a7ff;
  --orange: #ffc05a;
  --orange-text: #ffc05a;
  --surface-1:#131823;
  --surface-2:#171d2b;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.25);
  --bg: #0b0e14;
  --bg-deep: #080a0f;
  --bg-soft: #111622;
  --panel: #131823;
  --panel-raised: #171d2b;
  --panel-soft: #101520;
  --line: rgba(148, 163, 184, 0.12);
  --line-strong: rgba(148, 163, 184, 0.24);
  --text: #f1f5f9;
  --muted: #8b9bb4;
  --muted-strong: #cbd5e1;
  --ui-border-soft: rgba(148, 163, 184, 0.12);
  --ui-surface-tint: rgba(255, 255, 255, 0.04);
  --orange-50: rgba(249, 115, 22, 0.09);
  --orange-100: rgba(249, 115, 22, 0.14);
  --orange-200: rgba(253, 186, 116, 0.35);
  --orange-300: rgba(253, 186, 116, 0.55);
  --orange-400: #fb923c;
  --orange-500: #ff9d4d;
  --orange-600: #f97316;
  --orange-700: #ea580c;
  --accent: #fb923c;
  --accent-hover: #fdba74;
  --accent-strong: #f97316;
  --accent-text: #fdba74;
  --accent-soft: rgba(251, 146, 60, 0.1);
  --accent-ring: rgba(251, 146, 60, 0.36);
  --accent-glow: rgba(251, 146, 60, 0.12);
  --cyan: #67e8f9;
  --violet: #c4b5fd;
  --green: #4ade80;
  --green-soft: rgba(34, 197, 94, 0.12);
  --green-border: rgba(34, 197, 94, 0.3);
  --green-text: #86efac;
  --red: #f87171;
  --red-soft: rgba(239, 68, 68, 0.12);
  --red-border: rgba(239, 68, 68, 0.32);
  --red-text: #fca5a5;
  --amber: #fbbf24;
  --amber-soft: rgba(245, 158, 11, 0.12);
  --amber-border: rgba(245, 158, 11, 0.32);
  --amber-text: #fcd34d;
  --shadow-strong: 0 12px 32px rgba(0, 0, 0, 0.45);

  /* ---- app.css 暗色作用域字面量收容区（2026-09-21 批量迁移）----------------------
     以下 token 的值与被替换的字面量逐字节相同，且保持主题无关
     （原字面量就不随主题变化），计算样式可证不变。--dk-* 是暗色
     作用域里历史分层留下的近似重复色，先按值保真收容，视觉统一
     留给专门的设计批次。命名按色系 + 用途，不加新主题语义。 */
  --navy-panel: #111b25;
  --ink-dark: #17100b;
  --ink-deeper: #160b03;
  --dk-primary-a: #ff9651;
  --dk-primary-b: #ff741f;
  --dk-primary-hover-a: #ffab70;
  --dk-primary-hover-b: #ff8334;
  --dk-frame: #070d13;
  --dk-gate: #0d161f;
  --dk-button: #182638;
  --dk-primary-c: #ff9b47;
  --dk-primary-hover-c: #ffad5d;
  --dk-primary-hover-d: #ff8628;
  --dk-entry: #142333;
  --dk-next-a: #131f2d;
  --dk-next-b: #152437;
  --dk-next-visual: #0d1825;
  --dk-highlight: #152333;
  --dk-palette: #101a27;
  --dk-error-text: #ff9d9d;

}
