/* ═══════════════════════════════════════════════════════════════
   Case Bench Blog — Editorial Design
   Fonts: Playfair Display (headlines) · DM Sans (body)
   Palette: Deep purple brand + warm gold + teal accent
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,900;1,400;1,700&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

/* ── Tokens ─────────────────────────────────────────────────────── */
:root {
  --b-bg:          #F6F4FF;
  --b-surface:     #FFFFFF;
  --b-ink:         #130B2B;
  --b-muted:       #6B6480;
  --b-primary:     #3A1C71;
  --b-accent:      #7B4BD2;
  --b-gold:        #C49A1E;
  --b-gold-light:  #FDF3D0;
  --b-teal:        #00A3B8;
  --b-border:      #E8E1F5;
  --b-reading:     #FDFCF8;

  --ff-display:    'Playfair Display', Georgia, serif;
  --ff-body:       'DM Sans', 'Open Sans', sans-serif;

  --r-sm:  8px;
  --r-md:  14px;
  --r-lg:  22px;

  --sh-sm: 0 2px 10px rgba(58,28,113,.07);
  --sh-md: 0 6px 24px rgba(58,28,113,.11);
  --sh-lg: 0 16px 48px rgba(58,28,113,.16);
}

/* ── Smooth anchor navigation with navbar offset ────────────────── */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px; /* clears the fixed navbar on anchor jump */
}

/* ── Page Shell ─────────────────────────────────────────────────── */
body#page-top {
  background-color: var(--b-bg) !important;
}

.blog-page {
  font-family: var(--ff-body);
  color: var(--b-ink);
  max-width: 1240px;
  margin: 0 auto;
  padding: 100px 24px 80px;
}

/* ── Section Header ─────────────────────────────────────────────── */
.blog-masthead {
  text-align: center;
  padding: 60px 0 56px;
  position: relative;
}

.blog-masthead::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--b-primary), var(--b-accent));
  margin: 20px auto 0;
  border-radius: 2px;
}

.blog-masthead .masthead-eyebrow {
  font-family: var(--ff-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--b-accent);
  margin-bottom: 16px;
  display: block;
}

.blog-masthead h1 {
  font-family: var(--ff-display);
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  color: var(--b-primary);
  line-height: 1.1;
  margin: 0 0 16px;
  letter-spacing: -.02em;
}

.blog-masthead p {
  font-size: 17px;
  color: var(--b-muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── Featured Post ──────────────────────────────────────────────── */
.featured-post {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 440px;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-lg);
  margin-bottom: 64px;
  cursor: pointer;
  color: inherit;
  transition: transform .3s ease, box-shadow .3s ease;
}

.featured-post:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 64px rgba(58,28,113,.22);
}

.featured-post-body {
  background: linear-gradient(135deg, #1a0840 0%, #3A1C71 55%, #5c2fa0 100%);
  padding: 52px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

/* decorative rings */
.featured-post-body::before {
  content: '';
  position: absolute;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 50%;
  bottom: -80px;
  right: -80px;
}
.featured-post-body::after {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 50%;
  bottom: -30px;
  right: -30px;
}

.featured-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.12);
  color: #c8b8f8;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 40px;
  border: 1px solid rgba(255,255,255,.15);
  width: fit-content;
}

.featured-post-title {
  font-family: var(--ff-display);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.25;
  margin: 24px 0 18px;
  letter-spacing: -.01em;
}

.featured-post-excerpt {
  color: rgba(255,255,255,.70);
  font-size: 15px;
  line-height: 1.65;
  flex: 1;
  margin-bottom: 32px;
}

.featured-post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.featured-post-meta .meta-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
}

.featured-post-meta .meta-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.featured-post-meta .meta-author {
  color: rgba(255,255,255,.9);
  font-size: 13px;
  font-weight: 600;
}

.featured-post-meta .meta-date {
  color: rgba(255,255,255,.5);
  font-size: 12px;
}

.featured-read-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 40px;
  text-decoration: none;
  transition: background .2s;
  width: fit-content;
  margin-top: 24px;
  letter-spacing: .02em;
}

.featured-read-cta:hover {
  background: rgba(255,255,255,.22);
  color: #fff;
}

.featured-read-cta svg {
  transition: transform .2s;
}
.featured-read-cta:hover svg {
  transform: translateX(3px);
}

.featured-post-visual {
  background: linear-gradient(160deg, #1a0840 0%, #3a1c71 50%, #1a4060 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 32px;
}

/* Decorative concentric rings */
.featured-visual-rings {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.fv-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.06);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.fv-ring-1 { width: 260px; height: 260px; }
.fv-ring-2 { width: 380px; height: 380px; border-color: rgba(255,255,255,.04); }
.fv-ring-3 { width: 500px; height: 500px; border-color: rgba(255,255,255,.025); }

/* Screenshot frame inside the featured post visual panel */
.fv-screenshot-frame {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 340px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}

.fv-screenshot-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  background: rgba(0,0,0,.2);
}

