/* ==========================================================================
   简历通 ResumeForge 官网样式
   ---------------------------------------------------------------------------
   设计语言：克制的科技感。一个画布、一个强调色、一套动效语汇。
   1. 设计令牌        2. 基础重置        3. 无障碍工具类    4. 按钮
   5. 导航            6. Hero            7. 产品磁贴        8. 界面画廊
   9. 工作流          10. 功能网格       11. 技术栈         12. 下载区
   13. 页脚           14. 动效           15. 响应式
   ========================================================================== */

/* ==========================================================================
   1. 设计令牌
   ========================================================================== */

/* 把关键的色彩令牌注册成真正的 <color> 类型：
   只有这样 `transition: --canvas …` 才会逐帧插值，主题切换时
   由这些变量派生的一切（含渐变）都会跟着平滑过渡，而不是硬跳。 */
@property --canvas { syntax: "<color>"; inherits: true; initial-value: #f7f9fc; }
@property --surface { syntax: "<color>"; inherits: true; initial-value: #ffffff; }
@property --parchment { syntax: "<color>"; inherits: true; initial-value: #e8eef7; }
@property --pearl { syntax: "<color>"; inherits: true; initial-value: #f2f6fc; }
@property --ink { syntax: "<color>"; inherits: true; initial-value: #273b5c; }
@property --ink-muted { syntax: "<color>"; inherits: true; initial-value: #5c6d8a; }
@property --ink-faint { syntax: "<color>"; inherits: true; initial-value: #63738a; }
@property --hairline { syntax: "<color>"; inherits: true; initial-value: #dfe7f2; }
@property --hairline-strong { syntax: "<color>"; inherits: true; initial-value: #cdd9ea; }
@property --primary { syntax: "<color>"; inherits: true; initial-value: #3a5479; }
@property --primary-hover { syntax: "<color>"; inherits: true; initial-value: #2c4160; }
@property --accent { syntax: "<color>"; inherits: true; initial-value: #3a68c8; }
@property --accent-hover { syntax: "<color>"; inherits: true; initial-value: #2f60bf; }
@property --accent-weak { syntax: "<color>"; inherits: true; initial-value: rgba(58, 104, 200, 0.1); }
@property --nav-bg { syntax: "<color>"; inherits: true; initial-value: rgba(247, 249, 252, 0.72); }
@property --nav-mobile-bg { syntax: "<color>"; inherits: true; initial-value: rgba(247, 249, 252, 0.96); }
@property --pool { syntax: "<color>"; inherits: true; initial-value: rgba(58, 104, 200, 0.09); }
@property --pool-soft { syntax: "<color>"; inherits: true; initial-value: rgba(58, 104, 200, 0.065); }
@property --pool-strong { syntax: "<color>"; inherits: true; initial-value: rgba(58, 104, 200, 0.12); }
@property --glow-core { syntax: "<color>"; inherits: true; initial-value: #dfe8f6; }
@property --glow-mid { syntax: "<color>"; inherits: true; initial-value: rgba(232, 238, 247, 0.5); }
@property --glow-edge { syntax: "<color>"; inherits: true; initial-value: rgba(247, 249, 252, 0); }
@property --pool-fade { syntax: "<color>"; inherits: true; initial-value: rgba(58, 104, 200, 0); }
@property --card-hover-border { syntax: "<color>"; inherits: true; initial-value: #c3d4ec; }
/* 文档页的提醒框（warn 变体）用到的两个色，同样要能随主题平滑过渡 */
@property --warn-ink { syntax: "<color>"; inherits: true; initial-value: #8a5a12; }
@property --warn-bg { syntax: "<color>"; inherits: true; initial-value: rgba(214, 158, 46, 0.13); }

:root {
  /* 品牌色（--accent 同时用于文字与实底按钮，取值需在两种场景都满足 4.5:1） */
  --primary: #3a5479;            /* 石板蓝：主按钮 */
  --primary-hover: #2c4160;
  --accent: #3a68c8;             /* 亮蓝：链接、点缀、活动态 */
  --accent-hover: #2f60bf;
  --accent-weak: rgba(58, 104, 200, 0.1);

  /* 表面与文字 */
  --canvas: #f7f9fc;
  --surface: #ffffff;
  --parchment: #e8eef7;
  --pearl: #f2f6fc;
  --ink: #273b5c;
  --ink-muted: #5c6d8a;
  --ink-faint: #63738a;
  --hairline: #dfe7f2;
  --hairline-strong: #cdd9ea;

  /* 主题相关装饰 */
  --nav-bg: rgba(247, 249, 252, 0.72);
  --nav-mobile-bg: rgba(247, 249, 252, 0.96);
  --glow-core: #dfe8f6;
  --glow-mid: rgba(232, 238, 247, 0.5);
  --glow-edge: rgba(247, 249, 252, 0);
  --hero-glow: radial-gradient(120% 90% at 50% -10%, var(--glow-core) 0%, var(--glow-mid) 42%, var(--glow-edge) 72%);
  --pool: rgba(58, 104, 200, 0.09);
  --pool-soft: rgba(58, 104, 200, 0.065);
  --pool-strong: rgba(58, 104, 200, 0.12);
  --pool-fade: rgba(58, 104, 200, 0);
  --card-hover-border: #c3d4ec;
  --scrollbar-thumb: #c7d5ea;
  --img-ring: 0 0 0 0 rgba(0, 0, 0, 0);
  --warn-ink: #8a5a12;
  --warn-bg: rgba(214, 158, 46, 0.13);

  /* 主题过渡：时长 + 曲线 */
  --theme-dur: 420ms;
  transition:
    --canvas var(--theme-dur) var(--ease-in-out),
    --surface var(--theme-dur) var(--ease-in-out),
    --parchment var(--theme-dur) var(--ease-in-out),
    --pearl var(--theme-dur) var(--ease-in-out),
    --ink var(--theme-dur) var(--ease-in-out),
    --ink-muted var(--theme-dur) var(--ease-in-out),
    --ink-faint var(--theme-dur) var(--ease-in-out),
    --hairline var(--theme-dur) var(--ease-in-out),
    --hairline-strong var(--theme-dur) var(--ease-in-out),
    --primary var(--theme-dur) var(--ease-in-out),
    --primary-hover var(--theme-dur) var(--ease-in-out),
    --accent var(--theme-dur) var(--ease-in-out),
    --accent-hover var(--theme-dur) var(--ease-in-out),
    --accent-weak var(--theme-dur) var(--ease-in-out),
    --nav-bg var(--theme-dur) var(--ease-in-out),
    --nav-mobile-bg var(--theme-dur) var(--ease-in-out),
    --pool var(--theme-dur) var(--ease-in-out),
    --pool-soft var(--theme-dur) var(--ease-in-out),
    --pool-strong var(--theme-dur) var(--ease-in-out),
    --glow-core var(--theme-dur) var(--ease-in-out),
    --glow-mid var(--theme-dur) var(--ease-in-out),
    --glow-edge var(--theme-dur) var(--ease-in-out),
    --pool-fade var(--theme-dur) var(--ease-in-out),
    --card-hover-border var(--theme-dur) var(--ease-in-out),
    --warn-ink var(--theme-dur) var(--ease-in-out),
    --warn-bg var(--theme-dur) var(--ease-in-out);

  /* 间距节奏（8 阶） */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;

  /* 圆角 */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-pill: 999px;

  /* 动效语汇 */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-1: 140ms;
  --dur-2: 220ms;
  --dur-3: 380ms;
  --dur-4: 720ms;

  /* 阴影层级：层级越高越"浮"，产品截图用独立的 --shadow-shot */
  --shadow-1: 0 1px 2px rgba(39, 59, 92, 0.05);
  --shadow-2: 0 8px 24px -12px rgba(39, 59, 92, 0.18);
  --shadow-shot: rgba(39, 59, 92, 0.16) 3px 5px 30px 0;
  --shadow-btn: inset 0 1px 0 rgba(255, 255, 255, 0.16);

  /* 字体 */
  --font-display: "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-text: "SF Pro Text", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Courier New", monospace;

  /* 布局 */
  --shell: 1080px;
  --shell-wide: 1200px;
  --nav-h: 60px;
}

/* 深色模式 */
:root[data-theme="dark"] {
  color-scheme: dark;

  --primary: #5b8ae0;
  --primary-hover: #6f9bf0;
  --accent: #6f9cf0;
  --accent-hover: #87aef6;
  --accent-weak: rgba(111, 156, 240, 0.16);

  --canvas: #0e1725;
  --surface: #16233a;
  --parchment: #1b2a44;
  --pearl: #1f3050;
  --ink: #eef3fb;
  --ink-muted: #a8b8d0;
  --ink-faint: #7d8fa9;
  --hairline: #27374f;
  --hairline-strong: #35486a;

  --nav-bg: rgba(14, 23, 37, 0.72);
  --nav-mobile-bg: rgba(14, 23, 37, 0.96);
  --glow-core: #1d2f4d;
  --glow-mid: rgba(22, 35, 58, 0.55);
  --glow-edge: rgba(14, 23, 37, 0);
  --hero-glow: radial-gradient(120% 90% at 50% -10%, var(--glow-core) 0%, var(--glow-mid) 42%, var(--glow-edge) 72%);
  --pool: rgba(111, 156, 240, 0.13);
  --pool-soft: rgba(111, 156, 240, 0.09);
  --pool-strong: rgba(111, 156, 240, 0.17);
  --pool-fade: rgba(111, 156, 240, 0);
  --card-hover-border: #3c5680;
  --scrollbar-thumb: #2f4260;
  --img-ring: 0 0 0 1px rgba(255, 255, 255, 0.1);
  --warn-ink: #e0b070;
  --warn-bg: rgba(224, 176, 112, 0.14);

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 10px 26px -14px rgba(0, 0, 0, 0.7);
  --shadow-shot: rgba(0, 0, 0, 0.5) 3px 5px 30px 0;
  --shadow-btn: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   2. 基础重置
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.011em;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.022em;
  text-wrap: balance;
}

p { text-wrap: pretty; }

img {
  display: block;
  max-width: 100%;
  height: auto;
  -webkit-user-drag: none;
}

/* picture 只是包装容器，别影响原有布局 */
picture { display: block; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--dur-1) var(--ease-out);
}

ul, ol { list-style: none; }

code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  padding: 0.14em 0.42em;
  border-radius: var(--r-xs);
  color: var(--primary);
  background: var(--parchment);
}

button { font: inherit; color: inherit; }

::selection { background: rgba(74, 123, 216, 0.2); }

/* 焦点态：全站统一，键盘可见、鼠标不打扰 */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

/* 锚点跳转时给吸顶导航留出空间 */
:target,
section[id],
main[id] { scroll-margin-top: calc(var(--nav-h) + 24px); }

/* ==========================================================================
   3. 无障碍工具类
   ========================================================================== */
.skip-link {
  position: absolute;
  top: var(--sp-3);
  left: 50%;
  transform: translate(-50%, -160%);
  z-index: 200;
  padding: 10px 20px;
  border-radius: var(--r-pill);
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-2);
  transition: transform var(--dur-2) var(--ease-out);
}
.skip-link:focus,
.skip-link:focus-visible { transform: translate(-50%, 0); outline-offset: 0; }

/* ==========================================================================
   4. 按钮
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 15px 30px;
  border: none;
  border-radius: var(--r-pill);
  font-size: 17px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition:
    background-color var(--dur-2) var(--ease-out),
    box-shadow var(--dur-2) var(--ease-out),
    transform var(--dur-1) var(--ease-out),
    color var(--dur-2) var(--ease-out);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.975); }
.btn svg { flex: none; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-btn), var(--shadow-1);
}
.btn-primary:hover { background: var(--primary-hover); box-shadow: var(--shadow-btn), var(--shadow-2); }

.btn-accent {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow-btn), var(--shadow-1);
}
.btn-accent:hover { background: var(--accent-hover); box-shadow: var(--shadow-btn), var(--shadow-2); }

.btn-ghost {
  background: var(--surface);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.btn-ghost:hover { background: var(--pearl); box-shadow: inset 0 0 0 1px var(--hairline-strong); }

/* ==========================================================================
   5. 导航
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition:
    background-color var(--dur-2) var(--ease-out),
    border-color var(--dur-2) var(--ease-out),
    box-shadow var(--dur-2) var(--ease-out);
}
.nav.scrolled {
  border-bottom-color: var(--hairline);
  box-shadow: var(--shadow-1);
}

.nav-inner {
  max-width: var(--shell-wide);
  margin: 0 auto;
  height: var(--nav-h);
  padding: 0 var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  transition: height var(--dur-3) var(--ease-out);
}
.nav.scrolled .nav-inner { height: 52px; }

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  transition: opacity var(--dur-2) var(--ease-out);
}
.nav-brand:hover { opacity: 0.75; }
.nav-logo { width: 26px; height: 26px; border-radius: var(--r-xs); }
.nav-title { font-size: 17px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.nav-title-en {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-faint);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.nav-links {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-2);
}

.nav-link {
  position: relative;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  font-size: 14px;
  color: var(--ink-muted);
  transition:
    color var(--dur-2) var(--ease-out),
    background-color var(--dur-2) var(--ease-out);
}
.nav-link:hover { color: var(--ink); background: var(--accent-weak); }
.nav-link.is-active { color: var(--accent); background: var(--accent-weak); font-weight: 600; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex: none;
}

/* 图标按钮：主题切换 + GitHub */
.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: none;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  transition:
    background-color var(--dur-2) var(--ease-out),
    color var(--dur-2) var(--ease-out),
    transform var(--dur-1) var(--ease-out);
}
.icon-btn:hover { background: var(--accent-weak); color: var(--ink); }
.icon-btn:active { transform: scale(0.92); }

.nav-github {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-btn), var(--shadow-1);
}
.nav-github:hover { background: var(--accent-hover); color: #fff; box-shadow: var(--shadow-btn), var(--shadow-2); }

/* 日 / 月图标叠放，切换时交叉淡入 + 旋转，避免硬切 */
.theme-toggle svg {
  position: absolute;
  inset: 0;
  margin: auto;
  transition:
    opacity var(--dur-3) var(--ease-out),
    transform var(--dur-3) var(--ease-out);
}
.theme-toggle .icon-moon { opacity: 1; transform: rotate(0deg) scale(1); }
.theme-toggle .icon-sun { opacity: 0; transform: rotate(-70deg) scale(0.5); }
:root[data-theme="dark"] .theme-toggle .icon-moon { opacity: 0; transform: rotate(70deg) scale(0.5); }
:root[data-theme="dark"] .theme-toggle .icon-sun { opacity: 1; transform: rotate(0deg) scale(1); }

/* 汉堡按钮 */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  flex: none;
  padding: 0 8px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: background-color var(--dur-2) var(--ease-out);
}
.nav-burger:hover { background: var(--accent-weak); }
.nav-burger span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform var(--dur-2) var(--ease-out), opacity var(--dur-2) var(--ease-out);
}
.nav-burger.open span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

/* 移动端下拉：高度动画，展开更顺滑 */
.nav-mobile {
  display: flex;
  flex-direction: column;
  max-height: 0;
  overflow: hidden;
  padding: 0 var(--sp-5);
  background: var(--nav-mobile-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  transition: max-height var(--dur-3) var(--ease-out), padding var(--dur-3) var(--ease-out);
}
.nav-mobile.open { max-height: 280px; padding: var(--sp-2) var(--sp-5) var(--sp-5); }
.nav-mobile a {
  padding: 13px 0;
  font-size: 17px;
  color: var(--ink);
  border-bottom: 1px solid var(--hairline);
  transition: color var(--dur-2) var(--ease-out);
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover { color: var(--accent); }

/* ==========================================================================
   6. Hero
   ========================================================================== */
.hero {
  padding: var(--sp-9) var(--sp-5) 80px;
  text-align: center;
  background: var(--hero-glow), var(--canvas);
}
.hero-copy { max-width: 820px; margin: 0 auto; }

.hero-eyebrow {
  display: inline-block;
  margin-bottom: var(--sp-5);
  padding: 7px 16px;
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--primary);
}

.hero-title {
  font-size: 56px;
  line-height: 1.07;
  letter-spacing: -0.03em;
  margin-bottom: var(--sp-5);
}

/* 品牌名当主标题 */
.hero-title--brand {
  font-size: clamp(64px, 9vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin-bottom: var(--sp-4);
}


.hero-sub {
  font-size: 21px;
  line-height: 1.55;
  color: var(--ink-muted);
  margin-bottom: var(--sp-6);
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: var(--sp-4);
  margin-bottom: 72px;
}

.hero-shot,
.tile-shot {
  max-width: 1120px;
  margin: 0 auto;
}
.hero-shot img,
.tile-shot img {
  border-radius: var(--r-md);
  box-shadow: var(--shadow-shot), var(--img-ring);
  transition: transform var(--dur-4) var(--ease-out);
}
@media (hover: hover) {
  .hero-shot img:hover,
  .tile-shot img:hover,
  .gallery-item img:hover { transform: scale(1.004); }
}

.shot-caption {
  margin-top: var(--sp-4);
  font-size: 14px;
  color: var(--ink-faint);
  text-align: center;
}

/* ==========================================================================
   7. 产品磁贴
   ========================================================================== */
.tile {
  padding: var(--sp-9) var(--sp-5);
  text-align: center;
}
.tile-copy { max-width: 720px; margin: 0 auto var(--sp-8); }
.tile h2 { font-size: 40px; line-height: 1.1; margin-bottom: var(--sp-4); }
.tile p { font-size: 19px; line-height: 1.6; color: var(--ink-muted); }

/* 柔光分区：上下边缘长距离渐隐，不切断画布 */
.tile-panel {
  background: linear-gradient(
    180deg,
    var(--pool-fade) 0%,
    var(--pool) 22%,
    var(--pool) 78%,
    var(--pool-fade) 100%
  );
}
.tile-plain { background: transparent; }

/* 区块小标签 */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.section-eyebrow::before {
  content: "";
  width: 18px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.55;
}

.link-accent {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--sp-5);
  font-size: 17px;
  color: var(--accent);
}
.link-accent::after {
  content: "";
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform var(--dur-2) var(--ease-out);
}
.link-accent:hover::after { transform: rotate(-45deg) translate(2px, 2px); }

/* ==========================================================================
   8. 界面一览（横向画廊）
   ========================================================================== */
.gallery {
  padding: var(--sp-9) 0;
  background: transparent;
}
.gallery-head {
  position: relative;
  max-width: 720px;
  margin: 0 auto var(--sp-8);
  padding: 0 var(--sp-5);
  text-align: center;
}
.gallery-head h2 { font-size: 40px; line-height: 1.1; margin-bottom: var(--sp-4); }
.gallery-head p { font-size: 19px; color: var(--ink-muted); }

.gallery-nav {
  display: flex;
  justify-content: center;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}
.gallery-btn {
  width: 40px;
  height: 40px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline);
  color: var(--primary);
}
.gallery-btn:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--hairline-strong); }
.gallery-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.gallery-btn svg { transition: transform var(--dur-2) var(--ease-out); }

.gallery-track {
  display: flex;
  gap: var(--sp-5);
  overflow-x: auto;
  padding: var(--sp-2) var(--sp-5) var(--sp-5);
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--sp-5);
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}
.gallery-track::-webkit-scrollbar { height: 8px; }
.gallery-track::-webkit-scrollbar-track { background: transparent; }
.gallery-track::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: var(--r-pill);
}
.gallery-track.is-dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.gallery-track.is-dragging img { pointer-events: none; }

.gallery-item {
  flex: none;
  width: min(680px, 80vw);
  scroll-snap-align: center;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 14px;
  transition:
    border-color var(--dur-3) var(--ease-out),
    box-shadow var(--dur-3) var(--ease-out),
    transform var(--dur-3) var(--ease-out);
}
@media (hover: hover) {
  .gallery-item:hover {
    border-color: var(--card-hover-border);
    box-shadow: var(--shadow-2);
    transform: translateY(-3px);
  }
}
.gallery-item img {
  border-radius: 10px;
  box-shadow: var(--shadow-shot), var(--img-ring);
}
.gallery-item figcaption { padding: var(--sp-5) var(--sp-3) var(--sp-2); }
.gallery-item h3 { font-size: 19px; margin-bottom: var(--sp-2); }
.gallery-item p { font-size: 15px; line-height: 1.65; color: var(--ink-muted); }

.gallery-hint {
  margin-top: var(--sp-2);
  text-align: center;
  font-size: 13px;
  color: var(--ink-faint);
}

/* ==========================================================================
   9. 工作流
   ========================================================================== */
.workflow {
  padding: var(--sp-9) var(--sp-5);
  background: linear-gradient(
    180deg,
    var(--pool-fade) 0%,
    var(--pool-soft) 24%,
    var(--pool-soft) 76%,
    var(--pool-fade) 100%
  );
}
.workflow-head {
  max-width: 720px;
  margin: 0 auto var(--sp-8);
  text-align: center;
}
.workflow-head h2 { font-size: 40px; line-height: 1.1; margin-bottom: var(--sp-4); }
.workflow-head p { font-size: 19px; color: var(--ink-muted); }

.workflow-grid {
  position: relative;
  max-width: var(--shell);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-5);
}
/* 串起四个步骤的细线（只在卡片间隙可见，营造流程感） */
.workflow-grid::before {
  content: "";
  position: absolute;
  top: 65px;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--hairline-strong) 12%, var(--hairline-strong) 88%, transparent);
}
.workflow-step {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 28px var(--sp-5);
  transition:
    border-color var(--dur-3) var(--ease-out),
    box-shadow var(--dur-3) var(--ease-out),
    transform var(--dur-3) var(--ease-out);
}
@media (hover: hover) {
  .workflow-step:hover {
    border-color: var(--card-hover-border);
    box-shadow: var(--shadow-2);
    transform: translateY(-3px);
  }
}
.workflow-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: var(--sp-5);
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 6px var(--canvas);
}
.workflow-step h3 { font-size: 19px; margin-bottom: var(--sp-2); }
.workflow-step p { font-size: 15px; line-height: 1.65; color: var(--ink-muted); }

/* ==========================================================================
   10. 功能网格
   ========================================================================== */
.features {
  padding: var(--sp-9) var(--sp-5);
  background: transparent;
}
.features-head {
  max-width: 720px;
  margin: 0 auto var(--sp-8);
  text-align: center;
}
.features-head h2 { font-size: 40px; line-height: 1.1; margin-bottom: var(--sp-4); }
.features-head p { font-size: 19px; color: var(--ink-muted); }

.features-grid {
  max-width: var(--shell);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
}

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: var(--sp-6) 28px;
  transition:
    border-color var(--dur-3) var(--ease-out),
    box-shadow var(--dur-3) var(--ease-out),
    transform var(--dur-3) var(--ease-out);
}
@media (hover: hover) {
  .card:hover {
    border-color: var(--card-hover-border);
    box-shadow: var(--shadow-2);
    transform: translateY(-3px);
  }
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: var(--sp-5);
  border-radius: var(--r-md);
  background: var(--accent-weak);
  color: var(--accent);
  transition: background-color var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out);
}
.card:hover .card-icon { background: var(--accent); color: #fff; transform: scale(1.04); }

.card h3 { font-size: 21px; margin-bottom: var(--sp-2); }
.card p { font-size: 15px; line-height: 1.65; color: var(--ink-muted); }

/* 痛点卡片：上半是「问题」，下半是「简历通怎么做」。
   两段用一条细线和不同字色分开，避免读者把它们当成同一个语气的一句话。 */
.card--pain { display: flex; flex-direction: column; }
.card--pain .card-pain { margin-bottom: var(--sp-4); }
.card--pain .card-fix {
  margin-top: auto;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--hairline);
  font-size: 15px;
  line-height: 1.7;
}
.card--pain .card-fix strong { color: var(--accent); }

