/* ==========================================================================
   美化引擎 - 设计令牌 (Design Tokens)
   --------------------------------------------------------------------------
   全站唯一的变量来源。页面样式只允许通过变量取色 / 取间距，
   禁止在具体页面里再硬编码颜色值。
   页面级主题（暗色首页 / 浅色文档）在 home.css、manual.css 中映射到这些令牌。
   ========================================================================== */

:root {
    /* ── 品牌色（青绿主色相） ── */
    --brand:                 #00d4aa;               /* 暗色背景上的品牌色 */
    --brand-hover:           #00e6b8;
    --brand-strong:          #0f9e80;               /* 浅色背景上的可读品牌色 */
    --brand-strong-hover:    #0b7f68;
    --brand-ink:             #06382f;               /* 品牌深色文字 */
    --brand-soft:            rgba(0, 212, 170, .08);
    --brand-strong-soft:     rgba(15, 158, 128, .10);
    --brand-glow:            rgba(0, 212, 170, .18);
    --brand-glow-soft:       rgba(0, 212, 170, .06);
    --brand-glow-mid:        rgba(0, 212, 170, .12);
    --brand-glow-strong:     rgba(0, 212, 170, .34);

    /* ── 语义色 ── */
    --success:               #16a34a;
    --warning:               #d97706;
    --danger:                #dc2626;
    --info:                  #0ea5e9;

    /* ── 中性色阶 ── */
    --gray-0:                #ffffff;
    --gray-50:               #f8fafc;
    --gray-100:              #f1f5f9;
    --gray-200:              #e2e8f0;
    --gray-300:              #cbd5e1;
    --gray-400:              #94a3b8;
    --gray-500:              #64748b;
    --gray-700:              #334155;
    --gray-800:              #1e293b;
    --gray-900:              #0a0a0a;

    /* ── 字体 ── */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    /* ── 间距 ── */
    --space-1:  4px;
    --space-2:  8px;
    --space-3:  12px;
    --space-4:  16px;
    --space-5:  20px;
    --space-6:  24px;
    --space-8:  32px;
    --space-10: 40px;
    --space-16: 64px;

    /* ── 圆角 ── */
    --radius-sm:   6px;
    --radius-md:   10px;
    --radius-lg:   12px;
    --radius-xl:   16px;
    --radius-pill: 999px;

    /* ── 阴影 ── */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, .12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, .16);

    /* ── 动效 ── */
    --ease: cubic-bezier(.4, 0, .2, 1);
    --transition: all .2s var(--ease);
    --ease-out: cubic-bezier(.22, .61, .36, 1);
    --ease-out-back: cubic-bezier(.34, 1.56, .64, 1);

    /* ── 滚动入场动画 ── */
    --reveal-distance: 28px;
    --reveal-duration: .65s;

    /* ── 布局 ── */
    --max-w:      1200px;
    --sidebar-w:  280px;
    --header-h:   64px;
}
