/* 逐光知理 · 界面增强层
   只做视觉、层级和快捷入口，不改变原有页面结构与业务逻辑。 */

:root {
  --ui-ink: #13243a;
  --ui-ink-soft: #33475f;
  --ui-blue: #1d4ed8;
  --ui-cyan: #0e7490;
  --ui-amber: #b45309;
  --ui-paper: #f7f9fc;
  --ui-line: #dbe4ef;
  --ui-line-strong: #c7d4e4;
  --ui-shadow-sm: 0 2px 8px rgba(18, 45, 74, 0.06);
  --ui-shadow-md: 0 14px 34px rgba(18, 45, 74, 0.1);
  --ui-shadow-lg: 0 24px 60px rgba(18, 45, 74, 0.13);
  --ui-radius-sm: 10px;
  --ui-radius-md: 16px;
  --ui-radius-lg: 24px;
  --font-display: "Songti SC", "STSongti-SC", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
}

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(900px 420px at 8% -8%, rgba(37, 99, 235, 0.08), transparent 70%),
    radial-gradient(760px 360px at 92% 4%, rgba(14, 116, 144, 0.07), transparent 66%),
    var(--ui-paper);
  color: var(--ui-ink);
}

a,
button,
summary,
input,
select,
textarea { -webkit-tap-highlight-color: transparent; }

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 2px;
}

.site-header {
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(219, 228, 239, 0.8);
  box-shadow: 0 10px 30px rgba(18, 45, 74, 0.06);
}

.brand { letter-spacing: 0.12em; flex: none; white-space: nowrap; }
.has-auth .header-search { display: none !important; }

.header-search { display: none; }
@media (min-width: 1180px) {
  .header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 206px;
    height: 38px;
    margin-left: auto;
    margin-right: 14px;
    padding: 0 12px;
    border: 1px solid var(--ui-line);
    border-radius: 999px;
    background: #f8fbff;
    color: #58708a;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
  }
  .header-search:focus-within {
    border-color: rgba(37, 99, 235, 0.5);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.11);
  }
  .header-search svg { width: 16px; height: 16px; flex: none; }
  .header-search input {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ui-ink);
    font-family: inherit;
    font-size: 13px;
  }
  .header-search input::placeholder { color: #7b8ea3; }
}


.nav { gap: 16px; }
.nav-dropdown-menu {
  border-color: var(--ui-line);
  box-shadow: var(--ui-shadow-md);
}
.nav-dropdown-menu a { transition: background 0.15s ease, color 0.15s ease; }

.btn {
  border-radius: var(--ui-radius-sm);
  box-shadow: 0 1px 2px rgba(18, 45, 74, 0.06);
  transition: background 0.16s ease, border-color 0.16s ease,
    transform 0.16s ease, box-shadow 0.16s ease;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(18, 45, 74, 0.12);
}

.hero {
  position: relative;
  overflow: hidden;
  border-color: rgba(199, 212, 228, 0.9);
  background:
    radial-gradient(560px 320px at 12% 0%, rgba(37, 99, 235, 0.11), transparent 68%),
    radial-gradient(520px 320px at 90% 12%, rgba(14, 116, 144, 0.1), transparent 64%),
    linear-gradient(135deg, #f5f8ff 0%, #fbfdff 48%, #f4fbfc 100%);
  box-shadow: var(--ui-shadow-md);
}
.hero::after {
  content: "";
  position: absolute;
  right: -110px;
  bottom: -150px;
  width: 430px;
  height: 430px;
  border-radius: 50%;
  border: 1px solid rgba(37, 99, 235, 0.12);
  box-shadow:
    0 0 0 34px rgba(37, 99, 235, 0.035),
    0 0 0 74px rgba(14, 116, 144, 0.025);
  pointer-events: none;
}

.home-hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #10243b;
}
.home-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.08em;
}
.hero-sub { color: var(--ui-ink-soft); }

