/* ============================================================
   capynana.com · AI教学课件设计教程  共享样式
   香蕉豚老师的教程站 —— 参考 labuladong 的三栏阅读布局
   ============================================================ */

:root {
  /* 浅色主题（默认，奶油纸感） */
  --bg: #faf6ec;
  --bg-sidebar: #f3ecdd;
  --surface: #ffffff;
  --surface-2: #fbf7ee;
  --border: #e7ddc9;
  --border-strong: #d8cbb0;
  --text: #2d2820;
  --text-2: #575044;
  --text-3: #8a8170;
  --accent: #f5b82e;          /* 香蕉黄 */
  --accent-soft: #fdf0cf;
  --accent-ink: #8a5a00;
  --leaf: #2e7d6b;            /* 香蕉叶绿：主交互色 */
  --leaf-soft: #e2f1ec;
  --leaf-ink: #1c5c4e;
  --danger: #d65a44;
  --danger-soft: #fdeae5;
  --brown: #8a5a3b;
  --code-bg: #f6f1e5;
  --shadow: 0 2px 10px rgba(120, 96, 50, 0.08);
  --shadow-lg: 0 12px 36px rgba(120, 96, 50, 0.16);
  --radius: 14px;
  --radius-sm: 9px;
  --nav-h: 62px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", Consolas, "Courier New", monospace;
}

[data-theme="dark"] {
  --bg: #12151a;
  --bg-sidebar: #161a20;
  --surface: #1b2027;
  --surface-2: #20262f;
  --border: #2b323c;
  --border-strong: #39424f;
  --text: #e8e3d7;
  --text-2: #b3ac9d;
  --text-3: #7d796e;
  --accent: #ffd15c;
  --accent-soft: #3a3014;
  --accent-ink: #ffd15c;
  --leaf: #5fc9b3;
  --leaf-soft: #17342f;
  --leaf-ink: #8fe0cf;
  --danger: #f0826c;
  --danger-soft: #3c2019;
  --brown: #c89578;
  --code-bg: #222932;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}

a { color: var(--leaf); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

img { max-width: 100%; }

::selection { background: var(--accent); color: #2d2820; }

/* 统一线性图标 */
.icon { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon.fill { fill: currentColor; stroke: none; }
.icon-svg { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon-btn .icon { font-size: 19px; }
.l-status .icon { font-size: 14px; }
.l-status .done-ico { color: var(--leaf); }
.l-status .lock-ico { color: var(--text-3); }

/* ---------- 顶部导航 ---------- */
.read-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--leaf));
  z-index: 100; transition: width .12s linear;
}
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px;
}
.topbar .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--text); }
.topbar .brand:hover { text-decoration: none; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--accent);
  background: #fdf8ee;
}
.brand-name small { display: block; font-size: 11px; font-weight: 500; color: var(--text-3); letter-spacing: .5px; line-height: 1.2; }
.topbar .spacer { flex: 1; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; transition: transform .15s ease, border-color .15s;
}
.icon-btn:hover { transform: translateY(-1px); border-color: var(--accent); color: var(--text); }
.menu-btn { display: none; }
.topbar .nav-link {
  font-size: 14px; color: var(--text-2); font-weight: 600;
  padding: 6px 12px; border-radius: 999px;
}
.topbar .nav-link:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
/* 回主站入口：教学营是 Capynana 的子站，顶栏要能一键退回课件站，
   移动端也不要隐藏（窄屏下侧边栏是抽屉，"↗ 课件站"藏起来了就真没出口） */
.topbar .nav-back {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  white-space: nowrap;
}
.topbar .nav-back:hover {
  border-color: var(--accent);
  color: var(--text);
  background: var(--surface-2);
  text-decoration: none;
}

/* ---------- 三栏布局 ---------- */
.layout {
  max-width: 1380px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 272px minmax(0, 752px) 216px;
  gap: 20px 44px;
  justify-content: center;
  padding: 0 24px;
}

