/* Blog listing + article pages. Builds on theme.css tokens and legal.css chrome. */

.blog-main {
  width: min(100%, 880px);
  margin: 0 auto;
  padding: 48px 0 72px;
}

.header-links a[aria-current="page"] {
  color: var(--text);
}

.crumbs {
  margin-bottom: 22px;
  color: var(--text-muted);
  font-size: 13px;
}

.crumbs a { color: var(--text-dim); text-decoration: none; }
.crumbs a:hover { color: var(--link-hover); }
.crumbs span { margin: 0 4px; }

.article { width: min(100%, 720px); margin: 0 auto; }

.article-title {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.byline {
  margin: 0 0 32px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13.5px;
}

.byline strong { color: var(--text-dim); }

.article-body {
  color: var(--text-dim);
  font-size: 17px;
  line-height: 1.85;
}

.article-body h2 {
  margin: 40px 0 12px;
  color: var(--text);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.article-body p { margin: 0 0 18px; }
.article-body ul, .article-body ol { margin: 0 0 20px; padding-left: 24px; }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--text); }

.article-body code {
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--accent-teal);
  font-family: var(--font-mono);
  font-size: 0.88em;
}

.article-body pre {
  margin: 0 0 22px;
  padding: 16px 18px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #0f172a;
  line-height: 1.6;
}

.article-body pre code {
  padding: 0;
  border: 0;
  background: none;
  color: #e2e8f0;
  font-size: 13.5px;
  white-space: pre;
}

.article-end { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); }
.article-note { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.7; }
.article-note a, .blog-intro a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }

.ad-slot {
  margin: 32px 0;
  padding: 10px 0;
  text-align: center;
  min-height: 0;
}

.ad-label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.blog-intro {
  margin-bottom: 8px;
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.8;
}

.blog-intro p { margin: 0 0 14px; }
.topic-row { color: var(--text-muted); font-family: var(--font-mono); font-size: 12px; }

.list-title { margin: 8px 0 18px; color: var(--text); font-size: 22px; font-weight: 700; }

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-dim);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.post-card:hover { border-color: rgba(56, 189, 248, 0.5); transform: translateY(-2px); }
.post-card h3 { margin: 0; color: var(--text); font-size: 18px; line-height: 1.35; }
.post-card p { margin: 0; font-size: 14px; line-height: 1.65; }

.post-cat {
  color: var(--accent-teal);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.post-meta { margin-top: auto; padding-top: 4px; color: var(--text-muted); font-size: 12.5px; }

.cta-box {
  margin: 44px 0 0;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  text-align: center;
}

.cta-box h2 { margin: 0 0 10px; color: var(--text); font-size: 22px; }
.cta-box p { margin: 0 auto 18px; max-width: 560px; color: var(--text-dim); font-size: 15px; line-height: 1.7; }
.cta-box .primary-btn { display: inline-block; width: auto; text-decoration: none; }

.related { margin-top: 44px; }
.related h2 { margin: 0 0 16px; color: var(--text); font-size: 22px; }
.related .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.related .post-card p { display: none; }

@media (max-width: 760px) {
  .blog-main { padding: 32px 0 56px; }
  .article-title { font-size: 28px; }
  .article-body { font-size: 16px; }
  .post-grid, .related .post-grid { grid-template-columns: 1fr; }
}
