/* 问献 · 设计变量
   取自「拾文 / 问献 · Windows 桌面界面设计规范 v1.2」（问献设计资产_20261103.zip）：
   奶白工作背景 + 白色内容面板 + 雾蓝填充 + 深灰蓝文字；三个工作区识别色（灰绿 / 灰蓝 / 柔和珊瑚）；
   深色只出现在终端块（取自规范的深色主题 #1C1D22）。
   每屏 <link rel="stylesheet" href="tokens.css"> 再 <link rel="stylesheet" href="components.css"> */
/* Geist 可变字体：一个文件覆盖全部字重，本地自托管（SIL OFL） */
@font-face {
  font-family: "Geist";
  src: url("assets/fonts/Geist-Variable.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("assets/fonts/GeistMono-Variable.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
/* 完整可变宋体，保留全部原始字形（SIL OFL）。 */
@font-face {
  font-family: "Noto Serif SC";
  src: url("assets/fonts/NotoSerifSC-Variable.woff2?v=20261204") format("woff2");
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}

:root {
  /* 中性色：全部带一点暖黄，和奶白底一致 */
  --color-bg: #f8f5f0;            /* 页面背景：窗口奶白 */
  --color-bg-alt: #f2eee8;        /* 页脚、整块底 */
  --color-surface: #ffffff;       /* 内容面板、卡片 */
  --color-surface-2: #f4f0ea;     /* 输入框、hover 底 */
  --color-surface-3: #ebe6df;     /* 按下态 */
  --color-text: #29313d;          /* 正文、标题（规范 text） */
  --color-muted: #5f6876;         /* 次要文字（规范 text-secondary） */
  --color-faint: #646c79;         /* 弱说明，最浅不低于 4.5:1 */
  --color-line: #e4e1dd;          /* 装饰分隔线（规范 divider） */
  --color-line-strong: #cdc7bd;   /* 需要边界的控件：按钮、输入框 */
  --color-control: #858b94;       /* 控件识别轮廓（规范 control） */
  --color-divider: #e4e1dd;

  /* 品牌与交互 */
  --color-brand: #8ba9d0;         /* 雾蓝：主按钮填充（规范 brand） */
  --color-brand-hover: #809fc7;
  --color-brand-ink: #23364d;     /* 雾蓝上的文字（规范 on-brand） */
  --color-primary: #8ba9d0;       /* 主按钮底 */
  --color-primary-ink: #23364d;   /* 主按钮文字 */
  --color-link: #496b96;          /* 链接、关键图标、选中文字（规范 primary） */
  --color-selected: #e9eff7;      /* 选中区域底色 */

  /* 三个工作区识别色（规范 · 工作区配色）：页签、标识、少量强调 */
  --ws-search-ink: #526b5b;       /* 学术检索：柔和灰绿 */
  --ws-search-bg: #e8eee9;
  --ws-search-edge: #bdccc1;
  --ws-lib-ink: #496b96;          /* 文献库：灰蓝 */
  --ws-lib-bg: #e9eff7;
  --ws-lib-edge: #8ba9d0;
  --ws-pdf-ink: #954f43;          /* PDF 阅读：柔和珊瑚 */
  --ws-pdf-bg: #f6dfd9;
  --ws-pdf-edge: #d49a8d;
  --color-lavender-ink: #705f91;  /* AI 相关辅助标识（规范 lavender-ink） */
  --color-lavender-tint: #f2eef8;

  /* 状态色：与文字或图标共同使用 */
  --color-success: #15803d;
  --color-warning: #9a5b00;
  --color-danger: #c9393e;

  /* 页顶细线：用三个工作区的颜色，串起检索、文献库、阅读 */
  --gradient-brand: linear-gradient(90deg, #526b5b 0%, #8ba9d0 50%, #d49a8d 100%);

  /* 唯一保持深色的块：终端 / 产品深色主题（规范深色 #1C1D22 / #ECEEF3） */
  --color-terminal-bg: #1c1d22;
  --color-terminal-text: #eceef3;
  --color-terminal-muted: #9aa1ae;
  --color-terminal-ok: #9ccdb5;
  --color-terminal-warn: #e0c889;

  /* 学术典籍预览版：全站衬线化（用户看过预览后要求），等宽仅留给数字/页码/眉标 */
  --font-editorial: "Noto Serif SC", "Songti SC", "STSong", "Source Han Serif SC", "SimSun", "Georgia", serif;
  --font-sans: var(--font-editorial);
  --font-display: var(--font-editorial);
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --shadow-book:
    0 1px 1px rgba(42, 32, 22, 0.06),
    0 4px 8px rgba(42, 32, 22, 0.05),
    0 16px 36px -8px rgba(42, 32, 22, 0.14),
    0 32px 64px -16px rgba(42, 32, 22, 0.10);

  /* 字号阶梯：12 · 13 · 14 · 15 · 18 · 21 · 28 · 36 · 48 · 60 */
  --text-xs: 12px;
  --text-sm: 13px;
  --text-md: 14px;
  --text-base: 15px;
  --text-lg: 18px;
  --text-xl: 21px;
  --text-2xl: 28px;
  --text-3xl: 36px;
  --text-4xl: 48px;
  --text-5xl: 60px;

  /* 间距（4 / 8 的倍数，规范 4 / 8 / 12 / 16 / 24 / 32） */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* 版心 */
  --container: 1200px;
  --gutter: 24px;
  --density: 1;

  /* 圆角：规范 按钮、输入框 8px，大面板 12px */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 12px;
  --radius-full: 999px;

  /* 阴影：暖色调，只用于浮起的菜单和产品窗口 */
  --shadow-xs: 0 1px 2px #2a201608;
  --shadow-sm: 0 1px 2px #2a20160d, 0 2px 6px #2a201608;
  --shadow-md: 0 14px 32px -16px #2a201624, 0 2px 6px #2a20160a;
  --shadow-float: 0 32px 64px -28px #2a201638, 0 8px 20px -12px #2a20161a;
  --shadow-inset-hairline: inset 0 1px 0 #ffffff;

/* 动效：150–220ms，ease-out（规范） */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --dur: 180ms;
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur: 0ms; }
}


