/* ============================================================
   LLMStart 持续课程 · 美式教学课程站点样式
   Course Site Mode（基于 bluetutorialdoc-ui 优化）
   - serif 学术标题（Georgia/Charter）+ 无衬线正文
   - 暖纸背景 + 白色卡片 + 学院蓝（navy）权威感
   - 讲义式正文排版 · 响应式（桌面双栏 / 移动单栏）
   - 纯静态，无 CDN 依赖，file:// 双击即用
   ============================================================ */

:root {
  color-scheme: light;

  /* Display serif — American academic course type */
  --font-display: Georgia, "Charter", "Source Serif 4", "Songti SC",
    "Noto Serif SC", "SimSun", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Public Sans",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas,
    "Courier New", monospace;

  /* Navy authority scale */
  --navy-900: #001f3f;
  --navy-800: #002855;
  --navy-700: #003366;
  --navy-600: #004080;
  --navy-500: #0052a2;
  --navy-400: #2a6eb5;
  --navy-200: #b3d4f0;
  --navy-100: #e5f0fa;
  --navy-50: #f4f8fc;

  /* Gold accent */
  --gold-600: #9b6b2e;
  --gold-500: #c68a32;
  --gold-400: #d4a04a;
  --gold-100: #faf3e5;
  --gold-50: #fdf9f2;

  /* Semantic teal (done / success) */
  --teal-600: #0d6b52;
  --teal-100: #e6f5f0;

  /* Semantic red */
  --red-600: #c92a2a;
  --red-100: #fff5f5;

  /* Paper surfaces */
  --bg-paper: #f6f3ec;
  --bg-card: #ffffff;
  --bg-card-tint: #eef1f6;
  --ink: #1a2332;
  --ink-soft: #3d4a5c;
  --muted: #6b7683;
  --line: #d9d4c8;
  --line-soft: #e7e3d9;

  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-elevated: 0 4px 12px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);

  --space-xs: 0.3rem;
  --space-sm: 0.6rem;
  --space-md: 1.2rem;
  --space-lg: 1.8rem;
  --space-xl: 2.4rem;
  --space-2xl: 3.6rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--navy-600);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

::selection {
  background: var(--navy-100);
}

/* ---------------------------- 顶部品牌条 ---------------------------- */

.top-bar {
  background: var(--navy-900);
  color: #cdd9e8;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 0.4rem clamp(16px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.top-sep {
  color: var(--navy-400);
}

.top-bar-right {
  color: var(--navy-200);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

/* ---------------------------- 主导航 ---------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0.6rem clamp(16px, 4vw, 48px);
  background: var(--bg-paper);
  border-bottom: 3px solid var(--navy-500);
  box-shadow: var(--shadow-card);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 4px;
  background: var(--navy-800);
  color: #fff;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
}

.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.2px;
  font-family: var(--font-display);
}

.brand-name small {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  gap: 2px;
  margin-left: auto;
}

.site-nav a {
  color: var(--ink-soft);
  font-size: 14.5px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 3px;
  transition: background 0.18s ease, color 0.18s ease;
}

.site-nav a:hover {
  background: var(--navy-100);
  color: var(--navy-700);
  text-decoration: none;
}

.site-nav a.active {
  background: var(--navy-800);
  color: #fff;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-card);
    border-bottom: 3px solid var(--navy-500);
    padding: 8px 16px;
    box-shadow: var(--shadow-elevated);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 11px 12px;
  }
}

/* ---------------------------- 布局容器 ---------------------------- */

.site-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 44px) clamp(16px, 4vw, 40px) 44px;
}

.site-footer {
  background: var(--navy-900);
  color: #aebccd;
  margin-top: 24px;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px clamp(16px, 4vw, 40px) 36px;
  font-size: 13.5px;
}

.footer-inner p {
  margin: 0;
}

.footer-quote {
  margin-top: 6px !important;
  font-style: italic;
  color: var(--navy-200);
  font-family: var(--font-display);
}

/* ---------------------------- 首页 Hero ---------------------------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(270px, 1fr);
  gap: clamp(22px, 4vw, 44px);
  padding: clamp(18px, 3vw, 26px) 0 8px;
}

/* Signature: the single 10px gradient stripe */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 10px;
  background: linear-gradient(90deg, var(--navy-800) 0%, var(--navy-500) 50%, var(--gold-500) 100%);
}

