/* The blog: /blog and each post. Loaded after site.css, which holds the
   colors, fonts, header, footer and the dark .page-head band. */

/* Post header */
.post-head h1 { font-size: clamp(34px, 4.6vw, 52px); line-height: 1.08; max-width: 22ch; }
.post-head .kicker a { color: inherit; text-decoration: none; }
.post-head .kicker a:hover { color: #fff; }
.post-meta { margin-top: 26px; padding-left: 14px; border-left: 2px solid var(--ink-line-2); }
.page-head .post-meta p { margin: 0; max-width: none; font-size: 15px; line-height: 1.5; }
.page-head .post-meta .byline { color: var(--ink-text); font-weight: 600; }
.page-head .post-meta .author-line { color: var(--ink-muted); }
.page-head .post-meta .reviewed { margin-top: 8px; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.02em; color: var(--ink-faint); }

/* Reading column: about 68 characters a line. */
.prose { max-width: 68ch; padding: 56px 0 8px; font-size: 18px; line-height: 1.7; color: var(--text); }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 20px; }
.prose > p:first-child { font-size: 19.5px; line-height: 1.6; }
.prose h2 { font-size: clamp(25px, 2.6vw, 30px); line-height: 1.2; letter-spacing: -0.02em; margin: 52px 0 16px; scroll-margin-top: 84px; }
.prose h3 { font-size: 20.5px; line-height: 1.3; margin: 36px 0 12px; scroll-margin-top: 84px; }
.prose h4 { font-size: 18px; margin: 28px 0 10px; }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 26px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--accent); }
.prose ol li::marker { font-weight: 600; }
.prose li > p { margin-bottom: 10px; }
.prose strong { font-weight: 650; }
.prose a { overflow-wrap: anywhere; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.prose img { max-width: 100%; height: auto; border-radius: var(--r-sm); border: 1px solid var(--line); }
.prose blockquote { margin: 0 0 20px; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent-line); color: var(--muted); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code { font-family: var(--mono); font-size: 0.86em; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); overflow-wrap: anywhere; }
.prose pre { margin: 0 0 24px; padding: 16px 18px; overflow-x: auto; border-radius: var(--r-sm); background: var(--ink-2); color: var(--ink-text); font-size: 14.5px; line-height: 1.6; }
.prose pre code { padding: 0; border: 0; background: none; color: inherit; font-size: inherit; overflow-wrap: normal; }

/* Tables scroll sideways on a phone instead of squeezing. */
.table-scroll { margin: 0 0 24px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-sm); }
.table-scroll:focus-visible { outline-offset: 2px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; }
.prose table:has(tr > :nth-child(3)) { min-width: 560px; }
.prose th, .prose td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { background: var(--surface-2); font-weight: 650; color: var(--text); }
.prose tr:last-child td { border-bottom: 0; }

/* A pillar's table of contents, after the short answer. */
.toc { margin: 8px 0 36px; padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.prose .toc-h { margin: 0 0 8px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.prose .toc ol { margin: 0; padding-left: 22px; font-size: 16.5px; }
.prose .toc li { margin: 4px 0; }

/* After the post: the hub's other posts and the one call to action. */
.post-end { max-width: 68ch; padding: 8px 0 96px; }
.post-more { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.post-more h2 { font-size: 21px; letter-spacing: -0.015em; margin: 0 0 12px; }
.post-more ul { padding-left: 22px; display: grid; gap: 8px; }
.post-more li::marker { color: var(--accent); }
.post-cta { margin: 36px 0 0; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); }
.post-cta a { font-weight: 600; }

/* The index */
.blog-index { padding-top: 56px; padding-bottom: 104px; }
.hub { max-width: 820px; }
.hub + .hub { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line); }
.hub h2 { font-size: clamp(24px, 2.6vw, 30px); letter-spacing: -0.02em; margin: 0 0 20px; scroll-margin-top: 84px; }
.post-list { list-style: none; display: grid; gap: 14px; }
.post-item { padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.post-item.pillar { border-color: var(--accent-line); background: var(--accent-soft); }
.post-item h3 { font-size: 19px; line-height: 1.35; }
.post-item h3 a { color: var(--text); text-decoration: none; }
.post-item h3 a:hover { color: var(--accent); text-decoration: underline; }
.post-tag { margin: 0 0 6px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.post-date { margin: 4px 0 8px; font-family: var(--mono); font-size: 12.5px; color: var(--faint); }
.post-short { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.hub h2 a { color: inherit; text-decoration: none; }
.hub h2 a:hover { color: var(--accent); text-decoration: underline; }
.hub-more { margin: 18px 0 0; font-weight: 600; }

@media (max-width: 720px) {
  .prose { padding-top: 40px; font-size: 17px; }
  .prose > p:first-child { font-size: 18px; }
  .prose pre { margin-left: -4px; margin-right: -4px; }
  .post-item { padding: 16px 18px; }
  .blog-index { padding-top: 40px; }
}
