/* 增大正文行高,适配中文阅读 —— 比 mdbook 默认 1.45 高出约 45% */

.content p,
.content li,
.content blockquote,
.content table,
.content dl {
  line-height: 2.1;
}

/* 列表项之间也留一点呼吸 */
.content li + li,
.content li > p:first-child {
  margin-top: 0.4em;
}

/* 段落之间多一点空 */
.content p {
  margin-top: 1em;
  margin-bottom: 1em;
}

/* 代码块保持紧凑(行高过大会破坏 mono 对齐) */
.content pre,
.content pre code {
  line-height: 1.5;
}

/* 表格内文字也宽松一点,但不要过头 */
.content table td,
.content table th {
  line-height: 1.7;
  padding: 0.55em 0.7em;
}

/* 标题与下一段之间的呼吸 */
.content h2,
.content h3,
.content h4 {
  margin-top: 1.6em;
}

/* —— 折叠展开块(完整文件查看)—— */
.content details {
  border: 1px solid #cbd5e1;
  border-left: 3px solid #2563eb;
  border-radius: 4px;
  padding: 0.6em 1em;
  margin: 1.2em 0;
  background: #f8fafc;
}

.content details summary {
  cursor: pointer;
  font-weight: 600;
  color: #2563eb;
  user-select: none;
  line-height: 1.7;
  list-style: none;
}

.content details summary::before {
  content: "▸ ";
  display: inline-block;
  margin-right: 0.3em;
  transition: transform 0.15s;
}

.content details[open] summary::before {
  content: "▾ ";
}

.content details[open] summary {
  margin-bottom: 0.6em;
  border-bottom: 1px dashed #cbd5e1;
  padding-bottom: 0.4em;
}

/* 折叠区里的代码块限高 + 滚动 */
.content details pre {
  max-height: 480px;
  overflow: auto;
}
