/* ===========================================================
   base.css — reset + 排版底色。全站共用的最小可读底座。
   =========================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;   /* 锚点跳转时别被吸顶 header 盖住 */
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-cn);
  font-size: var(--t-body);
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;          /* 兜底：任何一处溢出都不让整页横滚 */
}

/* 移动导航展开时锁住背后滚动 */
body.is-nav-open { overflow: hidden; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--text);
}

h1 { font-size: var(--t-h1); line-height: var(--t-h1-lh); font-weight: 800; }
h2 { font-size: var(--t-h2); line-height: var(--t-h2-lh); }
h3 { font-size: var(--t-h3); line-height: 1.5; font-weight: 600; }

p, figure, blockquote { margin: 0; }

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

a {
  color: var(--brand-mark);
  text-decoration: none;
}
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* 图片：永远不撑破容器，且默认带宽高防抖 */
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

button { font: inherit; color: inherit; cursor: pointer; }

/* 焦点环只在键盘导航时出现，鼠标点击不打扰 */
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }

/* 关键：这条必须优先于任何 .nav / .card 的 display:flex，
   否则 JS 加 hidden 也压不住 */
[hidden] { display: none !important; }

::selection { background: var(--brand); color: var(--brand-ink); }

/* —— 排版原子 —— */
.eyebrow {                    /* 区块眉标：蓝色小号 SemiBold */
  font-size: var(--t-eyebrow);
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--brand-mark);
}

.lede {                       /* 长文 / Lede，只准出现在一档宽度里 */
  font-size: var(--t-body);
  line-height: 1.75;
  color: var(--text-body);
  max-width: var(--w-prose);
}

.meta {
  font-size: var(--t-meta);
  color: var(--text-muted);
}

.num {                        /* 数字 / 英文用 Outfit 位 */
  font-family: var(--font-num);
  font-feature-settings: "tnum" 1;
}

.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;
}

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