/* ═══════════════════════════════════════════════════════════
   MetalinkBlog — Article page (light theme fixes)
   Overrides dark blog.css vars on white background
   ═══════════════════════════════════════════════════════════ */

body.nexus.magazine--article {
  --mag-text: #0F172A;
  --mag-text-muted: #475569;
  --mag-text-dim: #64748B;
  --mag-border: rgba(15, 23, 42, 0.1);
  --mag-surface: #FFFFFF;
  --mag-bg-card: #FFFFFF;
  --mag-indigo: #FF5A5F;
  --mag-cyan: #FF5A5F;
  --mag-display: 'Playfair Display', Georgia, serif;
  --blog-read: 100%;
  --blog-layout: 100%;
  --nx-article-container: min(calc(100vw - 40px), 1720px);
  --nx-header-float-top: 16px;
  --nx-sticky-top: calc(var(--nx-header-float-top) + var(--nx-header-h, 72px));
  overflow-x: clip;
}

/* Use nearly full viewport width on article pages */
body.nexus.magazine--article .mag-container {
  max-width: var(--nx-article-container);
  width: 100%;
  padding-left: 20px;
  padding-right: 20px;
}

/* Wider reading column — use full container width */
body.nexus.magazine--article .blog-article-header__inner.mag-container,
body.nexus.magazine--article .blog-article-cover .mag-container,
body.nexus.magazine--article .blog-article-page__layout.mag-container,
body.nexus.magazine--article .blog-article-nav.mag-container {
  max-width: var(--nx-article-container);
}

body.nexus.magazine--article .blog-article-body,
body.nexus.magazine--article .blog-article-body .mag-prose__content {
  max-width: 100% !important;
  width: 100%;
}

/* Align floating nav shell with article containers */
body.nexus.magazine--article .nx-header {
  padding-left: 20px;
  padding-right: 20px;
}

body.nexus.magazine--article .nx-header__inner.mag-container {
  max-width: var(--nx-article-container);
}

/* No scroll-hide on Nexus article sections */
body.nexus.magazine--article .mag-reveal {
  opacity: 1;
  transform: none;
}

