/* ==========================================================================
   base.css — reset + 基础排版 + 无障碍。只管「默认长什么样」，不管组件外观
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: var(--fs-6);
  line-height: 1.78;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.01em;
}

p { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; border-style: none; }

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

/* 注意：这里不能用 font: 简写 —— 它的优先级会盖掉组件自己的字号 */
button { font-family: inherit; font-size: inherit; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

strong, b { font-weight: 700; }

/* 筛选 / 折叠靠 el.hidden = true，组件里的 display:flex 会盖掉 UA 样式 */
[hidden] { display: none !important; }

/* 锚点跳转时给吸顶元素留出余量 */
[id] { scroll-margin-block-start: var(--sp-6); }

:focus-visible {
  outline: 2px solid var(--fill);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

::selection { background: rgba(106, 88, 232, .22); }

/* ── 工具类 ───────────────────────────────────────────────────────────── */

/* 等宽数字：数据条、版本号、步骤序号共用 */
.num {
  font-family: var(--font-num);
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
}

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

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -80px;
  z-index: 60;
  padding: 10px 18px;
  border-radius: var(--r-sm);
  background: var(--fill);
  color: var(--on-fill);
  font-size: var(--fs-5);
  white-space: nowrap;
  transition: top .16s ease;
}
.skip-link:focus { top: var(--sp-4); text-decoration: none; }

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