/* ==========================================================================
   CCPP 官网样式 — 布局与配色参照 ethereum.org
   零外部依赖：本地 Inter 字体 + 内联 SVG，无 CDN
   ========================================================================== */

/* ---------- 本地 Inter 字体（英文/数字，latin 子集，可变字重 100-900） ---------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+2B0B, U+FEFF, U+FFFD;
}

/* ---------- 配色变量（照抄 ethereum.org 设计系统精确值） ---------- */
:root {
  /* 基础色板 — 紫（品牌主色） */
  --purple-50: hsl(262, 100%, 96%);
  --purple-100: hsl(263, 100%, 94%);
  --purple-200: hsl(263, 91%, 88%);
  --purple-300: hsl(263, 94%, 84%);
  --purple-400: hsl(263, 77%, 75%);
  --purple-500: hsl(263, 88%, 65%);
  --purple-600: hsl(263, 75%, 51%);
  --purple-700: hsl(263, 74%, 41%);
  --purple-800: hsl(263, 77%, 31%);
  --purple-900: hsl(263, 86%, 15%);

  /* 基础色板 — 蓝（强调色 A） */
  --blue-50: hsl(214, 100%, 99%);
  --blue-100: hsl(217, 100%, 95%);
  --blue-200: hsl(214, 86%, 89%);
  --blue-300: hsl(221, 79%, 74%);
  --blue-400: hsl(221, 90%, 69%);
  --blue-500: hsl(224, 84%, 60%);
  --blue-600: hsl(235, 81%, 58%);
  --blue-700: hsl(235, 59%, 41%);
  --blue-800: hsl(231, 53%, 29%);
  --blue-900: hsl(217, 36%, 17%);

  /* 基础色板 — 粉（强调色 B） */
  --pink-400: hsl(323, 91%, 75%);
  --pink-500: hsl(323, 100%, 66%);
  --pink-600: hsl(323, 93%, 51%);

  /* 基础色板 — 青（强调色 C） */
  --teal-400: hsl(163, 90%, 65%);
  --teal-600: hsl(163, 88%, 39%);
  --teal-700: hsl(163, 82%, 33%);

  /* 中性灰阶（纯中性，非冷灰） */
  --gray-50: hsl(0, 0%, 97%);
  --gray-100: hsl(0, 0%, 93%);
  --gray-200: hsl(0, 0%, 81%);
  --gray-300: hsl(0, 0%, 67%);
  --gray-400: hsl(0, 0%, 55%);
  --gray-500: hsl(0, 0%, 38%);
  --gray-600: hsl(0, 0%, 20%);
  --gray-700: hsl(0, 0%, 13%);
  --gray-800: hsl(0, 0%, 11%);
  --gray-900: hsl(0, 0%, 7%);

  /* 装饰色（Hero 渐变球，往紫色系靠） */
  --deco-pink: #f8c5e5;
  --deco-purple: #ccaefc;
  --deco-blue: #88aaf1;
  --deco-cyan: #b8faf6;

  /* 语义映射 — 浅色模式 */
  --background: hsl(0, 0%, 100%);
  --background-low: var(--gray-100);
  --background-medium: var(--gray-200);
  --background-high: var(--gray-300);
  --background-highlight: var(--gray-50);
  --body: var(--gray-900);
  --body-light: var(--gray-500);
  --border: var(--gray-200);
  --border-high-contrast: var(--gray-400);
  --primary: var(--purple-600);
  --primary-hover: var(--purple-500);
  --primary-active: var(--purple-700);
  --primary-light: var(--purple-100);
  --primary-visited: var(--purple-700);
  --on-primary: hsl(0, 0%, 100%);

  /* 强调色 */
  --accent-a: var(--blue-600);
  --accent-b: var(--pink-600);
  --accent-c: var(--teal-700);

  /* 圆角（ethereum.org radius-base = 16px） */
  --radius: 16px;
  --radius-sm: 8px;
  --radius-lg: 16px;

  /* 其他 */
  --max-width: 1440px;
  --nav-height: 72px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

/* 深色模式 */
html[data-theme="dark"] {
  --background: hsl(226, 40%, 6%);
  --background-low: hsl(226, 25%, 13%);
  --background-medium: hsl(226, 20%, 20%);
  --background-high: hsl(226, 22%, 11%);
  --background-highlight: hsl(226, 30%, 7%);
  --body: hsl(226, 25%, 93%);
  --body-light: hsl(226, 12%, 55%);
  --border: hsl(226, 18%, 20%);
  --border-high-contrast: hsl(226, 12%, 48%);
  --primary: var(--purple-400);
  --primary-hover: var(--purple-300);
  --primary-active: var(--purple-200);
  --primary-light: var(--purple-900);
  --primary-visited: var(--purple-500);
  --on-primary: hsl(0, 0%, 0%);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.6);
}

