/* 共享 Markdown 阅读排版样式（前台教程页与后台实时预览保持 100% 一致） */
.md-body {
  color: var(--brand-text, #172b46);
  font-size: 15.5px;
  line-height: 1.78;
  word-break: break-word;
}
.md-body > :first-child { margin-top: 0; }
.md-body > :last-child { margin-bottom: 0; }

.md-body h1,
.md-body h2,
.md-body h3,
.md-body h4,
.md-body h5,
.md-body h6 {
  color: var(--brand-navy, #10274e);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.015em;
  margin: 1.5em 0 0.6em;
}
.md-body h1 { font-size: 1.6em; padding-bottom: 0.3em; border-bottom: 1px solid var(--brand-line, #d6e0ef); }
.md-body h2 { font-size: 1.32em; padding-bottom: 0.25em; border-bottom: 1px solid #e6edf7; }
.md-body h3 { font-size: 1.12em; }
.md-body h4 { font-size: 1em; }

.md-body [id^="guide-"] { scroll-margin-top: 1.75rem; transition: box-shadow 0.25s ease, background-color 0.25s ease; }
.md-body [id^="guide-"]:target {
  background: #edf4ff;
  box-shadow: 0 0 0 4px rgba(21, 85, 206, 0.2);
}
.md-body .md-chapter[id^="guide-"]:target {
  background: #1047b2;
  box-shadow: 0 0 0 4px rgba(21, 85, 206, 0.28);
}
.md-body .md-chapter.is-danger[id^="guide-"]:target {
  background: #c62828;
  box-shadow: 0 0 0 4px rgba(198, 40, 40, 0.32);
}
.md-body .md-toc {
  margin: 1.25em 0 1.75em;
  padding: 12px 18px;
  border: 1px solid #d6e4f7;
  border-radius: 12px;
  background: #f5f9ff;
}
.md-toc summary { cursor: pointer; color: #173c70; font-weight: 650; }
.md-body .md-toc ol { margin: 8px 0 0; padding-left: 1.6em; }
.md-toc li::marker { color: #667e9c; font-variant-numeric: tabular-nums; }
.md-toc a { display: inline-block; padding: 2px 0; }

/* 手册级增强排版：章节卡片导航、章头横幅、子节左蓝条、步骤胶囊、红/蓝速查表 */
.md-body .md-nav-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin: 12px 0 20px;
}
@media (min-width: 700px) {
  .md-body .md-nav-cards:not(:has(.md-nav-card-desc)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}
.md-body .md-nav-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 10px 14px;
  background: #f4f8ff;
  border: 1px solid #dce8fa;
  border-left: 4px solid var(--brand-blue, #1555ce);
  border-radius: 10px;
  text-decoration: none;
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}
.md-body .md-nav-card:hover {
  background: #e9f2ff;
  border-color: #bfd6f8;
  border-left-color: var(--brand-blue, #1555ce);
  transform: translateX(2px);
  text-decoration: none;
}
.md-body .md-nav-card-title {
  font-size: 14.5px;
  font-weight: 680;
  color: var(--brand-navy, #10274e);
  line-height: 1.42;
}
.md-body .md-nav-card-desc {
  font-size: 13px;
  color: #536884;
  line-height: 1.5;
}

.md-body h2.md-chapter {
  margin: 1.85em 0 0.85em;
  padding: 11px 16px;
  background: linear-gradient(135deg, #1555ce 0%, #1d64e0 100%);
  color: #ffffff;
  font-size: 1.15em;
  border: 0;
  border-radius: 11px;
  letter-spacing: 0;
}
.md-body h2.md-chapter.is-danger {
  background: #c62828;
}
.md-body details.md-fold-chapter {
  margin: 1.85em 0 1.25em;
  border-radius: 12px;
  border: 1px solid #d6e4f7;
  background: #fbfdff;
  overflow: hidden;
}
.md-body details.md-fold-chapter[id^="guide-"]:target {
  background: #fbfdff;
  box-shadow: 0 0 0 4px rgba(21, 101, 192, 0.25);
}
.md-body summary.md-fold-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 12px 16px;
  background: linear-gradient(135deg, #1555ce 0%, #1d64e0 100%);
  color: #ffffff;
  font-size: 1.12em;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}
.md-body summary.md-fold-summary::-webkit-details-marker { display: none; }
.md-body summary.md-fold-summary.is-danger { background: #c62828; }
.md-body .md-fold-hint {
  flex: none;
  font-size: 12.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}
.md-body .md-fold-hint::before { content: "点击展开 ▾"; }
.md-body details.md-fold-chapter[open] .md-fold-hint::before { content: "收起 ▴"; }
.md-body .md-fold-body {
  padding: 16px 18px 8px;
}
.md-body .md-fold-body > :first-child { margin-top: 0; }
.md-body h2.md-lookup-head {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 0.55em;
}
.md-body h3.md-subchapter {
  margin: 1.45em 0 0.65em;
  padding-left: 11px;
  border-left: 4px solid var(--brand-blue, #1555ce);
  color: var(--brand-blue, #1555ce);
  font-size: 1.08em;
}

.md-body p.md-step-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 1.15em 0 0.4em;
}
.md-body .md-step-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 6px;
  background: var(--brand-blue, #1555ce);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.45;
  flex: none;
}
.md-body .md-step-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #10274e;
  line-height: 1.45;
}

.md-body p.md-back-toc {
  margin: 0.85em 0 1.4em;
  text-align: right;
  font-size: 13px;
}
.md-body p.md-back-toc a {
  color: #5a7294;
  text-decoration: none;
}
.md-body p.md-back-toc a:hover {
  color: #1555ce;
  text-decoration: underline;
}

.md-body p {
  margin: 0.9em 0;
  color: #2c415e;
}

.md-body strong { color: var(--brand-navy, #10274e); font-weight: 680; }
.md-body del { color: #7a8da8; }

.md-body a {
  color: var(--brand-blue, #1555ce);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(21, 85, 206, 0.35);
}
.md-body a:hover {
  text-decoration-color: var(--brand-blue, #1555ce);
}

.md-body ul,
.md-body ol {
  margin: 0.9em 0;
  padding-left: 1.55em;
  color: #2c415e;
}
.md-body li { margin: 0.38em 0; }
.md-body li.md-task {
  list-style: none;
  margin-left: -1.35em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.md-body li.md-task.is-done span {
  text-decoration: line-through;
  color: #7c90aa;
}

.md-body blockquote {
  margin: 1.1em 0;
  padding: 10px 16px;
  border-left: 3.5px solid var(--brand-blue, #1555ce);
  background: #f4f8ff;
  border-radius: 0 10px 10px 0;
  color: #344c6b;
}
.md-body blockquote p { margin: 0.4em 0; }

.md-body .md-callout {
  margin: 1.05em 0;
  padding: 12px 16px;
  border-radius: 0 10px 10px 0;
  border: 1px solid #d8e7fb;
  border-left: 5px solid #1565c0;
  background: #f1f7ff;
}
.md-body .md-callout-title {
  font-size: 15.5px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #1565c0;
}
.md-body .md-callout p:last-child { margin-bottom: 0; }
.md-body .md-callout-tip { border-color: #cde7d0; border-left-color: #2e7d32; background: #f1f8e9; }
.md-body .md-callout-tip .md-callout-title { color: #2e7d32; }
.md-body .md-callout-warning { border-color: #f6dfad; border-left-color: #ef6c00; background: #fff8e1; }
.md-body .md-callout-warning .md-callout-title { color: #e65100; }
.md-body .md-callout-caution { border-color: #f4c6c6; border-left-color: #c62828; background: #fff5f5; }
.md-body .md-callout-caution .md-callout-title { color: #c62828; }
.md-body .md-callout-important { border-color: #d6dceb; border-left-color: #455a64; background: #f5f7fa; }
.md-body .md-callout-important .md-callout-title { color: #37474f; }

.md-body :not(pre) > code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
  background: #edf3fc;
  color: #163a70;
  padding: 2px 6px;
  border-radius: 6px;
}

.md-body .md-code-block {
  margin: 1.15em 0;
  border: 1px solid #d7e2f1;
  border-radius: 12px;
  overflow: hidden;
  background: #0f1b2d;
  color: #e6eefc;
}
.md-body .md-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: #172740;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: #9cb3d4;
}
.md-body .md-code-lang { text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.md-body .md-copy-btn {
  min-height: 0;
  padding: 3px 9px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  color: #dbe8ff;
  cursor: pointer;
}
.md-body .md-copy-btn:hover { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.3); }
.md-body .md-code-block pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.65;
}

.md-body .md-table-wrap {
  margin: 1.15em 0;
  overflow-x: auto;
  border: 1px solid #d8e2f0;
  border-radius: 12px;
}
.md-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: #fff;
}
.md-body th,
.md-body td {
  padding: 10px 14px;
  border-bottom: 1px solid #e6edf7;
  text-align: left;
}
.md-body thead th {
  background: #f5f8fd;
  color: var(--brand-navy, #10274e);
  font-weight: 650;
}
.md-body tbody tr:last-child td { border-bottom: 0; }
.md-body h2.md-lookup-head + .md-table-wrap,
.md-body h2.md-chapter + .md-table-wrap,
.md-body h3.md-subchapter + .md-table-wrap {
  border-color: #90caf9;
}
.md-body h2.md-lookup-head + .md-table-wrap thead th,
.md-body h2.md-chapter + .md-table-wrap thead th,
.md-body h3.md-subchapter + .md-table-wrap thead th {
  background: var(--brand-blue, #1555ce);
  color: #ffffff;
  border-bottom-color: var(--brand-blue, #1555ce);
}
.md-body h2.md-chapter.is-danger + .md-table-wrap {
  border-color: #ef9a9a;
}
.md-body h2.md-chapter.is-danger + .md-table-wrap thead th {
  background: #c62828;
  color: #ffffff;
  border-bottom-color: #c62828;
}
.md-body h2.md-chapter.is-danger + .md-table-wrap td {
  border-bottom-color: #f5c6cb;
}

.md-body hr {
  border: 0;
  border-top: 1px solid #dce5f2;
  margin: 1.5em 0;
}

.md-body .md-img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.15em auto;
  border-radius: 12px;
  border: 1px solid #dde6f2;
  box-shadow: 0 6px 20px rgba(16, 39, 78, 0.06);
}
