/**
 * Blog Hub Stylesheet (Code1001 Design System - Grid Lines Matrix)
 *
 * Implements:
 * 1. Clean Code1001 Hero Header with kicker pill, 54px h1, and 15.5px lead.
 * 2. Architectural Grid Lines Matrix with 1px border dividers:
 *    - Full-width split featured story on top.
 *    - 3-column content cells with tags, reading time, title, excerpt, author & arrow link.
 * 3. Homepage-parity Mosaic CTA with corner registration crosshairs (+).
 * 4. Strict CSS variable usage & native Dark/Light mode support.
 *
 * @package Code1001
 * @reference note.md
 */

/* ==========================================================================
   1. ROOT PAGE LAYOUT & CONTAINERS
   ========================================================================== */
.blog-hub-page {
  padding-bottom: 96px;
  min-height: 100vh;
}

/* Ensure blog content and posts grid are immediately visible on page load */
.blog-hub-page .blog-hero-header,
.blog-hub-page .blog-categories-slider-container,
.blog-hub-page .blog-grid-lines-wrapper,
.blog-hub-page .blog-grid-lines,
.blog-hub-page .blog-grid-featured,
.blog-hub-page .blog-grid-cell,
.blog-hub-page .blog-empty-state,
.blog-hub-page .blog-pagination {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

/* ==========================================================================
   2. HERO HEADER SECTION (NOTE.MD TYPE SCALE)
   ========================================================================== */
.blog-hero-section {
  padding: 80px 0 56px;
}

.blog-hero-header {
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

/* Kicker Pill */
.blog-hero-header .sp-kicker-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 9999px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 24px;
}

.blog-hero-header .skp-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.25);
}

html[data-theme="light"] .blog-hero-header .skp-dot {
  background: var(--text-dim);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.15);
}

/* Hero Title (54px Desktop / 38px Mobile, weight 800, line-height 1.08) */
.blog-hero-title {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 54px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 20px;
}

@media (max-width: 768px) {
  .blog-hero-title {
    font-size: 38px;
  }
}

/* Hero Lead (15.5px, line-height 1.7) */
.blog-hero-lead {
  font-size: 15.5px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-dim);
  max-width: 700px;
  margin: 0 auto;
}

/* ==========================================================================
   2.5 CATEGORIES SLIDER (ABOVE POSTS GRID)
   ========================================================================== */
.blog-categories-slider-container {
  margin-bottom: 36px;
  position: relative;
}

.blog-categories-slider-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

/* Scroll Track */
.blog-categories-track {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px;
  width: 100%;
  cursor: grab;
  user-select: none;
}

.blog-categories-track::-webkit-scrollbar {
  display: none;
}

.blog-categories-track.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

