/* ══════════════════════════════════════════════════════════════
   Operational Roofing — blog theme
   Tokens are copied verbatim from index.html so the blog and the
   landing page can never drift. If a token changes there, change
   it here too (build.mjs warns when the two files disagree).
   ══════════════════════════════════════════════════════════════ */

:root {
  --char: #0A0A0A;
  --bone: #FAF9F6;
  --gold: #FDB813;
  --gold-press: #E8A50C;
  --steel: #3E5566;
  --slate-brand: #718CA1;
  --slate: #5A6E80;
  --slate-on-dark: #BCBCB8;
  --line: rgba(10, 10, 10, .15);
  --line-soft: rgba(10, 10, 10, .09);
  --line-on-dark: rgba(250, 249, 246, .16);
  --ink-soft: #3a3a3a;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Inter", -apple-system, system-ui, sans-serif;
  --max: 1060px;
  --max-article: 1180px;
  --col: 680px;   /* measure of the reading column */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  background: var(--bone);
  color: var(--char);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.wrap--article { max-width: var(--max-article); margin: 0 auto; padding: 0 24px; }

h1, h2, h3 {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: .95;
  font-weight: 700;
}

.eyebrow {
  font-family: var(--body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--steel);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* Keyboard users land here first and can jump the header and breadcrumb. */
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--char); color: var(--bone);
  font-size: 14px; font-weight: 600;
  padding: 12px 18px; border-radius: 2px;
  text-decoration: none;
  transition: top .12s ease;
}
.skip-link:focus { top: 8px; outline: 2px solid var(--gold); outline-offset: 2px; }

/* Visible focus everywhere, not just where a browser happens to draw one. */
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--char);
  outline-offset: 2px;
  border-radius: 1px;
}
.side-cta a:focus-visible, .cta-block a:focus-visible, footer a:focus-visible {
  outline-color: var(--gold);
}

/* ── buttons (identical to landing) ─────────────────── */
.btn {
  display: inline-block;
  background: var(--gold);
  color: var(--char);
  font-family: var(--body);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  padding: 17px 34px;
  border-radius: 2px;
  border: none;
  cursor: pointer;
  transition: transform .08s ease, background .15s ease;
}
.btn:hover { background: var(--gold-press); }
.btn:active { transform: translateY(1px); }
.btn--ghost {
  background: transparent;
  color: var(--char);
  border: 1px solid var(--char);
  padding: 10px 20px;
  font-size: 14px;
}
.btn--ghost:hover { background: var(--char); color: var(--bone); }
.btn--sm { padding: 13px 22px; font-size: 15px; }

/* ── site header (identical to landing) ─────────────── */
/* Scoped to .site-nav, not the bare `nav` element: this page also uses <nav>
   for the breadcrumb and the table of contents, and an element selector would
   make those sticky and paint them over the article. */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--bone);
  background: color-mix(in srgb, var(--bone) 92%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 12px;
}
.wordmark {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 700; font-size: 21px;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--char); text-decoration: none;
  white-space: nowrap;
}
.wordmark svg { display: block; flex: none; }
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-link {
  font-size: 14px; font-weight: 600; color: var(--char);
  text-decoration: none; white-space: nowrap;
}
.nav-link:hover { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.site-nav .btn--ghost { white-space: nowrap; }
@media (max-width: 560px) {
  .wordmark { font-size: 17px; gap: 7px; }
  .wordmark svg { width: 20px; height: 16px; }
  .site-nav .btn--ghost { padding: 8px 13px; font-size: 13px; }
  .nav-right { gap: 12px; }
  .nav-link { font-size: 13px; }
}

/* ── breadcrumb ─────────────────────────────────────── */
.crumbs {
  padding: 22px 0 0;
  font-size: 13px; color: var(--slate);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.crumbs a { color: var(--slate); text-decoration: none; }
.crumbs a:hover { color: var(--char); text-decoration: underline; }
.crumbs .sep { color: var(--gold); font-weight: 700; }
.crumbs .here { color: var(--char); font-weight: 500; }

/* ══ ARTICLE SHELL ═══════════════════════════════════ */
.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 316px;
  gap: 60px;
  align-items: start;
  padding: 32px 0 96px;
}
@media (max-width: 1000px) {
  .article-shell { grid-template-columns: minmax(0, 1fr); gap: 0; padding-bottom: 72px; }
}

.article-col { min-width: 0; max-width: var(--col); }
@media (max-width: 1000px) { .article-col { max-width: var(--col); margin: 0 auto; } }

/* ── article head ───────────────────────────────────── */
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.post-tag {
  font-size: 11px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--steel);
  border: 1px solid var(--line); border-radius: 2px;
  padding: 5px 10px;
  text-decoration: none;
}

