/* ════════════════════════════════════════════════════════════════
   blog.css — loads after assets/css/style.css
   Covers: blog index page, Phase 1 detail posts, Phase 2/3 posts
   ════════════════════════════════════════════════════════════════ */

/* ── 1. MOBILE NAV — div.nav-links open-state drawer ────────────
   style.css handles ul.nav-links drawer via .nav-links li a.
   post-main posts use div.nav-links > a (no li), so we add
   open-state styles for those direct-anchor children here.
   ────────────────────────────────────────────────────────────── */
@media(max-width:960px){
  div.nav-links.open > a {
    display: block;
    padding: 18px 28px;
    font-size: .95rem;
    font-weight: 700;
    border-bottom: 1px solid var(--border);
    color: var(--white);
    letter-spacing: .02em;
    text-decoration: none;
  }
  div.nav-links.open > a:hover,
  div.nav-links.open > a:focus { color: var(--purple); }

  /* nav-logo alignment inside nav.navbar */
  nav.navbar .nav-logo { display:flex; align-items:center; }
  nav.navbar .nav-logo img { height:36px; width:auto; }
}

/* ── 2. BLOG INDEX HERO ──────────────────────────────────────── */
.blog-hero {
  padding: 120px 48px 56px;
  text-align: center;
  background: var(--surface);
}
.blog-hero h1 {
  font-size: clamp(2rem,4vw,3.2rem);
  font-weight: 900;
  color: #1a0050;
  margin-bottom: .75rem;
  letter-spacing: -.025em;
}
.blog-hero p {
  color: var(--gray);
  font-size: 1.05rem;
  max-width: 52ch;
  margin: 0 auto;
}

/* ── 3. BLOG CARD GRID ───────────────────────────────────────── */
.blog-grid {
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 48px 96px;
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(300px,1fr));
  gap: 28px;
}
.blog-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s,transform .2s;
}
.blog-card:hover {
  box-shadow: 0 8px 32px rgba(91,33,245,.12);
  transform: translateY(-3px);
}
.blog-card-tag {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 10px;
}
.blog-card h2 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1a0050;
  line-height: 1.3;
  margin-bottom: 8px;
}
.blog-card p {
  font-size: .875rem;
  color: var(--gray);
  line-height: 1.65;
  flex: 1;
}
.blog-card-meta {
  font-size: .73rem;
  color: var(--gray);
  margin-top: 14px;
  opacity: .7;
}

/* ── 4. BREADCRUMB ───────────────────────────────────────────────
   Desktop nav height: 16px padding + 52px logo + 16px padding = 84px.
   We add 8px buffer → 92px top padding clears the fixed nav.
   ────────────────────────────────────────────────────────────── */
.breadcrumb {
  font-size: .76rem;
  color: var(--gray);
  padding: 92px 48px 0;
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  line-height: 1.5;
}
.breadcrumb a {
  color: var(--purple);
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
/* Phase 1: styled separator span */
.breadcrumb-sep { opacity: .45; }
/* Phase 2/3: raw › character — style the raw text nodes via the gap */

/* ── 5. PHASE 1 ARTICLE LAYOUT ───────────────────────────────── */
.article-header {
  padding: 24px 48px 40px;
  max-width: 1120px;
  margin: 0 auto;
}
.article-kicker {
  display: inline-block;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 14px;
}
.article-title {
  font-size: clamp(1.8rem,3.5vw,2.8rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.03em;
  color: #1a0050;
  margin-bottom: 14px;
}
div.article-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: .78rem;
  color: var(--gray);
  flex-wrap: wrap;
}
div.article-meta span { display:flex; align-items:center; gap:5px; }

/* Phase 1 two-column layout */
.article-body {
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 48px 80px;
  display: grid;
  grid-template-columns: 1fr 272px;
  gap: 60px;
  align-items: start;
}

/* ── 6. PHASE 2/3 POST LAYOUT ────────────────────────────────────
   post-main is the page wrapper for all Phase 2/3 posts.
   It sets up the two-column grid (article + sidebar) with the
   breadcrumb spanning both columns above.
   ────────────────────────────────────────────────────────────── */
.post-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 92px 48px 0; /* 92px clears the fixed nav */
  display: grid;
  grid-template-columns: 1fr 280px;
  column-gap: 60px;
  align-items: start;
}

/* breadcrumb spans both columns; post-main padding handles top clearance */
.post-main > .breadcrumb {
  grid-column: 1 / -1;
  padding: 0;           /* override the default 92px top — post-main does it */
  margin-bottom: 28px;
  max-width: none;
}