.eyebrow,
.section-kicker {
  color: var(--gold-600);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.8vw, 48px);
  font-weight: 700;
  line-height: 1.14;
  margin: 6px 0 14px;
  letter-spacing: -0.01em;
  color: var(--navy-900);
}

.hero-lede {
  color: var(--ink-soft);
  font-size: 17px;
  max-width: 54ch;
  margin: 0 0 22px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.stat {
  min-width: 92px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 4px;
  text-align: center;
  border-top: 3px solid var(--navy-400);
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--navy-700);
  line-height: 1.2;
}

.stat span {
  color: var(--muted);
  font-size: 12px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-primary,
.btn-secondary,
.btn-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.btn-primary {
  background: var(--navy-800);
  color: #fff;
}

.btn-primary:hover {
  background: var(--navy-900);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-elevated);
}

.btn-secondary {
  background: var(--bg-card);
  border-color: var(--line);
  color: var(--ink);
}

.btn-secondary:hover {
  background: var(--bg-card-tint);
  text-decoration: none;
}

/* 进度区 */

.hero-side {
  padding: 20px 22px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-top: 5px solid var(--navy-500);
  border-radius: 4px;
  box-shadow: var(--shadow-card);
  align-self: start;
}

.hero-side h2 {
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--navy-900);
  margin: 0 0 14px;
}

.progress-block {
  display: grid;
  gap: 8px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13.5px;
}

.progress-meta strong {
  color: var(--navy-700);
  font-family: var(--font-display);
}

.progress-big .progress-meta {
  font-size: 15px;
}

.progress-track {
  height: 8px;
  background: var(--line-soft);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--navy-500);
  transition: width 0.4s ease;
}

.hero-note {
  color: var(--muted);
  font-size: 13px;
  margin: 14px 0 0;
}

/* ---------------------------- 通用 section ---------------------------- */

.section {
  margin-top: clamp(34px, 5vw, 56px);
  scroll-margin-top: 80px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--navy-100);
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  color: var(--navy-900);
  margin: 0;
  line-height: 1.25;
}

.map-progress {
  min-width: 240px;
  max-width: 340px;
  flex: 1;
}

/* 阶段块 */

.stage-block {
  margin-bottom: 28px;
}

.stage-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.stage-head h3 {
  font-family: var(--font-display);
  margin: 0;
  font-size: 18px;
  color: var(--navy-800);
}

.stage-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* 模块卡片（课程目录风格：顶部 5px 平边） */

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

.module-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px 14px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-top: 5px solid var(--navy-500);
  border-radius: 4px;
  color: var(--ink);
  box-shadow: var(--shadow-card);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.module-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
  border-color: var(--navy-400);
}

.module-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.module-num {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--navy-700);
  line-height: 1;
}

.module-count {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.module-card h3 {
  font-family: var(--font-display);
  margin: 2px 0 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--navy-900);
  line-height: 1.35;
}

.module-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  flex: 1;
}

.module-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.stage-chip {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gold-600);
  background: var(--gold-100);
  border: 1px solid var(--gold-400);
  border-radius: 999px;
  padding: 1px 10px;
}

.module-lessons-done {
  color: var(--muted);
  font-size: 12px;
}

.module-lessons-done strong {
  color: var(--teal-600);
}

/* 模块进度细条 */

.progress-rail {
  height: 6px;
  background: var(--line-soft);
  border-radius: 999px;
  overflow: hidden;
}

.progress-rail i {
  display: block;
  height: 100%;
  background: var(--navy-500);
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* 学习路径 */

.path-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.path-tab {
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.path-tab:hover {
  border-color: var(--navy-400);
  color: var(--navy-700);
}

.path-tab.active {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: #fff;
}

.path-panel {
  display: none;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--navy-500);
  border-radius: 4px;
  box-shadow: var(--shadow-card);
}

.path-panel.active {
  display: block;
}

.path-desc {
  margin: 0 0 16px;
  color: var(--ink-soft);
}

.path-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.path-steps li {
  background: var(--navy-50);
  border: 1px solid var(--navy-200);
  color: var(--navy-700);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13.5px;
  font-weight: 600;
}

/* 工作坊卡片 */

.ws-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.ws-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-top: 5px solid var(--gold-500);
  border-radius: 4px;
  color: var(--ink);
  box-shadow: var(--shadow-card);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.ws-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
}