.hero-primary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 14px;
}
.hero-primary-actions .btn {
  min-height: 44px;
  padding: 11px 22px;
  font-weight: 600;
}
.hero-secondary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  color: var(--muted);
}
.hero-secondary-actions a {
  position: relative;
  color: #36516f;
  font-size: 13px;
  text-decoration: none;
}
.hero-secondary-actions a::after { content: " →"; color: var(--ui-blue); }
.hero-secondary-actions a:hover { color: var(--ui-blue); }

.hero-stats {
  border-color: rgba(199, 212, 228, 0.9);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--ui-shadow-sm);
}
.hero-stat {
  border-color: rgba(219, 228, 239, 0.9);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.hero-stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--ui-shadow-sm);
}
.hero-stat strong {
  color: var(--ui-blue);
  font-variant-numeric: tabular-nums;
}

/* 登录用户：继续上次练习 */
.continue-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 13px 18px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.92) 62%),
    #fff;
  color: var(--ui-ink);
  text-decoration: none;
  box-shadow: var(--ui-shadow-sm);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.continue-strip:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.38);
  box-shadow: var(--ui-shadow-md);
  text-decoration: none;
}
.continue-badge {
  flex: none;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--ui-blue);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.continue-body { flex: 1; min-width: 0; }
.continue-body strong {
  display: block;
  color: #1e3a5f;
  font-size: 14px;
  line-height: 1.6;
}
.continue-stem {
  display: block;
  overflow: hidden;
  color: #5b7086;
  font-size: 12.5px;
  line-height: 1.6;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.continue-meta {
  flex: none;
  color: #607792;
  font-size: 12px;
  white-space: nowrap;
}
.continue-arrow { margin-left: 6px; color: var(--ui-blue); font-weight: 700; }

/* 知识点导航：摘要 + 可展开的完整编排说明 */
.knowledge-hub-intro { max-width: 960px; }
.knowledge-hub-intro .section-sub { margin-bottom: 8px; }
.knowledge-hub-more {
  margin: 0 0 12px;
  color: #5a7188;
  font-size: 13px;
}
.knowledge-hub-more summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 0;
  color: var(--ui-blue);
  font-size: 12.5px;
  list-style: none;
  cursor: pointer;
}
.knowledge-hub-more summary::-webkit-details-marker { display: none; }
.knowledge-hub-more summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(37, 99, 235, 0.28);
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
}
.knowledge-hub-more[open] summary::before { content: "−"; }
.knowledge-hub-more p {
  margin: 8px 0 0;
  padding: 12px 14px;
  border-left: 3px solid rgba(37, 99, 235, 0.2);
  background: #f8fbff;
  line-height: 1.8;
}



/* 新手四条入口 */
.home-quickstart {
  display: grid;
  grid-template-columns: minmax(0, 0.62fr) minmax(0, 1.38fr);
  gap: 26px;
  align-items: stretch;
  margin-top: 24px;
  padding: 26px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--ui-shadow-sm);
}
.quickstart-intro { align-self: center; }
.quickstart-intro .eyebrow { margin-bottom: 6px; }
.quickstart-intro h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.35;
  color: #10243b;
}
.quickstart-intro p {
  margin: 0;
  max-width: 310px;
  color: var(--muted);
  font-size: 14px;
}
.quickstart-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.quickstart-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 148px;
  padding: 18px 16px 16px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-md);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: var(--ui-ink);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.quickstart-card:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: var(--ui-shadow-md);
  text-decoration: none;
}
.quickstart-step {
  font-family: "Times New Roman", Georgia, serif;
  font-size: 12px;
  font-style: italic;
  letter-spacing: 0.12em;
  color: var(--ui-blue);
}
.quickstart-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.4;
}
.quickstart-card p {
  flex: 1;
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}
.quickstart-action {
  color: var(--ui-blue);
  font-size: 12px;
  font-weight: 600;
}