.fv-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  display: inline-block;
}

.fv-screenshot-frame img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Posts Grid ─────────────────────────────────────────────────── */
.posts-grid-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.posts-grid-header h2 {
  font-family: var(--ff-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--b-muted);
  margin: 0;
  white-space: nowrap;
}

.posts-grid-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--b-border);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ── Post Card ──────────────────────────────────────────────────── */
.post-card {
  background: var(--b-surface);
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--b-border);
  box-shadow: var(--sh-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--sh-md);
  border-color: #d4c8f0;
}

.post-card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, #e8e0ff 0%, #c8b8f8 50%, #f3eeff 100%);
  position: relative;
  flex-shrink: 0;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.post-card:hover .post-card-image img {
  transform: scale(1.06);
}

/* fallback gradient when image is decorative / not ideal */
.post-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(19,11,43,.08) 100%);
}

.post-card-body {
  padding: 24px 24px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-category {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--b-gold-light);
  color: #8a6a00;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 40px;
  width: fit-content;
  margin-bottom: 14px;
}

.post-card-title {
  font-family: var(--ff-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--b-ink);
  line-height: 1.35;
  margin: 0 0 12px;
  letter-spacing: -.01em;
  flex: 1;
}

.post-card-excerpt {
  font-size: 14px;
  color: var(--b-muted);
  line-height: 1.65;
  margin: 0 0 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--b-border);
  margin-top: auto;
}

.post-card-footer .footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--b-primary), var(--b-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.footer-author {
  font-size: 12px;
  font-weight: 600;
  color: var(--b-ink);
}

.footer-date {
  font-size: 11px;
  color: var(--b-muted);
}

.card-read-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--b-accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap .2s;
}

.card-read-link:hover {
  gap: 8px;
  color: var(--b-primary);
}

/* ══════════════════════════════════════════════════════════════════
   BLOG DETAIL PAGE
   ══════════════════════════════════════════════════════════════════ */

/* ── Reading Progress Bar ───────────────────────────────────────── */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--b-primary), var(--b-accent), var(--b-teal));
  z-index: 10000;
  transition: width .1s linear;
}

/* ── Detail Page Shell ──────────────────────────────────────────── */
.blog-detail-page {
  font-family: var(--ff-body);
  color: var(--b-ink);
  background: var(--b-reading);
  min-height: 100vh;
  padding-top: 80px;
}

/* ── Breadcrumb ─────────────────────────────────────────────────── */
.breadcrumb-bar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 32px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.breadcrumb-bar a {
  color: var(--b-accent);
  text-decoration: none;
  font-weight: 500;
}

.breadcrumb-bar a:hover { text-decoration: underline; }

.breadcrumb-bar .sep {
  color: var(--b-border);
  font-size: 16px;
}

.breadcrumb-bar .current {
  color: var(--b-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

/* ── Article Hero ───────────────────────────────────────────────── */
.article-hero {
  background: linear-gradient(135deg, #1a0840 0%, var(--b-primary) 60%, #5c2fa0 100%);
  margin-top: 20px;
  padding: 64px 32px 72px;
  position: relative;
  overflow: hidden;
}

.article-hero::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border: 1px solid rgba(255,255,255,.04);
  border-radius: 50%;
  top: -200px;
  right: -100px;
}
.article-hero::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 50%;
  top: -100px;
  right: 0;
}

.article-hero-inner {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.article-hero .post-category {
  background: rgba(255,255,255,.12);
  color: #c8b8f8;
  border: 1px solid rgba(255,255,255,.15);
  margin-bottom: 24px;
}

.article-hero-title {
  font-family: var(--ff-display);
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 700;
  color: #fff;
  line-height: 1.18;
  margin: 0 0 28px;
  letter-spacing: -.02em;
}

.article-hero-summary {
  font-size: 17px;
  line-height: 1.7;
  color: rgba(255,255,255,.72);
  border-left: 3px solid rgba(255,255,255,.25);
  padding-left: 20px;
  margin: 0 0 32px;
  font-style: italic;
}

.article-hero-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-meta-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: 2px solid rgba(255,255,255,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  flex-shrink: 0;
}

.hero-meta-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hero-meta-author {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,.95);
}

.hero-meta-secondary {
  font-size: 12px;
  color: rgba(255,255,255,.5);
  display: flex;
  gap: 12px;
}

.hero-meta-secondary span::before {
  content: '·';
  margin-right: 12px;
}
.hero-meta-secondary span:first-child::before {
  content: '';
  margin-right: 0;
}

/* ── Article Layout (content + TOC) ─────────────────────────────── */
.article-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 32px 80px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 64px;
  align-items: start;
}

