/* The blog (/blog and /blog/{slug}), served by website-functions/blog/blog.mjs. Builds on styles.css. */
.blog-hero h1, .post-head h1 { font-size: clamp(32px, 4.4vw, 46px); font-weight: 800; }
.blog-hero h1 { margin-bottom: 28px; }
.blog-empty { color: var(--ink-2); font-size: 17px; }
.blog-empty a, .post-back a { color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.blog-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.blog-list li { padding: 22px 0; border-top: 1px solid var(--line); }
.blog-list li:last-child { border-bottom: 1px solid var(--line); }
.blog-list h2 { font-size: 21px; font-weight: 700; line-height: 1.3; }
.blog-list h2 a:hover { color: var(--brand); }
.post-meta { margin-top: 6px; color: var(--muted); font-size: 14.5px; display: flex; flex-wrap: wrap; gap: 0 6px; }

.post-head { margin-bottom: 32px; }
.post-head .post-meta { margin-top: 12px; }
.post-image { width: 100%; height: auto; border-radius: var(--radius); margin-bottom: 32px; }

/* Article body: the API's HTML, sanitised. Only text formatting reaches here. */
.post-body { font-size: 17.5px; line-height: 1.7; color: var(--ink-2); overflow-wrap: break-word; }
.post-body > * + * { margin-top: 18px; }
.post-body h2 { font-size: clamp(23px, 2.6vw, 28px); font-weight: 800; color: var(--ink); margin-top: 44px; scroll-margin-top: 84px; }
.post-body h3 { font-size: 20px; font-weight: 700; color: var(--ink); margin-top: 30px; scroll-margin-top: 84px; }
.post-body h4 { font-size: 17.5px; font-weight: 700; color: var(--ink); margin-top: 24px; }
.post-body h2 + *, .post-body h3 + *, .post-body h4 + * { margin-top: 10px; }
.post-body a { color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.post-body strong, .post-body b { color: var(--ink); }
.post-body ul, .post-body ol { padding-left: 1.4em; }
.post-body li + li { margin-top: 6px; }
.post-body li::marker { color: var(--brand); }
.post-body blockquote { margin-inline: 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--brand-2); color: var(--ink); font-style: italic; }
.post-body code { font-size: 0.88em; background: var(--bg-alt); padding: 1px 6px; border-radius: 5px; }
.post-body pre { background: var(--night); color: #e6f0ec; padding: 16px 18px; border-radius: 12px; overflow-x: auto; font-size: 14.5px; }
.post-body pre code { background: none; padding: 0; color: inherit; }
.post-body hr { border: 0; border-top: 1px solid var(--line); margin-block: 36px; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 15.5px; display: block; overflow-x: auto; }
.post-body th, .post-body td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.post-body thead th { color: var(--ink); background: var(--bg-alt); font-weight: 700; }
.post-body caption { caption-side: bottom; color: var(--muted); font-size: 14px; padding-top: 8px; text-align: left; }

/* "Key takeaways" (always first in the article) gets the soft panel; FAQ questions read as rows. */
.post-body > h2:first-child { margin-top: 0; font-size: 15px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand); }
.post-body > h2:first-child + ul, .post-body > h2:first-child + ol { background: var(--brand-soft); border-radius: var(--radius); padding: 20px 22px 20px 2.6em; color: var(--ink); }
.post-body h2#faq ~ h3 { border-top: 1px solid var(--line); padding-top: 22px; }

.post-toc { background: var(--bg-alt); border-radius: var(--radius); padding: 20px 22px; }
.post-body .post-toc-title { margin: 0 0 10px; font-size: 15px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.post-toc ol { margin: 0; padding-left: 1.4em; font-size: 16px; }
.post-toc a { font-weight: 600; text-decoration: none; }
.post-toc a:hover { text-decoration: underline; }

.post-back { margin-top: 48px; font-size: 16px; }

@media (max-width: 620px) {
  .blog-hero h1 { margin-bottom: 20px; }
  .post-body { font-size: 16.5px; }
  .post-body h2 { margin-top: 36px; }
}
.blog-intro { color: var(--ink-2); font-size: 17.5px; margin: -12px 0 28px; max-width: 40em; }
