/* Blog: /blog list, /blog/{slug} posts, and the "latest articles" strip on /home */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.blog-grid-wrap { padding: 28px 0 12px; }
.blog-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  overflow: hidden;
  background: var(--card, #fff);
  color: inherit;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.blog-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(15, 21, 48, .08); }
.blog-card-img { display: block; width: 100%; aspect-ratio: 40 / 21; object-fit: cover; }
.blog-card-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f1530, #1d3fa8);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
}
.blog-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.blog-card h3 { margin: 0; font-size: 16px; line-height: 1.6; }
.blog-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-cat {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.blog-meta { margin-top: auto; font-size: 12px; color: var(--muted); }
.blog-empty { color: var(--muted); text-align: center; grid-column: 1 / -1; padding: 40px 0; }
.blog-hub-links { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: center; padding: 18px 0 40px; font-weight: 700; font-size: 14px; }
.blog-hub-links a:hover { color: var(--accent); }

.blog-head { padding: 96px 0 10px; max-width: 860px; }
.blog-head h1 { margin: 10px 0 12px; font-size: clamp(24px, 4vw, 36px); line-height: 1.5; letter-spacing: -.02em; }
.blog-lead { margin: 0 0 10px; font-size: 16px; line-height: 1.9; color: var(--muted); }
.blog-head .blog-meta { display: block; margin: 0 0 18px; }
.blog-cover { width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--stroke); }
.blog-prose h2 { scroll-margin-top: 84px; }
.blog-prose h2:not(:first-child) { margin-top: 30px; }
.blog-prose code { font-size: 13px; padding: 1px 6px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 8%, transparent); direction: ltr; unicode-bidi: embed; }
.blog-callout {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-right: 4px solid var(--accent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  font-size: 15px;
  line-height: 1.9;
}
.blog-faq { margin-top: 6px; }
.blog-draft-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 8px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  background: #f59e0b;
  color: #1f1300;
}
.blog-home .blog-grid { margin-top: 8px; }

html[data-theme="dark"] .blog-card { background: #1a1a1a; }

@media (max-width: 900px) {
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-head { padding-top: 84px; }
}
