/* =========================================================
   RPA 财务机器人 · 全站设计系统（风格 B：浅色简洁商务风）
   ========================================================= */

:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-soft: #EFF6FF;
  --accent: #7C3AED;
  --text: #0F172A;
  --text-2: #475569;
  --muted: #64748B;
  --muted-2: #94A3B8;
  --bg: #FFFFFF;
  --bg-soft: #F8FAFC;
  --border: #E2E8F0;
  --ink: #0F172A;
  --success: #10B981;
  --radius-card: 14px;
  --radius-btn: 10px;
  --shadow-hover: 0 16px 32px rgba(15, 23, 42, .10);
  --font: "PingFang SC", "Microsoft YaHei", "Segoe UI", -apple-system, Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  animation: pageIn .4s ease both; /* 页面切换淡入（纯 CSS，JS 禁用也生效） */
}

@keyframes pageIn { from { opacity: .01; } to { opacity: 1; } }

img { max-width: 100%; display: block; }

h1, h2, h3, h4, h5 { line-height: 1.3; margin: 0; letter-spacing: -.02em; }

p { margin: 0; }

a { color: var(--primary); text-decoration: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-btn);
  font-size: 15.5px;
  font-weight: 700;
  font-family: var(--font);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform .18s, box-shadow .18s, background .2s, color .2s;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 18px rgba(37, 99, 235, .28); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-3px); box-shadow: 0 12px 26px rgba(37, 99, 235, .38); }
.btn-ghost { background: transparent; color: var(--primary); border: 1.5px solid #BFDBFE; }
.btn-ghost:hover { background: var(--primary-soft); transform: translateY(-3px); }
.btn-light { background: #fff; color: var(--primary); box-shadow: 0 8px 22px rgba(0, 0, 0, .18); }
.btn-light:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0, 0, 0, .26); }

/* ============ 顶部导航 ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; color: var(--text); }
.logo .ico {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #2563EB, #7C3AED);
  display: grid; place-items: center; color: #fff; font-size: 17px;
  transition: transform .25s;
}
.logo:hover .ico { transform: rotate(-8deg) scale(1.06); }
.logo em { font-style: normal; color: var(--primary); font-weight: 700; }

.menu { display: flex; gap: 28px; }
.menu a {
  position: relative;
  color: var(--text-2);
  font-size: 15px;
  padding: 6px 0;
  transition: color .2s;
}
.menu a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 2px;
  background: var(--primary);
  transition: right .25s;
}
.menu a:hover { color: var(--primary); }
.menu a:hover::after, .menu a.active::after { right: 0; }
.menu a.active { color: var(--primary); font-weight: 700; }

.nav-cta { padding: 9px 20px; font-size: 14.5px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span { width: 22px; height: 2.5px; background: var(--text); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ============ Hero 横幅 ============ */
.hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  padding: 72px 24px;
  color: #fff;
  background: #1E3A8A url("../img/banner.jpg") right center / cover no-repeat;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, .74) 0%, rgba(15, 23, 42, .38) 46%, rgba(15, 23, 42, 0) 72%);
}
.hero .container { position: relative; }
.hero-inner { max-width: 620px; }
.hero-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 15px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .35);
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -1px;
  margin: 0;               /* 静态标题：按设计决策不做任何动效 */
}
.hero p { font-size: 17px; line-height: 1.8; color: rgba(255, 255, 255, .86); margin: 18px 0 30px; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .12); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .26); }

/* ============ 统计条 ============ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}
.stat { background: var(--bg-soft); text-align: center; padding: 34px 12px; }
.stat b { display: block; font-size: 38px; font-weight: 900; color: var(--primary); letter-spacing: -1px; line-height: 1.2; }
.stat span { font-size: 14px; color: var(--muted); }

/* ============ 区块 ============ */
.section { padding: 76px 0; }
.section.soft { background: var(--bg-soft); }
.eyebrow { font-size: 13px; font-weight: 800; color: var(--primary); letter-spacing: 2.5px; text-transform: uppercase; margin-bottom: 10px; }
.section-title { font-size: clamp(26px, 3.4vw, 34px); font-weight: 900; margin-bottom: 12px; }
.section-desc { color: var(--muted); font-size: 16px; line-height: 1.8; max-width: 680px; margin-bottom: 40px; }
.section-head-center { text-align: center; }
.section-head-center .section-desc { margin-left: auto; margin-right: auto; }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ============ 通用卡片 ============ */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  transition: transform .22s, box-shadow .22s, border-color .22s;
}
.card:hover { transform: translateY(-7px); box-shadow: var(--shadow-hover); border-color: #BFDBFE; }
.card .icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--primary-soft);
  display: grid; place-items: center;
  font-size: 23px;
  margin-bottom: 16px;
  transition: background .22s, transform .22s;
}
.card:hover .icon { background: var(--primary); transform: scale(1.08) rotate(-6deg); }
.card:hover .icon span { filter: grayscale(1) brightness(3); }
.card h3 { font-size: 17.5px; font-weight: 800; margin-bottom: 8px; }
.card p { font-size: 14.5px; line-height: 1.75; color: var(--muted); }