/* article: left column */
.post-main > article {
  grid-column: 1;
  min-width: 0;         /* prevent grid blowout */
  padding-bottom: 80px;
}

/* sidebar: right column, rows 2+ */
.post-main > aside.blog-sidebar {
  grid-column: 2;
  grid-row: 2;
}

/* article-header inside post-main article */
.post-main .article-header {
  padding: 0;
  max-width: none;
  margin: 0 0 28px;
}

/* article-tag = Phase 2/3 equivalent of article-kicker */
.article-tag {
  display: inline-block;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 14px;
}

/* Phase 2/3 h1 (inside article > header) */
.post-main article h1 {
  font-size: clamp(1.8rem,3.5vw,2.8rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.03em;
  color: #1a0050;
  margin-bottom: 14px;
}

/* Phase 2/3 article-meta — used as <p class="article-meta"> */
p.article-meta {
  font-size: .78rem;
  color: var(--gray);
  margin-top: 4px;
}

/* ── 7. PROSE — Phase 1 (.prose) and Phase 2/3 (article) ──────── */
.prose,
.post-main article {
  line-height: 1.82;
  font-size: 1.02rem;
  color: #1a0050;
}
.prose h2,
.post-main article h2 {
  font-size: 1.45rem;
  font-weight: 800;
  margin: 2.25rem 0 .75rem;
  color: #1a0050;
  letter-spacing: -.015em;
}
.prose h3,
.post-main article h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 1.75rem 0 .5rem;
  color: #1a0050;
}
.prose p,
.post-main article > p {
  margin-bottom: 1.2rem;
}
.prose ul,.prose ol,
.post-main article ul,.post-main article ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}
.prose li,
.post-main article > ul > li,
.post-main article > ol > li { margin-bottom: .4rem; }
.prose a,
.post-main article > p a { color: var(--purple); }
.prose a:hover,
.post-main article > p a:hover { text-decoration: underline; }
.prose strong,
.post-main article strong { font-weight: 800; }
.prose blockquote {
  border-left: 3px solid var(--purple);
  padding-left: 1rem;
  color: var(--gray);
  font-style: italic;
  margin: 1.5rem 0;
}

/* Tables */
.prose table,
.post-main article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: .9rem;
  display: block;
  overflow-x: auto;
}
.prose thead,
.post-main article thead { display: table-header-group; }
.prose tbody,
.post-main article tbody { display: table-row-group; }
.prose tr,
.post-main article tr { display: table-row; }
.prose th,
.post-main article th {
  background: var(--surface);
  padding: .65rem 1rem;
  text-align: left;
  font-weight: 700;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.prose td,
.post-main article td {
  padding: .6rem 1rem;
  border-bottom: 1px solid var(--border);
}

/* Code */
.prose code,
.post-main article code {
  font-family: 'DM Mono',monospace;
  background: var(--surface);
  padding: .15rem .4rem;
  border-radius: 4px;
  font-size: .88em;
}
.prose pre,
.post-main article pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: .88rem;
}
.prose pre code,
.post-main article pre code {
  background: none;
  padding: 0;
}
.prose hr { border:none; border-top:1px solid var(--border); margin:2rem 0; }

/* ── 8. ANSWER BLOCK (AEO) ───────────────────────────────────── */
.answer-block {
  background: var(--surface);
  border-left: 4px solid var(--purple);
  padding: 1.25rem 1.5rem;
  border-radius: 0 12px 12px 0;
  margin: 0 0 2rem;
  font-size: 1.02rem;
  line-height: 1.78;
  color: #1a0050;
}
.answer-block p { margin-bottom: 0; }

