/* =========================================================
   Prime Marketing — Blog styles (additive).
   Loaded via base.njk {{ extraStylesheet }} on /blog/, posts,
   category pages, and the author page. Reuses global tokens and
   global classes (.container, .eyebrow, .btn, .h-2, .em-italic,
   .reveal, .grain, .final-cta, .faq-item) from styles.css; this
   file styles everything blog-specific plus a few editorial
   patterns (.premise, .about-pullquote, .compounds-link, .crumb)
   that the original pages define inline rather than globally.
   ========================================================= */

/* ---------- Breadcrumb (defined inline elsewhere; needed here) ---------- */
.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--mute);
  margin-bottom: 26px;
}
.crumb a { color: var(--mute); border-bottom: 1px solid transparent; transition: color 160ms ease, border-color 160ms ease; }
.crumb a:hover { color: var(--terracotta); border-bottom-color: var(--terracotta); }
.crumb .sep { color: var(--mute-2); }

/* ===========================================================
   BLOG INDEX + CATEGORY HERO
   =========================================================== */
.blog-hero { padding-top: 180px; padding-bottom: 64px; }
.blog-hero .eyebrow-wrap { align-items: flex-start; margin-bottom: 28px; }
.blog-hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(44px, 6.4vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
  max-width: 20ch;
  margin-bottom: 24px;
}
.blog-hero-lede {
  font-family: var(--sans);
  font-size: 20px;
  line-height: 1.6;
  color: var(--body);
  max-width: 60ch;
}
.cat-hero { padding-top: 140px; }
.cat-hero .crumb { margin-bottom: 30px; }
@media (max-width: 900px) {
  .blog-hero { padding-top: 130px; padding-bottom: 48px; }
  .cat-hero { padding-top: 120px; }
}
@media (max-width: 540px) {
  .blog-hero h1 { font-size: 40px; }
  .blog-hero-lede { font-size: 17px; }
}

/* ===========================================================
   CATEGORY RAIL
   =========================================================== */
.blog-listing { padding-top: 8px; padding-bottom: 140px; }
.cat-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 48px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.cat-chip {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--body);
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--paper);
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
  white-space: nowrap;
}
.cat-chip:hover { border-color: var(--terracotta); color: var(--terracotta); }
.cat-chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--off-white);
}
@media (max-width: 700px) {
  .cat-rail {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-left: calc(-1 * var(--padx));
    margin-right: calc(-1 * var(--padx));
    padding-left: var(--padx);
    padding-right: var(--padx);
  }
  .cat-rail::-webkit-scrollbar { display: none; }
}

/* ===========================================================
   POST GRID + CARDS
   =========================================================== */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.post-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 8px;
}
@media (max-width: 960px) {
  .post-grid, .post-related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .post-grid, .post-related-grid { grid-template-columns: 1fr; }
}

.post-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: var(--lift-soft);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
  overflow: hidden;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--lift-card);
  border-color: rgba(184, 71, 46, 0.35);
}
.post-card-link { display: flex; flex-direction: column; height: 100%; padding: 28px 26px 26px; }
.post-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--mute);
  margin-bottom: 16px;
}
.post-card-cat {
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--terracotta);
}
.post-card-meta time { letter-spacing: 0.01em; }
.post-card-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 23px;
  line-height: 1.22;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 12px;
  text-wrap: balance;
}
.post-card-excerpt {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--mute);
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-more {
  margin-top: auto;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--terracotta);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.post-card .chev { transition: transform 180ms ease; display: inline-block; }
.post-card:hover .chev { transform: translateX(4px); }

/* Pagination */
.post-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
}
.post-pager a { color: var(--terracotta); display: inline-flex; align-items: center; gap: 8px; }
.post-pager a:hover { color: var(--ink); }
.post-pager-count { color: var(--mute); font-size: 13px; }
.blog-empty { font-family: var(--sans); font-size: 17px; color: var(--mute); }
.blog-empty a { color: var(--terracotta); border-bottom: 1px solid var(--terracotta); }

/* ===========================================================
   POST — HEADER
   =========================================================== */
.post { padding-bottom: 40px; }
.post-head { padding-top: 170px; padding-bottom: 8px; }
.post-head-inner { max-width: 760px; }
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--mute);
  margin-bottom: 22px;
}
.post-cat {
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--terracotta);
}
.post-cat:hover { border-bottom: 1px solid var(--terracotta); }
.post-meta-sep { color: var(--mute-2); }
.post-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
  margin-bottom: 22px;
}
.post-standfirst {
  font-family: var(--sans);
  font-size: 21px;
  line-height: 1.55;
  color: var(--body);
  max-width: 60ch;
  margin-bottom: 30px;
}
.post-byline { display: flex; align-items: center; gap: 13px; }
.avatar, .post-author-avatar, .author-hero-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-weight: 600;
  color: var(--off-white);
  background: var(--ink);
  letter-spacing: 0.01em;
  flex-shrink: 0;
}
.avatar { width: 42px; height: 42px; border-radius: 50%; font-size: 15px; }
.post-byline-text { font-family: var(--sans); font-size: 14px; color: var(--mute); line-height: 1.35; }
.post-byline-text a { color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--border); }
.post-byline-text a:hover { border-bottom-color: var(--terracotta); color: var(--terracotta); }
.post-byline-role { display: block; font-size: 12.5px; color: var(--mute); }
@media (max-width: 900px) { .post-head { padding-top: 128px; } }
@media (max-width: 540px) { .post-standfirst { font-size: 18px; } }

