/* Article-body typography for the server-rendered blog (backend/templates).
 * Scoped entirely under .post-body; consumes design tokens from brand.css -
 * link brand.css BEFORE this file (see backend/templates/base.html).
 *
 * Named prose.css (not named after the /blog path): Apache's `ProxyPass
 * /blog` is a plain string-prefix match, so a stylesheet whose name also
 * started with "blog" would be proxied to this app and 404 instead of being
 * served from disk.
 */

.post-body {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text);
}

.post-body > *:first-child { margin-top: 0; }
.post-body > *:last-child  { margin-bottom: 0; }

.post-body h2 {
  font-size: 21px;
  font-weight: 600;
  color: #1A1108;
  letter-spacing: -0.01em;
  line-height: 1.35;
  margin: 40px 0 14px;
}

.post-body h3 {
  font-size: 17px;
  font-weight: 600;
  color: #1A1108;
  line-height: 1.4;
  margin: 32px 0 12px;
}

.post-body p {
  margin: 0 0 18px;
}

.post-body ul,
.post-body ol {
  margin: 0 0 18px;
  padding-left: 24px;
}

.post-body li {
  margin-bottom: 8px;
}
.post-body li:last-child { margin-bottom: 0; }

.post-body a {
  color: var(--primary);
  text-decoration: underline;
  transition: color 0.15s ease;
}
.post-body a:hover {
  color: #9A3D13;
  text-decoration: none;
}

.post-body blockquote {
  margin: 24px 0;
  padding: 4px 20px;
  border-left: 3px solid var(--primary);
  color: var(--muted-fg);
  font-style: italic;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
  display: block;
  overflow-x: auto;
}

.post-body th,
.post-body td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}

.post-body th {
  background: var(--muted);
  font-weight: 600;
  color: #1A1108;
}

.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  margin: 8px 0;
}

.post-body figure {
  margin: 24px 0;
}

.post-body figcaption {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

.post-body code {
  background: var(--muted);
  color: var(--text);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.post-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

.post-body strong { font-weight: 600; color: #1A1108; }
.post-body em { font-style: italic; }

@media (max-width: 480px) {
  .post-body {
    font-size: 15px;
    line-height: 1.8;
  }
  .post-body h2 { font-size: 19px; margin: 32px 0 12px; }
  .post-body h3 { font-size: 16px; margin: 26px 0 10px; }
}
