/* ============================================================
   Clash Verge下载 · deepdoc.css
   高级用法页(reference.html)专属样式:
   文档头 / 章节目录 / 章节分隔 / 代码标注 / 尾页导航
   ============================================================ */

/* ---- 文档头 ---- */
.doc-head{
  position:relative;
  padding-top:72px;
  padding-bottom:8px;
  overflow:clip;
}
.doc-head::before{
  content:"";
  position:absolute;
  right:-6vw;
  top:-24px;
  width:40vw;
  height:78%;
  border:1px solid var(--line-violet);
  border-radius:56px;
  pointer-events:none;
  z-index:0;
}
.doc-head::after{
  content:"";
  position:absolute;
  right:2vw;
  bottom:-72px;
  width:24vw;
  height:150px;
  border:1px solid var(--line-cyan);
  border-radius:48px;
  pointer-events:none;
  z-index:0;
}
.doc-head > .wrap{
  position:relative;
  z-index:1;
}
.doc-head h1{
  margin:22px 0 16px;
  max-width:760px;
}
.doc-head .lede{
  font-size:17px;
  line-height:1.75;
  color:var(--text-muted);
  max-width:720px;
}
.doc-head .lede a{
  color:var(--accent);
  font-weight:600;
}
.doc-head .lede a:hover{
  color:var(--accent-dark);
}
.doc-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:22px;
}
.doc-meta .tag{
  font-family:var(--font-mono);
  font-size:11.5px;
}

/* ---- 章节目录 ---- */
.toc-panel{
  margin-top:36px;
  padding:26px 28px 28px;
  background:var(--bg-panel);
  border:1px solid var(--border);
  border-radius:var(--r-panel);
}
.toc-panel h2{
  font-size:15px;
  margin:0 0 4px;
}
.toc-sub{
  font-size:13.5px;
  color:var(--text-muted);
  margin:0 0 18px;
}
.toc-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.toc-grid a{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:48px;
  padding:0 16px;
  background:var(--bg);
  border:1px solid var(--border);
  border-radius:14px;
  font-size:14.5px;
  font-weight:600;
  color:var(--text);
  transition:border-color .18s,color .18s,transform .18s;
}
.toc-grid a::before{
  content:"";
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--accent);
  flex-shrink:0;
}
.toc-grid a:hover{
  border-color:var(--accent);
  color:var(--accent);
  transform:translateY(-1px);
}
.toc-grid a:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
}

/* ---- 正文章节 ---- */
.doc-body{
  padding-top:8px;
  padding-bottom:72px;
}
.doc-chapter{
  padding-top:56px;
  margin-top:56px;
  border-top:1px solid var(--border);
}
.doc-chapter:first-child{
  padding-top:8px;
  margin-top:0;
  border-top:0;
}
.doc-chapter h2{
  margin:0 0 .7em;
  scroll-margin-top:calc(var(--nav-h) + 24px);
}
.doc-chapter h3{
  margin:1.9em 0 .6em;
  scroll-margin-top:calc(var(--nav-h) + 24px);
}
.prose .code-caption{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px 14px;
  margin:26px 0 8px;
  font-size:13px;
  color:var(--text-muted);
}
.code-caption code{
  font-size:12.5px;
  color:var(--text);
  background:var(--bg-panel);
  border:1px solid var(--border);
  border-radius:6px;
  padding:.1em .4em;
}

/* ---- 尾页导航 ---- */
.doc-next{
  margin-top:56px;
  padding:26px 28px;
  background:var(--bg-panel);
  border:1px solid var(--border);
  border-radius:var(--r-panel);
}
.doc-next h2{
  font-size:17px;
  margin:0 0 8px;
}
.doc-next p{
  margin:0;
  font-size:14.5px;
  color:var(--text-muted);
  line-height:1.8;
}
.doc-next a{
  color:var(--accent);
  font-weight:600;
}
.doc-next a:hover{
  color:var(--accent-dark);
}

/* ---- 响应式 ---- */
@media (max-width:768px){
  .doc-head{
    padding-top:48px;
  }
  .toc-panel{
    padding:20px;
  }
  .toc-grid{
    grid-template-columns:1fr;
  }
  .doc-chapter{
    padding-top:40px;
    margin-top:40px;
  }
  .doc-body{
    padding-bottom:48px;
  }
  .doc-next{
    padding:22px;
  }
}