/* ===========================================================
   POST — TL;DR callout
   =========================================================== */
.post-tldr {
  max-width: 760px;
  margin: 36px 0 8px;
  padding: 26px 30px;
  background: var(--terracotta-soft);
  border: 1px solid rgba(184, 71, 46, 0.22);
  border-left: 3px solid var(--terracotta);
  border-radius: 10px;
}
.post-tldr-label {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 10px;
}
.post-tldr p {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--body);
  margin: 0;
}

/* ===========================================================
   POST — BODY PROSE
   =========================================================== */
.post-body {
  max-width: 720px;
  margin-top: 44px;
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.72;
  color: var(--body);
}
.post-body > p { margin: 0 0 26px; }
.post-body > p:first-child { margin-top: 0; }
.post-body strong { color: var(--ink); font-weight: 600; }
.post-body em { font-style: italic; }
.post-body a {
  color: var(--terracotta);
  border-bottom: 1px solid rgba(184, 71, 46, 0.35);
  transition: border-color 160ms ease, color 160ms ease;
}
.post-body a:hover { border-bottom-color: var(--terracotta); }

.post-body h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(28px, 3.2vw, 36px);
  line-height: 1.16;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 56px 0 18px;
  text-wrap: balance;
}
.post-body h2 em { font-style: italic; color: var(--terracotta); }
.post-body h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 40px 0 14px;
}
.post-body h4 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 32px 0 12px;
}

.post-body ul, .post-body ol { margin: 0 0 26px; padding: 0; }
.post-body li { position: relative; margin: 0 0 12px; padding-left: 28px; line-height: 1.6; }
.post-body ul > li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 13px;
  height: 1.5px;
  background: var(--terracotta);
}
.post-body ol { counter-reset: prime-ol; }
.post-body ol > li { counter-increment: prime-ol; }
.post-body ol > li::before {
  content: counter(prime-ol);
  position: absolute;
  left: 0;
  top: 0.05em;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  color: var(--terracotta);
}
.post-body li > ul, .post-body li > ol { margin-top: 12px; }

.post-body blockquote {
  margin: 36px 0;
  padding: 6px 0 6px 28px;
  border-left: 2px solid var(--terracotta);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(21px, 2.3vw, 26px);
  line-height: 1.38;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.post-body blockquote p { margin: 0 0 10px; }
.post-body blockquote p:last-child { margin-bottom: 0; }
.post-body blockquote em { color: var(--terracotta); }

.post-body hr {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 48px 0;
}

.post-body img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin: 32px 0;
}

.post-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--paper-elev);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.12em 0.4em;
}
.post-body pre {
  background: var(--ink);
  color: #E7E3DA;
  border-radius: 10px;
  padding: 22px 24px;
  overflow-x: auto;
  margin: 0 0 26px;
  font-size: 14px;
  line-height: 1.6;
}
.post-body pre code { background: none; border: 0; padding: 0; color: inherit; font-size: 14px; }

/* Tables — comparison/benchmark data */
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 30px;
  font-size: 15.5px;
  font-family: var(--sans);
}
.post-body thead th {
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--mute);
  padding: 0 18px 14px 0;
  border-bottom: 1px solid var(--ink);
}
.post-body tbody td {
  padding: 15px 18px 15px 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--body);
}
.post-body tbody tr td:first-child { font-weight: 600; color: var(--ink); }

@media (max-width: 540px) {
  .post-body { font-size: 17px; }
  .post-body table { font-size: 14px; }
}

/* ===========================================================
   POST — SOURCES
   =========================================================== */
.post-sources {
  max-width: 720px;
  margin: 12px 0 0;
  padding: 28px 0 0;
  border-top: 1px solid var(--border);
}
.post-sources-h {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 16px;
}
.post-sources ol { display: grid; gap: 9px; counter-reset: src; }
.post-sources li {
  position: relative;
  padding-left: 24px;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--mute);
  counter-increment: src;
}
.post-sources li::before {
  content: counter(src);
  position: absolute; left: 0; top: 0;
  font-weight: 600; font-size: 12px; color: var(--terracotta);
}
.post-sources a { color: var(--body); border-bottom: 1px solid var(--border); word-break: break-word; }
.post-sources a:hover { color: var(--terracotta); border-bottom-color: var(--terracotta); }

/* ===========================================================
   POST — FAQ (reuses global .faq markup; just spacing here)
   =========================================================== */