/* Category Pill */
.blog-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 9999px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-cat-pill:hover {
  background: var(--card-2);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

html[data-theme="light"] .blog-cat-pill:hover {
  border-color: rgba(0, 0, 0, 0.2);
}

/* Active Category Pill (note.md Primary Button Token Parity) */
.blog-cat-pill.is-active {
  background: var(--btn-bg);
  border-color: var(--btn-bg);
  color: var(--btn-text);
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

html[data-theme="light"] .blog-cat-pill.is-active {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

/* Category Post Count Badge */
.blog-cat-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  background: var(--card-2);
  color: var(--text-faint);
  transition: background 0.2s ease, color 0.2s ease;
}

.blog-cat-pill:hover .blog-cat-count {
  background: var(--card-3);
  color: var(--text-dim);
}

.blog-cat-pill.is-active .blog-cat-count {
  background: rgba(0, 0, 0, 0.14);
  color: var(--btn-text);
}

html[data-theme="light"] .blog-cat-pill.is-active .blog-cat-count {
  background: rgba(255, 255, 255, 0.22);
  color: var(--btn-text);
}

/* Navigation Arrow Buttons */
.blog-cat-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  z-index: 3;
}

.blog-cat-arrow:hover:not(:disabled) {
  background: var(--card-2);
  border-color: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

html[data-theme="light"] .blog-cat-arrow:hover:not(:disabled) {
  border-color: rgba(0, 0, 0, 0.25);
}

.blog-cat-arrow:disabled {
  opacity: 0.28;
  cursor: not-allowed;
  pointer-events: none;
}

.blog-cat-arrow svg {
  display: block;
  pointer-events: none;
}

@media (max-width: 640px) {
  .blog-cat-arrow {
    display: none;
  }

  .blog-categories-slider-container {
    margin-bottom: 24px;
  }
}

/* ==========================================================================
   3. ARCHITECTURAL GRID LINES MATRIX
   ========================================================================== */
.blog-posts-section {
  padding: 0;
}

.blog-grid-lines-wrapper {
  position: relative;
  border-radius: 0;
}

/* Registration Crosshair Corner Marks */
.blog-grid-lines-wrapper .reg-mark {
  position: absolute;
  width: 15px;
  height: 15px;
  font-size: 13px;
  font-weight: 400;
  line-height: 15px;
  text-align: center;
  color: var(--text-faint);
  user-select: none;
  pointer-events: none;
  z-index: 4;
}

.blog-grid-lines-wrapper .reg-mark.tl {
  top: -8px;
  left: -8px;
}

.blog-grid-lines-wrapper .reg-mark.tr {
  top: -8px;
  right: -8px;
}

.blog-grid-lines-wrapper .reg-mark.bl {
  bottom: -8px;
  left: -8px;
}

.blog-grid-lines-wrapper .reg-mark.br {
  bottom: -8px;
  right: -8px;
}

/* The Grid Lines Container: 1px top & left borders */
.blog-grid-lines {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  background: var(--card);
}

@media (max-width: 1024px) {
  .blog-grid-lines {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .blog-grid-lines {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   4. TOP FEATURED POST (SPANS ALL COLUMNS)
   ========================================================================== */
.blog-grid-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--card);
  transition: background 0.25s ease;
}

.blog-grid-featured:hover {
  background: var(--card-2);
}

@media (max-width: 900px) {
  .blog-grid-featured {
    grid-template-columns: 1fr;
  }

  .blog-featured-content {
    order: 2;
  }

  .blog-featured-media {
    order: 1;
    border-left: none;
    border-bottom: 1px solid var(--border);
  }
}

.blog-featured-content {
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  .blog-featured-content {
    padding: 28px 24px;
  }
}

.blog-featured-title {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 14px 0 16px;
}

.blog-featured-title a {
  position: relative;
  display: inline;
  text-decoration: none;
  color: var(--text);
  background-image: linear-gradient(115deg,
      var(--text) 0%,
      var(--text) 36%,
      #ffffff 50%,
      rgba(255, 255, 255, 0.5) 54%,
      var(--text) 64%,
      var(--text) 100%);
  background-size: 300% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-position 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-featured-title a:hover,
.blog-grid-featured:hover .blog-featured-title a {
  background-position: 0% 0;
}

html[data-theme="light"] .blog-featured-title a {
  background-image: linear-gradient(115deg,
      var(--text) 0%,
      var(--text) 36%,
      #64748b 48%,
      #cbd5e1 52%,
      var(--text) 64%,
      var(--text) 100%);
  background-size: 300% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

html[data-theme="light"] .blog-featured-title a:hover,
html[data-theme="light"] .blog-grid-featured:hover .blog-featured-title a {
  background-position: 0% 0;
}

.blog-featured-excerpt {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-dim);
  margin: 0 0 24px;
  flex-grow: 1;
}

.blog-featured-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
  margin-top: auto;
}

.blog-featured-media {
  width: 100%;
  height: 100%;
  min-height: 320px;
  overflow: hidden;
  border-left: 1px solid var(--border);
  background: var(--bg-soft);
  position: relative;
}

.blog-featured-media a {
  display: block;
  width: 100%;
  height: 100%;
}

.blog-featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-grid-featured:hover .blog-featured-media img {
  transform: scale(1.03);
}

/* ==========================================================================
   5. 3-COLUMN CONTENT CELLS
   ========================================================================== */
.blog-grid-cell {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 32px 28px;
  background: var(--card);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: background 0.25s ease;
}

.blog-grid-cell:hover {
  background: var(--card-2);
}

@media (max-width: 768px) {
  .blog-grid-cell {
    padding: 24px 20px;
  }
}

/* Thumbnail */
.blog-cell-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
}

.blog-cell-thumb a {
  display: block;
  width: 100%;
  height: 100%;
}

.blog-cell-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-grid-cell:hover .blog-cell-thumb img {
  transform: scale(1.035);
}

/* Meta Row (Tag & Reading Time) */
.blog-cell-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.blog-read-time {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-faint);
}

/* Card Title (22px - 24px, 700 weight, -0.02em letter spacing) */
.blog-cell-title {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 12px;
}

.blog-cell-title a {
  position: relative;
  display: inline;
  text-decoration: none;
  color: var(--text);
  background-image: linear-gradient(115deg,
      var(--text) 0%,
      var(--text) 36%,
      #ffffff 50%,
      rgba(255, 255, 255, 0.5) 54%,
      var(--text) 64%,
      var(--text) 100%);
  background-size: 300% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-position 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-cell-title a:hover,
.blog-grid-cell:hover .blog-cell-title a {
  background-position: 0% 0;
}

html[data-theme="light"] .blog-cell-title a {
  background-image: linear-gradient(115deg,
      var(--text) 0%,
      var(--text) 36%,
      #64748b 48%,
      #cbd5e1 52%,
      var(--text) 64%,
      var(--text) 100%);
  background-size: 300% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

html[data-theme="light"] .blog-cell-title a:hover,
html[data-theme="light"] .blog-grid-cell:hover .blog-cell-title a {
  background-position: 0% 0;
}

/* Excerpt (14px - 15px, 1.65 line height) */
.blog-cell-excerpt {
  font-size: 14px;
  line-height: 1.62;
  color: var(--text-dim);
  margin: 0 0 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

/* Card Footer */
.blog-cell-footer {
  display: flex;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
  margin-top: auto;
}

/* Category Tag Badges (font-size: 12px) */
.blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.blog-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
  background: var(--card-2);
  color: var(--text-dim);
  border: 1px solid var(--border);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.blog-tag:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--card-3);
  transform: translateY(-1px);
}

html[data-theme="light"] .blog-tag:hover {
  border-color: rgba(0, 0, 0, 0.2);
}

.blog-cell-author-meta {
  font-size: 12px;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 6px;
}

.blog-cell-author-meta .meta-dot {
  font-size: 10px;
  opacity: 0.6;
}

/* Link Arrow Component (note.md 5.1) */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.link-arrow:hover {
  color: var(--text);
  transform: translateX(3px);
}

html[data-theme="light"] .link-arrow:hover {
  color: var(--text);
}

/* ==========================================================================
   6. PAGINATION
   ========================================================================== */
.blog-pagination {
  margin: 56px 0 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.blog-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  background: var(--card);
}

.blog-pagination .page-numbers:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text);
  background: var(--card-2);
}

