/* 重置 + 基础排版 */
*,
*::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: var(--lh-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

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

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: var(--lh-title);
  letter-spacing: -0.01em;
}

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

a:hover {
  color: var(--brand-hover);
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

/* 按钮回归中性：不继承系统控件的边框/底色/居中，样式交给组件类 */
button {
  font: inherit;
  color: inherit;
  text-align: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

strong {
  font-weight: 600;
}

code,
kbd,
pre {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

/* 筛选 / 折叠靠 [hidden] 生效，必须压过组件的 display */
[hidden] {
  display: none !important;
}

/* 焦点可见：键盘用户能看到自己在哪 */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* 跳到主内容 */
.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r-btn);
  background: var(--brand);
  color: #fff;
  font-size: var(--fs-xs);
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

/* 仅供读屏 */
.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;
}

/* 小标签、面包屑共用的小字号 */
.eyebrow {
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--brand);
}

@media (max-width: 640px) {
  :root {
    --fs-display: 32px;
    --fs-h1: 28px;
    --fs-h2: 26px;
    --fs-h3: 24px;
    --fs-h4: 22px;
    --fs-h5: 20px;
    --fs-lead: 16px;
    --fs-body: 16px;
    --fs-sm: 15px;
    --lh-body: 1.75;
    --sec-y: 56px;
    --container-x: 20px;
  }
}
