/*
  Modern CSS Reset
  - 统一盒模型、移除默认内外边距
  - 改善排版与字体渲染
  - 规范媒体元素、表单元素的默认行为
  - 尊重 prefers-reduced-motion
*/

/* 盒模型与基础清零 */
:where(*, *::before, *::after) {
  box-sizing: border-box;
}

:where(*) {
  margin: 0;
  padding: 0;
}

/* 文档与排版基线 */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html:focus-within {
  scroll-behavior: smooth;
}

html, body {
  height: 100%;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background: #fff;
  color: #000;
}

/* 文字与标题 */
:where(h1, h2, h3, h4, h5, h6) {
  font-size: inherit;
  font-weight: inherit;
}

:where(code, kbd, samp, pre) {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 1em;
}

/* 链接与列表 */
a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* 媒体元素 */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

/* 表单元素 */
input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button, [type="button"], [type="reset"], [type="submit"] {
  cursor: pointer;
  -webkit-appearance: button;
  appearance: button;
  background: none;
  border: none;
}

textarea {
  resize: vertical;
}

/* 表格 */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* 动画与滚动 - 优先考虑减少动画的用户 */
@media (prefers-reduced-motion: reduce) {
  :where(html:focus-within) {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


