/* reset + 排版基线 */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text-body);
  background: var(--bg);
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
figure { margin: 0; } /* UA 默认 40px 边距会在窄屏撑破布局 */

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

[hidden] { display: none !important; }

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

h1, h2, h3 { color: var(--text); line-height: 1.25; font-weight: 900; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-title); font-weight: 700; }

code { font-family: ui-monospace, Consolas, monospace; }

/* 跳转链接：获焦才出现 */
.skip-link {
  position: absolute; left: var(--sp-4); top: -48px; z-index: 99;
  background: var(--bg-card); color: var(--text);
  padding: var(--sp-2) var(--sp-4); border-radius: var(--r-input);
  border: 1px solid var(--line);
}
.skip-link:focus { top: var(--sp-2); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
