/* The blog. Loads after site.css and uses its tokens, cards and buttons. Pages are written by blog/build.mjs. */
.blog .hero { padding-bottom: 40px; }
.blog .hero h1 { max-width: 900px; }
.blog .hero .lede { max-width: 680px; }

/* ---------- a post ---------- */
.post { padding: 44px 0 80px; }
.post-head { max-width: 860px; }
.crumbs { font: 600 .74rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.post h1 { font-size: clamp(2.3rem, 5.6vw, 4rem); text-wrap: balance; }
.byline { display: flex; align-items: center; gap: 12px; margin: 22px 0 0; font-size: .92rem; color: var(--muted); line-height: 1.45; }
.byline img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
.byline a { color: var(--fg); font-weight: 700; }

.post-top { display: grid; gap: 28px; margin-top: 34px; align-items: start; }
.post-top.tall { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); }
@media (max-width: 760px) { .post-top.tall { grid-template-columns: 1fr; } }
.media { margin: 0; }
.media video, .media img { display: block; width: 100%; height: auto; border-radius: 16px; background: #12161b; }
.media.wide video { aspect-ratio: 16 / 9; object-fit: cover; }
.media.tall video { aspect-ratio: 9 / 16; object-fit: cover; max-height: 600px; }
@media (max-width: 760px) { .media.tall video { aspect-ratio: 4 / 5; } }
.media figcaption { margin-top: 10px; font-size: .88rem; color: var(--muted); }

.takeaways { background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--ok); border-radius: 16px; padding: 24px 26px; }
.takeaways h2 { font-size: 1.5rem; margin-bottom: 14px; }
.takeaways ul { margin: 0; padding-left: 20px; display: grid; gap: 10px; }

.post-body { max-width: 720px; margin-top: 38px; font-size: 1.06rem; line-height: 1.68; }
.post-body > * { margin: 0; }
.post-body > * + * { margin-top: 18px; }
.post-body .intro { font-size: 1.2rem; line-height: 1.55; color: #2b333c; }
.post-body h2 { font-size: clamp(1.7rem, 3.6vw, 2.3rem); line-height: 1; margin-top: 52px; scroll-margin-top: 90px; text-wrap: balance; }
.post-body h3 { font-size: 1.35rem; line-height: 1.05; margin-top: 34px; scroll-margin-top: 90px; }
.post-body ul { padding-left: 22px; display: grid; gap: 8px; }
.post-body a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 24px; margin-top: 28px !important; }
.toc h2 { font: 600 .74rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.toc ol { margin: 0; padding-left: 22px; display: grid; gap: 7px; font-size: .98rem; line-height: 1.4; }
.post-body .scroll { margin-top: 22px; }
.post-body table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .95rem; line-height: 1.45; }
.post-body th, .post-body td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.post-body thead th { font: 600 .72rem/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.post-body tbody tr:last-child th, .post-body tbody tr:last-child td { border-bottom: 0; }

/* ---------- lists of posts ---------- */
.more-posts { padding: 70px 0; }
.more-posts.first { padding-top: 10px; border: 0; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; margin-top: 30px; }
.post-card { display: grid; gap: 10px; align-content: start; padding: 0 0 22px; overflow: hidden; }
.post-card > :not(.thumb) { margin: 0 22px; }
.post-card .thumb { display: block; margin-bottom: 8px; }
.post-card .thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.post-card .kick { margin-bottom: 0; }
.post-card h3 { font-size: 1.5rem; line-height: 1; }
.post-card h3 a { color: var(--fg); text-decoration: none; }
.post-card h3 a:hover { text-decoration: underline; }
.post-card p:last-child { color: var(--muted); font-size: .95rem; }