body.nexus .mag-preview-shell {
  position: sticky;
  top: var(--nx-sticky-top, calc(var(--nx-header-h, 72px) + 16px));
  z-index: 45;
  background: linear-gradient(180deg, #fff 0%, #F8FAFC 100%);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

body.nexus .mag-preview-shell__inner {
  padding-top: 10px;
  padding-bottom: 10px;
}

body.nexus .mag-preview-bar {
  position: static;
  margin: 0;
  border-radius: 12px;
  padding: 10px 16px;
  text-align: center;
  background: linear-gradient(135deg, #FF9A3C, #FF5A5F);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
}

/* Preview: full-width article body — no empty sidebar column */
body.nexus.magazine--preview .blog-article-page__layout,
body.nexus.magazine--preview .blog-article-page__layout--with-toc {
  grid-template-columns: minmax(0, 1fr);
}

body.nexus.magazine--preview .blog-article-toc {
  display: none !important;
}

body.nexus.magazine--preview .blog-article-body,
body.nexus.magazine--preview .blog-article-page__layout--with-toc .blog-article-body {
  grid-column: 1;
  width: 100%;
  max-width: 100%;
}

body.nexus.magazine--preview .blog-article-toc__sticky {
  position: static;
}

body.nexus.magazine--preview .mag-preview-shell {
  margin-top: var(--nx-sticky-top, 88px);
  top: var(--nx-sticky-top, 88px);
}

body.nexus.magazine--preview .blog-article-header {
  padding-top: 24px;
}

body.nexus.magazine--preview .blog-article-toc__sticky {
  top: auto;
}

/* ─── Article layout ─── */
body.nexus .blog-article-page__layout {
  display: block;
  position: relative;
  padding-top: 48px;
  padding-bottom: 24px;
}

body.nexus .blog-article-toc {
  display: none;
}

body.nexus .blog-article-page__layout--with-toc .blog-article-toc {
  display: block;
  margin-bottom: 28px;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
}

body.nexus .blog-article-toc__sticky {
  position: static;
}

body.nexus .blog-article-body {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
}

@media (min-width: 901px) and (max-width: 1199px) {
  body.nexus .blog-article-page__layout--with-toc .blog-article-toc {
    position: static;
    transform: none;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
  }

  body.nexus .blog-article-page__layout--with-toc .blog-article-toc nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  body.nexus .blog-article-page__layout--with-toc .blog-article-toc nav a {
    padding: 6px 12px;
    border-left: none;
    border-radius: 100px;
    background: #F8FAFC;
    border: 1px solid rgba(15, 23, 42, 0.08);
  }
}

@media (min-width: 1200px) {
  body.nexus .blog-article-page__layout--with-toc {
    display: grid;
    grid-template-columns: minmax(160px, 200px) minmax(0, 1fr);
    gap: 24px 32px;
    align-items: start;
  }

  body.nexus .blog-article-page__layout--with-toc .blog-article-toc {
    position: static;
    transform: none;
    width: auto;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  body.nexus .blog-article-page__layout--with-toc .blog-article-toc__sticky {
    position: sticky;
    top: calc(var(--nx-sticky-top, 88px) + 24px);
    max-height: calc(100vh - var(--nx-sticky-top, 88px) - 48px);
    overflow-y: auto;
    padding-right: 4px;
  }

  body.nexus .blog-article-page__layout--with-toc .blog-article-toc nav a {
    display: block;
    padding: 8px 0 8px 14px;
    border-left: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    border-top: none;
    border-right: none;
    border-bottom: none;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  body.nexus .blog-article-page__layout--with-toc .blog-article-body {
    grid-column: 2;
    min-width: 0;
  }
}

/* ─── Article header ─── */
body.nexus .blog-article-page {
  padding-bottom: 80px;
}

body.nexus .blog-article-header {
  padding: calc(var(--nx-sticky-top, 88px) + 32px) 0 36px;
  background: linear-gradient(180deg, #fff 0%, #F8FAFC 100%);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

body.nexus .blog-breadcrumb {
  color: #64748B;
}

body.nexus .blog-breadcrumb a:hover {
  color: #FF5A5F;
}

body.nexus .blog-article-header__meta {
  color: #64748B;
}

body.nexus .blog-article-header__title {
  font-family: var(--nx-display, 'Playfair Display', Georgia, serif);
  color: #0F172A;
}

body.nexus .blog-article-header__deck {
  color: #475569;
}

body.nexus .blog-article-header__byline > div > span {
  color: #64748B;
}

body.nexus .blog-article-header__byline strong {
  color: #0F172A;
}

body.nexus .blog-category {
  color: #FF5A5F;
  background: rgba(255, 90, 95, 0.1);
  border: 1px solid rgba(255, 90, 95, 0.2);
}

body.nexus .blog-article-header__byline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

body.nexus .blog-article-header__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  flex-wrap: wrap;
}

body.nexus .blog-article-header__edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 90, 95, 0.28);
  background: rgba(255, 90, 95, 0.08);
  color: #FF5A5F;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

body.nexus .blog-article-header__edit:hover {
  background: rgba(255, 90, 95, 0.14);
  border-color: rgba(255, 90, 95, 0.45);
  color: #E54E52;
}

body.nexus .blog-article-header__share {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 0;
}

body.nexus .blog-article-header__share-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748B;
  white-space: nowrap;
  line-height: 1;
}

body.nexus .blog-article-header__share-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

body.nexus .blog-article-header__share-icons a,
body.nexus .blog-article-header__share-icons button {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  color: #475569;
  padding: 0;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

body.nexus .blog-article-header__share-icons a:hover,
body.nexus .blog-article-header__share-icons button:hover {
  color: #FF5A5F;
  border-color: rgba(255, 90, 95, 0.35);
  background: rgba(255, 90, 95, 0.04);
}

body.nexus .blog-article-header__inner {
  width: 100%;
}

body.nexus .blog-article-cover {
  padding: 24px 0 32px;
}

body.nexus .blog-article-cover .mag-container {
  width: 100%;
  overflow: visible;
}

body.nexus.magazine--article .blog-article-cover .blog-cover-img,
body.nexus.magazine--article .blog-article-cover img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: unset;
  object-position: center center;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.1);
}

/* ─── Table of contents ─── */
body.nexus .blog-sidebar__title {
  color: #0F172A;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
}

body.nexus .blog-article-toc nav a {
  display: block;
  padding: 8px 0 8px 14px;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #475569;
  font-weight: 500;
  border-left: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

body.nexus .blog-article-toc nav a.toc-h3 {
  color: #64748B;
  font-weight: 400;
}

body.nexus .blog-article-toc nav a:hover,
body.nexus .blog-article-toc nav a.active {
  color: #FF5A5F;
  border-left-color: #FF5A5F;
  background: rgba(255, 90, 95, 0.05);
}

/* ─── Article body / prose ─── */
body.nexus .mag-prose__content {
  color: #334155;
  font-size: 1.125rem;
  line-height: 1.85;
}

body.nexus .mag-prose__content > * {
  opacity: 1 !important;
  transform: none !important;
}

body.nexus .mag-prose__content h2:not([style*="color"]) {
  font-family: var(--nx-display, 'Playfair Display', Georgia, serif);
  color: #0F172A !important;
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 48px;
  padding-top: 8px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

body.nexus .mag-prose__content h3:not([style*="color"]) {
  font-family: var(--nx-display, 'Playfair Display', Georgia, serif);
  color: #0F172A !important;
  font-size: 1.3rem;
  font-weight: 700;
}

body.nexus .mag-prose__content p:not([style*="color"]),
body.nexus .mag-prose__content li:not([style*="color"]) {
  color: #334155;
}

/* Bold inside colored text must inherit the editor color, not theme defaults */
body.nexus .mag-prose__content [style*="color"] :is(strong, b, em, i, u) {
  color: inherit;
}

body.nexus .mag-prose__content ul,
body.nexus .mag-prose__content ol,
body.nexus .mag-prose__content .nx-article-block__content ul,
body.nexus .mag-prose__content .nx-article-block__content ol {
  margin: 0 0 18px;
  padding-left: 1.5rem;
  list-style-position: outside;
}

body.nexus .mag-prose__content ul:not([style*="list-style-type"]):not([type]),
body.nexus .mag-prose__content .nx-article-block__content ul:not([style*="list-style-type"]):not([type]) {
  list-style-type: disc;
}

body.nexus .mag-prose__content ol:not([style*="list-style-type"]):not([type]),
body.nexus .mag-prose__content .nx-article-block__content ol:not([style*="list-style-type"]):not([type]) {
  list-style-type: decimal;
}

body.nexus .mag-prose__content ol[type="A"],
body.nexus .mag-prose__content ol[style*="upper-alpha"],
body.nexus .mag-prose__content ol[style*="upper-latin"],
body.nexus .mag-prose__content li[style*="upper-alpha"],
body.nexus .mag-prose__content li[style*="upper-latin"],
body.nexus .mag-prose__content .nx-article-block__content ol[type="A"],
body.nexus .mag-prose__content .nx-article-block__content ol[style*="upper-alpha"],
body.nexus .mag-prose__content .nx-article-block__content ol[style*="upper-latin"],
body.nexus .mag-prose__content .nx-article-block__content li[style*="upper-alpha"],
body.nexus .mag-prose__content .nx-article-block__content li[style*="upper-latin"] {
  list-style-type: upper-alpha !important;
}

body.nexus .mag-prose__content ol[type="a"],
body.nexus .mag-prose__content ol[style*="lower-alpha"],
body.nexus .mag-prose__content ol[style*="lower-latin"],
body.nexus .mag-prose__content li[style*="lower-alpha"],
body.nexus .mag-prose__content li[style*="lower-latin"],
body.nexus .mag-prose__content .nx-article-block__content ol[type="a"],
body.nexus .mag-prose__content .nx-article-block__content ol[style*="lower-alpha"],
body.nexus .mag-prose__content .nx-article-block__content ol[style*="lower-latin"],
body.nexus .mag-prose__content .nx-article-block__content li[style*="lower-alpha"],
body.nexus .mag-prose__content .nx-article-block__content li[style*="lower-latin"] {
  list-style-type: lower-alpha !important;
}

body.nexus .mag-prose__content ol[type="I"],
body.nexus .mag-prose__content ol[style*="upper-roman"],
body.nexus .mag-prose__content .nx-article-block__content ol[type="I"],
body.nexus .mag-prose__content .nx-article-block__content ol[style*="upper-roman"] {
  list-style-type: upper-roman;
}

body.nexus .mag-prose__content ol[type="i"],
body.nexus .mag-prose__content ol[style*="lower-roman"],
body.nexus .mag-prose__content .nx-article-block__content ol[type="i"],
body.nexus .mag-prose__content .nx-article-block__content ol[style*="lower-roman"] {
  list-style-type: lower-roman;
}

body.nexus .mag-prose__content li,
body.nexus .mag-prose__content .nx-article-block__content li {
  margin-bottom: 0.2em;
  line-height: 1.6;
}

body.nexus .mag-prose__content li[style*="line-height"],
body.nexus .mag-prose__content .nx-article-block__content li[style*="line-height"],
body.nexus .mag-prose__content ul[style*="line-height"] li,
body.nexus .mag-prose__content ol[style*="line-height"] li,
body.nexus .mag-prose__content p[style*="line-height"] {
  margin-bottom: 0;
}

body.nexus .mag-prose__content strong,
body.nexus .mag-prose__content b {
  font-weight: 600;
  color: inherit;
}

/* Text color applies to letters only — no highlight blocks on body copy */
body.nexus .mag-prose__content .nx-article-block__content :is(p, span, li, h2, h3, strong, em, u, a) {
  background-color: transparent !important;
}

body.nexus .mag-prose__content a {
  color: #FF5A5F;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.nexus .mag-prose__content a:hover {
  color: #E54E52;
}

body.nexus .mag-prose__content ol li::marker,
body.nexus .mag-prose__content ul li::marker,
body.nexus .mag-prose__content .nx-article-block__content li::marker {
  color: #FF9A3C;
  font-weight: 600;
}

body.nexus .mag-prose__content blockquote {
  background: #F8FAFC;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-left: 4px solid #FF5A5F;
  color: #475569 !important;
  font-style: italic;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

body.nexus .mag-prose__content blockquote::before {
  color: #FF5A5F;
  opacity: 0.35;
}

body.nexus .mag-prose__content code {
  background: #F1F5F9;
  color: #C2410C;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

body.nexus .mag-prose__content pre {
  background: #0F172A;
  border: none;
  color: #E2E8F0;
}

body.nexus .mag-prose__content pre code {
  color: inherit;
  background: none;
  border: none;
}

body.nexus .mag-prose__content th {
  background: #F8FAFC;
  color: #0F172A;
}

body.nexus .mag-prose__content td {
  color: #334155;
  border-color: rgba(15, 23, 42, 0.08);
}

/* CKEditor / rich content blocks */
body.nexus .mag-prose__content figure.image {
  display: table;
  clear: both;
  margin: 20px 0;
  max-width: 100%;
}

body.nexus .mag-prose__content figure.image.image-style-block {
  margin-left: auto;
  margin-right: auto;
}

body.nexus .mag-prose__content figure.image.image-style-side {
  float: right;
  max-width: min(50%, 420px);
  margin: 0 0 1em 1.5em;
}

body.nexus .mag-prose__content figure.image.image-style-inline {
  display: inline-block;
  margin: 0 0.75em 0.75em 0;
  vertical-align: top;
}

body.nexus .mag-prose__content figure.image.image_resized img {
  width: 100%;
  height: auto;
}

body.nexus .mag-prose__content figure {
  margin: 20px 0;
  max-width: 100%;
}

body.nexus .mag-prose__content figure.image img,
body.nexus .mag-prose__content .nx-article-block__content figure.image img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  display: block;
}

body.nexus .mag-prose__content .nx-article-block__content img:not([width]):not([style*="width"]) {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  display: block;
}

body.nexus .mag-prose__content figcaption {
  margin-top: 10px;
  font-size: 0.875rem;
  color: #64748B;
  text-align: center;
}

body.nexus .mag-prose__content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  display: table;
}

body.nexus .mag-prose__content figure.table {
  margin: 1.25rem 0;
  width: 100%;
  max-width: 100%;
}

body.nexus .mag-prose__content figure.table table {
  width: 100%;
  margin: 0;
}

body.nexus .mag-prose__content table td,
body.nexus .mag-prose__content table th {
  vertical-align: top;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
}

body.nexus .mag-prose__content .nx-article-block__content table {
  margin: 16px 0;
  display: table;
}

body.nexus .mag-prose__content iframe {
  max-width: 100%;
  border: none;
  border-radius: 12px;
}

/* ─── Subscribe CTA on article pages ─── */
body.nexus .blog-cta-banner {
  padding: 48px 0 80px;
  background: transparent;
}

body.nexus .blog-cta-banner__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 36px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.06);
}

body.nexus .blog-cta-banner__badge {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #FF5A5F;
}

body.nexus .blog-cta-banner__inner h3 {
  font-family: var(--nx-display, 'Playfair Display', Georgia, serif);
  color: #0F172A;
  font-size: 1.5rem;
  margin: 0 0 8px;
}

body.nexus .blog-cta-banner__inner p {
  color: #475569;
  margin: 0;
  max-width: 520px;
}

body.nexus .blog-cta-banner__form {
  display: flex;
  gap: 10px;
  flex: 1;
  min-width: 260px;
  max-width: 420px;
}

body.nexus .blog-cta-banner__form input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  font-size: 0.9375rem;
  background: #fff;
  color: #0F172A;
}

body.nexus .blog-cta-banner__form .blog-btn,
body.nexus .blog-cta-banner__form button {
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  background: #FF5A5F;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

/* ─── Tags & author footer ─── */
body.nexus .blog-tag {
  color: #475569;
  background: #F8FAFC;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 6px 12px;
  border-radius: 100px;
  font-weight: 500;
}

body.nexus .blog-tag:hover {
  color: #FF5A5F;
  border-color: rgba(255, 90, 95, 0.3);
}

body.nexus .blog-article-footer {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.05);
}

body.nexus .blog-article-footer__author strong,
body.nexus .blog-article-footer__author strong a {
  color: #0F172A;
}

body.nexus .blog-article-footer__author p {
  color: #475569;
}

body.nexus .blog-article-footer__role {
  color: #64748B;
  font-size: 0.8125rem;
}

/* ─── Prev / next nav ─── */
body.nexus.magazine--article .blog-article-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  padding: 24px 0;
  margin: 0 auto 16px;
  box-sizing: border-box;
}

body.nexus.magazine--article .blog-article-nav > span:empty {
  display: none;
}

body.nexus.magazine--article .blog-article-nav__link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 18px 20px;
  text-decoration: none;
  transition: box-shadow 0.25s, border-color 0.25s;
}