.post-title {
  font-size: clamp(34px, 5.2vw, 58px);
  margin: 0 0 22px;
}
.post-dek {
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 46ch;
}

.post-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px;
  margin: 30px 0 0;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.byline { display: flex; align-items: center; gap: 11px; }
.byline-mark {
  flex: none;
  width: 40px; height: 40px;
  background: var(--char);
  display: grid; place-items: center;
  border-radius: 2px;
}
.byline-name { font-weight: 600; color: var(--char); line-height: 1.3; }
.byline-role { font-size: 12.5px; color: var(--slate); line-height: 1.3; }
.meta-dot { color: var(--line); }
.post-meta time { color: var(--slate); }
.read-chip {
  font-size: 12px; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--steel);
  border: 1px solid var(--line); border-radius: 2px;
  padding: 5px 10px;
}

/* ── hero figure ────────────────────────────────────── */
/* <picture> is inline by default, which would leave a text-baseline gap under
   every image; the <img> inside carries the real styling. */
picture { display: block; }
.post-hero { margin: 32px 0 8px; }
.post-hero img,
.prose figure img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  background: var(--char);
}
figcaption {
  margin-top: 10px;
  font-size: 13.5px; line-height: 1.5; color: var(--slate);
}

/* ══ PROSE ═══════════════════════════════════════════ */
/* A one-column grid with a zero minimum, not a plain block. A block box passes
   its children's min-content width up the chain, so one wide table (or code
   block, or unbreakable URL) drags the whole page wider and the body scrolls
   sideways on a phone. As grid items those children can't do that, and the
   wide ones scroll inside their own box instead. */
