/* LINGSCAN 唯一 token 源（UI 方案 §3 / 审计 UI-1）。
   全站只在这里定义 --brass 与奶油面/舞台色；其余 CSS 只引用，不再另起一套。
   加载顺序：本文件必须在 styles.css 之后、surface-cream.css 之前。 */

:root {
  color-scheme: light;

  /* 品牌：琥珀橙只给「承诺动作」与「数值信号」 */
  --brass: #e8862a;
  --brass-hover: #cf7420;
  --brass-light: #f3a55d;
  --brass-soft: rgba(232, 134, 42, 0.14);
  --brass-ink: #2a1204;

  /* 墨炭面（顶栏/页脚/焦点卡/播放器） */
  --ink0: #1d1f1e;
  --ink0-up: #2b2d2c;
  --on-dark: #f3f2ee;
  --on-dark-2: #b9bab6;

  /* 象牙面（全端统一底色） */
  --canvas: #f6f4ef;
  --canvas-sunk: #eceae4;
  --sheet: #ffffff;
  --surface: #ffffff;
  --surface-2: #efede6;
  --text: #141514;
  --text-2: #4a4c4a;
  --mute: #7a7c78;
  --line: #e4e2da;
  --line-strong: #d8d6cf;
  --ink-btn: #1d1f1e;
  --on-ink: #f3f2ee;

  /* 状态胶囊 */
  --chip-ok-bg: #dff3e4;
  --chip-ok-fg: #1f7a3d;
  --chip-idle-bg: #ececea;
  --chip-idle-fg: #5c5e5b;
  --chip-note-bg: #fbe2c8;
  --chip-note-fg: #8a3f0e;

  /* 语义色（永不使用琥珀橙） */
  --ok: #5b7a4e;
  --warn: #b58a00;
  --danger: #b8442a;
  --info: #3f3a33;

  /* 舞台嵌板（仅局部，不是页面底色） */
  --stage-canvas: #1d1f1e;
  --stage-rail: #161817;
  --stage-panel: #242625;
  --stage-raised: #2b2d2c;
  --stage-text: #f3f2ee;
  --stage-text-2: #b9bab6;
  --stage-mute: #8d8f8b;
  --stage-line: rgba(244, 239, 230, 0.10);
  --stage-ok: #7fa06f;
  --stage-warn: #d89a45;
  --stage-danger: #e0694d;

  /* 圆角（C 端；B 端在 [data-density="work"] 下降一档） */
  --r-ctl: 8px;
  --r-card: 12px;
  --r-sheet: 16px;

  /* 间距（4 的倍数） */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-6: 24px; --s-8: 32px; --s-12: 48px; --s-16: 64px;

  /* 动效 */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --t-fast: 120ms; --t-base: 200ms; --t-slow: 320ms;

  /* 字体栈（@font-face 自托管见 lingscan-fonts.css） */
  --f-display: "Noto Serif SC", "Songti SC", "STSong", serif;
  --f-serif: var(--f-display);
  --f-sans: "Inter", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --font: var(--f-sans);
  --font-body: var(--f-sans);
}

html {
  -webkit-font-smoothing: antialiased;
}

[data-density="work"] {
  --r-ctl: 4px;
  --r-card: 8px;
  --r-sheet: 12px;
}

/* 图标：统一线宽 1.5，颜色跟随文字 */
.ic { width: 20px; height: 20px; display: inline-block; vertical-align: -4px; flex: none; }
.ic-sm { width: 16px; height: 16px; vertical-align: -3px; }
.ic-lg { width: 24px; height: 24px; }
svg.ic, .ic svg { stroke-width: 1.5; }

/* 数值一律等宽 */
.num, .price, .bpm, .credits-num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
