/* ==========================================================================
   base.css — reset、排版基线、可达性基线
   ========================================================================== */

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

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

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

/* figure 不在 UA reset 里，自带 margin:1em 40px，会把通栏图位顶破窄屏 */
h1, h2, h3, h4, h5, p, ul, ol, dl, dd, figure, blockquote, fieldset {
  margin: 0;
}

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

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

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

input {
  font: inherit;
  color: inherit;
}

strong, b {
  font-weight: 700;
}

hr {
  height: 1px;
  margin: 0;
  border: 0;
  background: var(--line);
}

/* 组件的 display 会盖掉 UA 的 [hidden]，这是筛选/折叠功能的前提 */
[hidden] {
  display: none !important;
}

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

::selection {
  background: #ffd9dc;
  color: var(--text);
}

/* 跳转链接：键盘用户第一个可聚焦元素 */
.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: var(--r-btn);
  background: var(--brand);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 700;
}

.skip:focus {
  top: 12px;
}

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