/* ===================================
   6. BLOG SECTION
   =================================== */
.blog {
  padding: var(--section-padding);
}

.blog-header {
  text-align: center;
  margin-bottom: 40px;
}

.blog-header .section-subtitle {
  margin: 0 auto;
}

/* ---- Blog Preview Grid (home page) ---- */
.blog-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.blog-preview-cta {
  text-align: center;
  margin-top: 8px;
}

/* ---- Blog full page top padding ---- */
.blog-page {
  padding-top: 120px;
}

/* ---- Category Navigation Bar ---- */
.blog-category-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  padding-bottom: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.blog-category-nav::-webkit-scrollbar {
  display: none;
}

.blog-category-btn {
  flex-shrink: 0;
  padding: 8px 20px;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-full);
  background: var(--color-white);
  color: var(--color-gray-600);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.blog-category-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.blog-category-btn.active {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

/* ---- Blog Main Layout ---- */
.blog-main {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.blog-articles {
  flex: 2;
  min-width: 0;
}

.blog-sidebar {
  flex: 1;
  min-width: 0;
  position: sticky;
  top: 100px;
}

/* ---- Article Cards Grid ---- */
.blog-articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.blog-card {
  display: block;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-gray-200);
  color: inherit;
  text-decoration: none;
  min-height: 392px;
  transition: all var(--transition-base);
  cursor: pointer;
}

.blog-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.blog-card-image {
  width: 100%;
  overflow: hidden;
  background: var(--color-gray-100);
}

.blog-card-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 780 / 608;
}

.blog-card-body {
  padding: 20px;
}

/* Intentional text-only variant for articles that do not have a cover image. */
.blog-card--no-image {
  min-height: 252px;
  border-top: 4px solid var(--color-primary);
}

.blog-card--no-image .blog-card-body {
  display: flex;
  flex-direction: column;
  min-height: 248px;
}

.blog-card--no-image .blog-card-tags {
  margin-top: auto;
}

.blog-card--no-image .blog-card-title {
  -webkit-line-clamp: 3;
}

.blog-card--no-image .blog-card-excerpt {
  -webkit-line-clamp: 4;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.blog-card-category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.blog-card-read-time {
  font-size: 0.75rem;
  color: var(--color-gray-400);
}

.blog-card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-gray-900);
  margin-bottom: 8px;
  line-height: 1.4;
  /* Reserve exactly 2 lines so excerpt/tags start at the same y across cards. */
  min-height: 2.8em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-excerpt {
  font-size: 0.8125rem;
  color: var(--color-gray-500);
  line-height: 1.6;
  margin-bottom: 14px;
  /* Reserve exactly 2 lines so the tag row aligns across cards. */
  min-height: 3.2em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.blog-card-tag-item {
  font-size: 0.6875rem;
  color: var(--color-gray-500);
  background: var(--color-gray-100);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* ---- Pagination ---- */
.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 32px 0 8px;
  flex-wrap: wrap;
}

.blog-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  background: var(--color-white);
  color: var(--color-gray-600);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.blog-page-btn:hover:not([disabled]):not(.active) {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(44, 182, 125, 0.06);
}

.blog-page-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
  font-weight: 600;
}

.blog-page-btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

.blog-page-btn svg {
  flex-shrink: 0;
}

.blog-page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 40px;
  color: var(--color-gray-400);
  font-size: 0.875rem;
  letter-spacing: 2px;
}

.blog-page-prev span,
.blog-page-next span {
  display: inline;
}

@media (max-width: 480px) {
  .blog-page-prev span,
  .blog-page-next span {
    display: none;
  }
  .blog-page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    font-size: 0.8125rem;
  }
}

/* ---- Sidebar ---- */
.blog-sidebar-section {
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.blog-sidebar-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-gray-900);
  margin: 0 0 16px;
}

/* Tags List */
.blog-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.blog-tag-btn {
  padding: 6px 14px;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-full);
  background: var(--color-white);
  color: var(--color-gray-600);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
}

.blog-tag-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.blog-tag-btn.active {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

/* Trending List */
.blog-trending-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.blog-trending-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: opacity var(--transition-base);
}