/* 页面头部统一层级 */
.page-head {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ui-line);
  margin-bottom: 18px;
}
.page-head h1 {
  font-family: var(--font-display);
  letter-spacing: 0.015em;
  color: #10243b;
}
.page-head-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid var(--ui-line);
  border-radius: 999px;
  background: #f8fbff;
  color: #47617d;
  font-size: 12px;
  line-height: 1.6;
}
.meta-pill-action {
  border-color: rgba(37, 99, 235, 0.2);
  background: #fff;
  color: #31557f;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.meta-pill-action:hover {
  border-color: rgba(37, 99, 235, 0.4);
  background: #eff6ff;
  color: #1e40af;
  text-decoration: none;
}
.meta-pill-action.is-active {
  border-color: var(--ui-blue);
  background: var(--ui-blue);
  color: #fff;
}
.page-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* 真题卡片：更快扫读文件构成 */
.exam-card {
  position: relative;
  overflow: hidden;
  border-color: var(--ui-line);
  box-shadow: var(--ui-shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.exam-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--ui-blue), var(--ui-cyan));
  opacity: 0.75;
}
.exam-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.26);
  box-shadow: var(--ui-shadow-md);
}
.exam-card-head .exam-year {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 28px;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 13px;
  font-weight: 700;
}
.exam-files { gap: 8px; }
.file-link {
  border: 1px solid var(--ui-line);
  border-radius: 9px;
  background: #fbfdff;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.file-link:hover { border-color: rgba(37, 99, 235, 0.28); background: #f3f8ff; }
.file-answer { border-left: 3px solid rgba(180, 83, 9, 0.35); }
.file-locked { opacity: 0.82; }

/* 题目卡片：阅读密度稍微放松 */
.question-card {
  border-color: var(--ui-line);
  box-shadow: var(--ui-shadow-sm);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.question-card:hover {
  border-color: rgba(37, 99, 235, 0.22);
  box-shadow: var(--ui-shadow-sm);
}
.question-stem { color: #22364d; }

/* 首屏装饰公式，不占业务位置 */
.hero-formula-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  color: #55708e;
  font-family: "Times New Roman", Georgia, serif;
  font-size: 13px;
  font-style: italic;
}
.hero-formula-strip span {
  padding: 2px 9px;
  border: 1px dashed rgba(37, 99, 235, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.62);
}

/* 移动端快捷栏 */
.mobile-quickbar { display: none; }

@media (max-width: 1100px) {
  .home-quickstart { grid-template-columns: 1fr; }
  .quickstart-intro p { max-width: 620px; }
  .quickstart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .home-quickstart { margin-top: 16px; padding: 20px; }
  .quickstart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding: 26px 22px; }
  .hero::after { right: -180px; bottom: -210px; opacity: 0.7; }
  .hero-primary-actions .btn { flex: 1 1 auto; justify-content: center; text-align: center; }
  .continue-strip {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px 10px;
    padding: 12px 14px;
  }
  .continue-body { flex-basis: calc(100% - 120px); }
  .continue-meta { flex-basis: 100%; padding-left: 2px; }

  .mobile-quickbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--ui-line);
    box-shadow: 0 -8px 24px rgba(18, 45, 74, 0.08);
    transition: transform .2s ease, opacity .2s ease, visibility 0s linear .2s;
  }
  /* 阅读长页时让出底部空间：底栏收起，知理球缩成小入口。向上滚/到顶/到底自动恢复。 */
  body.is-scroll-away .mobile-quickbar {
    transform: translateY(calc(100% + 6px));
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
  }
  .zhili-float { bottom: calc(78px + env(safe-area-inset-bottom)); transition: bottom .2s ease; }
  body.is-scroll-away .zhili-float:not(.is-placed) { bottom: calc(14px + env(safe-area-inset-bottom)); }
  .zhili-orb, .zhili-avatar, .zhili-core { transition: width .18s ease, height .18s ease, font-size .18s ease; }
  body.is-scroll-away .zhili-float:not(.is-placed) .zhili-orb { width: 44px; height: 44px; }
  body.is-scroll-away .zhili-float:not(.is-placed) .zhili-avatar { width: 36px; height: 36px; }
  body.is-scroll-away .zhili-float:not(.is-placed) .zhili-core { width: 32px; height: 32px; font-size: 12px; }
  body.is-scroll-away .zhili-float:not(.is-placed) .zhili-ring { inset: -4px; }
  .mobile-quickbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 48px;
    border-radius: 9px;
    color: #4b6178;
    font-size: 11px;
    text-decoration: none;
  }
  .mobile-quickbar a:hover { background: #f4f8ff; color: var(--ui-blue); }
  .mobile-quickbar a.is-active { background: #eff6ff; color: var(--ui-blue); font-weight: 600; }
  .mobile-quickbar svg { width: 19px; height: 19px; stroke-width: 1.8; }
}

@media (max-width: 600px) {
  .quickstart-grid { grid-template-columns: 1fr; }
  .quickstart-card { min-height: auto; }
  .page-head { padding-bottom: 14px; }
  .page-head-actions { margin-top: 12px; }
}

/* P0：内容可信度与教师工作台入口 */
.content-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin: 12px 0 6px;
  padding: 9px 12px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: var(--ui-radius-sm);
  background: #f8fbff;
  color: #5a7089;
  font-size: 12.5px;
  line-height: 1.7;
}
.content-trust-label {
  color: #1e40af;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.content-trust a {
  margin-left: auto;
  white-space: nowrap;
}

