/* ==========================================================================
   Shadowrocket 官方下载站 · 系统教程页(handbook)
   章节阶梯 / 章节头 / 手册排版微调
   仅本页使用;所有颜色引用 base.css 的 :root 设计令牌
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 章节导航与正文对齐
   -------------------------------------------------------------------------- */

.doc-toc{max-width:820px;}
.doc-toc + .doc{margin-top:44px;}

/* --------------------------------------------------------------------------
   2. 章节骨架:每章一段,章间以细线分隔
   -------------------------------------------------------------------------- */

.doc-chapter{
  display:flex;
  flex-direction:column;
  gap:1.05em;
  padding-top:52px;
  margin-top:52px;
  border-top:1px solid var(--border-light);
}
.doc-chapter:first-child{
  padding-top:0;
  margin-top:0;
  border-top:0;
}

/* 章内间距统一由 gap 控制,清掉 prose 带来的 margin-top */
.doc-chapter h2,
.doc-chapter h3,
.doc-chapter p,
.doc-chapter ul,
.doc-chapter ol,
.doc-chapter pre{
  margin-top:0;
}
.doc-chapter pre{min-width:0;}

/* --------------------------------------------------------------------------
   3. 章节头:等宽编号 + 标题
   -------------------------------------------------------------------------- */

.chapter-head{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.chapter-mark{
  margin:0;
  font-family:var(--font-mono);
  font-size:11px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--accent-dark);
}
.chapter-head h2{margin-top:0;}

/* --------------------------------------------------------------------------
   4. 章节导语
   -------------------------------------------------------------------------- */

.chapter-lede{
  font-size:15.5px;
  line-height:1.9;
  color:var(--text-on-light-muted);
}

/* --------------------------------------------------------------------------
   5. 章内表格:窄屏横向滚动,不撑破版心
   -------------------------------------------------------------------------- */

.doc-chapter .data-table{
  display:block;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  max-width:100%;
  min-width:0;
}

/* --------------------------------------------------------------------------
   6. 首屏事实行与收尾区
   -------------------------------------------------------------------------- */

.doc-hero-facts{margin-top:26px;}

.doc-next{margin-top:40px;}

/* --------------------------------------------------------------------------
   7. 响应式
   -------------------------------------------------------------------------- */

@media (max-width:720px){
  .doc-toc + .doc{margin-top:32px;}
  .doc-chapter{
    padding-top:40px;
    margin-top:40px;
  }
  .chapter-lede{font-size:15px;}
}