/* ============================================================
   Blog — layout only. Reuses modern.css tokens (no new colors).
   Posts use the docs-layout (sticky TOC + scroll-spy) + .prose.
   ============================================================ */

/* ---------- Hub ---------- */
.blog-hub-head { max-width: 760px; }

a.blog-card { text-decoration: none; color: inherit; }

.blog-card .post-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--paper-3);
  margin-bottom: 18px;
  background: var(--paper-2);
}
.blog-card .meta .tag-accent { color: var(--verdash); font-weight: 600; }

/* Featured (pillar) card spans the full row, image beside the copy */
.blog-card.blog-card-feature {
  grid-column: 1 / -1;
  flex-direction: row;
  gap: 28px;
  align-items: center;
}
.blog-card.blog-card-feature .post-thumb {
  width: 46%;
  aspect-ratio: 16 / 9;
  margin-bottom: 0;
  flex-shrink: 0;
}
.blog-card.blog-card-feature .feature-body { flex: 1; }
.blog-card.blog-card-feature h3 { font-size: 1.5rem; }

@media (max-width: 760px) {
  .blog-card.blog-card-feature { flex-direction: column; }
  .blog-card.blog-card-feature .post-thumb { width: 100%; margin-bottom: 18px; }
}

/* ---------- Post ---------- */
.post-hero-img {
  display: block;
  width: 100%;
  height: auto;            /* 16:9 UI render — show it in full, never crop */
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: 18px;
  border: 1px solid var(--paper-3);
  box-shadow: var(--sh-md);
  margin: 4px 0 4px;
}

/* readable measure for the article body inside the docs content column */
.post-body { max-width: 740px; }
.post-body > .prose-intro {
  font-size: 1.16rem;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0 0 22px;
}

.post-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
}
.post-meta-row .doc-meta { margin: 0; }

/* Inline figures in a post body (image + caption) */
.post-fig { margin: 30px 0; }
.post-fig img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--paper-3);
  box-shadow: var(--sh-sm);
}
.post-fig figcaption {
  margin-top: 10px;
  font-family: var(--body);
  font-size: 0.85rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}
/* portrait (mobile) screenshots — don't let them dominate the column */
.post-fig.is-portrait { max-width: 320px; margin-left: auto; margin-right: auto; }

/* Buttons inside post prose must keep their own colors — .prose a otherwise
   recolors the label to var(--accent), matching the button fill (invisible). */
.post-body a.button { text-decoration: none; }
.post-body a.button-primary,
.post-body a.button-accent { color: #fff; }
.post-body a.button-secondary { color: var(--ink); }

/* FAQ inside a post (reuses .faq-item accordion from modern.css) */
.post-faq { margin-top: 48px; scroll-margin-top: 120px; }
.post-faq > h2 { margin-bottom: 18px; }
.post-faq .faq-item { margin-bottom: 10px; }

/* give scrolled-to H2s room under the sticky header */
.post-body h2 { scroll-margin-top: 116px; }

/* CTA card at the end of a post */
.post-cta {
  margin: 48px 0 8px;
  padding: 30px;
  border-radius: 18px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-tint);
}
.post-cta h3 { margin: 0 0 8px; font-size: 1.3rem; font-weight: 750; }
.post-cta p { margin: 0 0 18px; color: var(--ink-2); }

/* Sources / citations line — authority signal, kept small + muted */
.post-sources {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--paper-3);
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--muted);
}
.post-sources strong { color: var(--ink-2); }
.post-sources a { color: var(--muted); text-decoration: underline; }

/* Related-posts links */
.post-related { margin-top: 36px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.post-related a {
  display: block;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--paper-3);
  box-shadow: var(--sh-sm);
  text-decoration: none;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.post-related a:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-md);
  border-color: var(--accent-tint);
}
.post-related .rel-label {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.post-related .rel-title {
  display: block;
  margin-top: 6px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.35;
  color: var(--ink);
}
@media (max-width: 640px) { .post-related { grid-template-columns: 1fr; } }