body.nexus.magazine--article .blog-article-nav__link:hover {
  border-color: rgba(255, 90, 95, 0.3);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

body.nexus.magazine--article .blog-article-nav__link--next {
  text-align: left;
  align-items: flex-start;
}

body.nexus.magazine--article .blog-article-nav__label {
  color: #FF5A5F;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.3;
}

body.nexus.magazine--article .blog-article-nav__title {
  color: #0F172A;
  font-family: var(--nx-display, 'Playfair Display', Georgia, serif);
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: break-word;
}

@media (min-width: 901px) {
  body.nexus.magazine--article .blog-article-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 32px 0;
    margin-bottom: 24px;
  }

  body.nexus.magazine--article .blog-article-nav__link {
    padding: 20px 24px;
  }

  body.nexus.magazine--article .blog-article-nav__link--next {
    text-align: right;
    align-items: flex-end;
  }
}

/* ─── Related articles ─── */
body.nexus .blog-related {
  background: #F8FAFC;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

body.nexus .blog-feed__head h2 {
  font-family: var(--nx-display, 'Playfair Display', Georgia, serif);
  color: #0F172A;
}

body.nexus .mag-link-arrow {
  color: #FF5A5F;
  font-weight: 600;
}

@media (max-width: 900px) {
  body.nexus.magazine--article {
    --nx-header-float-top: 12px;
    --nx-sticky-top: calc(var(--nx-header-float-top) + 58px);
    --nx-article-container: min(calc(100vw - 24px), 100%);
  }

  body.nexus.magazine--article .mag-container {
    padding-left: 16px;
    padding-right: 16px;
  }

  body.nexus.magazine--article .nx-header {
    padding-left: 0;
    padding-right: 0;
  }

  body.nexus.magazine--article .blog-article-page__layout {
    padding-top: 32px;
    gap: 28px;
  }

  body.nexus .blog-article-page__layout--with-toc .blog-article-toc {
    position: static;
    transform: none;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
  }

  body.nexus .blog-article-toc__sticky {
    position: static;
  }

  body.nexus .blog-article-toc nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  body.nexus .blog-article-toc nav a {
    padding: 6px 12px;
    border-left: none;
    border-radius: 100px;
    background: #F8FAFC;
    border: 1px solid rgba(15, 23, 42, 0.08);
  }

  body.nexus .blog-article-toc nav a.active {
    background: rgba(255, 90, 95, 0.1);
    border-color: rgba(255, 90, 95, 0.25);
  }

  body.nexus .blog-article-header__actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  /* Prev / next handled in base article nav styles */

  body.nexus.magazine--article .blog-feed__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@media (max-width: 768px) {
  body.nexus.magazine--article .blog-article-header {
    padding-top: calc(var(--nx-header-h, 72px) + 24px);
    padding-bottom: 28px;
  }

  body.nexus.magazine--article .blog-article-header__title {
    font-size: clamp(1.625rem, 7vw, 2.125rem);
    line-height: 1.2;
  }

  body.nexus.magazine--article .blog-article-header__deck {
    font-size: 1rem;
    line-height: 1.6;
  }

  body.nexus.magazine--article .blog-article-header__byline {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  body.nexus.magazine--article .blog-article-header__actions {
    width: 100%;
    justify-content: flex-start;
  }

  body.nexus.magazine--article .blog-article-cover {
    padding: 16px 0 24px;
  }

  body.nexus.magazine--article .blog-article-page__layout {
    padding-top: 32px;
    gap: 28px;
  }

  body.nexus.magazine--article .blog-related {
    padding: 36px 0 44px;
  }

  body.nexus.magazine--article .blog-feed__head {
    margin-bottom: 20px;
    padding-bottom: 14px;
  }

  body.nexus.magazine--article .blog-feed__head h2 {
    font-size: 1.2rem;
    line-height: 1.3;
  }

  body.nexus.magazine--article .blog-article-footer__author {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  body.nexus.magazine--article .mag-prose__content {
    font-size: 1.0625rem;
    line-height: 1.75;
  }

  body.nexus.magazine--article .mag-prose__content h2 {
    font-size: 1.4rem;
    margin-top: 36px;
  }
}

/* ═══════════════════════════════════════════════════════════
   Article content blocks — magazine layouts
   ═══════════════════════════════════════════════════════════ */

body.nexus .mag-prose__content .nx-article-block {
  margin: 0;
  padding: 24px 0;
  scroll-margin-top: calc(var(--nx-header-h, 72px) + 24px);
  border-bottom: 1px solid var(--nx-border);
}

body.nexus .mag-prose__content .nx-article-block--spacing-compact {
  padding: 12px 0;
}

body.nexus .mag-prose__content .nx-article-block--spacing-relaxed {
  padding: 48px 0;
}

body.nexus .mag-prose__content .nx-article-block--spacing-compact.nx-article-block--text {
  padding: 8px 0;
}

body.nexus .mag-prose__content .nx-article-block--spacing-compact.nx-article-block--split {
  padding: 20px 0;
  gap: 24px;
}

body.nexus .mag-prose__content .nx-article-block:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

body.nexus .mag-prose__content .nx-article-block:first-child {
  padding-top: 0;
}

body.nexus .mag-prose__content .nx-article-block--text {
  padding: 20px 0;
}

body.nexus .mag-prose__content .nx-article-block > h2,
body.nexus .mag-prose__content .nx-article-block__content > h2,
body.nexus .mag-prose__content .nx-article-overlay__content > h2,
body.nexus .mag-prose__content .nx-article-block__quote-grid > h2 {
  font-family: var(--nx-display);
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 700;
  margin: 0 0 14px;
  line-height: 1.3;
  color: var(--nx-text);
  padding-top: 0;
  border-top: none;
  scroll-margin-top: calc(var(--nx-header-h, 72px) + 32px);
}

body.nexus .mag-prose__content .nx-article-block__content > h3 {
  margin-top: 0;
}

body.nexus .mag-prose__content .nx-article-block__figure--inline {
  margin: 0 0 20px;
}

body.nexus .mag-prose__content .nx-article-block__figure--inline img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 14px;
}

body.nexus .mag-prose__content .nx-article-block__content p:not([style*="color"]) {
  margin: 0 0 14px;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--nx-muted);
}

body.nexus .mag-prose__content .nx-article-block__content [style*="color"] :is(strong, b, em, i, u) {
  color: inherit;
}

body.nexus .mag-prose__content .nx-article-block__content strong,
body.nexus .mag-prose__content .nx-article-block__content b {
  font-weight: 600;
  color: inherit;
}

body.nexus .mag-prose__content .nx-article-block__content p:last-child {
  margin-bottom: 0;
}

body.nexus .mag-prose__content .nx-article-block__content ul,
body.nexus .mag-prose__content .nx-article-block__content ol {
  margin: 0 0 14px;
  padding-left: 1.4rem;
  list-style-position: outside;
}

body.nexus .mag-prose__content .nx-article-block__content ul:not([style*="list-style-type"]):not([type]) {
  list-style-type: disc;
}

body.nexus .mag-prose__content .nx-article-block__content ol:not([style*="list-style-type"]):not([type]) {
  list-style-type: decimal;
}

body.nexus .mag-prose__content .nx-article-block__content li {
  margin-bottom: 0.2em;
}

body.nexus .mag-prose__content .nx-article-block__content figure.image,
body.nexus .mag-prose__content .nx-article-block__content figure {
  margin: 16px 0;
}

body.nexus .mag-prose__content .nx-article-block--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  padding: 44px 0;
  background: transparent;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--nx-border);
  box-shadow: none;
}

