/* ==========================================================
   续历 · 外壳 tokens + 基础
   两个命名空间，永不串味：
   · 外壳（屏幕 UI）：--fg / --surface / --hair / --cursor …
   · 纸面（A4 文档）：--ink / --muted / --accent / --line / --fs-* …（见 paper.css，由主题注入）
   ========================================================== */
:root {
  --fg: #0A0A0A;
  --fg-2: #5C5C5C;        /* 次要文字：白底 6.5:1 */
  --fg-3: #6F6F6F;        /* 元信息：12–13px 小字，白底 5.0:1 / 灰底 4.9:1，过 AA */
  --surface: #FFFFFF;
  --surface-2: #FAFAFA;
  --surface-3: #F4F4F5;
  --hair: #ECECEC;
  --hair-2: #DCDCDC;
  --cursor: #FF4F00;      /* 光标橙：只表示「正在发生」——未保存、刚更新、待处理 */
  --cursor-soft: #FFF2EC;
  --danger: #C2311A;
  --ok: #1F7A4D;

  --font-ui: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --r-sm: 6px;
  --r: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --sh-1: 0 1px 2px rgba(0, 0, 0, .04);
  --sh-2: 0 1px 2px rgba(0, 0, 0, .04), 0 12px 32px -12px rgba(0, 0, 0, .18);
  --sh-3: 0 2px 6px rgba(0, 0, 0, .04), 0 28px 80px -24px rgba(0, 0, 0, .28);
  --sh-paper: 0 1px 3px rgba(0, 0, 0, .06), 0 16px 48px -20px rgba(0, 0, 0, .22);
  --bar-h: 56px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--surface); color: var(--fg);
  font-family: var(--font-ui); font-size: 14px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; font-weight: inherit; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--cursor-soft); }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; border-radius: 4px; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--fg-2); }
.faint { color: var(--fg-3); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

