/* Project Eris blog — server-rendered styles. Loaded by blog_render output.
   Design-system class vocabulary here MUST stay in sync with the sanitizer
   allowlist (apps/functions/src/modules/blog/sanitize.ts ALLOWED_CLASSES). */

:root {
  --navy: #171a35;
  --accent: #4d5ff8;
  --accent-2: #e6a405;
  --body: #5e6075;
  --muted: #a3a5b5;
  --bg-soft: #f7f2fa;
  --stroke: #e2e2ea;
  --prose: #3d3f55;
  --white: #fff;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--body); background: var(--white); -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }
.blog-container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* Nav / footer */
.blog-nav { border-bottom: 1px solid var(--stroke); height: 64px; display: flex; align-items: center; position: sticky; top: 0; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); z-index: 10; }
.blog-logo { font-weight: 800; font-size: 20px; color: var(--navy); }
.blog-footer { border-top: 1px solid var(--stroke); padding: 40px 0; margin-top: 64px; color: var(--muted); font-size: 14px; }

/* List hero */
.blog-hero { background: linear-gradient(180deg, var(--bg-soft), var(--white)); padding: 56px 0 40px; }
.blog-hero h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; color: var(--navy); letter-spacing: -.02em; }
.blog-hero .lead { font-size: 17px; margin-top: 12px; max-width: 620px; line-height: 1.6; }
.blog-empty { padding: 48px 0; color: var(--muted); }

/* List grid */
.grid-section { padding: 40px 0 72px; }
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.article-card { border: 1px solid var(--stroke); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.article-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(23,26,53,.08); }
.article-thumb { aspect-ratio: 16/9; background: var(--bg-soft); overflow: hidden; }
.article-thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-thumb--empty { background: linear-gradient(135deg, #eef0ff, #f7f2fa); }
.article-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.article-meta { display: flex; gap: 10px; font-size: 12px; color: var(--muted); font-weight: 600; }
.article-card h3 { font-size: 17px; font-weight: 700; color: var(--navy); line-height: 1.35; }
.article-excerpt { font-size: 14px; line-height: 1.55; }

/* Pagination (anchor links styled as buttons) */
.pagination { margin-top: 48px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pag-btn { min-width: 40px; height: 40px; padding: 0 14px; border-radius: 10px; border: 1.5px solid var(--stroke); background: var(--white); color: var(--body); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; }
.pag-btn:hover { border-color: var(--navy); color: var(--navy); }
.pag-btn.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.pag-btn.disabled { color: var(--muted); opacity: .5; cursor: not-allowed; }

/* Article header */
.article-header { background: linear-gradient(180deg, var(--bg-soft), var(--white)); padding: 40px 0 28px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--navy); }
.article-header h1 { font-size: clamp(28px, 4vw, 46px); font-weight: 800; color: var(--navy); line-height: 1.1; letter-spacing: -.02em; max-width: 820px; }
.article-subtitle { font-size: 18px; margin-top: 16px; max-width: 720px; line-height: 1.6; }
.article-meta-row { display: flex; gap: 16px; margin-top: 20px; font-size: 13px; color: var(--muted); font-weight: 600; }
.article-author { color: var(--navy); }

/* Prose */
.article-section { padding: 40px 0 80px; }
.prose { max-width: 720px; color: var(--prose); font-size: 17px; line-height: 1.75; }
.prose p { margin-bottom: 22px; }
.prose h2 { font-size: clamp(23px, 2.4vw, 29px); font-weight: 800; color: var(--navy); margin: 44px 0 16px; line-height: 1.25; }
.prose h3 { font-size: 21px; font-weight: 700; color: var(--navy); margin: 30px 0 12px; }
.prose h4 { font-size: 18px; font-weight: 700; color: var(--navy); margin: 24px 0 10px; }
.prose strong { color: var(--navy); font-weight: 700; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }
.prose ul, .prose ol { margin: 18px 0 22px; padding-left: 24px; }
.prose li { margin-bottom: 10px; }
.prose img { border-radius: 14px; margin: 28px 0; }
.prose figure { margin: 28px 0; }
.prose figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; text-align: center; }
.prose code { background: var(--bg-soft); padding: 2px 6px; border-radius: 5px; font-size: .9em; }
.prose pre { background: var(--navy); color: #eef; padding: 18px; border-radius: 12px; overflow-x: auto; margin: 24px 0; }
.prose pre code { background: none; padding: 0; }

/* Component: pull quote */
.pull-quote { margin: 32px 0; padding: 28px 32px; background: linear-gradient(135deg, rgba(77,95,248,.06), rgba(77,95,248,.02)); border-left: 4px solid var(--accent); border-radius: 0 14px 14px 0; }
.pull-quote p { font-size: 20px; font-weight: 600; color: var(--navy); font-style: italic; line-height: 1.45; margin: 0; }
.pull-quote-cite { margin-top: 12px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }

/* Component: stats callout */
.stats-callout { margin: 32px 0; border: 1px solid var(--stroke); border-radius: 16px; overflow: hidden; }
.stats-callout-head { background: var(--bg-soft); padding: 14px 20px; font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--navy); }
.stats-callout-label { font-weight: 800; }
.stats-callout-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.stats-callout-cell { padding: 22px; text-align: center; border-right: 1px solid var(--stroke); }
.stats-callout-cell:last-child { border-right: none; }
.scc-num { font-size: 30px; font-weight: 800; color: var(--accent); }
.scc-label { font-size: 12px; margin-top: 6px; }

/* Component: numbered list */
.numbered-list { margin: 32px 0; display: flex; flex-direction: column; gap: 14px; list-style: none; padding: 0; }
.numbered-item { border: 1px solid var(--stroke); border-radius: 14px; padding: 22px 24px; display: flex; gap: 18px; align-items: flex-start; list-style: none; }
.numbered-circle { width: 38px; height: 38px; border-radius: 50%; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }
.numbered-body h4 { font-size: 16px; font-weight: 700; color: var(--navy); margin: 0 0 6px; }
.numbered-body p { font-size: 14.5px; margin: 0; line-height: 1.6; }

/* Component: image break caption */
.image-break { margin: 32px 0; border-radius: 16px; overflow: hidden; }
.image-break-caption { font-size: 12px; color: var(--muted); text-align: center; margin-top: 8px; }

/* Component: inline CTA */
.article-cta-box { margin: 44px 0; background: linear-gradient(135deg, var(--navy), #0b0e22); border-radius: 18px; padding: 32px; color: #fff; }
.article-cta-text h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.article-cta-text p { font-size: 14px; color: rgba(255,255,255,.7); margin: 0; }

/* Component: tags */
.article-tags { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--stroke); display: flex; gap: 10px; flex-wrap: wrap; }
.article-tag { font-size: 12px; font-weight: 600; color: var(--navy); background: var(--bg-soft); border: 1px solid var(--stroke); padding: 6px 12px; border-radius: 100px; }

/* 404 */
.blog-404 { text-align: center; padding: 96px 0; }
.blog-404 h1 { font-size: 72px; font-weight: 800; color: var(--navy); }
.blog-404 p { margin: 12px 0 28px; color: var(--muted); }

/* Responsive */
@media (max-width: 900px) { .articles-grid { grid-template-columns: 1fr 1fr; } .stats-callout-grid { grid-template-columns: 1fr; } .stats-callout-cell { border-right: none; border-bottom: 1px solid var(--stroke); } }
@media (max-width: 600px) { .articles-grid { grid-template-columns: 1fr; } .prose { font-size: 16px; } .numbered-item { flex-direction: column; gap: 12px; } }