.blog-trending-item:hover {
  opacity: 0.8;
}

.blog-trending-rank {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.blog-trending-info {
  flex: 1;
  min-width: 0;
}

.blog-trending-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-gray-900);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 4px;
}

.blog-trending-meta {
  font-size: 0.6875rem;
  color: var(--color-gray-400);
}

/* Empty state */
.blog-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-gray-400);
  grid-column: 1 / -1;
}

.blog-empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  stroke: var(--color-gray-300);
}

.blog-empty-state p {
  font-size: 0.9375rem;
}



/* ===================================
   RESPONSIVE - Blog
   =================================== */
@media (max-width: 1024px) {
  .blog-main {
    flex-direction: column;
  }

  .blog-sidebar {
    position: static;
  }
}

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

  .blog-main {
    flex-direction: column;
  }

  .blog-articles-grid {
    grid-template-columns: 1fr;
  }

  .blog-card--no-image,
  .blog-card--no-image .blog-card-body {
    min-height: 0;
  }

  .blog-sidebar {
    position: static;
    display: contents;
  }

  /* Tags section above articles */
  .blog-sidebar-section:first-child {
    order: -1;
    width: 100%;
  }

  /* Trending section below articles */
  .blog-sidebar-section:last-child {
    order: 1;
    width: 100%;
  }

  .blog-sidebar-section:first-child .blog-tags-list {
    flex-wrap: wrap;
  }

  .blog-sidebar-section:first-child .blog-tag-btn {
    white-space: nowrap;
  }

  .blog-sidebar-section:first-child .blog-tags-list::-webkit-scrollbar {
    display: none;
  }

  /* Collapsible Tags panel (mobile only) — blog-list.js adds the classes.
     Collapsed by default so tags stop eating the first screen. */
  .blog-sidebar-section.blog-tags-collapsible {
    padding: 16px 20px;
  }
  .blog-sidebar-section.blog-tags-collapsible .blog-sidebar-title {
    margin: 0;
    cursor: pointer;
    position: relative;
    padding-right: 26px;
    -webkit-user-select: none;
    user-select: none;
  }
  .blog-sidebar-section.blog-tags-collapsible .blog-sidebar-title::after {
    content: "";
    position: absolute;
    right: 6px;
    top: 50%;
    width: 9px;
    height: 9px;
    border-right: 2px solid #90a0b6;
    border-bottom: 2px solid #90a0b6;
    transform: translateY(-75%) rotate(45deg);
    transition: transform 0.25s ease, border-color 0.25s ease;
  }
  .blog-sidebar-section.blog-tags-collapsible.collapsed .blog-tags-list {
    display: none;
  }
  .blog-sidebar-section.blog-tags-collapsible:not(.collapsed) .blog-sidebar-title {
    margin-bottom: 14px;
  }
  .blog-sidebar-section.blog-tags-collapsible:not(.collapsed) .blog-sidebar-title::after {
    transform: translateY(-25%) rotate(225deg);
    border-color: var(--color-primary, #00c98d);
  }

  .blog-preview-grid {
    grid-template-columns: 1fr;
  }
}

/* ===================================================
   Blog Article Detail Page — Test/SOP visual system
   (mirrors the test sop sample pages, .sop- design)
   =================================================== */
:root {
  --art-ink: #121827;
  --art-muted: #667085;
  --art-line: #e7edf4;
  --art-green: #2cb67d;
  --art-green-dark: #17845a;
  --art-warn: #fff6e6;
  --art-warn-line: #ffd28a;
  --art-danger: #fff2f0;
  --art-danger-line: #ffb4a8;
  --art-dark: #132033;
  --art-copy: #526074;
}

/* Gradient shell wraps the whole detail page — same palette as the homepage
   hero (white → soft mint #E8F4EF over #F7FFFB, see home.fixed.css .hero) */
.blog-article-shell {
  padding: 118px 20px 72px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 43%, rgba(232, 244, 239, 0.82) 100%),
    #F7FFFB;
}