/* ---------- 左侧章节树 ---------- */
.sidebar {
  position: sticky; top: calc(var(--nav-h) + 16px);
  align-self: start;
  max-height: calc(100vh - var(--nav-h) - 32px);
  overflow-y: auto;
  padding: 22px 6px 40px 0;
  scrollbar-width: thin;
}
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
.side-caption {
  font-size: 12px; font-weight: 700; letter-spacing: 1.5px;
  color: var(--text-3); margin: 18px 12px 8px;
}
.side-caption:first-child { margin-top: 0; }
.side-group-title {
  width: 100%; text-align: left; cursor: pointer;
  background: none; border: 0; padding: 8px 12px;
  font-family: inherit; font-size: 13.5px; font-weight: 700; color: var(--text-2);
  display: flex; align-items: center; gap: 8px; border-radius: var(--radius-sm);
}
.side-group-title:hover { background: var(--surface); }
.side-group-title .arrow { margin-left: auto; transition: transform .2s; font-size: 11px; color: var(--text-3); }
.side-group.collapsed .arrow { transform: rotate(-90deg); }
.side-group.collapsed .side-links { display: none; }
.side-links { display: flex; flex-direction: column; margin: 2px 0 6px; }
.side-link {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 12px 7px 26px; margin: 1px 0;
  font-size: 14px; color: var(--text-2);
  border-left: 3px solid transparent; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  line-height: 1.45;
}
.side-link:hover { background: var(--surface); text-decoration: none; color: var(--text); }
.side-link.active {
  background: var(--accent-soft); color: var(--accent-ink);
  border-left-color: var(--accent); font-weight: 700;
}
[data-theme="dark"] .side-link.active { color: var(--accent); }
.side-link .num {
  font-size: 11px; font-family: var(--font-mono); color: var(--text-3);
  min-width: 20px;
}
.side-link.active .num { color: var(--accent-ink); }
[data-theme="dark"] .side-link.active .num { color: var(--accent); }
.side-link.locked { color: var(--text-3); }
.side-link.locked .lock { margin-left: auto; font-size: 12px; }

/* ---------- 正文 ---------- */
.content { min-width: 0; padding: 26px 0 80px; }

.breadcrumb { font-size: 13px; color: var(--text-3); margin-bottom: 14px; }
.breadcrumb a { color: var(--text-3); }
.breadcrumb a:hover { color: var(--leaf); }

.lesson-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 600;
  padding: 3px 11px; border-radius: 999px;
  background: var(--leaf-soft); color: var(--leaf-ink);
}
[data-theme="dark"] .tag { color: var(--leaf-ink); }
.tag.yellow { background: var(--accent-soft); color: var(--accent-ink); }
.tag.gray { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }

h1.article-title {
  font-size: 34px; line-height: 1.35; font-weight: 800;
  margin: 6px 0 10px; letter-spacing: .2px;
}
.article-sub { color: var(--text-2); font-size: 15.5px; margin: 0 0 26px; }

.article h2 {
  font-size: 25px; font-weight: 800; margin: 48px 0 16px;
  padding-top: 18px; line-height: 1.4;
  display: flex; align-items: center; gap: 10px;
  scroll-margin-top: calc(var(--nav-h) + 16px);
}
.article h2 .h2-num {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--accent); color: #4a3300;
  font-size: 16px; font-family: var(--font-mono); font-weight: 800;
}
.article h3 {
  font-size: 19.5px; font-weight: 700; margin: 34px 0 12px;
  scroll-margin-top: calc(var(--nav-h) + 16px);
}
.article h4 { font-size: 16.5px; font-weight: 700; margin: 22px 0 8px; }
.article p { margin: 14px 0; }
.article strong { color: var(--text); font-weight: 700; background: linear-gradient(transparent 62%, var(--accent-soft) 62%); padding: 0 2px; }
[data-theme="dark"] .article strong { background: linear-gradient(transparent 62%, rgba(255,209,92,.22) 62%); }
.article ul, .article ol { padding-left: 24px; margin: 14px 0; }
.article li { margin: 8px 0; }
.article li::marker { color: var(--leaf); font-weight: 700; }

