/* ============================================================
   prose.css —— 正文 typography 细节
   ============================================================ */

.prose {
  font-size: 17px;
  line-height: 1.85;
}
.prose h1 + .chapter-lede {
  margin-top: -10px;
}
.prose h2 {
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.prose h2::before {
  content: "";
  display: block;
  width: 32px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  margin-bottom: 14px;
}
.prose h3 {
  scroll-margin-top: calc(var(--header-h) + 24px);
  color: var(--ink);
}
.prose h3::before {
  content: "▸";
  color: var(--primary);
  margin-right: 8px;
  font-weight: 400;
}
.prose p, .prose li { color: var(--ink); }
.prose ul li::marker { color: var(--accent); }
.prose ol li::marker { color: var(--primary); font-weight: 700; }
.prose a:not(.btn):not(.chapter-card):not(.chapter-nav__link) {
  border-bottom: 1px dashed currentColor;
}
.prose a:not(.btn):not(.chapter-card):not(.chapter-nav__link):hover {
  border-bottom-style: solid;
}

/* 引用 */
.prose blockquote {
  margin: 1.4rem 0;
  padding: 12px 20px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink-soft);
  font-style: italic;
  font-size: 0.96rem;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose blockquote cite {
  display: block;
  font-style: normal;
  font-size: 0.84rem;
  color: var(--ink-muted);
  margin-top: 6px;
}

/* 表格 */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0;
  font-size: 0.94rem;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.prose th, .prose td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.prose th {
  background: var(--surface-2);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.prose tr:last-child td { border-bottom: none; }
.prose td code { font-size: 0.88em; }

@media (max-width: 820px) {
  .prose table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  .prose th,
  .prose td {
    min-width: 150px;
  }
}

/* 对话气泡(用于演示"你说" vs "Codex 回答") */
.dialog {
  margin: 1.4rem 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dialog__bubble {
  position: relative;
  padding: 12px 16px;
  border-radius: 14px;
  max-width: 92%;
  line-height: 1.7;
  font-size: 0.96rem;
  white-space: pre-wrap;
}
.dialog__bubble--you {
  align-self: flex-end;
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 4px;
}
.dialog__bubble--codex {
  align-self: flex-start;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-1);
}
.dialog__who {
  font-size: 0.74rem;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 4px;
  font-weight: 700;
}
.dialog__bubble--you .dialog__who { color: rgba(255, 255, 255, 0.7); }

/* FAQ */
.faq {
  margin: 1.6rem 0;
}
.faq details {
  border-bottom: 1px solid var(--border);
  padding: 14px 4px;
}
.faq details:first-child { border-top: 1px solid var(--border); }
.faq summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  font-size: 0.98rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--ink-muted);
  width: 24px;
  text-align: center;
  transition: transform .15s var(--ease);
  line-height: 1;
}
.faq details[open] summary::after { transform: rotate(45deg); color: var(--accent); }
.faq__body {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.75;
}

/* kbd */
kbd {
  display: inline-block;
  padding: 1px 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.82em;
  color: var(--ink-soft);
  line-height: 1.4;
}