.ws-card h3 {
  font-family: var(--font-display);
  margin: 0;
  font-size: 17px;
  color: var(--navy-900);
}

.ws-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  flex: 1;
}

.ws-modules {
  color: var(--muted);
  font-size: 13px;
}

.ws-modules a {
  font-weight: 600;
}

/* 公众号列表 */

.wechat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.wechat-list li {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--navy-400);
  border-radius: 4px;
  padding: 12px 16px;
}

.wechat-list a {
  font-weight: 600;
  color: var(--navy-700);
}

.wechat-status {
  font-size: 12px;
  color: var(--gold-600);
  background: var(--gold-100);
  border: 1px solid var(--gold-400);
  border-radius: 999px;
  padding: 1px 9px;
  margin-left: 8px;
}

.wechat-meta {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.wechat-list-page {
  margin-top: 18px;
}

.more-link {
  font-size: 14px;
  font-weight: 700;
}

.empty {
  color: var(--muted);
}

/* ---------------------------- 页面头（子页共用） ---------------------------- */

.page-head {
  padding: 10px 0 8px;
}

.page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.6vw, 36px);
  font-weight: 700;
  color: var(--navy-900);
  margin: 4px 0 10px;
}

.page-head > p {
  color: var(--muted);
  max-width: 60ch;
  margin: 0;
}

/* ---------------------------- 面包屑 ---------------------------- */

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13.5px;
  margin-bottom: 18px;
}

.crumbs a {
  color: var(--navy-600);
  font-weight: 600;
}

.crumbs span:last-child {
  color: var(--ink-soft);
  font-weight: 600;
}

/* ---------------------------- 模块页 ---------------------------- */

.module-hero {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-top: 5px solid var(--navy-500);
  border-radius: 4px;
  padding: clamp(20px, 3vw, 30px);
  box-shadow: var(--shadow-card);
}

.module-hero-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.module-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 700;
  color: var(--navy-900);
  margin: 0 0 12px;
}

.module-positioning {
  color: var(--ink-soft);
  max-width: 68ch;
  margin: 0 0 18px;
}

.module-progress {
  max-width: 480px;
}

.module-section {
  margin-top: 30px;
}

.module-section > h2 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  color: var(--navy-900);
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--navy-100);
}

/* 课程卡片（单元列表） */

.lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.lesson-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 15px 17px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--navy-400);
  border-radius: 4px;
  color: var(--ink);
  box-shadow: var(--shadow-card);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
  position: relative;
}

.lesson-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
  border-color: var(--navy-400);
}

.lesson-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lesson-num {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--navy-700);
  background: var(--navy-100);
  border: 1px solid var(--navy-200);
  border-radius: 3px;
  padding: 2px 9px;
}

.lesson-done {
  display: none;
  color: var(--teal-600);
  font-size: 17px;
  font-weight: 800;
}

.lesson-card.is-done .lesson-done {
  display: inline;
}

.lesson-card.is-done {
  border-left-color: var(--teal-600);
  background: var(--teal-100);
}

.lesson-card h3 {
  font-family: var(--font-display);
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy-900);
  line-height: 1.4;
}

.lesson-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  font-size: 11.5px;
  color: var(--muted);
  background: var(--bg-card-tint);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 9px;
}

.badge-level {
  color: var(--gold-600);
  background: var(--gold-100);
  border-color: var(--gold-400);
}

.badge-status {
  color: var(--navy-700);
  background: var(--navy-100);
  border-color: var(--navy-200);
}

.lesson-goal {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
  flex: 1;
}

.go {
  color: var(--navy-600);
  font-size: 13.5px;
  font-weight: 700;
}

/* ---------------------------- 课程页 ---------------------------- */

.lesson-page {
  max-width: 1000px;
  margin: 0 auto;
}

.lesson-hero {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-top: 5px solid var(--navy-500);
  border-radius: 4px;
  padding: clamp(20px, 3vw, 30px);
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}

