/* ============================================================
   成迈迈个人官网 · 全局样式 v5.0（内页统一暖色编辑杂志感）
   风格：与首页 index.html 完全一致
   - 纸感米白 #FAF5EE 主背景（暖色，非黑色）
   - 深暖棕 #3B322B 主文字
   - 品牌红 #C00000 强调 + 橙金 #D97A26 点缀
   - 直角边框（非圆角）+ Georgia 衬线英文装饰
   ============================================================ */

/* ---------- 1. 设计 Token（兼容新旧变量名） ---------- */
:root {
  /* 暖色编辑杂志感（新） */
  --paper: #FAF5EE;          /* 纸感米白主背景 */
  --paper-2: #F4EDE3;        /* 深一档纸感 */
  --ink: #3B322B;            /* 深暖棕主文字 */
  --ink-soft: #8A8076;       /* 暖灰次要文字 */
  --red: #C00000;            /* 品牌红 */
  --red-deep: #8B0000;       /* 深红 */
  --red-soft: #F7E9E9;       /* 浅红底 */
  --gold: #D97A26;           /* 橙金点缀 */
  --line: #E5DCCF;           /* 暖色分隔线 */

  /* 旧变量名兼容（内页内联样式在用） */
  --bg-primary: #FAF5EE;
  --bg-secondary: #F4EDE3;
  --bg-tertiary: #EFE6D8;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FFFDF8;
  --text-primary: #3B322B;
  --text-secondary: #6B6156;
  --text-muted: #A3998C;
  --brand-primary: #C00000;
  --brand-deep: #8B0000;
  --brand-accent: #D97A26;
  --brand-yellow: #fcd34d;
  --border: #E5DCCF;
  --border-hover: #CDBFAA;
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 6px;
  --radius-full: 999px;
  --shadow-card: 0 4px 16px rgba(59,50,43,0.08);
  --shadow-card-hover: 0 12px 32px rgba(59,50,43,0.14);
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", -apple-system, sans-serif;
  --font-serif: Georgia, "Times New Roman", "Songti SC", serif;
}