.post-faq { padding-top: 96px; padding-bottom: 40px; }
.post-faq .h-2 { margin-bottom: 32px; }

/* ===========================================================
   POST — AUTHOR BOX
   =========================================================== */
.post-author {
  max-width: 760px;
  margin: 64px 0 0;
  display: flex;
  gap: 22px;
  padding: 32px 34px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--paper-elev);
}
.post-author-avatar { width: 58px; height: 58px; border-radius: 50%; font-size: 20px; }
.post-author-kicker {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 6px;
}
.post-author-name { font-family: var(--serif); font-weight: 600; font-size: 22px; color: var(--ink); letter-spacing: -0.01em; }
.post-author-name:hover { color: var(--terracotta); }
.post-author-role { font-family: var(--sans); font-size: 13px; color: var(--terracotta); margin: 2px 0 14px; }
.post-author-bio { font-family: var(--sans); font-size: 15.5px; line-height: 1.62; color: var(--body); margin-bottom: 16px; }
.post-author-links { display: flex; gap: 20px; font-family: var(--sans); font-size: 14px; font-weight: 600; }
.post-author-links a { color: var(--terracotta); border-bottom: 1px solid transparent; }
.post-author-links a:hover { border-bottom-color: var(--terracotta); }
@media (max-width: 540px) {
  .post-author { flex-direction: column; gap: 18px; padding: 26px 24px; }
}

/* ===========================================================
   POST — RELATED + CTA
   =========================================================== */
.post-related { padding-top: 110px; padding-bottom: 40px; }
.post-related .h-2 { margin-bottom: 36px; }
.post-related-all { margin-top: 36px; font-family: var(--sans); font-weight: 600; font-size: 15px; }
.post-related-all a { color: var(--terracotta); display: inline-flex; align-items: center; gap: 8px; }
.post-related-all a:hover { color: var(--ink); }
.post-related-all .chev { transition: transform 180ms ease; }
.post-related-all a:hover .chev { transform: translateX(4px); }
.post-cta { margin-top: 40px; }

/* ===========================================================
   EDITORIAL PATTERNS reused by the AUTHOR page
   (the original About page defines these inline, not globally)
   =========================================================== */
.premise .premise-head { max-width: 760px; margin-bottom: 48px; }
.premise .premise-body {
  max-width: 720px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 21px;
  line-height: 1.62;
  color: var(--body);
  letter-spacing: -0.005em;
}
.premise .premise-body p { margin: 0 0 26px; }
.premise .premise-body p:last-child { margin-bottom: 0; }
.about-pullquote {
  margin: 36px 0;
  padding: 8px 0 8px 28px;
  border-left: 2px solid var(--terracotta);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.35;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-wrap: balance;
  max-width: 720px;
}
.about-pullquote em { font-style: italic; color: var(--terracotta); font-weight: 500; }
.compounds-link {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  color: var(--terracotta);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.01em;
  padding: 14px 22px;
  border: 1px solid var(--terracotta);
  border-radius: 5px;
  transition: background 200ms ease, color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}
.compounds-link:hover {
  background: var(--terracotta);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(184, 71, 46, 0.18);
}
.compounds-link .chev { transition: transform 180ms ease; display: inline-block; }
.compounds-link:hover .chev { transform: translateX(4px); }
@media (max-width: 720px) {
  .premise .premise-body { font-size: 18px; }
}

/* ===========================================================
   AUTHOR PAGE
   =========================================================== */
.author-hero { padding-top: 170px; padding-bottom: 24px; }
.author-hero .crumb { margin-bottom: 34px; }
.author-hero-id { display: flex; align-items: center; gap: 26px; }
.author-hero-avatar { width: 96px; height: 96px; border-radius: 50%; font-size: 34px; }
.author-hero-name-block .eyebrow { color: var(--terracotta); margin-bottom: 12px; }
.author-hero-name-block h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(40px, 5.4vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 14px;
}
.author-hero-tag { font-family: var(--sans); font-size: 17px; line-height: 1.55; color: var(--body); max-width: 52ch; margin-bottom: 22px; }
.author-hero-links { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 22px; }
.author-hero-social { font-family: var(--sans); font-weight: 600; font-size: 14px; color: var(--terracotta); border-bottom: 1px solid transparent; }
.author-hero-social:hover { border-bottom-color: var(--terracotta); }
.author-bio { padding-top: 64px; }
.author-bio-body { margin-top: 0; }
.author-bio-cta { margin-top: 36px; }
.author-posts { padding-top: 40px; padding-bottom: 140px; }
.author-posts .h-2 { margin-bottom: 36px; }
@media (max-width: 700px) {
  .author-hero-id { flex-direction: column; align-items: flex-start; gap: 18px; }
  .author-hero-avatar { width: 76px; height: 76px; font-size: 28px; }
}

/* ===========================================================
   Reveal hook parity — the blog uses the global .reveal/.in
   IntersectionObserver from script.js; no extra JS required.
   =========================================================== */
