/* The blog's pages only (#65, written by scripts/build_blog.py): post bodies, bylines, lists, tag filters and the
   static quote card for citing a public X post. Kept apart from site.css so the other pages keep their versions. */

.post-byline a, .post-tags a { color: inherit; }
/* A section opens as far from the text above as on the docs and legal pages. */
.post-body h2 { margin-top: var(--space-16); }
@media (max-width: 640px) { .post-body h2 { margin-top: var(--space-10); } }
.post-body h3 { margin-top: var(--space-6); }
.post-body pre { overflow-x: auto; padding: var(--space-4); border: 1px solid var(--hairline); border-radius: var(--radius-md); background: var(--paper-raised); font-family: var(--font-mono); font-size: 0.875em; }
.post-body code { font-family: var(--font-mono); font-size: 0.925em; }
/* Inline code is a white chip under a hairline, as on the docs and legal pages. */
.post-body :not(pre) > code { padding: .1em .35em; border-radius: var(--radius-sm); background: var(--paper-raised); box-shadow: inset 0 0 0 1px var(--hairline); color: var(--ink); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.post-body blockquote { padding-left: var(--space-4); border-left: 3px solid var(--hairline-strong); color: var(--ink-secondary); }
/* The quote card frames its quote once: no blockquote rule inside it, and the quoted words in ink. */
.post-body .quote-card-text { padding-left: 0; border-left: 0; color: var(--ink); }
.post-body blockquote > * + * { margin-top: var(--space-3); }
.post-tags { max-width: 38rem; margin-top: var(--space-10); }

/* A guide's contents: quiet ink links without bullets, two columns where they fit, full-height rows on phones, and a
   rail beside the text on wide screens, as on the legal pages. */
.post-toc-list { margin: var(--space-2) 0 0; padding: 0; list-style: none; }
.post-toc-list a { display: inline-block; padding-block: 3px; color: var(--ink-secondary); text-decoration: underline; text-decoration-color: var(--hairline-strong); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.post-toc-list a:hover { color: var(--ink); text-decoration-color: currentColor; }
.post-toc-list a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-sm); }
.post-body > * + .post-toc { margin-top: var(--space-10); }
@media (min-width: 641px) { .post-toc-list { columns: 2; column-gap: var(--space-10); } .post-toc-list li { break-inside: avoid; } }
@media (max-width: 640px) { .post-toc-list a { display: block; padding-block: 10px; } }
@media (min-width: 1100px) {
  .post-body:has(> .post-toc) { display: grid; grid-template-columns: minmax(0, 38rem) 15rem; column-gap: var(--space-16); align-items: start; max-width: none; }
  .post-body:has(> .post-toc) > * { grid-column: 1; }
  .post-body > .post-toc { position: sticky; top: var(--space-6); grid-column: 2; grid-row: 1 / span 999; box-sizing: border-box; max-height: calc(100vh - 2 * var(--space-6)); margin: -4px; padding: 4px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .post-toc-list { columns: 1; }
}

/* The "Blog" label and the empty-state links are text links in ink, and the label is a full-height target. */
.page-head .label a { display: inline-block; margin-block: -14px; padding-block: 14px; }
.page-head .label a, .section p.blabr-secondary > a.blabr-link { color: var(--ink); text-decoration-color: var(--hairline-strong); }
.page-head .label a:hover, .section p.blabr-secondary > a.blabr-link:hover { text-decoration-color: currentColor; }
.page-head .label a:focus-visible { outline-offset: 2px; }
#posts-title + * { margin-top: var(--space-4); }

.tag-filters ul { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-10); padding: 0; list-style: none; }
.tag-filter { display: inline-flex; align-items: center; min-height: 36px; box-sizing: border-box; padding: var(--space-1) var(--space-4); border: 1px solid var(--hairline-strong); border-radius: var(--radius-pill); color: var(--ink); text-decoration: none; }
.tag-filter:hover { border-color: var(--ink); }
.tag-filter[aria-current="page"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.tag-filter:focus-visible, .blog-list-link:focus-visible, .post-byline a:focus-visible, .post-tags a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-sm); }
.tag-filter:focus-visible { border-radius: var(--radius-pill); }
@media (max-width: 640px) { .tag-filter { min-height: 44px; } }

.blog-list { display: flex; flex-direction: column; gap: var(--space-10); max-width: 72ch; margin: 0; padding: 0; list-style: none; }
.blog-list-item > * + * { margin-top: var(--space-2); }
.blog-list-link { color: inherit; text-decoration: none; }
.blog-list-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.quote-card { margin: var(--space-6) 0; padding: var(--space-6); border: 1px solid var(--hairline); border-radius: var(--radius-lg); background: var(--paper-raised); }
.quote-card-text { margin: 0; }
.quote-card-text > * + * { margin-top: var(--space-3); }
.quote-card-meta { margin-top: var(--space-4); color: var(--ink-secondary); }
.quote-card-name { color: var(--ink); font-weight: 600; }
.quote-card-meta a { color: inherit; }