/* ==========================================================================
   11. 技术栈 / 开源信息
   ========================================================================== */
.tech { padding: 0 var(--sp-5) 104px; background: transparent; }
.tech-inner {
  max-width: var(--shell);
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 40px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.tech-copy { max-width: 460px; }
.tech-copy h2 { font-size: 24px; margin-bottom: var(--sp-3); }
.tech-copy p { font-size: 15px; line-height: 1.7; color: var(--ink-muted); }

.tech-groups {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  min-width: 300px;
}
.tech-group { display: flex; align-items: center; gap: var(--sp-4); }
.tech-group-label {
  flex: none;
  width: 74px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  text-align: right;
}
.tech-tags { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.tech-tags li {
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: var(--parchment);
  color: var(--primary);
  font-size: 13.5px;
  transition: background-color var(--dur-2) var(--ease-out);
}
.tech-tags li:hover { background: var(--pearl); }

/* ==========================================================================
   12. 下载区
   ========================================================================== */
.download {
  padding: var(--sp-9) var(--sp-5) 112px;
  background: linear-gradient(
    180deg,
    var(--pool-fade) 0%,
    var(--pool-strong) 26%,
    var(--pool-strong) 74%,
    var(--pool-fade) 100%
  );
}
.download-copy {
  max-width: 720px;
  margin: 0 auto var(--sp-8);
  text-align: center;
}
.download-copy h2 { margin-bottom: var(--sp-4); }
.download-copy p { font-size: 19px; color: var(--ink-muted); }

.os-badge {
  display: inline-flex !important;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-5);
  padding: 8px 16px;
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline);
  font-size: 14px !important;
  font-weight: 600;
  color: var(--primary) !important;
}