html[data-theme="light"] .blog-pagination .page-numbers:hover {
  border-color: rgba(0, 0, 0, 0.25);
  color: var(--text);
}

.blog-pagination .page-numbers.current {
  background: var(--btn-bg);
  border-color: var(--btn-bg);
  color: var(--btn-text);
}

/* Empty State */
.blog-empty-state {
  text-align: center;
  padding: 80px 20px;
  border: 1px solid var(--border);
  background: var(--card);
}

.blog-empty-state p {
  font-size: 16px;
  color: var(--text-dim);
  margin: 0;
}

/* ==========================================================================
   7. HOMEPAGE CTA (EXACT HOMEPAGE PARITY - STYLED BY LANDING.CSS)
   ========================================================================== */
.blog-hub-page .cta-section {
  padding: 64px 0 0;
}

/* ==========================================================================
   8. SINGLE BLOG POST EDITORIAL TEMPLATE (2-COLUMN HERO & STICKY SIDEBAR)
   ========================================================================== */
.single-post-editorial-layout {
  padding-bottom: 96px;
  position: relative;
}

/* --- Hero Section (2-Column Split) --- */
.single-post-hero-section {
  padding: 56px 0 48px;
}

.single-post-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 56px;
  align-items: center;
}

@media (max-width: 991px) {
  .single-post-hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

/* Hero Left: Title, Lead, Author Meta, Share */
.single-post-hero-info {
  display: flex;
  flex-direction: column;
}

.single-post-title {
  font-family: var(--font-latin, 'Inter', system-ui, -apple-system, sans-serif);
  font-size: 44px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 0 0 20px;
  background: linear-gradient(110deg, var(--text) 0%, var(--text) 40%, rgba(255, 255, 255, 0.85) 50%, var(--text) 60%, var(--text) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: background-position 0.6s ease;
}

html[data-theme="light"] .single-post-title {
  background: linear-gradient(110deg, var(--text) 0%, var(--text) 40%, rgba(120, 120, 130, 0.85) 50%, var(--text) 60%, var(--text) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.single-post-title:hover {
  background-position: -100% 0;
}

@media (max-width: 768px) {
  .single-post-title {
    font-size: 32px;
  }
}

/* Lead Subtitle */
.single-post-lead {
  margin: 0 0 28px;
}

.single-post-lead p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-dim);
  margin: 0;
}

/* Author Row (Avatar + Name/Role + Date/Time + Editorial Link) */
.single-post-author-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.author-avatar-wrap {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--card);
}

.author-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.author-details-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.author-name-role {
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--text);
}

