:root {
  --bg-body: #f6f5f1;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f0efeb;
  --bg-code: #eeeee8;
  --bg-code-block: #2b2b2b;

  --text-body: #303030;
  --text-heading: #1a1a1a;
  --text-secondary: #5c5c56;
  --text-muted: #8a8a80;
  --text-ghost: #b8b8ae;

  --border: #ddddd5;
  --border-strong: #c8c8be;

  --link: #2c5282;
  --link-hover: #1a365d;

  --severity-critical: #9b1c1c;
  --severity-critical-bg: #fef2f2;
  --severity-high: #9a3412;
  --severity-high-bg: #fff7ed;
  --severity-medium: #854d0e;
  --severity-medium-bg: #fefce8;
  --severity-low: #166534;
  --severity-low-bg: #f0fdf4;
  --severity-info: #1e40af;
  --severity-info-bg: #eff6ff;

  --font-heading: Georgia, 'Noto Serif SC', 'SimSun', serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  --font-mono: 'Cascadia Code', 'Fira Code', Consolas, 'Courier New', monospace;

  --radius: 2px;

  /* 主题切换过渡（暗色/浅色） */
  --theme-fade: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;

  /* 发文热力图色阶（蓝系，与 --link 同源） */
  --hm-l0: #e9e8e0;
  --hm-l1: #c3d4e9;
  --hm-l2: #8db1d8;
  --hm-l3: #5482b2;
  --hm-l4: #2c5282;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 14px;
  --space-lg: 20px;
  --space-xl: 24px;
  --space-2xl: 36px;

  --sidebar-width: 260px;
  --detail-list-width: 280px;
  --nav-height: 48px;
  --edge-pad: 28px;

  --transition: 150ms ease;
}

/* ====== 暗色 / 护眼模式 ====== */
:root[data-theme="dark"] {
  --bg-body: #15171b;
  --bg-surface: #1d2026;
  --bg-surface-hover: #262a31;
  --bg-code: #2a2e35;
  --bg-code-block: #14161a;

  --text-body: #c9ced6;
  --text-heading: #eef1f5;
  --text-secondary: #a3a9b3;
  --text-muted: #7a818c;
  --text-ghost: #565c66;

  --border: #2c313a;
  --border-strong: #3b414c;

  --link: #6fb0ec;
  --link-hover: #9ccbf5;

  --severity-critical: #f87171;
  --severity-critical-bg: #2c1517;
  --severity-high: #fb923c;
  --severity-high-bg: #2c1d10;
  --severity-medium: #fbbf24;
  --severity-medium-bg: #2c2410;
  --severity-low: #4ade80;
  --severity-low-bg: #11251a;
  --severity-info: #60a5fa;
  --severity-info-bg: #122236;

  /* 代码块在暗色页面下加一道细边，和正文背景区分 */
  --code-border: #2c313a;

  /* 发文热力图色阶（暗色） */
  --hm-l0: #23272e;
  --hm-l1: #1e3a5c;
  --hm-l2: #2b5b94;
  --hm-l3: #4a86c8;
  --hm-l4: #6fb0ec;

  color-scheme: dark;
}