.steps {
  max-width: 640px;
  margin: 0 auto var(--sp-7);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  text-align: left;
}
.steps li {
  display: flex;
  gap: var(--sp-5);
  align-items: flex-start;
  padding: var(--sp-5) 28px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  transition:
    border-color var(--dur-3) var(--ease-out),
    box-shadow var(--dur-3) var(--ease-out),
    transform var(--dur-3) var(--ease-out);
}
@media (hover: hover) {
  .steps li:hover {
    border-color: var(--card-hover-border);
    box-shadow: var(--shadow-2);
    transform: translateY(-2px);
  }
}
.step-num {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.steps h3 { font-size: 18px; margin-bottom: 6px; }
.steps p { font-size: 15px; line-height: 1.65; color: var(--ink-muted); }

.download-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-5);
}

.download-actions {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
  justify-content: center;
}

.download-notes {
  max-width: 620px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-muted);
  text-align: left;
}
.download-notes li { position: relative; padding-left: 20px; }
.download-notes li::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.download-notes strong { color: var(--ink); }
.download-notes code { background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline); }

/* 历史版本下载：折叠列表，默认收起不喧宾夺主 */
.history-versions {
  max-width: 620px;
  margin: 0 auto;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 0 20px;
  text-align: left;
}
.history-versions summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 0;
  font-size: 15px;
  color: var(--ink-muted);
  user-select: none;
  display: flex;
  align-items: center;
}
.history-versions summary::-webkit-details-marker { display: none; }
.history-versions summary::after {
  content: "";
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ink-faint);
  border-bottom: 2px solid var(--ink-faint);
  transform: rotate(45deg);
  transition: transform 0.2s;
}
.history-versions[open] summary::after { transform: rotate(225deg); }
.history-list {
  list-style: none;
  margin: 0;
  padding: 0 0 10px;
  display: flex;
  flex-direction: column;
}
.history-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  padding: 12px 6px;
  border-top: 1px solid var(--hairline);
  color: var(--ink);
  text-decoration: none;
  border-radius: 8px;
}
.history-item:hover { background: var(--pearl); }
.hv-version { font-weight: 600; color: var(--accent); min-width: 64px; }
.hv-date { font-size: 13px; color: var(--ink-faint); min-width: 82px; }
.hv-note { font-size: 14px; color: var(--ink-muted); flex: 1 1 100%; }