.author-name-role .byline-prefix {
  color: var(--text-dim);
  font-weight: 400;
  margin-right: 4px;
}

.author-name-link {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.author-name-link:hover {
  opacity: 0.8;
}

.author-role-separator {
  color: var(--text-faint);
  margin: 0 2px;
}

.author-role {
  color: var(--text-dim);
  font-weight: 400;
}

.post-meta-subline {
  font-size: 13px;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-meta-subline .meta-dot-sep {
  font-size: 10px;
  color: var(--text-faint);
  opacity: 0.6;
}

/* --- Fullwidth Share Bar Row --- */
.single-post-share-bar {
  width: 100%;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  padding: 18px 0;
  margin: 44px 0 52px;
}

.single-post-share-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}

.single-post-share-inner .share-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  white-space: nowrap;
}

.single-post-share-inner .share-buttons-list {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 640px) {
  .single-post-share-inner {
    flex-wrap: wrap;
    gap: 12px;
  }
}

.share-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  padding: 0;
  box-shadow: none !important;
}

.share-btn:hover {
  border-color: var(--text-dim);
  color: var(--text);
  background: var(--card-2);
  transform: translateY(-1px);
  box-shadow: none !important;
}

.copy-feedback-bubble {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--btn-bg);
  color: var(--btn-text);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.share-btn-copy.is-copied .copy-feedback-bubble {
  opacity: 1;
}

/* Hero Right: Featured Image Frame */
.single-post-featured-frame {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: none !important;
  background: var(--card);
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.single-post-featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.single-post-featured-placeholder {
  background: var(--card-2);
}

.placeholder-graphic {
  color: var(--text-faint);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Section Divider --- */
.single-post-divider {
  width: 100%;
  margin: 0 0 52px;
}

.single-post-divider-line {
  width: 100%;
  height: 1px;
  background: var(--border-soft);
}

/* --- Main Layout Grid (Content & Sidebar) --- */
.single-post-editorial-layout,
.single-post-editorial-layout .wrap,
.single-post-body-section,
.single-post-body-section .wrap {
  overflow: visible !important;
}

.single-post-body-section {
  position: relative;
}

.single-post-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 56px;
  align-items: stretch;
}

@media (max-width: 1080px) {
  .single-post-layout-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 40px;
  }
}