body.nexus .mag-prose__content .nx-article-block--split:last-child {
  border-bottom: none;
}

body.nexus .mag-prose__content .nx-article-block--image-right {
  grid-template-areas: 'content media';
}

body.nexus .mag-prose__content .nx-article-block--image-left {
  grid-template-areas: 'media content';
}

body.nexus .mag-prose__content .nx-article-block__content {
  grid-area: content;
  min-width: 0;
}

body.nexus .mag-prose__content .nx-article-block__figure,
body.nexus .mag-prose__content .nx-article-block__media {
  grid-area: media;
  margin: 0;
  min-width: 0;
}

body.nexus .mag-prose__content .nx-article-block__figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
}

body.nexus .mag-prose__content .nx-article-block--split:has(.nx-article-block__figure:empty) {
  grid-template-columns: minmax(0, 1fr);
}

body.nexus .mag-prose__content .nx-article-block__figure figcaption {
  margin-top: 10px;
  font-size: 0.8125rem;
  color: var(--nx-muted);
  text-align: center;
}

body.nexus .mag-prose__content .nx-article-block--full-width {
  padding: 36px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--nx-border);
  box-shadow: none;
}

body.nexus .mag-prose__content .nx-article-block__figure--full img {
  max-height: 480px;
  width: 100%;
  border-radius: var(--nx-radius-lg);
}