/* 演示数据：可选的一项，用虚线框与主流程区分开 */
.demo-box {
  max-width: 620px;
  margin: 0 auto;
  padding: var(--sp-5) 28px var(--sp-6);
  background: var(--surface);
  border: 1px dashed var(--hairline-strong);
  border-radius: var(--r-lg);
  text-align: left;
}
.demo-box h3 { font-size: 18px; margin-bottom: 10px; }
.demo-box p { font-size: 15px; line-height: 1.7; color: var(--ink-muted); margin-bottom: var(--sp-4); }
.demo-box .btn { font-size: 16px; padding: 12px 22px; }
.demo-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: var(--sp-4);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-muted);
}
.demo-steps li { position: relative; padding-left: 18px; }
.demo-steps li::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--hairline-strong);
}
.demo-steps strong { color: var(--ink); }

/* ==========================================================================
   13. 页脚
   ========================================================================== */
.footer {
  position: relative;
  background: transparent;
  padding: var(--sp-7) var(--sp-5) var(--sp-8);
}
.footer-inner {
  max-width: var(--shell);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-5);
  text-align: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.footer-logo { width: 24px; height: 24px; border-radius: var(--r-xs); }
.footer-links { display: flex; gap: var(--sp-6); flex-wrap: wrap; justify-content: center; }
.footer-links a {
  padding: 6px 2px;          /* 撑到 32px 高度，满足触控目标尺寸 */
  font-size: 14px;
  color: var(--ink-muted);
}
.footer-links a:hover { color: var(--accent); }

