/* ============================================================
   base.css — reset + 排版 + 焦点可见 + 必要兜底
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
[id] { scroll-margin-top: 100px; }

body {
  font-family: var(--font-cn);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, picture, svg, video { display: block; max-width: 100%; }
/* 🔴 图位 UA 默认 margin:1em 40px 会顶破移动端横向 —— 必须清零 */
figure { margin: 0; }

h1, h2, h3, h4 { font-family: var(--font-cn); font-weight: 900; line-height: 1.18; color: var(--text); }
h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); letter-spacing: -0.01em; }
h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); letter-spacing: -0.01em; }
h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); }

p { color: var(--text-3); }

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select { font-family: inherit; font-size: inherit; }

/* 🔴 筛选 / 手风琴等靠 [hidden] 隐藏，必须能压过组件的 display */
[hidden] { display: none !important; }

/* 焦点可见（键盘可达） */
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

/* 跳到主内容 */
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--brand-strong); color: #fff; padding: 10px 16px;
  border-radius: 8px; font-weight: 700; transition: top .15s ease;
}
.skip-link:focus { top: 16px; }

/* 选区 */
::selection { background: var(--brand); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