.lesson-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.4vw, 33px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--navy-900);
  margin: 12px 0 12px;
}

.lesson-num-inline {
  color: var(--navy-600);
  margin-right: 10px;
}

.core-question {
  margin: 0 0 14px;
  padding: 12px 18px;
  border-left: 4px solid var(--gold-500);
  background: var(--gold-50);
  border-radius: 0 3px 3px 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.core-question strong {
  color: var(--gold-600);
}

.lesson-progress-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.btn-mark {
  background: var(--navy-800);
  color: #fff;
  font-size: 14px;
  padding: 9px 18px;
}

.btn-mark:hover {
  background: var(--navy-900);
}

.btn-mark.is-done {
  background: var(--teal-100);
  color: var(--teal-600);
  border-color: var(--teal-600);
}

/* 双栏布局 */

.lesson-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.lesson-side {
  position: sticky;
  top: 86px;
}

.toc {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px 16px;
}

.toc h4 {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.4px;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
  max-height: 56vh;
  overflow: auto;
}

.toc a {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
  padding: 4px 6px;
  border-radius: 3px;
}

.toc a:hover {
  background: var(--navy-50);
  text-decoration: none;
  color: var(--navy-700);
}

.lesson-content {
  min-width: 0;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: clamp(20px, 3vw, 34px);
  box-shadow: var(--shadow-card);
}

@media (max-width: 900px) {
  .lesson-layout {
    grid-template-columns: 1fr;
  }

  .lesson-side {
    position: static;
    order: -1;
  }

  .toc ol {
    max-height: none;
  }
}

/* 学习目标框 */

.goal-box {
  background: var(--navy-50);
  border: 1px solid var(--navy-200);
  border-left: 4px solid var(--navy-500);
  border-radius: 3px;
  padding: 14px 20px;
  margin-bottom: 26px;
}

.goal-box h2 {
  font-family: var(--font-display);
  font-size: 16px;
  margin: 0 0 8px;
  color: var(--navy-700);
}

.goal-box ul {
  margin: 0;
  padding-left: 20px;
}

/* 讲义式正文排版 */

.lesson-body {
  font-size: 1.02rem;
  line-height: 1.85;
  max-width: 74ch;
}

.lesson-body h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy-900);
  margin: 36px 0 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  scroll-margin-top: 90px;
}

.lesson-body h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.lesson-body h3 {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--navy-800);
  margin: 26px 0 10px;
}

.lesson-body h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 20px 0 8px;
}

.lesson-body p {
  margin: 0 0 14px;
}

.lesson-body ul,
.lesson-body ol {
  margin: 0 0 14px;
  padding-left: 26px;
}

.lesson-body li {
  margin-bottom: 5px;
}

.lesson-body strong {
  color: var(--ink);
}

.lesson-body blockquote {
  margin: 16px 0;
  padding: 10px 18px;
  border-left: 4px solid var(--navy-200);
  background: var(--navy-50);
  border-radius: 0 3px 3px 0;
  color: var(--ink-soft);
}

.lesson-body blockquote p {
  margin: 0;
}

.lesson-body code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-card-tint);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 5px;
}

.lesson-body pre {
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 4px;
  padding: 14px 18px;
  overflow-x: auto;
  margin: 14px 0;
  font-size: 13.5px;
  line-height: 1.65;
}

.lesson-body pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.lesson-body table {
  border-collapse: collapse;
  width: 100%;
  margin: 14px 0;
  font-size: 14px;
  display: block;
  overflow-x: auto;
}

.lesson-body th,
.lesson-body td {
  border: 1px solid var(--line);
  padding: 8px 12px;
  text-align: left;
  white-space: nowrap;
}

.lesson-body th {
  background: var(--navy-50);
  color: var(--navy-700);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lesson-body hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}

/* 折叠区（自测 / 答案） */

.fold {
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-card);
  overflow: hidden;
}

.fold summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 18px;
  background: var(--bg-card-tint);
  color: var(--ink-soft);
  user-select: none;
  list-style: none;
}

.fold summary::-webkit-details-marker {
  display: none;
}

.fold summary::before {
  content: "▸ ";
  color: var(--navy-500);
}

.fold[open] summary::before {
  content: "▾ ";
}

.fold summary:hover {
  background: #e7e9ee;
}

