/*
 * Styling for server-rendered post bodies.
 *
 * The markup inside .post__body is produced by the backend Markdown renderer
 * from a fixed tag allowlist: p, br, hr, h3-h5, strong, em, code, pre, ul, ol,
 * li, blockquote and a. Nothing else can appear, so these selectors cover the
 * complete surface.
 */

.post__body {
  font-family: var(--font-reading);
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--text-primary);
  max-width: var(--measure);
  overflow-wrap: break-word;
}

.post__body > * + * {
  margin-top: var(--space-4);
}

.post__body h3,
.post__body h4,
.post__body h5 {
  margin-top: var(--space-6);
  font-size: var(--text-lg);
}

.post__body h5 {
  font-size: var(--text-md);
}

.post__body ul,
.post__body ol {
  padding-left: var(--space-6);
}

.post__body ul { list-style: disc; }
.post__body ol { list-style: decimal; }

.post__body li + li {
  margin-top: var(--space-2);
}

.post__body a {
  text-decoration: underline;
}

/* An outbound link is marked so a reader knows the click leaves the forum
   before it happens. The forum never fetches a remote preview. */
.post__body a[target="_blank"]::after {
  content: "↗";
  display: inline-block;
  margin-left: 0.2em;
  font-size: 0.8em;
  vertical-align: baseline;
  text-decoration: none;
}

.post__body strong {
  font-weight: var(--weight-bold);
}

.post__body code {
  padding: 0.1em 0.35em;
  border-radius: var(--radius-xs);
  background: var(--surface-sunken);
  border: var(--border-width) solid var(--line);
  font-size: 0.86em;
}

.post__body pre {
  padding: var(--space-4);
  border-radius: var(--radius-sm);
  border: var(--border-width) solid var(--line);
  background: var(--surface-sunken);
  overflow-x: auto;
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

.post__body pre code {
  padding: 0;
  border: none;
  background: none;
  font-size: inherit;
}

.post__body blockquote {
  padding-left: var(--space-4);
  border-left: var(--border-strong-width) solid var(--line-strong);
  color: var(--text-secondary);
  font-style: italic;
}

.post__body hr {
  margin-block: var(--space-6);
}
