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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  background-image: var(--glow);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 { margin: 0; font-weight: 620; letter-spacing: -.012em; color: var(--ink); }
h1 { font-size: 26px; line-height: 1.25; }
h2 { font-size: 19px; line-height: 1.3; }
h3 { font-size: 15px; line-height: 1.4; }
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
svg { flex: none; }

code, kbd, pre, .mono { font-family: var(--mono); font-size: .92em; font-feature-settings: "tnum" 1; }
pre { margin: 0; }

::selection { background: color-mix(in srgb, var(--brand) 24%, transparent); }

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--r-xs);
}

/* 细滚动条 */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--line-strong) 80%, transparent);
  border: 3px solid transparent;
  background-clip: padding-box;
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: var(--faint); background-clip: padding-box; }

/* ---------- 工具类 ---------- */
.u-row { display: flex; align-items: center; gap: 8px; }
.u-col { display: flex; flex-direction: column; gap: 8px; }
.u-wrap { flex-wrap: wrap; }
.u-between { justify-content: space-between; }
.u-grow { flex: 1 1 auto; min-width: 0; }
.u-mono { font-family: var(--mono); }
.u-muted { color: var(--muted); }
.u-faint { color: var(--faint); }
.u-xs { font-size: 12px; }
.u-sm { font-size: 13px; }
.u-lg { font-size: 16px; }
.u-bold { font-weight: 640; }
.u-nowrap { white-space: nowrap; }
.u-clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.u-hide { display: none !important; }
.u-center { text-align: center; }
.u-right { text-align: right; }
.u-mt8 { margin-top: 8px; }
.u-mt12 { margin-top: 12px; }
.u-mt16 { margin-top: 16px; }
.u-gap4 { gap: 4px; }
.u-gap12 { gap: 12px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--surface); color: var(--ink); padding: 10px 16px;
  border-radius: var(--r-sm); box-shadow: var(--shadow-md); transition: top .18s;
}
.skip-link:focus { top: 12px; }

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

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---- ×ֺŹ¤¾ß ---- */
.u-text-lg { font-size: 19px; letter-spacing: -0.02em; }
.u-text-xl { font-size: 24px; letter-spacing: -0.02em; }
