/* ============================================================
   计算机导论学习网站 - 公共样式 common.css
   主题：黑色文艺 · 墨夜纸韵（墨黑暖底 / 宣纸米白 / 古铜金 / 衬线标题）
   ============================================================ */

/* ---------- 设计变量 ---------- */
:root {
  /* 古铜金主色 */
  --primary: #c2a06a;
  --primary-dark: #d4b782;
  --primary-light: rgba(194, 160, 106, .14);
  --accent: #7fa396;       /* 墨绿青 */
  --orange: #c08457;       /* 赭石 */
  --purple: #a593b8;       /* 黛紫 */
  --green: #8aa68f;        /* 松绿 */
  --pink: #c08a93;         /* 胭脂 */

  --text-main: #e6dfd0;    /* 宣纸米白 */
  --text-sub: #ada593;     /* 暖灰 */
  --text-light: #756f62;   /* 淡墨 */
  --bg-page: #12110e;      /* 墨黑暖底 */
  --bg-card: #1c1a16;      /* 深褐卡片 */
  --bg-card-2: #211e19;
  --border: #322e26;       /* 暖褐描边 */
  --border-light: #3d382e;

  --code-bg: #0d0c0a;
  --code-text: #e3dcc9;

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .35);
  --shadow-md: 0 8px 26px rgba(0, 0, 0, .48);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, .6);

  --radius: 12px;
  --radius-lg: 18px;
  --nav-h: 64px;
  --maxw: 1200px;

  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC",
    "STSong", "SimSun", "FangSong", Georgia, "Times New Roman", serif;
  --font: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong",
    "SimSun", Georgia, serif;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, "Courier New", monospace;
}

/* ---------- Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.9;
  color: var(--text-main);
  background-color: var(--bg-page);
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -10%, rgba(194, 160, 106, .08), transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 110%, rgba(127, 163, 150, .05), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }
ul, ol { padding-left: 1.4em; }
li { margin: .3em 0; }

h1, h2, h3, h4 { line-height: 1.45; color: #f2ecdd; font-weight: 700; font-family: var(--serif); }

::selection { background: rgba(194, 160, 106, .35); color: #fff8e8; }

/* 深色滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #12110e; }
::-webkit-scrollbar-thumb { background: #38332a; border-radius: 6px; border: 2px solid #12110e; }
::-webkit-scrollbar-thumb:hover { background: #4a4334; }

/* ---------- 阅读进度条 ---------- */
.read-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, #8a6f43, #d4b782, #7fa396);
  z-index: 1001;
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h);
  background: rgba(16, 15, 12, .86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}