code {
  font-family: var(--font-mono); font-size: .88em;
  background: var(--code-bg); border: 1px solid var(--border);
  padding: 2px 7px; border-radius: 6px; color: var(--brown);
}
[data-theme="dark"] code { color: var(--accent); }

/* ---------- 视频窗口 ---------- */
.video-window {
  margin: 8px 0 30px; border-radius: var(--radius);
  overflow: hidden; position: relative;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  background: #111;
}
.video-window .ratio { position: relative; aspect-ratio: 16 / 9; }
.video-window img.poster, .video-window video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.video-window .play-mask {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; cursor: pointer;
  background: linear-gradient(180deg, rgba(20,16,8,.08) 0%, rgba(20,16,8,.42) 100%);
  transition: background .2s;
}
.video-window:hover .play-mask { background: linear-gradient(180deg, rgba(20,16,8,.14) 0%, rgba(20,16,8,.5) 100%); }
.play-btn {
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--accent); border: 4px solid rgba(255,255,255,.85);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  transition: transform .18s;
}
.video-window:hover .play-btn { transform: scale(1.08); }
.play-btn::after {
  content: ""; border-style: solid; border-width: 13px 0 13px 22px;
  border-color: transparent transparent transparent #4a3300; margin-left: 5px;
}
.video-label {
  background: rgba(0,0,0,.62); color: #fff; font-size: 14px; font-weight: 600;
  padding: 7px 18px; border-radius: 999px; backdrop-filter: blur(4px);
}
.video-guide {
  position: absolute; inset: 0; display: none;
  background: rgba(18,21,26,.94); color: #e8e3d7;
  padding: 28px; overflow-y: auto;
}
.video-guide.show { display: flex; flex-direction: column; justify-content: center; }
.video-guide h4 { margin: 0 0 10px; color: var(--accent); font-size: 17px; }
.video-guide p { font-size: 14px; line-height: 1.9; margin: 0; color: #cfc8b8; max-width: 620px; }
.video-guide ol { padding-left: 20px; margin: 8px 0; font-size: 14px; line-height: 1.9; }
.video-guide code { background: #2b323c; color: #ffd15c; border-color: #39424f; }
.video-guide .close-guide {
  position: absolute; top: 12px; right: 14px;
  background: none; border: 0; color: #b3ac9d; font-size: 22px; cursor: pointer;
}

/* ---------- 提示容器 ---------- */
.callout {
  border-radius: var(--radius);
  padding: 16px 18px 16px 52px;
  margin: 20px 0; position: relative;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 15px;
}
.callout .co-icon {
  position: absolute; left: 15px; top: 15px;
  font-size: 15px;
  width: 26px; height: 26px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800;
}
.callout .co-title { font-weight: 800; margin-bottom: 4px; display: block; }
.callout p:first-of-type { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }
.callout.tip { background: var(--leaf-soft); border-color: transparent; }
.callout.tip .co-icon { background: var(--leaf); color: #fff; }
.callout.tip .co-title { color: var(--leaf-ink); }
.callout.warn { background: var(--danger-soft); border-color: transparent; }
.callout.warn .co-icon { background: var(--danger); color: #fff; }
.callout.warn .co-title { color: var(--danger); }
.callout.key { background: var(--accent-soft); border-color: transparent; }
.callout.key .co-icon { background: var(--accent); color: #4a3300; }
.callout.key .co-title { color: var(--accent-ink); }
.callout.banana { padding-left: 76px; min-height: 64px; }
.callout.banana .co-avatar {
  position: absolute; left: 14px; top: 16px;
  width: 48px; height: 48px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--accent);
}
.callout .co-icon .icon { font-size: 15px; }
.callout.banana .co-title { color: var(--brown); }

/* ---------- 概念卡片 / 对比 ---------- */
.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0; }
.concept-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
  box-shadow: var(--shadow);
}
.concept-card .cc-head { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 16px; margin-bottom: 8px; }
.concept-card .cc-badge {
  flex: none; width: 28px; height: 28px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.cc-badge.brain { background: var(--leaf-soft); color: var(--leaf-ink); }
.cc-badge.hand { background: var(--accent-soft); color: var(--accent-ink); }
.cc-badge.text { background: #e9f0fb; color: #2f5d9e; }
.cc-badge.vision { background: #f6e8f3; color: #a44b8c; }
.cc-badge.old { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.cc-badge.new { background: var(--leaf-soft); color: var(--leaf-ink); }
[data-theme="dark"] .cc-badge.text { background: #1d2c3f; color: #82b3ec; }
[data-theme="dark"] .cc-badge.vision { background: #3a2235; color: #e08fc8; }
.concept-card p { margin: 6px 0; font-size: 14.5px; color: var(--text-2); }
.concept-card ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; color: var(--text-2); }

/* 对比表格 */
.table-wrap { overflow-x: auto; margin: 18px 0; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
table.cmp { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 14.5px; min-width: 520px; }
table.cmp th, table.cmp td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
table.cmp thead th { background: var(--surface-2); font-weight: 800; font-size: 14px; }
table.cmp th:first-child { width: 22%; }
table.cmp tbody tr:last-child td { border-bottom: 0; }
table.cmp td:first-child { font-weight: 700; color: var(--text); white-space: nowrap; }
table.cmp .yes { color: var(--leaf-ink); font-weight: 700; }
table.cmp .no { color: var(--danger); font-weight: 700; }
[data-theme="dark"] table.cmp .yes { color: var(--leaf); }

/* 模型清单 pill */
.tool-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.tool-pill {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--border-strong); background: var(--surface);
  border-radius: 999px; padding: 8px 16px; font-size: 14px; font-weight: 600;
  color: var(--text); box-shadow: var(--shadow);
  transition: transform .15s, border-color .15s;
}
.tool-pill:hover { transform: translateY(-2px); border-color: var(--leaf); text-decoration: none; }
.tool-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); }

/* 阶段时间轴 */
.stages { display: grid; grid-template-columns: 1fr 46px 1fr; align-items: stretch; margin: 22px 0; }
.stage {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow);
}
.stage .s-year { font-family: var(--font-mono); font-size: 13px; color: var(--text-3); font-weight: 700; }
.stage .s-name { font-size: 16.5px; font-weight: 800; margin: 4px 0 6px; }
.stage p { font-size: 14px; color: var(--text-2); margin: 0; }
.stage.s2 { border-color: var(--accent); box-shadow: 0 6px 20px rgba(245,184,46,.18); }
.stage-arrow { display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 24px; font-weight: 800; }

/* ---------- 图片槽位（供你替换为自己的截图） ---------- */
.figure { margin: 22px 0; }
.figure img { border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); display: block; width: 100%; }
/* 录屏演示（GIF 转成的循环视频）：和图片同一套外观 */
.figure video {
  border-radius: var(--radius); border: 1px solid var(--border);
  box-shadow: var(--shadow); display: block; width: 100%;
}
/* 竖长截图（手机截屏那种）别撑满整行 */
.figure .figure-narrow { max-width: 320px; margin: 0 auto; display: block; }
/* 讲解图（内联 SVG）：跟着主题换色，比课件截图更适合讲抽象概念 */
.figure .concept-svg {
  display: block; width: 100%; height: auto;
  border-radius: var(--radius); border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
/* 讲解图通用色板：SVG 呈现属性不认 var()，所以颜色一律走这些 class */
.concept-svg .cf-bg { fill: var(--surface-2); stroke: var(--border); }
.concept-svg .cf-card { fill: var(--surface); stroke: var(--border); }
.concept-svg .cf-ink { fill: var(--text); }
.concept-svg .cf-body { fill: var(--text-2); }
.concept-svg .cf-sub { fill: var(--text-3); }
.concept-svg .cf-accent { fill: var(--accent); }
.concept-svg .cf-accent-ink { fill: var(--accent-ink); }
.concept-svg .cf-leaf { fill: var(--leaf); }
.concept-svg .cf-leaf-ink { fill: var(--leaf-ink); }
.concept-svg .cf-danger { fill: var(--danger); }
.concept-svg .cf-brown { fill: var(--brown); }
.concept-svg .cf-soft-accent { fill: var(--accent-soft); }
.concept-svg .cf-soft-leaf { fill: var(--leaf-soft); }
.concept-svg .cf-soft-danger { fill: var(--danger-soft); }
.concept-svg .cf-accent-line { stroke: var(--accent); fill: none; }
.concept-svg .cf-leaf-line { stroke: var(--leaf); fill: none; }
.concept-svg .cf-muted-line { stroke: var(--text-3); fill: none; }
.concept-svg .cf-rule { stroke: var(--border); }
.concept-svg .cf-strong-rule { stroke: var(--border-strong); }
.concept-svg .cf-txt { font-family: var(--font-sans); }
.fig-caption { font-size: 13px; color: var(--text-3); text-align: center; margin-top: 8px; }
/* 手机上让讲解图保持可读宽度、可横向滑动，而不是整体缩到看不清 */
@media (max-width: 760px) {
  .figure { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .figure .concept-svg { min-width: 620px; }
  .figure .fig-caption { min-width: 0; }
}
.img-slot {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 30px 22px; text-align: center; color: var(--text-3);
}
.img-slot .slot-icon { font-size: 30px; margin-bottom: 6px; }
.img-slot .slot-title { font-weight: 700; color: var(--text-2); font-size: 15px; }
.img-slot .slot-desc { font-size: 13.5px; margin: 6px 0 10px; }
.img-slot code { font-size: 12.5px; }
.img-slot.dark-instruction { background: repeating-linear-gradient(45deg, transparent, transparent 12px, rgba(0,0,0,.03) 12px, rgba(0,0,0,.03) 24px), var(--surface-2); }

/* ---------- 本课总结 ---------- */
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.summary-item {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 13px 16px;
}
.summary-item .si-num {
  flex: none; width: 26px; height: 26px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent-ink);
  font-family: var(--font-mono); font-weight: 800; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center;
}
[data-theme="dark"] .summary-item .si-num { color: var(--accent); }
.summary-item p { margin: 0; font-size: 14px; line-height: 1.6; }

/* 下节预告 */
.next-banner {
  margin-top: 36px; border-radius: var(--radius);
  background: linear-gradient(120deg, var(--leaf-soft), var(--accent-soft));
  border: 1px solid var(--border);
  padding: 22px 24px; display: flex; align-items: center; gap: 18px;
}
.next-banner img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid #fff; }
.next-banner .nb-text { flex: 1; min-width: 0; }
.next-banner .nb-text small { font-size: 12.5px; color: var(--text-3); font-weight: 700; }
.next-banner .nb-text p { margin: 2px 0 0; font-weight: 700; font-size: 16px; }

/* 上一篇 / 下一篇 */
.doc-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 44px; }
.doc-nav a {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 14px 18px; color: var(--text);
  box-shadow: var(--shadow); transition: border-color .15s, transform .15s;
}
.doc-nav a:hover { text-decoration: none; border-color: var(--leaf); transform: translateY(-2px); }
.doc-nav .dn-dir { font-size: 12.5px; color: var(--text-3); }
.doc-nav .dn-title { font-weight: 700; font-size: 15px; margin-top: 2px; }
.doc-nav a.next { text-align: right; grid-column: 2; }
.doc-nav .prev.disabled { opacity: .45; pointer-events: none; display: block; }

/* ---------- 右侧 TOC ---------- */
.toc {
  position: sticky; top: calc(var(--nav-h) + 16px);
  align-self: start;
  padding: 22px 0 40px;
  font-size: 13.5px;
  border-left: 1px solid var(--border);
  padding-left: 18px;
}
.toc .toc-title { font-size: 12px; font-weight: 700; letter-spacing: 1.5px; color: var(--text-3); margin-bottom: 10px; }
.toc a {
  display: block; color: var(--text-3); padding: 5px 0 5px 12px;
  border-left: 2px solid var(--border); margin-left: -1px;
  line-height: 1.5; font-size: 13.5px;
}
.toc a:hover { color: var(--text); text-decoration: none; }
.toc a.toc-h3 { padding-left: 26px; font-size: 12.8px; }
.toc a.active { color: var(--leaf-ink); border-left-color: var(--leaf); font-weight: 700; }
[data-theme="dark"] .toc a.active { color: var(--leaf); }

/* ---------- 首页 ---------- */
.home { min-width: 0; grid-column: 1 / -1; max-width: 1060px; margin: 0 auto; padding: 0 0 80px; }
.hero {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 36px; align-items: center;
  padding: 56px 0 44px;
}
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-soft); color: var(--accent-ink);
  font-size: 13px; font-weight: 700; padding: 5px 14px; border-radius: 999px;
  margin-bottom: 16px;
}
[data-theme="dark"] .hero .eyebrow { color: var(--accent); }
.hero h1 { font-size: 42px; line-height: 1.28; margin: 0 0 14px; font-weight: 800; }
.hero h1 .hl { color: var(--leaf); }
.hero p.lead { font-size: 16.5px; color: var(--text-2); margin: 0 0 24px; }
.hero .cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 999px; padding: 12px 26px; font-size: 15px; font-weight: 700;
  cursor: pointer; border: 1px solid transparent; transition: transform .15s, box-shadow .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #4a3300; box-shadow: 0 6px 18px rgba(245,184,46,.35); }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.hero-img { border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.hero-img img { display: block; width: 100%; }
.hero-stats { display: flex; gap: 30px; margin-top: 28px; }
.hero-stats .stat b { font-size: 24px; font-weight: 800; color: var(--leaf); display: block; }
.hero-stats .stat span { font-size: 13px; color: var(--text-3); }

.section-title { font-size: 26px; font-weight: 800; margin: 50px 0 6px; }
.section-sub { color: var(--text-2); font-size: 15px; margin: 0 0 22px; }

.module-card {
  display: block; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 14px; box-shadow: var(--shadow);
  color: var(--text); transition: transform .15s, border-color .15s, box-shadow .15s;
}
.module-card:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--leaf); box-shadow: var(--shadow-lg); }
.module-card .mc-top { display: flex; align-items: center; gap: 14px; }
.module-card .mc-num {
  flex: none; width: 46px; height: 46px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 800; font-size: 18px;
}
.mc-num.done { background: var(--accent); color: #4a3300; }
.mc-num.locked { background: var(--surface-2); color: var(--text-3); border: 1px dashed var(--border-strong); }
.module-card .mc-info { flex: 1; min-width: 0; }
.module-card .mc-info h3 { margin: 0; font-size: 17.5px; font-weight: 800; }
.module-card .mc-info p { margin: 3px 0 0; font-size: 13.5px; color: var(--text-2); }
.module-card .mc-go { color: var(--text-3); font-size: 20px; }
.lesson-list { margin: 12px 0 0; padding: 0; list-style: none; display: none; }
.module-card.open .lesson-list { display: block; }
.module-card.open .mc-go { transform: rotate(90deg); }
.mc-go { transition: transform .2s; }
.lesson-list li { display: flex; align-items: center; gap: 10px; padding: 9px 8px; font-size: 14px; color: var(--text-2); border-top: 1px dashed var(--border); }
.lesson-list li .l-status { font-size: 12px; }
.lesson-list li a { color: var(--leaf); font-weight: 600; }
.lesson-list li .l-title { flex: 1; }
.lesson-list li.locked .l-title { color: var(--text-3); }
/* 整行可点的课程条目（开放测试后模块三使用） */
.lesson-list li > a.ll-link { flex: 1; display: flex; align-items: center; gap: 10px; color: inherit; font-weight: inherit; }
.lesson-list li > a.ll-link:hover { text-decoration: none; }
.lesson-list li > a.ll-link:hover .l-title { color: var(--leaf); }
.lesson-list li > a.ll-link .l-title { flex: 1; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.feature-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.feature-card .f-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--leaf-soft); color: var(--leaf); display: inline-flex; align-items: center; justify-content: center; font-size: 21px; margin-bottom: 10px; }
.f-icon.yellow { background: var(--accent-soft); color: var(--accent-ink); }
.f-icon.pink { background: #f6e8f3; color: #a44b8c; }
.f-icon.blue { background: #e9f0fb; color: #2f5d9e; }
[data-theme="dark"] .f-icon.pink { background: #3a2235; color: #e08fc8; }
[data-theme="dark"] .f-icon.blue { background: #1d2c3f; color: #82b3ec; }
[data-theme="dark"] .f-icon.yellow { color: var(--accent); }
.feature-card h4 { margin: 0 0 6px; font-size: 16px; }
.feature-card p { margin: 0; font-size: 13.5px; color: var(--text-2); }

footer.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 60px; padding: 30px 24px;
  text-align: center; font-size: 13.5px; color: var(--text-3);
}
footer.site-footer img { width: 34px; height: 34px; border-radius: 50%; vertical-align: middle; margin-right: 8px; border: 2px solid var(--accent); }

/* ============================================================
   三档模型（全营底层逻辑）
   ============================================================ */
.tier-flow { display: grid; grid-template-columns: 1fr 34px 1fr 34px 1fr; gap: 8px; align-items: stretch; margin: 18px 0 6px; }
.tier-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 15px 16px 16px; }
.tier-card .tc-top { display: flex; align-items: center; gap: 11px; margin-bottom: 9px; }
.tier-card .tc-verb { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; }
.tier-card .tc-name { font-size: 15.5px; font-weight: 800; line-height: 1.25; }
.tier-card .tc-sub { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.tier-card p { margin: 0 0 6px; font-size: 14px; color: var(--text-2); }
.tier-card .tc-do { margin: 8px 0 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--text-2); }
.tier-card .tc-do li { padding: 3px 0 3px 15px; position: relative; }
.tier-card .tc-do li::before { content: "·"; position: absolute; left: 3px; color: var(--border-strong); font-weight: 800; }
.tier-card.t-hi { border-color: var(--accent); background: var(--accent-soft); }
.tier-card.t-hi .tc-verb { background: var(--accent); color: #4a3200; }
.tier-card.t-mid { border-color: var(--leaf); background: var(--leaf-soft); }
.tier-card.t-mid .tc-verb { background: var(--leaf); color: #fff; }
.tier-card.t-lo { border-color: var(--border-strong); background: var(--code-bg); }
.tier-card.t-lo .tc-verb { background: var(--border-strong); color: var(--text); }
.t-arrow { display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--border-strong); }

/* 档位小徽章 */
.tier-tag { display: inline-block; font-size: 12px; font-weight: 800; line-height: 1.6; padding: 1px 9px; border-radius: 999px; border: 1px solid; vertical-align: middle; margin-left: 7px; white-space: nowrap; }
.tier-tag.t-hi { color: var(--accent-ink); border-color: var(--accent); background: var(--accent-soft); }
.tier-tag.t-mid { color: var(--leaf-ink); border-color: var(--leaf); background: var(--leaf-soft); }
.tier-tag.t-lo { color: var(--text-2); border-color: var(--border-strong); background: var(--code-bg); }

/* 底层逻辑提示条 */
.tier-bar { display: flex; gap: 12px; align-items: flex-start; border: 1px dashed var(--border-strong); background: var(--surface); border-radius: var(--radius-sm); padding: 12px 14px; margin: 16px 0 22px; font-size: 14px; color: var(--text-2); }
.tier-bar .tb-icon { font-size: 18px; line-height: 1.3; }
.tier-bar a { color: var(--leaf); font-weight: 700; }

[data-theme="dark"] .tier-card.t-hi .tc-verb { color: #2a1c00; }
[data-theme="dark"] .tier-card.t-mid .tc-verb { color: #06231d; }

/* 移动端遮罩 */
.scrim { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 60; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1180px) {
  .layout { grid-template-columns: 248px minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 820px) {
  .layout { display: block; padding: 0 16px; }
  .menu-btn { display: inline-flex; }
  .topbar .nav-link[href="index.html"] { display: none; }
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar .brand { min-width: 0; }
  .brand-name { font-size: 16px; line-height: 1.1; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 70;
    width: 300px; max-height: none; height: 100vh;
    background: var(--bg-sidebar); border-right: 1px solid var(--border);
    padding: 70px 14px 30px; margin: 0;
    transform: translateX(-102%); transition: transform .25s ease;
    overflow-y: auto;
  }
  body.sidebar-open .sidebar { transform: translateX(0); box-shadow: var(--shadow-lg); }
  body.sidebar-open .scrim { display: block; }
  h1.article-title { font-size: 27px; }
  .article h2 { font-size: 21.5px; }
  .card-grid, .summary-grid { grid-template-columns: 1fr; }
  .tier-flow { grid-template-columns: 1fr; }
  .t-arrow { transform: rotate(90deg); padding: 2px 0; }
  .stages { grid-template-columns: 1fr; }
  .stage-arrow { transform: rotate(90deg); padding: 6px 0; }
  .hero { grid-template-columns: 1fr; padding: 34px 0 26px; gap: 24px; }
  .hero h1 { font-size: 31px; }
  .feature-grid { grid-template-columns: 1fr; }
  .doc-nav { grid-template-columns: 1fr; }
  .doc-nav a.next { grid-column: auto; text-align: left; }
  .next-banner { flex-wrap: wrap; }
}


/* 教学营未开放锁定 */
.side-link.is-locked,
.ll-link.is-locked {
  color: var(--text-3) !important;
  opacity: .62;
  cursor: default;
  pointer-events: none;
}
.side-link.is-locked:hover,
.ll-link.is-locked:hover { background: transparent; }
.lock-ico { width: 13px; height: 13px; opacity: .7; }
.side-link.is-locked .lock-ico { margin-left: 6px; }
.module-card.is-coming:hover {
  transform: none;
  border-color: var(--border);
  box-shadow: var(--shadow);
}
.module-card.is-coming .mc-go { transform: none !important; }

/* 未开放课时的整页门禁 */
.lesson-lock {
  position: fixed; inset: 0; z-index: 99999;
  background: var(--bg); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.lesson-lock .ll-box { max-width: 460px; text-align: center; }
.lesson-lock .ll-icon { font-size: 42px; line-height: 1; }
.lesson-lock h2 { font-size: 23px; margin: 14px 0 12px; }
.lesson-lock p { font-size: 14.5px; line-height: 2; color: var(--text-2); margin: 0 0 24px; }
.lesson-lock .ll-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.lesson-lock .ll-back { display: inline-block; margin-top: 20px; font-size: 13px; color: var(--text-3); }
