/* ============================================================
   VOOTKIT EDITORIAL DESIGN SYSTEM v2.0
   BBC authority · CNN hierarchy · Verge aesthetic · Wired depth
   Applied to all blog articles automatically
   ============================================================ */

/* ---- Reading Progress Bar ---- */
#ed-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--brand, #5b4cff) 0%, var(--brand-2, #00c896) 100%);
  z-index: 9999;
  transition: width 0.08s linear;
  border-radius: 0 2px 2px 0;
  pointer-events: none;
}

/* ============================================================
   BODY & LAYOUT RESETS FOR EDITORIAL MODE
   ============================================================ */
body.editorial-body {
  background: var(--bg, #fff);
}

/* ---- Old-structure article cleanup ---- */
body.editorial-body .article,
body.editorial-body main.wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}

body.editorial-body .crumbs {
  display: none !important;
}

body.editorial-body .article .meta,
body.editorial-body .article > div.meta {
  display: none !important;
}

/* ---- New-structure article cleanup ---- */
body.editorial-body .blog-layout {
  display: block !important;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}

body.editorial-body .blog-sidebar {
  display: none !important;
}

body.editorial-body .breadcrumb,
body.editorial-body nav.breadcrumb {
  display: none !important;
}

/* ============================================================
   EDITORIAL HERO & BYLINE
   ============================================================ */
.ed-article-meta {
  margin: 20px 0 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line, #e5e7f0);
}

.ed-cat-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 18px;
  background: rgba(91, 76, 255, 0.10);
  color: var(--brand, #5b4cff);
}

.ed-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.ed-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand, #5b4cff) 0%, var(--brand-2, #00c896) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
  font-family: system-ui, sans-serif;
  letter-spacing: -0.5px;
}

.ed-byline-info {
  flex: 1;
  min-width: 0;
}

.ed-author-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #12183a);
  line-height: 1.3;
}