/* ── 9. SIDEBAR — Phase 1 (.article-sidebar) ─────────────────── */
.article-sidebar {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── 10. SIDEBAR — Phase 2/3 (.blog-sidebar) ─────────────────── */
.blog-sidebar {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Shared sidebar CTA */
.sidebar-cta {
  background: linear-gradient(135deg,#5b21f5,#7c3aed);
  color: #fff;
  padding: 24px;
  border-radius: 16px;
  text-align: center;
}
.sidebar-cta h3 {
  font-size: .95rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.sidebar-cta p {
  font-size: .8rem;
  opacity: .87;
  margin-bottom: 16px;
  line-height: 1.55;
}
/* Both .sidebar-cta a (Phase 1) and .btn-primary (Phase 2/3) */
.sidebar-cta a,
.btn-primary {
  display: inline-block;
  background: #fff;
  color: var(--purple);
  padding: 10px 22px;
  border-radius: 100px;
  font-size: .76rem;
  font-weight: 800;
  text-decoration: none;
  transition: background .2s;
}
.sidebar-cta a:hover,
.btn-primary:hover {
  background: #f0ebff;
  text-decoration: none;
}
.sidebar-wa {
  display: block;
  background: #25D366;
  color: #fff;
  padding: 11px 20px;
  border-radius: 100px;
  font-size: .76rem;
  font-weight: 800;
  text-decoration: none;
  margin-top: 8px;
  text-align: center;
}
.sidebar-wa:hover { background: #1da851; }

/* Phase 1: sidebar-box */
.sidebar-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}
.sidebar-box h4 {
  font-size: .8rem;
  font-weight: 800;
  color: #1a0050;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.sidebar-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-box ul li a {
  font-size: .82rem;
  color: var(--purple);
  text-decoration: none;
  line-height: 1.4;
}
.sidebar-box ul li a:hover { text-decoration: underline; }

/* Phase 2/3: div.sidebar-links (same visuals as sidebar-box) */
div.sidebar-links {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}
div.sidebar-links h4 {
  font-size: .8rem;
  font-weight: 800;
  color: #1a0050;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
div.sidebar-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
div.sidebar-links ul li a {
  font-size: .82rem;
  color: var(--purple);
  text-decoration: none;
  line-height: 1.4;
}
div.sidebar-links ul li a:hover { text-decoration: underline; }

/* ── 11. AUTHOR BLOCK ────────────────────────────────────────── */
.author-block {
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
/* Phase 1: .author-logo > img */
.author-logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.author-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}
/* Phase 2/3: img.author-avatar directly in .author-block */
img.author-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: contain;
  background: var(--surface);
  padding: 8px;
  flex-shrink: 0;
}
/* Phase 1: .author-info */
.author-info {
  font-size: .84rem;
  color: var(--gray);
  line-height: 1.65;
}
.author-info strong {
  display: block;
  color: #1a0050;
  font-size: .92rem;
  margin-bottom: 3px;
}
/* Phase 2/3: .author-name + .author-bio */
.author-name {
  display: block;
  color: #1a0050;
  font-size: .92rem;
  font-weight: 800;
  margin-bottom: 3px;
}
.author-bio {
  font-size: .84rem;
  color: var(--gray);
  line-height: 1.65;
}

/* ── 12. FAQ SECTION ─────────────────────────────────────────── */
.faq-section {
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.faq-section > h2 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: #1a0050;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}
/* Phase 1: .faq-q / .faq-a */
.faq-q {
  padding: 14px 18px;
  font-weight: 700;
  font-size: .9rem;
  color: #1a0050;
  background: var(--surface);
}
.faq-a {
  padding: 10px 18px 14px;
  font-size: .87rem;
  color: var(--gray);
  line-height: 1.72;
}
/* Phase 2/3: h3 / p inside .faq-item */
.faq-item h3 {
  padding: 14px 18px;
  font-weight: 700;
  font-size: .9rem;
  color: #1a0050;
  background: var(--surface);
  margin: 0;
  line-height: 1.4;
}
.faq-item > p {
  padding: 10px 18px 14px;
  font-size: .87rem;
  color: var(--gray);
  line-height: 1.72;
  margin: 0;
}

/* ── 13. RELATED POSTS ───────────────────────────────────────── */
.related-posts {
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
/* Phase 1 uses h2, Phase 2/3 uses h3 */
.related-posts h2,
.related-posts h3 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 14px;
  color: #1a0050;
}
/* Phase 1: .related-list */
.related-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.related-list a {
  color: var(--purple);
  font-size: .87rem;
  font-weight: 600;
  text-decoration: none;
}
.related-list a:hover { text-decoration: underline; }
/* Phase 2/3: plain ul > li > a */
.related-posts ul:not(.related-list) {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.related-posts ul:not(.related-list) li a {
  color: var(--purple);
  font-size: .87rem;
  font-weight: 600;
  text-decoration: none;
}
.related-posts ul:not(.related-list) li a:hover { text-decoration: underline; }

/* ── 14. BLOG FOOTER ─────────────────────────────────────────── */
.blog-footer {
  background: #0c0023;
  color: rgba(255,255,255,.6);
  padding: 36px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: .78rem;
  margin-top: auto;
}
.blog-footer a {
  color: rgba(255,255,255,.6);
  text-decoration: none;
}
.blog-footer a:hover { color: #fff; }
.blog-footer-links { display:flex; gap:20px; }

/* ── 15. RESPONSIVE ──────────────────────────────────────────────
   At ≤960px the nav wraps to two rows. We calculate:
     Row 1: logo (36px) + padding (~20px) ≈ 56px
     Row 2: links (~28px) + bottom pad (8px) ≈ 36px
     Total nav height on mobile ≈ 92px
   breadcrumb top padding on mobile: 96px (4px buffer)
   ────────────────────────────────────────────────────────────── */
@media(max-width:960px){
  /* Phase 1 layout */
  .article-body {
    grid-template-columns: 1fr;
    padding: 0 20px 60px;
    gap: 36px;
  }
  .article-sidebar { position:static; }
  .article-header  { padding:16px 20px 28px; }

  /* Phase 2/3 layout */
  .post-main {
    grid-template-columns: 1fr;
    padding: 0 20px 0;
    column-gap: 0;
  }
  .post-main > .breadcrumb {
    padding-top: 96px;  /* clear two-row mobile nav */
    margin-bottom: 16px;
  }
  .post-main > article { padding-bottom: 48px; }
  .post-main > aside.blog-sidebar {
    position: static;
    grid-column: auto;
    grid-row: auto;
    margin-bottom: 48px;
  }

  /* Blog index */
  .blog-grid { grid-template-columns:1fr; padding:36px 20px 60px; }
  .blog-hero  { padding:104px 20px 36px; } /* 104px clears two-row nav */

  /* Phase 1 breadcrumb top */
  .breadcrumb { padding:96px 20px 0; }
  /* But post-main > breadcrumb overrides above with padding-top:96px + padding:0 */

  /* Footer */
  .blog-footer { padding:28px 20px; flex-direction:column; text-align:center; }
  .blog-footer-links { justify-content:center; flex-wrap:wrap; }
}

@media(max-width:600px){
  .answer-block    { padding:1rem 1.15rem; font-size:.97rem; }
  .article-title,
  .post-main article h1 { font-size:clamp(1.45rem,6vw,1.9rem); }
  .prose h2,
  .post-main article h2 { font-size:1.25rem; }
  .prose table,
  .post-main article table { font-size:.8rem; }
  .prose th,.prose td,
  .post-main article th,
  .post-main article td { padding:.5rem .65rem; }
  .blog-sidebar,.article-sidebar { top:auto; }
}

/* ══════════════════════════════════════════════════════════════════
   POST-WRAP LAYOUT (Aug 2026 – Jan 2027 Phase 3 posts)
   HTML: <main class="post-wrap"> wraps breadcrumb + article +
   aside.sidebar + section.author-block + section.faq-section +
   nav.related-posts
   ══════════════════════════════════════════════════════════════════ */

/* ── 16. POST-WRAP GRID ──────────────────────────────────────────── */
.post-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 92px 48px 0; /* 92px clears fixed nav on desktop */
  display: grid;
  grid-template-columns: 1fr 280px;
  column-gap: 60px;
  align-items: start;
}

/* breadcrumb spans both columns; post-wrap padding handles top clearance */
.post-wrap > .breadcrumb,
.post-wrap > nav.breadcrumb {
  grid-column: 1 / -1;
  padding: 0;
  max-width: none;
  margin-bottom: 28px;
}

/* article: left column */
.post-wrap > article {
  grid-column: 1;
  min-width: 0;
  padding-bottom: 80px;
}

/* sidebar: right column, starts at row 2, sticky */
.post-wrap > aside.sidebar {
  grid-column: 2;
  grid-row: 2 / span 4; /* span across author/faq/related rows */
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-self: start;
}

/* author, faq, related: left column below article */
.post-wrap > section.author-block,
.post-wrap > section.faq-section,
.post-wrap > nav.related-posts {
  grid-column: 1;
  min-width: 0;
}

/* article-header inside post-wrap article */
.post-wrap .article-header {
  padding: 0;
  max-width: none;
  margin: 0 0 28px;
}

/* ── 17. POST-WRAP HEADER LABELS ─────────────────────────────────── */
.post-tag {
  display: inline-block;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 14px;
}

.post-meta {
  font-size: .78rem;
  color: var(--gray);
  margin-top: 4px;
  display: block;
}

/* h1 inside post-wrap article */
.post-wrap article h1 {
  font-size: clamp(1.8rem,3.5vw,2.8rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.03em;
  color: #1a0050;
  margin-bottom: 14px;
}

/* ── 18. POST-WRAP PROSE ─────────────────────────────────────────── */
.post-wrap article {
  line-height: 1.82;
  font-size: 1.02rem;
  color: #1a0050;
}
.post-wrap article h2 {
  font-size: 1.45rem;
  font-weight: 800;
  margin: 2.25rem 0 .75rem;
  color: #1a0050;
  letter-spacing: -.015em;
}
.post-wrap article h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 1.75rem 0 .5rem;
  color: #1a0050;
}
.post-wrap article > p { margin-bottom: 1.2rem; }
.post-wrap article ul,
.post-wrap article ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}
.post-wrap article > ul > li,
.post-wrap article > ol > li { margin-bottom: .4rem; }
.post-wrap article > p a { color: var(--purple); }
.post-wrap article > p a:hover { text-decoration: underline; }
.post-wrap article strong { font-weight: 800; }

/* Tables */
.post-wrap article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: .9rem;
  display: block;
  overflow-x: auto;
}
.post-wrap article thead { display: table-header-group; }
.post-wrap article tbody { display: table-row-group; }
.post-wrap article tr   { display: table-row; }
.post-wrap article th {
  background: var(--surface);
  padding: .65rem 1rem;
  text-align: left;
  font-weight: 700;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.post-wrap article td {
  padding: .6rem 1rem;
  border-bottom: 1px solid var(--border);
}

/* Code */
.post-wrap article code {
  font-family: 'DM Mono',monospace;
  background: var(--surface);
  padding: .15rem .4rem;
  border-radius: 4px;
  font-size: .88em;
}
.post-wrap article pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: .88rem;
}
.post-wrap article pre code { background: none; padding: 0; }

/* ── 19. POST-WRAP SIDEBAR BLOCKS ───────────────────────────────── */
/* .sidebar-block is the card container */
.sidebar-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}

.sidebar-title {
  font-size: .8rem;
  font-weight: 800;
  color: #1a0050;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  display: block;
}

/* First .sidebar-block gets the purple CTA treatment */
.sidebar-block:first-of-type {
  background: linear-gradient(135deg,#5b21f5,#7c3aed);
  border-color: transparent;
}
.sidebar-block:first-of-type .sidebar-title { color: #fff; opacity: .87; }
.sidebar-block:first-of-type > p {
  font-size: .8rem;
  color: rgba(255,255,255,.85);
  line-height: 1.55;
  margin-bottom: 16px;
}

/* a.sidebar-cta — standalone anchor button inside sidebar-block */
a.sidebar-cta {
  display: inline-block;
  background: #fff;
  color: var(--purple) !important;
  padding: 10px 22px;
  border-radius: 100px;
  font-size: .76rem;
  font-weight: 800;
  text-decoration: none !important;
  transition: background .2s;
}
a.sidebar-cta:hover { background: #f0ebff; }

/* ul.sidebar-links inside .sidebar-block */
ul.sidebar-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
ul.sidebar-links li a {
  font-size: .82rem;
  color: var(--purple);
  text-decoration: none;
  line-height: 1.4;
}
ul.sidebar-links li a:hover { text-decoration: underline; }

/* ── 20. POST-WRAP AUTHOR AVATAR (initials circle) ─────────────── */
div.author-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg,#5b21f5,#7c3aed);
  color: #fff;
  font-size: .82rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: .02em;
}

/* ── 21. POST-WRAP RELATED GRID ──────────────────────────────────── */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(200px,1fr));
  gap: 16px;
  margin-top: 4px;
}

.related-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  text-decoration: none;
  transition: box-shadow .2s, transform .2s;
}
.related-card:hover {
  box-shadow: 0 6px 24px rgba(91,33,245,.1);
  transform: translateY(-2px);
}

.related-tag {
  display: inline-block;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 8px;
}

.related-title {
  font-size: .87rem;
  font-weight: 700;
  color: #1a0050;
  line-height: 1.35;
}

/* ── 22. POST-WRAP RESPONSIVE (≤960px) ──────────────────────────── */
@media(max-width:960px){
  .post-wrap {
    grid-template-columns: 1fr;
    padding: 0 20px 0;
    column-gap: 0;
  }
  .post-wrap > .breadcrumb,
  .post-wrap > nav.breadcrumb {
    padding-top: 96px; /* clear two-row mobile nav */
    margin-bottom: 16px;
  }
  .post-wrap > article { padding-bottom: 48px; }
  .post-wrap > aside.sidebar {
    position: static;
    grid-column: auto;
    grid-row: auto;
    margin-bottom: 48px;
  }
  .post-wrap > section.author-block,
  .post-wrap > section.faq-section,
  .post-wrap > nav.related-posts {
    grid-column: auto;
  }
  .related-grid { grid-template-columns: 1fr; }
}

@media(max-width:600px){
  .post-wrap article h1 { font-size: clamp(1.45rem,6vw,1.9rem); }
  .post-wrap article h2 { font-size: 1.25rem; }
  .post-wrap article table { font-size: .8rem; }
  .post-wrap article th,
  .post-wrap article td { padding: .5rem .65rem; }
}