/* ── Article Body ───────────────────────────────────────────────── */
.article-body {
  min-width: 0;
}

.article-body p {
  font-size: 17px;
  line-height: 1.85;
  color: #2A2240;
  margin: 0 0 24px;
}

.article-body h2 {
  font-family: var(--ff-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--b-primary);
  margin: 52px 0 18px;
  line-height: 1.25;
  letter-spacing: -.01em;
  padding-top: 8px;
  border-top: 2px solid var(--b-border);
}

.article-body h2:first-child { margin-top: 0; border-top: none; }

.article-body h3 {
  font-family: var(--ff-body);
  font-size: 19px;
  font-weight: 700;
  color: var(--b-ink);
  margin: 36px 0 14px;
  line-height: 1.3;
}

.article-body h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--b-ink);
  margin: 28px 0 10px;
}

.article-body ul,
.article-body ol {
  margin: 0 0 24px;
  padding-left: 26px;
}

.article-body li {
  font-size: 17px;
  line-height: 1.8;
  color: #2A2240;
  margin-bottom: 8px;
}

.article-body a {
  color: var(--b-accent);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(123,75,210,.3);
  text-underline-offset: 3px;
  transition: text-decoration-color .2s;
}
.article-body a:hover {
  text-decoration-color: var(--b-accent);
}

/* Blockquote */
.article-body blockquote {
  position: relative;
  margin: 36px 0;
  padding: 28px 28px 28px 36px;
  background: linear-gradient(135deg, #F0EBFF, #FAF7FF);
  border-radius: var(--r-md);
  border-left: 4px solid var(--b-accent);
  font-style: italic;
  color: var(--b-primary);
  font-size: 17px;
  line-height: 1.7;
}

.article-body blockquote::before {
  content: '"';
  font-family: var(--ff-display);
  font-size: 80px;
  color: var(--b-accent);
  opacity: .2;
  position: absolute;
  top: -10px;
  left: 12px;
  line-height: 1;
}

/* Comparison Table */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 32px 0;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--sh-sm);
}

.article-body table thead tr {
  background: var(--b-primary) !important;
  color: #fff !important;
}

.article-body table thead th {
  padding: 14px 18px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .04em;
  border: none !important;
}

.article-body table tbody tr {
  border-bottom: 1px solid var(--b-border);
  transition: background .15s;
}

.article-body table tbody tr:hover {
  background: #F5F1FF !important;
}

.article-body table tbody tr:last-child {
  border-bottom: none;
}

.article-body table td {
  padding: 13px 18px;
  border: none !important;
  vertical-align: middle;
  font-size: 14px;
  line-height: 1.5;
}

.article-body table tbody tr:nth-child(odd) {
  background: #FDFCFF;
}

.article-body table tbody tr:nth-child(even) {
  background: #F8F5FF;
}

/* Score rows at bottom of comparison table */
.article-body table tbody tr:last-child {
  background: var(--b-primary) !important;
  color: #fff !important;
  font-weight: 700;
}

.article-body table tbody tr:last-child td {
  color: #fff;
}

/* Table wrapper for horizontal scroll on mobile */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 32px 0;
  border-radius: var(--r-md);
  box-shadow: var(--sh-sm);
}
.table-scroll table {
  margin: 0;
  box-shadow: none;
}

/* Inline code */
.article-body code {
  background: #EDE8FF;
  color: var(--b-primary);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 14px;
}

/* ── Product Screenshots ────────────────────────────────────────── */
.screenshot-wrap {
  margin: 36px 0 44px;
}

.screenshot-frame {
  background: #F0EBFF;
  border-radius: var(--r-md);
  padding: 12px 12px 0;
  box-shadow: var(--sh-md);
  overflow: hidden;
}

