/* ============================================================
   C++ 考级竞赛知识体系 —— 现代学习文档站风格
   主色 #1A3A63 / 强调 #00A896 / #FF8C00
   保留全部既有类名与 id，仅增强视觉层级、间距、圆角、阴影与配色
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
/* html { scroll-behavior: smooth; } 已移除：点击导航需瞬时直达，避免任何平滑滚动 */
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Segoe UI", Arial, sans-serif;
  background: #f5f7fa;
  color: #2d333b;
  line-height: 1.8;
  font-size: 15px;
}
a { text-decoration: none; color: #0e7490; transition: color .15s; }
a:hover { color: #00A896; }
img { max-width: 100%; vertical-align: middle; }
code { font-family: Consolas, "Courier New", "Source Code Pro", monospace; }

/* ============ 顶部导航（白底现代风） ============ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid #e6ebf2;
  box-shadow: 0 1px 6px rgba(26, 58, 99, .06);
}
.navbar {
  max-width: 1360px; margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
  min-height: 62px; height: auto; padding: 8px 18px;
  flex-wrap: nowrap;
}
.nav-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; color: #1A3A63; font-size: 17px; font-weight: 800; letter-spacing: .3px; white-space: nowrap; }
.nav-logo:hover { color: #00A896; text-decoration: none; }
.nav-logo .nav-logo-img { height: 32px; width: auto; }
.nav-logo .nav-logo-text { line-height: 1.25; }
.logo-badge {
  background: linear-gradient(135deg, #00A896, #0d8f80); color: #fff;
  width: 32px; height: 32px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 900;
  box-shadow: 0 2px 6px rgba(0, 168, 150, .35);
}
.nav-search { margin-left: auto; position: relative; display: flex; align-items: center; flex-shrink: 1; min-width: 0; }
.nav-search input {
  border: 1px solid #e2e8f0; border-radius: 20px 0 0 20px; padding: 8px 16px; width: 230px;
  outline: none; font-size: 13px; color: #2d333b; background: #f1f5f9;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.nav-search input:focus { border-color: #00A896; background: #fff; box-shadow: 0 0 0 3px rgba(0, 168, 150, .15); }
.nav-search button {
  border: 1px solid #00A896; background: #00A896; color: #fff; border-radius: 0 20px 20px 0;
  padding: 8px 18px; cursor: pointer; font-size: 13px; font-weight: 700;
  transition: background .15s;
}
.nav-search button:hover { background: #0d8f80; }
/* 搜索结果下拉 */
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; width: 100%; min-width: 300px;
  background: #fff; border: 1px solid #e6ebf2; border-radius: 12px;
  box-shadow: 0 12px 32px rgba(26, 58, 99, .16);
  padding: 8px; z-index: 200; max-height: 340px; overflow-y: auto;
}
.search-results.hidden { display: none; }
.search-results .sr-title { font-size: 12px; color: #98a2b3; padding: 4px 10px 6px; font-weight: 800; letter-spacing: .5px; }
.search-results a { display: flex; align-items: baseline; gap: 8px; padding: 8px 10px; border-radius: 8px; color: #334155; font-size: 13.5px; }
.search-results a:hover { background: #f0fdfa; color: #00A896; text-decoration: none; }
.search-results a .sr-no { font-family: Consolas, monospace; color: #94a3b8; font-size: 12px; min-width: 24px; }
.search-results .sr-empty { padding: 12px 10px; color: #94a3b8; font-size: 13px; text-align: center; }
.nav-links { display: flex; gap: 4px; margin-left: 18px; flex-shrink: 0; }
.nav-links a { color: #4a5568; padding: 7px 13px; border-radius: 10px; font-size: 14px; white-space: nowrap; font-weight: 500; }
.nav-links a:hover, .nav-links a.current { background: #eef4fb; color: #1A3A63; text-decoration: none; }
.nav-links a.current { background: linear-gradient(135deg, #1A3A63, #2b5b8f); color: #fff; box-shadow: 0 2px 8px rgba(26, 58, 99, .25); }
.nav-links a.current:hover { color: #fff; }

/* ============ 页面布局（三栏卡片化） ============ */
.page-wrap {
  max-width: 1360px; margin: 82px auto 0;
  display: flex; align-items: flex-start; gap: 20px;
  padding: 0 18px 36px;
}
.sidebar {
  flex: 0 0 252px; min-width: 252px;
  background: #fff; border: 1px solid #e8ecf2; border-radius: 16px;
  padding: 16px 12px;
  /* 吸顶固定：header 高 62px，留 18px 间距 */
  position: sticky; top: 80px;
  /* 高度不超过视口，超出部分侧栏自己滚 */
  max-height: calc(100vh - 100px);
  overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain;
  box-shadow: 0 2px 12px rgba(26, 58, 99, .05);
  /* 滚动条：细、低调，不破坏整体视觉 */
  scrollbar-width: thin;
  scrollbar-color: #d3dae4 transparent;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: #d3dae4; border-radius: 3px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: #b8c2d0; }
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: #d4dce6; border-radius: 3px; }
.side-cat {
  font-size: 12px; color: #8a94a6; font-weight: 800; margin: 16px 10px 6px; letter-spacing: 1.5px;
}
.side-cat:first-child { margin-top: 2px; }
.side-link {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 10px; margin: 2px 0; border-radius: 10px;
  color: #475569; font-size: 13.5px; border-left: 3px solid transparent;
  transition: background .15s, color .15s;
}
.side-link:hover { background: #f0fdfa; color: #00A896; text-decoration: none; }
.side-link .no { color: #9aa7b8; font-size: 12px; font-family: Consolas, monospace; min-width: 20px; }
.side-link.active { background: linear-gradient(135deg, #1A3A63, #2b5b8f); color: #fff; border-left-color: #00A896; box-shadow: 0 4px 12px rgba(26, 58, 99, .22); }
.side-link.active .no { color: #5eead4; }
.side-link.active:hover { background: linear-gradient(135deg, #1A3A63, #2b5b8f); color: #fff; }

.content, .main-content { flex: 1 1 auto; min-width: 0; background: #fff; border: 1px solid #e8ecf2; border-radius: 16px; padding: 32px 38px; box-shadow: 0 2px 12px rgba(26, 58, 99, .05); }
.toc-side {
  flex: 0 0 218px; min-width: 218px;
  background: #fff; border: 1px solid #e8ecf2; border-radius: 16px; padding: 18px 16px;
  /* 与左侧栏一致：吸顶固定 + 超高独立滚动 */
  position: sticky; top: 80px; max-height: calc(100vh - 100px);
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  box-shadow: 0 2px 12px rgba(26, 58, 99, .05);
  scrollbar-width: thin; scrollbar-color: #d3dae4 transparent;
}
.toc-side::-webkit-scrollbar { width: 6px; }
.toc-side::-webkit-scrollbar-track { background: transparent; }
.toc-side::-webkit-scrollbar-thumb { background: #d3dae4; border-radius: 3px; }
.toc-side::-webkit-scrollbar-thumb:hover { background: #b8c2d0; }
.toc-side .toc-title { font-size: 14px; font-weight: 800; color: #1A3A63; border-bottom: 2px solid #00A896; padding-bottom: 8px; margin-bottom: 10px; }
.toc-side a { display: block; color: #64748b; font-size: 13px; padding: 4px 8px; border-left: 2px solid transparent; border-radius: 0 6px 6px 0; transition: all .15s; }
.toc-side a:hover { color: #00A896; border-left-color: #00A896; text-decoration: none; background: #f0fdfa; }
.toc-side a.lv2 { padding-left: 12px; }
.toc-side a.lv3 { padding-left: 22px; font-size: 12.5px; color: #94a3b8; }

/* ============ 文章正文 ============ */
.article h1 {
  font-size: 26px; color: #1A3A63; margin-bottom: 16px;
  padding-bottom: 14px; border-bottom: 2px solid #eef2f7;
}
.article .lead-note {
  background: linear-gradient(90deg, #eef9f7, #f8fcfa); border-left: 4px solid #00A896;
  padding: 12px 16px; border-radius: 8px; margin: 12px 0 20px; color: #14564d; font-size: 14px;
}
.article h2 { font-size: 20px; color: #1A3A63; margin: 30px 0 12px; padding: 8px 0 6px; border-bottom: 2px solid #eef2f7; }
.article h3 { font-size: 17px; color: #23506e; margin: 22px 0 10px; }
.article p { margin: 10px 0; }
.article strong { color: #b45309; }
.article ul, .article ol { margin: 10px 0 10px 26px; }
.article li { margin: 5px 0; }
.article li.task { list-style: none; margin-left: -18px; }
.article li.task::before { content: "\2610"; color: #00A896; margin-right: 8px; font-size: 16px; }
.article blockquote {
  background: #f0fdfa; border-left: 4px solid #00A896;
  padding: 12px 18px; margin: 14px 0; color: #155e54; border-radius: 0 10px 10px 0;
}
.article blockquote p { margin: 4px 0; }
.article a code, .article li code, .article p code {
  background: #eef2f7; border: 1px solid #e2e8f0; border-radius: 6px;
  padding: 1px 7px; font-size: 13px; color: #d6336c;
}

/* ============ 表格 ============ */
.md-table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 16px 0; font-size: 14px; border: 1px solid #e8ecf2; border-radius: 12px; overflow: hidden; }
.md-table th, .md-table td { border-bottom: 1px solid #eef2f7; padding: 10px 14px; text-align: left; }
.md-table th { background: linear-gradient(135deg, #1A3A63, #24517f); color: #fff; font-weight: 600; }
.md-table tr:last-child td { border-bottom: none; }
.md-table tr:nth-child(even) td { background: #f8fafc; }
.md-table tr:hover td { background: #f0fdfa; }
.md-table td code { background: transparent; border: none; padding: 0; color: #d6336c; }

/* ============ 代码实例块（现代深色主题 · 类 VS Code / GitHub Dark） ============ */
.code-box {
  border: 1px solid #30363d; border-radius: 12px; margin: 18px 0;
  overflow: hidden; background: #0d1117;
  box-shadow: 0 8px 24px rgba(1, 4, 9, .45), 0 2px 6px rgba(1, 4, 9, .3);
}
.code-head {
  display: flex; align-items: center; gap: 12px;
  background: #161b22; padding: 10px 16px; border-bottom: 1px solid #30363d;
}
/* 窗口控制点（红黄绿） */
.code-dots { display: inline-flex; gap: 8px; flex: 0 0 auto; }
.code-dots i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.code-dots .dot-r { background: #ff5f56; }
.code-dots .dot-y { background: #ffbd2e; }
.code-dots .dot-g { background: #27c93f; }
.code-lang {
  font-size: 12px; color: #8b949e; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; user-select: none;
}
.code-actions { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; }
.btn-copy {
  background: #21262d; color: #c9d1d9; border: 1px solid #30363d; border-radius: 6px;
  padding: 4px 14px; font-size: 12px; cursor: pointer; font-weight: 600;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-copy:hover { background: #30363d; border-color: #8b949e; color: #fff; }
.code-box pre { margin: 0; padding: 14px 0; overflow-x: auto; background: #0d1117; }
.code-box code {
  display: block; min-width: max-content;
  font-size: 13.5px; line-height: 1.75; color: #c9d1d9; white-space: pre;
  counter-reset: line; font-family: Consolas, "Courier New", monospace;
}
.code-line { display: block; padding-right: 18px; }
.code-line:hover { background: #161b22; }
.code-line::before {
  counter-increment: line;
  content: counter(line);
  display: inline-block; min-width: 44px; margin-right: 16px; padding-right: 14px;
  text-align: right; color: #484f58; user-select: none;
  border-right: 1px solid #21262d;
}
/* 深色背景语法高亮配色（GitHub Dark） */
.tok-kw  { color: #ff7b72; font-weight: 600; }
.tok-str { color: #a5d6ff; }
.tok-cm  { color: #8b949e; font-style: italic; }
.tok-num { color: #79c0ff; }
.tok-pp  { color: #ff7b72; }
.tok-fn  { color: #d2a8ff; }

/* ============ 上一章 / 下一章 ============ */
.page-nav {
  display: flex; justify-content: space-between; gap: 12px;
  margin-top: 34px; padding-top: 24px; border-top: 1px solid #eef2f7;
}
.page-nav a {
  flex: 0 1 48%; background: #fff; border: 1px solid #e8ecf2; border-radius: 12px;
  padding: 14px 18px; color: #2d333b; transition: all .18s; box-shadow: 0 1px 4px rgba(26, 58, 99, .04);
}
.page-nav a:hover { border-color: #00A896; background: #f0fdfa; text-decoration: none; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 168, 150, .14); }
.page-nav .dir { font-size: 12px; color: #94a3b8; display: block; }
.page-nav .ttl { font-size: 15px; color: #1A3A63; font-weight: 700; }
.page-nav a.next { text-align: right; margin-left: auto; }

/* ============ 返回顶部 ============ */
#backTop {
  position: fixed; bottom: 42px; right: 34px; width: 46px; height: 46px;
  border-radius: 50%; background: linear-gradient(135deg, #1A3A63, #2b5b8f); color: #fff; border: none;
  font-size: 22px; cursor: pointer; z-index: 99;
  box-shadow: 0 4px 14px rgba(26, 58, 99, .35); display: none;
  transition: transform .15s;
}
#backTop:hover { background: #2c5b9e; transform: translateY(-2px); }

/* ============ Toast ============ */
#toast {
  position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%);
  background: rgba(20, 30, 46, .92); color: #fff;
  padding: 12px 22px; border-radius: 10px; font-size: 14px;
  opacity: 0; transition: opacity .3s; pointer-events: none; z-index: 300;
  max-width: 80%; text-align: center;
}
#toast.show { opacity: 1; }

/* ============ 页脚 ============ */
.site-footer {
  background: linear-gradient(135deg, #1A3A63, #123052); color: #b9c7da; text-align: center;
  padding: 26px 16px; font-size: 13px; line-height: 1.9;
}
.site-footer a { color: #d7e3f0; }
.site-footer .footer-brand { display: flex; align-items: center; justify-content: center; gap: 8px; color: #fff; font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.site-footer .footer-logo { height: 26px; width: auto; }

/* ============ 首页：Hero / 卡片 ============ */
.landing { max-width: 1180px; margin: 82px auto 0; padding: 0 18px 48px; }
.hero {
  background: linear-gradient(135deg, #1A3A63 0%, #0f7a6e 58%, #00A896 100%);
  color: #fff; border-radius: 20px; padding: 46px 42px; margin: 22px 0 30px;
  box-shadow: 0 14px 34px rgba(26, 58, 99, .30);
  position: relative; overflow: hidden;
}
.hero::before { content: ""; position: absolute; width: 340px; height: 340px; border-radius: 50%; background: rgba(255, 255, 255, .07); top: -120px; right: -80px; }
.hero::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, .05); bottom: -90px; left: -60px; }
.hero-logo { display: inline-flex; background: #fff; border-radius: 18px; padding: 12px 16px; box-shadow: 0 8px 22px rgba(0, 0, 0, .18); margin-bottom: 18px; position: relative; }
.hero-logo img { height: 64px; width: auto; }
.hero h1 { font-size: 32px; margin-bottom: 12px; letter-spacing: 1px; position: relative; }
.hero p { font-size: 15px; color: #e3f2ef; max-width: 880px; position: relative; }
.hero .badges { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; position: relative; }
.hero .badge {
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .32);
  padding: 5px 16px; border-radius: 18px; font-size: 13px; color: #fff;
}
.hero .cta {
  display: inline-block; margin-top: 24px; background: #FF8C00; color: #fff;
  padding: 11px 30px; border-radius: 24px; font-weight: 800; font-size: 15px; position: relative;
  box-shadow: 0 6px 18px rgba(255, 140, 0, .4); transition: transform .15s, box-shadow .15s, background .15s;
}
.hero .cta:hover { background: #ff9f2e; color: #fff; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(255, 140, 0, .45); text-decoration: none; }

/* 次要 CTA：离线下载（描边风格，视觉层级低于主按钮） */
.hero .cta-secondary { background: transparent; color: #1A3A63; border: 2px solid #1A3A63;
  box-shadow: none; font-weight: 700; font-size: 13.5px; padding: 9px 22px; margin-left: 10px; }
.hero .cta-secondary:hover { background: #1A3A63; color: #fff; box-shadow: 0 6px 16px rgba(26, 58, 99, .28); }
@media (max-width: 620px) { .hero .cta-secondary { display: block; margin: 14px auto 0; width: fit-content; } }

.section-title {
  font-size: 22px; color: #1A3A63; margin: 38px 0 14px;
  padding-left: 14px; border-left: 5px solid #00A896;
}
.section-desc { color: #64748b; font-size: 14px; margin-bottom: 16px; }

.level-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.level-card {
  background: #fff; border: 1px solid #e8ecf2; border-radius: 16px; padding: 22px;
  box-shadow: 0 2px 10px rgba(26, 58, 99, .05); transition: transform .18s, box-shadow .18s;
  position: relative; overflow: hidden;
}
.level-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; }
.level-card.gesp::before { background: linear-gradient(90deg, #00A896, #5eead4); }
.level-card.cspj::before { background: linear-gradient(90deg, #FF8C00, #ffb35c); }
.level-card.noip::before { background: linear-gradient(90deg, #1A3A63, #4a7cbf); }
.level-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(26, 58, 99, .12); }
.level-card.clickable { cursor: pointer; }
.level-card.clickable::after { content: "点击进入专题 →"; position: absolute; right: 14px; top: 14px; font-size: 12px; font-weight: 700; color: #FF8C00; opacity: .85; z-index: 1; }
.level-card.clickable:hover { box-shadow: 0 10px 24px rgba(255, 140, 0, .22); }
.level-card .lv-tag { display: inline-block; font-size: 12px; font-weight: 800; padding: 4px 14px; border-radius: 14px; margin-bottom: 12px; color: #fff; letter-spacing: .5px; }
.level-card.gesp .lv-tag { background: linear-gradient(135deg, #00A896, #0d8f80); }
.level-card.cspj .lv-tag { background: linear-gradient(135deg, #FF8C00, #e07b00); }
.level-card.noip .lv-tag { background: linear-gradient(135deg, #1A3A63, #2b5b8f); }
.level-card h3 { font-size: 17px; color: #1A3A63; margin-bottom: 6px; }
.level-card p { font-size: 14px; color: #526070; }
.level-card .lv-points { margin-top: 12px; padding-top: 10px; border-top: 1px dashed #e2e8f0; }
.level-card .lv-points b { display: block; font-size: 13px; color: #1A3A63; margin-bottom: 6px; }
.level-card .lv-points ul { margin: 0; padding-left: 18px; }
.level-card .lv-points li { font-size: 13px; line-height: 1.7; color: #526070; }

.route-list { margin: 0; padding: 0; }
.route-item {
  background: #fff; border: 1px solid #e8ecf2; border-radius: 16px;
  padding: 20px 24px; margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(26, 58, 99, .05); transition: box-shadow .18s, transform .18s;
}
.route-item:hover { box-shadow: 0 8px 20px rgba(26, 58, 99, .10); transform: translateY(-1px); }
.route-item h3 { font-size: 17px; color: #1A3A63; margin-bottom: 8px; }
.route-item h3 .tag { font-size: 12px; background: #f0fdfa; color: #0d8f80; padding: 3px 12px; border-radius: 12px; margin-right: 8px; font-weight: 800; border: 1px solid #a7f3d0; }
.route-item ol, .route-item ul { margin: 8px 0 0 24px; }
.route-item li { font-size: 14px; margin: 5px 0; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.cat-card {
  background: #fff; border: 1px solid #e8ecf2; border-radius: 16px; padding: 18px 20px;
  border-top: 4px solid #1A3A63; transition: box-shadow .18s, transform .18s;
  display: flex; flex-direction: column;
}
.cat-card:hover { box-shadow: 0 10px 24px rgba(26, 58, 99, .12); transform: translateY(-3px); }
.cat-card.gesp { border-top-color: #00A896; }
.cat-card.ds   { border-top-color: #1A3A63; }
.cat-card.alg  { border-top-color: #FF8C00; }
.cat-card.src  { border-top-color: #7c3aed; }
.cat-card.exam { border-top-color: #e11d48; }
.cat-card h3 { font-size: 16px; color: #1A3A63; margin-bottom: 6px; }
.cat-card .cnt { font-size: 12px; color: #98a2b3; margin-bottom: 12px; }
.cat-card a.ch {
  display: block; font-size: 13.5px; color: #475569; padding: 4px 8px; border-radius: 8px; transition: all .15s;
}
.cat-card a.ch:hover { color: #00A896; background: #f0fdfa; text-decoration: none; }
.cat-card a.ch .no { color: #94a3b8; font-size: 12px; font-family: Consolas, monospace; margin-right: 2px; }

/* ============ 响应式 ============ */
.side-toggle { display: none; }
@media (max-width: 1180px) {
  .toc-side { display: none; }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: -280px; top: 62px; bottom: 0; z-index: 90; transition: left .25s; border-radius: 16px 0 0 0; max-height: none; box-shadow: none; }
  .sidebar.open { left: 0; box-shadow: 4px 0 20px rgba(0, 0, 0, .25); }
  .side-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    background: #eef2f7; color: #1A3A63; border: 1px solid #e2e8f0;
    width: 36px; height: 36px; border-radius: 10px; font-size: 18px; cursor: pointer; margin-right: 10px;
  }
  .side-toggle:hover { background: #e0e7ef; }
  .nav-search input { width: 110px; }
  .nav-links { display: none; }
  .content { padding: 22px 20px; }
  .nav-logo .nav-logo-text { display: none; }
  .hero { padding: 32px 24px; }
  .hero h1 { font-size: 26px; }
  .hero-logo img { height: 50px; }
}
/* ============================================================
   [优化新增] 徽章 / 进度打卡收藏 / 阅读进度条 / 代码运行输出 /
   测验 / 全文搜索下拉增强 / 打印优化
   ============================================================ */

/* ---------- 章节考级徽章 ---------- */
.chapter-badges { display: inline-flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; vertical-align: middle; }
.chapter-badges .lvl-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .3px; line-height: 1.5; }
.lvl-green  { background: #e6f6ec; color: #1f7a43; border: 1px solid #b8e6c8; }
.lvl-blue   { background: #e8f1fb; color: #1a5fa8; border: 1px solid #bcd7f0; }
.lvl-orange { background: #fdf1e6; color: #b3600a; border: 1px solid #f3d2ab; }
.lvl-red    { background: #fdeaea; color: #b3362f; border: 1px solid #f3bcb9; }
.lvl-purple { background: #f0eafb; color: #6d3fb0; border: 1px solid #d9c8f0; }

/* ---------- 阅读进度条 ---------- */
#readingBar { position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, #00A896, #1A3A63); z-index: 9999;
  transition: width .08s linear; }

/* ---------- 打卡 / 收藏按钮 ---------- */
.chapter-actions { display: inline-flex; gap: 10px; margin: 0 0 14px; flex-wrap: wrap; }
.chapter-actions button { cursor: pointer; border: 1px solid #cfd8e3; background: #fff;
  color: #1A3A63; border-radius: 8px; padding: 6px 14px; font-size: 13px;
  font-weight: 600; transition: all .15s; }
.chapter-actions button:hover { border-color: #00A896; color: #00A896; }
.chapter-actions button.active { background: #00A896; border-color: #00A896; color: #fff; }
.chapter-actions button.active.star-active { background: #FF8C00; border-color: #FF8C00; }

/* 侧栏已学标记 */
.side-link.done { color: #00A896; }
.side-link .done-mark { font-weight: 700; margin-right: 4px; }

/* ---------- 首页学习进度模块 ---------- */
.prog-card { background: #fff; border: 1px solid #e4eaf1; border-radius: 14px;
  padding: 18px 20px; box-shadow: 0 2px 10px rgba(26,58,99,.05); }
.prog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.prog-title { font-weight: 700; color: #1A3A63; font-size: 15px; }
.prog-num { font-weight: 700; color: #00A896; font-size: 16px; }
.prog-bar { height: 10px; border-radius: 999px; background: #eef2f7; overflow: hidden; }
.prog-fill { display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #00A896, #1A3A63); transition: width .4s ease; }
.prog-info { margin-top: 8px; font-size: 13px; color: #66788f; }
.prog-stars { margin-top: 10px; font-size: 13px; color: #66788f; }
.prog-stars-title { color: #1A3A63; font-weight: 600; }
.prog-star-link { display: inline-block; margin: 0 4px 4px 0; padding: 2px 10px;
  background: #fdf1e6; color: #b3600a; border-radius: 999px; text-decoration: none;
  font-weight: 600; font-size: 12px; }

/* ---------- 代码块动作（复制 / 运行） ---------- */
.code-actions { display: inline-flex; gap: 6px; }
.code-actions button { cursor: pointer; border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08); color: #cfd8e3; border-radius: 6px;
  padding: 3px 10px; font-size: 12px; transition: all .15s; }
.code-actions button:hover { background: rgba(255,255,255,.18); color: #fff; }
.code-actions button:disabled { opacity: .55; cursor: wait; }
.code-out { margin: 10px 0 2px; border-radius: 8px; padding: 10px 12px;
  font-family: Consolas, "Courier New", monospace; font-size: 12.5px; line-height: 1.55;
  white-space: pre-wrap; word-break: break-all; max-height: 260px; overflow: auto; }
.code-out.running { background: #2a2d3a; color: #9aa3b5; }
.code-out.ok { background: #14261c; color: #8ce99a; border: 1px solid #2f5d43; }
.code-out.err { background: #2a1518; color: #ffb4ab; border: 1px solid #6b2b31; }

/* ---------- 全文搜索下拉增强 ---------- */
.search-results .sr-group { display: inline-block; font-size: 11px; color: #00A896;
  font-weight: 600; margin-right: 6px; }
.search-results .sr-ttl { font-weight: 600; color: #1A3A63; }
.search-results .sr-snip { display: block; margin-top: 2px; font-size: 12px;
  color: #66788f; line-height: 1.5; }
.search-results mark { background: #ffe58a; color: #6b4e00; border-radius: 2px; padding: 0 1px; }

/* ---------- 每章练习题测验 ---------- */
.quiz-section { margin-top: 34px; padding-top: 20px; border-top: 1px dashed #d8e0ea; }
.quiz-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.quiz-title { font-size: 18px; font-weight: 700; color: #1A3A63; }
.quiz-count { font-size: 12px; color: #00A896; background: #e6f6f3; padding: 2px 10px;
  border-radius: 999px; font-weight: 600; }
.quiz-meta { display: flex; justify-content: space-between; font-size: 13px;
  color: #66788f; margin-bottom: 14px; }
.quiz-q { background: #fafcfe; border: 1px solid #e4eaf1; border-radius: 12px; padding: 16px 18px; }
.quiz-q-title { font-size: 15px; font-weight: 600; color: #22364f; line-height: 1.6; }
.quiz-q-no { color: #00A896; margin-right: 2px; }
.quiz-code { margin: 12px 0 4px; background: #1e1e2e; color: #cdd6f4; border-radius: 8px;
  padding: 10px 12px; font-size: 12.5px; line-height: 1.55; overflow-x: auto; }
.quiz-opts { display: grid; gap: 8px; margin-top: 12px; }
.quiz-opt { text-align: left; cursor: pointer; border: 1px solid #d8e0ea; background: #fff;
  border-radius: 8px; padding: 8px 12px; font-size: 13.5px; color: #22364f; transition: all .12s; }
.quiz-opt:hover { border-color: #00A896; }
.quiz-opt.correct { background: #e6f6ec; border-color: #2fa86a; color: #1f7a43; font-weight: 600; }
.quiz-opt.wrong { background: #fdeaea; border-color: #d96a63; color: #b3362f; }
.quiz-opt-key { font-weight: 700; margin-right: 4px; }
.quiz-feedback { margin-top: 12px; padding: 8px 12px; border-radius: 8px; font-size: 13px; line-height: 1.6; }
.quiz-feedback.ok { background: #e6f6ec; color: #1f7a43; }
.quiz-feedback.no { background: #fdeaea; color: #b3362f; }
.quiz-exp { color: #55677d; }
.quiz-foot { margin-top: 14px; text-align: right; }
.quiz-foot button { cursor: pointer; border: none; background: #1A3A63; color: #fff;
  border-radius: 8px; padding: 9px 22px; font-size: 14px; font-weight: 600; transition: all .15s; }
.quiz-foot button:hover:not(:disabled) { background: #00A896; }
.quiz-foot button:disabled { opacity: .45; cursor: not-allowed; }
.quiz-result { text-align: center; padding: 26px 10px; }
.quiz-result-score { font-size: 40px; font-weight: 800; color: #1A3A63; line-height: 1.2; }
.quiz-result-pct { margin-top: 6px; font-size: 15px; color: #00A896; font-weight: 600; }
.quiz-result-best { margin-top: 8px; font-size: 13px; color: #66788f; }
.quiz-empty { color: #66788f; font-size: 14px; padding: 12px 0; }

/* ---------- 打印优化 ---------- */
@media print {
  .site-header, .sidebar, .toc-side, .page-nav, .site-footer, #backTop,
  #toast, #readingBar, .chapter-actions, .quiz-section, .code-actions,
  .search-results, .side-toggle, .nav-search, .nav-links { display: none !important; }
  body { background: #fff !important; }
  .page-wrap, .content, .article { max-width: 100% !important; margin: 0 !important; padding: 0 !important; }
  .content { box-shadow: none !important; border: none !important; }
  .code-box { break-inside: avoid; page-break-inside: avoid; }
  .code-box pre { background: #fff !important; color: #111 !important;
    border: 1px solid #ccc; }
  .code-box .code-head { background: #f0f0f0 !important; color: #222 !important; }
  .code-lang { color: #333 !important; }
  a { color: #000 !important; text-decoration: underline; }
  .md-table, pre, blockquote { break-inside: avoid; page-break-inside: avoid; }
}

/* ============================================================
   [优化 v2] 正式风格 GESP 板块 / CSP-S 栏目 / 内容增强标签
   ============================================================ */

/* ---------- 正式风格 GESP 板块 ---------- */
.gesp-panel { background:#fff; border:1px solid #e8ecf2; border-radius:16px;
  padding:24px 26px; margin:18px 0 26px; box-shadow:0 2px 10px rgba(26,58,99,.05); }
.gesp-panel h3 { font-size:18px; color:#1A3A63; margin:0 0 6px; }
.gesp-panel .gesp-sub { font-size:13px; color:#66788f; margin:0 0 16px; }
.gesp-intro { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:14px; margin-bottom:18px; }
.gesp-intro-card { background:linear-gradient(135deg,#f0fdfa,#eef7ff); border:1px solid #d5ece6;
  border-radius:12px; padding:16px 18px; }
.gesp-intro-card h4 { font-size:15px; color:#0d8f80; margin:0 0 8px; }
.gesp-intro-card ul { margin:0; padding-left:18px; }
.gesp-intro-card li { font-size:13.5px; color:#3c4f63; margin:4px 0; line-height:1.6; }
.gesp-intro-card li b { color:#1A3A63; }
.gesp-entry { display:inline-block; margin-top:8px; background:linear-gradient(135deg,#00A896,#0d8f80);
  color:#fff; padding:10px 22px; border-radius:10px; font-weight:700; font-size:14px;
  transition:transform .15s, box-shadow .15s; }
.gesp-entry:hover { transform:translateY(-2px); box-shadow:0 8px 18px rgba(0,168,150,.35);
  color:#fff; text-decoration:none; }

/* ---------- CSP-S 卡片 / 徽章 / 路线 D ---------- */
.level-card.csps::before { background:linear-gradient(90deg,#6C5CE7,#a29bfe); }
.level-card.csps .lv-tag { background:linear-gradient(135deg,#6C5CE7,#5a4bd4); }
.route-item h3 .tag.tag-d { background:#f3f0ff; color:#5a4bd4; border-color:#d5ccf7; }
.lvl-csps { background:#f0edff; color:#5a4bd4; border:1px solid #d5ccf7; }

/* ---------- 内容增强小标签：形象理解 / 易错点 / 考级视角 ---------- */
/* ---------- 内容增强小标签：形象理解 / 易错点 / 考级视角（v4 统一设计） ---------- */
.tip-block { position:relative; border-radius:12px; padding:13px 16px 13px 18px;
  margin:12px 0; font-size:13.5px; line-height:1.7; }
.tip-block::before { content:""; position:absolute; left:0; top:8px; bottom:8px;
  width:4px; border-radius:4px; }
.tip-block .tip-tag { display:inline-block; font-weight:800; font-size:12px;
  padding:3px 14px; border-radius:999px; margin-right:8px; color:#fff;
  letter-spacing:.5px; vertical-align:2px; box-shadow:0 1px 4px rgba(0,0,0,.08); }
.tip-block code { background:rgba(0,0,0,.06); border-radius:5px; padding:1px 5px;
  font-family:Consolas, monospace; font-size:12.5px; }
.tip-visual { background:linear-gradient(180deg,#f0fdfa,#f8fffd); border:1px solid #b9ecd9; }
.tip-visual::before { background:linear-gradient(180deg,#00c9a8,#00A896); }
.tip-visual .tip-tag { background:linear-gradient(135deg,#00c9a8,#0d8f80); }
.tip-pitfall { background:linear-gradient(180deg,#fff7ed,#fffdf8); border:1px solid #fadcb9; }
.tip-pitfall::before { background:linear-gradient(180deg,#ffb35c,#FF8C00); }
.tip-pitfall .tip-tag { background:linear-gradient(135deg,#ffa540,#e07b00); }
.tip-exam { background:linear-gradient(180deg,#f5f2ff,#fbfaff); border:1px solid #d8cdf7; }
.tip-exam::before { background:linear-gradient(180deg,#8f7ff0,#6C5CE7); }
.tip-exam .tip-tag { background:linear-gradient(135deg,#8f7ff0,#5a4bd4); }

/* ============================================================
   [优化 v2.1] GESP 面板表格化：层级优化 / 表格增强 / 响应式滚动
   ============================================================ */

/* 面板主标题加大加粗，副标题降级浅灰 */
.gesp-panel h3 { font-size:22px; font-weight:800; color:#0f2c52; margin:0 0 4px; letter-spacing:.3px; }
.gesp-panel .gesp-sub { font-size:13px; color:#8a9bb0; margin:0 0 18px; }
.gesp-panel .gesp-table-title { font-size:15.5px; font-weight:700; color:#1A3A63;
  margin:20px 0 8px; padding-left:10px; border-left:4px solid #00A896; }

/* 表格外层滚动容器：移动端横向滚动 */
.table-wrap { width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch;
  border-radius:12px; margin:0 0 6px; }

/* 表格增强：渐变表头 / 圆角 / 斑马纹 / hover / 充足内边距 */
.info-table { width:100%; min-width:640px; border-collapse:separate; border-spacing:0;
  border:1px solid #dde6f0; border-radius:12px; overflow:hidden;
  margin:6px 0 14px; background:#fff; font-size:13.5px; }
.info-table th { background:linear-gradient(135deg,#002B5C,#0d3d78); color:#fff;
  text-align:left; padding:11px 14px; font-weight:700; font-size:14px; letter-spacing:.3px; }
.info-table td { padding:10px 14px; border-top:1px solid #e8eef5; color:#33475c; line-height:1.6; }
.info-table tbody tr:nth-child(even) { background:#f6f9fc; }
.info-table tbody tr:hover { background:#eaf4f9; }
.info-table a { color:#00A896; text-decoration:none; font-weight:600; }
.info-table a:hover { text-decoration:underline; }

/* 备注文字加深，保证对比度 */
.gesp-note { font-size:12.5px; color:#5f7186; margin:10px 0 0; line-height:1.6; }

/* ============================================================
   GESP 历年真题区块（CCF 官方真题）
   ============================================================ */
.gesp-zhenti-section { margin-top: 34px; border-top: 2px dashed #d8e2ea; padding-top: 8px; }
.zq-head { display:flex; align-items:baseline; gap:12px; flex-wrap:wrap; margin-bottom:4px; }
.zq-head .quiz-title { font-size:19px; font-weight:800; color:#002B5C; }
.zq-note { font-size:12.5px; color:#5f7186; }
.zq-paper { background:#fbfdff; border:1px solid #e2ecf3; border-radius:12px; padding:16px 18px; margin:14px 0; }
.zq-paper-title { font-size:15.5px; font-weight:700; color:#00406b; margin-bottom:8px; }
.zq-block-title { font-size:14px; font-weight:700; color:#00A896; margin:12px 0 8px; }
.zq-tag { display:inline-block; background:#eaf4f9; color:#00406b; border:1px solid #cfe3ee;
  font-size:11.5px; font-weight:700; border-radius:999px; padding:1px 10px; margin-bottom:6px; }
.zq-program { background:#f6fafe; border:1px solid #dfe9f2; border-left:4px solid #00A896;
  border-radius:10px; padding:12px 14px; margin:12px 0; }
.zq-program-head { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:6px; }
.zq-program-title { font-size:14.5px; font-weight:700; color:#00406b; }
.zq-program-desc { font-size:13.5px; line-height:1.7; color:#263238; }
.zq-program-io { margin:6px 0; font-size:13.5px; line-height:1.7; color:#37474f; }
.zq-io { margin:4px 0; }
.zq-io-label { font-weight:700; color:#00695c; font-size:13px; margin:6px 0 2px; }
.zq-io-body { color:#37474f; }
.zq-program-samples { margin:6px 0; }
.zq-sample { margin:8px 0 8px 22px; }
.zq-sample .zq-code { margin:2px 0 8px 0; }
.zq-program-code { margin:6px 0 2px; }
.zq-program-code .zq-code { margin:2px 0 4px; }
.zq-item { padding:8px 0; border-bottom:1px dashed #e8eef3; }
.zq-item:last-child { border-bottom:none; }
.zq-stem { font-size:14.5px; line-height:1.75; color:#263238; }
.zq-no { font-weight:700; color:#002B5C; margin-right:2px; }
.zq-opts { margin:6px 0 0 22px; display:flex; flex-direction:column; gap:4px; }
.zq-opt { font-size:14px; line-height:1.65; color:#37474f; }
.zq-opt-key { font-weight:700; color:#607d8b; margin-right:2px; }
.zq-ans { margin:6px 0 0 22px; font-size:13.5px; color:#00406b; }
.zq-ans-tag { display:inline-block; background:#00A896; color:#fff; font-size:12px; font-weight:700; border-radius:4px; padding:1px 8px; margin-right:6px; }
.zq-foot { font-size:12px; color:#8a99a8; margin-top:10px; }
.zq-stem-text { margin: 2px 0; }
.zq-code { margin: 8px 0 8px 22px; }
.zq-code .code-box { margin: 6px 0; border-radius: 10px; }
.zq-code .code-box pre { padding: 12px 0; }
.zq-code .code-box code { font-size: 13px; }
.zq-opt-body { white-space:pre-wrap; }
.zq-answers { margin:14px 0 4px; background:#eef9f7; border:1px solid #bfe9e2; border-radius:10px; padding:12px 14px; }
.zq-answers-title { font-size:14px; font-weight:800; color:#00695c; margin-bottom:8px; }
.zq-answers-body { display:flex; flex-wrap:wrap; gap:6px 14px; }
.zq-ans-item { font-size:13.5px; color:#263238; white-space:nowrap; }
.zq-ans-item b { color:#00695c; }
.zq-ans-type { display:inline-block; background:#00A896; color:#fff; font-size:11.5px; font-weight:700; border-radius:4px; padding:0 6px; margin-right:5px; }

/* ===== CSP-J 专题（cspj.html / cspj-zhenti.js）===== */
.cspj-entry { display:inline-block; margin-top:10px; padding:9px 18px; border-radius:8px;
  background:linear-gradient(135deg,#FF8C00,#e07b00); color:#fff; font-size:14px; font-weight:700;
  text-decoration:none; transition:transform .2s,box-shadow .2s; }
.cspj-entry:hover { transform:translateY(-2px); box-shadow:0 8px 18px rgba(255,140,0,.35); }
.lvl-orange { background:#fff3e0; color:#b45309; border:1px solid #ffd9a3; }
.cspj-filter { display:flex; gap:8px; flex-wrap:wrap; margin:10px 0 14px; }
.cspj-filter-btn { border:1px solid #d8e0ea; background:#f6f9fc; color:#234; font-size:13px;
  padding:5px 16px; border-radius:999px; cursor:pointer; transition:all .2s; }
.cspj-filter-btn:hover { border-color:#FF8C00; color:#e07b00; }
.cspj-filter-btn.active { background:linear-gradient(135deg,#FF8C00,#e07b00); color:#fff; border-color:#e07b00; }
.zq-ans-item { background:#fff; border:1px solid #e6f2ee; border-radius:8px; padding:6px 10px; min-width:120px; }
.zq-ans-detail { font-size:12px; color:#335; margin-top:3px; line-height:1.6; font-weight:400; }
.zq-ans-topic { display:inline-block; margin-left:6px; background:#fff3e0; color:#b45309;
  border-radius:6px; padding:1px 7px; font-size:11.5px; }
.quiz-empty { color:#8a99a8; font-size:13.5px; padding:8px 0; }

/* ===== 【性能优化】级别切换器 / 懒加载占位 / 展开全部 ===== */
/* 【可用性修复·仅样式】顶部固定导航 .site-header（position:fixed，高 63px，z-index:100）会遮挡滚动到
   视口顶部的元素与锚点跳转落点。此处统一预留 80px 顶部安全距离：
   1) html 的 scroll-padding-top 修正锚点/hash 跳转与 scrollIntoView 的落点；
   2) .lvl-switch 的 scroll-margin-top 避免自身被精确定位到顶部；
   3) .lvl-switch 的 sticky top 由 0 调整为 70px，使切换器吸附时停在导航栏下方而非其背后，
      保证按钮始终可点击。不涉及结构与数据改动。 */
html { scroll-padding-top:80px; }
.lvl-switch { display:flex; align-items:center; gap:8px; flex-wrap:wrap; position:sticky; top:70px; z-index:5;
  margin:18px 0 10px; padding:10px 14px; background:rgba(255,255,255,.94); backdrop-filter:blur(6px);
  border:1px solid #dfe9f2; border-radius:10px; box-shadow:0 2px 10px rgba(0,43,92,.05);
  scroll-margin-top:80px; }
.lvl-switch-title { font-size:13.5px; font-weight:800; color:#002B5C; margin-right:2px; }
.lvl-switch-btn { border:1px solid #d8e0ea; background:#f6f9fc; color:#234; font-size:13px; font-weight:700;
  padding:5px 16px; border-radius:999px; cursor:pointer; transition:all .2s; }
.lvl-switch-btn:hover { border-color:#00A896; color:#00857a; }
.lvl-switch-btn.active { background:linear-gradient(135deg,#00A896,#00857a); color:#fff; border-color:#00857a; }
.lvl-switch-note { font-size:12px; color:#8a99a8; margin-left:auto; }
.zq-lazy { border:1px dashed #cfe3ee; background:#f8fcff; border-radius:12px; padding:16px 18px; }
.zq-lazy-inline { padding:10px 14px; font-size:13.5px; color:#5f7186; }
.zq-lazy-tip { font-size:13.5px; line-height:1.8; color:#37474f; margin-bottom:10px; }
.zq-lazy-tip b { color:#00406b; }
.zq-lazy-btn { border:none; border-radius:8px; padding:9px 18px; cursor:pointer; color:#fff; font-size:13.5px;
  font-weight:700; background:linear-gradient(135deg,#00A896,#00857a); transition:transform .2s,box-shadow .2s; }
.zq-lazy-btn:hover:not(:disabled) { transform:translateY(-2px); box-shadow:0 8px 18px rgba(0,168,150,.3); }
.zq-lazy-btn:disabled { opacity:.65; cursor:default; }
.zq-more { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin:14px 0 4px;
  padding:12px 14px; background:#f6f9fc; border:1px dashed #dfe9f2; border-radius:10px; }
.zq-more-tip { font-size:12.5px; color:#5f7186; }
.zq-more-btn { border:none; border-radius:8px; padding:8px 16px; cursor:pointer; color:#fff;
  font-size:13px; font-weight:700; background:linear-gradient(135deg,#4a7dff,#2f6fe4); transition:transform .2s,box-shadow .2s; }
.zq-more-btn:hover { transform:translateY(-2px); box-shadow:0 8px 18px rgba(74,125,255,.3); }


/* ============ 知识点延伸阅读与参考 ============ */
.kb-ref {
  margin: 14px 0 4px; padding: 10px 14px 10px 14px;
  background: linear-gradient(90deg, #f2f7ff, #f8fbff);
  border-left: 4px solid #4a7dff; border-radius: 0 10px 10px 0;
  font-size: 13.5px; line-height: 1.8; color: #33415c;
}
.kb-ref a { color: #2f6fe4; text-decoration: none; border-bottom: 1px dashed #9db8ec; }
.kb-ref a:hover { color: #1b4fbd; border-bottom-style: solid; }
.kb-ref code { background: #e8eefb; padding: 1px 6px; border-radius: 5px; font-size: 12.5px; }


/* ============================================================
   [知识点区块设计系统 v4] 前导徽章 / 卡片列表 / 统一排版
   ============================================================ */
.article .kb-lead { display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  margin:18px 0 8px; font-weight:800; color:#1A3A63; font-size:14px; line-height:1.6; }
.article .kb-lead > strong { display:inline-flex; align-items:center; padding:5px 16px;
  border-radius:999px; color:#fff; font-size:13px; font-weight:800;
  letter-spacing:1.5px; box-shadow:0 2px 6px rgba(26,58,99,.12); }
.article .kb-lead.kb-overview > strong { background:linear-gradient(135deg,#4a7dff,#2f6fe4); }
.article .kb-lead.kb-goal > strong { background:linear-gradient(135deg,#00b4a0,#0d8f80); }
.article .kb-lead.kb-core > strong { background:linear-gradient(135deg,#00A896,#0b8a78); }
.article .kb-lead.kb-mistake > strong { background:linear-gradient(135deg,#FF8C00,#e07b00); }
.article .kb-lead.kb-page > strong { background:linear-gradient(135deg,#64748b,#475569); }
.article .kb-lead-sub { font-weight:700; color:#23506e; }
.article ul.kb-list, .article ol.kb-ol { list-style:none; display:grid; gap:10px;
  margin:10px 0 14px; padding:0; }
.article ul.kb-list li, .article ol.kb-ol li { position:relative; background:#fff;
  border:1px solid #e6edf5; border-radius:12px; padding:12px 16px 12px 46px;
  box-shadow:0 1px 4px rgba(26,58,99,.06); line-height:1.75; color:#33475c;
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.article ul.kb-list li:hover, .article ol.kb-ol li:hover { transform:translateY(-2px);
  box-shadow:0 5px 14px rgba(26,58,99,.10); border-color:#bcd9e8; }
.article ul.kb-list li { border-left:3px solid #00A896; }
.article ul.kb-list li::before { content:""; position:absolute; left:15px; top:17px;
  width:16px; height:16px; border-radius:50%;
  background:radial-gradient(circle at 30% 30%, #00c9a8, #0d8f80); }
.article ol.kb-ol { counter-reset:kb-mistake; }
.article ol.kb-ol li { border-left:3px solid #FF8C00; counter-increment:kb-mistake; }
.article ol.kb-ol li::before { content:counter(kb-mistake); position:absolute; left:11px; top:12px;
  width:24px; height:24px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg,#ffa540,#e07b00); color:#fff; font-size:13px; font-weight:800; }
.article ul.kb-list li code, .article ol.kb-ol li code { background:#eef4fb; color:#1d4ed8;
  border-radius:5px; padding:1px 6px; font-family:Consolas, monospace; font-size:12.5px; }
.article ul.kb-list li strong, .article ol.kb-ol li strong { color:#1A3A63; font-weight:800; }
table.kb-table { margin:10px 0 14px; }
table.kb-table td:first-child { font-weight:700; color:#1A3A63; }


/* ============ 真题作答交互（zhenti-quiz.js） ============ */
.zq-item .zq-clickable { cursor: pointer; transition: background-color .15s ease, box-shadow .15s ease; }
.zq-item .zq-opt.selected { background: #e8f1ff; box-shadow: inset 3px 0 0 #1A3A63; }
.zq-item .zq-opt.correct { background: #e7f6ec; box-shadow: inset 3px 0 0 #1e8e3e; }
.zq-item .zq-opt.correct .zq-opt-key { color: #1e8e3e; font-weight: 700; }
.zq-item .zq-opt.wrong { background: #fdeeee; box-shadow: inset 3px 0 0 #c5221f; }
.zq-item .zq-opt.wrong .zq-opt-key { color: #c5221f; font-weight: 700; }
.zq-judge-btns { margin: 6px 0 4px; display: flex; gap: 8px; }
.zq-judge-btn { padding: 4px 18px; border: 1px solid #b8c4d8; border-radius: 6px; background: #fff; color: #1A3A63; cursor: pointer; font-size: 14px; }
.zq-judge-btn:hover { border-color: #1A3A63; }
.zq-judge-btn.selected { background: #e8f1ff; border-color: #1A3A63; box-shadow: inset 0 0 0 1px #1A3A63; }
.zq-judge-btn.correct { background: #e7f6ec; border-color: #1e8e3e; color: #1e8e3e; font-weight: 700; }
.zq-judge-btn.wrong { background: #fdeeee; border-color: #c5221f; color: #c5221f; font-weight: 700; }
.zq-submit { margin: 8px 0 4px; padding: 5px 22px; border: none; border-radius: 6px; background: #1A3A63; color: #fff; cursor: pointer; font-size: 14px; }
.zq-submit:hover:not(:disabled) { background: #2b4f85; }
.zq-submit:disabled { opacity: .55; cursor: default; }
.zq-submit-hint { background: #b7791f; }
.zq-feedback { margin: 8px 0 2px; padding: 8px 12px; border-radius: 6px; font-size: 14px; line-height: 1.6; }
.zq-feedback.ok { background: #e7f6ec; border-left: 3px solid #1e8e3e; color: #14532d; }
.zq-feedback.no { background: #fdeeee; border-left: 3px solid #c5221f; color: #7f1d1d; }
.zq-feedback .zq-fb-status { font-weight: 700; display: block; margin-bottom: 2px; }
.zq-feedback .zq-exp { display: block; margin-top: 2px; color: inherit; }
.zq-feedback .zq-topic { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 10px; background: rgba(26,58,99,.08); color: #1A3A63; font-size: 12px; }


/* ===== GESP 知识点直达导航区 ===== */
.gesp-quicknav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 18px 0 26px; max-width: 100%; min-width: 0; }
.gesp-quicknav .qn-item { min-width: 0; }
@media (max-width: 1180px) { .gesp-quicknav { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .gesp-quicknav { grid-template-columns: 1fr; } }
.gesp-quicknav .qn-item {
  border: 1px solid #dce5f0;
  border-radius: 14px;
  padding: 16px 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fd 100%);
  box-shadow: 0 2px 6px rgba(26, 58, 99, .06);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.gesp-quicknav .qn-item:hover {
  box-shadow: 0 6px 16px rgba(26, 58, 99, .10);
  border-color: #b9cfe6;
  transform: translateY(-2px);
}
.gesp-quicknav .qn-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #d0dceb;
}
.gesp-quicknav .qn-head b {
  color: #1A3A63;
  font-size: 15px;
  letter-spacing: .3px;
  position: relative;
  padding-left: 12px;
}
.gesp-quicknav .qn-head b::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: #00A896;
}
.gesp-quicknav .qn-anchor { display: flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 12px; }
.gesp-quicknav .qn-anchor a {
  color: #00A896;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid #a5e3d6;
  background: #eefbf8;
  border-radius: 999px;
  padding: 2px 10px;
  transition: background .15s, color .15s, border-color .15s;
}
.gesp-quicknav .qn-anchor a:hover { background: #00A896; color: #fff; border-color: #00A896; }
.gesp-quicknav .qn-links { display: flex; flex-wrap: wrap; gap: 8px; }
.gesp-quicknav .qn-links a {
  font-size: 13px;
  line-height: 1.5;
  color: #005a9c;
  background: #ffffff;
  border: 1px solid #d6e2f0;
  border-radius: 8px;
  padding: 5px 12px;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.gesp-quicknav .qn-links a:hover { background: #00A896; color: #fff; border-color: #00A896; }
/* 表格内章节直达链接 */
.info-table a { color: #005a9c; font-weight: 600; text-decoration: none; border-bottom: 1px dashed #9db8d6; }
.info-table a:hover { color: #00A896; border-bottom-color: #00A896; }

/* ============================================================
   本章小结组件（chapter-summary.js）
   ============================================================ */
.summary-box {
  margin: 22px 0 6px; padding: 16px 18px 14px;
  border: 1px solid #cfe3f5; border-left: 5px solid #1A3A63;
  border-radius: 12px;
  background: linear-gradient(180deg, #f7fbff 0%, #fdfefe 100%);
  box-shadow: 0 2px 8px rgba(26, 58, 99, .05);
}
.summary-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.summary-icon { font-size: 17px; line-height: 1; }
.summary-title { font-size: 15px; font-weight: 800; color: #1A3A63; letter-spacing: .3px; }
.summary-toggle {
  margin-left: auto; cursor: pointer; border: 1px solid #cfd8e3; background: #fff;
  color: #1A3A63; border-radius: 999px; padding: 3px 13px; font-size: 12px;
  font-weight: 600; transition: all .15s;
}
.summary-toggle:hover { border-color: #1A3A63; background: #1A3A63; color: #fff; }
.summary-points { margin: 0; padding-left: 22px; }
.summary-points li {
  margin: 7px 0; font-size: 13.8px; line-height: 1.78; color: #374151;
}
.summary-points li::marker { color: #1A3A63; font-weight: 700; }
.summary-points code {
  background: rgba(26, 58, 99, .07); color: #1A3A63;
  border-radius: 4px; padding: 1px 5px;
  font-family: Consolas, "Courier New", monospace; font-size: 12.5px;
}
.summary-points b { color: #1A3A63; }
.summary-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 13px; padding-top: 11px;
  border-top: 1px dashed #dfe8f2; flex-wrap: wrap;
}
.summary-check {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; color: #374151; cursor: pointer; user-select: none;
  font-weight: 600;
}
.summary-check input { width: 15px; height: 15px; cursor: pointer; accent-color: #00A896; }
.summary-hint { font-size: 12px; color: #8a94a3; }
/* 已掌握状态 */
.summary-box.is-mastered {
  border-left-color: #00A896;
  background: linear-gradient(180deg, #f2fdfa 0%, #fbfefd 100%);
}
.summary-box.is-mastered .summary-title { color: #00806f; }
.summary-box.is-mastered .summary-check { color: #00806f; }

/* 移动端 */
@media (max-width: 620px) {
  .summary-box { padding: 14px 14px 12px; }
  .summary-points li { font-size: 13.2px; }
  .summary-foot { flex-direction: column; align-items: flex-start; gap: 7px; }
}

/* ============================================================
   首页 · 学习分流（v3 精修版）
   设计原则：扁平无阴影、细边框、靠留白与色标建立层次；
           文字压缩到最少，知识点用圆角徽章代替长串箭头。
   ============================================================ */
.start-guide { margin: 34px 0 12px; }

.sg-title2 {
  font-size: 21px; color: #1f2937; margin: 0 0 5px;
  font-weight: 700; letter-spacing: -.01em;
}
.sg-sub2 { margin: 0 0 18px; font-size: 13.5px; color: #6b7280; }

.sg-grid2 {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(228px, 1fr));
}

.sg-card2 {
  position: relative;
  display: flex; flex-direction: column;
  padding: 18px 18px 16px;
  background: #fff;
  border: 1px solid #e8ecf2;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none; color: inherit;
  transition: border-color .16s ease, transform .16s ease;
}
/* 顶部 2px 色标 */
.sg-card2::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0;
  height: 2px; background: var(--c, #1A3A63);
}
.sg-card2:hover {
  border-color: var(--c, #1A3A63);
  transform: translateY(-2px);
  text-decoration: none;
}

/* 图标 */
.sg-ic2 {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--c, #1A3A63);
  background: #f4f7fb;
  margin-bottom: 13px;
}
.sg-gesp .sg-ic2 { background: #e9f1fb; }
.sg-cspj .sg-ic2 { background: #e5f6f1; }
.sg-csps .sg-ic2 { background: #f0edfd; }
.sg-noip .sg-ic2 { background: #fdf1e2; }

/* 标题与副标 */
.sg-name2 {
  font-size: 16.5px; font-weight: 700; color: #111827;
  line-height: 1.3; margin-bottom: 3px; letter-spacing: -.01em;
}
.sg-tag2 {
  font-size: 11.5px; color: #98a2b3; line-height: 1.5;
  margin-bottom: 14px;
}

/* 知识徽章 */
.sg-pills { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; }
.sg-pill {
  display: inline-block; font-size: 11.5px; line-height: 1.5;
  padding: 3px 10px; border-radius: 999px;
  background: #f6f8fa; border: 1px solid #eaeef3;
  color: #5b6472; white-space: nowrap;
}
.sg-card2:hover .sg-pill {
  border-color: #dde3ec; background: #f2f5f9;
}

/* 底部入口 */
.sg-go2 {
  display: flex; align-items: center; gap: 5px;
  margin-top: auto; padding-top: 13px;
  border-top: 1px solid #f0f3f7;
  font-size: 12.5px; font-weight: 700;
  color: var(--c, #1A3A63);
}
.sg-go2 i { font-style: normal; transition: transform .16s ease; }
.sg-card2:hover .sg-go2 i { transform: translateX(3px); }

/* 兜底 */
.sg-foot2 {
  margin: 16px 0 0; padding: 11px 16px;
  font-size: 12.5px; color: #6b7280; text-align: center;
  background: #f8fafc; border-radius: 9px;
}
.sg-foot2 a { color: #1f2937; font-weight: 700; text-decoration: underline; }

@media (max-width: 880px) { .sg-grid2 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .sg-title2 { font-size: 18px; }
  .sg-grid2 { grid-template-columns: 1fr; gap: 10px; }
  .sg-card2 { padding: 16px 16px 14px; }
}

/* ============================================================
   v3.1 · 响应式加固（修复窄屏导航挤压 + 防横向溢出）
   ============================================================ */

/* ---- 全局防溢出：任何元素都不允许把页面撑出横向滚动条 ---- */
/* 用 clip 而非 hidden：hidden 会成为滚动容器，使子元素的 position:sticky 失效 */
html, body { overflow-x: clip; max-width: 100%; }

/* ---- 中间断点：1180-900px 区间导航会拥挤，逐级降级 ---- */
@media (max-width: 1180px) {
  .nav-links { gap: 2px; margin-left: 12px; }
  .nav-links a { padding: 6px 9px; font-size: 13.5px; }
  .nav-search input { width: 132px; }
}
@media (max-width: 1120px) {
  /* 空间不足时搜索框先让位（搜索功能在侧栏抽屉内仍可用） */
  .nav-search { display: none; }
  .nav-links { margin-left: auto; }
}
@media (max-width: 1000px) {
  /* 再窄则连 logo 文字一起收，只留图标 */
  .nav-logo .nav-logo-text { display: none; }
}

/* ---- 900px 以下：侧栏抽屉化（原有规则保留，这里补防挤压） ---- */
@media (max-width: 900px) {
  .navbar { gap: 8px; padding: 8px 14px; }
  .nav-links { display: none; }
  .side-toggle { flex-shrink: 0; }
  .nav-logo { min-width: 0; overflow: hidden; }
  /* 正文与卡片统一不出横向滚动 */
  .content, .article, .main-content { max-width: 100%; overflow-wrap: break-word; }
  /* 表格独立横向滚动，不撑破页面 */
  .table-wrap {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    max-width: 100%; border-radius: 8px;
  }
  .table-wrap table { min-width: 560px; }
  .info-table th, .info-table td { padding: 8px 10px; font-size: 13px; }
}

/* ---- 620px 以下：紧凑模式 ---- */
@media (max-width: 620px) {
  .navbar { padding: 8px 12px; min-height: 56px; }
  .nav-logo .nav-logo-img { height: 28px; }
  .hero { padding: 26px 18px; }
  .hero h1 { font-size: 22px; }
  .page-wrap { padding: 0 12px 28px; margin-top: 70px; }
  .content { padding: 18px 14px; }
  .sg-grid2, .auto-toc-body, .quiz-opts { grid-template-columns: 1fr; }
  .sg-card2 { padding: 15px 15px 13px; }
  /* 长英文/代码串允许断行，避免撑破 */
  .article pre, .code-box pre { overflow-x: auto; font-size: 12.5px; }
  .article p, .article li { overflow-wrap: break-word; word-break: normal; }
}

/* ---- 480px 以下：极窄屏（折叠屏外屏、小手机） ---- */
@media (max-width: 480px) {
  .navbar { padding: 6px 10px; min-height: 52px; }
  .nav-logo-img { height: 26px; }
  .hero h1 { font-size: 20px; }
  .hero .badges { gap: 5px; }
  .hero .badge { font-size: 11px; padding: 3px 8px; }
  .sg-name2 { font-size: 15px; }
  .content { padding: 15px 12px; }
}

/* ---- 打印样式（补全，避免打印时导航挤成一团） ---- */
@media print {
  .navbar, .sidebar, .site-footer, .auto-toc, .summary-box {
    display: none !important;
  }
  .page-wrap { margin: 0; padding: 0; display: block; }
  .content, .article { max-width: 100%; padding: 0; }
}

/* ============================================================
   v3.2 · 吸顶修复补丁
   背景：v3.1 为防横向溢出加的 overflow-x:hidden 会让祖先成为滚动容器，
        导致 .sidebar / .toc-side 的 position:sticky 失效（左侧导航跟着正文跑）。
        已改用 overflow-x:clip（不创建滚动容器，sticky 正常）。
        以下为老浏览器兜底：不支持 clip 时退回 hidden，
        此时改用 JS 监听滚动手动固定侧栏，保证体验一致。
   ============================================================ */
@supports not (overflow-x: clip) {
  html, body { overflow-x: hidden; }
}

/* JS 兜底接管时的样式微调 */
.js-sticky-active { box-shadow: 0 6px 20px rgba(26, 58, 99, .12); }

/* ============================================================
   页内自动目录（page-toc.v2.js）—— v4 重制版
   设计：标题栏带色条 + 节数徽标 + 纯图标折叠按钮；
        目录项为横向胶囊标签流，比网格列表更紧凑整齐。
   ============================================================ */
.auto-toc {
  margin: 20px 0 26px;
  border: 1px solid #e8ecf2;
  border-radius: 12px;
  background: #fbfcfe;
  overflow: hidden;
}
.auto-toc-head {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 16px;
  border-bottom: 1px solid #eef1f6;
  background: #fff;
}
/* 标题左侧橙色色条，与全站 section-title 呼应 */
.auto-toc-bar {
  width: 3px; height: 15px; border-radius: 2px;
  background: linear-gradient(180deg, #FF8C00, #FFB35C);
  flex-shrink: 0;
}
.auto-toc-title {
  font-size: 14px; font-weight: 700; color: #1A3A63; letter-spacing: .2px;
}
.auto-toc-count {
  font-size: 11.5px; color: #98a2b3;
  background: #f1f4f8; border-radius: 999px; padding: 2px 9px;
}
/* 折叠按钮：纯图标圆钮 */
.auto-toc-toggle {
  margin-left: auto;
  width: 26px; height: 26px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #e0e6ee; background: #fff;
  border-radius: 7px; cursor: pointer; color: #64748b;
  transition: all .15s ease;
}
.auto-toc-toggle:hover { border-color: #1A3A63; color: #1A3A63; background: #f4f8fc; }
.auto-toc-toggle .atc-ico-close { display: none; }
.auto-toc.is-folded .auto-toc-toggle { background: #1A3A63; border-color: #1A3A63; color: #fff; }
.auto-toc.is-folded .auto-toc-toggle .atc-ico-close { display: block; }
.auto-toc.is-folded .auto-toc-toggle .atc-ico-open  { display: none; }
/* 折叠时隐藏底部分隔线 */
.auto-toc.is-folded .auto-toc-head { border-bottom-color: transparent; }

/* 目录项：横向胶囊流 */
.auto-toc-body {
  display: flex; flex-wrap: wrap; gap: 7px;
  padding: 13px 16px 15px;
  max-height: 210px; overflow-y: auto;
  transition: max-height .22s ease, padding .22s ease, opacity .18s ease;
}
.auto-toc.is-folded .auto-toc-body {
  max-height: 0; padding-top: 0; padding-bottom: 0;
  opacity: 0; overflow: hidden;
}
.auto-toc-body a {
  display: inline-flex; align-items: center;
  font-size: 12.5px; line-height: 1.5;
  padding: 5px 12px; border-radius: 999px;
  background: #fff; border: 1px solid #e6eaf0;
  color: #5b6472; text-decoration: none;
  transition: all .15s ease;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.auto-toc-body a:hover {
  border-color: #1A3A63; color: #1A3A63; background: #f2f7fc;
}
/* 当前所在小节：实心高亮 */
.auto-toc-body a.active {
  background: #1A3A63; border-color: #1A3A63; color: #fff; font-weight: 600;
  box-shadow: 0 2px 7px rgba(26, 58, 99, .22);
}
/* 滚动条：细，不抢视觉 */
.auto-toc-body::-webkit-scrollbar { width: 5px; height: 5px; }
.auto-toc-body::-webkit-scrollbar-track { background: transparent; }
.auto-toc-body::-webkit-scrollbar-thumb { background: #d8dee7; border-radius: 3px; }

@media (max-width: 620px) {
  .auto-toc { margin: 16px 0 20px; }
  .auto-toc-head { padding: 10px 13px; }
  .auto-toc-body { padding: 11px 13px 13px; gap: 6px; max-height: 180px; }
  .auto-toc-body a { font-size: 12px; padding: 4px 10px; }
  .auto-toc-title { font-size: 13px; }
}

/* ============================================================
   能力自测表交互（selftest.v2.js）—— v4 补回
   （v3 清理旧样式时误删，此处完整恢复并优化）
   ============================================================ */
.selftest-row { display: flex; gap: 5px; flex-wrap: wrap; }
.st-btn {
  cursor: pointer; border: 1px solid #dbe2ea; background: #fff;
  color: #6b7686; border-radius: 999px; padding: 4px 13px;
  font-size: 12px; font-weight: 600; transition: all .15s ease;
  white-space: nowrap; line-height: 1.6;
}
.st-btn:hover { border-color: #a8b4c4; color: #3d4757; }
.st-btn.st-ok.on  { background: #00A896; border-color: #00A896; color: #fff;
                   box-shadow: 0 2px 7px rgba(0, 168, 150, .28); }
.st-btn.st-ref.on { background: #FF8C00; border-color: #FF8C00; color: #fff;
                   box-shadow: 0 2px 7px rgba(255, 140, 0, .26); }
.st-btn.st-no.on  { background: #7c8798; border-color: #7c8798; color: #fff; }

/* 已掌握的行：左侧色条 + 极淡底色 */
tr.st-done > td { background: rgba(0, 168, 150, .05); }
tr.st-done > td:first-child { box-shadow: inset 3px 0 0 #00A896; }
tr.st-weak > td:first-child { box-shadow: inset 3px 0 0 #cbd5e1; }

/* 进度条 */
.selftest-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 12px 0 28px; padding: 13px 16px;
  background: #f8fafc; border: 1px solid #e8ecf2; border-radius: 10px;
}
.st-bar-track {
  flex: 1 1 160px; min-width: 130px; height: 8px;
  background: #e7edf4; border-radius: 999px; overflow: hidden;
}
.st-bar-fill {
  display: block; height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, #00A896, #1A3A63);
  transition: width .35s ease;
}
.st-bar-text { font-size: 12.5px; color: #475569; font-weight: 600; }
.st-reset {
  cursor: pointer; border: 1px solid #dbe2ea; background: #fff; color: #6b7686;
  border-radius: 7px; padding: 5px 13px; font-size: 12px;
  font-weight: 600; transition: all .15s ease;
}
.st-reset:hover { border-color: #e24b4a; color: #e24b4a; background: #fef2f2; }

/* 测验主体容器（quiz.js 生成，此前漏配） */
.quiz-body { margin-top: 4px; }

/* 自动生成的底部翻页：与既有 page-nav 一致 */
.auto-page-nav { border-top: 1px dashed #e4eaf1; margin-top: 30px; }

@media (max-width: 620px) {
  .selftest-bar { gap: 9px; padding: 11px 13px; }
  .st-bar-text { font-size: 12px; }
  .st-btn { padding: 4px 11px; font-size: 11.5px; }
}

/* ============================================================
   CSP-S / NOIP 模拟真题（special-zhenti.js）
   视觉沿用站内真题区风格：扁平、细边框、克制的用色
   ============================================================ */
#specialZhentiSection { margin: 30px 0 8px; }

.zq-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  padding: 14px 18px; border-radius: 12px 12px 0 0;
  background: linear-gradient(135deg, #1A3A63, #24507f);
  color: #fff;
}
.zq-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.zq-badge {
  font-size: 14.5px; font-weight: 700; letter-spacing: .2px;
}
.zq-sub { font-size: 11.5px; opacity: .72; }

.zq-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.zq-tab {
  cursor: pointer; border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .08); color: #fff;
  border-radius: 999px; padding: 4px 13px; font-size: 12.5px;
  font-weight: 600; transition: all .15s ease;
}
.zq-tab:hover { background: rgba(255, 255, 255, .18); }
.zq-tab.on { background: #fff; color: #1A3A63; border-color: #fff; }
.zq-tab-n { opacity: .7; font-size: 11px; }
.zq-tab.on .zq-tab-n { opacity: .65; }

.zq-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding: 9px 18px; background: #f4f7fb;
  border-bottom: 1px solid #e6ebf2;
  font-size: 12px; color: #5b6472;
}

.zq-body { padding: 20px 18px 16px; border: 1px solid #e8ecf2; border-top: none; background: #fff; }
.zq-no {
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px; font-weight: 700; color: #1A3A63; margin-bottom: 12px;
}
.zq-topic {
  font-size: 11px; font-weight: 600; color: #00806f;
  background: #e6f6f3; border-radius: 999px; padding: 2px 10px;
}
.zq-stem { font-size: 14px; line-height: 1.85; color: #26303d; margin-bottom: 16px; }
.zq-code {
  background: #f7f9fc; border: 1px solid #e6ebf2; border-left: 3px solid #1A3A63;
  border-radius: 8px; padding: 12px 14px; margin: 12px 0;
  overflow-x: auto; font-size: 12.8px; line-height: 1.65;
  font-family: Consolas, "Courier New", monospace;
  color: #26303d;
}

.zq-opts { display: grid; gap: 8px; }
.zq-opt {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 13px; border: 1px solid #e4e9f0; border-radius: 9px;
  background: #fbfcfe; cursor: pointer; transition: all .15s ease;
}
.zq-opt:hover { border-color: #1A3A63; background: #f4f8fc; }
.zq-opt-key {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #eef2f7; color: #5b6472;
  font-size: 12px; font-weight: 700;
}
.zq-opt-body { font-size: 13.5px; line-height: 1.7; color: #374151; }
.zq-opt.on { border-color: #1A3A63; background: #f0f6fc; }
.zq-opt.on .zq-opt-key { background: #1A3A63; color: #fff; }
.zq-opt.right { border-color: #00A896; background: #eefaf7; }
.zq-opt.right .zq-opt-key { background: #00A896; color: #fff; }
.zq-opt.wrong { border-color: #e24b4a; background: #fdf1f1; }
.zq-opt.wrong .zq-opt-key { background: #e24b4a; color: #fff; }

.zq-fb {
  margin-top: 15px; padding: 13px 15px; border-radius: 9px;
  font-size: 13.5px; line-height: 1.8;
}
.zq-fb.ok  { background: #eefaf7; border-left: 4px solid #00A896; color: #0a5a4a; }
.zq-fb.no  { background: #fdf1f1; border-left: 4px solid #e24b4a; color: #8f2626; }
.zq-fb.tip { background: #fff8ec; border-left: 4px solid #FF8C00; color: #8a5200; }
.zq-ans { margin-left: 10px; font-weight: 700; }
.zq-exp { margin-top: 8px; padding-top: 9px; border-top: 1px dashed rgba(0, 0, 0, .1); }

.zq-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 18px;
  border: 1px solid #e8ecf2; border-top: none;
  border-radius: 0 0 12px 12px; background: #fbfcfe;
}
.zq-foot button {
  cursor: pointer; border-radius: 8px; padding: 7px 20px;
  font-size: 13px; font-weight: 700; transition: all .15s ease;
}
.zq-prev { border: 1px solid #cfd8e3; background: #fff; color: #1A3A63; }
.zq-prev:hover { border-color: #1A3A63; background: #f4f8fc; }
.zq-next { border: 1px solid #1A3A63; background: #1A3A63; color: #fff; }
.zq-next:hover:not(:disabled) { background: #244e80; }
.zq-next:disabled { opacity: .4; cursor: not-allowed; }

.zq-result { text-align: center; padding: 40px 20px;
  border: 1px solid #e8ecf2; border-top: none; border-radius: 0 0 12px 12px; background: #fff; }
.zq-score { font-size: 38px; font-weight: 700; color: #1A3A63; }
.zq-pct { font-size: 14px; color: #6b7280; margin-top: 6px; }
.zq-grade { font-size: 14px; color: #00806f; font-weight: 600; margin-top: 10px; }
.zq-reset {
  cursor: pointer; margin-top: 20px; border: 1px solid #cfd8e3; background: #fff;
  color: #1A3A63; border-radius: 8px; padding: 7px 22px; font-size: 13px; font-weight: 700;
}
.zq-reset:hover { border-color: #1A3A63; background: #f4f8fc; }
.zq-empty { padding: 30px; text-align: center; color: #8b95a5; font-size: 13.5px; }

@media (max-width: 620px) {
  .zq-head { padding: 12px 14px; }
  .zq-body { padding: 16px 14px 13px; }
  .zq-foot { padding: 12px 14px; }
  .zq-meta { padding: 8px 14px; }
  .zq-score { font-size: 30px; }
}

/* ============================================================
   学习总览页（overview.js + overview.html）
   ============================================================ */
.ov-page { max-width: 1120px; margin: 82px auto 0; padding: 0 20px 50px; }

.ov-hero { padding: 8px 0 24px; }
.ov-hero h1 {
  font-size: 27px; color: #1A3A63; margin: 0 0 8px; font-weight: 700;
  padding-left: 14px; border-left: 5px solid #00A896;
}
.ov-hero p { margin: 0; font-size: 14px; color: #6b7280; line-height: 1.8; }
.ov-hero b { color: #FF8C00; }

/* 顶部四块统计 */
.ov-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 12px; margin-bottom: 18px; }
.ov-tile {
  padding: 17px 18px; border-radius: 12px;
  background: #fff; border: 1px solid #e8ecf2; border-top: 3px solid #1A3A63;
}
.ov-tile.teal   { border-top-color: #00A896; }
.ov-tile.amber  { border-top-color: #FF8C00; }
.ov-tile.purple { border-top-color: #6C5CE7; }
.ov-tnum { font-size: 30px; font-weight: 700; color: #1a1a1a; line-height: 1.15; }
.ov-tile.teal .ov-tnum   { color: #00806f; }
.ov-tile.amber .ov-tnum  { color: #c96a00; }
.ov-tile.purple .ov-tnum { color: #534AB7; }
.ov-tlabel { font-size: 13px; color: #374151; margin-top: 5px; font-weight: 600; }
.ov-tsub { font-size: 11.5px; color: #9aa4b2; margin-top: 2px; }

/* 总体进度 */
.ov-bar-wrap {
  background: #fff; border: 1px solid #e8ecf2; border-radius: 12px;
  padding: 16px 18px 18px; margin-bottom: 18px;
}
.ov-bar-head {
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: 13.5px; color: #374151; font-weight: 600; margin-bottom: 9px;
}
.ov-bar-head b { font-size: 21px; color: #1A3A63; font-weight: 700; }
.ov-bar { height: 11px; background: #e9eef4; border-radius: 999px; overflow: hidden; }
.ov-bar span {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #00A896, #1A3A63);
  transition: width .5s ease;
}
.ov-bar-tip { margin: 11px 0 0; font-size: 12.5px; color: #6b7280; line-height: 1.7; }

/* 双栏 */
.ov-cols { display: grid; grid-template-columns: 1fr 292px; gap: 16px; align-items: start; }
.ov-card { background: #fff; border: 1px solid #e8ecf2; border-radius: 12px; padding: 17px 18px 19px; }
.ov-card h2 {
  font-size: 16px; color: #1A3A63; margin: 0 0 14px; font-weight: 700;
  padding-bottom: 10px; border-bottom: 2px solid #eef2f7;
}

/* 分组 */
.ov-group { margin-bottom: 18px; }
.ov-group:last-child { margin-bottom: 0; }
.ov-gname {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13.5px; color: #1A3A63; font-weight: 700; margin: 0 0 9px;
}
.ov-gpct { font-size: 12px; color: #8b95a5; font-weight: 600; }
.ov-list { list-style: none; margin: 0; padding: 0; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 7px; }
.ov-row a {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; border-radius: 9px;
  background: #fbfcfe; border: 1px solid #edf1f6;
  text-decoration: none; transition: all .15s ease;
}
.ov-row a:hover { border-color: #1A3A63; background: #f4f8fc; }
.ov-row.done a { background: #f4fbfa; border-color: #d5f0ea; }
.ov-no {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  background: #eef2f7; color: #64748b;
  font-size: 11.5px; font-weight: 700; font-family: Consolas, monospace;
}
.ov-row.done .ov-no { background: #00A896; color: #fff; }
.ov-name {
  flex: 1; min-width: 0; font-size: 13px; color: #374151;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ov-marks { display: flex; gap: 3px; flex-shrink: 0; }
.ov-mk {
  font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: 700;
}
.ov-mk.l { background: #e4f7f3; color: #00806f; }
.ov-mk.m { background: #eef4fb; color: #1A3A63; }
.ov-mk.s { background: #fff2e3; color: #c96a00; }
.ov-mk.none { background: #f3f5f8; color: #a4adba; font-weight: 500; }

/* 侧栏：练习成绩 */
.ov-qs { list-style: none; margin: 0 0 16px; padding: 0; }
.ov-q { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12.5px; }
.ov-qname { flex: 0 0 62px; color: #374151; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.ov-qbar { flex: 1; height: 7px; background: #e9eef4; border-radius: 999px; overflow: hidden; }
.ov-qbar i { display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #00A896, #1A3A63); }
.ov-qscore { flex: 0 0 40px; text-align: right; color: #6b7280; font-size: 11.5px; }
.ov-q.empty { color: #a4adba; font-size: 12.5px; }

.ov-links { display: grid; gap: 6px; margin-bottom: 14px; }
.ov-links a {
  display: block; padding: 8px 12px; border-radius: 8px;
  background: #f4f8fc; border: 1px solid #e4ecf5;
  font-size: 12.5px; color: #1A3A63; text-decoration: none; transition: all .15s ease;
}
.ov-links a:hover { background: #1A3A63; color: #fff; border-color: #1A3A63; }
.ov-tip { font-size: 11.5px; color: #a4adba; line-height: 1.7; padding-top: 12px;
  border-top: 1px dashed #e6ebf2; }

/* 下一步 */
.ov-next { margin-top: 20px; }
.ov-next h2 { font-size: 17px; color: #1A3A63; margin: 0 0 12px; font-weight: 700;
  padding-left: 12px; border-left: 4px solid #FF8C00; }
.ov-next-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); gap: 12px; }
.ov-next-card {
  display: flex; flex-direction: column; gap: 3px;
  padding: 14px 16px; border-radius: 11px;
  background: #fff; border: 1px solid #e8ecf2;
  text-decoration: none; transition: all .16s ease;
}
.ov-next-card:hover { border-color: #1A3A63; transform: translateY(-2px); }
.ov-next-card b { font-size: 14px; color: #1A3A63; font-weight: 700; }
.ov-next-card span { font-size: 12px; color: #8b95a5; }

@media (max-width: 900px) {
  .ov-cols { grid-template-columns: 1fr; }
  .ov-page { margin-top: 72px; padding: 0 14px 40px; }
}
@media (max-width: 620px) {
  .ov-hero h1 { font-size: 21px; }
  .ov-stats { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .ov-tile { padding: 13px 14px; }
  .ov-tnum { font-size: 24px; }
  .ov-list { grid-template-columns: 1fr; }
}

/* ============================================================
   洛谷题单（luogu-drill.js）
   ============================================================ */
.lg-box {
  margin: 22px 0 8px; border: 1px solid #e6ebf2; border-radius: 12px;
  background: #fff; overflow: hidden;
}
.lg-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; padding: 12px 16px;
  background: linear-gradient(135deg, #00A896, #0a7d6c); color: #fff;
}
.lg-title { font-size: 14px; font-weight: 700; letter-spacing: .2px; }
.lg-more {
  font-size: 12px; color: #fff; text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .45); padding-bottom: 1px;
}
.lg-more:hover { border-bottom-color: #fff; }

.lg-list { list-style: none; margin: 0; padding: 8px; display: grid; gap: 6px; }
.lg-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px 7px 8px; border-radius: 9px;
  background: #f9fbfd; border: 1px solid #eef2f7; transition: all .15s ease;
}
.lg-item:hover { border-color: #00A896; background: #f2fbf9; }
.lg-item.done { background: #f2fbf9; border-color: #cdeae3; }
.lg-item.done .lg-link { opacity: .62; }
.lg-link { flex: 1; display: flex; align-items: center; gap: 10px;
  min-width: 0; text-decoration: none; color: inherit; }
.lg-id {
  flex-shrink: 0; font-family: Consolas, monospace; font-size: 12px; font-weight: 700;
  color: #1A3A63; background: #eaf1f8; border-radius: 5px; padding: 2px 7px;
}
.lg-item.done .lg-id { background: #00A896; color: #fff; }
.lg-tip { flex: 1; min-width: 0; font-size: 12.5px; color: #4b5563;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-lv {
  flex-shrink: 0; font-size: 10px; font-weight: 700; padding: 2px 6px;
  border-radius: 4px; background: #f0f3f7; color: #64748b;
}
.lg-lv.lv1, .lg-lv.lv2 { background: #eaf6ec; color: #3b6d11; }
.lg-lv.lv3 { background: #e6f0fb; color: #185fa5; }
.lg-lv.lv4 { background: #fdf1e2; color: #854f0b; }
.lg-lv.lv5, .lg-lv.lv6, .lg-lv.lv7 { background: #fdeaea; color: #a32d2d; }
.lg-done {
  flex-shrink: 0; cursor: pointer; border: 1px solid #dfe6ee; background: #fff;
  color: #6b7686; border-radius: 7px; padding: 4px 11px;
  font-size: 11.5px; font-weight: 600; transition: all .15s ease;
}
.lg-done:hover { border-color: #00A896; color: #00806f; background: #f2fbf9; }
.lg-item.done .lg-done { border-color: #00A896; background: #00A896; color: #fff; }
.lg-note {
  margin: 0; padding: 10px 16px 13px; border-top: 1px solid #f0f3f7;
  font-size: 11.5px; color: #9aa4b2; background: #fbfcfe;
}
@media (max-width: 620px) {
  .lg-head { padding: 10px 13px; }
  .lg-tip { font-size: 12px; }
  .lg-done { padding: 4px 9px; font-size: 11px; }
}

/* ============================================================
   首页 · GESP 级别精简入口（v8 温和版）
   原「级别对照表」8 行完整表格已移至 gesp.html，首页只留 4 行导航。
   ============================================================ */
.gesp-levels-mini { display: grid; gap: 6px; margin-top: 8px; }
.glm-row {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 13px; border-radius: 9px;
  background: #f8fafc; border: 1px solid #e8ecf2;
  text-decoration: none; transition: all .15s ease;
}
.glm-row:hover { border-color: #1A3A63; background: #f2f7fc; }
.glm-lv {
  flex-shrink: 0; font-size: 12px; font-weight: 700; color: #1A3A63;
  background: #e8f0fa; border-radius: 6px; padding: 3px 9px;
  min-width: 62px; text-align: center;
}
.glm-tx { flex: 1; min-width: 0; font-size: 13px; color: #4b5563;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.glm-tip {
  margin: 9px 0 0; font-size: 12px; color: #8b95a5; line-height: 1.65;
  padding-top: 10px; border-top: 1px dashed #e8ecf2;
}
@media (max-width: 620px) {
  .glm-row { padding: 8px 11px; gap: 9px; }
  .glm-lv { min-width: 56px; font-size: 11.5px; padding: 3px 7px; }
  .glm-tx { font-size: 12.5px; }
}

/* ============================================================
   学习路线区 v8（温和版：阶段目标 + 起点章节徽标，不再罗列全部章节）
   ============================================================ */
.route-item .rt-goal {
  margin: 4px 0 12px; font-size: 13px; line-height: 1.75; color: #5b6472;
}
.route-item .rt-goal a { color: #1A3A63; font-weight: 700; text-decoration: underline; }
.route-item .rt-goal a:hover { color: #00A896; }
.rt-steps { margin: 0; padding-left: 20px; }
.rt-steps li {
  margin: 9px 0; font-size: 13.5px; line-height: 1.8; color: #374151;
}
.rt-steps li b { color: #1A3A63; margin-right: 4px; }
.rt-steps li::marker { color: #1A3A63; font-weight: 700; }
/* 章节徽标：小圆角块，点击直达 */
.rt-ch {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 20px; padding: 0 6px; margin-left: 4px;
  font-family: Consolas, "Courier New", monospace; font-size: 11.5px; font-weight: 700;
  color: #1A3A63; background: #eaf0fa; border: 1px solid #dbe4f0;
  border-radius: 5px; text-decoration: none; vertical-align: 1px;
  transition: all .15s ease;
}
.rt-ch:hover { background: #1A3A63; color: #fff; border-color: #1A3A63; }
@media (max-width: 620px) {
  .rt-steps { padding-left: 17px; }
  .rt-steps li { font-size: 13px; margin: 8px 0; }
  .rt-ch { min-width: 24px; height: 19px; font-size: 11px; margin-left: 3px; }
}