.prose {
  margin-top: 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.prose > * + * { margin-top: 22px; }
.prose p { font-size: 17.5px; line-height: 1.72; color: var(--ink-soft); overflow-wrap: break-word; }
.prose p strong { color: var(--char); font-weight: 600; }
.prose a {
  color: var(--char); font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.prose a:hover { background: var(--gold); text-decoration-color: transparent; }

/* section markers: condensed caps + a gold rule, echoing the landing eyebrows */
.prose h2 {
  font-size: clamp(27px, 3.4vw, 34px);
  margin-top: 56px; margin-bottom: 6px;
  padding-top: 20px;
  border-top: 2px solid var(--gold);
  scroll-margin-top: 84px;
}
.prose h2:first-child { margin-top: 0; }
/* h3 drops to Inter sentence case — condensed caps get tiring at this density */
.prose h3 {
  font-family: var(--body);
  text-transform: none;
  letter-spacing: -.005em;
  line-height: 1.35;
  font-weight: 600;
  font-size: 20.5px;
  margin-top: 38px; margin-bottom: 4px;
  color: var(--char);
  scroll-margin-top: 84px;
}
.prose h4 {
  font-family: var(--body); font-size: 16px; font-weight: 600;
  text-transform: none; color: var(--char);
  margin-top: 28px; margin-bottom: 2px;
}

.prose ul, .prose ol { padding-left: 22px; }
.prose li {
  font-size: 17.5px; line-height: 1.66; color: var(--ink-soft);
  margin-bottom: 9px; overflow-wrap: break-word;
}
.prose li strong { color: var(--char); font-weight: 600; }
.prose ul li::marker { color: var(--gold); }
.prose ol li::marker { color: var(--steel); font-weight: 700; }

/* margins no longer collapse under grid, so the rule carries its space above only */
.prose hr { border: none; border-top: 1px solid var(--line); margin: 44px 0 0; }

.prose blockquote {
  border-left: 3px solid var(--gold);
  padding: 4px 0 4px 22px;
  margin-left: 0;
}
.prose blockquote p {
  font-size: 20px; line-height: 1.5; font-weight: 500; color: var(--char);
}
.prose blockquote cite {
  display: block; margin-top: 10px;
  font-size: 13.5px; font-style: normal; color: var(--slate);
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .88em;
  background: rgba(10, 10, 10, .06);
  padding: 2px 5px; border-radius: 2px;
}
.prose pre {
  background: var(--char); color: var(--bone);
  padding: 18px 20px; border-radius: 3px; overflow-x: auto;
}
.prose pre code { background: none; padding: 0; color: inherit; }

/* ── tables: hairline grid, condensed caps header ───── */
.prose .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.prose table {
  width: 100%; border-collapse: collapse;
  font-size: 15px; min-width: 480px;
}
.prose thead th {
  font-family: var(--display); font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  font-size: 15px; color: var(--char);
  text-align: left; vertical-align: bottom;
  padding: 10px 14px 9px;
  border-bottom: 2px solid var(--char);
}
.prose tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-soft); vertical-align: top;
}
.prose tbody tr td:first-child { color: var(--char); font-weight: 500; }
.prose tbody tr:last-child td { border-bottom: 1px solid var(--line); }

/* ══ CUSTOM BLOCKS (shortcodes) ══════════════════════ */

/* {{callout}} — the aside that matters */
.callout {
  border-left: 3px solid var(--gold);
  background: rgba(10, 10, 10, .035);
  padding: 20px 24px;
  border-radius: 0 3px 3px 0;
}
.callout > * + * { margin-top: 10px; }
.callout .callout-title {
  font-family: var(--display); font-size: 19px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em;
  color: var(--char);
}
.callout p { font-size: 16.5px; line-height: 1.65; }

/* {{takeaways}} — the "what this post says" box, sits under the dek */
.takeaways {
  border: 1px solid var(--line);
  border-top: 3px solid var(--char);
  padding: 22px 26px 24px;
  background: #fff;
}
.takeaways .takeaways-title {
  font-family: var(--display); font-size: 17px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--steel); margin-bottom: 14px;
}
.takeaways ul { list-style: none; padding-left: 0; margin: 0; }
.takeaways li {
  position: relative; padding-left: 22px; margin-bottom: 10px;
  font-size: 16.5px; line-height: 1.6;
}
.takeaways li:last-child { margin-bottom: 0; }
.takeaways li::before {
  content: "—"; position: absolute; left: 0;
  color: var(--gold); font-weight: 700;
}

/* {{stat}} — the gold spec plate lifted from the landing page */
.stat-plate {
  display: flex; align-items: baseline; gap: 10px;
  align-self: flex-start; width: fit-content; max-width: 100%;
  background: var(--gold);
  padding: 6px 16px 9px;
  font-family: var(--display); font-weight: 700;
  text-transform: uppercase; line-height: 1;
  flex-wrap: wrap;
}
.stat-plate .big { font-size: clamp(38px, 4.6vw, 50px); }
.stat-plate .unit { font-size: clamp(17px, 2vw, 21px); letter-spacing: .04em; }
.stat-row { display: flex; flex-direction: column; gap: 8px; }
.stat-row .stat-src { font-size: 13px; color: var(--slate); }
.stat-row .stat-src a { color: var(--slate); }

