/* base.css — reset + 全局排版 + 通用工具类 */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: var(--fs-18);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-page);
  overflow: hidden;            /* 单屏房间，不滚动 */
  min-height: 100svh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
  color: var(--text-primary);
}
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
img { display: block; max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--accent-amber);
  outline-offset: 2px;
}

/* —— 通用工具类 —— */
.u-mono { font-family: var(--font-label); }
.u-muted { color: var(--text-muted); }
.u-serif-display { font-family: var(--font-display); }
.u-sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* 屏幕阅读器可访问的跳过热区提示 */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--bg-surface); color: var(--text-primary);
  padding: var(--sp-3) var(--sp-4); border: 1px solid var(--border);
}
.skip-link:focus { left: var(--sp-4); top: var(--sp-4); }

noscript .noscript-banner {
  position: fixed; inset: 0; display: grid; place-items: center;
  background: var(--bg-page); color: var(--text-primary);
  font-family: var(--font-body); padding: var(--sp-8); text-align: center;
}
