/* Soft Frosted Glass · base.css — 全局 reset + 画布光晕 + 排版基座
 * 保留既有 DOM 契约与旧钩子；注入域样式由各模块 content.css 自行收敛。
 */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scrollbar-color: var(--line-2) var(--bg-0); scroll-padding-top: var(--space-xl); }
body {
  margin: 0; background: var(--brand-bg, var(--bg-0)); color: var(--ink-0);
  font-family: var(--font-body); font-size: var(--text-sm); line-height: 1.5;
  -webkit-font-smoothing: antialiased; caret-color: var(--accent);
  font-variant-numeric: tabular-nums;
  position: relative;
}

/* ===== 背景弥散光晕（仅扩展页面；固定不随内容滚动）===== */
body::before, body::after {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-repeat: no-repeat;
}
body::before {
  background-image: radial-gradient(460px 360px at 10% -10%, var(--accent-glow, oklch(80% 0.06 70 / .18)), transparent 72%);
}
body::after {
  background-image: radial-gradient(420px 340px at 110% 112%, var(--accent-glow, oklch(80% 0.06 70 / .12)), transparent 72%);
}
/* 让正文浮在光晕之上 */
body > * { position: relative; z-index: 1; }

::selection { background: color-mix(in oklab, var(--accent) 34%, transparent); color: var(--ink-0); }
:focus-visible { outline: var(--focus-outline); outline-offset: 2px; }
a { color: var(--accent-txt); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }

h1, h2, h3, h4 {
  margin: 0; font-family: var(--font-display); font-weight: var(--display-weight, 650);
  font-synthesis: none; letter-spacing: var(--tracking-display); line-height: 1.12;
  overflow-wrap: break-word; min-width: 0; text-wrap: balance; color: var(--ink-0);
}
h1 { font-size: var(--text-display); }
h2 { font-size: var(--text-section); }
h3 { font-size: var(--text-title); }
h4 { font-size: var(--text-md); }
p { margin: 0; text-wrap: pretty; }
p:not([class]) { max-width: 68ch; }
.lead { font-size: var(--text-lead); line-height: 1.5; max-width: 56ch; color: var(--ink-1); }

/* 衬线标题点缀类（品牌主标题 / 空状态使用）*/
.serif, h1.serif { font-family: var(--font-serif); letter-spacing: -0.01em; }

/* 分组题头：前导短线 */
.section-label {
  display: flex; align-items: center; gap: var(--space-xs);
  font: 600 var(--text-eyebrow)/1.2 var(--font-display);
  letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--accent-txt);
}
.section-label::before { content: ""; width: 14px; height: 2px; background: var(--accent); flex: 0 0 auto; }

/* 读数：等宽数字 + tabular */
.figure, .readout {
  font-family: var(--font-mono); font-weight: 600; font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em; color: var(--ink-0);
  border-bottom: 1px solid var(--line-1); padding-bottom: 2px;
}
.figure { font-size: var(--text-2xl); }
.readout { font-size: var(--text-lg); }
.num, td.num, .figure, .readout { font-variant-numeric: tabular-nums; }

img, video { max-width: 100%; height: auto; display: block; }
svg { display: block; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); box-sizing: border-box; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ===== 玻璃工具类 ===== */
.glass-1 { background: var(--glass-1); -webkit-backdrop-filter: var(--glass-1-blur); backdrop-filter: var(--glass-1-blur); border: var(--rule-hair) solid var(--glass-edge); box-shadow: var(--glass-inner-highlight), var(--shadow-card); }
.glass-2 { background: var(--glass-2); -webkit-backdrop-filter: var(--glass-2-blur); backdrop-filter: var(--glass-2-blur); border: var(--rule-hair) solid var(--glass-edge-strong); box-shadow: var(--glass-inner-highlight), var(--shadow-lift); }
.glass-3 { background: var(--glass-3); -webkit-backdrop-filter: var(--glass-3-blur); backdrop-filter: var(--glass-3-blur); border: var(--rule-hair) solid var(--glass-edge); }

/* 浏览器表面主题化 */
:root { scrollbar-width: thin; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--line-1); border-radius: 999px; border: 2px solid var(--bg-0); }
::-webkit-scrollbar-thumb:hover { background: var(--line-2); }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline-color: var(--accent); }
input, textarea { caret-color: var(--accent); }

@media (max-width: 60rem) { :root { --gutter: 20px; --section-gap-s: 64px; --section-gap: 80px; --section-gap-l: 104px; } }
@media (max-width: 40rem) { :root { --gutter: 14px; --section-gap-s: 48px; --section-gap: 64px; --section-gap-l: 80px; --gap-columns: 16px; } }
@media (prefers-reduced-motion: reduce) {
  *:not(.keep-motion), *:not(.keep-motion)::before, *:not(.keep-motion)::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
}