/* {{steps}} — numbered flow, chip aesthetic */
.steps { list-style: none; padding-left: 0; counter-reset: step; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 0 54px;
  margin-bottom: 26px;
}
.steps > li:last-child { margin-bottom: 0; }
.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: -2px;
  width: 36px; height: 36px;
  background: var(--char); color: var(--gold);
  font-family: var(--display); font-weight: 700; font-size: 21px;
  display: grid; place-items: center;
  border-radius: 2px;
}
.steps .step-title {
  font-weight: 600; font-size: 17.5px; color: var(--char);
  margin-bottom: 4px; display: block;
}

/* {{flow}} — the chip → chip → chip strip from the landing page */
.chip-flow {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 4px 0;
}
.chip-flow .chip {
  font-size: 11.5px; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; white-space: nowrap;
  border: 1px solid var(--line); border-radius: 2px;
  padding: 6px 10px; color: var(--steel);
}
.chip-flow .chip--done { background: var(--char); border-color: var(--char); color: var(--gold); }
.chip-flow .arr { color: var(--gold); font-weight: 700; font-size: 15px; }

/* {{cta}} — mid-article conversion block */
.cta-block {
  background: var(--char); color: var(--bone);
  padding: 34px 34px 36px;
  border-radius: 3px;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0px, transparent 47px,
    rgba(250, 249, 246, .035) 47px, rgba(250, 249, 246, .035) 48px
  );
}
.cta-block .cta-kicker {
  font-family: var(--body); font-size: 12px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: var(--gold);
  margin-bottom: 10px;
}
.cta-block .cta-title {
  font-family: var(--display); text-transform: uppercase; font-weight: 700;
  letter-spacing: .01em;
  font-size: clamp(26px, 3.4vw, 34px); line-height: .98;
  color: var(--bone); margin: 0 0 12px;
}
.cta-block p {
  color: var(--slate-on-dark); font-size: 16px; line-height: 1.6;
  max-width: 44ch; margin-bottom: 24px;
}
.cta-block .btn { margin: 0; }