@media (max-width: 899px) {
  .single-post-layout-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

/* Left Column: Key Takeaways Card */
.key-takeaways-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 44px;
  box-shadow: none !important;
}

html[data-theme="light"] .key-takeaways-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

/* Key Takeaways Card */
.key-takeaways-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 44px;
  box-shadow: none !important;
}

html[data-theme="light"] .key-takeaways-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

.key-takeaways-header {
  margin-bottom: 18px;
}

.takeaways-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  display: block;
}

/* Key Takeaways: Normal paragraphs (no checkmarks) */
.key-takeaways-content p,
.key-takeaways-card p {
  margin: 0 0 14px;
  line-height: 1.6;
  font-size: 14.5px;
  color: var(--text);
}

.key-takeaways-content p:last-child,
.key-takeaways-card p:last-child {
  margin-bottom: 0;
}

/* Key Takeaways: Clean checkmark list style (matches screenshot) */
.key-takeaways-content ul,
.key-takeaways-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.key-takeaways-content ul > li,
.key-takeaways-card ul > li {
  position: relative;
  padding-left: 24px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 0;
}

.key-takeaways-content ul > li::before,
.key-takeaways-card ul > li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.5;
  background: none;
  border: none;
  box-shadow: none;
  border-radius: 0;
  width: auto;
  height: auto;
}

.key-takeaways-content ol,
.key-takeaways-card ol {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.key-takeaways-content ol > li,
.key-takeaways-card ol > li {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text);
}

/* Legacy Takeaways Classes */
.key-takeaways-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.takeaway-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text);
}

.takeaway-check {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  flex-shrink: 0;
  margin-top: 1px;
}

.takeaway-text {
  flex: 1;
}

/* Editorial Body Typography */
.single-post-content {
  font-family: var(--font-latin, 'Inter', system-ui, -apple-system, sans-serif);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
}

.single-post-content p {
  margin: 0 0 24px;
}

.single-post-content h2 {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 44px 0 20px;
  scroll-margin-top: calc(var(--site-nav-height, 67px) + var(--site-breadcrumb-height, 46px) + 28px);
}

.admin-bar .single-post-content h2 {
  scroll-margin-top: calc(32px + var(--site-nav-height, 67px) + var(--site-breadcrumb-height, 46px) + 28px);
}

.single-post-content h3 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 36px 0 16px;
}

.single-post-content h4 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  margin: 28px 0 12px;
}

/* Editorial Content Lists (Ordered & Unordered) */
.single-post-content ul,
.single-post-content ol {
  margin: 0 0 28px 0;
  padding: 0;
  list-style: none;
}

.single-post-content ul ul,
.single-post-content ul ol,
.single-post-content ol ul,
.single-post-content ol ol {
  margin: 10px 0 10px 0;
}

.single-post-content li {
  position: relative;
  padding-left: 36px;
  margin-bottom: 12px;
  line-height: 1.7;
}

.single-post-content li:last-child {
  margin-bottom: 0;
}

.single-post-content li > p {
  margin: 0 0 8px;
}

.single-post-content li > p:last-child {
  margin-bottom: 0;
}

/* 1. Unordered List: Verification Badge Checkmark */
.single-post-content ul > li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2.5px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: var(--text);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2317171a' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3.5 8.5 6.5 11.5 12.5 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 11px 11px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