body.nexus .mag-prose__content .nx-article-block--quote .nx-article-block__quote-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
}

body.nexus .mag-prose__content .nx-article-quote {
  margin: 0;
  padding: 28px 32px;
  border-radius: var(--nx-radius-lg);
  background: linear-gradient(135deg, rgba(255, 90, 95, 0.08), rgba(99, 102, 241, 0.1));
  border-left: 4px solid var(--nx-primary);
}

body.nexus .mag-prose__content .nx-article-quote p {
  font-family: var(--nx-display);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 600;
  line-height: 1.45;
  margin: 0 0 12px;
}

body.nexus .mag-prose__content .nx-article-quote cite {
  font-style: normal;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--nx-muted);
}

body.nexus .mag-prose__content .nx-article-block--stats .nx-article-block__stats-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
  gap: 28px;
  align-items: start;
}

body.nexus .mag-prose__content .nx-article-stat {
  padding: 24px;
  border-radius: var(--nx-radius-lg);
  background: linear-gradient(160deg, rgba(255, 90, 95, 0.1), rgba(255, 154, 60, 0.12));
  border: 1px solid rgba(255, 90, 95, 0.15);
  text-align: center;
}

body.nexus .mag-prose__content .nx-article-stat__icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--nx-primary);
  color: #fff;
}

