/* =========================================================
   C++ 教学智库 · 教师版  样式表
   主色：深蓝 #0A2463，辅色：金 #E9B949，中性色：#FFFFFF / #F7F9FC / #2E3A59
   ========================================================= */

* { box-sizing: border-box; margin: 0; padding: 0; }
*::before, *::after { box-sizing: border-box; }
html, body {
  font-family: "PingFang SC","Microsoft YaHei","Noto Sans SC","Segoe UI",Tahoma,Arial,sans-serif;
  color: #1f2a44;
  background: #F7F9FC;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  /* ===== 超窄屏防横向滚动：全局硬兜底 + 文本折行策略 ===== */
  max-width: 100%;
  overflow-x: hidden;
  overflow-wrap: break-word;
  word-break: break-word;
  -webkit-text-size-adjust: 100%;
}
img, svg, video, iframe, canvas, embed, object {
  max-width: 100%;
  height: auto;
  display: block;
}
input, button, select, textarea, fieldset {
  max-width: 100%;
  font-family: inherit;
}
/* 防止 flex / grid 子项（含含长文字/表格/代码）撑破父容器产生横向滚动 */
main, section, article, aside, .page-full, .study-layout,
.study-content, .content-header, .chapter-body, .res-content,
.hero, .hero-left, .hero-right, .hero-code-card,
.resource-header, .tools-grid, .about-wrap,
.welcome-study, .path-grid, .quick-jump, .module-entry,
.res-detail, .res-detail-body, .syl-block, .syl-html {
  min-width: 0;
  max-width: 100%;
}
/* 长表格：内部可横滚，但不撑破视口出现整页横滚条 */
.data-table {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
/* 长代码块：已有 overflow-x:auto；但要限制不撑破父 */
.code-block, pre.code-block {
  max-width: 100%;
}
:root {
  --navy: #0A2463;
  --navy-deep: #061A4B;
  --navy-light: #1E3A8A;
  --gold: #E9B949;
  --gold-deep: #D4A017;
  --bg: #F7F9FC;
  --surface: #FFFFFF;
  --border: #E2E8F0;
  --text: #1F2A44;
  --text-sub: #5A6A85;
  --text-mute: #8896AB;
  --ok: #16A34A;
  --warn: #D97706;
  --err: #DC2626;
  --code-bg: #0F172A;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(10,36,99,0.06);
  --shadow: 0 8px 28px rgba(10,36,99,0.10);
  --shadow-lg: 0 16px 48px rgba(10,36,99,0.14);
}
a { color: inherit; text-decoration: none; }
ul, ol { padding-left: 20px; }
code { font-family: "JetBrains Mono","Consolas","Courier New",monospace; }

/* =============== Navbar =============== */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  box-shadow: 0 4px 18px rgba(6,26,75,0.25);
}
/* Navbar：窄屏不溢出、logo/汉堡可压缩 */
.nav-inner {
  max-width: 1440px; margin: 0 auto;
  display: flex; align-items: center; gap: 32px;
  padding: 14px 28px;
  /* 防止内部按钮/logo 撑破导航栏出现横滚 */
  min-width: 0;
  max-width: 100%;
  width: 100%;
}
.logo {
  display: flex; align-items: baseline; gap: 8px;
  min-width: 0;
  flex-shrink: 1;
}
.logo-mark {
  font-family: "Georgia","Times New Roman",serif;
  font-size: 28px; font-weight: 700;
  background: linear-gradient(135deg, #fff 0%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: -1px;
}
.logo-text { font-size: 20px; font-weight: 600; }
.logo-sub {
  font-size: 11px; color: var(--gold);
  padding: 2px 8px; border: 1px solid var(--gold);
  border-radius: 99px; letter-spacing: 0.5px;
}
.nav-menu { display: flex; gap: 6px; margin-left: auto; }
.nav-link {
  position: relative;
  padding: 8px 18px; border-radius: 8px;
  font-size: 15px; font-weight: 500;
  color: rgba(255,255,255,0.82);
  transition: all 0.2s ease;
}
.nav-link:hover { background: rgba(255,255,255,0.10); color: #fff; }
.nav-link.active {
  background: rgba(233,185,73,0.18);
  color: var(--gold);
}
.nav-link.active::after {
  content: ""; position: absolute; left: 50%; bottom: -14px;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 6px solid transparent; border-right: 6px solid transparent;
  border-bottom: 6px solid var(--bg);
}
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-actions input {
  padding: 8px 14px; width: 240px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  color: #fff; font-size: 13px; outline: none;
  transition: all 0.2s;
}
.nav-actions input::placeholder { color: rgba(255,255,255,0.5); }
.nav-actions input:focus {
  background: rgba(255,255,255,0.14);
  border-color: var(--gold);
  width: 300px;
}

.hamburger {
  display: none;                  /* 默认宽屏不显示 */
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.35);
  border-radius: 8px;
  width: 42px; height: 40px;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
  /* ===== 窄屏：展开按钮固定在右侧 ===== */
  margin-left: auto;              /* 推到 .nav-actions 最右侧 */
  order: 999;                     /* 即使之后再加按钮也仍在最右 */
  flex-shrink: 0;
}
.hamburger:hover {
  border-color: var(--gold);
  background: rgba(233,185,73,0.12);
}
.hamburger span {
  display: block;
  width: 20px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.2s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =============== Mobile drawer（从顶部滑出的菜单弹层） =============== */
.mobile-backdrop {
  position: fixed; inset: 0;
  background: rgba(6,26,75,0.45);
  backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 199;
}
.mobile-backdrop.show { opacity: 1; pointer-events: auto; }

.mobile-drawer {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: #fff;
  box-shadow: 0 14px 40px rgba(6,26,75,0.25);
  border-radius: 0 0 20px 20px;
  transform: translateY(-105%);
  transition: transform 0.32s cubic-bezier(0.22,1,0.36,1);
  z-index: 200;
  max-height: 86vh;
  overflow-y: auto;
}
.mobile-drawer.show { transform: translateY(0); }

.mobile-drawer-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 18px 22px 24px;
}
.mobile-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 14px; margin-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}
.mobile-drawer-title { display: flex; align-items: baseline; gap: 6px; }
.mobile-drawer-close {
  background: #F1F5F9;
  border: none; border-radius: 50%;
  width: 36px; height: 36px;
  font-size: 24px; line-height: 1;
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.2s;
}
.mobile-drawer-close:hover {
  background: var(--err);
  color: #fff;
  transform: rotate(90deg);
}