html[data-theme="light"] .single-post-content ul > li::before {
  background-color: var(--text);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23ffffff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3.5 8.5 6.5 11.5 12.5 4.5'/%3E%3C/svg%3E");
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* 2. Ordered List: Number in a Circle with Background */
.single-post-content ol {
  counter-reset: code1001-ol-counter;
}

.single-post-content ol > li {
  counter-increment: code1001-ol-counter;
}

.single-post-content ol > li::before {
  content: counter(code1001-ol-counter);
  position: absolute;
  left: 0;
  top: 2.5px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: var(--text);
  color: var(--bg, #17171a);
  font-size: 11px;
  font-weight: 800;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

html[data-theme="light"] .single-post-content ol > li::before {
  background-color: var(--text);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* Nested Ordered List Counter */
.single-post-content ol ol {
  counter-reset: code1001-ol-nested-counter;
}

.single-post-content ol ol > li {
  counter-increment: code1001-ol-nested-counter;
}

.single-post-content ol ol > li::before {
  content: counter(code1001-ol-nested-counter);
}

.single-post-content blockquote {
  margin: 32px 0;
  padding: 20px 24px;
  border-left: 3px solid var(--text-dim);
  background: var(--card);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text);
}

.single-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin: 24px 0;
}

.single-post-content a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s ease;
}

.single-post-content a:hover {
  opacity: 0.8;
}

/* --- Related Articles Section (Replaces Tags Section) --- */
.single-post-related-section {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border-soft);
}

.related-section-header {
  margin-bottom: 24px;
}

.related-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  display: block;
  margin-bottom: 6px;
}

.related-section-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0;
  line-height: 1.25;
}

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

@media (max-width: 900px) {
  .related-posts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .related-posts-grid {
    grid-template-columns: 1fr;
  }
}

.related-post-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

html[data-theme="light"] .related-post-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

.related-post-card:hover {
  transform: translateY(-3px);
  border-color: var(--text-dim);
  box-shadow: none !important;
}

.related-card-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--card-2);
}

.related-card-thumb a {
  display: block;
  width: 100%;
  height: 100%;
}

.related-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
  transition: transform 0.4s ease;
}

.related-post-card:hover .related-card-thumb img {
  transform: scale(1.04);
}

.related-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.related-card-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.related-read-time {
  font-size: 12px;
  color: var(--text-faint);
  white-space: nowrap;
}

.related-card-title {
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 10px;
  color: var(--text);
}

.related-card-title a {
  color: var(--text);
  text-decoration: none;
  transition: opacity 0.2s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-card-title a:hover {
  opacity: 0.8;
}

.related-card-excerpt {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-dim);
  margin: 0 0 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-card-footer {
  font-size: 12px;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}

.related-card-footer .meta-dot {
  opacity: 0.5;
}

/* Post Navigation (Prev/Next Cards) */
.single-post-nav-strip .navigation.post-navigation {
  margin-top: 44px;
  padding-top: 32px;
  border-top: 1px solid var(--border-soft);
}

.single-post-nav-strip .nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 640px) {
  .single-post-nav-strip .nav-links {
    grid-template-columns: 1fr;
  }
}

.single-post-nav-strip .nav-previous a,
.single-post-nav-strip .nav-next a {
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s ease;
  height: 100%;
}

.single-post-nav-strip .nav-previous a:hover,
.single-post-nav-strip .nav-next a:hover {
  border-color: var(--text-dim);
  background: var(--card-2);
  transform: translateY(-2px);
}

.single-post-nav-strip .nav-direction {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.single-post-nav-strip .nav-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Sticky Editorial Sidebar (Sticky Top) --- */
.single-post-sidebar-column {
  position: relative;
  align-self: stretch;
  height: 100%;
}

.sidebar-sticky-inner {
  position: -webkit-sticky;
  position: sticky;
  top: calc(var(--site-nav-height, 67px) + var(--site-breadcrumb-height, 46px) + 24px);
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-height: calc(100vh - var(--site-nav-height, 67px) - var(--site-breadcrumb-height, 46px) - 32px);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  z-index: 10;
}

.sidebar-sticky-inner::-webkit-scrollbar {
  display: none;
}

.admin-bar .sidebar-sticky-inner {
  top: calc(32px + var(--site-nav-height, 67px) + var(--site-breadcrumb-height, 46px) + 24px);
  max-height: calc(100vh - 32px - var(--site-nav-height, 67px) - var(--site-breadcrumb-height, 46px) - 32px);
}

@media (max-width: 899px) {
  .single-post-sidebar-column {
    height: auto;
    align-self: auto;
  }

  .sidebar-sticky-inner {
    position: static;
    top: auto;
    max-height: none;
    overflow-y: visible;
  }
}

.sidebar-widget-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: none !important;
}