body.nexus .mag-prose__content .nx-article-stat__value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--nx-primary);
}

body.nexus .mag-prose__content .nx-article-stat__label {
  margin-top: 8px;
  font-weight: 600;
  color: var(--nx-text);
}

body.nexus .mag-prose__content .nx-article-stat__note {
  margin-top: 8px;
  font-size: 0.875rem;
  color: #10B981;
  font-weight: 600;
}

body.nexus .mag-prose__content .nx-article-block--overlay {
  position: relative;
  min-height: 320px;
  border-radius: var(--nx-radius-lg);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

body.nexus .mag-prose__content .nx-article-overlay__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

body.nexus .mag-prose__content .nx-article-overlay__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.88) 0%, rgba(15, 23, 42, 0.45) 55%, rgba(15, 23, 42, 0.2) 100%);
}

body.nexus .mag-prose__content .nx-article-overlay__content {
  position: relative;
  z-index: 1;
  max-width: 56%;
  padding: 36px;
  color: #fff;
}

body.nexus .mag-prose__content .nx-article-overlay__content h2 {
  color: #fff;
  margin-bottom: 12px;
}

body.nexus .mag-prose__content .nx-article-overlay__content p {
  color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 900px) {
  body.nexus .mag-prose__content .nx-article-block--split,
  body.nexus .mag-prose__content .nx-article-block--quote .nx-article-block__quote-grid,
  body.nexus .mag-prose__content .nx-article-block--stats .nx-article-block__stats-grid {
    grid-template-columns: 1fr;
  }

  body.nexus .mag-prose__content .nx-article-block--image-right,
  body.nexus .mag-prose__content .nx-article-block--image-left {
    grid-template-areas: 'media' 'content';
  }

  body.nexus .mag-prose__content .nx-article-overlay__content {
    max-width: 100%;
    padding: 24px;
  }
}

