/* 基础层：重置、排版、以及浏览器默认表面的主题化（选区、光标、滚动条、focus）。 */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--ground);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
}

::selection { background: #cdd9de; color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
:focus:not(:focus-visible) { outline: none; }

input, textarea, select, button { font: inherit; color: inherit; }
input, textarea { caret-color: var(--accent); }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: var(--line-strong); }
h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2, h3, h4 { line-height: var(--lh-tight); letter-spacing: var(--tracking-tight); font-weight: 600; text-wrap: balance; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* 滚动条：从调色板取色，不保留浏览器默认 */
* { scrollbar-width: thin; scrollbar-color: #c9ced3 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #c9ced3;
  border: 3px solid transparent;
  border-radius: var(--r-pill);
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: #aeb6bd; background-clip: content-box; }

/* 通用排版工具 */
.t-display { font-size: var(--fs-2xl); letter-spacing: -0.03em; }
.t-title { font-size: var(--fs-xl); }
.t-sub { font-size: var(--fs-md); color: var(--ink-3); font-weight: 400; }
.t-muted { color: var(--ink-3); }
.t-faint { color: var(--ink-4); }
.t-small { font-size: var(--fs-sm); }
.t-xs { font-size: var(--fs-xs); }
.t-mono-num { font-variant-numeric: tabular-nums; }
.t-eyebrow {
  font-size: var(--fs-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ink-4);
  font-weight: 600;
}
.t-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-num { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

/* 布局工具 */
.row { display: flex; align-items: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: var(--s1); }
.gap-2 { gap: var(--s2); }
.gap-3 { gap: var(--s3); }
.gap-4 { gap: var(--s4); }
.gap-5 { gap: var(--s5); }
.gap-6 { gap: var(--s6); }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.app-shell { min-height: 100vh; }

.boot {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--s4);
}
.boot__mark {
  width: 34px; height: 34px; border-radius: var(--r-md);
  background: var(--primary);
  position: relative;
}
.boot__mark::after {
  content: ""; position: absolute; inset: 10px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 2px;
  border-bottom-color: transparent;
}
.boot__text { font-size: var(--fs-sm); color: var(--ink-4); letter-spacing: 0.04em; }