html[data-theme="light"] .sidebar-widget-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.09);
}

/* Table of Contents Widget Card (H2s Only) */
.toc-widget-card .toc-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
}

.toc-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  display: block;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  counter-reset: toc-counter;
}

.toc-item {
  counter-increment: toc-counter;
}

.toc-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-dim);
  text-decoration: none;
  padding: 7px 10px;
  border-radius: 0;
  border-left: 2px solid transparent;
  transition: all 0.2s ease;
}

.toc-link::before {
  content: counter(toc-counter, decimal-leading-zero);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
  flex-shrink: 0;
}

.toc-link:hover {
  color: var(--text);
  background: var(--card-2);
}

.toc-link.is-active {
  color: var(--text);
  font-weight: 600;
  background: var(--card-2);
  border-left-color: var(--text);
}

.toc-link.is-active::before {
  color: var(--text);
}

.toc-link-text {
  flex: 1;
}

/* --- Author Profile Card (Above Related Posts Section) --- */
.single-post-author-card {
  margin: 56px 0 64px;
  padding: 32px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: none !important;
}

html[data-theme="light"] .single-post-author-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

.author-card-inner {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.author-card-media {
  flex-shrink: 0;
}

.author-card-img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2px solid var(--border-soft);
}

.author-card-content {
  flex: 1;
  min-width: 0;
}

.author-card-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 6px;
}

.author-card-name {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
  margin: 0 0 10px;
}

.author-card-name a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.author-card-name a:hover {
  color: var(--text-dim);
}

.author-card-bio {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0 0 16px;
}

.author-card-actions {
  display: flex;
  align-items: center;
}

.author-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s ease;
}

.author-card-link:hover {
  color: var(--text-dim);
}

.author-card-arrow {
  transition: transform 0.2s ease;
}

.author-card-link:hover .author-card-arrow {
  transform: translateX(4px);
}

@media (max-width: 640px) {
  .single-post-author-card {
    padding: 24px;
    margin: 44px 0 48px;
  }

  .author-card-inner {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .author-card-img {
    width: 60px;
    height: 60px;
  }
}

/* CTA Box Widget with Animated Border Effect */
.cta-widget-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 26px;
  overflow: hidden;
  isolation: isolate;
  box-shadow: none !important;
}

html[data-theme="light"] .cta-widget-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

/* Luminous animated rotating border beam */
.cta-widget-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    transparent 65deg,
    rgba(255, 255, 255, 0.35) 85deg,
    rgba(255, 255, 255, 0.95) 95deg,
    rgba(255, 255, 255, 0.35) 105deg,
    transparent 125deg,
    transparent 360deg
  );
  animation: ctaBorderSweep 5s linear infinite;
  z-index: -2;
  pointer-events: none;
}

html[data-theme="light"] .cta-widget-card::before {
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    transparent 65deg,
    rgba(0, 0, 0, 0.15) 85deg,
    rgba(0, 0, 0, 0.65) 95deg,
    rgba(0, 0, 0, 0.15) 105deg,
    transparent 125deg,
    transparent 360deg
  );
}

/* Inner masking card leaving 1px border track */
.cta-widget-card::after {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--card);
  border-radius: 11px;
  z-index: -1;
  pointer-events: none;
}

html[data-theme="light"] .cta-widget-card::after {
  background: #ffffff;
}

@keyframes ctaBorderSweep {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.cta-widget-card .cwc-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  margin: 0 0 10px;
}

.cta-widget-card .cwc-desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-dim);
  margin: 0 0 20px;
}

.cwc-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  border-radius: 8px;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
  cursor: pointer;
  box-sizing: border-box;
}