/* ---------- 2. Reset & Base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: 16px; background: transparent; color: var(--ink); }
html, body { max-width: 100%; overflow-x: hidden; }
::selection { background: var(--brand-primary); color: #fff; }

/* ---------- 3. 布局 ---------- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.section { padding: 88px 0; position: relative; }
.section-warm { background: var(--paper-2); }
.section-title-wrap { text-align: center; margin-bottom: 56px; }
.section-eyebrow {
  font-size: 12.5px; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--brand-accent); font-weight: 600; margin-bottom: 12px;
  font-family: var(--font-serif);
}
.section-title { font-size: clamp(30px, 4.5vw, 44px); font-weight: 800; line-height: 1.3; color: var(--ink); }
.section-title .red, .section-title .accent { color: var(--brand-primary); }
.section-desc { margin-top: 14px; color: var(--ink-soft); font-size: 16px; max-width: 680px; margin-inline: auto; }

/* ---------- 4. 导航（浅色纸感胶囊，与首页一致） ---------- */
.nav-wrap { position: sticky; top: 16px; z-index: 100; display: flex; justify-content: center; padding: 0 16px; }
.nav {
  width: 100%; max-width: 1100px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px 8px 24px;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(59,50,43,0.08);
}
.nav.scrolled { max-width: 980px; box-shadow: 0 8px 28px rgba(59,50,43,0.12); }
.nav-brand { font-weight: 700; font-size: 18px; white-space: nowrap; display: flex; align-items: center; gap: 8px; color: var(--ink); }
.nav-brand .red { color: var(--brand-primary); }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  padding: 8px 14px; border-radius: 999px;
  font-size: 14px; color: var(--ink-soft); font-weight: 500;
  transition: all 0.2s; white-space: nowrap;
}
.nav-links a:hover { color: var(--ink); background: var(--red-soft); }
.nav-links a.active { background: var(--brand-primary); color: #fff; }
.nav-cta {
  background: var(--brand-primary); color: #fff; font-weight: 600;
  padding: 9px 20px; border-radius: 999px; font-size: 14px;
  transition: all 0.2s; white-space: nowrap; border: none; cursor: pointer;
}
.nav-cta:hover { background: var(--brand-deep); transform: translateY(-1px); }
.nav-burger { display: none; width: 42px; height: 42px; border-radius: 50%; align-items: center; justify-content: center; }
.nav-burger span, .nav-burger span::before, .nav-burger span::after {
  display: block; width: 20px; height: 2px; background: var(--ink);
  position: relative; transition: all 0.3s;
}
.nav-burger span::before { content: ""; position: absolute; top: -6px; }
.nav-burger span::after { content: ""; position: absolute; top: 6px; }
.nav-burger.open span { background: transparent; }
.nav-burger.open span::before { top: 0; transform: rotate(45deg); background: var(--brand-primary); }
.nav-burger.open span::after { top: 0; transform: rotate(-45deg); background: var(--brand-primary); }

.mobile-menu {
  position: fixed; top: 76px; right: 20px; left: 20px;
  max-width: 320px; margin-left: auto;
  z-index: 90;
  background: var(--paper);
  display: flex; flex-direction: column; justify-content: flex-start; gap: 4px;
  padding: 16px;
  border: 1px solid var(--line); border-radius: 4px;
  box-shadow: 0 12px 40px rgba(59,50,43,0.18);
  opacity: 0; visibility: hidden; transition: all 0.3s;
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu a {
  font-size: 15px; font-weight: 600; padding: 10px 12px;
  border-bottom: 1px solid var(--line); color: var(--ink);
}
.mobile-menu a:last-of-type { border-bottom: none; }
.mobile-menu a:hover, .mobile-menu a.active { color: var(--brand-primary); background: var(--red-soft); border-radius: 2px; }
.mobile-menu .m-cta {
  margin-top: 12px; background: var(--brand-primary); color: #fff;
  text-align: center; padding: 12px; border-radius: 999px; font-size: 15px; border: none;
}

/* ---------- 5. 页头（内页 Hero） ---------- */
.page-hero { text-align: center; padding: 72px 0 44px; position: relative; overflow: hidden; background: var(--paper); }
.page-hero::before {
  content: ""; position: absolute; top: -220px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 900px;
  background: radial-gradient(circle, rgba(192,0,0,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.page-hero > .container { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(36px, 5.5vw, 58px); font-weight: 800; line-height: 1.2; color: var(--ink); }
.page-hero h1 .red { color: var(--brand-primary); }
.page-hero h1 .accent { color: var(--brand-primary); }
.page-hero .desc { margin-top: 16px; color: var(--ink-soft); font-size: 17px; max-width: 660px; margin-inline: auto; }

/* ---------- 6. 左右交替价值主张 ---------- */
.alt-row { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; margin-bottom: 96px; }
.alt-row:last-child { margin-bottom: 0; }
.alt-row.reverse .alt-visual { order: 2; }
.alt-visual {
  background: var(--red-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 72px; overflow: hidden;
}
.alt-visual img { width: 100%; height: 100%; object-fit: cover; }
.alt-tag {
  display: inline-block; background: var(--red-soft); color: var(--brand-deep);
  border-left: 3px solid var(--brand-primary);
  font-size: 13px; font-weight: 600; padding: 4px 14px; border-radius: 0;
  margin-bottom: 12px;
}
.alt-title { font-size: 30px; font-weight: 800; line-height: 1.35; margin-bottom: 16px; color: var(--ink); }
.alt-title .red { color: var(--brand-primary); }
.alt-title .accent { color: var(--brand-primary); }
.alt-desc { color: var(--ink-soft); font-size: 16px; }

/* ---------- 7. 卡片（暖色白底 + 红色粗边） ---------- */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cards-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.card {
  background: var(--bg-card); border-radius: 4px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand-primary);
  padding: 28px; transition: all 0.25s;
  position: relative;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.card-icon {
  width: 100%; height: 160px; border-radius: 4px;
  background: var(--red-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin-bottom: 18px; overflow: hidden;
  border: 1px solid var(--line);
}
.card-icon img { width: 100%; height: 100%; object-fit: cover; }
.card-title { font-size: 21px; font-weight: 800; margin-bottom: 10px; color: var(--ink); }
.card-title .red { color: var(--brand-primary); }
.card-title .accent { color: var(--brand-primary); }
.card-desc { color: var(--ink-soft); font-size: 14.5px; line-height: 1.7; }
.card-link { margin-top: 16px; display: inline-block; color: var(--brand-primary); font-weight: 700; font-size: 14.5px; }
.card-link::after { content: " →"; transition: margin-left 0.2s; }
.card-link:hover::after { margin-left: 6px; }

/* ---------- 8. 课程横向卡条（暖色） ---------- */
.course-strip { display: flex; gap: 16px; overflow-x: auto; padding: 8px 4px 20px; scroll-snap-type: x mandatory; }
.course-strip::-webkit-scrollbar { height: 6px; }
.course-strip::-webkit-scrollbar-thumb { background: var(--brand-primary); border-radius: 3px; }
.course-strip::-webkit-scrollbar-track { background: var(--red-soft); }
.course-strip-card {
  min-width: 280px; max-width: 300px; scroll-snap-align: start;
  background: var(--bg-card); border-radius: 4px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand-primary);
  padding: 24px; transition: all 0.25s; text-align: center;
}
/* 课程页 part-cards：3 列（11 张卡 = 3+3+3+2，第 4 行 2 张居中），放大卡片尺寸 */
.part-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
}
.part-cards .course-strip-card {
  width: calc((100% - 48px) / 3);
  min-width: 0;
  max-width: none;
  padding: 36px 32px;
  min-height: 220px;
}
.part-cards .csc-top { margin-bottom: 16px; }
.part-cards .csc-title { font-size: 22px; margin-bottom: 12px; }
.part-cards .csc-desc { font-size: 14px; line-height: 1.6; }
@media (max-width: 1023px) {
  .part-cards .course-strip-card { width: calc((100% - 24px) / 2); }
}
@media (max-width: 767px) {
  .part-cards .course-strip-card { width: 100%; padding: 28px 24px; min-height: auto; }
}

/* section 标题下的统计小行 */
.part-stats {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
  font-size: 15px;
  color: var(--ink-soft);
  flex-wrap: wrap;
}
.part-stats strong { color: var(--brand-primary); font-size: 18px; font-weight: 800; margin-right: 4px; }
.part-stats .dot { color: var(--line); }
.course-strip-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.csc-top { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 14px; }
.csc-icon { font-size: 28px; color: var(--brand-primary); }
.csc-count { background: var(--red-soft); color: var(--brand-primary); font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 2px; border: 1px solid rgba(192,0,0,0.2); }
.csc-title { font-size: 17px; font-weight: 800; line-height: 1.4; margin-bottom: 8px; color: var(--ink); }
.csc-desc { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 32px; }
.filter-chip {
  padding: 8px 18px; border-radius: 0; border: 1px solid var(--line);
  font-size: 14px; color: var(--ink-soft); transition: all 0.2s; background: transparent; cursor: pointer;
  border-left: 3px solid transparent;
}
.filter-chip:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.filter-chip.active { background: var(--brand-primary); color: #fff; border-color: var(--brand-primary); border-left-color: var(--brand-primary); }

/* ---------- 9. 痛点 / 高亮 / 对比（暖色） ---------- */
.pain-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pain-item {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 4px;
  padding: 16px 18px; display: flex; align-items: flex-start; gap: 12px;
  transition: all 0.2s;
}
.pain-item:hover { border-color: var(--brand-primary); }
.pain-num {
  width: 36px; height: 36px; background: var(--brand-primary); color: #fff;
  border-radius: 2px; display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; flex-shrink: 0;
}
.pain-text { color: var(--ink-soft); font-size: 15px; line-height: 1.6; }
.pain-text strong { color: var(--ink); }
.highlight-bar {
  background: linear-gradient(90deg, rgba(192,0,0,0.08), rgba(217,122,38,0.08));
  border-left: 4px solid var(--brand-primary); border-radius: 0 4px 4px 0;
  color: var(--ink); font-size: 19px; font-weight: 700;
  padding: 22px 28px; text-align: center; margin-top: 28px; line-height: 1.6;
}
.highlight-bar .gold { color: var(--gold); }
.compare-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.compare-table th {
  background: var(--brand-primary); color: #fff; padding: 14px; font-size: 14px;
  text-align: center; font-weight: 700;
}
.compare-table td {
  padding: 14px; border-bottom: 1px solid var(--line); font-size: 14px; text-align: center;
  color: var(--ink-soft); background: var(--bg-card);
}
.compare-table tr:nth-child(even) td { background: var(--paper-2); }
.compare-table .col-left { color: var(--text-muted); }
.compare-table .col-right { color: var(--brand-primary); font-weight: 700; }
.compare-table .vs {
  background: var(--red-soft); color: var(--brand-primary); font-weight: 700;
  border-radius: 2px; padding: 2px 8px; display: inline-block; margin-right: 4px;
}

/* ---------- 10. 适合人群 ---------- */
.audience-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.audience-card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 4px;
  border-top: 4px solid var(--brand-primary);
  padding: 28px 22px; text-align: center; transition: all 0.25s;
}
.audience-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.audience-icon {
  width: 60px; height: 60px; background: var(--red-soft);
  border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 28px;
  margin: 0 auto 14px; border: 1px solid var(--line); color: var(--brand-primary);
}
.audience-card h4 { color: var(--ink); font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.audience-card p { color: var(--ink-soft); font-size: 13.5px; line-height: 1.6; }

/* ---------- 11. 数据大字 ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; text-align: center; }
.stat-num { font-size: clamp(48px, 7vw, 96px); font-weight: 800; color: var(--gold); line-height: 1.1; font-family: var(--font-serif); }
.stat-label { color: var(--ink-soft); font-size: 15px; margin-top: 6px; }

/* ---------- 12. 按钮（直角边框） ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 34px; border-radius: 0;
  font-size: 16px; font-weight: 700; transition: all 0.2s; min-height: 48px;
  border: none; cursor: pointer;
}
.btn-primary { background: var(--brand-primary); color: #fff; }
.btn-primary:hover { background: var(--brand-deep); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--ink); border: 1.5px solid rgba(59,50,43,0.35); }
.btn-outline:hover { border-color: var(--brand-primary); color: var(--brand-primary); background: var(--red-soft); }
.btn-lg { padding: 18px 44px; font-size: 17px; }
.btn-block { width: 100%; }

/* 首页 hero 按钮区：三个按钮等宽三列整齐排列（避免第 2 行按钮宽度不一致） */
.hero-actions {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.hero-actions .btn {
  white-space: nowrap;
  width: 100%;
  padding: 16px 12px;
  font-size: 15px;
}
@media (max-width: 767px) {
  .hero-actions { grid-template-columns: 1fr; }
}

/* ---------- 13. 我的书（暖色） ---------- */
.book-section { display: grid; grid-template-columns: 300px 1fr; gap: 56px; align-items: center; }
.book-cover {
  width: 280px; height: 400px;
  border: 1px solid var(--line);
  border-radius: 4px;
  /* 多层柔和立体阴影：内白边+近阴影+远阴影 */
  box-shadow:
    0 0 0 6px rgba(255,255,255,0.6),
    0 1px 2px rgba(59,50,43,0.08),
    0 6px 18px rgba(59,50,43,0.18),
    0 24px 60px rgba(59,50,43,0.22),
    0 40px 100px rgba(192,0,0,0.08);
  overflow: hidden; position: relative;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.book-cover:hover {
  transform: translateY(-6px) rotate(-1.5deg);
  box-shadow:
    0 0 0 6px rgba(255,255,255,0.7),
    0 2px 4px rgba(59,50,43,0.10),
    0 8px 24px rgba(59,50,43,0.22),
    0 32px 80px rgba(59,50,43,0.28),
    0 50px 120px rgba(192,0,0,0.12);
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.book-info h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; margin-bottom: 12px; color: var(--ink); }
.book-info h2 .red { color: var(--brand-primary); }
.book-slogan { color: var(--brand-primary); font-size: 18px; font-weight: 700; margin-bottom: 16px; white-space: nowrap; }
.book-desc { color: var(--ink-soft); font-size: 15.5px; margin-bottom: 20px; line-height: 1.85; }
.book-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.book-stat { background: var(--bg-card); border: 1px solid var(--line); border-radius: 2px; padding: 14px; text-align: center; }
.book-stat-num { font-size: 26px; font-weight: 800; color: var(--gold); }
.book-stat-label { font-size: 12px; color: var(--ink-soft); }

/* 试读阅读器 */
.trial-reader { background: var(--bg-card); border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--shadow-card); overflow: hidden; max-width: 760px; margin: 0 auto; }
.trial-meta { display: flex; justify-content: space-between; align-items: center; padding: 14px 24px; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--ink-soft); background: var(--paper-2); }
.trial-meta .chap { color: var(--brand-primary); font-weight: 700; }
.trial-page { padding: 40px 48px; min-height: 380px; background: var(--paper); }
.trial-page h3 { font-size: 22px; font-weight: 800; margin-bottom: 16px; line-height: 1.4; color: var(--ink); }
.trial-page p { margin-bottom: 12px; font-size: 15.5px; line-height: 1.85; color: var(--ink-soft); }
.trial-nav { display: flex; justify-content: space-between; align-items: center; padding: 14px 24px; border-top: 1px solid var(--line); background: var(--paper-2); }
.trial-nav .btn { min-height: 40px; padding: 9px 22px; font-size: 14px; }
.trial-progress { font-size: 13px; color: var(--text-muted); }

/* ---------- 14. 弹窗（暖色） ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 98; background: rgba(43,37,31,0.6);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; visibility: hidden; transition: all 0.3s;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 6px; padding: 40px 36px;
  max-width: 440px; width: 100%; text-align: center; position: relative;
  transform: translateY(16px); transition: all 0.3s;
  box-shadow: 0 20px 60px rgba(43,37,31,0.18);
}
.modal-overlay.open .modal { transform: none; }
.modal-close { position: absolute; top: 14px; right: 16px; font-size: 22px; color: var(--text-muted); line-height: 1; }
.modal-emoji { font-size: 44px; margin-bottom: 12px; color: var(--brand-primary); }
.modal h3 { font-size: 21px; font-weight: 800; margin-bottom: 10px; line-height: 1.4; color: var(--ink); }
.modal p { color: var(--ink-soft); font-size: 14px; margin-bottom: 16px; }
.modal-qr {
  width: 220px; height: 220px; margin: 0 auto 14px;
  background: #fff; border-radius: 4px;
  display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 13px;
  overflow: hidden; border: 1px solid var(--line);
}
.modal-qr .qr-wechat-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.modal-wechat-id {
  background: var(--red-soft); border: 1px solid rgba(192,0,0,0.3); border-radius: 4px;
  padding: 10px 16px; margin: 0 auto 18px; font-size: 15px; color: var(--brand-primary);
  display: inline-flex; gap: 8px; align-items: center; font-weight: 700;
}
.modal .btn { margin: 4px 4px; }

/* ---------- 15. AI 问答组件（暖色） ---------- */
.qa-float {
  position: fixed; right: 24px; bottom: 24px; z-index: 95;
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-primary), var(--gold));
  color: #fff;
  font-size: 22px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(192,0,0,0.35);
  transition: all 0.25s; border: none;
}
.qa-float:hover { transform: scale(1.08); }
.qa-float .pulse { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--brand-primary); animation: pulse 2s infinite; }
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.5); opacity: 0; }
}
.qa-panel {
  position: fixed; right: 24px; bottom: 96px; z-index: 96;
  width: 380px; max-width: calc(100vw - 32px); height: 540px; max-height: calc(100vh - 140px);
  background: var(--paper); border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 20px 60px rgba(43,37,31,0.18);
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(16px) scale(0.97); transition: all 0.25s;
}
.qa-panel.open { opacity: 1; visibility: visible; transform: none; }
.qa-head {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-deep));
  color: #fff; padding: 16px 20px; position: relative;
}
.qa-head-title { font-size: 16px; font-weight: 700; }
.qa-head-sub { font-size: 12px; opacity: 0.9; margin-top: 2px; }
.qa-close { position: absolute; top: 12px; right: 14px; color: #fff; font-size: 20px; line-height: 1; opacity: 0.85; background: none; border: none; }
.qa-body { flex: 1; overflow-y: auto; padding: 16px; background: var(--paper); display: flex; flex-direction: column; gap: 10px; }
.qa-msg { max-width: 84%; padding: 10px 14px; border-radius: 2px; font-size: 14px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.qa-msg.user { align-self: flex-end; background: var(--brand-primary); color: #fff; }
.qa-msg.ai { align-self: flex-start; background: var(--bg-card); color: var(--ink); border: 1px solid var(--line); }
.qa-source {
  align-self: flex-start; max-width: 84%;
  background: var(--red-soft); border-left: 3px solid var(--brand-primary);
  border-radius: 2px; padding: 7px 11px; font-size: 12px; color: var(--brand-deep);
}
.qa-warning {
  align-self: stretch;
  background: var(--red-soft);
  border: 1px solid rgba(192,0,0,0.3); border-radius: 4px;
  padding: 14px 16px; font-size: 13px; color: var(--ink); font-weight: 500;
  line-height: 1.7; margin-top: 4px;
}
.qa-warning strong { color: var(--brand-primary); }
.qa-typing { align-self: flex-start; background: var(--bg-card); border: 1px solid var(--line); border-radius: 2px; padding: 12px 16px; display: flex; gap: 4px; }
.qa-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-primary); animation: typing 1.2s infinite; }
.qa-typing i:nth-child(2) { animation-delay: 0.15s; }
.qa-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
.qa-chips { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 16px 0; background: var(--paper); }
.qa-chip {
  font-size: 12.5px; color: var(--ink-soft); border: 1px solid var(--brand-primary);
  border-radius: 0; padding: 5px 12px; background: transparent; transition: all 0.2s; white-space: nowrap;
}
.qa-chip:hover { background: var(--red-soft); color: var(--brand-primary); }
.qa-input-bar { display: flex; gap: 10px; padding: 12px 16px 16px; background: var(--paper-2); border-top: 1px solid var(--line); }
.qa-input {
  flex: 1; border: 1.5px solid var(--line); border-radius: 2px; padding: 10px 14px;
  font-size: 14.5px; outline: none; transition: border-color 0.2s; background: var(--bg-card); color: var(--ink);
}
.qa-input:focus { border-color: var(--brand-primary); }
.qa-send {
  width: 44px; height: 44px; border-radius: 2px; background: var(--brand-primary); color: #fff;
  font-size: 18px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; flex-shrink: 0; border: none;
}
.qa-send:hover { background: var(--brand-deep); }
.qa-disclaimer { padding: 8px 16px; background: var(--paper); color: var(--text-muted); font-size: 11.5px; text-align: center; }

/* ---------- 16. 页脚（暖色） ---------- */
.footer { background: var(--paper-2); border-top: 1px solid var(--line); padding: 56px 0 32px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px; }
.footer-brand { font-size: 20px; font-weight: 800; margin-bottom: 12px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.footer-brand .red { color: var(--brand-primary); }
.footer-desc { color: var(--ink-soft); font-size: 14px; max-width: 320px; line-height: 1.7; }
.footer h4 { font-size: 15px; font-weight: 700; margin-bottom: 14px; color: var(--ink); }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: var(--ink-soft); font-size: 14px; transition: color 0.2s; }
.footer-links a:hover { color: var(--brand-primary); }
.footer-qr { display: flex; gap: 14px; }
.qr-box { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.qr-box .qr {
  width: 96px; height: 96px; background: #fff; border-radius: 2px;
  display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--text-muted); margin-bottom: 8px;
}
.qr-box .qr-img {
  width: 88px; height: 88px;
  object-fit: cover;
  border-radius: 0;
  border: 1px solid var(--line);
  background: #fff;
  margin-bottom: 8px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.qr-box .qr-img:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(59,50,43,0.18);
}
.qr-box div:last-child { font-size: 12px; color: var(--ink-soft); font-weight: 600; }
.footer-bottom {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  color: var(--text-muted); font-size: 13px;
}

/* ---------- 17. 方法论页（暖色） ---------- */
.prose { max-width: 820px; margin: 0 auto; }
.prose h2 { font-size: 26px; font-weight: 800; margin: 40px 0 16px; color: var(--ink); }
.prose h2 .red { color: var(--brand-primary); }
.prose h3 { font-size: 19px; font-weight: 800; margin: 28px 0 12px; color: var(--brand-primary); }
.prose p { margin-bottom: 16px; color: var(--ink-soft); font-size: 16px; }
.prose ul { margin-bottom: 16px; }
.prose ul li { padding-left: 22px; position: relative; margin-bottom: 10px; color: var(--ink-soft); }
.prose ul li::before { content: "•"; position: absolute; left: 4px; color: var(--brand-primary); font-weight: 700; }
.prose .quote-box {
  background: var(--bg-card); border-left: 4px solid var(--brand-primary); border-radius: 0 4px 4px 0;
  padding: 18px 22px; margin: 24px 0; color: var(--ink);
  border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.prose .quote-box p { margin: 0; color: var(--ink); font-weight: 500; }
.prose .step-list { counter-reset: step; }
.prose .step-list li { counter-increment: step; margin-bottom: 30px; line-height: 1.7; padding: 4px 0; }
.prose .step-list li::before { content: counter(step); background: var(--brand-primary); color: #fff; width: 22px; height: 22px; border-radius: 2px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; margin-right: 10px; position: static; }
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.method-block {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 4px;
  border-top: 4px solid var(--brand-primary);
  padding: 22px;
}
.method-block h3 { color: var(--brand-primary); font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.method-block p { font-size: 14.5px; line-height: 1.7; color: var(--ink-soft); }
.method-block ul li { font-size: 14px; padding-left: 18px; position: relative; margin-bottom: 6px; color: var(--ink-soft); }
.method-block ul li::before { content: "·"; position: absolute; left: 4px; color: var(--brand-primary); font-weight: 700; }

.funnel { max-width: 480px; margin: 32px auto; }
.funnel-item { text-align: center; padding: 16px 20px; margin: 8px auto; border-radius: 2px; font-weight: 700; color: #fff; }
.funnel-item small { display: block; font-weight: 400; opacity: 0.9; margin-top: 4px; font-size: 13px; }
/* 两端对称沙漏：上宽 → 中窄 → 下宽（中间两层窄，两端两层宽） */
.funnel-item.fi-1, .funnel-item.fi-4 { width: 88% !important; }
.funnel-item.fi-2, .funnel-item.fi-3 { width: 52% !important; }
.fi-1 { background: linear-gradient(90deg, var(--brand-primary), #e63535); }
.fi-2 { background: linear-gradient(90deg, #e63535, var(--gold)); }
.fi-3 { background: linear-gradient(90deg, var(--gold), #ff8c33); }
.fi-4 { background: linear-gradient(90deg, #ff8c33, #ffaa66); margin-bottom: 0; }

/* 方法论四维：4 列对称（替代 2x2 网格） */
.method-four-grid { grid-template-columns: repeat(4, 1fr) !important; gap: 18px !important; }
.method-four-grid .card { padding: 20px 16px; }
.method-four-grid .card-icon { height: 120px; margin-bottom: 14px; }
.method-four-grid .card-title { font-size: 16px !important; }
@media (max-width: 767px) { .method-four-grid { grid-template-columns: repeat(2, 1fr) !important; } }

/* 著作权证书 */
.copyright-card {
  background: var(--bg-card); border: 1px solid rgba(192,0,0,0.3); border-radius: 4px;
  padding: 24px; text-align: center; max-width: 560px; margin: 0 auto;
  border-top: 4px solid var(--brand-primary);
}
.copyright-card img { max-width: 100%; height: auto; border-radius: 2px; margin-bottom: 16px; }
.copyright-card .label { font-size: 14px; color: var(--brand-primary); font-weight: 700; }

/* ---------- 18. 资源中心 ---------- */
.res-card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 4px;
  border-top: 4px solid var(--brand-primary);
  padding: 28px; transition: all 0.25s;
}
.res-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.res-card h3 { color: var(--brand-primary); font-size: 19px; font-weight: 800; margin-bottom: 12px; }
.res-card ul li { padding-left: 22px; position: relative; margin-bottom: 8px; font-size: 14.5px; color: var(--ink-soft); }
.res-card ul li::before { content: "▸"; position: absolute; left: 0; color: var(--brand-primary); font-weight: 700; }
/* 志愿工具包可点击 li（点击弹微信） */
.res-card ul li.res-tool-item { cursor: pointer; transition: all 0.2s; padding: 4px 8px 4px 22px; border-radius: 2px; margin-left: -22px; padding-left: 30px; }
.res-card ul li.res-tool-item:hover { background: var(--red-soft); color: var(--brand-primary); transform: translateX(4px); }

/* ---------- 18.1 文章网格（resources 深度文章） ---------- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.article-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand-primary);
  border-radius: 4px;
  padding: 0 0 20px 0;
  display: flex; flex-direction: column;
  transition: all 0.25s;
  color: var(--ink);
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.article-cover {
  width: 100%; height: 180px; overflow: hidden;
  background: var(--red-soft);
}
.article-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.article-card:hover .article-cover img { transform: scale(1.05); }
.article-meta { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px 6px; font-size: 12px; }
.article-cat { background: var(--red-soft); color: var(--brand-deep); padding: 3px 10px; border-radius: 2px; font-weight: 700; }
.article-date { color: var(--text-muted); }
.article-title { padding: 0 18px; font-size: 17px; font-weight: 800; line-height: 1.45; color: var(--ink); margin-bottom: 8px; min-height: 50px; }
.article-excerpt { padding: 0 18px; font-size: 13.5px; line-height: 1.7; color: var(--ink-soft); flex: 1; }
.article-more { display: inline-block; margin: 16px 18px 0; color: var(--brand-primary); font-weight: 700; font-size: 13.5px; }
.article-card:hover .article-more { text-decoration: underline; }
@media (max-width: 1023px) { .article-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px) { .article-grid { grid-template-columns: 1fr; } }

/* ---------- 19. 书籍目录（book.html 全本目录） ---------- */
.toc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.toc-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand-primary);
  border-radius: 4px;
  padding: 24px 22px;
  transition: all 0.25s;
}
.toc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.toc-head {
  font-size: 16px;
  font-weight: 800;
  color: var(--brand-primary);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.toc-card.toc-appendix { border-top-color: var(--brand-accent); }
.toc-card.toc-appendix .toc-head { color: var(--brand-accent); }
.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-soft);
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
}
.toc-list li:last-child { border-bottom: none; }
.toc-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 22px;
  background: var(--red-soft);
  color: var(--brand-deep);
  font-weight: 700;
  font-size: 11.5px;
  border-radius: 2px;
  border-left: 2px solid var(--brand-primary);
}
.toc-card.toc-appendix .toc-num {
  background: rgba(217,122,38,0.12);
  color: var(--brand-accent);
  border-left-color: var(--brand-accent);
}
@media (max-width: 1023px) { .toc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px) { .toc-grid { grid-template-columns: 1fr; } }

/* ---------- 20. 可点击卡片（点击触发加微信弹窗） ---------- */
.clickable-card { cursor: pointer; transition: all 0.25s; }
.clickable-card:hover { transform: translateY(-6px); box-shadow: 0 12px 32px rgba(192,0,0,0.16); border-color: var(--brand-primary); }
.clickable-card .card-title { transition: color 0.2s; }
.clickable-card:hover .card-title { color: var(--brand-primary); }

/* ---------- 19. 表单 ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 720px; margin: 0 auto; }
.form-field label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; color: var(--ink); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 2px; padding: 12px 14px;
  font-size: 15px; outline: none; transition: border-color 0.2s; background: var(--bg-card); color: var(--ink);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--brand-primary); }
.form-field.full { grid-column: 1 / -1; }

/* ---------- 20. 响应式 ---------- */
@media (max-width: 1023px) {
  .container { padding: 0 24px; }
  .cards-3 { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; }
  .alt-row { grid-template-columns: 1fr; gap: 36px; }
  .alt-row.reverse .alt-visual { order: 0; }
  .alt-visual { max-width: 340px; margin: 0 auto; font-size: 56px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 64px 0; }
  .part-cards, .method-grid, .pain-grid { grid-template-columns: 1fr; }
  .audience-cards { grid-template-columns: repeat(2, 1fr); }
  .book-section { grid-template-columns: 1fr; gap: 36px; justify-items: center; text-align: center; }
  .book-info { display: flex; flex-direction: column; align-items: center; }
  .book-stats { width: 100%; max-width: 420px; }
}

@media (max-width: 767px) {
  .container { padding: 0 20px; }
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .section-title { font-size: 28px; }
  .section { padding: 48px 0; }
  .cards-3, .cards-2 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-num { font-size: 44px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; } .footer-grid > div:first-child { grid-column: span 2; } .footer-grid > div:last-child { grid-column: span 2; }
  .page-hero { padding: 48px 0 32px; }
  .alt-title { font-size: 26px; }
  .modal { padding: 32px 24px; }
  .modal-qr { width: 180px; height: 180px; }
  .qa-panel { width: calc(100vw - 24px); right: 12px; bottom: 88px; height: 70vh; }
  .qa-float { right: 16px; bottom: 16px; }
  .trial-page { padding: 28px 20px; min-height: 280px; }
  .trial-page h3 { font-size: 18px; }
  .trial-page p { font-size: 14.5px; }
  .pain-item { padding: 14px 16px; }
  .pain-text { font-size: 14px; }
  .highlight-bar { font-size: 16px; padding: 16px 20px; }
  .audience-cards { grid-template-columns: 1fr; }
  .book-cover { width: 200px; height: 300px; }
  .book-cover-name { font-size: 24px; }
  .book-stats { grid-template-columns: repeat(2, 1fr); }
  .book-slogan { font-size: 15px; white-space: normal; }
  .method-block { padding: 18px; }
  .funnel { max-width: 100%; padding: 0 8px; }
  .compare-table th, .compare-table td { padding: 8px 4px; font-size: 12px; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
