/* LeadMagnet Single Article — shared editorial template (article pages only).
   Markup: scripts/article_template.py. Motion: public/article.js.
   Identity kept: #000, #66FF63, theme fonts (--nm-font-2 Inter), header/footer. */

.lm-single-article {
  --lm-container: 1280px;   /* hero, image, grid outer width */
  --lm-grid: 1140px;        /* 760 main + 90 gap + 290 TOC */
  --lm-main: 760px;
  --lm-toc: 290px;
  --lm-gap: 90px;
  --lm-accent: #66FF63;
  --lm-text: rgba(255, 255, 255, .72);
  --lm-muted: rgba(255, 255, 255, .60);
  --lm-faint: rgba(255, 255, 255, .45);
  --lm-line: rgba(255, 255, 255, .10);
  --lm-menu-clear: 211px;   /* floating menu bottom (151px) + 60px */
  display: block;
  background: #000;
  color: #fff;
  padding: 0 32px 120px;
  font-family: var(--nm-font-2);
}
/* The theme wrapper's overflow:hidden is a scroll container and disables
   sticky; clip keeps the same clipping without it. */
body .page-wrapper.main-wrapper:has(.lm-single-article) { overflow: clip; }

/* Reading progress */
.lm-reading-progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 10050; pointer-events: none; }
.lm-reading-progress span { display: block; height: 100%; background: var(--lm-accent); transform-origin: 0 50%; transform: scaleX(0); }

/* Hero */
.lm-article-hero { max-width: var(--lm-grid); margin: 0 auto; padding: var(--lm-menu-clear) 0 64px; }
.page-wrapper .lm-article-hero .lm-article-eyebrow { margin: 0 0 28px !important; }
.page-wrapper .lm-article-hero .lm-article-title {
  font-size: clamp(42px, 4.8vw, 70px) !important;
  line-height: 1.04 !important;
  letter-spacing: -0.01em !important;
  max-width: 980px;
  margin: 0;
  color: #fff;
}
.lm-article-lead { max-width: 780px; margin: 32px 0 0; font-size: 21px; line-height: 1.6; color: var(--lm-text); }
.lm-article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; margin-top: 36px; font-size: 15px; line-height: 1.5; color: var(--lm-faint); }
.lm-article-meta p { margin: 0; }
.lm-article-sep { margin: 0 10px; color: var(--lm-accent); }
.lm-article-author { color: var(--lm-muted); padding-left: 28px; border-left: 1px solid var(--lm-line); }

/* Featured image: the main 3D moment (article.js drives the transform) */
.lm-article-media { max-width: var(--lm-container); margin: 0 auto 104px; perspective: 1600px; }
.lm-article-media-inner { border-radius: 28px; overflow: hidden; border: 1px solid var(--lm-line); transform-origin: 50% 0; background: #0b0b0b; }
.lm-article-featured { display: block; width: 100%; height: auto; }

/* Layout: article column + sticky TOC */
.lm-article-layout {
  max-width: var(--lm-grid);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, var(--lm-main)) var(--lm-toc);
  column-gap: var(--lm-gap);
  justify-content: space-between;
  align-items: start;
}
.lm-article-body { grid-column: 1; grid-row: 1; min-width: 0; }
.lm-article-toc { grid-column: 2; grid-row: 1; position: sticky; top: 175px; min-width: 0; }

