/* Blog index and articles. Shared tokens and components live in styles.css. */

.blog-top { padding-top: 48px; padding-bottom: 24px; }
.blog-top h1 { font-size: clamp(40px, 6vw, 68px); margin: 0 0 10px; color: var(--navy); }
.blog-list { display: grid; gap: 20px; padding-bottom: 80px; }
.post-card { display: block; border: 1px solid var(--line); border-radius: 16px; padding: 20px; text-decoration: none; color: var(--ink); background: #fff; transition: border-color .15s; }
.post-card:hover { border-color: var(--navy); }
.post-card h2, .post-card h3 { color: var(--navy); margin: 4px 0 8px; line-height: 1.2; text-wrap: balance; }
.post-card h2 { font-size: 26px; }
.post-card h3 { font-size: 18px; }
.post-card p { color: var(--ink-2); font-size: 15px; }
.post-card-lg { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 28px; align-items: center; }
.post-card-lg img { width: 100%; aspect-ratio: 3 / 2; object-fit: contain; background: #fff; border-radius: 10px; }
.post-card .more { display: inline-block; margin-top: 12px; font-weight: 600; color: var(--navy); }
.post-meta { font-size: 13px; color: var(--ink-3); margin: 0; }

.post { padding-bottom: 72px; }
.post-head h1 { font-size: clamp(34px, 5vw, 60px); line-height: 1.06; color: var(--navy); margin: 18px 0 12px; max-width: 22ch; text-wrap: balance; }
.post-cover { margin: 28px 0 40px; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: #fff; }
.post-cover img { width: 100%; height: clamp(240px, 38vw, 460px); object-fit: contain; display: block; padding: 20px; }
.post-body { display: grid; grid-template-columns: minmax(0, 760px) 240px; justify-content: space-between; gap: 56px; align-items: start; }
.prose { font-size: 18px; line-height: 1.75; color: #22252c; min-width: 0; }
.toc { position: sticky; top: 88px; border-left: 2px solid var(--line); padding-left: 18px; }
.toc-title { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--green); font-weight: 700; margin: 0 0 10px; }
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.toc a { color: var(--ink-2); text-decoration: none; font-size: 14px; line-height: 1.4; display: block; }
.toc a:hover { color: var(--navy); }
.prose h2 { font-family: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 28px; line-height: 1.2; color: var(--navy); margin: 44px 0 10px; scroll-margin-top: 80px; }
.prose h3 { font-size: 20px; margin: 28px 0 6px; }
.prose p { margin: 0 0 18px; }
.prose ul { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose .table-wrap { margin: 8px 0 28px; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.4; }
.prose th { text-align: left; font-weight: 600; color: var(--navy); background: var(--bg-soft); padding: 10px 16px; border-bottom: 1px solid var(--line); }
.prose td { padding: 8px 16px; border-bottom: 1px solid var(--line); }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose .num { text-align: right; font-variant-numeric: tabular-nums; }
.prose a { color: var(--navy); font-weight: 600; }
.post-cta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 32px; margin-top: 56px; padding: 24px; border-radius: 16px; background: var(--bg-soft); }
.post-cta-title { font-family: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 22px; font-weight: 600; color: var(--navy); margin: 0 0 4px; }
.post-cta p { color: var(--ink-2); }
.post-cta .cta-row { margin-top: 0; }
.more-posts { margin-top: 56px; }
.more-posts h2 { font-size: 24px; color: var(--navy); }
.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 14px; }

@media (max-width: 1000px) {
  .post-body { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 760px) {
  .post-card-lg { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .prose { font-size: 17px; }
  .prose h2 { font-size: 24px; }
}

/* a picture inside an article (build_blog.py: ![alt](path) and its caption) */
.prose .post-fig { margin: 8px 0 28px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-align: center; }
.prose .post-fig img { display: block; margin: 0 auto; max-width: 100%; height: auto; max-height: 380px; }
.prose .post-fig figcaption { margin-top: 12px; font-size: 14px; color: var(--ink-2); }