/* 深色模式专属适配 */
html[data-theme="dark"] .hero__glow {
  opacity: 0.45;
}
html[data-theme="dark"] .illustration svg {
  filter: brightness(1.25);
}
html[data-theme="dark"] .card,
html[data-theme="dark"] .step {
  background: var(--background-highlight);
}
html[data-theme="dark"] .section__tag {
  background: var(--purple-800);
}
html[data-theme="dark"] .card__icon {
  background: var(--purple-800);
  color: var(--purple-300);
}

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.2s ease, color 0.2s ease;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 900;
  color: var(--body);
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}
a:hover { color: var(--primary-hover); }
a:visited { color: var(--primary-visited); }

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

ul, ol { padding-left: 1.5em; margin: 0 0 1em; }

/* ---------- 布局容器 ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 3rem 0;
}
.section--tight { padding: 2rem 0; }

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--background);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}
.nav__left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 100%;
}
.nav__logo {
  text-decoration: none;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  background: linear-gradient(120deg, #6c24df 0%, #b38df0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.nav__logo:hover { text-decoration: none; filter: brightness(1.1); }
.nav__logo::after {
  content: '™';
  font-size: 0.55em;
  vertical-align: super;
  background: none;
  -webkit-text-fill-color: var(--primary);
  color: var(--primary);
}

.nav__menu {
  display: flex;
  align-items: center;
  height: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__item {
  height: 100%;
  display: flex;
  align-items: center;
}

.nav__link {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  height: 100%;
  padding: 0 1.25rem;
  color: var(--body);
  font-size: 1rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  transition: color 0.2s ease;
}
.nav__link:hover {
  color: var(--primary-hover);
  text-decoration: none;
}
.nav__item.open .nav__link,
.nav__item:hover .nav__link {
  color: var(--primary-hover);
}

/* 滑动高亮块（模拟 ethereum.org layoutId 动画） */
.nav__highlight {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    top 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.2s ease;
}
.nav__highlight.is-visible {
  opacity: 1;
}
@media (max-width: 768px) {
  .nav__highlight { display: none; }
}
.nav__link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
  opacity: 0.6;
}
.nav__item.open .nav__link svg,
.nav__item:hover .nav__link svg { transform: rotate(180deg); opacity: 1; }

/* 下拉 mega 菜单（左对齐菜单，宽度随内容，ethereum.org 风格） */
.nav__dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  width: var(--max-width);
  max-width: calc(100vw - 4rem);
  background: var(--background);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  display: flex;
  gap: 2.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) scaleX(0.92);
  transform-origin: center;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.nav__item.open .nav__dropdown,
.nav__item:hover .nav__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) scaleX(1);
}