.home-teacher-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 20px 24px;
  border: 1px solid var(--ui-line);
  border-left: 4px solid var(--ui-blue);
  border-radius: var(--ui-radius-md);
  background: linear-gradient(90deg, #f8fbff, #fff 65%);
  box-shadow: var(--ui-shadow-sm);
}
.home-teacher-link .eyebrow { margin: 0 0 5px; }
.home-teacher-link strong { color: var(--ui-ink); font-size: 14px; line-height: 1.65; }
.home-teacher-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

@media (max-width: 600px) {
  .content-trust a { margin-left: 0; }
  .home-teacher-link {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
  }
  .home-teacher-actions { flex-wrap: wrap; }
}

/* 四步快速开始：窄屏折成两列 / 单列，避免横向截断 */
@media (max-width: 980px) {
  .home-quickstart {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px;
  }
  .quickstart-intro p { max-width: none; }
  .quickstart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .quickstart-grid { grid-template-columns: 1fr; }
  .quickstart-card {
    min-height: 0;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 14px 15px;
  }
  .quickstart-card h3 { flex: 1 1 100%; font-size: 16px; }
  .quickstart-card p { flex: 1 1 100%; font-size: 12.5px; }
  .quickstart-step { flex: 0 0 auto; }
  .quickstart-action { margin-left: auto; }
}

.hero-learn-link {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
}
.hero-learn-link a {
  color: var(--ui-blue);
  font-weight: 700;
  text-decoration: none;
}
.hero-learn-link a::after { content: " →"; }