.footer-divider {
  width: 100%;
  max-width: 560px;
  height: 1px;
  background: var(--hairline);
}
.footer-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  justify-content: center;
  font-size: 13px;
  color: var(--ink-faint);
}
.footer-version {
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--parchment);
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

/* 回到顶部 */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: var(--surface);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--hairline), var(--shadow-2);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition:
    opacity var(--dur-3) var(--ease-out),
    transform var(--dur-3) var(--ease-out),
    visibility var(--dur-3) var(--ease-out),
    background-color var(--dur-2) var(--ease-out);
}
.to-top.visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--pearl); }
.to-top:active { transform: scale(0.94); }

/* ==========================================================================
   14. 动效
   ========================================================================== */
/* 首屏逐级入场 */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.hero-eyebrow,
.hero-title,
.hero-sub,
.hero-cta { animation: rise-in var(--dur-4) var(--ease-out) both; }
.hero-eyebrow { animation-delay: 40ms; }
.hero-title { animation-delay: 100ms; }
.hero-sub { animation-delay: 240ms; }
.hero-cta { animation-delay: 300ms; }

/* 滚动入场：位移 + 轻微缩放，避免生硬的"整块弹出" */
.reveal {
  opacity: 0;
  transform: translateY(24px) scale(0.996);
  transition:
    opacity var(--dur-4) var(--ease-out),
    transform var(--dur-4) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.visible { opacity: 1; transform: none; }

/* --- 主题切换的三种降级路径 ---------------------------------------------
   1) 支持视图过渡（Chrome / Safari / Edge）：圆形揭示，由 JS 驱动 clip-path；
   2) 支持 @property 颜色插值（Firefox 等）：靠 :root 上的变量过渡逐帧变色；
   3) 都不支持：临时给全站挂上过渡（.theme-switching），结束时再摘掉。
   ------------------------------------------------------------------------ */

/* 视图过渡：关掉默认交叉淡入，只保留"新皮肤"的圆形揭示（clip-path 由 JS 驱动） */
:root.vt-theme::view-transition-old(root),
:root.vt-theme::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
:root.vt-theme::view-transition-old(root) { opacity: 1; }
/* 走视图过渡时不需要变量自己再动一遍，避免双重动画 */
:root.vt-theme { transition: none; }

/* 降级方案 3：全站临时过渡 */
:root.theme-switching,
:root.theme-switching *,
:root.theme-switching *::before,
:root.theme-switching *::after {
  transition:
    background-color var(--theme-dur) var(--ease-in-out),
    color var(--theme-dur) var(--ease-in-out),
    border-color var(--theme-dur) var(--ease-in-out),
    box-shadow var(--theme-dur) var(--ease-in-out),
    fill var(--theme-dur) var(--ease-in-out),
    stroke var(--theme-dur) var(--ease-in-out) !important;
}

/* 尊重系统的"减少动态效果"设置 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   15. 响应式
   ========================================================================== */
/* 中等宽度：收起导航链接，GitHub 按钮常驻 */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav-inner { height: 56px; padding: 0 var(--sp-5); gap: var(--sp-3); }
  .nav.scrolled .nav-inner { height: 52px; }
  .nav-title-en { display: none; }
  .nav-actions { margin-left: auto; }

  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .workflow-grid { grid-template-columns: repeat(2, 1fr); }
  .workflow-grid::before { display: none; }

  .hero-title { font-size: 44px; }
  .hero-title--brand { font-size: 64px; }
  .tile h2,
  .features-head h2,
  .gallery-head h2,
  .workflow-head h2 { font-size: 34px; }
}