.nav__dropdown-col {
  flex: 1;
  min-width: 150px;
  display: flex;
  flex-direction: column;
}
.nav__dropdown-group {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--body-light);
  padding: 0 0.6rem 0.5rem;
  margin-bottom: 0.25rem;
}
.nav__dropdown-col .nav__dropdown-group:not(:first-child) {
  margin-top: 0.9rem;
}
.nav__dropdown a {
  display: block;
  text-decoration: none;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  color: var(--body);
  font-size: 0.92rem;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav__dropdown a:hover {
  background: var(--background-low);
  color: var(--primary-hover);
  text-decoration: none;
}

/* 级联菜单（二级左列 + 三级右侧展开，ethereum.org 风格） */
.nav__dropdown--cascade {
  padding: 0;
}
.nav__cascade {
  display: flex;
  align-items: stretch;
  min-height: 320px;
}
.nav__level2 {
  flex: 0 0 360px;
  border-right: 1px solid var(--border);
  padding: 1rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.nav__l2 {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.6rem 2.2rem 0.6rem 0.9rem;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--body);
  text-decoration: none;
  font: inherit;
  appearance: none;
  transition: background 0.15s ease;
}
.nav__l2:hover,
.nav__l2.is-active {
  background: var(--background-low);
  color: var(--primary-hover);
}
.nav__l2:hover .nav__l2-desc,
.nav__l2.is-active .nav__l2-desc {
  color: var(--primary-hover);
}
.nav__l2-text {
  display: block;
}
.nav__l2-label {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
}
.nav__l2-desc {
  display: block;
  font-size: 0.875rem;
  color: var(--body-light);
  line-height: 1.4;
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav__l2-chevron {
  position: absolute;
  right: 0.9rem;
  top: 0.6rem;
  width: 18px;
  height: 18px;
  opacity: 0.5;
}
.nav__level3 {
  flex: 1;
  padding: 1.25rem 1.5rem;
  background: var(--background-low);
}
.nav__l3-panel {
  display: none;
}
.nav__l3-panel.is-active {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  column-gap: 1.5rem;
  row-gap: 0.25rem;
}
.nav__l3-panel a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--body);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav__l3-panel a:hover {
  background: var(--background-low);
  color: var(--primary-hover);
}
.nav__l3-label {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
}
.nav__l3-desc {
  display: block;
  font-size: 0.8rem;
  color: var(--body-light);
  line-height: 1.4;
  margin-top: 0.15rem;
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav__icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  border: none;
  background: none;
  color: var(--body);
  cursor: pointer;
}
.nav__icon-btn:hover { background: var(--background-highlight); color: var(--primary); }
.nav__icon-btn svg { width: 20px; height: 20px; }

/* 移动端汉堡 */
.nav__toggle {
  display: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 6rem 0 4rem;
  overflow: hidden;
}
.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
}
.hero__title {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
@media (min-width: 768px) {
  .hero__title { font-size: 3.75rem; }
}
@media (min-width: 992px) {
  .hero__title { font-size: 4rem; }
}
.hero__title .accent {
  color: var(--primary);
}
.hero__subtitle {
  font-size: 1.2rem;
  color: var(--body-light);
  margin-bottom: 2rem;
  max-width: 600px;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}
.hero__deco {
  position: absolute;
  top: 0;
  right: 0;
  width: 45%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.hero__deco .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
}
.hero__deco .blob--pink { width: 280px; height: 280px; background: var(--deco-pink); top: 10%; right: 8%; }
.hero__deco .blob--purple { width: 220px; height: 220px; background: var(--deco-purple); bottom: 15%; right: 30%; }
.hero__deco .blob--cyan { width: 180px; height: 180px; background: var(--deco-cyan); top: 40%; right: 5%; }

/* ---------- 居中 Hero（ethereum.org 风格） ---------- */
.hero--center {
  padding: 7rem 0 6rem;
  text-align: center;
}
.hero--center .hero__content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
}
.hero--center .hero__subtitle {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.25rem;
}
.hero--center .hero__actions {
  justify-content: center;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.3;
}
.hero__glow--1 {
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, #88aaf1 0%, transparent 70%);
  top: -180px;
  left: 50%;
  transform: translateX(-85%);
}
.hero__glow--2 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, #6995f7 0%, transparent 70%);
  top: -140px;
  right: 50%;
  transform: translateX(85%);
}
.hero__glow--3 {
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, #f8c5e5 0%, transparent 70%);
  bottom: -180px;
  left: 50%;
  transform: translateX(-50%);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  font-family: inherit;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn.btn--primary {
  background: var(--primary);
  color: #ffffff;
}
.btn.btn--primary:hover {
  background: var(--primary-hover);
  color: #ffffff;
  box-shadow: 4px 4px 0 var(--primary-light);
}
.btn.btn--primary:visited {
  color: #ffffff;
}
.btn--secondary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn--secondary:hover { background: var(--primary-light); color: var(--primary-active); }
.btn--outline {
  background: transparent;
  color: var(--body);
  border-color: var(--border-high-contrast);
}
.btn--outline:hover { border-color: var(--primary); color: var(--primary); }
.btn--sm { padding: 0.5rem 1rem; font-size: 0.9rem; }

/* ---------- 卡片网格 ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.card-grid--2 { grid-template-columns: repeat(2, 1fr); }
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--background);
  box-shadow: none;
  transition: all 0.3s ease;
}
.card:hover {
  border-color: var(--primary-hover);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  transform: scale(1.01);
  text-decoration: none;
}
@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
  .card:hover { transform: none; }
}
.card--link {
  color: var(--body);
  text-decoration: none;
}
.card--link:hover { color: var(--body); }
.card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  background: var(--primary-light);
  color: var(--primary-active);
}
.card__icon svg { width: 24px; height: 24px; }
.card__title {
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
  color: var(--body);
}
.card__desc {
  font-size: 0.92rem;
  color: var(--body-light);
  margin: 0;
}
.card__arrow {
  margin-top: auto;
  padding-top: 1rem;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

/* 特性列表（带图标横排） */
.feature-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}
.feature {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.feature__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--background-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-active);
}
.feature__icon svg { width: 26px; height: 26px; }
.feature__title { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.35rem; }
.feature__desc { font-size: 0.9rem; color: var(--body-light); margin: 0; }

