/* design tokens · RAG与Graph学习站
   视觉关键词：检索、图谱、证据链、连接
   主色=图谱紫（知识网络），辅色=证据绿（检索命中）
   明暗两套独立取色（非反色），对比度满足正文 ≥ 4.5:1 */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(30, 20, 60, 0.06), 0 10px 30px rgba(30, 20, 60, 0.07);
  --shadow-soft: 0 1px 2px rgba(30, 20, 60, 0.05);
  --speed: 180ms ease;

  --grid-line: rgba(109, 40, 217, 0.06);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f6fb;
  --bg-hero: linear-gradient(160deg, #f0ebff 0%, #f7f6fb 55%, #e6f7f0 100%);
  --surface: #ffffff;
  --surface-2: #f0edf9;
  --text: #221a35;
  --muted: #5e5674;
  --border: #e0dbe9;
  --primary: #6d28d9;
  --primary-strong: #5420ad;
  --primary-soft: #ede9fe;
  --accent: #047857;
  --accent-soft: #d9f2e6;
  --danger: #b3372f;
  --ok: #0f6e44;

  --lv-entry: #0e7490;   /* 入门 · 青 */
  --lv-core: #6d28d9;    /* 核心 · 紫 */
  --lv-advanced: #be185d;/* 进阶 · 品红 */
  --lv-frontier: #b45309;/* 前沿 · 琥珀 */
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f0c1d;
  --bg-hero: linear-gradient(160deg, #1d1440 0%, #0f0c1d 55%, #0c2419 100%);
  --surface: #1a1530;
  --surface-2: #241d40;
  --text: #ece7f8;
  --muted: #a89fc2;
  --border: #322a4d;
  --primary: #c4b5fd;
  --primary-strong: #d8ccff;
  --primary-soft: #2c2153;
  --accent: #5fe0ad;
  --accent-soft: #10362a;
  --danger: #ff8f88;
  --ok: #63d9a0;

  --lv-entry: #5cd6e8;
  --lv-core: #c4b5fd;
  --lv-advanced: #ff8fc0;
  --lv-frontier: #ffc98a;

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.35);
  --grid-line: rgba(196, 181, 253, 0.07);
}

@media (prefers-reduced-motion: reduce) {
  :root { --speed: 0ms; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