/* ══ FAQ ═════════════════════════════════════════════ */
.faq { margin-top: 56px; }
.faq h2 {
  font-family: var(--display); text-transform: uppercase;
  font-size: clamp(27px, 3.4vw, 34px);
  padding-top: 20px; border-top: 2px solid var(--gold);
  margin-bottom: 8px;
  scroll-margin-top: 84px;
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq details[open] summary { padding-bottom: 4px; }
.faq summary {
  list-style: none; cursor: pointer;
  padding: 20px 40px 20px 0;
  position: relative;
  font-weight: 600; font-size: 17.5px; line-height: 1.45;
  color: var(--char);
}
.faq summary::-webkit-details-marker { display: none; }
/* The chevron is the only visual cue for open/closed, so it has to clear 3:1
   against the bone background — gold on bone is 1.66:1. */
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%;
  width: 11px; height: 11px;
  border-right: 2px solid var(--char); border-bottom: 2px solid var(--char);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .18s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq summary:focus-visible { outline: 2px solid var(--char); outline-offset: 3px; }
.faq .faq-a { padding: 0 0 22px; }
.faq .faq-a p { font-size: 16.5px; line-height: 1.68; color: var(--ink-soft); }
.faq .faq-a > * + * { margin-top: 14px; }

/* ══ ARTICLE FOOT ════════════════════════════════════ */
.post-foot { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.post-foot .back {
  font-size: 14px; font-weight: 600; color: var(--char);
  text-decoration: none;
}
.post-foot .back:hover { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.post-updated { font-size: 13px; color: var(--slate); margin-top: 10px; }

/* related posts */
.related { margin-top: 48px; }
.related .eyebrow { margin-bottom: 16px; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 620px) { .related-grid { grid-template-columns: 1fr; } }
.related-card {
  display: block; text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-radius: 3px; overflow: hidden;
  transition: border-color .15s ease;
}
.related-card:hover { border-color: var(--char); }
.related-card img { display: block; width: 100%; height: auto; background: var(--char); }
/* rc-body/title/date are spans (an <a> wrapping them stays unambiguously valid),
   so each one needs display:block or inline layout takes over and breaks three
   things at once: the box's side padding indents only the first line, leaving
   every wrapped line flush left; margin-top on the date is dropped, so it runs
   on straight after the title text; and line spacing comes from the parent
   block's strut rather than the line-height set here. */
.related-card .rc-body { display: block; padding: 14px 16px 16px; }
.related-card .rc-title {
  display: block;
  font-family: var(--display); text-transform: uppercase; font-weight: 700;
  font-size: 19px; line-height: 1.06; color: var(--char);
}
.related-card:hover .rc-title {
  text-decoration: underline; text-decoration-color: var(--gold);
  text-decoration-thickness: 2px; text-underline-offset: 3px;
}
.related-card .rc-date { display: block; font-size: 12.5px; color: var(--slate); margin-top: 8px; }

/* ══ SIDEBAR ═════════════════════════════════════════ */
/* --side-top is written by the post script when the column is taller than the
   viewport: a fixed `top: 88px` parks it under the header on the first scroll,
   so everything past the fold — the TOC lives last — could never be reached.
   Parking on the bottom edge instead lets the whole column scroll into view
   first. 88px is the fallback and the short-column case: the header is 65px. */
.side {
  position: sticky; top: var(--side-top, 88px);
  display: flex; flex-direction: column; gap: 20px;
}
@media (max-width: 1000px) {
  .side { position: static; margin: 44px auto 0; max-width: var(--col); }
  .side .side-toc { display: none; } /* on narrow screens the TOC is just noise above the article */
}

.side-card {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 20px 22px 22px;
  background: #fff;
}
.side-card .side-label {
  font-size: 11px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--steel);
  margin-bottom: 14px;
}
.side-author { display: flex; align-items: center; gap: 12px; }
.side-author .byline-mark { width: 42px; height: 42px; }
.side-author-name { font-weight: 600; font-size: 15px; }
.side-author-role { font-size: 12.5px; color: var(--slate); }
.side-card .side-bio { font-size: 13.5px; line-height: 1.6; color: var(--slate); margin-top: 14px; }

.side-cta {
  background: var(--char); color: var(--bone);
  border-radius: 3px; padding: 24px 22px 26px;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0px, transparent 47px,
    rgba(250, 249, 246, .035) 47px, rgba(250, 249, 246, .035) 48px
  );
}
.side-cta h3 {
  font-family: var(--display); text-transform: uppercase;
  font-size: 25px; line-height: .98; color: var(--bone); margin-bottom: 10px;
}
.side-cta p { font-size: 14px; line-height: 1.6; color: var(--slate-on-dark); margin-bottom: 20px; }
.side-cta .btn { display: block; text-align: center; }

.side-toc .toc-list { list-style: none; padding: 0; margin: 0; }
.side-toc .toc-list li { margin-bottom: 2px; }
.side-toc a {
  display: block;
  font-size: 13.5px; line-height: 1.45; color: var(--slate);
  text-decoration: none;
  padding: 7px 0 7px 13px;
  border-left: 2px solid var(--line);
  transition: color .15s ease, border-color .15s ease;
}
.side-toc a:hover { color: var(--char); border-left-color: var(--steel); }
.side-toc a.active { color: var(--char); font-weight: 600; border-left-color: var(--gold); }

/* ══ BLOG INDEX ══════════════════════════════════════ */
.blog-head { padding: 52px 0 40px; }
.blog-head h1 { font-size: clamp(40px, 6.4vw, 72px); margin: 14px 0 18px; }
.blog-head .sub { font-size: clamp(16px, 2vw, 19px); color: var(--ink-soft); max-width: 50ch; }

.feature-card {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 0;
  border: 1px solid var(--line); border-radius: 3px; overflow: hidden;
  text-decoration: none; color: inherit;
  transition: border-color .15s ease;
  margin-bottom: 56px;
}
.feature-card:hover { border-color: var(--char); }
@media (max-width: 760px) { .feature-card { grid-template-columns: 1fr; } }
/* The hero graphic carries a headline, so it must never be cropped to fill the
   cell — show it whole and let the dark plate absorb any leftover height. */
.feature-card .fc-img { background: var(--char); display: grid; align-items: center; }
.feature-card .fc-img img { display: block; width: 100%; height: auto; object-fit: contain; }
.feature-card .fc-body { padding: 30px 32px 32px; display: flex; flex-direction: column; }
.feature-card .fc-flag {
  font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--char); background: var(--gold);
  align-self: flex-start; padding: 4px 9px; margin-bottom: 16px;
}
.feature-card h2 { font-size: clamp(26px, 3.2vw, 36px); margin-bottom: 14px; }
.feature-card .fc-ex { font-size: 15.5px; line-height: 1.6; color: var(--ink-soft); }
.feature-card .fc-meta { margin-top: auto; padding-top: 22px; font-size: 13px; color: var(--slate); }