/* ---------- 章节标题 ---------- */
.section__header { margin-bottom: 2.5rem; }
.section__tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  margin-bottom: 0.9rem;
}
.section__title {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 1rem;
}
@media (min-width: 992px) {
  .section__title { font-size: 3.75rem; }
}
.section__lead {
  font-size: 1.1rem;
  color: var(--body-light);
  max-width: 700px;
}

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  background: var(--background-low);
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr repeat(5, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}
.footer__brand p { font-size: 1.1rem; font-weight: 600; color: var(--body); max-width: 360px; }
.footer__contact { margin-top: 0.6rem; }
.footer__contact a { color: var(--body-light); text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.footer__contact a:hover { color: var(--primary); }
.footer__social { display: flex; gap: 14px; margin-top: 1.1rem; align-items: center; }
.footer__social a { display: inline-flex; color: var(--body-light); transition: color 0.2s; }
.footer__social a:hover { color: var(--primary); }
.footer__social svg { width: 16px; height: 16px; }
.footer__col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--body-light);
  margin-bottom: 1rem;
}
.footer__col ul { list-style: none; padding: 0; margin: 0; }
.footer__col li { margin-bottom: 0.6rem; }
.footer__col a { color: var(--body); font-size: 0.92rem; text-decoration: none; }
.footer__col a:hover { color: var(--primary); }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--body-light);
}

/* ---------- 内容页（文档页） ---------- */
.doc {
  padding: 3rem 0 5rem;
}
.doc__breadcrumb {
  font-size: 0.85rem;
  color: var(--body-light);
  margin-bottom: 1.5rem;
}
.doc__breadcrumb a { color: var(--body-light); text-decoration: none; }
.doc__breadcrumb a:hover { color: var(--primary); }
.doc__title {
  font-size: 2.25rem;
  font-weight: 900;
  margin-bottom: 1rem;
}
@media (min-width: 992px) {
  .doc__title { font-size: 3rem; }
}
.doc__meta {
  font-size: 0.9rem;
  color: var(--body-light);
  margin-bottom: 2.5rem;
}
.doc__body {
  max-width: 800px;
  font-size: 1.02rem;
}
.doc__body h2 {
  font-size: 1.875rem;
  margin-top: 2.5rem;
}
.doc__body h3 { font-size: 1.5rem; margin-top: 1.75rem; }
.doc__body p { color: var(--body); }
.doc__body blockquote {
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  border-left: 4px solid var(--primary);
  background: var(--background-highlight);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--body-light);
}

