/* ==========================================================================
   Design Tokens · 面试官问答智能体
   Modern Minimal (Linear) + Editorial accent · Light only
   来源：outputs/02-design-tokens.md §2.2（原样落地，禁止改值）
   唯一 accent = 低饱和靛蓝 #3D5BD9，使用面积 ≤ 5%
   ========================================================================== */
:root {
  /* ---------- 1. Neutral Scale (9 steps) ---------- */
  --color-gray-0: #FFFFFF;   /* surface 卡片/面板/浮层 */
  --color-gray-1: #FAFAFA;   /* page bg 页面底 */
  --color-gray-2: #F5F6F8;   /* subtle fill 次级块底 */
  --color-gray-3: #F0F2F5;   /* hover fill 通用 hover */
  --color-gray-4: #E8EAEF;   /* hairline 主分隔线 / active fill */
  --color-gray-5: #E0E3E9;   /* strong border 输入框/次级按钮 */
  --color-gray-6: #D5D9E0;   /* disabled border */
  --color-gray-7: #C7CDD6;   /* skeleton / dot / muted icon */
  --color-gray-8: #A9B1BD;   /* disabled text */

  /* ---------- 2. Semantic Neutrals ---------- */
  --color-bg:              var(--color-gray-1);  /* 页面底 */
  --color-bg-subtle:       var(--color-gray-2);  /* 代码块/指标卡底 */
  --color-surface:         var(--color-gray-0);  /* 卡片/面板/浮层 */
  --color-surface-hover:   var(--color-gray-2);
  --color-fill-hover:      var(--color-gray-3);
  --color-fill-active:     var(--color-gray-4);
  --color-border:          var(--color-gray-4);  /* hairline */
  --color-border-strong:   var(--color-gray-5);
  --color-border-disabled: var(--color-gray-6);
  --color-skeleton:        var(--color-gray-7);
  --color-icon-muted:      var(--color-gray-7);
  --color-avatar-border:   rgba(0, 0, 0, .06);

  /* ---------- 3. Text (3 levels + AA variant) ---------- */
  --color-text-primary:      #16181D;  /* 17.76:1 on #FFF */
  --color-text-secondary:    #5B6472;  /*  5.98:1 on #FFF */
  --color-text-tertiary:     #8B95A3;  /*  3.03:1 · 仅占位符/装饰 */
  --color-text-tertiary-aa:  #697285;  /*  4.83:1 · 承载信息的弱文字 */
  --color-text-disabled:     var(--color-gray-8);
  --color-text-on-accent:    #FFFFFF;  /*  5.68:1 on accent */
  --color-text-placeholder:  var(--color-text-tertiary);
  --color-link:              var(--color-accent);

  /* ---------- 4. Accent (single · low-sat indigo) ---------- */
  --color-accent:              #3D5BD9;   /* H228 S67 L55 · white text 5.68:1 */
  --color-accent-alt:          #4059CE;   /* 合规替代 S59 L53 · 5.94:1 */
  --color-accent-hover:        #3450C4;   /* 6.79:1 */
  --color-accent-active:       #2C46AE;   /* 8.09:1 */
  --color-accent-tint:         #EEF1FD;
  --color-accent-tint-hover:   #DDE4FB;
  --color-accent-on-tint:      #2F47B0;   /* 7.03:1 on tint */
  --color-accent-border:       #C9D4F8;
  --color-accent-rgb:          61, 91, 217;
  --color-accent-ring:         rgba(var(--color-accent-rgb), .12);
  --color-accent-ring-strong:  rgba(var(--color-accent-rgb), .24);

  /* ---------- 5. Semantic (low saturation) ---------- */
  --color-success:            #17803D;  /* 5.01:1 */
  --color-success-tint:       #EAF4EE;
  --color-success-on-tint:    #146A33;  /* 5.95:1 on tint */
  --color-success-border:     #CDE7D7;

  --color-warning:            #B7791F;  /* 图标/边框 only · 3.64:1 ≥3:1 */
  --color-warning-tint:       #FDF6E9;
  --color-warning-text:       #8A5A12;  /* 5.91:1 on #FFF */
  --color-warning-border:     #F0DFBA;

  --color-danger:             #C0392B;  /* 5.44:1 */
  --color-danger-tint:        #FBEEEC;
  --color-danger-on-tint:     #A32E21;  /* 6.24:1 on tint */
  --color-danger-border:      #F2D5D0;
  --color-danger-ring:        rgba(192, 57, 43, .12);

  /* ---------- 6. Typography · Fonts ---------- */
  --font-sans: Inter, "SF Pro Text", -apple-system, BlinkMacSystemFont,
               "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei",
               "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --font-cn:    -apple-system, BlinkMacSystemFont, "PingFang SC",
                "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-en:    Inter, "SF Pro Text", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC",
                Georgia, "Times New Roman", serif;   /* 仅大标题点缀 */
  --font-mono:  "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas,
                "Courier New", monospace;

  /* ---------- 7. Typography · Size Scale ---------- */
  --text-2xs:  0.6875rem;  /* 11px · 微型标签 */
  --text-xs:   0.75rem;    /* 12px · 时间戳/来源/脚注 */
  --text-sm:   0.8125rem;  /* 13px · chip/Tab/辅助 */
  --text-base: 0.875rem;   /* 14px · 正文/简历列表 */
  --text-md:   1rem;       /* 16px · 对话消息/输入框 */
  --text-lg:   1.25rem;    /* 20px · 卡片标题/小标题 */
  --text-xl:   1.75rem;    /* 28px · 区块标题 */
  --text-2xl:  2.5rem;     /* 40px · 姓名 wordmark/空态大标题 */
  --text-msg:  1rem;       /* 对话消息（≤767px 时降为 .9375rem = 15px） */

  /* ---------- 8. Typography · Line Height ---------- */
  --lh-tight: 1.25;   /* 标题 */
  --lh-snug:  1.4;    /* 小标签/按钮 */
  --lh-list:  1.6;    /* 列表项/输入框 */
  --lh-body:  1.7;    /* 正文（中文呼吸） */

  /* ---------- 9. Typography · Weight (400/500/600 only) ---------- */
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;

  /* ---------- 10. Typography · Letter Spacing ---------- */
  --tracking-tighter: -0.02em;  /* ≥28px 大标题 / wordmark */
  --tracking-tight:   -0.01em;  /* 20px 小标题 */
  --tracking-normal:  0;        /* 正文 */
  --tracking-wide:    0.06em;   /* 小号全大写英文标签（慎用，禁止超宽） */

  /* ---------- 11. Spacing (4px baseline) ---------- */
  --space-2:  2px;
  --space-4:  4px;
  --space-8:  8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-48: 48px;
  --space-64: 64px;
  --space-96: 96px;

  /* ---------- 12. Radius (3 主档 + 2 补充) ---------- */
  --radius-sm:   8px;    /* chips / 小按钮 / 图标按钮 / 技能标签 */
  --radius-md:   10px;   /* 输入框 / 常规按钮 / 指标卡 */
  --radius-lg:   12px;   /* 卡片 / 消息气泡 / 简历面板 */
  --radius-xl:   14px;   /* 浮层：抽屉 / toast / 模态 */
  --radius-full: 999px;  /* 头像（或用 12px 方角，见组件规格） */

  /* ---------- 13. Shadow (仅浮层，2 档) ---------- */
  --shadow-none:  none;
  --shadow-pop:   0 1px 2px rgba(16, 24, 40, .04), 0 4px 12px rgba(16, 24, 40, .06);
  --shadow-float: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px rgba(16, 24, 40, .08);

  /* ---------- 14. Focus Ring ---------- */
  --ring-focus:        0 0 0 3px var(--color-accent-ring);
  --ring-focus-strong: 0 0 0 3px var(--color-accent-ring-strong);
  --ring-error:        0 0 0 3px var(--color-danger-ring);

  /* ---------- 15. Motion ---------- */
  --dur-fast:  140ms;  /* 微交互 120–160ms */
  --dur-base:  200ms;  /* 元素进出 180–220ms */
  --dur-panel: 240ms;  /* 面板/抽屉展开 */
  --dur-max:   300ms;  /* 硬上限 */
  --ease-out:      cubic-bezier(.2, .8, .2, 1);
  --ease-standard: cubic-bezier(.2, .8, .2, 1);
  --ease-linear:   linear;

  /* ---------- 16. Layout ---------- */
  --layout-max:        1240px;  /* 内容区最大宽 */
  --sidebar-w:         340px;   /* 桌面侧栏 */
  --chat-max:          760px;   /* 对话区内容最大宽 */
  --bubble-max:        min(76%, 720px);
  --header-h-mobile:   56px;    /* 移动顶部折叠名片条 */
  --composer-h-min:    44px;
  --tap-min:           44px;    /* 最小触摸目标 */
  --avatar-lg:         96px;    /* 桌面头像展示尺寸 */
  --avatar-sm:         32px;    /* 移动顶部条头像 */
  --safe-bottom:       env(safe-area-inset-bottom, 0px);
  --safe-top:          env(safe-area-inset-top, 0px);

  /* ---------- 17. Z-index ---------- */
  --z-base:     0;
  --z-sticky:   100;  /* 移动顶部条 / 桌面 sticky 元素 */
  --z-backdrop: 200;  /* 遮罩层 */
  --z-drawer:   210;  /* 简历抽屉 / Bottom Sheet */
  --z-modal:    300;  /* 模态 */
  --z-popover:  400;  /* 下拉/菜单 */
  --z-toast:    500;  /* toast */
  --z-tooltip:  600;  /* tooltip */
}
