/* ============================================================
   complete-theme-system.css
   ------------------------------------------------------------
   R14-K 清理 · 2026-04-22
     历史: 本文件曾以末端 :root 覆盖所有上游 token (tokens.base.css +
           theme-N.tokens.css), 导致 <body class="theme-N"> / <html data-theme="N">
           切换对主色/背景/渐变/阴影几乎全部失效; 复核见
           《default3_主题取值链核验报告_R12-2.md》。
     R14-J (2026-04-22): 先行剥离 --color-primary* 冲突 7 行, 主色生效。
     R14-K (2026-04-22): 将本文件唯一定义的 unique token (purple 族 /
           bg-light/active/selected/dark-secondary / border-secondary /
           gradient-dark/accent/overlay / shadow-base/text-sm/text-md /
           shadow-purple / accent-active / opacity-*) 上移至
           tokens.base.css §3d, 再删除此处的重复 :root 块、死代码
           [data-theme="dark"] (站点未使用该属性值) 与 .high-contrast
           (未激活)。z-tooltip / z-toast 与 base §17 矛盾的 700/800 反向
           值亦不再保留, 以 base 为准。
     保留: @media print :root 打印阴影清零、html[data-theme] 过渡动效、
           prefers-reduced-motion 降级、@media (max-width: 768px) 的
           shadow 响应式收缩 —— 这些是 non-:root 功能补充, 不构成主题
           取值链冲突, 保留即可。
   ============================================================ */

@media print {
  :root {
    --color-text-primary: #000000;
    --color-text-secondary: #1e293b;
    --color-text-tertiary: #475569;

    --color-bg-primary: #ffffff;
    --color-bg-secondary: #ffffff;
    --color-bg-tertiary: #ffffff;

    --color-primary: #1e40af;
    --color-secondary: #d97706;

    --shadow-xs: none;
    --shadow-sm: none;
    --shadow-base: none;
    --shadow-md: none;
    --shadow-lg: none;
    --shadow-xl: none;
    --shadow-2xl: none;
    --shadow-primary: none;
    --shadow-primary-lg: none;
    --shadow-secondary: none;
    --shadow-accent: none;
    --shadow-purple: none;
    --shadow-focus: none;
    --shadow-focus-accent: none;
  }
}

html {
  transition: background-color 0.3s ease, color 0.3s ease;
}

html[data-theme] *,
html[data-theme] *::before,
html[data-theme] *::after {
  transition: background-color 0.3s ease,
              border-color 0.3s ease,
              color 0.3s ease,
              box-shadow 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
  html,
  html[data-theme] *,
  html[data-theme] *::before,
  html[data-theme] *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media screen and (max-width: 768px) {
  :root {
    --shadow-lg: 0 8px 20px rgba(15, 23, 42, 0.12);
    --shadow-xl: 0 12px 32px rgba(15, 23, 42, 0.16);
    --shadow-2xl: 0 16px 48px rgba(15, 23, 42, 0.2);
  }
}