@media (max-width: 834px) {
  .hero { padding: var(--sp-8) var(--sp-5) var(--sp-7); }
  .hero-title { font-size: 36px; }
  .hero-title--brand { font-size: 52px; }
  .hero-sub { font-size: 18px; }
  .br-pc { display: none; }

  .tile, .features, .download, .workflow { padding: var(--sp-8) var(--sp-5); }
  .gallery { padding: var(--sp-8) 0; }
  .tile-copy,
  .features-head,
  .gallery-head,
  .workflow-head,
  .download-copy { margin-bottom: var(--sp-7); }

  .tile h2,
  .features-head h2,
  .gallery-head h2,
  .workflow-head h2 { font-size: 28px; }
  .tile p,
  .features-head p,
  .gallery-head p,
  .workflow-head p,
  .download-copy p { font-size: 17px; }

  .gallery-item { width: 84vw; }
  .tech { padding: 0 var(--sp-5) var(--sp-8); }
  .tech-inner { padding: var(--sp-6); gap: var(--sp-5); }
}

@media (max-width: 640px) {
  .nav-inner { padding: 0 var(--sp-4); gap: var(--sp-2); }
  .icon-btn { width: 34px; height: 34px; }
  .nav-burger { width: 34px; }
  .nav-actions { gap: var(--sp-2); }
  .nav-mobile { padding: 0 var(--sp-4); }
  .nav-mobile.open { padding: var(--sp-2) var(--sp-4) var(--sp-5); }

  .hero { padding: var(--sp-7) var(--sp-5) 40px; }
  .hero-eyebrow { font-size: 12px; padding: 6px 14px; margin-bottom: var(--sp-5); }
  .hero-title { font-size: 31px; line-height: 1.18; margin-bottom: var(--sp-4); }
  .hero-title--brand { font-size: 44px; line-height: 1.05; margin-bottom: var(--sp-4); }
  .hero-sub { font-size: 16px; line-height: 1.65; margin-bottom: var(--sp-6); }
  .hero-cta { flex-direction: column; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-7); }
  .btn { width: 100%; max-width: 300px; padding: 15px var(--sp-5); }

  .tile, .features, .download, .workflow { padding: var(--sp-7) var(--sp-5); }
  .gallery { padding: var(--sp-7) 0; }
  .tile-copy,
  .features-head,
  .gallery-head,
  .workflow-head,
  .download-copy { margin-bottom: var(--sp-6); }
  .tile h2,
  .features-head h2,
  .gallery-head h2,
  .workflow-head h2 { font-size: 26px; line-height: 1.25; margin-bottom: var(--sp-3); }
  .tile p,
  .features-head p,
  .gallery-head p,
  .workflow-head p,
  .download-copy p { font-size: 16px; line-height: 1.68; }
  .shot-caption { font-size: 13px; margin-top: var(--sp-3); }

  .features-grid { grid-template-columns: 1fr; gap: var(--sp-4); }
  .card { padding: var(--sp-5) 22px; }
  .card-icon { width: 42px; height: 42px; margin-bottom: var(--sp-4); }

  .workflow-grid { grid-template-columns: 1fr; gap: var(--sp-4); }
  .workflow-step { padding: var(--sp-5) 22px; }
  .workflow-num { width: 30px; height: 30px; font-size: 15px; margin-bottom: var(--sp-4); box-shadow: none; }

  .gallery-track { gap: var(--sp-4); padding: var(--sp-1) var(--sp-5) var(--sp-5); }
  .gallery-item { width: 86vw; padding: var(--sp-3); }
  .gallery-item figcaption { padding: var(--sp-4) 6px 6px; }
  .gallery-item h3 { font-size: 17px; }
  .gallery-item p { font-size: 14px; }
  .gallery-hint { font-size: 13px; }
  .gallery-nav { margin-top: var(--sp-4); }

  .steps { gap: var(--sp-3); margin-bottom: var(--sp-6); }
  .steps li { flex-direction: column; gap: var(--sp-3); padding: 22px var(--sp-5); }
  .steps h3 { font-size: 17px; }
  .steps p { font-size: 14px; }

  .download-actions { flex-direction: column; align-items: center; width: 100%; gap: var(--sp-3); }
  .download-notes { font-size: 14px; gap: 9px; }

  .tech { padding: 0 var(--sp-5) var(--sp-7); }
  .tech-inner { flex-direction: column; align-items: flex-start; padding: var(--sp-5) 22px; gap: var(--sp-5); }
  .tech-groups { min-width: 0; width: 100%; }
  .tech-group { flex-direction: column; align-items: flex-start; gap: var(--sp-2); }
  .tech-group-label { width: auto; text-align: left; }

  .footer { padding: var(--sp-6) var(--sp-5) var(--sp-7); }
  .footer-links { gap: var(--sp-5); }
  .to-top { right: var(--sp-4); bottom: var(--sp-4); }
}

/* ==========================================================================
   16. 文档页（docs.html）
   长文阅读：左侧目录常驻，正文限宽，表格与代码块可横向滚动。
   ========================================================================== */
.doc-hero {
  padding: var(--sp-8) var(--sp-5) var(--sp-6);
  text-align: center;
  background: var(--hero-glow), var(--canvas);
}
.doc-hero-inner { max-width: 760px; margin: 0 auto; }

.doc-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: var(--sp-4);
  font-size: 13px;
  color: var(--ink-faint);
}
.doc-breadcrumb a { color: var(--ink-muted); }
.doc-breadcrumb a:hover { color: var(--accent); }

.doc-title {
  font-size: clamp(34px, 5vw, 44px);
  letter-spacing: -0.03em;
  margin-bottom: var(--sp-4);
}
.doc-lead {
  font-size: 18px;
  line-height: 1.68;
  color: var(--ink-muted);
}
.doc-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-2);
  margin-top: var(--sp-5);
}
.doc-meta-chip {
  padding: 5px 13px;
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline);
  font-size: 12.5px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.doc-layout {
  max-width: var(--shell-wide);
  margin: 0 auto;
  padding: 0 var(--sp-5) var(--sp-9);
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: var(--sp-8);
  align-items: start;
}