/* ---------- 文档页两列布局 + 本页内容目录 ---------- */
.doc .container {
  display: grid;
  grid-template-columns: minmax(0, 800px) 280px;
  justify-content: center;
  gap: 1.5rem 3rem;
  align-items: start;
}
.doc__breadcrumb,
.doc__title,
.doc__meta,
.doc__body {
  grid-column: 1;
}
.doc__toc {
  grid-column: 2;
  position: sticky;
  top: calc(var(--nav-height) + 1.5rem);
  max-height: calc(100vh - var(--nav-height) - 3rem);
  overflow-y: auto;
}
.doc__toc-label {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--body-light);
  margin-bottom: 0.75rem;
}
.doc__toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--border);
}
.doc__toc-list li {
  margin: 0;
}
.doc__toc-link {
  display: block;
  padding: 0.35rem 0 0.35rem 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--body-light);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.doc__toc-link:hover {
  color: var(--primary-hover);
}
.doc__toc-link.is-active {
  color: var(--primary);
  border-left-color: var(--primary);
}
@media (max-width: 991px) {
  .doc .container {
    grid-template-columns: 1fr;
  }
  .doc__toc {
    display: none;
  }
}

/* ---------- 图文并排布局 ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.split--reverse .split__media { order: -1; }
.split__media { position: relative; }

/* 插画容器 */
.illustration {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}
.illustration svg { width: 100%; height: auto; }