.ed-publish-meta {
  display: block;
  font-size: 13px;
  color: var(--muted, #888);
  margin-top: 2px;
}

.ed-share-inline {
  display: flex;
  gap: 7px;
  margin-left: auto;
}

.ed-share-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--line, #e0e3f0);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s;
  text-decoration: none !important;
  color: var(--muted, #777) !important;
  font-size: 13px;
  font-weight: 700;
  font-family: system-ui, sans-serif;
  line-height: 1;
  padding: 0;
}

.ed-share-btn:hover {
  background: var(--brand, #5b4cff) !important;
  border-color: var(--brand, #5b4cff) !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(91, 76, 255, 0.25);
}

.ed-deck {
  font-size: 19px;
  line-height: 1.6;
  color: var(--muted, #666);
  font-weight: 400;
  margin: 0;
  font-style: italic;
  border-left: 3px solid var(--brand, #5b4cff);
  padding-left: 16px;
}

/* ============================================================
   COVER IMAGE PREMIUM TREATMENT
   ============================================================ */
body.editorial-body .post-cover {
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.10);
  display: block;
  margin: 0 0 12px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

body.editorial-body .blog-hero {
  margin: 0 0 8px;
}

body.editorial-body .blog-hero-img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.10);
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.ed-cover-caption {
  font-size: 13px;
  color: var(--muted, #999);
  text-align: center;
  margin-bottom: 36px;
  font-style: italic;
}

/* ============================================================
   HEADLINE PREMIUM TREATMENT
   ============================================================ */
body.editorial-body article h1,
body.editorial-body .blog-title,
body.editorial-body .article h1 {
  font-size: clamp(26px, 4.5vw, 46px);
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: -0.03em;
  color: var(--text, #12183a);
  margin: 32px 0 0;
}

/* ============================================================
   PREMIUM ARTICLE TYPOGRAPHY
   ============================================================ */
body.editorial-body .ed-content h2,
body.editorial-body article h2,
body.editorial-body .article h2 {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.22;
  color: var(--text, #12183a);
  margin: 2.6em 0 0.65em;
  letter-spacing: -0.02em;
  scroll-margin-top: 90px;
  position: relative;
  padding-top: 0;
}

body.editorial-body .ed-content h2::before,
body.editorial-body article h2::before,
body.editorial-body .article h2::before {
  content: '';
  display: block;
  width: 36px;
  height: 3px;
  background: linear-gradient(90deg, var(--brand, #5b4cff), var(--brand-2, #00c896));
  border-radius: 2px;
  margin-bottom: 14px;
}

body.editorial-body .ed-content h3,
body.editorial-body article h3,
body.editorial-body .article h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text, #12183a);
  margin: 2em 0 0.55em;
  letter-spacing: -0.01em;
  scroll-margin-top: 90px;
}

body.editorial-body .ed-content p,
body.editorial-body article p,
body.editorial-body .article p {
  font-size: 18px;
  line-height: 1.85;
  color: var(--text, #12183a);
  margin: 0 0 1.4em;
}

body.editorial-body .ed-content ul,
body.editorial-body .ed-content ol,
body.editorial-body article ul,
body.editorial-body article ol,
body.editorial-body .article ul,
body.editorial-body .article ol {
  font-size: 17px;
  line-height: 1.75;
  padding-left: 1.7em;
  margin: 0 0 1.4em;
  color: var(--text, #12183a);
}

body.editorial-body .ed-content li,
body.editorial-body article li,
body.editorial-body .article li {
  margin-bottom: 0.55em;
}

body.editorial-body .ed-content strong,
body.editorial-body article strong,
body.editorial-body .article strong {
  font-weight: 700;
  color: var(--text, #12183a);
}

body.editorial-body .ed-content a,
body.editorial-body article a,
body.editorial-body .article a {
  color: var(--brand, #5b4cff);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.15s;
}

body.editorial-body .ed-content a:hover,
body.editorial-body article a:hover,
body.editorial-body .article a:hover {
  color: var(--violet-2, #8b7bff);
}

body.editorial-body .ed-content blockquote,
body.editorial-body article blockquote,
body.editorial-body .article blockquote {
  border-left: 4px solid var(--brand, #5b4cff);
  padding: 14px 22px;
  margin: 2em 0;
  background: rgba(91, 76, 255, 0.04);
  border-radius: 0 10px 10px 0;
  font-style: italic;
  font-size: 18px;
}

/* Pre / Code blocks */
body.editorial-body .ed-content pre,
body.editorial-body article pre,
body.editorial-body .article pre {
  background: var(--bg-2, #f5f6ff);
  border: 1px solid var(--line, #e0e3f0);
  border-radius: 10px;
  padding: 18px 22px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.65;
  margin: 1.5em 0;
}

/* Section separator after every h2 */
body.editorial-body .ed-section-sep {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line, #e5e7f0) 20%, var(--line, #e5e7f0) 80%, transparent);
  margin: 0 0 0;
  border: none;
}

/* ============================================================
   PULL QUOTES — BBC / Washington Post style
   ============================================================ */
.ed-pull-quote {
  margin: 2.8em 0;
  padding: 2em 2.8em;
  position: relative;
  text-align: center;
  border-top: 2px solid var(--line, #e5e7f0);
  border-bottom: 2px solid var(--line, #e5e7f0);
}

.ed-pull-quote::before {
  content: '\201C';
  position: absolute;
  top: -0.45em;
  left: 50%;
  transform: translateX(-50%);
  font-size: 90px;
  color: var(--brand, #5b4cff);
  line-height: 1;
  font-family: Georgia, 'Times New Roman', serif;
  opacity: 0.22;
  pointer-events: none;
}

.ed-pull-quote p {
  font-size: 22px !important;
  line-height: 1.52 !important;
  font-style: italic;
  color: var(--text, #12183a) !important;
  font-weight: 600;
  margin: 0 !important;
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 0 auto !important;
}

/* ============================================================
   CALLOUT & TOOLBOX ENHANCEMENTS
   ============================================================ */
body.editorial-body .callout {
  background: rgba(91, 76, 255, 0.05);
  border: 1.5px solid rgba(91, 76, 255, 0.18);
  border-radius: 12px;
  padding: 18px 22px 18px 54px;
  margin: 2em 0;
  font-size: 16px;
  line-height: 1.65;
  position: relative;
  color: var(--text, #12183a);
}

body.editorial-body .callout::before {
  content: '💡';
  position: absolute;
  left: 17px;
  top: 17px;
  font-size: 19px;
}

body.editorial-body .toolbox {
  background: var(--bg-2, #f8f9ff);
  border: 1.5px solid var(--line, #e5e7f0);
  border-radius: 14px;
  padding: 22px 28px;
  margin: 2em 0;
}

body.editorial-body .toolbox h3 {
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin: 0 0 16px !important;
  padding-top: 0 !important;
}

body.editorial-body .toolbox h3::before {
  display: none !important;
}

body.editorial-body .toolbox ul {
  margin: 0 !important;
  padding-left: 1.4em !important;
}

body.editorial-body .cta-banner-sm {
  border-radius: 14px !important;
  margin: 2.5em 0 !important;
  padding: 22px 26px !important;
}

body.editorial-body .cta-banner {
  border-radius: 16px !important;
  margin: 3em 0 !important;
}

/* ============================================================
   MOBILE TABLE OF CONTENTS (accordion)
   ============================================================ */
.ed-toc-mobile {
  background: var(--bg-2, #f8f9ff);
  border: 1.5px solid var(--line, #e5e7f0);
  border-radius: 12px;
  margin-bottom: 32px;
  overflow: hidden;
}

.ed-toc-mobile > summary {
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text, #12183a);
  user-select: none;
}

.ed-toc-mobile > summary::-webkit-details-marker { display: none; }

.ed-toc-mobile > summary::after {
  content: '▾';
  color: var(--muted, #999);
  transition: transform 0.2s;
  font-size: 13px;
}

.ed-toc-mobile[open] > summary::after {
  transform: rotate(180deg);
}

.ed-toc-mobile > summary::before {
  content: '📋';
  margin-right: 8px;
  font-size: 15px;
}

.ed-toc-list {
  list-style: none !important;
  padding: 0 16px 14px !important;
  margin: 0 !important;
}

.ed-toc-list li {
  margin-bottom: 0 !important;
  border-bottom: 1px solid var(--line, #e5e7f0);
}

.ed-toc-list li:last-child {
  border-bottom: none;
}

.ed-toc-list a {
  display: block;
  font-size: 14px;
  color: var(--muted, #666) !important;
  text-decoration: none !important;
  padding: 9px 6px;
  line-height: 1.4;
  transition: color 0.15s;
  border-left: 2px solid transparent;
  padding-left: 10px;
}

.ed-toc-list a:hover {
  color: var(--brand, #5b4cff) !important;
}

.ed-toc-list a.ed-toc-active {
  color: var(--brand, #5b4cff) !important;
  font-weight: 600;
  border-left-color: var(--brand, #5b4cff);
}

/* ============================================================
   DESKTOP TOC + SHARE SIDEBAR (fixed, ultra-wide only)
   ============================================================ */
.ed-toc-fixed {
  position: fixed;
  right: calc((100vw - 820px) / 2 - 260px);
  top: 100px;
  width: 230px;
  z-index: 50;
  display: none;
}

.ed-toc-fixed-inner {
  background: var(--bg, #fff);
  border: 1px solid var(--line, #e5e7f0);
  border-radius: 12px;
  padding: 18px 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.ed-toc-fixed-inner h4 {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted, #999);
  margin: 0 0 12px;
}

.ed-toc-fixed .ed-toc-list {
  padding: 0 !important;
}

.ed-toc-fixed .ed-toc-list li {
  border-bottom: none;
}

.ed-toc-fixed .ed-toc-list a {
  font-size: 13px;
  padding: 5px 8px;
  border-radius: 6px;
}

.ed-toc-fixed .ed-toc-list a:hover {
  background: rgba(91, 76, 255, 0.05);
}

.ed-toc-fixed .ed-toc-list a.ed-toc-active {
  background: rgba(91, 76, 255, 0.07);
  border-left-color: var(--brand, #5b4cff);
}

.ed-share-fixed {
  position: fixed;
  left: calc((100vw - 820px) / 2 - 70px);
  top: 200px;
  z-index: 50;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.ed-share-fixed-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted, #999);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  margin-bottom: 4px;
}

/* Show on very wide screens */
@media (min-width: 1380px) {
  .ed-toc-fixed { display: block; }
  .ed-share-fixed { display: flex; }
}

/* ============================================================
   RELATED ARTICLES BLOCK
   ============================================================ */
.ed-related-block {
  margin: 3.5em 0 2em;
  padding-top: 2em;
  border-top: 2px solid var(--line, #e5e7f0);
}

.ed-related-block h4 {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--muted, #999);
  margin: 0 0 20px;
}

.ed-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.ed-related-card {
  background: var(--bg-2, #f8f9ff);
  border: 1px solid var(--line, #e5e7f0);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none !important;
  display: block;
  transition: transform 0.2s, box-shadow 0.2s;
  color: var(--text, #12183a);
}

.ed-related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.ed-related-card-body {
  padding: 14px 16px;
}

.ed-related-cat {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--brand, #5b4cff);
  display: block;
  margin-bottom: 7px;
}

.ed-related-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.38;
  color: var(--text, #12183a);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ed-related-meta {
  font-size: 12px;
  color: var(--muted, #999);
  margin-top: 10px;
  display: block;
}

/* Mid-article related (single row, more editorial) */
.ed-related-mid {
  background: var(--bg-2, #f8f9ff);
  border: 1px solid var(--line, #e5e7f0);
  border-radius: 14px;
  padding: 20px 24px;
  margin: 2.5em 0;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  transition: box-shadow 0.2s;
}

.ed-related-mid:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.ed-related-mid-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.ed-related-mid-body {}

.ed-related-mid-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--brand, #5b4cff);
  display: block;
  margin-bottom: 5px;
}

.ed-related-mid-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text, #12183a);
  display: block;
  line-height: 1.35;
}

.ed-related-mid-time {
  font-size: 12px;
  color: var(--muted, #999);
  margin-top: 4px;
  display: block;
}

/* ============================================================
   AUTHOR BIO CARD
   ============================================================ */
.ed-author-card {
  display: flex;
  gap: 20px;
  background: var(--bg-2, #f8f9ff);
  border: 1.5px solid var(--line, #e5e7f0);
  border-radius: 16px;
  padding: 26px 28px;
  margin: 3em 0 2em;
  align-items: flex-start;
}

.ed-author-card-avatar {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand, #5b4cff) 0%, var(--brand-2, #00c896) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
  font-family: system-ui, sans-serif;
}

.ed-author-card-info {}

.ed-author-card-info h4 {
  font-size: 17px;
  font-weight: 800;
  color: var(--text, #12183a);
  margin: 0 0 3px;
}

.ed-author-card-role {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--brand, #5b4cff);
  display: block;
  margin-bottom: 10px;
}

.ed-author-card-bio {
  font-size: 15px !important;
  line-height: 1.65 !important;
  color: var(--muted, #666) !important;
  margin: 0 !important;
}

/* ============================================================
   NEWSLETTER SIGNUP
   ============================================================ */
.ed-newsletter {
  background: linear-gradient(135deg, rgba(91, 76, 255, 0.05) 0%, rgba(0, 200, 150, 0.05) 100%);
  border: 1.5px solid rgba(91, 76, 255, 0.14);
  border-radius: 18px;
  padding: 36px 32px;
  text-align: center;
  margin: 2em 0 3em;
}

.ed-newsletter h3 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text, #12183a);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.ed-newsletter h3::before {
  display: none !important;
}

.ed-newsletter > p {
  font-size: 15px !important;
  line-height: 1.55 !important;
  color: var(--muted, #777) !important;
  margin: 0 0 22px !important;
}

.ed-newsletter-form {
  display: flex;
  gap: 10px;
  max-width: 440px;
  margin: 0 auto;
}

.ed-newsletter-input {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid var(--line, #dde0f0);
  border-radius: 10px;
  font-size: 15px;
  background: var(--bg, #fff);
  color: var(--text, #12183a);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: system-ui, sans-serif;
}

.ed-newsletter-input:focus {
  border-color: var(--brand, #5b4cff);
  box-shadow: 0 0 0 3px rgba(91, 76, 255, 0.1);
}

.ed-newsletter-btn {
  padding: 12px 22px;
  background: var(--brand, #5b4cff);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
  font-family: system-ui, sans-serif;
  letter-spacing: 0.3px;
}

.ed-newsletter-btn:hover {
  background: var(--violet-2, #7b6dff);
  transform: translateY(-1px);
}

.ed-newsletter-note {
  font-size: 12px !important;
  color: var(--muted, #aaa) !important;
  margin: 10px 0 0 !important;
}

/* ============================================================
   MOBILE FLOATING SHARE BUTTON
   ============================================================ */
.ed-float-share {
  position: fixed;
  bottom: 24px;
  right: 18px;
  z-index: 500;
}

.ed-float-share-toggle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--brand, #5b4cff);
  color: #fff;
  border: none;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(91, 76, 255, 0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  font-family: system-ui, sans-serif;
}

.ed-float-share-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 22px rgba(91, 76, 255, 0.48);
}

.ed-float-share-menu {
  position: absolute;
  bottom: 60px;
  right: 0;
  background: var(--bg, #fff);
  border: 1px solid var(--line, #e0e3f0);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 168px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.18s, transform 0.18s;
}

.ed-float-share-menu.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.ed-float-share-menu a,
.ed-float-share-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #12183a) !important;
  text-decoration: none !important;
  border-radius: 8px;
  transition: background 0.12s;
  background: none;
  border: none;
  cursor: pointer;
  font-family: system-ui, sans-serif;
  width: 100%;
  text-align: left;
}

.ed-float-share-menu a:hover,
.ed-float-share-menu button:hover {
  background: var(--bg-2, #f5f5ff);
  color: var(--brand, #5b4cff) !important;
}

/* ============================================================
   DARK MODE
   ============================================================ */
html[data-theme="dark"] .ed-pull-quote::before {
  opacity: 0.12;
}

html[data-theme="dark"] .ed-newsletter {
  background: rgba(91, 76, 255, 0.08);
  border-color: rgba(91, 76, 255, 0.2);
}

html[data-theme="dark"] .ed-newsletter-input {
  background: var(--bg-2);
  border-color: var(--line);
  color: var(--text);
}

html[data-theme="dark"] .ed-float-share-menu {
  background: var(--card);
  border-color: var(--line);
}

html[data-theme="dark"] .ed-related-card {
  background: var(--bg-2);
  border-color: var(--line);
}

html[data-theme="dark"] .ed-toc-fixed-inner {
  background: var(--card);
  border-color: var(--line);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

html[data-theme="dark"] .ed-author-card {
  background: var(--bg-2);
  border-color: var(--line);
}

html[data-theme="dark"] .ed-toc-mobile {
  background: var(--bg-2);
  border-color: var(--line);
}

html[data-theme="dark"] .ed-related-mid {
  background: var(--bg-2);
  border-color: var(--line);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  body.editorial-body .article,
  body.editorial-body main.wrap,
  body.editorial-body .blog-layout {
    padding: 0 16px;
  }

  body.editorial-body article h1,
  body.editorial-body .blog-title,
  body.editorial-body .article h1 {
    font-size: clamp(24px, 7vw, 36px);
  }

  body.editorial-body .ed-content h2,
  body.editorial-body article h2,
  body.editorial-body .article h2 {
    font-size: 22px;
  }

  body.editorial-body .ed-content p,
  body.editorial-body article p,
  body.editorial-body .article p {
    font-size: 17px;
  }

  .ed-pull-quote p {
    font-size: 19px !important;
  }

  .ed-pull-quote {
    padding: 1.6em 1.6em;
  }

  .ed-related-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ed-newsletter {
    padding: 28px 20px;
  }

  .ed-newsletter-form {
    flex-direction: column;
  }

  .ed-newsletter-btn {
    width: 100%;
    padding: 13px;
  }

  .ed-author-card {
    flex-direction: column;
    gap: 14px;
    padding: 20px;
  }

  .ed-share-inline {
    display: none;
  }
}

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

  body.editorial-body .post-cover,
  body.editorial-body .blog-hero-img {
    border-radius: 8px;
  }

  .ed-related-mid {
    flex-direction: column;
    gap: 10px;
  }
}

/* ============================================================
   FAQ SECTION ENHANCEMENT
   ============================================================ */
body.editorial-body .faq-acc h2 {
  scroll-margin-top: 90px;
}

body.editorial-body .faq-acc details {
  border-radius: 10px;
  margin-bottom: 8px;
  border: 1.5px solid var(--line, #e5e7f0);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

body.editorial-body .faq-acc details[open] {
  box-shadow: 0 3px 12px rgba(91, 76, 255, 0.07);
  border-color: rgba(91, 76, 255, 0.2);
}

body.editorial-body .faq-acc details[open] summary {
  color: var(--brand, #5b4cff);
}

body.editorial-body .faq-acc summary {
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  color: var(--text, #12183a);
  background: var(--bg-2, #f8f9ff);
}

body.editorial-body .faq-acc summary::-webkit-details-marker { display: none; }

body.editorial-body .faq-acc details > p {
  padding: 14px 20px 16px;
  margin: 0 !important;
  font-size: 16px !important;
  background: var(--bg, #fff);
}

/* ============================================================
   BLOG-INTRO paragraph (deck style)
   ============================================================ */
body.editorial-body .blog-intro {
  font-size: 19px !important;
  line-height: 1.7 !important;
  color: var(--muted, #555) !important;
  font-style: italic;
  border-left: 3px solid var(--brand, #5b4cff);
  padding-left: 16px;
  margin-bottom: 2em !important;
}
