/* Blog: index and article pages. Colours come from the tokens in design.css. */
.blog-page { background: radial-gradient(900px 420px at 50% -10%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%), var(--bg) !important; }
.blog-page main { min-height: 60vh; }
.blog-page .nav-links a[aria-current="page"] { color: var(--text) !important; }
.blog-page .footer-icon { width: 16px; height: 16px; vertical-align: -3px; color: var(--accent); }

/* Index */
.blog-hero { padding: 72px 0 36px; text-align: center; }
.blog-hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -.045em; margin: 14px 0 12px; }
.blog-hero p { max-width: 560px; margin: 0 auto; color: var(--muted); font-size: 17px; line-height: 1.6; }
.blog-list { padding: 24px 0 72px; }
.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 920px; margin: 0 auto; }
.post-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 28px; box-shadow: var(--shadow); transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease; }
@media (hover: hover) { .post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); } }
.post-card h2 { font-size: 21px; line-height: 1.3; letter-spacing: -.02em; font-weight: 800; margin: 8px 0 10px; }
.post-card h2 a { color: var(--text); text-decoration: none; }
.post-card h2 a:hover { color: var(--accent); }
.post-card p { color: var(--muted); font-size: 15px; line-height: 1.6; flex: 1; }
.read-more { margin-top: 18px; font-weight: 700; font-size: 14px; color: var(--accent); text-decoration: none; }
.read-more:hover { color: var(--accent-hover); text-decoration: underline; }
.post-meta { font-size: 13px; color: var(--subtle); font-variant-numeric: tabular-nums; }

/* Article */
.wrap-narrow { max-width: 720px; margin: 0 auto; padding: 0 20px; }
.article-head { padding: 56px 0 8px; }
.back-link { display: inline-block; margin-bottom: 22px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; }
.back-link:hover { color: var(--text); }
.article-head h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); line-height: 1.15; font-weight: 800; letter-spacing: -.045em; margin-bottom: 14px; }

.prose { padding: 20px 0 8px; font-size: 17.5px; line-height: 1.78; color: var(--text); }
.prose > * + * { margin-top: 1.1em; }
.prose p.lead { font-size: 20px; line-height: 1.6; color: var(--text); font-weight: 500; }
.prose h2 { font-size: 1.55rem; line-height: 1.25; font-weight: 800; letter-spacing: -.03em; margin-top: 2.1em; scroll-margin-top: 90px; }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose a:hover { color: var(--accent-hover); }
.prose strong { font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-top: .5em; padding-left: .2em; }
.prose li::marker { color: var(--accent); font-weight: 700; }
.prose .callout { border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 12px; padding: 16px 20px; background: var(--accent-soft); font-size: 16.5px; line-height: 1.65; }
.prose .formula { text-align: center; padding: 18px 16px; border: 1px dashed var(--border-strong); border-radius: 12px; background: var(--surface-raised); font-weight: 800; font-size: 1.1rem; letter-spacing: -.01em; }
.prose .table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; font-variant-numeric: tabular-nums; }
.prose th, .prose td { text-align: left; padding: 10px 16px !important; border-bottom: 1px solid var(--border); }
.prose th { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--surface-raised); }
.prose tr:last-child td { border-bottom: 0; }

.callout-cta { margin: 56px 0 36px; padding: 32px; text-align: center; border-radius: 20px; border: 1px solid var(--border); background: linear-gradient(145deg, var(--accent-soft), var(--card)); box-shadow: var(--shadow); }
.callout-cta h2 { font-size: 1.4rem; font-weight: 800; letter-spacing: -.03em; margin-bottom: 8px; }
.callout-cta p { color: var(--muted); max-width: 480px; margin: 0 auto 20px; line-height: 1.6; }

.related h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin-bottom: 12px; }
.related-link { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; margin-bottom: 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); color: var(--text); text-decoration: none; transition: border-color .15s ease, background .15s ease; }
.related-link:hover { border-color: var(--accent); background: var(--surface-raised); }
.related-link span { flex-shrink: 0; font-size: 13px; font-weight: 700; color: var(--accent); }
.disclaimer { margin: 36px 0 64px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 13px; line-height: 1.6; color: var(--subtle); }

@media (max-width: 760px) {
  .blog-page .nav .wrap { gap: 12px; padding: 0 16px; }
  .blog-page .brand, .blog-page .nav-links a { white-space: nowrap; }
  .blog-page .nav-links { gap: 12px; }
  .post-grid { grid-template-columns: 1fr; }
  .blog-hero { padding: 48px 0 24px; }
  .prose { font-size: 17px; }
  .prose h2 { font-size: 1.35rem; }
  .callout-cta { padding: 24px 18px; }
  .related-link { flex-direction: column; align-items: flex-start; gap: 6px; }
}
@media (max-width: 520px) {
  /* Brand + Blog + the trial button + theme toggle is all that fits. */
  .blog-page .nav-links a[href$="/login"] { display: none; }
}
@media (prefers-reduced-motion: reduce) { .post-card, .related-link { transition: none; } }
