/* ==========================================================================
   跑步活动大全 — tokens.css（唯一设计变量来源）
   来源：03-ui/home-ui-desktop.png 读色与读排版 + 首页实现时的落位值。
   改色 / 改字号 / 改间距只改这里；components.css / style.css / inner.css 只引用变量名。

   说明：site-design-system/extract.mjs 的自动抽取只扫 style.css 内部，而本项目的
   变量本来就集中在本文件，自动运行会把这里覆盖成只含 @media 覆盖值的残片。
   因此本文件按「抽取报告 + 人工命名」维护，语义名沿用抽取脚本的建议，见
   05-design-system/design-system.md 的对照表。
   ========================================================================== */

:root {
  /* ---------- 深色层（首屏 / 页脚） ---------- */
  --c-navy: #173260;
  --c-navy-deep: #122745;
  --c-navy-soft: #24406e;
  --c-footer: #172a4b;

  /* ---------- 强调色（页面唯一饱和暖色 + 一个功能蓝） ---------- */
  --c-amber: #f5c00e;
  --c-amber-hover: #ddab05;
  --c-amber-tint: #feedaa;
  --c-amber-line: #f3d98c;
  --c-blue: #2f6fd0;
  --c-blue-tint: #d7e6fa;

  /* ---------- 底色层 ---------- */
  --c-bg: #fbfcfe;
  --c-surface: #ffffff;
  --c-tint: #eef4fd;
  --c-tint-2: #e2f1fd;
  --c-panel: #e8f0ff;
  --c-head: #f1f7fe;

  /* ---------- 墨色层 ---------- */
  --c-ink: #1d2b3f;
  --c-ink-soft: #4a5a70;
  --c-ink-muted: #7b8a9e;
  --c-ink-invert: #eef4fd;
  --c-ink-invert-soft: #a9bdd8;
  --c-ink-invert-lead: #c2d2e6;

  /* ---------- 分隔线 ---------- */
  --c-line: #e4eaf3;
  --c-line-strong: #d3dce8;
  --c-line-invert: rgba(238, 244, 253, .16);

  /* ---------- 字体 ---------- */
  --f-body: "Noto Sans CJK SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --f-mono: "Noto Sans Mono CJK SC", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* ---------- 字号阶（按稿量取，升序便于做阶） ---------- */
  --fs-micro: 10.5px;
  --fs-tiny: 11.5px;
  --fs-small: 12.5px;
  --fs-body: 14px;
  --fs-h4: 15px;
  --fs-h3: 18px;
  --fs-h2: 20px;      /* 首页段头 / 内页小节 */
  --fs-lead: 18px;    /* 首屏导语 */
  --fs-hero-sm: 28px;
  --fs-h1: 38px;      /* 内页主标题 */
  --fs-hero: 42px;    /* 首页 h1 */

  /* ---------- 容器 ---------- */
  --wrap: 1440px;
  --pad: 36px;

  /* ---------- 形与影 ---------- */
  --r-s: 6px;
  --r-m: 10px;
  --r-l: 12px;
  --r-pill: 999px;
  --shadow-card: 0 1px 2px rgba(29, 43, 63, .04), 0 14px 30px -26px rgba(29, 43, 63, .4);
  --shadow-hover: 0 16px 30px -24px rgba(29, 43, 63, .55);

  /* ---------- 动效 ---------- */
  --t-fast: 140ms ease;
  --t-mid: 180ms ease;

  /* ---------- 分区预算（量稿所得，见 03-ui/compare-log.md） ---------- */
  --h-header: 72px;
  --h-hero: 356px;
  --h-topics: 302px;
  --h-spectrum: 240px;
  --h-week: 190px;
  --h-picks: 240px;
  --h-reads: 172px;
  --h-faq: 153px;
  --h-scope: 153px;
  --h-notice: 72px;
  --h-footer: 145px;
}

/* ---------- reset / 基础排版（三页共用） ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: var(--fs-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: .005em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--c-blue); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.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;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 90;
  background: var(--c-navy); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--r-s) 0;
}
.skip-link:focus { left: 0; }

.eyebrow {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: var(--fs-tiny);
  letter-spacing: .26em;
  text-transform: uppercase;
}
.section-head {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
}
.section-head h2 { font-size: var(--fs-h2); line-height: 1.3; }
.section-head p { font-size: var(--fs-small); color: var(--c-ink-muted); line-height: 1.5; }
.text-link {
  font-size: var(--fs-small); color: var(--c-blue);
  border-bottom: 1px solid var(--c-blue-tint);
  transition: border-color var(--t-fast), color var(--t-fast);
}
.text-link:hover { color: var(--c-navy); border-color: var(--c-blue); }

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