/* TOC: minimal, vertical line, numbered H2 */
.lm-article-toc details { border: 0; background: none; padding: 0; }
.lm-article-toc summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--lm-faint);
}
.lm-article-toc summary::-webkit-details-marker { display: none; }
.lm-article-toc nav { margin-top: 22px; border-left: 1px solid var(--lm-line); max-height: calc(100dvh - 260px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.lm-article-toc ol { list-style: none; margin: 0; padding: 0; }
.lm-article-toc a {
  display: grid; grid-template-columns: 30px 1fr; gap: 4px;
  margin-left: -1px; padding: 9px 0 9px 20px; border-left: 2px solid transparent;
  color: var(--lm-faint); font-size: 15px; line-height: 1.45; text-decoration: none;
  transition: color .25s ease, border-color .25s ease;
}
.lm-article-toc ol ol a { grid-template-columns: 1fr; padding-left: 50px; font-size: 14px; }
.lm-toc-num { font-size: 12px; line-height: 1.9; font-variant-numeric: tabular-nums; }
.lm-article-toc a:hover { color: rgba(255, 255, 255, .8); }
.lm-article-toc a[aria-current="location"] { color: var(--lm-accent); border-left-color: var(--lm-accent); }
.lm-article-toc :is(a, summary):focus-visible { outline: 2px solid var(--lm-accent); outline-offset: 3px; border-radius: 4px; }

/* Article text: clean text on black, no cards around paragraphs */
.lm-article-body { font-size: 19px; line-height: 1.75; color: var(--lm-text); overflow-wrap: break-word; }
.lm-article-body :is(p, li) { color: inherit; font-size: inherit; line-height: inherit; font-family: inherit; }
.lm-article-body p { margin: 0 0 26px; }
.lm-article-body :is(b, strong) { color: #fff; font-weight: 600; }
.lm-article-body a:not(.nm-pr-btn-2) { color: var(--lm-accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.lm-article-body a:not(.nm-pr-btn-2):focus-visible { outline: 2px solid var(--lm-accent); outline-offset: 3px; border-radius: 2px; }
.lm-article-body :is(h2, h3) { color: #fff; font-family: var(--nm-font-2); word-break: normal; scroll-margin-top: 180px; }
.lm-article-body h2 { font-size: 34px; font-weight: 700; line-height: 1.2; margin: 0 0 26px; }
.lm-article-body h3 { font-size: 24px; font-weight: 600; line-height: 1.3; margin: 42px 0 16px; }
.lm-article-body :is(h2, h3):focus-visible { outline: 2px solid var(--lm-accent); outline-offset: 6px; border-radius: 4px; }
.lm-article-body img { max-width: 100%; height: auto; border-radius: 18px; }
.lm-article-body ul { list-style: none; padding: 0; margin: 0 0 28px; }
.lm-article-body ul > li { position: relative; padding-left: 28px; margin-bottom: 12px; }
.lm-article-body ul > li::before { content: ""; position: absolute; left: 4px; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--lm-accent); }

/* Section rhythm (groups are what article.js animates) */
.lm-article-section { position: relative; padding-bottom: 64px; transform-origin: 50% 0; }
.lm-article-section + .lm-article-section { padding-top: 64px; border-top: 1px solid var(--lm-line); }
.lm-article-section > :last-child { margin-bottom: 0; }
.lm-article-opening > p:first-child { font-size: 22px; line-height: 1.6; color: #fff; }

/* Component label (Insight, CTA, Takeaway) */
.lm-component-label {
  display: flex; align-items: center; gap: 10px; margin: 0 0 18px !important;
  font-size: 12px !important; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--lm-accent) !important; line-height: 1.4 !important;
}
.lm-component-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lm-accent); }

/* 1. LeadMagnet Insight */
.lm-insight { border: 1px solid var(--lm-line); border-radius: 24px; padding: 40px; background: linear-gradient(180deg, rgba(102, 255, 99, .05), rgba(255, 255, 255, .015)); }
.lm-insight .wp-block-group__inner-container { padding: 0; }
.lm-insight h2 { margin-top: 0; }
.lm-insight .has-background { background: none !important; padding: 0 !important; color: inherit !important; }
.lm-insight p:last-child { margin-bottom: 0; }

/* 2. Pull quote (an existing body sentence, styled) */
.lm-article-body .lm-pullquote {
  margin: 44px 0; padding: 6px 0 6px 30px; border-left: 2px solid var(--lm-accent);
  font-size: 28px; line-height: 1.35; font-weight: 600; color: #fff; max-width: 680px;
}
.lm-article-body blockquote.lm-pullquote p { margin: 0; font: inherit; color: inherit; }

/* 3. Framework / process (named pillars) */
.lm-article-body ol.lm-framework { list-style: none; counter-reset: lm-pillar; padding: 0; margin: 8px 0 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.lm-framework > li { counter-increment: lm-pillar; display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 26px 24px; border: 1px solid var(--lm-line); border-radius: 20px; background: rgba(255, 255, 255, .02); font-size: 16px; line-height: 1.55; }
.lm-framework > li::before { content: counter(lm-pillar, decimal-leading-zero); font-size: 13px; letter-spacing: .08em; color: var(--lm-accent); }
.lm-article-body :is(a, strong).lm-framework-title { color: #fff; font-size: 19px; font-weight: 600; line-height: 1.3; text-decoration: none; }
.lm-article-body a.lm-framework-title:hover { color: var(--lm-accent); }
.lm-framework-text { color: var(--lm-muted); }

/* 4. Key takeaway (the article's conclusion) */
.lm-takeaway { border: 1px solid rgba(102, 255, 99, .22); border-radius: 24px; padding: 44px; background: rgba(102, 255, 99, .035); }
.lm-takeaway h2 { margin-top: 0; }
.lm-takeaway-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 24px; margin-top: 34px; padding-top: 28px; border-top: 1px solid var(--lm-line); }
.lm-article-body .lm-takeaway-cta p { margin: 0; color: #fff; font-size: 18px; }

/* 5. Numbered steps */
.lm-article-body ol.lm-steps { list-style: none; counter-reset: lm-step; padding: 0; margin: 8px 0 30px; }
.lm-steps > li { counter-increment: lm-step; position: relative; padding: 7px 0 18px 62px; margin: 0; }
.lm-steps > li::before {
  content: counter(lm-step, decimal-leading-zero); position: absolute; left: 0; top: 0;
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid rgba(102, 255, 99, .45); color: var(--lm-accent); font-size: 13px; font-variant-numeric: tabular-nums;
}
.lm-steps > li:not(:last-child)::after { content: ""; position: absolute; left: 21px; top: 46px; bottom: 2px; width: 1px; background: var(--lm-line); }

/* 6. Highlighted statistic (only where the text contains a real figure) */
.lm-article-body .lm-stat { margin: 36px 0; padding: 26px 0; border-top: 1px solid var(--lm-line); border-bottom: 1px solid var(--lm-line); font-size: 24px; line-height: 1.45; color: #fff; }

/* Mid-article CTA (one per article) */
.lm-article-body .lm-article-cta { margin: 0; padding: 48px 44px; border: 1px solid var(--lm-line); border-radius: 24px; background: #0a0a0a; }
.lm-article-section + .lm-article-cta, .lm-article-cta + .lm-article-section { border-top: 0; }
.lm-article-cta + .lm-article-section { padding-top: 72px; }
.lm-article-body .lm-article-cta-title { margin: 0 0 14px; max-width: 560px; font-size: 32px; font-weight: 700; line-height: 1.15; color: #fff; text-transform: none; }
.lm-article-body .lm-article-cta-text { margin: 0 0 30px; max-width: 560px; font-size: 18px; color: var(--lm-muted); }
/* Theme pill button keeps its own colours (not the green body-link style). */
.lm-article-body .lm-article-button { text-decoration: none; }
.lm-article-button:focus-visible { outline: 2px solid var(--lm-accent); outline-offset: 4px; }

/* Related insights (editorial cards only) */
.lm-related { max-width: var(--lm-grid); margin: 120px auto 0; padding-top: 72px; border-top: 1px solid var(--lm-line); }
.lm-related-title { margin: 0 0 40px; font-family: var(--nm-font-2); font-size: 34px; font-weight: 700; line-height: 1.2; color: #fff; }
.lm-related .lm-editorial-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.lm-related .lm-editorial-card { transition: transform .5s cubic-bezier(.2, .7, .2, 1); transform-origin: 50% 100%; }
@media (hover: hover) and (pointer: fine) and (min-width: 1025px) {
  .lm-related .lm-editorial-grid .lm-editorial-card:hover { transform: perspective(1000px) rotateX(2deg) translateY(-6px); }
}

/* <=1199: menu 142px */
@media (max-width: 1199px) {
  .lm-single-article { --lm-menu-clear: 202px; --lm-gap: 64px; --lm-toc: 260px; }
}
/* <=1024: single column, TOC above the article, collapsible */
@media (max-width: 1024px) {
  .lm-article-layout { display: block; max-width: var(--lm-main); }
  .lm-article-toc { position: static; margin: 0 0 56px; }
  .lm-article-toc details { border: 1px solid var(--lm-line); border-radius: 16px; padding: 18px 20px; }
  .lm-article-toc summary { color: #fff; font-size: 13px; }
  .lm-article-toc summary::after { content: "+"; font-size: 20px; font-weight: 400; line-height: 1; color: var(--lm-accent); }
  .lm-article-toc details[open] summary::after { content: "–"; }
  .lm-article-toc nav { max-height: none; margin-top: 18px; }
  .lm-related .lm-editorial-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* <=767: menu 132px, phone sizes */
@media (max-width: 767px) {
  .lm-single-article { --lm-menu-clear: 192px; padding: 0 20px 80px; }
  .lm-article-hero { padding-bottom: 44px; }
  .page-wrapper .lm-article-hero .lm-article-title { font-size: clamp(34px, 9.4vw, 44px) !important; }
  .lm-article-lead { font-size: 18px; margin-top: 24px; }
  .lm-article-meta { margin-top: 28px; gap: 6px 20px; font-size: 14px; }
  .lm-article-author { padding-left: 20px; }
  .lm-article-media { margin-bottom: 56px; }
  .lm-article-media-inner { border-radius: 18px; }
  .lm-article-body { font-size: 17px; }
  .lm-article-opening > p:first-child { font-size: 19px; }
  .lm-article-body h2 { font-size: 27px; }
  .lm-article-body h3 { font-size: 22px; }
  .lm-article-section { padding-bottom: 48px; }
  .lm-article-section + .lm-article-section { padding-top: 48px; }
  .lm-insight, .lm-takeaway, .lm-article-body .lm-article-cta { padding: 28px 22px; border-radius: 18px; }
  .lm-article-body .lm-pullquote { font-size: 22px; padding-left: 20px; margin: 32px 0; }
  .lm-article-body .lm-article-cta-title { font-size: 26px; }
  .lm-takeaway-cta { flex-direction: column; align-items: flex-start; }
  .lm-related { margin-top: 80px; padding-top: 56px; }
  .lm-related-title { font-size: 27px; margin-bottom: 28px; }
  .lm-related .lm-editorial-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Reduced motion: no transforms, no transitions; content fully visible. */
@media (prefers-reduced-motion: reduce) {
  .lm-single-article *, .lm-single-article *::before, .lm-single-article *::after { transition: none !important; }
  .lm-article-media-inner, .lm-article-section, .lm-article-title, .lm-tilt, .lm-related .lm-editorial-card { transform: none !important; opacity: 1 !important; }
}