.fold-body {
  padding: 12px 20px 16px;
  border-top: 1px solid var(--line);
}

.fold-answer summary {
  background: var(--gold-100);
  color: var(--gold-600);
}

.fold-answer summary:hover {
  background: #f7e9cf;
}

/* Takeaway */

.takeaway {
  margin: 22px 0 6px;
  padding: 16px 20px;
  border: 1px solid var(--teal-600);
  border-left: 4px solid var(--teal-600);
  border-radius: 3px;
  background: var(--teal-100);
}

.takeaway h2 {
  font-family: var(--font-display);
  font-size: 16px;
  margin: 0 0 8px;
  color: var(--teal-600);
}

.takeaway p {
  margin: 0;
}

/* 上一课 / 下一课 */

.lesson-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 24px;
}

.pager-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--navy-400);
  border-radius: 4px;
  color: var(--ink);
  transition: box-shadow 0.14s ease, transform 0.14s ease;
}

.pager-link:hover {
  text-decoration: none;
  box-shadow: var(--shadow-elevated);
  transform: translateY(-1px);
}

.pager-link small {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pager-link span {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--navy-700);
  font-family: var(--font-display);
}

.pager-next {
  text-align: right;
  border-left: 1px solid var(--line);
  border-right: 4px solid var(--navy-400);
}

.pager-link.is-empty {
  opacity: 0.45;
  cursor: default;
}

.pager-link.is-empty:hover {
  box-shadow: none;
  transform: none;
}

/* ---------------------------- 工作坊页 ---------------------------- */

.workshop-hero {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-top: 5px solid var(--gold-500);
  border-radius: 4px;
  padding: clamp(20px, 3vw, 30px);
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
}

.workshop-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 700;
  color: var(--navy-900);
  margin: 0 0 10px;
}

.workshop-page .lesson-body {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: clamp(20px, 3vw, 34px);
  box-shadow: var(--shadow-card);
  max-width: none;
}

/* ---------------------------- 公众号文章页 ---------------------------- */

.wechat-article {
  max-width: 860px;
  margin: 0 auto;
}

.wechat-article-head {
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--navy-100);
}

.wechat-article-head h1 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 700;
  color: var(--navy-900);
  margin: 0 0 10px;
  line-height: 1.35;
}

.wechat-article .lesson-body {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: clamp(20px, 3vw, 34px);
  box-shadow: var(--shadow-card);
}

/* ---------------------------- Toast ---------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(12px);
  background: var(--navy-900);
  color: #fff;
  padding: 10px 22px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-elevated);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 100;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------------------------- 打印 ---------------------------- */

@media print {
  .top-bar,
  .site-header,
  .site-footer,
  .lesson-side,
  .lesson-pager,
  .btn-mark,
  .crumbs,
  .fold-notes,
  .lesson-progress-inline {
    display: none !important;
  }

  .lesson-layout {
    grid-template-columns: 1fr;
  }

  .lesson-content,
  .lesson-hero,
  .module-hero {
    box-shadow: none;
    border-color: #bbb;
  }

  body {
    background: #fff;
  }

  .lesson-body pre {
    background: #f4f4f4;
    color: #222;
  }
}

/* ---------------------------- 作业 ---------------------------- */

.assignment-link {
  display: block;
  color: inherit;
}

.assignment-link:hover {
  text-decoration: none;
}

.assignment-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal-600);
  border-radius: 4px;
  box-shadow: var(--shadow-card);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
  max-width: 640px;
}

.assignment-link:hover .assignment-card {
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
}

.assignment-card h3 {
  font-family: var(--font-display);
  margin: 0;
  font-size: 17px;
  color: var(--navy-900);
}

.assignment-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
}

/* ---------------------------- 快速导航按钮 ---------------------------- */

.quick-nav {
  position: fixed;
  right: 18px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 90;
}

.quick-nav-btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--navy-400);
  border-radius: 50%;
  background: var(--navy-800);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-elevated);
  transition: background 0.15s ease, transform 0.15s ease, opacity 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
}

.quick-nav-btn:hover {
  background: var(--navy-900);
  transform: translateY(-1px);
}

.quick-nav-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

@media print {
  .quick-nav { display: none; }
}
