/* base.css —— 全局基座：reset / 排版 / 中文栈（master §6 P03） */

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

* { margin: 0; }

html { scroll-behavior: smooth; }        /* 设计源 index.css 照搬 */
html { scroll-padding-top: 64px; }       /* P15：fixed header 高度补偿，锚点目标不被遮 */

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-surface);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;             /* 设计源 index.css word-break 连续化 */
  word-break: break-word;
}

/* 标题：Latin 与数字优先 Space Grotesk，中文回退系统栈 */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-latin);
  font-family-optical-sizing: auto;
  line-height: 1.15;
  color: var(--c-ink);
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); font-weight: 800; }
h2 { font-size: var(--fs-h2); font-weight: 700; }
h3 { font-size: var(--fs-h3); font-weight: 700; }

p { line-height: 1.7; }

a {
  color: inherit;
  text-decoration: none;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; }

input, button, textarea, select { font: inherit; color: inherit; }

button { cursor: pointer; background: none; border: none; }

ul, ol { list-style: none; padding: 0; }

/* emoji 回退：含 emoji 的文本节点容器可叠加该类（master §6 P03） */
.font-emoji { font-family: var(--font-emoji); }

/* 品牌焦点环（P15 全站 Single Sink：键盘可见性；输入框/芯片/协议局部规则见各组件 css，选择器不含 input 无冲突） */
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 2px; }