/* --- 本页目录 --- */
.doc-toc {
  position: sticky;
  top: calc(var(--nav-h) + 20px);
  max-height: calc(100vh - var(--nav-h) - 44px);
  overflow-y: auto;
  padding: var(--sp-4) var(--sp-4) var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}
.doc-toc::-webkit-scrollbar { width: 6px; }
.doc-toc::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: var(--r-pill); }
.doc-toc-title {
  margin-bottom: var(--sp-3);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}
.doc-toc-list { display: flex; flex-direction: column; gap: 2px; }
.doc-toc-list a {
  display: block;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--ink-muted);
  transition: color var(--dur-2) var(--ease-out), background-color var(--dur-2) var(--ease-out);
}
.doc-toc-list a:hover { color: var(--ink); background: var(--accent-weak); }
.doc-toc-list a.is-active { color: var(--accent); background: var(--accent-weak); font-weight: 600; }
.doc-toc-foot {
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  color: var(--ink-faint);
}
.doc-toc-foot a { color: var(--ink-muted); }
.doc-toc-foot a:hover { color: var(--accent); }

/* --- 正文 --- */
.doc-body { min-width: 0; max-width: 780px; }
.doc-body h2,
.doc-body h3 { scroll-margin-top: calc(var(--nav-h) + 20px); }
.doc-body h2 {
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--hairline);
  font-size: 28px;
  line-height: 1.25;
}
.doc-section { padding-bottom: var(--sp-7); }
.doc-section:last-of-type { padding-bottom: var(--sp-5); }
.doc-body h3 { margin: var(--sp-6) 0 var(--sp-3); font-size: 19px; }
.doc-body h3:first-child { margin-top: 0; }
.doc-body p {
  margin-bottom: var(--sp-4);
  font-size: 16px;
  line-height: 1.78;
  color: var(--ink-muted);
}
.doc-body strong { color: var(--ink); font-weight: 600; }
.doc-body a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.doc-body ul,
.doc-body ol {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 var(--sp-5);
  padding-left: 22px;
  font-size: 16px;
  line-height: 1.78;
  color: var(--ink-muted);
}
.doc-body ul { list-style: disc; }
.doc-body ol { list-style: decimal; }
.doc-body li::marker { color: var(--ink-faint); }
.doc-body li > ul,
.doc-body li > ol { margin: var(--sp-2) 0 0; }
.doc-body code { white-space: nowrap; }

/* 三步上手复用下载区的步骤卡片，但要压掉正文标题与段落的默认间距 */
.doc-body .steps { max-width: none; margin-bottom: 0; }
.doc-body .doc-steps { margin-bottom: var(--sp-5); }
.doc-body .steps h3 { margin: 0 0 6px; font-size: 17px; scroll-margin-top: 0; }
.doc-body .steps p { margin-bottom: 0; font-size: 15px; }

/* 表格：窄屏横向滚动，不挤压内容 */
.doc-table-wrap {
  margin: 0 0 var(--sp-5);
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
}
.doc-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 15px;
}
.doc-table th,
.doc-table td {
  padding: 11px 16px;
  text-align: left;
  vertical-align: top;
  line-height: 1.65;
  border-bottom: 1px solid var(--hairline);
}
.doc-table th {
  background: var(--pearl);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.doc-table td { color: var(--ink-muted); }
.doc-table tr:last-child th,
.doc-table tr:last-child td { border-bottom: none; }

/* 代码块 */
.doc-code {
  margin: 0 0 var(--sp-5);
  padding: 16px 18px;
  overflow-x: auto;
  background: var(--pearl);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink);
  white-space: pre;
}
.doc-code code { padding: 0; background: none; font-size: 1em; color: inherit; white-space: pre; }

/* 提醒框：默认是提示，--warn 用于「注意/有风险」 */
.doc-callout {
  margin: 0 0 var(--sp-5);
  padding: 15px 18px 15px 20px;
  border-left: 3px solid var(--accent);
  border-radius: var(--r-sm);
  background: var(--accent-weak);
}
.doc-callout p {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-muted);
}
.doc-callout p + p { margin-top: var(--sp-2); }
.doc-callout--warn { border-left-color: var(--warn-ink); background: var(--warn-bg); }

/* 键盘按键 */
.doc-kbd {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline-strong);
  font-family: var(--font-mono);
  font-size: 0.86em;
  color: var(--ink);
  white-space: nowrap;
}

/* 结尾 CTA */
.doc-cta {
  padding: var(--sp-6) var(--sp-6) var(--sp-7);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  text-align: center;
}
.doc-cta h2 {
  margin-bottom: var(--sp-3);
  padding-bottom: 0;
  border-bottom: none;
  font-size: 24px;
}
.doc-cta p {
  max-width: 560px;
  margin: 0 auto var(--sp-5);
  font-size: 15px;
}
.doc-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  justify-content: center;
}
.doc-cta .btn { padding: 13px 24px; font-size: 16px; }

@media (max-width: 980px) {
  .doc-layout {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
    padding-bottom: var(--sp-8);
  }
  .doc-toc {
    position: static;
    max-height: none;
    padding: var(--sp-4);
  }
  .doc-toc-list { flex-direction: row; flex-wrap: wrap; gap: 6px 8px; }
  .doc-toc-list a {
    padding: 6px 12px;
    background: var(--pearl);
    border-radius: var(--r-pill);
    font-size: 13.5px;
  }
  .doc-toc-list a:hover,
  .doc-toc-list a.is-active { background: var(--accent-weak); }
  .doc-toc-foot { margin-top: var(--sp-3); }
  .doc-body { max-width: none; }
}

@media (max-width: 640px) {
  .doc-hero { padding: var(--sp-7) var(--sp-5) var(--sp-5); }
  .doc-lead { font-size: 16px; line-height: 1.7; }
  .doc-body h2 { font-size: 23px; }
  .doc-body h3 { font-size: 17.5px; }
  .doc-body p,
  .doc-body ul,
  .doc-body ol { font-size: 15.5px; line-height: 1.75; }
  .doc-table { font-size: 14px; }
  .doc-table th,
  .doc-table td { padding: 10px 13px; }
  .doc-code { font-size: 12.5px; padding: 14px; }
  .doc-callout { padding: 14px 16px 14px 18px; }
  .doc-cta { padding: var(--sp-5) 22px var(--sp-6); }
  .doc-cta-actions { flex-direction: column; align-items: center; }
  .doc-cta .btn { width: 100%; max-width: 300px; }
}