.post-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px 28px;
}
@media (max-width: 900px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .post-grid { grid-template-columns: 1fr; gap: 30px; } }

.post-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.post-card .pc-img {
  border: 1px solid var(--line-soft); border-radius: 3px; overflow: hidden;
  background: var(--char); margin-bottom: 16px;
  transition: border-color .15s ease;
}
.post-card:hover .pc-img { border-color: var(--char); }
.post-card .pc-img img { display: block; width: 100%; height: auto; }
.post-card h3 {
  font-size: 23px; line-height: 1.0; margin-bottom: 10px; color: var(--char);
}
.post-card:hover h3 { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.post-card .pc-ex { font-size: 14.5px; line-height: 1.6; color: var(--ink-soft); }
.post-card .pc-meta {
  margin-top: auto; padding-top: 16px;
  font-size: 12.5px; color: var(--slate);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}

.blog-empty {
  border: 1px dashed var(--line); border-radius: 3px;
  padding: 56px 24px; text-align: center; color: var(--slate);
}

/* index-page CTA strip */
.blog-cta { background: var(--char); color: var(--bone); padding: 76px 0 84px; margin-top: 88px; }
.blog-cta h2 { font-size: clamp(38px, 6vw, 62px); margin: 14px 0 16px; }
.blog-cta .eyebrow { color: var(--gold); }
.blog-cta p { color: var(--slate-on-dark); font-size: 17px; max-width: 46ch; margin-bottom: 32px; }

/* ══ FOOTER (identical to landing) ═══════════════════ */
/* Scoped to .site-footer, never the bare element: a post page has TWO footers —
   this one and the article's own <footer class="post-foot">. As an element
   selector this rule painted the article foot near-black, so the "All posts"
   link sat in a black band mid-page. Same trap as the sticky `nav {…}` rule
   that once made the breadcrumb and TOC sticky; see docs/BLOG.md. */
.site-footer { background: var(--char); color: var(--slate-on-dark); font-size: 13px; }
.foot-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px; padding: 22px 0;
}
.site-footer .wordmark { color: var(--bone); font-size: 16px; }
.site-footer a { color: inherit; }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; }

/* ══ MOTION ══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* ══ PRINT ═══════════════════════════════════════════ */
@media print {
  .site-nav, .side, .cta-block, .blog-cta, .sticky-cta, .crumbs { display: none; }
  body { font-size: 12pt; background: #fff; }
  .article-shell { display: block; padding: 0; }
  .prose a { text-decoration: none; }
  .prose a::after { content: " (" attr(href) ")"; font-size: .8em; color: #555; }
}
