/* ═══════════ 技术文档页 — 杂志风渲染(配合 styles.css token) ═══════════ */
.doc { max-width: 880px; margin: 0 auto; padding: 56px 24px 96px; }

.doc h1 {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 40px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  margin-bottom: 32px;
}

.doc h2 {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 28px;
  line-height: 1.45;
  letter-spacing: 0.02em;
  margin-top: 72px;
  margin-bottom: 20px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

.doc h3 {
  font-size: 21px;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 14px;
}

.doc h4, .doc h5, .doc h6 {
  font-size: 17px;
  font-weight: 700;
  margin-top: 28px;
  margin-bottom: 10px;
}

.doc p { margin-bottom: 20px; }
.doc p:has(+ p) { margin-bottom: 0; }

.doc ul, .doc ol { padding-left: 26px; margin: 16px 0 24px; }
.doc li { margin: 6px 0; }

.doc hr { border: none; border-top: 1px solid var(--rule); margin: 40px 0; }

.doc blockquote {
  margin: 32px 0;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-family: var(--serif);
  color: var(--ink-soft);
}

.doc blockquote p { margin: 0; }

.doc pre {
  background: var(--ink);
  color: #F6EBDD;
  padding: 22px 26px;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.75;
  overflow-x: auto;
  margin: 24px 0;
}

.doc pre code { background: none; color: inherit; padding: 0; font-size: inherit; }

/* 目录 */
.doc-toc {
  border: 1px solid var(--rule);
  background: var(--raised);
  padding: 28px 32px;
  margin: 40px 0 8px;
}

.doc-toc ul, .doc-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 32px;
}

.doc-toc li { margin: 4px 0; }
.doc-toc a { font-size: 14.5px; color: var(--ink-soft); }
.doc-toc a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* 表格 */
.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  margin: 24px 0 32px;
  display: block;
  overflow-x: auto;
}

.doc-table thead th {
  text-align: left;
  font-weight: 700;
  padding: 10px 14px;
  border-bottom: 1.5px solid var(--ink);
  white-space: nowrap;
}

.doc-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  line-height: 1.7;
}

.doc-table tbody tr:last-child td { border-bottom: 1.5px solid var(--ink); }

.doc a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.doc a:hover { text-decoration-thickness: 2px; }

@media (max-width: 720px) {
  .doc { padding: 40px 20px 72px; }
  .doc h1 { font-size: 30px; }
  .doc h2 { font-size: 23px; }
  .doc-toc ul, .doc-toc ol { grid-template-columns: 1fr; }
}
