/* ==============================================================
   Clash安装官网 · deepdoc.css
   进阶手册(config-guide.html)页面专属样式
   —— 章节锚点定位 / 目录换行 / 章节分隔节奏
   ============================================================== */

/* 手册目录:宽屏允许换行铺开,不强制横向滚动 */
.doc-toc {
  flex-wrap: wrap;
  overflow-x: visible;
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* 开篇导语:限宽,与目录留出节奏 */
.doc-brief {
  max-width: 760px;
  margin-bottom: clamp(20px, 3vw, 32px);
}

.doc-brief p {
  color: var(--ink-soft);
  margin-bottom: 0;
}

/* 章节:锚点跳转让出粘性页头高度 */
.doc-chapter {
  scroll-margin-top: calc(var(--head-h) + 24px);
  margin-bottom: clamp(48px, 7vw, 80px);
}

.doc-chapter:last-child {
  margin-bottom: 0;
}

/* 章标题下压一条发丝线,形成"手册条目"感 */
.doc-chapter > h2 {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 0.9em;
}

.doc-chapter h3 {
  margin-top: 1.8em;
}

/* 收束段:与前文拉开一点距离 */
.doc-close {
  margin-top: 2em;
  padding-top: 1.2em;
  border-top: 1px solid var(--hairline);
}

@media (max-width: 640px) {
  .doc-chapter {
    scroll-margin-top: calc(var(--head-h) + 12px);
  }
}