/* Typography for model-written Markdown: the Recap and the Digest.
 *
 * The renderer sets no inline styles — the Pages CSP forbids them — so every
 * rule a rendered document needs lives here, hung off the one `.prose` class
 * its container carries.
 *
 * Headings are the page's own sans, sized by level: the Recap renders at h4
 * and the Digest at h6, so a section break inside a card never competes with
 * the card's own title.
 */

.prose {
  max-width: 46rem;
  color: inherit;
  font-size: 0.92rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.prose:empty {
  display: none;
}

.prose > :first-child {
  margin-top: 0;
}

.prose > :last-child {
  margin-bottom: 0;
}

.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  margin: 1.4em 0 0.4em;
  color: var(--ink);
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.prose h3 {
  font-size: 1.05rem;
}

.prose h4 {
  font-size: 0.92rem;
}

.prose h5 {
  font-size: 0.86rem;
}

.prose h6 {
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

/* A heading that opens a section reads as a section break, not a new page. */
.prose h4 + ul,
.prose h5 + ul,
.prose h6 + ul,
.prose h4 + ol,
.prose h5 + ol,
.prose h6 + ol {
  margin-top: 0.35em;
}

.prose p {
  margin: 0 0 0.9em;
  color: var(--ink-soft);
}

.prose ul,
.prose ol {
  margin: 0 0 1.4em;
  padding-left: 1.2em;
  color: var(--ink-soft);
}

.prose li {
  margin-bottom: 0.35em;
}

/* Nested lists are the shape both prompts ask for; keep them tight. */
.prose li > ul,
.prose li > ol {
  margin: 0.35em 0 0.15em;
}

.prose blockquote {
  margin: 0 0 0.9em;
  padding: 0.5em 0.9em;
  border-left: 3px solid var(--border-firm);
  border-radius: 0 0.5rem 0.5rem 0;
  color: var(--ink-muted);
  background: var(--chip);
}

.prose blockquote > :last-child {
  margin-bottom: 0;
}

.prose code {
  padding: 0.1em 0.35em;
  border-radius: 0.35rem;
  background: var(--chip);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 0.9em;
}

.prose strong {
  font-weight: 650;
}
