/* The blog (/blog, /blog/<slug>): the guide layout from content.css, plus post cards, the post's
   picture and its closing sections. Tokens only (variables.css); nothing new in the palette. */

/* ---------- index ---------- */
.blog-hero h1 { max-width: 22ch; }
.blog-topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.blog-topics .cat-chip {
  display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px;
  background: var(--paper); box-shadow: 0 0 0 1px var(--line); color: var(--ink-2); font: 600 14px/1 var(--font-sans); text-decoration: none;
  transition: background-color .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease);
}
.blog-topics .cat-chip:hover { color: var(--ink); box-shadow: 0 0 0 1px #CFCBC0; }
.blog-topics .cat-chip[aria-current] { background: var(--ink); color: var(--on-dark); box-shadow: 0 0 0 1px var(--ink); }
.blog-topics .cat-chip:focus-visible { outline: none; box-shadow: var(--focus); }

.blog-list { display: grid; gap: 28px; padding-block: clamp(32px, 5vw, 56px) clamp(56px, 8vw, 96px); }
.blog-empty { max-width: 60ch; color: var(--ink-2); }
.blog-empty a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #B9B5AA; }

/* ---------- post card ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.post-card {
  display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r-lg); background: var(--paper); color: inherit; text-decoration: none;
  box-shadow: 0 0 0 1px var(--line); transition: translate .25s var(--ease), box-shadow .25s var(--ease);
}
.post-card:hover { translate: 0 -3px; box-shadow: 0 0 0 1px #D2CEC3, var(--shadow); }
.post-card:focus-visible { outline: none; box-shadow: var(--focus); }
.pc-art { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bone-2); }
.pc-art img { width: 100%; height: 100%; object-fit: cover; transition: scale .5s var(--ease); }
.post-card:hover .pc-art img { scale: 1.035; }
.pc-body { display: grid; gap: 8px; flex: 1; align-content: start; padding: 16px 18px 18px; }
.pc-topic { font: 500 11px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--lime-deep); }
.pc-title { font-size: 20px; font-stretch: var(--semi); line-height: 1.18; color: var(--ink); text-wrap: balance; }
.pc-desc { font-size: 15px; line-height: 1.5; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pc-meta { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line-2); font: 500 12px/1.3 var(--font-mono); letter-spacing: .04em; color: var(--ink-3); }

/* the newest post, larger, on page one */
.post-card-lead { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.post-card-lead .pc-art { aspect-ratio: auto; min-height: 100%; }
.post-card-lead .pc-body { gap: 12px; padding: clamp(22px, 3vw, 36px); align-content: center; }
.post-card-lead .pc-title { font-size: clamp(26px, 2.8vw, 36px); font-stretch: var(--wide); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.post-card-lead .pc-desc { font-size: 16.5px; -webkit-line-clamp: 4; }
.post-card-lead .pc-meta { margin-top: 6px; }

.blog-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; }
.blog-pager-n { font: 500 12px/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- a post ---------- */
.post-hero h1 { max-width: 24ch; }
.post-hero .lead { max-width: 62ch; }
.post-figure { margin-top: clamp(24px, 3.5vw, 40px); }
.post-figure img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-lg); box-shadow: 0 0 0 1px var(--line), var(--shadow); background: var(--bone-2); }
.page-post .page-body { padding-top: clamp(32px, 4.5vw, 56px); }
.page-post .answer { margin-bottom: 30px; }

.prose .blog-fig { margin: 30px 0; }
.prose .blog-fig img { display: block; width: 100%; height: auto; border-radius: var(--r); box-shadow: 0 0 0 1px var(--line); background: var(--bone-2); }
.prose .blog-fig figcaption { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--ink-3); }
.prose .table-wrap + *, .prose .blog-fig + * { margin-top: 24px; }
.prose blockquote { padding: 4px 0 4px 18px; border-left: 3px solid var(--lime); color: var(--ink); }

.post-models { margin-top: 16px; }
.post-faq { margin-top: 48px; }
.post-faq h2 { margin-bottom: 8px; }
.post-sources { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14.5px; }
.post-sources-k { font: 500 11px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.post-sources ul { margin-top: 10px; gap: 6px; }
.prose .post-sources li::before { background: var(--ink-3); box-shadow: none; }
.post-filed { margin-top: 32px; font-size: 14.5px; color: var(--ink-3); }

.post-related { padding-block: clamp(48px, 7vw, 80px); border-top: 1px solid var(--line); background: var(--bone-2); }
.post-related h2 { margin-bottom: 22px; font-size: clamp(26px, 3vw, 36px); }

@media (max-width: 960px) {
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-card-lead { grid-template-columns: minmax(0, 1fr); }
  .post-card-lead .pc-art { aspect-ratio: 16 / 9; }
}
@media (max-width: 640px) {
  .post-grid { grid-template-columns: minmax(0, 1fr); }
  .post-figure img { border-radius: var(--r); }
}