/* ============ 流程演示（首页核心交互） ============ */
.demo { background: var(--ink); border-radius: 18px; padding: 32px; color: #E2E8F0; }
.demo-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 24px; }
.demo-top h3 { font-size: 18px; color: #fff; }
.demo-top .status { font-size: 13.5px; color: var(--muted-2); margin-top: 5px; }
.demo-top .status b { color: #60A5FA; font-weight: 700; }
.run-btn {
  background: linear-gradient(90deg, #3B82F6, #8B5CF6);
  color: #fff; border: none;
  padding: 12px 26px; border-radius: 10px;
  font-size: 15px; font-weight: 800; font-family: var(--font);
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  transition: transform .18s, filter .2s;
}
.run-btn:hover { transform: translateY(-2px); filter: brightness(1.12); }
.run-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.flow { display: flex; margin-bottom: 22px; }
.step {
  flex: 1;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  padding: 18px 15px;
  transition: all .3s;
  position: relative;
}
.step + .step { margin-left: 28px; }
.step + .step::before {
  content: "→";
  position: absolute; left: -23px; top: 50%;
  transform: translateY(-50%);
  color: #475569; font-weight: 900;
  transition: color .3s;
}
.step .n {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  display: grid; place-items: center;
  font-size: 12.5px; font-weight: 800;
  margin-bottom: 10px;
  transition: all .3s;
}
.step h4 { font-size: 15px; color: #fff; margin-bottom: 5px; }
.step p { font-size: 12.5px; color: var(--muted-2); line-height: 1.65; }
.step.active {
  border-color: #3B82F6;
  background: rgba(59, 130, 246, .16);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .22), 0 0 26px rgba(59, 130, 246, .25);
  transform: translateY(-4px);
}
.step.active .n { background: #3B82F6; color: #fff; animation: pulse 1s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, .55); }
  50% { box-shadow: 0 0 0 9px rgba(59, 130, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}
.step.done { border-color: rgba(52, 211, 153, .5); background: rgba(52, 211, 153, .1); }
.step.done .n { background: var(--success); color: #fff; }
.step.done + .step::before { color: #34D399; }

.demo-log {
  background: #020617;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 10px;
  padding: 15px 17px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.95;
  min-height: 130px;
  max-height: 220px;
  overflow-y: auto;
  color: #7DD3FC;
}
.demo-log .t { color: #94A3B8; }
.demo-log .ok { color: #34D399; }
.demo-log .idle { color: var(--muted-2); }

/* ============ 学习路径 ============ */
.phase {
  position: relative;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 30px 22px 24px;
  transition: transform .22s, box-shadow .22s;
  display: block;
  color: inherit;
}
.phase:hover { transform: translateY(-7px); box-shadow: var(--shadow-hover); }
.phase .badge {
  position: absolute; top: -14px; left: 20px;
  background: linear-gradient(90deg, #2563EB, #7C3AED);
  color: #fff; font-size: 12px; font-weight: 800;
  padding: 4px 12px; border-radius: 99px;
}
.phase h3 { font-size: 17px; margin: 6px 0 8px; }
.phase p { font-size: 14px; color: var(--muted); line-height: 1.7; }
.phase .weeks {
  display: inline-block; margin-top: 14px;
  font-size: 12.5px; color: var(--primary);
  background: var(--primary-soft); padding: 3px 11px;
  border-radius: 99px; font-weight: 700;
}

/* 进度条 */
.progress { height: 8px; background: var(--border); border-radius: 99px; overflow: hidden; margin-top: 16px; }
.progress i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #2563EB, #7C3AED);
  border-radius: 99px;
  transition: width .9s cubic-bezier(.22, 1, .36, 1);
}

/* ============ 资源卡（首页预览 / 下载页共用） ============ */
.res-card {
  display: flex; align-items: center; gap: 15px;
  background: #fff; border: 1px solid var(--border);
  border-radius: 13px; padding: 20px 22px;
  transition: transform .22s, box-shadow .22s, border-color .22s;
  cursor: pointer;
}
.res-card:hover { transform: translateY(-5px); border-color: var(--primary); box-shadow: 0 14px 30px rgba(37, 99, 235, .14); }
.res-card .fic {
  width: 44px; height: 44px; border-radius: 11px;
  background: var(--primary-soft);
  display: grid; place-items: center; font-size: 20px; flex: none;
  transition: background .22s;
}
.res-card:hover .fic { background: #DBEAFE; }
.res-card h3 { font-size: 15.5px; margin-bottom: 3px; }
.res-card .meta { font-size: 13px; color: var(--muted); }
.res-card .dl { margin-left: auto; font-size: 13.5px; font-weight: 800; color: var(--primary); white-space: nowrap; }

/* ============ CTA 横幅 ============ */
.cta-band {
  max-width: 1200px;
  margin: 0 auto 76px;
  border-radius: 18px;
  padding: 58px 40px;
  background: linear-gradient(120deg, #1D4ED8, #4338CA 55%, #6D28D9);
  color: #fff;
  text-align: center;
}
.cta-band h2 { font-size: clamp(24px, 3vw, 30px); font-weight: 900; margin-bottom: 12px; }
.cta-band p { color: rgba(255, 255, 255, .82); font-size: 16px; margin-bottom: 26px; }

/* ============ 页面头（子页通用） ============ */
.page-hero {
  background: linear-gradient(120deg, #EFF6FF, #F5F3FF);
  border-bottom: 1px solid var(--border);
  padding: 60px 24px;
  text-align: center;
}
.page-hero h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 900; margin: 10px 0 12px; }
.page-hero p { color: var(--text-2); font-size: 16.5px; max-width: 640px; margin: 0 auto; }

/* ============ 页脚 ============ */
.footer { background: var(--ink); color: var(--muted-2); padding: 44px 24px 26px; font-size: 14px; }
.footer-top { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; gap: 36px; flex-wrap: wrap; margin-bottom: 26px; }
.footer .logo { color: #fff; margin-bottom: 10px; }
.footer .logo em { color: #60A5FA; }
.footer .about { max-width: 300px; line-height: 1.8; }
.footer h3 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.footer .col a { display: block; color: var(--muted-2); margin-bottom: 8px; transition: color .2s, transform .2s; }
.footer .col a:hover { color: #60A5FA; transform: translateX(4px); }
.footer-bot { max-width: 1200px; margin: 0 auto; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 20px; font-size: 13px; color: var(--muted-2); text-align: center; }
.footer-bot a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.footer-bot a:hover { color: #60A5FA; }

/* ============ 返回顶部 ============ */
.back-top {
  position: fixed;
  right: 26px; bottom: 26px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff; border: none;
  font-size: 18px; cursor: pointer;
  box-shadow: 0 10px 24px rgba(37, 99, 235, .4);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity .25s, transform .25s, background .2s;
  z-index: 90;
}
.back-top.show { opacity: 1; transform: none; pointer-events: auto; }
.back-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* ============ 滚动淡入（仅 JS 启用时生效） ============ */
html.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .6s ease, transform .6s ease; }
html.js .reveal.in { opacity: 1; transform: none; }
.grid .reveal:nth-child(2) { transition-delay: .08s; }
.grid .reveal:nth-child(3) { transition-delay: .16s; }
.grid .reveal:nth-child(4) { transition-delay: .24s; }
.grid .reveal:nth-child(5) { transition-delay: .32s; }
.grid .reveal:nth-child(6) { transition-delay: .40s; }

/* ============ RPA简介页 ============ */
.def-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 30px;
  font-size: 16px; line-height: 1.9; color: var(--text-2);
}
.def-card b { color: var(--primary); }
.points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 20px; }
.point { background: var(--primary-soft); border: 1px solid #DBEAFE; border-radius: 12px; padding: 18px 16px; text-align: center; transition: transform .22s; }
.point:hover { transform: translateY(-5px); }
.point .pic { font-size: 26px; }
.point h3 { font-size: 15.5px; margin: 8px 0 5px; }
.point p { font-size: 13.5px; color: var(--text-2); line-height: 1.7; }

/* 时间线 */
.timeline { display: flex; padding: 34px 10px 6px; }
.tl-node { flex: 1; text-align: center; position: relative; font-size: 13.5px; color: var(--muted); padding-top: 22px; cursor: default; }
.tl-node::before {
  content: "";
  position: absolute; top: 4px; left: 50%;
  transform: translateX(-50%);
  width: 13px; height: 13px; border-radius: 50%;
  background: #fff; border: 2.5px solid #BFDBFE;
  transition: all .4s;
}
.tl-node::after {
  content: "";
  position: absolute; top: 9px; left: 50%;
  width: 100%; height: 2.5px;
  background: #E2E8F0;
  transition: background .5s;
}
.tl-node:last-child::after { display: none; }
.tl-node b { display: block; color: var(--text); font-size: 15px; margin-bottom: 2px; transition: color .3s; }
.tl-node span { font-size: 12.5px; }
.tl-node.lit::before { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 5px rgba(37, 99, 235, .16); }
.tl-node.lit::after { background: var(--primary); }
.tl-node:hover b { color: var(--primary); }

/* Tabs */
.tabs { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.tab-btn {
  font-family: var(--font);
  font-size: 14.5px;
  padding: 9px 22px;
  border-radius: 99px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: all .2s;
}
.tab-btn:hover:not(.active) { background: var(--primary-soft); color: var(--primary); border-color: #BFDBFE; }
.tab-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; box-shadow: 0 6px 16px rgba(37, 99, 235, .3); }
.tab-pane {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 26px 28px;
  font-size: 15.5px; line-height: 1.9; color: var(--text-2);
}
.tab-pane[hidden] { display: none; }
.tab-pane b { color: var(--primary); }
.tab-pane ul { margin: 10px 0 0; padding-left: 20px; }
.tab-pane li { margin-bottom: 6px; }

/* FAQ 手风琴 */
.faq-item { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px; overflow: hidden; background: #fff; transition: border-color .2s, box-shadow .2s; }
.faq-item.open { border-color: #BFDBFE; box-shadow: 0 8px 22px rgba(37, 99, 235, .08); }
.faq-q {
  width: 100%;
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 17px 20px;
  font-size: 15.5px; font-weight: 700; font-family: var(--font);
  background: #fff; border: none;
  text-align: left; cursor: pointer;
  color: var(--text);
  transition: color .2s, background .2s;
}
.faq-q:hover { color: var(--primary); background: var(--bg-soft); }
.faq-q .sign {
  flex: none;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center;
  font-size: 16px; font-weight: 800;
  transition: transform .3s, background .3s, color .3s;
}
.faq-item.open .faq-q .sign { transform: rotate(45deg); background: var(--primary); color: #fff; }
.faq-a { padding: 0 20px 18px; font-size: 14.5px; line-height: 1.85; color: var(--muted); }
.faq-a[hidden] { display: none; }

/* ============ RPA学习页 ============ */
.learn-layout { display: grid; grid-template-columns: 230px 1fr; gap: 40px; align-items: start; }
/* Grid 子项默认 min-width:auto，会被 pre 类内容撑破导致移动端横向溢出 */
.learn-layout > * { min-width: 0; }
.toc { position: sticky; top: 88px; }
.toc-label { font-size: 13px; font-weight: 800; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; margin-bottom: 14px; }
.toc a {
  display: block;
  padding: 11px 14px;
  border-radius: 9px;
  color: var(--text-2);
  font-size: 14.5px;
  margin-bottom: 6px;
  border-left: 3px solid transparent;
  transition: all .2s;
}
.toc a:hover { background: var(--bg-soft); }
.toc a.on { background: var(--primary-soft); color: var(--primary); font-weight: 800; border-left-color: var(--primary); }

.stage { margin-bottom: 46px; scroll-margin-top: 90px; }
.stage-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.stage-head .num {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, #2563EB, #7C3AED);
  color: #fff; font-weight: 900; font-size: 17px;
  display: grid; place-items: center; flex: none;
}
.stage-head h2 { font-size: 23px; font-weight: 900; }
.stage-head .tag { font-size: 12.5px; color: var(--primary); background: var(--primary-soft); padding: 3px 12px; border-radius: 99px; font-weight: 700; }

.chapter { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px; overflow: hidden; background: #fff; transition: border-color .2s, box-shadow .2s; }
.chapter:hover { border-color: #BFDBFE; }
.chapter.open { border-color: #BFDBFE; box-shadow: 0 10px 26px rgba(37, 99, 235, .08); }
.chapter-h {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  background: #fff; border: none;
  font-size: 15.5px; font-weight: 700; font-family: var(--font);
  color: var(--text);
  cursor: pointer; text-align: left;
  transition: color .2s;
}
.chapter-h:hover { color: var(--primary); }
.chapter-h .no { background: var(--primary-soft); color: var(--primary); font-size: 12.5px; padding: 3px 10px; border-radius: 7px; font-weight: 800; flex: none; }
.chapter-h .ar { margin-left: auto; color: var(--muted-2); font-size: 15px; transition: transform .25s; flex: none; }
.chapter.open .chapter-h .ar { transform: rotate(90deg); color: var(--primary); }
.chapter-body { display: none; padding: 0 20px 18px; background: var(--bg-soft); border-top: 1px solid var(--border); font-size: 14.5px; color: var(--muted); line-height: 1.85; }
.chapter.open .chapter-body { display: block; }
.chapter-body[hidden] { display: none; }
.chapter-body ul { margin: 14px 0 0; padding-left: 20px; }
.chapter-body li { margin-bottom: 6px; }
.chapter-body .ch-sub { margin: 13px 0 0; font-size: 13.6px; font-style: italic; color: var(--text-2); line-height: 1.75; }
.chapter-body .btn { margin-top: 15px; padding: 9px 22px; font-size: 14px; }

/* 代码/规则块 */
.codeblock { position: relative; max-width: 100%; background: var(--ink); color: #7DD3FC; border-radius: 10px; padding: 16px 18px; margin-top: 14px; font-family: Consolas, "Courier New", monospace; font-size: 13.5px; line-height: 1.8; overflow-x: auto; white-space: pre; }
.codeblock .cm { color: #94A3B8; }
.copy-btn {
  position: absolute; top: 9px; right: 9px;
  background: rgba(255, 255, 255, .14);
  color: #E2E8F0; border: none;
  font-size: 12px; padding: 5px 12px;
  border-radius: 6px; cursor: pointer;
  font-family: var(--font);
  transition: background .2s;
}
.copy-btn:hover { background: var(--primary); }

/* ============ RPA练习场页（6 练习目录） ============ */
.pg-hero { text-align: center; padding: 70px 24px 50px; background: linear-gradient(120deg, #EFF6FF, #F5F3FF); border-bottom: 1px solid var(--border); }
.pg-hero h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 900; margin: 14px 0 12px; }
.pg-hero p { color: var(--text-2); font-size: 16px; max-width: 660px; margin: 0 auto; line-height: 1.8; }

.pg-card {
  display: block;
  position: relative;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-card);
  padding: 30px 24px 26px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: all .25s;
}
.pg-card:hover { border-color: var(--primary); transform: translateY(-6px); box-shadow: 0 14px 30px rgba(37, 99, 235, .12); }
.pg-card .ic { font-size: 36px; }
.pg-card .lvl {
  position: absolute; top: 22px; right: 22px;
  font-size: 12.5px; font-weight: 600;
  color: var(--primary); background: var(--primary-soft);
  border: 1px solid #BFDBFE;
  padding: 3px 13px; border-radius: 99px;
}
.pg-card h2 { font-size: 17.5px; font-weight: 700; margin: 16px 0 8px; }
.pg-card p { font-size: 14px; color: var(--muted); line-height: 1.75; margin: 0 0 14px; }
.pg-card .go { font-size: 14px; font-weight: 600; color: var(--primary); }

/* ============ 资源下载页 ============ */
.searchbar { position: relative; margin-bottom: 18px; }
.searchbar input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-btn);
  padding: 14px 18px 14px 46px;
  font-size: 15.5px; font-family: var(--font);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.searchbar input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, .14); }
.searchbar::before { content: "🔍"; position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 16px; opacity: .75; }

.chips { display: flex; gap: 10px; margin-bottom: 26px; flex-wrap: wrap; }
.chip {
  font-family: var(--font);
  font-size: 14px;
  padding: 8px 20px;
  border-radius: 99px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: all .2s;
}
.chip:hover { background: var(--primary-soft); color: var(--primary); border-color: #BFDBFE; }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; box-shadow: 0 6px 16px rgba(37, 99, 235, .3); }

.dl-row {
  display: flex; align-items: center; gap: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 12px;
  background: #fff;
  transition: transform .22s, box-shadow .22s, border-color .22s;
}
.dl-row:hover { border-color: var(--primary); box-shadow: 0 12px 26px rgba(37, 99, 235, .12); transform: translateX(5px); }
.dl-row[hidden] { display: none; }
.dl-row .fic { width: 46px; height: 46px; border-radius: 11px; background: var(--primary-soft); display: grid; place-items: center; font-size: 21px; flex: none; }
.dl-row h2 { font-size: 16px; margin-bottom: 4px; }
.dl-row .meta { font-size: 13.5px; color: var(--muted); }
.dl-row .meta i { font-style: normal; color: var(--primary); background: var(--primary-soft); padding: 1px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; margin-right: 8px; }
.dl-btn {
  margin-left: auto; flex: none;
  background: var(--primary); color: #fff;
  border: none; border-radius: 9px;
  padding: 10px 20px;
  font-size: 14px; font-weight: 800; font-family: var(--font);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex; align-items: center; white-space: nowrap;
  transition: all .2s;
}
.dl-btn:hover { background: var(--primary-dark); transform: scale(1.05); }
.dl-count { text-align: center; font-size: 13.5px; color: var(--muted); margin-top: 20px; }
/* 404 页：超大错误码 */
.nf-code { font-size: clamp(72px, 14vw, 150px); font-weight: 800; line-height: 1; color: var(--primary); text-align: center; margin: 8px 0 12px; }
.dl-empty { text-align: center; color: var(--muted); padding: 40px 0; font-size: 15px; }
.dl-empty[hidden] { display: none; }

/* 缺图占位：图片加载失败时由 main.js 替换为同结构的提示框 */
.img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 140px;
  padding: 26px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-card);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.7;
}

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .learn-layout { grid-template-columns: 1fr; }
  .toc { position: static; display: flex; flex-wrap: wrap; gap: 6px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
  .toc-label { display: none; }
  .toc a { margin-bottom: 0; border-left: none; border-radius: 99px; padding: 8px 16px; background: #fff; border: 1px solid var(--border); }
  .toc a.on { background: var(--primary); color: #fff; border-color: var(--primary); }
  .flow { flex-wrap: wrap; gap: 14px; }
  .step { flex: 1 1 40%; margin-left: 0 !important; }
  .step + .step::before { display: none; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }
  .menu {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 18px 30px rgba(15, 23, 42, .1);
    max-height: 0;
    overflow: hidden;
    transition: max-height .32s ease;
    padding: 0 24px;
  }
  .menu.open { max-height: 340px; padding: 10px 24px 16px; }
  .menu a { padding: 13px 0; border-bottom: 1px solid var(--bg-soft); font-size: 15.5px; }
  .menu a::after { display: none; }

  .hero { min-height: 420px; padding: 56px 24px; background-position: right center; }
  .hero::before { background: linear-gradient(90deg, rgba(15, 23, 42, .85), rgba(15, 23, 42, .55)); }

  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat b { font-size: 30px; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .points { grid-template-columns: 1fr; }
  .section { padding: 54px 0; }
  .demo { padding: 22px 18px; }
  .step { flex: 1 1 100%; }
  .cta-band { margin: 0 16px 54px; padding: 44px 24px; }

  /* 时间线转竖排 */
  .timeline { flex-direction: column; padding: 10px 0 0 8px; }
  .tl-node { text-align: left; padding: 0 0 26px 30px; }
  .tl-node::before { top: 4px; left: 0; transform: none; }
  .tl-node::after { top: 17px; left: 6px; width: 2.5px; height: 100%; }
  .tl-node:last-child::after { display: none; }

  .dl-row { flex-wrap: wrap; }
  .dl-btn { margin-left: 62px; width: calc(100% - 62px); justify-content: center; display: flex; }
  .footer-top { flex-direction: column; gap: 26px; }
}

/* ============ 无障碍：减少动效偏好 ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html.js .reveal { opacity: 1; transform: none; }
}
