/* ============================================================
   reset.css — 全局重置与基础样式
   统一浏览器默认行为，建立最小的可预期基线
   ============================================================ */

/* ---- 盒模型统一 ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ---- HTML / Body 基础 ---- */
html {
  font-size: 100%;                    /* 尊重用户浏览器默认字号 */
  -webkit-text-size-adjust: 100%;     /* 禁止 iOS 横屏时缩放文字 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  font-family: var(--pv-font-body);
  font-size: var(--pv-text-base);
  line-height: 1.6;
  color: var(--pv-text);
  background-color: var(--pv-canvas);
  min-height: 100vh;
}

/* ---- 滚动条美化 (WebKit) ---- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.22);
}

/* ---- 滚动条美化 (Firefox) ---- */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.12) transparent;
}

/* ---- 跳转到主内容（无障碍） ---- */
.pv-skip-link {
  position: absolute;
  top: -100%;
  left: var(--pv-space-4);
  z-index: 9999;
  padding: var(--pv-space-2) var(--pv-space-4);
  background: var(--pv-accent);
  color: #000;
  font-size: var(--pv-text-sm);
  font-weight: 600;
  border-radius: var(--pv-radius-sm);
  text-decoration: none;
  transition: top var(--pv-duration-fast) var(--pv-ease);
}

.pv-skip-link:focus {
  top: var(--pv-space-4);
}

/* ---- 键盘焦点指示 ---- */
:focus-visible {
  outline: 2px solid var(--pv-accent);
  outline-offset: 2px;
}

/* ---- 图片默认 ---- */
img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ---- 链接继承颜色 ---- */
a {
  color: inherit;
  text-decoration: none;
}

/* ---- 按钮重置 ---- */
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ---- 列表重置 ---- */
ul, ol {
  list-style: none;
}

/* ---- 表单元素继承字体 ---- */
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* ---- 标题默认 ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--pv-font-display);
  font-weight: 600;
  line-height: 1.2;
}

/* ---- 选中文本颜色 ---- */
::selection {
  background: var(--pv-accent-glow);
  color: var(--pv-accent);
}