.blog-article-layout {
  max-width: 1160px;
  margin: 0 auto;
}
.blog-article-layout.has-toc {
  display: grid;
  grid-template-columns: minmax(0, 780px) 280px;
  gap: 52px;
  align-items: start;
}
/* Single-column articles (no sidebar TOC) stay readable-width */
.blog-article-layout:not(.has-toc) .blog-article {
  max-width: 820px;
  margin: 0 auto;
}

/* Article column — neutralise the old centered single column.
   min-width:0 lets this grid item shrink below its content's min-content so
   wide children (tables in .blog-table-wrap) scroll instead of stretching the
   whole page horizontally on narrow screens. */
.blog-article {
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 0;
}

/* Article fade-in after load */
.blog-article.is-loaded {
  animation: blogArticleFadeIn 0.4s ease both;
}
@keyframes blogArticleFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Legacy back-link (kept for the dynamic article template and not-yet-migrated
   language pages). Static English articles use the breadcrumb below instead. */
.blog-article-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--art-green-dark);
  font-weight: 700;
  text-decoration: none;
  margin-bottom: 22px;
  transition: opacity 0.2s;
}
.blog-article-back:hover { opacity: 0.7; }
.blog-article-back svg { width: 20px; height: 20px; }

/* Breadcrumb: Home › Category › Title (mirrors test/index.html .test-breadcrumb) */
.blog-breadcrumb {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 24px;
  color: #73829a;
  font-size: 0.94rem;
  line-height: 1.4;
}
.blog-breadcrumb a { color: #62728b; text-decoration: none; }
.blog-breadcrumb a:hover { color: var(--art-green-dark); }
.blog-breadcrumb span[aria-hidden] { color: #b3bccb; }
.blog-breadcrumb > span:last-child { color: #36445c; font-weight: 600; }

.blog-article-hero-img {
  display: block;
  width: 100%;
  border-radius: 20px;
  margin-bottom: 26px;
  object-fit: cover;
  max-height: 420px;
  aspect-ratio: 780 / 608;
  box-shadow: 0 16px 40px rgba(18, 24, 39, 0.08);
}

/* Tags row: sits after the article body, before the CTA. Each chip deep-links
   into the blog list filtered by that tag (powers article_detail_tag_click). */
.blog-article-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 36px 0 8px;
  padding-top: 26px;
  border-top: 1px solid var(--art-line);
}
.blog-article-tags-label {
  color: #8a97a8;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.blog-article-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.blog-article-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(44, 182, 125, 0.09);
  color: var(--art-green-dark);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background 0.18s, transform 0.18s;
}
.blog-article-tag:hover {
  background: rgba(44, 182, 125, 0.16);
  transform: translateY(-1px);
}

.blog-article-title {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  font-weight: 800;
  color: var(--art-ink);
  line-height: 1.08;
  letter-spacing: -0.045em;
  margin: 6px 0 16px;
  text-wrap: balance;
}

/* Written by / Reviewed by credit line (under the title, above the dates) */
.blog-article-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--art-muted);
  font-size: 0.94rem;
  margin: 0 0 8px;
  flex-wrap: wrap;
}
.blog-byline-person {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.blog-author-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  object-fit: cover;
  background: #edf2f7;
}
.blog-article-byline strong {
  color: #36445c;
  font-weight: 700;
}

.blog-article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--art-muted);
  font-size: 0.92rem;
  margin: 0 0 26px;
  flex-wrap: wrap;
}

/* ── Content typography ── */
.blog-article-content { color: var(--art-copy); }

.blog-article-content h2 {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3vw, 2.05rem);
  font-weight: 800;
  color: var(--art-ink);
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 36px 0 14px;
  padding-top: 36px;
  border-top: 1px solid var(--art-line);
}
.blog-article-content > h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.blog-article-content h3 {
  font-family: var(--font-display);
  font-size: 1.14rem;
  font-weight: 700;
  color: var(--art-ink);
  line-height: 1.35;
  margin: 24px 0 10px;
}
.blog-article-content p {
  color: var(--art-copy);
  line-height: 1.82;
  margin: 0 0 16px;
  font-size: 1.05rem;
}
.blog-article-content a {
  color: var(--art-green-dark);
  font-weight: 700;
}

