/* ══════════════════════════════════════════════════════════
   qiuyiwu.com 设计系统 · Base 层
   reset + 排版基线 + 无障碍兜底。依赖 tokens.css，不依赖别的。

   ⚠️ 这一层的存在意义：让页面可以【不再加载 styles.css】。
      老的 styles.css 会在 body 上挂三样东西 ——
        animation: ambientWash 26s   （给一个已被替换掉的渐变背景做无休止合成）
        body::before  颗粒噪点层，fixed 全屏，mix-blend-mode: soft-light
        body::after   扫描线 + 光带层，fixed 全屏
      它们会盖在新设计的平底纸面上。焦点环与 reduced-motion 本来只能从
      styles.css 继承，现在搬到这里，断开依赖后不会丢。
   ══════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--v-bg);
  color: var(--v-ink);
  font-family: var(--v-font-cn);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--t-slow), color var(--t-slow);
}

a { color: inherit; text-decoration: none; }
img, svg, video { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
::selection { background: var(--v-ink); color: var(--v-bg); }

/* 标题默认走宋体，正文走黑体 —— 这是本站排版的基本盘 */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--v-font-cn-serif);
  color: var(--v-ink);
  font-weight: 600;
  line-height: var(--lh-title);
}

/* 中文不使用斜体：即使沿用旧标记也强制回正。
   拉丁文与数字仍可斜（Source Serif 4 的意大利体是有意为之）。 */
:lang(zh) em, :lang(zh) i, :lang(zh) cite { font-style: normal; }

code, kbd, samp, pre { font-family: var(--v-font-mono); font-size: .92em; }

/* ── 无障碍：键盘可见焦点 ──────────────────────────────
   从 styles.css 搬来。绝不用 outline:none 抹掉焦点而不给替代。 */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--v-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── 无障碍：尊重「减弱动态效果」──────────────────────
   从 styles.css 搬来。这是兜底规则，压到 .001ms 而不是 0，
   避免某些浏览器把 0s 动画的 animationend 事件吞掉。 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .001ms !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ── 跳到主内容（屏幕阅读器 / 键盘用户）──────────────── */
.ds-skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--v-ink); color: var(--v-bg);
  padding: var(--sp-3) var(--sp-5); border-radius: 0 0 var(--r-sm) 0;
  font-size: var(--fs-sm); font-weight: 600;
}
.ds-skip:focus { left: 0; }
