/* design tokens · 线性代数学习站
   视觉关键词：空间、变换、基、谱
   主色=空间深青（向量空间），辅色=基向量品红（数学可视化惯例）
   明暗两套独立取色（非反色），对比度满足正文 ≥ 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(10, 40, 50, 0.06), 0 10px 30px rgba(10, 40, 50, 0.07);
  --shadow-soft: 0 1px 2px rgba(10, 40, 50, 0.05);
  --speed: 180ms ease;

  --grid-line: rgba(14, 116, 144, 0.06);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f9fa;
  --bg-hero: linear-gradient(160deg, #e3f3f7 0%, #f5f9fa 55%, #fbeef4 100%);
  --surface: #ffffff;
  --surface-2: #ebf3f5;
  --text: #14232a;
  --muted: #52646d;
  --border: #d8e5e9;
  --primary: #0e7490;
  --primary-strong: #155e75;
  --primary-soft: #dcf1f7;
  --accent: #db2777;
  --accent-soft: #fce9f2;
  --danger: #b3372f;
  --ok: #1a7f4b;

  --lv-entry: #059669;   /* 入门 · 绿 */
  --lv-core: #0e7490;    /* 核心 · 青 */
  --lv-advanced: #7c3aed;/* 进阶 · 紫 */
  --lv-frontier: #ea580c;/* 前沿 · 橙 */
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c161a;
  --bg-hero: linear-gradient(160deg, #0f2e38 0%, #0c161a 55%, #2a1224 100%);
  --surface: #13232a;
  --surface-2: #1a2e36;
  --text: #e2eef2;
  --muted: #93a8b0;
  --border: #263d46;
  --primary: #5bd4e8;
  --primary-strong: #8ee6f4;
  --primary-soft: #123642;
  --accent: #f472b6;
  --accent-soft: #3a1230;
  --danger: #ff8f88;
  --ok: #5fd89b;

  --lv-entry: #34d399;
  --lv-core: #5bd4e8;
  --lv-advanced: #c084fc;
  --lv-frontier: #fb923c;

  --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(91, 212, 232, 0.07);
}

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