/* base.css — 重置与基础版式 */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  overflow-wrap: break-word;
}
h1, h2, h3, h4 { line-height: 1.35; margin: var(--s6) 0 var(--s4); font-weight: 650; }
h1 { font-size: var(--fs-h1); margin-top: var(--s4); }
h2 { font-size: var(--fs-h2); padding-bottom: var(--s2); border-bottom: 1px solid var(--line); }
h3 { font-size: var(--fs-h3); }
p, ul, ol { margin: 0 0 var(--s4); }
ul, ol { padding-left: 1.4em; }
li { margin-bottom: var(--s1); }
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s6) 0; }
strong { font-weight: 650; }
small, .small { font-size: var(--fs-small); color: var(--muted); }
img, svg { max-width: 100%; height: auto; }
figure { margin: var(--s5) 0; }
figcaption { font-size: var(--fs-small); color: var(--muted); margin-top: var(--s2); }

/* 表格：始终装入横向滚动容器（由 JS 包裹或直接书写 .table-wrap） */
.table-wrap { overflow-x: auto; margin: var(--s4) 0; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.5; }
th, td { text-align: left; padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--bg-sunk); font-weight: 650; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }

button { font-family: inherit; font-size: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: var(--s2) var(--s4); border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

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