.nav-inner {
  max-width: var(--maxw); height: 100%; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: #f2ecdd; white-space: nowrap; font-family: var(--serif); }
.brand:hover { color: #f2ecdd; }
.brand-logo {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, #2a251b, #1a1813);
  border: 1px solid #4a3f2b;
  display: grid; place-items: center; color: var(--primary); font-size: 19px;
  box-shadow: inset 0 1px 0 rgba(212, 183, 130, .18);
}
.brand span small { display: block; font-size: 10px; font-weight: 400; color: var(--text-light); letter-spacing: 2px; font-family: var(--font-ui); }

.main-nav { display: flex; align-items: center; gap: 2px; }
.main-nav a {
  color: var(--text-sub); font-size: 14.5px; font-weight: 500; font-family: var(--font-ui);
  padding: 7px 11px; border-radius: 8px; white-space: nowrap;
}
.main-nav a:hover { color: var(--primary-dark); background: var(--primary-light); }
.main-nav a.active { color: var(--primary-dark); background: var(--primary-light); font-weight: 700; }

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 42px; height: 42px; border-radius: 8px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text-main); margin: 5px auto; transition: .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero 区 ---------- */
.page-hero {
  margin-top: var(--nav-h);
  padding: 64px 20px 56px;
  background:
    radial-gradient(ellipse 70% 90% at 85% 0%, rgba(194, 160, 106, .1), transparent 55%),
    linear-gradient(160deg, #16130d 0%, #1f1b14 48%, #151817 100%);
  color: #f2ecdd; position: relative; overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.page-hero::before, .page-hero::after {
  content: ""; position: absolute; border-radius: 50%;
  background: rgba(194, 160, 106, .06);
}
.page-hero::before { width: 340px; height: 340px; top: -140px; right: -80px; }
.page-hero::after { width: 220px; height: 220px; bottom: -120px; left: 8%; }
.hero-inner { max-width: var(--maxw); margin: 0 auto; position: relative; z-index: 1; }
.breadcrumb { font-size: 13.5px; color: var(--text-light); margin-bottom: 14px; font-family: var(--font-ui); }
.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { color: var(--primary-dark); }
.hero-icon {
  width: 64px; height: 64px; border-radius: 16px; margin-bottom: 18px;
  background: rgba(194, 160, 106, .1); display: grid; place-items: center;
  font-size: 32px; border: 1px solid rgba(194, 160, 106, .32);
}
.page-hero h1 { color: #f4eddf; font-size: 36px; margin-bottom: 12px; letter-spacing: 2px; }
.page-hero p { font-size: 16.5px; max-width: 760px; color: #c9c1af; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-meta span {
  font-size: 13px; background: rgba(194, 160, 106, .09);
  border: 1px solid rgba(194, 160, 106, .26);
  color: #d4c6a6;
  padding: 4px 14px; border-radius: 999px; font-family: var(--font-ui);
}

/* ---------- 主体布局 ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.content-layout {
  max-width: var(--maxw); margin: 36px auto 60px; padding: 0 20px;
  display: grid; grid-template-columns: 1fr 260px; gap: 36px; align-items: start;
}
.article {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px 44px;
  box-shadow: var(--shadow-sm); min-width: 0;
}

/* ---------- 文章内容排版 ---------- */
.article section { margin-bottom: 44px; scroll-margin-top: calc(var(--nav-h) + 20px); }
.article h2 {
  font-size: 27px; padding-bottom: 14px; margin-bottom: 20px;
  border-bottom: 1px solid var(--border); position: relative;
  display: flex; align-items: center; gap: 12px; letter-spacing: 1px;
}
.article h2::after {
  content: ""; position: absolute; left: 0; bottom: -1px; width: 72px; height: 2px;
  background: linear-gradient(90deg, #a9894f, rgba(194, 160, 106, 0));
}
.article h2 .sec-no {
  flex: none; width: 34px; height: 34px; border-radius: 9px; font-size: 16px;
  background: linear-gradient(135deg, #3a3222, #211d14);
  border: 1px solid #5a4b2e;
  color: #ddc693; display: grid; place-items: center; font-family: var(--font-ui);
}
.article h3 { font-size: 20px; margin: 26px 0 12px; color: #ddc693; }
.article h4 { font-size: 17px; margin: 18px 0 8px; color: #ece5d5; }
.article p { margin: 10px 0; color: var(--text-main); }
.article ul, .article ol { margin: 10px 0; color: var(--text-main); }
.article strong { color: #f0e7d2; }

.article a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(194, 160, 106, .45); }

/* 表格 */
.table-wrap { overflow-x: auto; margin: 16px 0; border-radius: 10px; border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; background: #1a1813; }
th, td { padding: 11px 15px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { background: #242019; color: #e8dcc2; font-weight: 700; white-space: nowrap; font-family: var(--font-ui); letter-spacing: .5px; }
tbody tr:nth-child(even) { background: rgba(255, 255, 255, .018); }
tbody tr:hover { background: rgba(194, 160, 106, .07); }
tbody tr:last-child td { border-bottom: none; }

/* 代码 */
code {
  font-family: var(--mono); font-size: .88em;
  background: #29241a; color: #d8bd85;
  border: 1px solid rgba(194, 160, 106, .22);
  padding: 2px 7px; border-radius: 5px;
}
pre {
  background: var(--code-bg); color: var(--code-text);
  border: 1px solid #27231c;
  padding: 18px 20px; border-radius: 10px; overflow-x: auto;
  margin: 14px 0; font-size: 14px; line-height: 1.75;
  font-family: var(--mono);
  box-shadow: inset 0 1px 8px rgba(0, 0, 0, .4);
}
pre code { background: none; color: inherit; padding: 0; border: none; font-size: inherit; }
.code-caption { font-size: 13px; color: var(--text-light); margin: -6px 0 14px; }
.tok-k { color: #d4a85c; }
.tok-s { color: #aab58e; }
.tok-c { color: #6e675a; font-style: italic; }
.tok-f { color: #9db8c9; }
.tok-n { color: #cd8d6a; }

/* 信息框 */
.callout {
  border-radius: 10px; padding: 14px 18px; margin: 16px 0;
  font-size: 15px; border: 1px solid; border-left-width: 4px;
  display: flex; gap: 12px;
}
.callout .co-icon { flex: none; font-size: 18px; line-height: 1.9; }
.callout p:first-child { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }
.callout.note { background: rgba(125, 155, 185, .1); border-color: rgba(125, 155, 185, .45); color: #bccfdd; }
.callout.tip  { background: rgba(138, 166, 143, .1); border-color: rgba(138, 166, 143, .45); color: #c4d6c6; }
.callout.warn { background: rgba(200, 150, 90, .1); border-color: rgba(200, 150, 90, .5); color: #e0c59a; }
.callout.key  { background: rgba(194, 160, 106, .1); border-color: rgba(194, 160, 106, .55); color: #e2cd9f; }

/* 定义/术语块 */
.defterm {
  background: linear-gradient(135deg, #23201a, #1d1a15);
  border: 1px dashed #5c5038; border-radius: 10px;
  padding: 12px 18px; margin: 14px 0;
  color: #d8cfbc;
}
.defterm b { color: var(--primary-dark); }

/* 图示卡片网格 */
.fig-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 16px 0; }
.fig-card {
  border: 1px solid var(--border); border-radius: 12px; padding: 18px;
  background: #1a1813; text-align: center; transition: .25s;
}
.fig-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(194, 160, 106, .5); }
.fig-card .fig-ico {
  width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 14px;
  display: grid; place-items: center; font-size: 26px; color: var(--primary-dark);
  background: linear-gradient(135deg, #2c271c, #1a1712);
  border: 1px solid #4a3f2b;
}
.fig-card h4 { margin-bottom: 4px; font-size: 15.5px; }
.fig-card p { font-size: 13.5px; color: var(--text-sub); margin: 0; }

/* 标签 */
.tag { display: inline-block; font-size: 12.5px; padding: 2px 10px; border-radius: 999px; margin: 2px 4px 2px 0; font-weight: 600; font-family: var(--font-ui); }
.tag.blue { background: rgba(125, 155, 185, .16); color: #aec9de; }
.tag.cyan { background: rgba(127, 163, 150, .16); color: #a5c8bc; }
.tag.orange { background: rgba(200, 140, 90, .16); color: #d9ab84; }
.tag.green { background: rgba(138, 166, 143, .16); color: #b4cfb8; }
.tag.purple { background: rgba(165, 147, 184, .16); color: #c6b8d6; }
.tag.gray { background: rgba(173, 165, 147, .14); color: #c3bba9; }

/* 步骤列表 */
.steps { list-style: none; padding-left: 0; counter-reset: step; margin: 16px 0; }
.steps li {
  position: relative; padding: 12px 14px 12px 52px; margin: 10px 0;
  background: #1a1813; border: 1px solid var(--border); border-radius: 10px;
  counter-increment: step;
}
.steps li::before {
  content: counter(step); position: absolute; left: 12px; top: 12px;
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #3a3222, #211d14);
  border: 1px solid #5a4b2e;
  color: #ddc693; font-weight: 700; font-size: 14px; font-family: var(--font-ui);
  display: grid; place-items: center;
}

/* 对比双栏 */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.compare > div { border: 1px solid var(--border); border-radius: 12px; padding: 18px; background: #1a1813; }
.compare h4 { margin-top: 0; padding-bottom: 8px; border-bottom: 1px solid var(--border); }

/* ---------- 侧边目录 TOC ---------- */
.toc {
  position: sticky; top: calc(var(--nav-h) + 20px);
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 16px; box-shadow: var(--shadow-sm);
  max-height: calc(100vh - var(--nav-h) - 40px); overflow-y: auto;
}
.toc::-webkit-scrollbar { width: 6px; }
.toc::-webkit-scrollbar-thumb { border-width: 1px; }
.toc-title { font-size: 14px; font-weight: 700; color: #e8dcc2; margin-bottom: 10px; letter-spacing: 2px; display: flex; align-items: center; gap: 6px; font-family: var(--serif); }
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li a {
  display: block; font-size: 13.5px; color: var(--text-sub);
  padding: 6px 10px; border-radius: 7px; border-left: 2px solid transparent;
  line-height: 1.5; font-family: var(--font-ui);
}
.toc li a:hover { color: var(--primary-dark); background: var(--primary-light); }
.toc li a.active { color: var(--primary-dark); font-weight: 700; border-left-color: var(--primary); background: var(--primary-light); }
.toc .read-done { color: var(--green) !important; }
.toc .read-done::after { content: " ✓"; }

/* 章节完成按钮 */
.section-actions { margin-top: 8px; }
.btn-done {
  border: 1px solid var(--border-light); background: #1a1813; cursor: pointer;
  border-radius: 999px; padding: 5px 16px; font-size: 13px; color: var(--text-sub);
  font-family: var(--font-ui); transition: .2s;
}
.btn-done:hover { border-color: var(--primary); color: var(--primary-dark); }
.btn-done.done { background: rgba(194, 160, 106, .16); border-color: var(--primary); color: var(--primary-dark); }

/* ---------- 页脚 ---------- */
.site-footer {
  background: #0c0b09; color: #9c9483; padding: 48px 20px 28px; margin-top: 20px;
  border-top: 1px solid var(--border);
}
.footer-inner { max-width: var(--maxw); margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; margin-bottom: 32px; }
.footer-grid h5 { color: #e8dcc2; font-size: 15px; margin-bottom: 12px; }
.footer-grid a { color: #8f8776; font-size: 14px; display: block; padding: 3px 0; font-family: var(--font-ui); }
.footer-grid a:hover { color: var(--primary-dark); }
.footer-grid p { font-size: 14px; color: #8f8776; }
.footer-bottom {
  border-top: 1px solid #221f19; padding-top: 20px; text-align: center;
  font-size: 13px; color: #635d50;
}

/* ---------- 回到顶部 ---------- */
.back-top {
  position: fixed; right: 26px; bottom: 30px; width: 46px; height: 46px;
  border-radius: 50%; border: 1px solid #5a4b2e; cursor: pointer;
  background: linear-gradient(135deg, #2e291c, #171410);
  color: var(--primary-dark); font-size: 20px; box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(12px); transition: .3s;
  z-index: 900;
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { color: #ecd9ab; }

/* ---------- 首页专用 ---------- */
.home-hero {
  margin-top: var(--nav-h); position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 55% 60% at 18% 25%, rgba(194, 160, 106, .12), transparent 60%),
    radial-gradient(ellipse 50% 55% at 82% 15%, rgba(127, 163, 150, .09), transparent 60%),
    linear-gradient(165deg, #0c0b08 0%, #191611 52%, #101412 100%);
  color: #f2ecdd; padding: 96px 20px 104px;
  border-bottom: 1px solid var(--border);
}
.home-hero .hero-inner { text-align: center; max-width: 900px; }
.home-hero h1 { font-size: 46px; color: #f5eee0; margin-bottom: 18px; letter-spacing: 4px; }
.home-hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #d8bd85, #efe0bd, #a9894f);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.home-hero .lead { font-size: 18px; color: #c3bba8; margin-bottom: 30px; }
.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 999px; font-size: 15.5px; font-weight: 700;
  font-family: var(--font-ui); cursor: pointer; border: 1px solid transparent; transition: .25s;
  letter-spacing: 1px;
}
.btn-primary { background: linear-gradient(135deg, #ddc693, #c2a06a); color: #1a150d; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(194, 160, 106, .25); color: #1a150d; }
.btn-ghost { background: rgba(194, 160, 106, .08); color: #ddc693; border-color: rgba(194, 160, 106, .4); }
.btn-ghost:hover { background: rgba(194, 160, 106, .16); color: #ecd9ab; }
.hero-stats { display: flex; justify-content: center; gap: 48px; margin-top: 52px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-stats .num { font-size: 32px; font-weight: 700; color: #e5d4a8; font-family: Georgia, serif; }
.hero-stats .lbl { font-size: 13.5px; color: var(--text-light); font-family: var(--font-ui); letter-spacing: 1px; }

.home-section { padding: 70px 20px; }
.home-section.alt { background: rgba(255, 255, 255, .014); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { text-align: center; max-width: 700px; margin: 0 auto 44px; }
.section-head .kicker { color: var(--primary); font-weight: 700; font-size: 13px; letter-spacing: 4px; font-family: var(--font-ui); }
.section-head h2 { font-size: 32px; margin: 8px 0 12px; letter-spacing: 2px; }
.section-head p { color: var(--text-sub); }

.module-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.module-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 26px 22px; display: flex; flex-direction: column;
  transition: .28s; position: relative; overflow: hidden;
}
.module-card::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #8a6f43, #d4b782);
  opacity: .75;
}
.module-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(194, 160, 106, .45); }
.module-card .m-ico {
  width: 54px; height: 54px; border-radius: 14px; margin-bottom: 14px;
  display: grid; place-items: center; font-size: 27px;
  background: linear-gradient(135deg, #2c271c, #19160f) !important;
  color: var(--primary-dark) !important;
  border: 1px solid #4a3f2b;
}
.module-card h3 { font-size: 18px; margin-bottom: 6px; }
.module-card h3 a { color: #f0e9d8; }
.module-card h3 a:hover { color: var(--primary-dark); }
.module-card p { font-size: 14px; color: var(--text-sub); flex: 1; }
.module-card .m-meta { margin-top: 14px; font-size: 13px; color: var(--text-light); display: flex; justify-content: space-between; align-items: center; font-family: var(--font-ui); }
.module-card .m-go { font-weight: 700; color: var(--primary); }
.module-card .progress-pill { background: rgba(138, 166, 143, .13); color: var(--green); padding: 1px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }

/* 轮播 */
.carousel {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
}
.slides { display: flex; transition: transform .6s cubic-bezier(.4,0,.2,1); }
.slide {
  min-width: 100%; padding: 54px 56px; min-height: 260px;
  display: flex; flex-direction: column; justify-content: center;
  color: #ece5d5; position: relative;
}
.slide::after {
  content: ""; position: absolute; right: -60px; bottom: -60px;
  width: 240px; height: 240px; border-radius: 50%;
  background: rgba(194, 160, 106, .07);
}
.slide.s1 { background: linear-gradient(120deg, #1b1710, #22261f); }
.slide.s2 { background: linear-gradient(120deg, #221a1a, #1d1f28); }
.slide.s3 { background: linear-gradient(120deg, #181f1d, #211d14); }
.slide .s-tag { font-size: 13px; letter-spacing: 3px; color: #a9894f; margin-bottom: 10px; font-family: var(--font-ui); }
.slide h3 { color: #f2ecdd; font-size: 26px; margin-bottom: 10px; position: relative; z-index: 1; letter-spacing: 1px; }
.slide p { font-size: 15.5px; max-width: 600px; color: #bdb5a3; position: relative; z-index: 1; }
.car-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(194, 160, 106, .35); cursor: pointer;
  background: rgba(20, 18, 14, .55); color: #ddc693; font-size: 18px;
  display: grid; place-items: center; transition: .2s; z-index: 2;
  backdrop-filter: blur(4px);
}
.car-btn:hover { background: rgba(194, 160, 106, .25); color: #f0e2bd; }
.car-btn.prev { left: 14px; }
.car-btn.next { right: 14px; }
.car-dots { position: absolute; bottom: 16px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 2; }
.car-dots button {
  width: 10px; height: 10px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(230, 220, 195, .3); transition: .25s; padding: 0;
}
.car-dots button.active { width: 26px; border-radius: 999px; background: #d4b782; }

/* 学习路径 */
.path-wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.path-step {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 22px 18px;
  position: relative;
}
.path-step .ps-no {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #3a3222, #211d14);
  border: 1px solid #5a4b2e;
  color: #ddc693; font-weight: 700; display: grid; place-items: center; margin-bottom: 10px;
  font-family: Georgia, serif;
}
.path-step h4 { font-size: 16px; margin-bottom: 4px; }
.path-step p { font-size: 13.5px; color: var(--text-sub); margin: 0; }

/* 特性区 */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature-item { text-align: center; padding: 10px; }
.feature-item .f-ico {
  width: 60px; height: 60px; border-radius: 16px; margin: 0 auto 14px;
  display: grid; place-items: center; font-size: 28px;
  background: linear-gradient(135deg, #2c271c, #19160f);
  border: 1px solid #4a3f2b;
  color: var(--primary-dark);
}
.feature-item h4 { font-size: 17px; margin-bottom: 6px; }
.feature-item p { font-size: 14px; color: var(--text-sub); }

/* 上下页导航 */
.pager { display: flex; justify-content: space-between; gap: 14px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
.pager a {
  flex: 1; border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px;
  background: #1a1813; color: var(--text-sub); font-size: 14px; transition: .2s;
  font-family: var(--font-ui);
}
.pager a:hover { border-color: rgba(194, 160, 106, .5); box-shadow: var(--shadow-sm); color: var(--text-sub); }
.pager a.next { text-align: right; }
.pager .pg-dir { display: block; font-size: 12px; color: var(--text-light); }
.pager .pg-title { font-weight: 700; color: var(--primary-dark); }

/* ---------- 动画 ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
.reveal { animation: fadeUp .6s ease both; }
.reveal.d1 { animation-delay: .08s; }
.reveal.d2 { animation-delay: .16s; }
.reveal.d3 { animation-delay: .24s; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .module-grid { grid-template-columns: repeat(2, 1fr); }
  .path-wrap { grid-template-columns: repeat(2, 1fr); }
  .content-layout { grid-template-columns: 1fr; }
  .toc { position: static; max-height: none; }
  .toc .toc-list { display: none; }
  .toc.open .toc-list { display: block; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: rgba(18, 17, 14, .98); border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 14px;
    box-shadow: var(--shadow-md);
    transform: translateY(-130%); transition: transform .3s ease;
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav a { padding: 11px 12px; border-radius: 8px; font-size: 15px; }
  .home-hero h1 { font-size: 32px; letter-spacing: 2px; }
  .page-hero h1 { font-size: 27px; }
  .article { padding: 26px 20px; }
  .article h2 { font-size: 22px; }
  .compare { grid-template-columns: 1fr; }
  .module-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .slide { padding: 36px 26px; }
  .hero-stats { gap: 28px; }
}
