/* Blog, pillar, tool and learn pages: the reading layout. Tokens from DESIGN.md via site.css. */

.post-head__pillar a { text-decoration: none; }
.post-head__lede { font-size: 1.3rem; line-height: 1.45; max-width: 64ch; color: var(--ink-soft); margin: 12px 0 16px; }
.post-head__meta { color: var(--ink-soft); }
.post-head__meta a { color: inherit; }

.post-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-bottom: clamp(64px, 10vw, 128px); }
@media (min-width: 1024px) {
  .post-grid { grid-template-columns: 200px minmax(0, 68ch) minmax(0, 1fr); gap: 48px; align-items: start; }
  .post-toc { position: sticky; top: calc(var(--nav-h, 64px) + 24px); }
}
.post-toc ol { list-style: none; margin: 8px 0 0; padding: 0; }
.post-toc li { margin: 0 0 8px; font-size: 0.9375rem; line-height: 1.35; }
.post-toc a { color: var(--ink-soft); text-decoration: none; display: inline-block; padding: 4px 0; }
.post-toc a:hover { color: var(--teal); text-decoration: underline; }
@media (max-width: 1023px) { .post-toc { border-bottom: 1px solid var(--rule); padding-bottom: 16px; } }

.post { min-width: 0; }
.post__body > * + * { margin-top: 1.1em; }
.post__body h2 { margin-top: 2.2em; scroll-margin-top: calc(var(--nav-h, 64px) + 16px); }
.post__body h3 { margin-top: 1.6em; }
.post__body p, .post__body li { max-width: 68ch; }
.post__body table { border-collapse: collapse; width: 100%; font-size: 0.95rem; display: block; overflow-x: auto; }
.post__body th, .post__body td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.post__body th { font-family: var(--f-mono); font-size: 0.8125rem; letter-spacing: 0.02em; font-weight: 400; color: var(--ink-soft); }
.post__body blockquote { margin: 1.4em 0; padding: 0 0 0 20px; border-left: 3px solid var(--teal); color: var(--ink); font-style: italic; }
.post__body code { font-family: var(--f-mono); font-size: 0.9em; background: var(--paper-light); padding: 1px 4px; border-radius: 2px; }
.post__body pre { background: var(--paper-light); border: 1px solid var(--rule); padding: 16px; overflow-x: auto; border-radius: 2px; }
.post__body pre code { background: none; padding: 0; }
.post-fig { margin: 2em 0; background: var(--paper-light); border: 1px solid var(--rule); padding: 16px; }
.post-fig img { width: 100%; height: auto; display: block; }
.post-fig figcaption { margin-top: 12px; font-size: 0.95rem; color: var(--ink-soft); }
.post-fig figcaption .label { margin-right: 6px; }

.takeaways { background: var(--paper-light); border: 1.5px solid var(--ink); padding: 24px 28px; margin: 0 0 2em; }
.takeaways ul { margin: 12px 0 0; padding-left: 20px; }
.takeaways li { margin: 0 0 8px; }

.faq-block { margin-top: 3em; }
.faq-block dl { margin: 0; }
.faq-block__item { padding: 16px 0; border-top: 1px solid var(--rule); }
.faq-block dt { font-weight: 700; font-family: var(--f-display); font-size: 1.1rem; letter-spacing: -0.01em; }
.faq-block dd { margin: 8px 0 0; }

.cta-book { margin-top: 3em; padding: 28px 32px; background: var(--teal-deep); color: var(--paper); border-radius: 2px; }
.cta-book .label { color: var(--teal-light); }
.cta-book a { color: var(--paper); }
.cta-book__ch { margin: 8px 0; }
.cta-book__ch .tag { margin-left: 8px; }
.cta-book__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.cta-book .btn--secondary { color: var(--paper); border-color: var(--paper); }

.sources { margin-top: 3em; font-size: 0.95rem; }
.sources ol { padding-left: 20px; }
.sources li { margin: 0 0 6px; }

.author-box { margin-top: 3em; padding-top: 20px; border-top: 1px solid var(--rule); }

.post-side { min-width: 0; }
.related { margin-bottom: 28px; }
.related ul { list-style: none; padding: 0; margin: 8px 0 0; }
.related li { margin: 0 0 10px; line-height: 1.4; }
@media (min-width: 1024px) { .post-side { position: sticky; top: calc(var(--nav-h, 64px) + 24px); } }

.blog-index { padding-bottom: clamp(64px, 10vw, 128px); }
.blog-index__pillar { padding: 32px 0; border-top: 1px solid var(--rule); }
.blog-index__pillar h2 a { text-decoration: none; color: inherit; }
.post-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; margin-top: 20px; }
.post-card { background: var(--paper-light); border: 1px solid var(--rule); padding: 24px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.post-card h3 { font-size: 1.25rem; margin: 0; letter-spacing: -0.015em; }
.post-card h3 a { text-decoration: none; color: inherit; }
.post-card h3 a:hover { text-decoration: underline; }
.post-card p { margin: 0; }

@media print { .post-toc, .post-side, .cta-book { display: none; } }

/* Reading pages use a calmer heading scale than the landing's section titles. */
.post__body h2, .faq-block h2, .pillar-chapters h2, .pillar-kit h2, .pillar-posts h2, .lectures h2, .license h2, .sources h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.15rem); letter-spacing: -0.02em; line-height: 1.1; }
.post__body h3 { font-size: 1.3rem; }
.post__body > :first-child { margin-top: 0; }
.post-grid { padding-top: clamp(28px, 4vw, 48px); }
