/* Blog pages: docs.css plus a layout as wide as the header bar (1400px with 20px gutters). */
main.doc.blog { padding: 44px 20px 32px; }
.blog .inner { max-width: 1360px; margin: 0 auto; }
/* Short pages: the footer sits at the bottom of the screen; long pages push it down as usual. */
main.doc.blog { display: flex; flex-direction: column; min-height: calc(100vh - var(--header)); min-height: calc(100svh - var(--header)); }
.blog .inner { flex: 1; width: 100%; display: flex; flex-direction: column; }
.blog .inner > .doc-foot { margin-top: auto; }
.blog .inner > :nth-last-child(2) { margin-bottom: 80px; }
@media (max-width: 860px) { main.doc.blog { padding: 24px 16px 24px; } }

.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 10px; color: var(--faint); font-size: 14.5px; }
.badge { font: 600 12px/1 Inter, Arial, sans-serif; letter-spacing: .6px; text-transform: uppercase; padding: 6px 10px; border-radius: 999px;
  background: var(--pill); color: var(--accent-2); text-decoration: none; }
.badge.advisory { background: rgba(242, 102, 92, .16); color: #ff9b93; }
.badge.release { background: rgba(92, 193, 132, .16); color: #8be0ad; }

/* Post: a readable column on the left, a sticky sidebar on the right. */
.post-layout { display: grid; grid-template-columns: minmax(0, 800px) 300px; justify-content: space-between; gap: 64px; }
.post h1 { margin-top: 4px; }
.post .lead { max-width: none; margin-bottom: 30px; padding-bottom: 26px; border-bottom: 1px solid var(--border); }
.post h2 { margin-top: 44px; scroll-margin-top: calc(var(--header) + 24px); }
.post h2 + h3 { margin-top: 12px; }
.post .code pre { white-space: pre; }
.post-side { position: sticky; top: calc(var(--header) + 28px); align-self: start; display: grid; gap: 22px; min-width: 0; }
.toc .eyebrow { margin: 0 0 8px; font-size: 12px; }
.toc ul { list-style: none; margin: 0; padding: 0 0 0 2px; border-left: 1px solid var(--border); }
.toc li { margin: 0; }
.toc li::marker { content: none; }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: 14.5px; line-height: 1.4; }
.toc a { transition: color .15s, border-color .15s; }
.toc a:hover { color: var(--text); }
.toc a.on { color: var(--text); font-weight: 600; border-left-color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .toc a { transition: none; } }
.try { padding: 20px 22px; border-radius: 16px; background: rgba(47, 29, 102, .35); border: 1px solid var(--border); font-size: 15px; }
.try p { margin: 0 0 10px; }
.try p:last-child { margin: 0; }
.try .code { margin: 12px 0 14px; }
.try .code pre { padding: 14px 72px 14px 14px; font-size: 13px; }
@media (max-width: 1100px) {
  .post-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .post-side { position: static; margin-top: 56px; }
  .toc { display: none; }
}

/* Index: cards in a grid. */
.blog-head { margin-bottom: 40px; }
.blog-head .lead { max-width: none; }
.posts { list-style: none; padding: 0 !important; margin: 0; display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); }
.posts li { margin: 0; }
.posts li::marker { content: none; }
.posts a { display: flex; flex-direction: column; height: 100%; text-decoration: none; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  transition: border-color .2s; }
.posts a:hover { border-color: var(--accent); }
.posts img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; border-bottom: 1px solid var(--border); }
.posts .post-meta { padding: 18px 22px 0; margin: 0; }
.posts b { display: block; padding: 8px 22px 0; color: var(--text); font: 700 21px/1.3 var(--display); }
.posts .desc { display: block; padding: 6px 22px 20px; color: var(--muted); font-size: 15px; line-height: 1.55; }
@media (prefers-reduced-motion: reduce) { .posts a { transition: none; } }
