/* 译准 · 设计令牌（v2 编辑部学习手册） */

:root,
[data-theme="light"] {
    --bg: #f6f2e8;
    --bg-soft: #efe9db;
    --surface: #fffdf7;
    --surface-2: #f7f2e7;
    --surface-3: #ede6d7;
    --overlay: rgba(20, 20, 18, 0.42);

    --ink: #1b1a17;
    --ink-2: #47433b;
    --muted: #625b50;
    --muted-2: #756c5f;

    --line: #ded6c5;
    --line-strong: #c9bfa9;

    --brand: #175b4c;
    --brand-strong: #0c4237;
    --brand-soft: #e4efe9;
    --brand-line: #bed8cd;

    --accent: #b4512c;
    --accent-soft: #f7e8df;
    --accent-line: #e6c7b4;

    --danger: #a83a2c;
    --danger-soft: #f8e7e3;
    --danger-line: #e9c3bc;

    --warn: #98661b;
    --warn-soft: #f8efd9;
    --warn-line: #e7d3a7;

    --success: #2e6b4c;
    --success-soft: #e6f0e9;
    --success-line: #bfd9c8;

    --info: #3a5c78;
    --info-soft: #e8eff5;
    --info-line: #c6d8e6;

    --ring: rgba(23, 91, 76, 0.18);

    --shadow-xs: 0 1px 2px rgba(27, 26, 23, 0.05);
    --shadow-sm: 0 1px 2px rgba(27, 26, 23, 0.04), 0 6px 16px rgba(27, 26, 23, 0.05);
    --shadow-md: 0 2px 6px rgba(27, 26, 23, 0.05), 0 16px 40px rgba(27, 26, 23, 0.08);
    --shadow-lg: 0 8px 24px rgba(27, 26, 23, 0.08), 0 32px 80px rgba(27, 26, 23, 0.14);

    --paper: radial-gradient(1100px 520px at 88% -8%, rgba(23, 91, 76, 0.05), transparent 62%),
             radial-gradient(820px 460px at -8% 108%, rgba(180, 81, 44, 0.04), transparent 58%);
}

[data-theme="dark"] {
    --bg: #10100e;
    --bg-soft: #151410;
    --surface: #181713;
    --surface-2: #1e1c17;
    --surface-3: #26231c;
    --overlay: rgba(0, 0, 0, 0.62);

    --ink: #f1ece1;
    --ink-2: #cdc5b6;
    --muted: #a89f91;
    --muted-2: #8c8477;

    --line: #2b2822;
    --line-strong: #3a352c;

    --brand: #7fc3af;
    --brand-strong: #a6dccb;
    --brand-soft: #16332c;
    --brand-line: #285247;

    --accent: #e08a63;
    --accent-soft: #33231a;
    --accent-line: #5b3d29;

    --danger: #ef8b7b;
    --danger-soft: #3a1a16;
    --danger-line: #5d2a24;

    --warn: #e6b25c;
    --warn-soft: #332a15;
    --warn-line: #5b4a22;

    --success: #77c69a;
    --success-soft: #14301f;
    --success-line: #23513a;

    --info: #7fb2dc;
    --info-soft: #14283a;
    --info-line: #26465f;

    --ring: rgba(127, 195, 175, 0.22);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.42);
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.55);

    --paper: radial-gradient(1100px 520px at 88% -8%, rgba(127, 195, 175, 0.06), transparent 62%),
             radial-gradient(820px 460px at -8% 108%, rgba(224, 138, 99, 0.04), transparent 58%);
}

:root {
    --font-display: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN", "SimSun", serif;
    --font-ui: "PingFang SC", "MiSans", "HarmonyOS Sans SC", "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-en: "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
    --font-mono: "IBM Plex Mono", "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

    --text-display: clamp(40px, 5vw, 56px);
    --text-h1: clamp(28px, 3vw, 34px);
    --text-h2: 22px;
    --text-h3: 17px;
    --text-body: 15px;
    --text-small: 13px;
    --text-caption: 12px;

    --leading-display: 1.08;
    --leading-h1: 1.2;
    --leading-h2: 1.3;
    --leading-h3: 1.4;
    --leading-body: 1.75;
    --leading-small: 1.6;
    --leading-caption: 1.5;

    --weight-regular: 400;
    --weight-medium: 500;
    --weight-semibold: 600;

    --r-xs: 4px;
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 20px;
    --r-full: 999px;

    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 24px;
    --sp-6: 32px;
    --sp-7: 40px;
    --sp-8: 48px;
    --sp-9: 64px;
    --sp-10: 96px;

    --sidebar-w: 220px;
    --content-max: 1200px;
    --reading-max: 680px;
    --gutter: 24px;
    --topbar-h: 56px;

    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --dur-1: 120ms;
    --dur-2: 180ms;
    --dur-3: 240ms;
    --dur-4: 360ms;

    --z-nav: 40;
    --z-sticky: 60;
    --z-overlay: 100;
    --z-modal: 110;
    --z-toast: 130;
}