.mobile-nav-links {
  display: flex; flex-direction: column;
  gap: 4px;
  padding: 8px 0;
}
.mobile-nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 16px; font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.18s ease;
}
.mobile-nav-link:hover {
  background: #EFF6FF;
  color: var(--navy);
  transform: translateX(4px);
}
.mobile-nav-link.active {
  background: linear-gradient(135deg, rgba(10,36,99,0.08), rgba(10,36,99,0.02));
  color: var(--navy-deep);
  border-left: 4px solid var(--gold);
  padding-left: 12px;
}
.mobile-nav-link .m-ico {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #EFF6FF;
  border-radius: 8px;
  font-size: 16px;
}
.mobile-nav-link.active .m-ico {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
}

.mobile-drawer-tools {
  margin-top: 8px;
  padding: 14px 16px 4px;
  background: linear-gradient(135deg, #F8FAFC, #EFF6FF);
  border-radius: 14px;
}
.mobile-search-label {
  font-size: 13px; color: var(--text-sub);
  margin-bottom: 8px; font-weight: 600;
}
.mobile-drawer-tools input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  font-size: 14px;
  outline: none;
  background: #fff;
  transition: all 0.2s;
}
.mobile-drawer-tools input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(233,185,73,0.2);
}

/* =============== Buttons =============== */
.btn-primary, .btn-outline, .btn-gold, .btn-sm {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; cursor: pointer; font-family: inherit;
  font-weight: 600; transition: all 0.2s ease; white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff; padding: 10px 22px; border-radius: 8px; font-size: 14px;
  box-shadow: 0 4px 14px rgba(10,36,99,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(10,36,99,0.4); }
.nav-inner .btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: var(--navy-deep); box-shadow: 0 4px 12px rgba(233,185,73,0.35);
  padding: 8px 18px; font-size: 13px;
}
.nav-inner .btn-primary:hover { box-shadow: 0 6px 18px rgba(233,185,73,0.5); }
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: 10px; }
.btn-outline {
  background: transparent; color: var(--navy);
  padding: 14px 32px; font-size: 16px; border-radius: 10px;
  border: 2px solid var(--navy);
}
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: var(--navy-deep); padding: 12px 26px; border-radius: 8px; font-size: 15px;
  box-shadow: 0 4px 14px rgba(233,185,73,0.4);
}
.btn-gold:hover { transform: translateY(-1px); }
.btn-sm {
  padding: 6px 14px; font-size: 12px; border-radius: 6px;
  background: var(--navy); color: #fff;
}
.btn-sm:hover { background: var(--navy-light); }
/* 展开本章全部小节按钮：金底白字，深蓝/任意背景下字都清晰 */
.btn-expand-all {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 22px; border-radius: 10px;
  border: 1px solid var(--gold-deep);
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: #fff;                              /* 强制白字，避免黑色贴到深蓝糊掉 */
  font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  box-shadow: 0 4px 14px rgba(233,185,73,0.35);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-expand-all:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 20px rgba(233,185,73,0.55);
  color: #fff;
  filter: brightness(1.05);
}
.btn-expand-all:active { transform: translateY(0); }
.btn-outline-sm {
  background: transparent; color: var(--err);
  border: 1px solid var(--err);
}
.btn-outline-sm:hover { background: var(--err); color: #fff; }

/* =============== Page sections =============== */
.section { display: none; padding: 0 0 80px; }
.page-section.active { display: block; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* =============== Hero =============== */
.hero {
  max-width: 1440px; margin: 0 auto;
  padding: 72px 28px 60px;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px;
  align-items: center;
}
.hero-title {
  font-family: "Georgia","Noto Serif SC","Songti SC",serif;
  font-size: 52px; font-weight: 700; line-height: 1.22;
  color: var(--navy-deep);
  letter-spacing: -0.5px;
  margin-bottom: 22px;
}
.hero-title::after {
  content: ""; display: block; width: 72px; height: 4px;
  background: linear-gradient(90deg, var(--gold), transparent);
  margin-top: 18px; border-radius: 2px;
}
.hero-sub {
  font-size: 18px; color: var(--text-sub);
  margin-bottom: 36px; line-height: 1.8;
}
.hero-sub strong { color: var(--navy); background: linear-gradient(transparent 65%, #FFF3BF 65%); padding: 0 2px; }
.hero-btns { display: flex; gap: 16px; margin-bottom: 48px; flex-wrap: wrap; }
.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  padding-top: 28px;
  border-top: 1px dashed var(--border);
}
.stat-num {
  display: block;
  font-family: "Georgia",serif; font-size: 34px; font-weight: 700;
  color: var(--navy);
}
.stat-label { font-size: 13px; color: var(--text-sub); }

/* Hero code card */
.hero-code-card {
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: perspective(1000px) rotateY(-4deg) rotateX(2deg);
  transition: transform 0.4s ease;
}
.hero-code-card:hover { transform: none; }
.code-window-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(180deg, #1e293b, #0f172a);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }
.code-title {
  margin-left: 16px; font-size: 13px;
  color: rgba(255,255,255,0.7); font-family: monospace;
}
.code-block {
  background: var(--code-bg);
  padding: 22px 22px 24px;
  font-family: "JetBrains Mono","Consolas","Courier New",monospace;
  font-size: 14.5px;
  line-height: 2.1;                      /* 加大行距：每行之间有清晰空隙 */
  color: #e2e8f0;
  overflow-x: auto;
  margin: 0;
  border-radius: 0 0 8px 8px;
  white-space: pre;                      /* 严格保留换行 */
  tab-size: 4;
}
.code-block code {
  display: block;
  white-space: pre;                      /* 绝不合并多余换行/空格 */
  font-family: inherit;
}
.code-block code > div.code-line {
  padding: 2px 4px;
  border-left: 3px solid transparent;
  transition: background 0.15s;
}
.code-block code > div.code-line:hover {
  background: rgba(255,255,255,0.04);
  border-left-color: var(--gold);
}

/* Syntax highlight 新版：注释颜色更淡，更清晰区分 */
.kw  { color: #C084FC; font-weight: 600; }  /* 关键字：紫色 */
.typ { color: #38BDF8; }                    /* 类型：天蓝 */
.fn  { color: #86EFAC; font-weight: 500; }  /* 函数：绿色 */
.str { color: #FCA5A5; }                    /* 字符串：粉色 */
.num { color: #FBBF24; font-weight: 500; }  /* 数字：金色 */
.pun { color: #94A3B8; }                    /* 标点：灰 */
.com {                                        /* 注释：最淡的灰+斜体，和代码明显区分 */
  color: #9FB3C8;
  font-style: italic;
  opacity: 0.85;
  display: inline-block;                    /* 保证注释独立显示，不会被挤 */
}

/* 代码输出区（示例程序运行结果） */
.code-output {
  padding: 14px 22px 22px;
  background: #F8FAFC;
  border-top: 1px solid var(--border);
  font-family: "Consolas","Courier New",monospace;
  font-size: 13.5px; color: var(--text-sub);
  line-height: 2.0;
  border-radius: 0 0 8px 8px;
}
.code-output::before {
  content: "🖥  运行结果：";
  color: var(--navy); font-weight: 600;
}

/* =============== Section titles =============== */
.section-title {
  font-family: "Georgia","Noto Serif SC",serif;
  font-size: 34px; font-weight: 700;
  color: var(--navy-deep); text-align: center;
  margin-bottom: 12px;
}
.section-desc {
  text-align: center; color: var(--text-sub);
  font-size: 16px; margin-bottom: 48px;
}

/* =============== Features =============== */
.features {
  max-width: 1440px; margin: 0 auto;
  padding: 50px 28px 30px;
}
.feature-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
}
.feature-card {
  background: #fff; border-radius: var(--radius);
  padding: 30px 26px; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  position: relative; overflow: hidden;
}
.feature-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--navy), var(--gold));
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-card:hover::before { transform: scaleX(1); }
.feature-icon {
  width: 58px; height: 58px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(10,36,99,0.08), rgba(233,185,73,0.15));
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin-bottom: 18px;
}
.feature-card h3 {
  font-size: 19px; color: var(--navy-deep);
  margin-bottom: 10px; font-weight: 700;
}
.feature-card p {
  color: var(--text-sub); font-size: 14px;
  margin-bottom: 14px;
}
.feature-tags {
  list-style: none; padding: 0;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.feature-tags li {
  padding: 3px 10px; border-radius: 99px;
  background: #F1F5F9; color: var(--navy-light);
  font-size: 12px; font-weight: 500;
}

/* =============== Module Entry =============== */
.module-entry {
  max-width: 1440px; margin: 50px auto 0;
  padding: 30px 28px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 26px;
}
.entry-card {
  border-radius: var(--radius-lg);
  padding: 40px 38px; cursor: pointer;
  transition: all 0.3s ease; position: relative; overflow: hidden;
}
.entry-card:hover { transform: translateY(-6px); }
.entry-study {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  box-shadow: 0 10px 36px rgba(10,36,99,0.28);
}
.entry-resource {
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  color: var(--navy-deep);
  border: 1px solid rgba(233,185,73,0.4);
  box-shadow: 0 10px 36px rgba(233,185,73,0.22);
}
.entry-card .entry-emoji {
  font-size: 44px; margin-bottom: 12px;
}
.entry-card h2 {
  font-family: "Georgia",serif;
  font-size: 28px; margin-bottom: 10px;
}
.entry-card > p { font-size: 15px; opacity: 0.9; margin-bottom: 20px; }
.entry-card ul {
  list-style: none; padding: 0; margin-bottom: 24px;
}
.entry-card ul li {
  padding: 7px 0; font-size: 14px;
  border-bottom: 1px dashed rgba(255,255,255,0.15);
}
.entry-resource ul li { border-bottom-color: rgba(233,185,73,0.35); }
.entry-resource .btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: var(--navy-deep); box-shadow: 0 4px 14px rgba(233,185,73,0.5);
}

/* =============== Study Layout =============== */
.study-layout {
  width: 100%;
  min-height: calc(100vh - 70px);
  position: relative;
}
.sidebar {
  background: #fff;
  border-right: 1px solid var(--border);
  position: fixed;                 /* 左侧绝对固定：点击后绝不跟随滚动 */
  top: 70px; left: 0;
  width: 300px;
  height: calc(100vh - 70px);
  overflow-y: auto;               /* 仅菜单内部自身滚动，外部完全不动 */
  z-index: 50;
  box-shadow: 4px 0 16px rgba(10,36,99,0.05);
}
.sidebar-header {
  padding: 22px 20px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: #fff;
}
.sidebar-header h3 {
  font-size: 16px; font-weight: 700; margin-bottom: 4px;
}
.sidebar-hint { font-size: 12px; color: rgba(255,255,255,0.7); }

.chapter-nav { padding: 8px; }
.chapter-group { border-bottom: 1px solid #F1F5F9; }
.chapter-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 12px; font-size: 14px; font-weight: 600;
  color: var(--navy-deep); cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s;
}
.chapter-header:hover { background: #F1F5F9; }
.chapter-header.active {
  background: linear-gradient(90deg, rgba(10,36,99,0.08), transparent);
  color: var(--navy);
  border-left: 3px solid var(--gold);
  padding-left: 9px;
}
.chapter-header .ch-no {
  display: inline-block;
  width: 28px; height: 28px; line-height: 28px;
  text-align: center; border-radius: 6px;
  background: var(--navy); color: #fff;
  font-size: 12px; font-family: "Georgia",serif;
  margin-right: 8px; flex-shrink: 0;
}
.chapter-header.active .ch-no {
  background: var(--gold); color: var(--navy-deep);
}
.chapter-arrow {
  font-size: 10px; color: var(--text-mute);
  transition: transform 0.2s;
}
.chapter-group.open .chapter-arrow { transform: rotate(90deg); }

.chapter-sections {
  display: none; padding: 4px 8px 10px 48px;
}
.chapter-group.open .chapter-sections { display: block; }
.section-item {
  padding: 7px 10px; font-size: 13px;
  color: var(--text-sub); cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s;
}
.section-item:hover {
  background: #FEF3C7; color: var(--navy-deep);
}
.section-item.active {
  background: linear-gradient(90deg, var(--gold), rgba(233,185,73,0.6));
  color: var(--navy-deep); font-weight: 600;
}

/* =============== Study Content =============== */
.study-content {
  padding: 36px 48px;
  max-width: 100%;
  margin-left: 300px;                /* 固定侧边栏宽度：给内容区让出左边 300px */
  width: calc(100% - 300px);
}
.content-header { margin-bottom: 36px; }
.breadcrumb {
  font-size: 13px; color: var(--text-mute); margin-bottom: 14px;
}
.breadcrumb a { color: var(--navy-light); cursor: pointer; }
#chapterTitle {
  font-family: "Georgia","Noto Serif SC",serif;
  font-size: 36px; font-weight: 700;
  color: var(--navy-deep); line-height: 1.3;
  margin-bottom: 10px;
}
#chapterTitle .ch-index {
  display: inline-block; margin-right: 12px;
  color: var(--gold); font-size: 28px;
}
.chapter-desc {
  font-size: 16px; color: var(--text-sub);
  padding: 14px 18px;
  background: linear-gradient(90deg, #EFF6FF, transparent);
  border-left: 4px solid var(--navy-light);
  border-radius: 4px;
}
.chapter-tips {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-top: 22px;
}
.tip-card {
  padding: 14px 16px; border-radius: 10px;
  background: #fff; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.tip-card span {
  display: block; font-size: 12px; color: var(--text-mute); margin-bottom: 6px;
}
.tip-card b {
  font-size: 14px; color: var(--navy-deep); font-weight: 600; line-height: 1.5;
}
.tip-hour { border-top: 3px solid #60A5FA; }
.tip-focus { border-top: 3px solid #34D399; }
.tip-hard { border-top: 3px solid #F87171; }
.tip-mistake { border-top: 3px solid var(--gold); }

/* Chapter body */
.chapter-body { animation: fadeIn 0.4s ease; }
.sec-block {
  background: #fff; border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.sec-title {
  font-size: 22px; font-weight: 700;
  color: var(--navy-deep); margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #F1F5F9;
  display: flex; align-items: center; gap: 10px;
}
.sec-title .sec-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: #fff; font-size: 18px;
}
.sub-title {
  font-size: 17px; font-weight: 700;
  color: var(--navy); margin: 22px 0 10px;
  padding-left: 12px;
  border-left: 4px solid var(--gold);
}
.sec-block p { color: var(--text); font-size: 15px; margin-bottom: 12px; }
.sec-block ul, .sec-block ol { margin-bottom: 12px; }
.sec-block li { margin-bottom: 6px; font-size: 15px; color: var(--text); }
.sec-block strong { color: var(--navy-deep); }

/* Knowledge grid */
.know-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px; margin: 16px 0;
}
.know-item {
  padding: 16px 18px; border-radius: 8px;
  background: linear-gradient(135deg, #F8FAFC, #EFF6FF);
  border: 1px solid #DBEAFE;
}
.know-item h5 {
  font-size: 14px; color: var(--navy); margin-bottom: 6px;
}
.know-item p {
  font-size: 13px; color: var(--text-sub); margin: 0;
}

/* Table */
.data-table {
  width: 100%; border-collapse: collapse;
  margin: 14px 0; font-size: 14px;
  border-radius: 8px; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.data-table th {
  background: linear-gradient(180deg, var(--navy), var(--navy-light));
  color: #fff; padding: 12px 14px; text-align: left;
  font-weight: 600;
}
.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.data-table tr:nth-child(even) td { background: #F8FAFC; }
.data-table tr:hover td { background: #FEF3C7; }

/* 教学大纲 · 章节块（syllabus 用） */
.syl-block {
  padding: 18px 20px;
  border-radius: 10px;
  background: #F8FAFC;
  border-left: 4px solid var(--navy-light);
  margin-bottom: 16px;
}
.syl-block h4 {
  font-size: 16px;
  color: var(--navy-deep);
  margin: 0 0 10px;
  font-weight: 700;
}
.syl-html ul, .syl-html ol { padding-left: 22px; margin: 6px 0; }
.syl-html li { line-height: 1.9; color: var(--text-sub); font-size: 14px; }
.syl-html p { line-height: 1.9; color: var(--text-sub); margin: 6px 0; }

/* Callouts */
.callout {
  padding: 16px 20px;
  border-radius: 8px;
  margin: 16px 0;
  border-left: 5px solid;
  font-size: 14px;
}
.callout.info {
  background: #EFF6FF; border-color: #3B82F6;
  color: #1E40AF;
}
.callout.warn {
  background: #FFFBEB; border-color: var(--gold);
  color: #92400E;
}
.callout.err {
  background: #FEF2F2; border-color: var(--err);
  color: #991B1B;
}
.callout.ok {
  background: #F0FDF4; border-color: var(--ok);
  color: #166534;
}
.callout .callout-title {
  font-weight: 700; margin-bottom: 4px; display: block;
}

/* Code block inline within section */
.sec-block .code-block {
  border-radius: 8px;
  font-size: 13.5px;
  margin: 14px 0;
  border: 1px solid #1E293B;
}
.code-caption {
  font-size: 13px; color: var(--text-sub);
  margin-top: -8px; margin-bottom: 12px;
  font-style: italic;
}

/* Path cards */
.welcome-study h2 {
  font-family: "Georgia",serif;
  font-size: 28px; color: var(--navy-deep);
  margin-bottom: 24px;
}
.path-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-bottom: 50px;
}
.path-card {
  padding: 22px 22px; border-radius: 12px;
  background: #fff; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  position: relative;
}
.path-card::before {
  content: ""; position: absolute; top: 0; left: 22px; right: 22px;
  height: 4px; border-radius: 0 0 4px 4px;
}
.path-1::before { background: #3B82F6; }
.path-2::before { background: #10B981; }
.path-3::before { background: #F59E0B; }
.path-4::before { background: #8B5CF6; }
.path-card h4 {
  font-size: 16px; color: var(--navy-deep); margin-bottom: 4px;
}
.path-card > p {
  font-size: 12px; color: var(--text-mute); margin-bottom: 14px;
}
.path-card ol { padding-left: 18px; }
.path-card li { font-size: 13px; color: var(--text-sub); padding: 3px 0; }

.quick-jump h3 {
  font-size: 20px; color: var(--navy-deep); margin-bottom: 16px;
}
.quick-jump-list {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
}
.quick-ch {
  padding: 14px 12px;
  background: linear-gradient(135deg, #fff, #F8FAFC);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.quick-ch:hover {
  border-color: var(--gold);
  background: linear-gradient(135deg, #FFFBEB, #FEF3C7);
  transform: translateY(-2px);
}
.quick-ch .q-no {
  display: block;
  font-family: "Georgia",serif;
  font-size: 22px; font-weight: 700;
  color: var(--navy);
}
.quick-ch .q-name {
  font-size: 12px; color: var(--text-sub);
  margin-top: 4px;
}

/* =============== Resource Center =============== */
.resource-header {
  max-width: 1440px; margin: 0 auto;
  padding: 56px 28px 28px; text-align: center;
}
.resource-header h1 {
  font-family: "Georgia",serif;
  font-size: 40px; color: var(--navy-deep);
  margin-bottom: 10px;
}
.resource-header p { color: var(--text-sub); font-size: 16px; }

.res-tabs {
  max-width: 1440px; margin: 0 auto;
  padding: 0 28px;
  display: flex; flex-wrap: wrap; gap: 8px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 28px;
}
.res-tab {
  padding: 12px 22px;
  border: none; background: transparent;
  cursor: pointer; font-family: inherit;
  font-size: 14px; font-weight: 600;
  color: var(--text-sub);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}
.res-tab:hover { color: var(--navy); }
.res-tab.active {
  color: var(--navy-deep);
  border-bottom-color: var(--gold);
  background: linear-gradient(180deg, transparent, rgba(233,185,73,0.10));
}

.res-content {
  max-width: 1440px; margin: 0 auto;
  padding: 0 28px;
  animation: fadeIn 0.35s ease;
}

/* Resource Cards */
.res-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
.res-card {
  background: #fff; border-radius: 10px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s;
  position: relative;
}
.res-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--gold); }
.res-card-head {
  display: flex; align-items: flex-start; gap: 14px; margin-bottom: 12px;
}
.res-emoji {
  width: 48px; height: 48px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(10,36,99,0.08), rgba(233,185,73,0.15));
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
}
.res-card h4 {
  font-size: 16px; color: var(--navy-deep);
  margin: 0 0 4px; font-weight: 700;
}
.res-card .res-meta {
  font-size: 12px; color: var(--text-mute);
}
.res-card p {
  font-size: 13px; color: var(--text-sub);
  line-height: 1.7;
  margin-bottom: 14px;
}
.res-tags {
  display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px;
}
.res-tags span {
  padding: 2px 9px; border-radius: 99px;
  background: #F1F5F9; color: var(--navy-light);
  font-size: 11px; font-weight: 500;
}
.res-actions {
  display: flex; gap: 8px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.res-actions button {
  padding: 6px 14px;
  border: 1px solid var(--navy);
  background: transparent;
  color: var(--navy);
  border-radius: 6px;
  font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: all 0.2s;
}
.res-actions button:hover {
  background: var(--navy); color: #fff;
}
.res-actions button.primary {
  background: var(--navy); color: #fff;
}
.res-actions button.primary:hover { background: var(--navy-light); }

/* Detailed resource list */
.res-detail {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.res-detail-header {
  padding: 22px 28px;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: #fff;
}
.res-detail-header h3 {
  font-size: 22px; font-weight: 700; margin-bottom: 6px;
}
.res-detail-header p { opacity: 0.9; font-size: 14px; }
.res-detail-body { padding: 20px 28px; }
.acc-item {
  border: 1px solid var(--border);
  border-radius: 8px; margin-bottom: 10px;
  overflow: hidden;
}
.acc-head {
  padding: 14px 20px;
  background: linear-gradient(90deg, #F8FAFC, #fff);
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 15px; font-weight: 600;
  color: var(--navy-deep);
  transition: all 0.2s;
}
.acc-head:hover { background: linear-gradient(90deg, #FEF3C7, #FFFBEB); }
.acc-head .arr { transition: transform 0.2s; font-size: 11px; color: var(--text-mute); }
.acc-item.open .acc-head {
  background: linear-gradient(90deg, rgba(10,36,99,0.08), rgba(233,185,73,0.10));
  color: var(--navy);
}
.acc-item.open .arr { transform: rotate(90deg); color: var(--gold); }
.acc-body {
  display: none; padding: 16px 20px 20px;
  background: #fff;
  border-top: 1px solid var(--border);
  animation: fadeIn 0.3s ease;
}
.acc-item.open .acc-body { display: block; }
.acc-body h5 {
  font-size: 14px; color: var(--navy); margin: 10px 0 6px;
}
.acc-body p, .acc-body li { font-size: 13.5px; color: var(--text-sub); line-height: 1.75; }
.acc-body ul, .acc-body ol { padding-left: 20px; margin-bottom: 6px; }

/* =============== Tools Grid =============== */
.tools-grid {
  max-width: 1440px; margin: 0 auto;
  padding: 20px 28px 80px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 22px;
}
.tool-card {
  background: #fff; border-radius: var(--radius-lg);
  padding: 26px 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.tool-card h3 {
  font-size: 18px; color: var(--navy-deep);
  margin-bottom: 4px; font-weight: 700;
}
.tool-card > p {
  font-size: 13px; color: var(--text-sub);
  margin-bottom: 16px;
}
.demo-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #F8FAFC; border-radius: 8px;
}
.demo-toolbar select {
  padding: 6px 10px; border: 1px solid var(--border);
  border-radius: 6px; background: #fff;
  font-family: inherit; font-size: 12px;
}
.demo-code {
  width: 100%; min-height: 180px;
  padding: 14px; border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--code-bg); color: #e2e8f0;
  font-family: "JetBrains Mono","Consolas",monospace;
  font-size: 18px; line-height: 1.7;
  resize: vertical; outline: none;
  tab-size: 4;
}
.demo-code:focus { border-color: var(--gold); }
.demo-preview-label {
  font-size: 12px; color: var(--text-mute);
  margin: 14px 0 8px; font-weight: 600;
}
.demo-preview { border-radius: 8px; border: 1px solid #1E293B; font-size: 16px; }

/* Flash cards */
.card-list {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  max-height: 480px; overflow-y: auto; padding-right: 4px;
}
.flip-card {
  perspective: 1000px; height: 110px; cursor: pointer;
}
.flip-inner {
  position: relative; width: 100%; height: 100%;
  transition: transform 0.5s; transform-style: preserve-3d;
}
.flip-card.flipped .flip-inner { transform: rotateY(180deg); }
.flip-front, .flip-back {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  border-radius: 10px;
  padding: 14px;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
}
.flip-front {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: #fff; font-weight: 600; font-size: 13px;
}
.flip-back {
  background: linear-gradient(135deg, #FFFBEB, #FEF3C7);
  color: var(--navy-deep); font-size: 12px;
  line-height: 1.6; border: 1px solid var(--gold);
  transform: rotateY(180deg);
}

/* Flow */
.flow-select { margin-bottom: 14px; }
.flow-select select {
  padding: 8px 12px; border-radius: 6px;
  border: 1px solid var(--border);
  font-family: inherit; font-size: 13px;
}
.flow-box {
  background: #F8FAFC;
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 20px;
  min-height: 380px;
  display: flex; align-items: center; justify-content: center;
}
.flow-box svg { max-width: 100%; height: auto; }

/* Quiz */
.quiz-btns { display: flex; gap: 10px; margin-bottom: 16px; }
.quiz-box { max-height: 520px; overflow-y: auto; padding-right: 4px; }
.quiz-q {
  padding: 14px 16px; margin-bottom: 10px;
  background: #fff; border: 1px solid var(--border);
  border-radius: 8px;
}
.quiz-q .q-no {
  display: inline-block;
  background: var(--navy); color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 2px 10px; border-radius: 99px;
  margin-right: 8px;
}
.quiz-q .q-text {
  font-size: 14px; color: var(--text);
  margin-bottom: 10px; font-weight: 600;
}
.quiz-opts { list-style: none; padding: 0; }
.quiz-opts li {
  padding: 6px 12px; margin: 4px 0;
  border-radius: 6px; font-size: 13px;
  background: #F8FAFC;
  cursor: pointer; border: 1px solid transparent;
  transition: all 0.15s;
}
.quiz-opts li:hover { background: #EFF6FF; border-color: #93C5FD; }
.quiz-q.reveal .quiz-opts li.correct {
  background: #F0FDF4; color: #166534;
  border: 1px solid #86EFAC; font-weight: 600;
}
.quiz-q.reveal .quiz-opts li.wrong-pick {
  background: #FEF2F2; color: #991B1B;
  border: 1px solid #FCA5A5;
}
.q-answer {
  display: none;
  margin-top: 10px; padding: 10px 12px;
  background: linear-gradient(90deg, #F0FDF4, transparent);
  border-left: 4px solid var(--ok);
  border-radius: 4px;
  font-size: 12px; color: #166534;
}
.quiz-q.reveal .q-answer { display: block; }

/* =============== About =============== */
.about-wrap {
  max-width: 1200px; margin: 0 auto;
  padding: 56px 28px;
}
.about-wrap h1 {
  font-family: "Georgia",serif;
  font-size: 36px; color: var(--navy-deep);
  text-align: center; margin-bottom: 40px;
}
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 22px;
}
.about-col {
  background: #fff; border-radius: var(--radius-lg);
  padding: 28px 30px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.about-col h3 {
  font-size: 18px; color: var(--navy-deep);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #FEF3C7;
  display: inline-block;
}
.about-col p, .about-col li {
  font-size: 14.5px; color: var(--text);
  line-height: 1.85;
}
.about-col ul, .about-col ol { margin-bottom: 4px; }
.about-col li { margin-bottom: 4px; }
.about-col code {
  padding: 2px 6px; border-radius: 4px;
  background: #F1F5F9; color: var(--navy);
  font-size: 13px;
}
.about-col.about-col-wide {
  grid-column: 1 / -1;              /* 技术说明整行横跨 */
}
.tech-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 10px;
}
.tech-card {
  background: linear-gradient(180deg, #FFFFFF, #F8FAFC);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 18px 16px;
  transition: all 0.22s ease;
}
.tech-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 10px 26px rgba(10,36,99,0.10);
}
.tech-card h4 {
  font-size: 15px; color: var(--navy-deep);
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.tech-card p {
  font-size: 13.5px; color: var(--text);
  line-height: 1.85;
}
.about-tip {
  margin-top: 18px;
  padding: 12px 16px;
  background: #FFFBEB;
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
}

/* =============== Footer =============== */
.footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,0.7);
  padding: 24px 28px;
  margin-top: 40px;
}
.footer-inner {
  max-width: 1440px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px;
}

/* =============== Back to top =============== */
#toTop {
  position: fixed; right: 28px; bottom: 36px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: #fff; font-size: 16px;
  border: none; cursor: pointer;
  box-shadow: 0 8px 20px rgba(10,36,99,0.4);
  opacity: 0; pointer-events: none;
  transition: all 0.3s ease;
  z-index: 99;
}
#toTop.show { opacity: 1; pointer-events: auto; }
#toTop:hover { transform: translateY(-3px); background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: var(--navy-deep); }

/* =============== Search Highlight =============== */
mark.search-hit {
  background: linear-gradient(transparent 45%, #FDE047 45%);
  color: inherit; padding: 0 2px;
  border-radius: 2px;
}

/* =============== Responsive =============== */
@media (max-width: 1200px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: 1fr; gap: 40px; }
  .hero-code-card { transform: none; }
  .path-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-jump-list { grid-template-columns: repeat(4, 1fr); }
  /* 中屏侧边栏缩小到 260 */
  .sidebar { width: 260px; }
  .study-content { margin-left: 260px; width: calc(100% - 260px); }
  .chapter-tips { grid-template-columns: repeat(2, 1fr); }
  .tools-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (max-width: 900px) {
  .nav-menu { display: none; }
  .nav-actions input { display: none; }
  .nav-actions { margin-left: auto; }   /* 窄屏：整个操作区推到右侧，汉堡靠最右 */
  .hamburger { display: flex; }         /* 小屏显示汉堡 */
  .nav-inner { gap: 14px; padding: 12px 18px; }
  .nav-inner .btn-primary { display: none; } /* 小屏顶部"开始备课"藏到弹层里 */
  .module-entry { grid-template-columns: 1fr; }
  /* 小屏：侧边栏恢复普通流 */
  .sidebar { position: static; width: 100%; height: auto; max-height: 320px; }
  .study-content { padding: 24px 18px; margin-left: 0; width: 100%; }
  .hero-title { font-size: 36px; }
  .resource-header h1 { font-size: 28px; }
  #chapterTitle { font-size: 28px; }
  .section-title { font-size: 26px; }
  .quick-jump-list { grid-template-columns: repeat(3, 1fr); }
  .tech-row { grid-template-columns: 1fr; }
  .about-wrap { padding: 36px 18px; }
  .about-wrap h1 { font-size: 28px; }
  .about-col { padding: 20px 20px; }
}
@media (max-width: 600px) {
  .feature-grid { grid-template-columns: 1fr; }
  .path-grid { grid-template-columns: 1fr; }
  .chapter-tips { grid-template-columns: 1fr; }
  .card-list { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
  .hero-btns { flex-direction: column; }
  .btn-lg { width: 100%; }
  .hero { padding: 40px 18px 36px; }
  .hero-title { font-size: 28px; }
  .hero-sub { font-size: 15px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .stat-num { font-size: 26px; }
  .logo-sub { display: none; }
  .logo-text { font-size: 17px; }
  .mobile-drawer-inner { padding: 14px 14px 20px; }
  /* ≤600px：资源 tabs 改成横滚单行，避免多行换行导致标题与 tab 挤撞 + 窄屏更顺手 */
  .res-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding: 0 14px;
    gap: 4px;
    margin-bottom: 20px;
  }
  .res-tabs::-webkit-scrollbar { height: 3px; }
  .res-tab {
    padding: 10px 14px;
    font-size: 13px;
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .res-content { padding: 0 14px; }
  .resource-header { padding: 36px 14px 18px; }
  .resource-header h1 { font-size: 24px; }
  .resource-header p { font-size: 14px; }
  .quick-jump-list { grid-template-columns: repeat(2, 1fr); }
}

/* ============ 超窄屏 (≤360px)：解决 349px 左右横滚 + 导航栏看起来过窄的问题 ============ */
@media (max-width: 360px) {
  /* --- 导航栏：更紧凑（logo + 汉堡贴边 + 缩小字号/内边距），宽度刚好贴视口 --- */
  .nav-inner { padding: 10px 12px; gap: 8px; }
  .logo-mark { font-size: 22px; letter-spacing: -0.5px; }
  .logo-text { font-size: 15px; }
  .logo-sub { display: none !important; }
  .logo { gap: 4px; }
  .nav-actions { gap: 6px; }
  .hamburger {
    width: 38px; height: 36px; gap: 4px;
    flex-shrink: 0;
  }
  .hamburger span { width: 20px; height: 1.5px; }
  /* --- 头部/hero：再缩 padding 与字号 --- */
  .hero { padding: 30px 12px 28px; gap: 24px; }
  .hero-title { font-size: 22px; line-height: 1.3; }
  .hero-sub { font-size: 14px; margin-bottom: 22px; }
  .hero-stats { gap: 10px; grid-template-columns: repeat(2, 1fr); }
  .stat-num { font-size: 22px; }
  .stat-label { font-size: 12px; }
  .module-entry { padding: 28px 12px; }
  .module-entry h2 { font-size: 20px; }
  .module-entry-head p { font-size: 13px; }
  .me-head { font-size: 15px; }
  .me-list li { font-size: 13px; padding: 6px 0; }
  .entry-card { padding: 16px 14px; }
  /* --- 知识补习页 --- */
  .welcome-study { padding: 22px 12px; }
  .welcome-study h1 { font-size: 22px; }
  .welcome-study p { font-size: 13px; }
  .sidebar { padding: 14px 12px; }
  .sidebar h3 { font-size: 15px; }
  .ch-head { padding: 10px 10px; font-size: 13px; }
  .ch-stage { font-size: 10px; padding: 1px 6px; }
  .sec-menu a { padding: 6px 10px; font-size: 12px; }
  .study-content { padding: 18px 12px 40px; }
  #chapterTitle { font-size: 22px; }
  .section-title { font-size: 20px; }
  .chapter-desc { font-size: 13px; }
  .btn-expand-all { padding: 8px 14px; font-size: 13px; }
  .breadcrumb { font-size: 12px; }
  .chapter-tips { gap: 10px; }
  .tip-card { padding: 12px; }
  .tip-t { font-size: 13px; }
  /* --- 资源页 --- */
  .resource-header h1 { font-size: 22px; }
  .res-tab { padding: 9px 12px; font-size: 12.5px; }
  .res-card { padding: 14px; }
  .res-detail-header { padding: 16px 14px; }
  .res-detail-header h3 { font-size: 16px; }
  .res-detail-body { padding: 14px; }
  .syl-block { padding: 12px 12px; margin-bottom: 12px; }
  .syl-block h4 { font-size: 14px; }
  /* --- 工具箱/关于 --- */
  .tools-grid { padding: 28px 12px 60px; gap: 14px; }
  .tool-card { padding: 18px 14px; }
  .tool-card h3 { font-size: 16px; }
  .about-wrap { padding: 28px 12px; }
  .about-wrap h1 { font-size: 24px; }
  .about-col { padding: 16px 14px; }
  .about-col h3 { font-size: 16px; }
  /* --- 移动端弹层 --- */
  .mobile-drawer-inner { padding: 12px 12px 16px; }
  .mobile-drawer-head h2 { font-size: 16px; }
  .mobile-nav-link { font-size: 14px; padding: 10px 12px; }
  #toTop { right: 14px; bottom: 20px; width: 38px; height: 38px; font-size: 14px; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #F1F5F9; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--navy-light); }