/* ==========================================================================
   17. 界面实拍：交互动图、细节图与文档插图
   截图都来自真实运行的实例（tools/capture_shots.py 采集），统一用卡片承载，
   点击可放大（.lightbox，由 main.js 驱动）。
   ========================================================================== */

/* --- 通用：可点击放大的图 --- */
.zoomable { cursor: zoom-in; }
.zoomable img { transition: transform var(--dur-3) var(--ease-out); }

/* 动图：默认只加载静态封面，滚进视口后由 main.js 换成动画 WebP。
   点击看大图时（main.js 会把封面换成动画本身），光标提示可点。 */
.anim-shot { width: 100%; border-radius: 10px; box-shadow: var(--shadow-shot), var(--img-ring); }
.anim-shot[data-anim] { cursor: zoom-in; }

/* --- 动图区块 --- */
.anim-section {
  padding: var(--sp-9) var(--sp-5);
  background: linear-gradient(
    180deg,
    var(--pool-fade) 0%,
    var(--pool-soft) 24%,
    var(--pool-soft) 76%,
    var(--pool-fade) 100%
  );
}
.anim-head {
  max-width: 720px;
  margin: 0 auto var(--sp-8);
  text-align: center;
}
.anim-head h2 { font-size: 40px; line-height: 1.1; margin-bottom: var(--sp-4); }
.anim-head p { font-size: 19px; color: var(--ink-muted); }

.anim-grid {
  max-width: var(--shell-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-5);
}
.anim-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 12px;
  transition:
    border-color var(--dur-3) var(--ease-out),
    box-shadow var(--dur-3) var(--ease-out),
    transform var(--dur-3) var(--ease-out);
}
@media (hover: hover) {
  .anim-card:hover {
    border-color: var(--card-hover-border);
    box-shadow: var(--shadow-2);
    transform: translateY(-3px);
  }
}
.anim-card figcaption { padding: var(--sp-4) var(--sp-3) var(--sp-2); }
.anim-card h3 { font-size: 17px; margin-bottom: 6px; }
.anim-card p { font-size: 14px; line-height: 1.65; color: var(--ink-muted); }

/* 角标：说明这是一张会动的图 */
.anim-badge {
  position: absolute;
  top: 22px;
  right: 22px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--nav-mobile-bg);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  box-shadow: inset 0 0 0 1px var(--hairline);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  pointer-events: none;
}

/* --- 细节图区块：宽窄交替，避免一屏全是等大的卡片 --- */
.detail-section { padding: var(--sp-9) var(--sp-5) var(--sp-8); }
.detail-head {
  max-width: 720px;
  margin: 0 auto var(--sp-8);
  text-align: center;
}
.detail-head h2 { font-size: 40px; line-height: 1.1; margin-bottom: var(--sp-4); }
.detail-head p { font-size: 19px; color: var(--ink-muted); }

.detail-grid {
  max-width: var(--shell-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-5);
}
.detail-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 12px;
  transition:
    border-color var(--dur-3) var(--ease-out),
    box-shadow var(--dur-3) var(--ease-out),
    transform var(--dur-3) var(--ease-out);
}
@media (hover: hover) {
  .detail-card:hover {
    border-color: var(--card-hover-border);
    box-shadow: var(--shadow-2);
    transform: translateY(-3px);
  }
}
/* 通栏：给需要看全一行操作细节的图 */
.detail-card--wide { grid-column: span 3; }
.detail-card img { border-radius: 10px; box-shadow: var(--shadow-shot), var(--img-ring); }
.detail-card figcaption { padding: var(--sp-4) var(--sp-3) var(--sp-2); }
.detail-card h3 { font-size: 17px; margin-bottom: 6px; }
.detail-card p { font-size: 14px; line-height: 1.65; color: var(--ink-muted); }

/* --- 文档页插图 --- */
.doc-figure {
  margin: 0 0 var(--sp-5);
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
}
.doc-figure img { border-radius: 8px; box-shadow: var(--shadow-shot), var(--img-ring); }
.doc-figure figcaption {
  padding: var(--sp-3) var(--sp-2) 2px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-faint);
}
.doc-figure--anim { padding: 12px 12px 0; }

/* ==========================================================================
   18. 大图查看（Lightbox）
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  padding: var(--sp-6) var(--sp-5);
  background: rgba(12, 20, 33, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-3) var(--ease-out), visibility var(--dur-3) var(--ease-out);
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox-img {
  max-width: min(1400px, 94vw);
  max-height: 78vh;
  width: auto;
  border-radius: var(--r-md);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6);
  transform: scale(0.98);
  transition: transform var(--dur-3) var(--ease-out);
}
.lightbox.open .lightbox-img { transform: none; }
.lightbox-caption {
  max-width: min(900px, 90vw);
  text-align: center;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--dur-2) var(--ease-out);
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.24); }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--dur-2) var(--ease-out);
}
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.24); }
.lightbox-nav--prev { left: 18px; }
.lightbox-nav--next { right: 18px; }
.lightbox[hidden] { display: none; }

@media (max-width: 980px) {
  .anim-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-card--wide { grid-column: span 2; }
  .anim-head h2,
  .detail-head h2 { font-size: 30px; }
  .anim-head p,
  .detail-head p { font-size: 17px; }
}

@media (max-width: 640px) {
  .anim-section,
  .detail-section { padding: var(--sp-7) var(--sp-5); }
  .anim-head,
  .detail-head { margin-bottom: var(--sp-6); }
  .anim-head h2,
  .detail-head h2 { font-size: 26px; line-height: 1.25; margin-bottom: var(--sp-3); }
  .anim-head p,
  .detail-head p { font-size: 16px; line-height: 1.68; }
  .anim-grid,
  .detail-grid { grid-template-columns: 1fr; gap: var(--sp-4); }
  .detail-card--wide { grid-column: span 1; }
  .anim-card,
  .detail-card { padding: var(--sp-3); }
  .anim-card h3,
  .detail-card h3 { font-size: 16px; }
  .anim-card p,
  .detail-card p { font-size: 13.5px; }
  .lightbox-nav { display: none; }
  .lightbox-caption { font-size: 13px; }
}

/* 尊重"减少动态效果"：动图不再换成动画帧（main.js 里同样会跳过） */
@media (prefers-reduced-motion: reduce) {
  .anim-badge { display: none; }
}
