/* 使用教程页 —— 复用 styles.css 的配色与控件，只补排版 */

html { scroll-behavior: smooth; }

.guide-body { background: var(--bg); }

.brand-models {
  margin-left: 10px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .02em;
}

.btn-back {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
}

/* ---------------------------------------------------------------- 布局 */
.guide-layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 60px;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

/* ---------------------------------------------------------------- 目录 */
.guide-toc {
  position: sticky;
  top: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 12px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.toc-title {
  margin: 0 0 8px 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.guide-toc nav { display: flex; flex-direction: column; gap: 2px; }

.guide-toc a {
  display: block;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
  font-size: 13px;
  line-height: 1.35;
  color: var(--ink-soft);
  text-decoration: none;
}

.guide-toc a:hover { background: #f4f6f9; color: var(--ink); }

.guide-toc a.active {
  background: #eef4ff;
  border-left-color: var(--indigo);
  color: var(--indigo-dark);
  font-weight: 600;
}

/* ---------------------------------------------------------------- 正文 */
.guide-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.guide-content section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px 22px;
  scroll-margin-top: 16px;
}

.guide-content h2 {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 700;
  color: var(--title);
  letter-spacing: -.01em;
}

.guide-content h3 {
  margin: 18px 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.guide-content p {
  margin: 0 0 10px;
  line-height: 1.75;
  color: var(--ink);
}

.guide-content p:last-child { margin-bottom: 0; }

.guide-content ul,
.guide-content ol {
  margin: 0 0 10px;
  padding-left: 22px;
  line-height: 1.8;
}

.guide-content li { margin-bottom: 4px; }

.guide-content ul li::marker { color: var(--teal-dark); }

/* 步骤列表：数字圆点 */
.steps { counter-reset: step; list-style: none; padding-left: 0; }

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 34px;
  margin-bottom: 8px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--indigo);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 注意事项 */
.note {
  margin-top: 12px !important;
  padding: 10px 14px;
  background: #fff8ec;
  border: 1px solid #ffe2b8;
  border-left: 4px solid var(--warn);
  border-radius: var(--radius-sm);
  color: #7a4b00;
  font-size: 13px;
  line-height: 1.65;
}

.safety li::marker { color: var(--danger); }

/* 行内代码 */
.guide-content code {
  font-family: var(--mono);
  font-size: 12.5px;
  background: #f2f4f7;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--ink);
}

/* 表格 */
.guide-table {
  width: 100%;
  border-collapse: collapse;
  margin: 6px 0 12px;
  font-size: 13px;
}

.guide-table th,
.guide-table td {
  border: 1px solid var(--border);
  padding: 9px 12px;
  text-align: left;
}

.guide-table th {
  background: #f7f9fb;
  color: var(--ink-soft);
  font-weight: 600;
  white-space: nowrap;
}

.guide-table tbody tr:nth-child(even) td { background: #fbfcfd; }

/* 页脚 */
.guide-footer {
  text-align: center;
  padding: 8px 0 24px;
  color: var(--muted);
  font-size: 12.5px;
}

.guide-footer a { color: var(--indigo-dark); }

/* ---------------------------------------------------------------- 窄屏 */
@media (max-width: 900px) {
  .guide-layout {
    grid-template-columns: minmax(0, 1fr);
    padding: 0 16px 40px;
    gap: 14px;
  }

  .guide-toc {
    position: static;
    max-height: none;
  }

  .guide-toc nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .guide-toc a {
    border-left: 0;
    border: 1px solid var(--border);
    padding: 5px 10px;
    font-size: 12.5px;
  }

  .guide-toc a.active { border-color: var(--indigo); }

  .guide-content section { padding: 16px; }
  .guide-content h2 { font-size: 16px; }

  .guide-table { display: block; overflow-x: auto; white-space: nowrap; }
}