/* —— 2026-11 首页收口：三条路径、学段入口、精选区 —— */
.home-paths,
.home-stage-strip {
  max-width: 1180px;
  margin: 26px auto 0;
  padding: 0 20px;
}
.home-paths-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.home-path-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 190px;
  padding: 22px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--ui-line);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.home-path-card:hover {
  transform: translateY(-2px);
  border-color: rgba(29, 78, 216, .32);
  box-shadow: var(--ui-shadow-md);
}
.home-path-card h3 { margin: 2px 0 2px; font-size: 20px; }
.home-path-card p { margin: 0; color: var(--ui-ink-soft); line-height: 1.7; font-size: 14px; }
.home-path-card .quickstart-action { margin-top: auto; color: var(--ui-blue); font-weight: 700; font-size: 14px; }
.home-stage-strip .section-head { margin-bottom: 12px; }
.home-stage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.stage-tile {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px 15px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-sm);
  background: rgba(255, 255, 255, .78);
  text-decoration: none;
  color: inherit;
  transition: border-color .16s ease, background .16s ease;
}
.stage-tile:hover { border-color: rgba(29, 78, 216, .34); background: #fff; }
.stage-tile strong { font-size: 14px; }
.stage-tile span { color: var(--muted); font-size: 12.5px; }
.home-picks .section-head { margin-bottom: 16px; }

/* —— 知识点学习闭环 —— */
.learning-loop .loop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.loop-card { padding: 20px; display: flex; flex-direction: column; gap: 8px; min-height: 210px; }
.loop-card h3 { margin: 0; font-size: 18px; }
.loop-card .eyebrow { margin: 0; }
.loop-list { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.loop-list li { display: flex; flex-direction: column; gap: 3px; font-size: 14px; line-height: 1.5; }
.loop-list a { color: var(--ui-blue); font-weight: 600; text-decoration: none; }
.loop-list a:hover { text-decoration: underline; }
.loop-card .btn { margin-top: auto; align-self: flex-start; }
.mastery-bar {
  height: 8px;
  border-radius: 99px;
  background: #e8eef7;
  overflow: hidden;
  margin: 4px 0 2px;
}
.mastery-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #0e7490); }

/* —— 搜索工作台 —— */
.search-hero-form { max-width: 660px; margin: 14px auto 10px; }
.search-hero .chip-row { justify-content: center; }
.search-workbench { padding-top: 10px; }
.search-workbench-head { align-items: flex-end; gap: 18px; }
.search-filter-form {
  position: sticky;
  top: 68px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin: 10px 0 14px;
  border: 1px solid var(--ui-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: var(--ui-shadow-sm);
}
.search-filter-form select { min-width: 110px; max-width: 190px; }
.search-filter-form .filter-clear { margin-left: 2px; white-space: nowrap; }
.search-section-tabs {
  display: flex;
  gap: 6px;
  margin: 4px 0 18px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--ui-line);
}
.search-section-tabs a {
  padding: 6px 11px;
  border-radius: 99px;
  color: var(--ui-ink-soft);
  font-size: 13px;
  text-decoration: none;
}
.search-section-tabs a.active,
.search-section-tabs a:hover { background: #eaf1ff; color: var(--ui-blue); font-weight: 700; }
#questions, #knowledge-points, #exams { scroll-margin-top: 130px; }

/* —— 练习单与小测 —— */
.practice-result { padding: 22px; }
.practice-result h2 { margin: 4px 0 8px; font-size: 24px; }
.practice-result-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; }
.practice-result-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.practice-result-list { display: grid; gap: 8px; margin-top: 18px; }
.practice-result-row { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--ui-line); }
.practice-result-index { flex: 0 0 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #edf3ff; color: var(--ui-blue); font-weight: 700; font-size: 13px; }
.practice-result-body p { margin: 0 0 3px; }
.practice-result-stem { line-height: 1.55; }
.result-correct { color: #15803d; }
.result-wrong { color: #b91c1c; }
.diagnostic-submit { position: static; margin-top: 8px; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 16px; border: 1px solid var(--ui-line); border-radius: 14px; background: rgba(255,255,255,.96); box-shadow: var(--ui-shadow-md); }
.diagnostic-progress { font-size: 14px; color: var(--ui-ink-soft); }
.diagnostic-progress.is-done { color: #15803d; font-weight: 700; }

@media (max-width: 980px) {
  .home-paths-grid, .learning-loop .loop-grid { grid-template-columns: 1fr; }
  .home-stage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-filter-form { position: static; }
}
@media (max-width: 560px) {
  .home-stage-grid { grid-template-columns: 1fr; }
  .home-path-card { min-height: 0; }
  .search-filter-form select { flex: 1 1 46%; max-width: none; }
  .diagnostic-submit { flex-direction: column; align-items: stretch; }
  .diagnostic-submit .btn { width: 100%; }
}

.home-exam-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.home-exam-grid .exam-tile span { line-height: 1.45; }
@media (max-width: 980px) { .home-exam-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .home-exam-grid { grid-template-columns: 1fr; } }

/* 题卡题干不再固定 5 行高度，短题干不留大块空白；长题干仍截到 5 行。 */
.question-card .question-stem {
  height: auto;
  max-height: 7.75em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
}

/* 首页“知识点导航 / 习题导航”整栏折叠：外层 summary 是入口，内层板块继续独立折叠 */
.section-fold { margin-top: 44px; }
.section-fold > .section-fold-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border: 1px solid #cddcf1;
  border-left: 4px solid var(--ui-blue);
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff 0%, #f2f7ff 100%);
  box-shadow: 0 6px 18px rgba(18, 45, 74, .06);
  list-style: none;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.section-fold > .section-fold-head::-webkit-details-marker { display: none; }
.section-fold > .section-fold-head:hover {
  border-color: #a9c5e6;
  box-shadow: 0 10px 24px rgba(18, 45, 74, .1);
  transform: translateY(-1px);
}
.section-fold > .section-fold-head:hover .section-title { color: var(--ui-blue); }
.section-fold > .section-fold-head:focus-visible {
  outline: 3px solid rgba(29, 78, 216, .28);
  outline-offset: 3px;
}
.section-fold-title { min-width: 0; flex: 1 1 auto; }
.section-fold-title .section-title {
  margin: 0;
  transition: color .15s ease;
  font-size: 23px;
  letter-spacing: .02em;
}
.section-fold-title .section-sub { margin: 5px 0 0; max-width: 760px; }
.section-fold-state {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 12px;
  border: 1px solid #b7cdea;
  border-radius: 999px;
  background: #fff;
  color: var(--ui-blue);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.section-fold-state::before { content: "展开全部"; }
.section-fold[open] .section-fold-state::before { content: "收起全部"; }
.section-fold-caret {
  flex: 0 0 auto;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid var(--ui-blue);
  transition: transform .15s ease;
}
.section-fold[open] > .section-fold-head {
  padding-bottom: 18px;
  border-radius: 14px 14px 0 0;
  border-bottom-color: #dbe4ef;
  box-shadow: none;
}
.section-fold[open] > .section-fold-head .section-fold-caret { transform: rotate(180deg); }
.section-fold[open] > .section-fold-head .section-fold-state {
  border-color: #a9c5e6;
  background: #edf4ff;
}
.section-fold-body { padding-top: 18px; }
/* 收起时保留当前学段的模块速览；展开后由栏目正文接管，速览隐藏 */
.section-fold-preview {
  margin: -1px 0 26px;
  padding: 15px 20px 17px;
  border: 1px solid #dbe4ef;
  border-top: 0;
  border-radius: 0 0 14px 14px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(18, 45, 74, .045);
}
.section-fold-preview-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 10px;
}
.section-fold-preview-head .eyebrow { margin: 0; }
.section-fold-preview-meta {
  color: var(--ui-muted, #64748b);
  font-size: 12px;
}
.section-fold[open] + .section-fold-preview { display: none; }
@media (max-width: 560px) {
  .section-fold-preview { padding: 12px 14px 14px; border-radius: 0 0 12px 12px; }
}
/* 知识点中枢 partial 自带 section-head 与 section 外边距；折叠时只保留导读，不重复大标题 */
.section-fold .knowledge-hub { margin-top: 0; }
.section-fold .knowledge-hub .section-head { align-items: flex-start; }
.section-fold .knowledge-hub .section-head .section-title { display: none; }
.section-fold .knowledge-hub .section-head .section-sub { margin-top: 0; }
@media (max-width: 560px) {
  .section-fold > .section-fold-head { gap: 10px; padding: 14px 16px; }
  .section-fold-title .section-title { font-size: 19px; }
  .section-fold-title .section-sub { font-size: 13px; }
  .section-fold-state { font-size: 12px; padding: 3px 9px; }
}

/* ---------------------------------------------------------------- 首页学段上下文 */
.home-stage-context {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 28px 0 0;
  padding: 10px 16px;
  border: 1px solid #dbe5f1;
  border-radius: 12px;
  background: #fbfdff;
  color: var(--ui-muted, #64748b);
  font-size: 13px;
}
.home-stage-context .eyebrow { margin: 0; color: var(--ui-blue); }
.home-stage-context p { margin: 0; flex: 1 1 auto; }
.home-stage-context strong { color: #0f172a; }
.home-stage-context a { margin-left: auto; white-space: nowrap; }

/* 单个学段板块的展开全部 / 收起全部状态胶囊 */
.kp-stage-state {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 9px;
  border: 1px solid #b7cdea;
  border-radius: 999px;
  background: #fff;
  color: var(--ui-blue);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.kp-stage-state::before { content: "展开全部"; }
.kp-stage[open] .kp-stage-state::before { content: "收起全部"; }
.kp-stage[open] .kp-stage-state {
  border-color: #a9c5e6;
  background: #edf4ff;
}

/* ---------------------------------------------------------------- 登录后最近学习 */
.recent-learning {
  margin-top: 44px;
  padding: 22px 24px 24px;
  border: 1px solid #dbe5f1;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(18, 45, 74, .045);
}
.recent-learning .section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}
.recent-learning .section-head .section-title { margin: 4px 0 4px; font-size: 23px; }
.recent-learning .section-head .section-sub { margin: 0; }
.recent-learning-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.recent-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fbfdff;
}
.recent-picker label { color: #475569; font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.recent-picker select {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid #cddcf1;
  border-radius: 9px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 13px;
}
.recent-picker select:focus { outline: 2px solid rgba(29, 78, 216, .22); outline-offset: 1px; }
.recent-picker .btn { width: 100%; justify-content: center; margin-top: 2px; }
.recent-picker-note { margin: 2px 0 0; color: #64748b; font-size: 12px; line-height: 1.6; }
.recent-panel { min-width: 0; }
.recent-panel[hidden] { display: none !important; }
.recent-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 0 0 12px;
  border-bottom: 1px solid #eef2f7;
}
.recent-panel-head h3 { margin: 0; font-size: 18px; }
.recent-panel-head .recent-result { padding: 3px 9px; border-radius: 999px; background: #eff6ff; color: #1d4ed8; font-size: 12px; font-weight: 700; }
.recent-panel-head p { flex-basis: 100%; margin: 0; color: #64748b; font-size: 13px; }
.recent-panel-head a { margin-left: auto; white-space: nowrap; }
.recent-reco-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.recent-reco { min-width: 0; }
.recent-reco h4 { margin: 0 0 8px; color: #475569; font-size: 12px; letter-spacing: .04em; }
.recent-reco a,
.recent-reco .recent-reco-muted {
  display: block;
  margin-bottom: 7px;
  padding: 8px 9px;
  border: 1px solid #e5edf6;
  border-radius: 9px;
  background: #fbfdff;
  color: #0f172a;
  font-size: 12.5px;
  line-height: 1.5;
  text-decoration: none;
}
.recent-reco a:hover { border-color: #b7cdea; color: var(--ui-blue); }
.recent-reco a small { display: block; color: #64748b; font-size: 11.5px; }
.recent-reco .recent-reco-muted { color: #94a3b8; }
.recent-reco em { display: block; margin-top: 2px; color: #64748b; font-style: normal; font-size: 11px; }

@media (max-width: 860px) {
  .home-stage-context { margin-top: 20px; }
  .home-stage-context a { margin-left: 0; }
  .recent-learning { padding: 18px 16px; }
  .recent-learning-layout { grid-template-columns: 1fr; }
  .recent-reco-grid { grid-template-columns: 1fr; }
}

/* 知识专题完整度：卡片状态、待完善筛选与共用长文壳 */
.kp-gap-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 12px;
  padding: 9px 12px;
  border: 1px solid #e5edf6;
  border-radius: 10px;
  background: #f8fbff;
  color: #475569;
  font-size: 12.5px;
}
.kp-gap-summary strong { color: #b45309; }
.kp-gap-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  color: #1d4ed8;
  cursor: pointer;
  font-weight: 600;
}
.kp-gap-filter input { accent-color: #2563eb; }
.badge-warn { background: #fff7ed; color: #c2410c; }
.badge-ok { background: #f0fdf4; color: #166534; }
.badge-shared { background: #f5f3ff; color: #6d28d9; }
.knowledge-shared-shelf {
  padding: 12px 14px;
  border: 1px dashed #c7d2fe;
  border-radius: 10px;
  background: #fafaff;
}
.knowledge-shared-shelf p { margin: 0 0 10px; color: #475569; line-height: 1.7; }
.knowledge-shared-shelf .chip-row { margin: 0; }
@media (max-width: 720px) {
  .kp-gap-toolbar { align-items: flex-start; flex-direction: column; }
}