/* ---------- 统计条 ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat__value {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--body);
  line-height: 1.2;
}
.stat__label {
  font-size: 0.9rem;
  color: var(--body-light);
  margin-top: 0.25rem;
}

/* ---------- 步骤 ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.step {
  position: relative;
  padding: 2rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--background);
  transition: all 0.3s ease;
}
.step:hover {
  border-color: var(--primary-hover);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
}
.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-weight: 900;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}
.step__title { font-size: 1.25rem; font-weight: 900; margin-bottom: 0.5rem; }
.step__desc { font-size: 0.92rem; color: var(--body-light); margin: 0; }

/* ---------- 响应式 ---------- */
@media (max-width: 991px) {
  .card-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .container { padding: 0 1.25rem; }
  .section { padding: 3rem 0; }
  .hero { padding: 4rem 0 3rem; }
  .hero__deco { display: none; }

  .nav__menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: stretch;
    height: auto;
    background: var(--background);
    padding: 1rem;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }
  .nav__menu.open { transform: translateX(0); }
  .nav__item { height: auto; flex-direction: column; align-items: stretch; }
  .nav__link { padding: 0.75rem 0; justify-content: space-between; }
  .nav__dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0 0 0.5rem 1rem;
    min-width: 0;
  }
  .nav__toggle { display: flex; }

  .nav__cascade { flex-direction: column; min-height: 0; }
  .nav__level2 { flex: none; width: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .nav__level3 { background: none; padding: 0.5rem 0 0.5rem 1rem; }
  .nav__l3-panel { display: block !important; }

  .card-grid--2, .card-grid--3 { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
  .split { grid-template-columns: 1fr; gap: 2rem; }
  .split--reverse .split__media { order: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats .stat:last-child { grid-column: 1 / -1; }
  .steps { grid-template-columns: 1fr; }
}


/* ---------- 技术架构图 ---------- */
.arch { margin: 2.5rem 0; border: 1px solid var(--border); border-radius: 18px; background: var(--background); padding: 1.75rem 1.5rem; }
.arch__title { text-align: center; font-size: 0.85rem; font-weight: 700; color: var(--body-light); letter-spacing: 0.03em; margin-bottom: 1.75rem; }
.arch__row { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.arch__node { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0.85rem 1.25rem; border-radius: 12px; font-size: 1rem; font-weight: 500; min-width: 120px; line-height: 1.35; }
.arch__node small { font-size: 0.8rem; font-weight: 500; color: var(--body-light); margin-top: 0.25rem; }
.arch__node--consume { background: var(--background-low); border: 1px solid var(--border); color: var(--body); }
.arch__node--tech { background: rgba(108,36,223,0.07); border: 1px solid rgba(108,36,223,0.35); color: #6c24df; }
.arch__node--fund { background: rgba(15,153,113,0.08); border: 1px solid rgba(15,153,113,0.4); color: #0f9971; }
.arch__arrow { font-size: 1.5rem; color: var(--body-light); line-height: 1; }
.arch__arrow--tech { color: #6c24df; }
.arch__arrow--fund { color: #0f9971; }
.arch__connector { display: flex; flex-direction: column; align-items: center; margin: 0.6rem 0; gap: 0.2rem; }
.arch__connector-label { font-size: 0.72rem; color: var(--body-light); font-weight: 600; }
.arch__note { margin-top: 1.6rem; padding: 0.85rem 1rem; border-radius: 10px; font-size: 0.85rem; line-height: 1.6; background: rgba(15,153,113,0.06); border: 1px dashed rgba(15,153,113,0.45); color: var(--body); text-align: center; }
.arch__note strong { color: #0f9971; }

.doc__body code { background: var(--background-highlight); padding: 0.15em 0.45em; border-radius: 6px; font-size: 0.86em; font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; }
.doc__body pre { background: var(--background-low); border: 1px solid var(--border); border-radius: 12px; padding: 1.1rem 1.3rem; overflow-x: auto; margin: 1.3rem 0; line-height: 1.65; }
.doc__body pre code { background: none; padding: 0; font-size: 0.84rem; color: var(--body); }
.doc__body table { width: 100%; border-collapse: collapse; margin: 1.3rem 0; font-size: 0.9rem; }
.doc__body th, .doc__body td { border: 1px solid var(--border); padding: 0.6rem 0.85rem; text-align: left; vertical-align: top; }
.doc__body th { background: var(--background-low); font-weight: 600; color: var(--body); }
.doc__body tr:nth-child(even) td { background: var(--background-low); }

/* ---------- 滚动进入动画 ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- 架构图流动动画 ---------- */
@keyframes arch-flow-fund {
  0%, 100% { opacity: 0.55; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(5px); }
}
@keyframes arch-flow-tech {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
.arch__arrow--fund {
  display: inline-block;
  animation: arch-flow-fund 1.6s ease-in-out infinite;
}
.arch__arrow--tech {
  display: inline-block;
  animation: arch-flow-tech 2.4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .arch__arrow--fund, .arch__arrow--tech { animation: none; }
}

/* ---------- Hero 区块链节点网络 ---------- */
.hero__nodes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.5;
}
.hn { animation: hero-node-pulse 3.2s ease-in-out infinite; }
.hn--2 { animation-delay: 0.5s; }
.hn--3 { animation-delay: 1s; }
.hn--4 { animation-delay: 1.5s; }
.hn--5 { animation-delay: 2s; }
.hn--6 { animation-delay: 0.7s; }
.hn--7 { animation-delay: 1.2s; }
.hn--8 { animation-delay: 1.8s; }
.hn--9 { animation-delay: 2.4s; }
@keyframes hero-node-pulse {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.65; }
}
@media (prefers-reduced-motion: reduce) {
  .hn { animation: none; }
}

/* ---------- 信任要素徽章墙 ---------- */
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.trust-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.5rem; padding: 1.5rem 1.25rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--background); }
.trust-icon { width: 46px; height: 46px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; background: var(--primary-light); color: var(--primary-active); margin-bottom: 0.25rem; }
.trust-icon svg { width: 22px; height: 22px; }
.trust-title { font-size: 1.05rem; font-weight: 700; color: var(--body); }
.trust-desc { font-size: 0.85rem; color: var(--body-light); line-height: 1.5; }
@media (max-width: 768px) {
  .trust-grid { grid-template-columns: 1fr; }
}

/* ---------- 手机端架构图 + hero 节点优化 ---------- */
@media (max-width: 768px) {
  .arch { padding: 1.25rem 0.9rem; margin: 1.5rem 0; }
  .arch__node { min-width: 0; padding: 0.7rem 0.85rem; font-size: 0.92rem; }
  .arch__node small { font-size: 0.72rem; }
  .arch__row { gap: 0.4rem 0.6rem; }
  .arch__arrow { font-size: 1.2rem; }
  .arch__connector { margin: 0.5rem 0; }
  .arch__connector-label { font-size: 0.68rem; }
  .hero__nodes { opacity: 0.35; }
}
