/* =========================================================================
   VPNSort · tutorial.css
   教程页(guides.html)专属:页头动作行、主线容器、步骤编排、平台块、校验清单
   所有颜色/圆角/间距均引用 base.css 的 :root 令牌,不新增设计值。
   ========================================================================= */

/* ---------- 页头 ---------- */

.lede strong{color:var(--text);font-weight:700}

.head-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:var(--space-5);
}
.head-actions .btn{flex-shrink:0;white-space:nowrap}

.fact-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:var(--space-4) 0 0;
  padding:0;
  list-style:none;
}
.fact-row > li{min-width:0}

/* ---------- 主线容器 ----------
   必须保持块级布局:目录条的 position:sticky 要靠整个 article 给出行程,
   一旦改成 grid/flex,每个子项只剩自己的高度,吸顶会立刻失效。 */

.guide-article{
  position:relative;
  display:block;
  max-width:760px;
  max-width:100%;
}
.guide-article > * + *{margin-top:var(--space-5)}

.guide-article .toc-tabs{margin-bottom:var(--space-5)}

/* ---------- 步骤 ---------- */

.guide-step{
  padding-top:var(--space-5);
  border-top:1px solid var(--border);
}

.step-head{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:var(--space-4);
}

.step-head h2{
  flex:1 1 auto;
  min-width:0;
}

.step-mark{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:38px;
  height:38px;
  flex:0 0 auto;
  border-radius:var(--r-sm);
  background:var(--accent-a08);
  color:var(--accent);
  box-shadow:inset 0 1px 0 var(--white-a90);
}
.step-mark svg{width:19px;height:19px}

.step-num{
  flex:0 0 auto;
  padding:3px 10px;
  border-radius:var(--r-pill);
  border:1px solid var(--accent-a14);
  background:var(--accent-a08);
  color:var(--accent);
  font-family:var(--font-mono);
  font-size:11.5px;
  font-weight:700;
  line-height:1.35;
  letter-spacing:.08em;
}

.step-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:var(--space-4);
}
.step-actions .btn{flex-shrink:0;white-space:nowrap}

.step-note{
  margin:var(--space-4) 0 0;
  padding:12px 16px;
  border-radius:var(--r-sm);
  border:1px solid var(--border-soft);
  background:var(--bg-panel2);
  font-size:12.8px;
  line-height:1.72;
  color:var(--text-muted);
}

/* ---------- 步骤内的正文与代码 ---------- */

.guide-step .prose{max-width:none}

.guide-step .table-scroll{margin-block:var(--space-4)}

.guide-step pre{
  max-width:560px;
  margin-block:var(--space-4);
}

/* ---------- 平台块 ---------- */

.plat-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:var(--space-4);
  margin-top:var(--space-5);
}
.plat-grid > *{min-width:0}

.plat-block{
  padding:var(--space-5);
  border-radius:var(--r-card);
  border:1px solid var(--border);
  background:var(--bg-panel);
  box-shadow:var(--shadow-card);
}

.plat-block h3{
  margin:0 0 8px;
  font-size:16.5px;
}

.plat-block p{
  margin:0;
  font-size:13.6px;
  line-height:1.72;
  color:var(--text-muted);
}

.plat-block .plat-tag{
  margin:0 0 6px;
  font-family:var(--font-mono);
  font-size:10.5px;
  letter-spacing:.12em;
  color:var(--text-muted);
}

/* ---------- 校验清单 ---------- */

.check-list{
  display:grid;
  gap:10px;
  margin:var(--space-4) 0;
  padding:0;
  list-style:none;
}
.check-list li{
  position:relative;
  padding-left:26px;
  font-size:14px;
  line-height:1.7;
  color:var(--text);
}
.check-list li::before{
  content:"";
  position:absolute;
  left:2px;
  top:.62em;
  width:11px;
  height:6px;
  border-left:2px solid var(--success);
  border-bottom:2px solid var(--success);
  border-radius:1px;
  transform:rotate(-45deg);
}

/* ---------- 延伸阅读卡 ---------- */

.next-card{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:var(--space-5);
  border-radius:var(--r-card);
  border:1px solid var(--border);
  background:var(--bg-panel);
  box-shadow:var(--shadow-card);
  color:inherit;
  text-decoration:none;
  transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.next-card:hover{
  transform:translateY(-2px);
  border-color:var(--accent-a45);
  box-shadow:var(--shadow-panel);
}

.next-kicker{
  font-family:var(--font-mono);
  font-size:10.5px;
  letter-spacing:.12em;
  color:var(--accent);
}

.next-card h3{
  margin:0;
  font-size:16.5px;
}

.next-text{
  margin:0;
  font-size:13.4px;
  line-height:1.7;
  color:var(--text-muted);
}

.next-more{
  margin-top:auto;
  padding-top:6px;
  font-size:12.5px;
  font-weight:600;
  color:var(--accent);
}

/* ---------- 响应式 ---------- */

@media (max-width:820px){
  .plat-grid{grid-template-columns:minmax(0,1fr)}
}

@media (max-width:640px){
  .step-head{gap:9px}
  .step-mark{width:32px;height:32px}
  .step-mark svg{width:17px;height:17px}
  .step-num{padding:2px 8px;font-size:11px}
  .head-actions .btn{width:100%}
  .step-actions .btn{width:100%}
  .plat-block{padding:var(--space-4)}
  .step-note{padding:10px 12px}
  .guide-step pre{max-width:100%}
}

@media (prefers-reduced-motion:reduce){
  .next-card:hover{transform:none}
}