/* Unordered lists → green circular bullets (matches .sop-list) */
.blog-article-content ul {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: grid;
  gap: 12px;
}
.blog-article-content ul li {
  position: relative;
  padding-left: 28px;
  margin: 0;
  color: var(--art-copy);
  line-height: 1.7;
  font-size: 1.05rem;
}
.blog-article-content ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--art-green);
  box-shadow: inset 0 0 0 5px #dcf7ea;
}

/* Ordered lists keep numerals */
.blog-article-content ol {
  list-style: decimal;
  padding-left: 24px;
  margin: 0 0 20px;
  color: var(--art-copy);
  line-height: 1.8;
  font-size: 1.05rem;
}
.blog-article-content ol li { margin-bottom: 8px; }
.blog-article-content ol li::marker { color: var(--art-green-dark); }

/* Key takeaways card (mirrors test/index.html .test-key-card) */
.blog-article-content .blog-takeaways {
  border: 1px solid rgba(0, 201, 141, 0.18);
  border-radius: 20px;
  background: linear-gradient(135deg, #effdf7, #f5fffb);
  box-shadow: none;
  padding: 28px;
  margin: 28px 0;
}
/* heading rendered as a small uppercase label (mirrors .test-card-label) */
.blog-article-content .blog-takeaways h2 {
  margin: 0 0 18px;
  padding: 0;
  border-top: 0;
  font-family: inherit;
  color: #00a878;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
/* list mirrors .test-check-list */
.blog-article-content .blog-takeaways ul { margin: 0; gap: 14px; }
.blog-article-content .blog-takeaways ul li {
  padding-left: 30px;
  color: #43516a;
  line-height: 1.65;
}
.blog-article-content .blog-takeaways ul li::before {
  top: 0.45em;
  width: 17px;
  height: 17px;
  background: #00c98d;
  box-shadow: inset 0 0 0 5px #dff9ef;
}

/* Safety / caution section → red danger callout (mirrors .sop-danger) */
.blog-article-content .blog-safety {
  background: var(--art-danger);
  border: 1px solid var(--art-danger-line);
  border-radius: 20px;
  padding: 24px 26px;
  margin: 28px 0;
}
.blog-article-content .blog-safety h2 {
  margin: 0 0 12px;
  padding: 0;
  border-top: 0;
  color: #8a3a2f;
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
}
.blog-article-content .blog-safety h3 { color: #8a3a2f; }
.blog-article-content .blog-safety p,
.blog-article-content .blog-safety li { color: #70423b; }
.blog-article-content .blog-safety ul li::before { background: #d9553f; box-shadow: inset 0 0 0 5px #ffe0d9; }
.blog-article-content .blog-safety a { color: #a33a2b; }

/* Medical disclaimer → low-key neutral note (mirrors the muted disclaimer note) */
.blog-article-content .blog-disclaimer {
  background: #f7f9fc;
  border: 1px solid var(--art-line);
  border-radius: 16px;
  padding: 18px 22px;
  margin: 28px 0;
}
.blog-article-content .blog-disclaimer h2 {
  margin: 0 0 8px;
  padding: 0;
  border-top: 0;
  color: var(--art-muted);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.blog-article-content .blog-disclaimer p {
  color: var(--art-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 0;
}

/* Quick-answer callout — light brand-green card (the dark navy version read
   too heavy right under the hero image) */
.blog-article-content .quick-answer {
  padding: 24px;
  border: 1px solid rgba(0, 201, 141, 0.22);
  border-left: 4px solid var(--art-green);
  border-radius: 20px;
  background: linear-gradient(135deg, #e9f9f2, #f4fcf9);
  color: #23443a;
  box-shadow: 0 12px 30px rgba(18, 24, 39, 0.05);
  margin: 0 0 32px;
}
.blog-article-content .quick-answer p { color: #33584b; }
.blog-article-content .quick-answer p:last-child { margin-bottom: 0; }
.blog-article-content .quick-answer a { color: var(--art-green-dark); }

/* Tables with dark header rows */
.blog-article-content .blog-table-wrap {
  overflow-x: auto;
  margin: 22px 0;
  border: 1px solid var(--art-line);
  border-radius: 16px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
.blog-article-content table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.blog-article-content thead th {
  background: var(--art-dark);
  color: #fff;
  text-align: left;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
}
.blog-article-content th,
.blog-article-content td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--art-line);
  vertical-align: top;
  line-height: 1.6;
  min-width: 10em;
}
.blog-article-content td { color: var(--art-copy); }
.blog-article-content td:first-child { color: #1c293b; font-weight: 800; }
.blog-article-content tbody tr:last-child td { border-bottom: 0; }

/* Blockquotes → soft warning note (matches .sop-note) */
.blog-article-content blockquote {
  padding: 20px;
  margin: 24px 0;
  background: var(--art-warn);
  border: 1px solid var(--art-warn-line);
  border-radius: 20px;
  color: #69502b;
}
.blog-article-content blockquote p {
  color: #69502b;
  font-style: normal;
  margin-bottom: 0;
}

/* Highlight box card */
.blog-article-content .highlight-box {
  background: linear-gradient(135deg, #effcf5, #fffaf0);
  border: 1px solid var(--art-line);
  border-radius: 20px;
  padding: 24px 26px;
  margin: 24px 0;
}
.blog-article-content .highlight-box h3 { margin-top: 0; }

.blog-article-content img {
  max-width: 100%;
  border-radius: 16px;
  margin: 24px 0;
}

/* Inline citations */
.blog-article-content sup.cite {
  vertical-align: baseline;
  line-height: inherit;
  font-size: inherit;
}
.blog-article-content sup.cite a {
  color: var(--art-green-dark);
  text-decoration: none;
  font-weight: 700;
  font-size: inherit;
}
.blog-article-content sup.cite a:hover { text-decoration: underline; }

/* References — collapsed by default inside a <details>; the section heading
   doubles as the summary, with the same chevron affordance as the FAQ items. */
.blog-article-content .blog-references-block {
  margin: 36px 0 0;
  padding-top: 0;
  border-top: 1px solid var(--art-line);
}
.blog-article-content .blog-references-block summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}
.blog-article-content .blog-references-block summary::-webkit-details-marker { display: none; }
.blog-article-content .blog-references-block summary h2 {
  margin: 36px 0 14px;
  padding-top: 0;
  border-top: 0;
}
.blog-article-content .blog-references-block summary::after {
  content: "";
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  margin: 22px 6px 0 0;
  border-right: 2px solid #90a0b6;
  border-bottom: 2px solid #90a0b6;
  transform: rotate(45deg);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.blog-article-content .blog-references-block[open] summary::after {
  transform: rotate(225deg);
  border-color: var(--art-green);
}

/* Numbered references */
.blog-article-content ol.blog-references {
  list-style: decimal;
  padding-left: 22px;
  margin-top: 12px;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--art-copy);
}
.blog-article-content ol.blog-references li {
  margin-bottom: 12px;
  word-break: break-word;
}
.blog-article-content ol.blog-references a {
  color: var(--art-green-dark);
  word-break: break-word;
}

/* FAQ accordions (matches .sop-faq details) */
.blog-article-content .blog-faq-item {
  border: 1px solid var(--art-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 40px rgba(18, 24, 39, 0.05);
  padding: 18px 20px;
  margin: 12px 0;
}
.blog-article-content .blog-faq-item summary {
  cursor: pointer;
  color: #1c293b;
  font-weight: 800;
  font-size: 1.02rem;
  list-style: none;
  padding-right: 28px;
  position: relative;
}
.blog-article-content .blog-faq-item summary::-webkit-details-marker { display: none; }
/* chevron indicator (mirrors the homepage .faq-question svg: gray, rotates 180° and turns green when open) */
.blog-article-content .blog-faq-item summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--color-gray-400, #90a0b6);
  border-bottom: 2px solid var(--color-gray-400, #90a0b6);
  transform: translateY(-75%) rotate(45deg);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.blog-article-content .blog-faq-item[open] summary::after {
  transform: translateY(-25%) rotate(225deg);
  border-color: var(--art-green);
}
.blog-article-content .blog-faq-item[open] summary { color: var(--art-green-dark); }
.blog-article-content .blog-faq-item p {
  margin: 10px 0 0;
  color: var(--art-copy);
  line-height: 1.7;
}

/* ── Sidebar "On this page" TOC ── */
.blog-article-toc {
  position: sticky;
  top: 96px;
  align-self: start;
}
/* mirrors test/index.html .test-toc */
.blog-toc-card {
  border: 1px solid #dce4ee;
  border-radius: 16px;
  background: #f7f9fc;
  box-shadow: none;
  padding: 30px 28px;
}
.blog-toc-title {
  margin: 0 0 20px;
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  color: #637188;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.blog-toc-list {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  line-height: 1.5;
}
.blog-toc-list li { margin: 0; }
.blog-toc-list a { color: #53637c; font-size: 1rem; text-decoration: none; }
.blog-toc-list a:hover { color: #00c98d; }

/* ── Share row (under the Published/Updated meta line) ── */
.blog-article-share {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: -8px 0 26px;
}
.blog-share-label {
  color: #8a97a8;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.blog-share-row {
  display: flex;
  gap: 10px;
}
.blog-share-row a,
.blog-share-row button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid #d9e2ee;
  border-radius: 50%;
  background: #fff;
  color: #637188;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  position: relative;
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}
.blog-share-row a svg,
.blog-share-row button svg {
  width: 17px;
  height: 17px;
  display: block;
}
.blog-share-row a:hover,
.blog-share-row button:hover {
  color: var(--art-green-dark);
  border-color: var(--art-green);
  transform: translateY(-2px);
}
/* "Copied!" bubble shown by main.js after Copy link click */
.blog-share-row .share-copied::after {
  content: attr(data-copied-label);
  position: absolute;
  top: -36px;
  left: 50%;
  transform: translateX(-50%);
  background: #132033;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
  padding: 6px 9px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
}

/* ── Floating back-to-top (mirrors test/index.html .test-back-top) ── */
.blog-back-top {
  position: fixed;
  right: 34px;
  bottom: 34px;
  z-index: 20;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--art-green);
  color: #fff;
  font-size: 1.15rem;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(0, 201, 141, 0.28);
  transition: transform 0.2s, box-shadow 0.2s;
}
.blog-back-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(0, 201, 141, 0.34);
}

/* ── Final CTA (matches the sitewide .final-cta-card green gradient used on
   home / about / support) ── */
.blog-article-cta {
  position: relative;
  overflow: hidden;
  text-align: center;
  margin: 42px 0 28px;
  padding: 48px 28px;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.28), transparent 28%),
    radial-gradient(circle at 18% 85%, rgba(8, 115, 86, 0.2), transparent 30%),
    linear-gradient(135deg, #11CFA0 0%, #00C28C 46%, #009E73 100%);
  color: #fff;
  border: 0;
  border-radius: 32px;
  box-shadow: 0 28px 90px rgba(8, 115, 86, 0.18);
}
.blog-article-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  line-height: 1.1;
  color: #fff;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.blog-article-cta .final-store-badges {
  justify-content: center;
}
.blog-article-cta .blog-cta-label {
  color: #ffcf68;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.blog-article-cta h3 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.blog-article-cta p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.08rem;
  margin-bottom: 26px;
}
.blog-cta-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.blog-cta-actions .btn { display: inline-flex; }
.blog-cta-actions .btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}

/* Loading state (SPA fallback) */
.blog-article-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  gap: 16px;
  color: var(--art-copy);
}
.blog-article-loading .blog-scroll-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-gray-200);
  border-top-color: var(--art-green);
  border-radius: 50%;
  animation: blogSpinnerRotate 0.8s linear infinite;
}
@keyframes blogSpinnerRotate {
  to { transform: rotate(360deg); }
}

/* ── Mobile collapsible TOC (after the hero; hidden on desktop) ── */
.blog-toc-mobile { display: none; }

/* ── Responsive ── */
@media (max-width: 980px) {
  .blog-article-layout.has-toc {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  /* Desktop TOC card hides on mobile; the collapsible one takes over. Share
     stays in the aside and flows below the article. */
  .blog-article-toc { position: static; }
  .blog-article-toc .blog-toc-card { display: none; }

  .blog-toc-mobile {
    display: block;
    margin: 0 0 26px;
    border: 1px solid #dce4ee;
    border-radius: 14px;
    background: #f7f9fc;
    overflow: hidden;
  }
  .blog-toc-mobile summary {
    cursor: pointer;
    list-style: none;
    position: relative;
    padding: 15px 18px;
    color: #637188;
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .blog-toc-mobile summary::-webkit-details-marker { display: none; }
  /* Chevron caret (mirrors the FAQ accordion): points down, rotates to point
     up when open — a dropdown affordance rather than a +/- toggle. */
  .blog-toc-mobile summary::after {
    content: "";
    position: absolute;
    right: 20px;
    top: 50%;
    width: 9px;
    height: 9px;
    border-right: 2px solid #90a0b6;
    border-bottom: 2px solid #90a0b6;
    transform: translateY(-75%) rotate(45deg);
    transition: transform 0.25s ease;
  }
  .blog-toc-mobile[open] summary::after { transform: translateY(-25%) rotate(225deg); }
  .blog-toc-mobile .blog-toc-list { padding: 0 18px 18px; }
  /* The global `.blog-toc-list { display: grid }` overrides the browser's
     collapse-when-closed rule, so hide the list explicitly while collapsed. */
  .blog-toc-mobile:not([open]) .blog-toc-list { display: none; }

  /* The mobile TOC renders inside .blog-article-content (below the Key
     takeaways card) — neutralise the content ol/a typography there. */
  .blog-article-content .blog-toc-mobile { margin: 0 0 26px; }
  .blog-article-content .blog-toc-mobile ol.blog-toc-list {
    list-style: none;
    padding: 0 18px 18px;
    margin: 0;
    font-size: 1rem;
  }
  .blog-article-content .blog-toc-mobile .blog-toc-list li { margin: 0; }
  .blog-article-content .blog-toc-mobile .blog-toc-list a {
    color: #53637c;
    font-weight: 400;
  }
  .blog-article-content .blog-toc-mobile .blog-toc-list a:hover { color: #00c98d; }
}
@media (max-width: 640px) {
  .blog-article-shell { padding: 88px 16px 56px; }
  .blog-back-top { right: 18px; bottom: 18px; }

  /* Tighten the hero block so a long title no longer fills the whole first
     screen. The desktop clamp floors at 2.1rem (~34px), far too large on a
     phone — scale it down and let it grow with the viewport instead. */
  /* Breadcrumb: one swipeable line instead of wrapping (long titles scroll). */
  .blog-breadcrumb {
    margin-bottom: 18px;
    font-size: 0.86rem;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
  }
  .blog-breadcrumb::-webkit-scrollbar { display: none; }
  .blog-breadcrumb a,
  .blog-breadcrumb span { flex-shrink: 0; }
  .blog-article-title {
    font-size: clamp(1.6rem, 6.6vw, 2.1rem);
    line-height: 1.16;
    letter-spacing: -0.03em;
    margin: 2px 0 12px;
  }
  .blog-article-meta {
    gap: 4px 8px;
    font-size: 0.82rem;
    margin-bottom: 20px;
  }
  .blog-article-hero-img { border-radius: 16px; margin-bottom: 22px; }

  /* Slightly denser body copy — 1.82 line-height reads loose on narrow columns. */
  .blog-article-content p { font-size: 1rem; line-height: 1.72; }

  /* Data tables keep their table layout on phones and scroll horizontally
     inside .blog-table-wrap (no more full-height stacked cards). */
  .blog-article-content .blog-table-wrap {
    overflow-x: auto;
    border-radius: 14px;
  }
  .blog-article-content table { font-size: 0.88rem; }
  .blog-article-content th,
  .blog-article-content td {
    padding: 12px 14px;
    min-width: 8.5em;
  }
}