.screenshot-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.screenshot-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.screenshot-dot:nth-child(1) { background: #FF5F57; }
.screenshot-dot:nth-child(2) { background: #FEBC2E; }
.screenshot-dot:nth-child(3) { background: #28C840; }

.screenshot-frame img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px 6px 0 0;
}

.screenshot-caption {
  text-align: center;
  font-size: 13px;
  color: var(--b-muted);
  margin-top: 10px;
  font-style: italic;
}

/* Feature pills list */
.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 28px;
  padding: 0;
  list-style: none;
}

.feature-pills li {
  background: #F0EBFF;
  color: var(--b-primary);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 40px;
  border: 1px solid #D8CCFF;
  margin: 0;
  line-height: 1.4;
}

/* Highlight callout box */
.article-callout {
  background: linear-gradient(135deg, #F0EBFF, #E8F8FF);
  border: 1px solid #D0C0FF;
  border-radius: var(--r-md);
  padding: 24px 28px;
  margin: 32px 0;
}

.article-callout strong {
  display: block;
  font-size: 15px;
  color: var(--b-primary);
  margin-bottom: 6px;
}

.article-callout p {
  font-size: 15px !important;
  margin: 0 !important;
  color: #3A2E6A !important;
}

/* ── Article CTA ────────────────────────────────────────────────── */
.article-cta {
  margin-top: 60px;
  padding: 40px;
  background: linear-gradient(135deg, var(--b-primary), var(--b-accent));
  border-radius: var(--r-lg);
  text-align: center;
  color: #fff;
}

.article-cta h3 {
  font-family: var(--ff-display);
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 10px;
  color: #fff;
}

.article-cta p {
  font-size: 15px;
  color: rgba(255,255,255,.75);
  margin: 0 0 24px;
  line-height: 1.6;
}

.article-cta a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--b-primary);
  font-weight: 700;
  font-size: 14px;
  padding: 13px 28px;
  border-radius: 40px;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}

.article-cta a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}

/* ── Table of Contents ──────────────────────────────────────────── */
.toc-sidebar {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 28px 24px;
  background: var(--b-surface);
  border-radius: var(--r-md);
  border: 1px solid var(--b-border);
  box-shadow: var(--sh-sm);
  scrollbar-width: thin;
  scrollbar-color: var(--b-border) transparent;
}

.toc-sidebar::-webkit-scrollbar { width: 4px; }
.toc-sidebar::-webkit-scrollbar-track { background: transparent; }
.toc-sidebar::-webkit-scrollbar-thumb { background: var(--b-border); border-radius: 4px; }

.toc-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--b-muted);
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--b-border);
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-list li {
  margin-bottom: 4px;
}

.toc-list a {
  display: block;
  font-size: 13px;
  line-height: 1.5;
  color: var(--b-muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  border-left: 2px solid transparent;
  transition: all .18s ease;
}

.toc-list a:hover {
  color: var(--b-accent);
  background: #F5F0FF;
  border-left-color: var(--b-accent);
}

.toc-list a.toc-active {
  color: var(--b-primary);
  background: #EDE5FF;
  border-left-color: var(--b-primary);
  font-weight: 600;
}

.toc-list .toc-h3 a {
  padding-left: 22px;
  font-size: 12px;
}

/* ── Back to Blog Footer Link ───────────────────────────────────── */
.back-to-blog {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--b-accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 0;
  margin-top: 40px;
  transition: gap .2s;
}

.back-to-blog:hover {
  gap: 12px;
  color: var(--b-primary);
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .article-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .toc-sidebar {
    display: none;
  }
}

@media (max-width: 768px) {
  .blog-page {
    padding: 80px 16px 60px;
  }

  .blog-masthead {
    padding: 40px 0 36px;
  }

  /* Featured post stacks vertically */
  .featured-post {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .featured-post-body {
    padding: 36px 28px;
    order: 2;
  }

  .featured-post-visual {
    min-height: 200px;
    order: 1;
    padding: 24px 20px;
  }

  .featured-post-title {
    font-size: 24px;
  }

  .posts-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .post-card-image {
    height: 180px;
  }

  /* Detail page */
  .article-hero {
    padding: 44px 20px 52px;
  }

  .article-hero-title {
    font-size: 26px;
  }

  .article-hero-summary {
    font-size: 15px;
  }

  .article-layout {
    padding: 36px 20px 60px;
  }

  .article-body p,
  .article-body li {
    font-size: 16px;
  }

  .article-body h2 {
    font-size: 22px;
    margin-top: 40px;
  }

  .article-body h3 {
    font-size: 17px;
  }

  .article-body blockquote {
    padding: 20px 20px 20px 24px;
    font-size: 16px;
  }

  .breadcrumb-bar {
    padding: 16px 20px 0;
  }

  .article-cta {
    padding: 28px 24px;
  }

  .article-cta h3 {
    font-size: 20px;
  }

  .article-hero-meta {
    gap: 12px;
  }

  .hero-meta-secondary {
    flex-direction: column;
    gap: 2px;
  }

  .hero-meta-secondary span::before {
    content: '';
    margin-right: 0;
  }
}

@media (max-width: 480px) {
  .featured-post-body {
    padding: 28px 20px;
  }

  .blog-masthead h1 {
    font-size: 30px;
  }
}