.cwc-btn:hover {
  opacity: 0.92;
  transform: translateY(-2px);
}

.cwc-arrow {
  font-size: 14px;
  transition: transform 0.2s ease;
}

.cwc-btn:hover .cwc-arrow {
  transform: translateX(3px);
}

/* ==========================================================================
   Mobile Sticky Table of Contents Menu (Beside Breadcrumbs)
   ========================================================================== */
/* Ensure breadcrumbs and container never clip the sticky mobile TOC dropdown menu */
.cs-breadcrumb-bar,
.cs-breadcrumb-wrap,
.wrap.cs-breadcrumb-wrap {
  overflow: visible !important;
}

.cs-mobile-toc-container {
  display: none;
}

@media (max-width: 899px) {
  .cs-mobile-toc-container {
    display: block;
    flex-shrink: 0;
    position: relative;
    z-index: 995;
  }

  .cs-mobile-toc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 9999px;
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: none !important;
  }

  html[data-theme="light"] .cs-mobile-toc-btn {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.12);
  }

  .cs-mobile-toc-btn:hover,
  .cs-mobile-toc-btn[aria-expanded="true"] {
    background: var(--card-2);
    border-color: var(--text-dim);
  }

  .cs-mobile-toc-chevron {
    transition: transform 0.2s ease;
  }

  .cs-mobile-toc-btn[aria-expanded="true"] .cs-mobile-toc-chevron {
    transform: rotate(180deg);
  }

  .cs-mobile-toc-drawer {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(320px, calc(100vw - 32px));
    max-height: calc(85vh - 80px);
    background: rgba(23, 23, 26, 0.98);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 18px 18px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  html[data-theme="light"] .cs-mobile-toc-drawer {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16);
  }

  .cs-mobile-toc-container.is-open .cs-mobile-toc-drawer {
    display: flex;
    flex-direction: column;
    animation: mobileTocSlideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .cs-mobile-toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border-soft);
  }

  .cs-mobile-toc-kicker {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-faint);
  }

  .cs-mobile-toc-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 24px;
    line-height: 1;
    padding: 0 4px;
    cursor: pointer;
    transition: color 0.15s ease;
  }

  .cs-mobile-toc-close:hover {
    color: var(--text);
  }

  .cs-mobile-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    counter-reset: mobile-toc-counter;
  }

  .cs-mobile-toc-item {
    counter-increment: mobile-toc-counter;
  }

  .cs-mobile-toc-link {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 13.5px;
    line-height: 1.45;
    border-radius: 6px;
    transition: all 0.15s ease;
  }

  .cs-mobile-toc-link::before {
    content: counter(mobile-toc-counter, decimal-leading-zero);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-faint);
    margin-top: 2px;
    flex-shrink: 0;
  }

  .cs-mobile-toc-link:hover,
  .cs-mobile-toc-link.is-active {
    color: var(--text);
    background: var(--card-2);
  }

  .cs-mobile-toc-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
  }

  .cs-mobile-toc-container.is-open .cs-mobile-toc-backdrop {
    display: block;
  }

  @keyframes mobileTocSlideDown {
    from {
      opacity: 0;
      transform: translateY(-8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* On mobile hide the redundant desktop sidebar TOC card */
  .toc-widget-card {
    display: none !important;
  }
}

/* Explicit Reset: Remove all box shadows across single editorial post */
.single-post-editorial-layout .sidebar-widget-card,
.single-post-editorial-layout .key-takeaways-card,
.single-post-editorial-layout .single-post-featured-frame,
.single-post-editorial-layout .single-post-author-card,
.single-post-editorial-layout .related-post-card,
.single-post-editorial-layout .related-post-card:hover,
.single-post-editorial-layout .share-btn,
.single-post-editorial-layout .share-btn:hover,
.single-post-editorial-layout .cwc-btn,
.single-post-editorial-layout .cwc-btn:hover {
  box-shadow: none !important;
}
