/* Insight article page. Uses the theme's colours and fonts from style.css. */

.nx-read-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  height: 3px;
  pointer-events: none;
}

.nx-read-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--theme-color), var(--theme-color2));
  transform: scaleX(0);
  transform-origin: left center;
}

/* Banner */

.nx-article-banner {
  padding: 120px 0 110px;
}

.nx-article-banner .breadcumb-title {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(32px, 4.4vw, 58px);
  line-height: 1.12;
  text-wrap: balance;
}

.nx-article-kicker {
  display: inline-block;
  margin-bottom: 18px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--theme-color2);
  color: var(--title-color);
  font-family: var(--title-font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nx-article-kicker:hover {
  background: #fff;
  color: var(--title-color);
}

@media (max-width: 575px) {
  .nx-article-banner {
    padding: 80px 0 70px;
  }

  .nx-article-banner .breadcumb-menu {
    display: none;
  }
}

/* Header: lead, byline, share */

.nx-article-lead {
  margin: 0 0 28px;
  color: var(--title-color);
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.6;
}

.nx-article-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 16px;
  padding: 18px 0;
  border-top: 1px solid var(--th-border-color);
  border-bottom: 1px solid var(--th-border-color);
}

.nx-article-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(160deg, #8b72ff, #5b3fe0);
  color: #fff;
  font-family: var(--title-font);
  font-size: 18px;
  font-weight: 600;
}

.nx-article-byline-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-right: auto;
  line-height: 1.35;
}

.nx-article-byline-text strong {
  color: var(--title-color);
  font-family: var(--title-font);
  font-size: 16px;
  font-weight: 600;
}

.nx-article-byline-text > span {
  color: #6b6b76;
  font-size: 14px;
}

.nx-share-row {
  display: flex;
  gap: 8px;
}

.nx-share-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--th-border-color);
  border-radius: 50%;
  background: #fff;
  color: var(--title-color);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nx-share-btn:hover,
.nx-share-btn:focus-visible {
  border-color: var(--theme-color);
  background: var(--theme-color);
  color: #fff;
  transform: translateY(-2px);
}

.nx-share-btn svg {
  grid-area: 1 / 1;
}

.nx-share-copied-icon,
.nx-share-copy.is-copied .nx-share-copy-icon {
  display: none;
}

.nx-share-copy.is-copied .nx-share-copied-icon {
  display: block;
}

.nx-share-copy.is-copied {
  border-color: var(--success-color);
  background: var(--success-color);
  color: #fff;
}

.nx-article-figure {
  margin: 32px 0;
}

.nx-article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 24px;
}

/* Article text */

.nx-article-body {
  color: #3a3a44;
  font-size: 18px;
  line-height: 1.8;
}

.nx-article-body > :first-child {
  margin-top: 0;
}

.nx-article-body p,
.nx-article-body li {
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.nx-article-body p {
  margin: 0 0 1.15em;
}

.nx-article-body h2,
.nx-article-body h3 {
  margin: 2.2em 0 0.6em;
  color: var(--title-color);
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  scroll-margin-top: 120px;
}

.nx-article-body h4 {
  margin: 1.8em 0 0.5em;
  color: var(--title-color);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.35;
}

.nx-article-body h3 + h4 {
  margin-top: 1em;
}

.nx-article-body ul,
.nx-article-body ol {
  margin: 0 0 1.4em;
  padding-left: 1.3em;
}

.nx-article-body li {
  margin: 0 0 0.5em;
  padding-left: 0.2em;
}

.nx-article-body ul li::marker {
  color: var(--theme-color);
}

.nx-article-body ol li::marker {
  color: var(--theme-color);
  font-weight: 600;
}

.nx-article-body strong {
  color: var(--title-color);
  font-weight: 600;
}

.nx-article-body a {
  color: var(--theme-color);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.nx-article-body a:hover {
  color: var(--title-color);
}

.nx-article-body blockquote {
  margin: 1.8em 0;
  padding: 20px 26px;
  border-left: 4px solid var(--theme-color);
  border-radius: 0 16px 16px 0;
  background: #f6f4ff;
  color: var(--title-color);
  font-size: 19px;
}

.nx-article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
}

.nx-article-body table {
  display: block;
  width: 100%;
  margin: 1.6em 0;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 16px;
}

.nx-article-body th,
.nx-article-body td {
  padding: 10px 14px;
  border: 1px solid var(--th-border-color);
}

.nx-article-body pre {
  padding: 18px;
  overflow-x: auto;
  border-radius: 14px;
  background: #0f0e16;
  color: #f4f2ff;
  font-size: 15px;
}

@media (max-width: 575px) {
  .nx-article-body {
    font-size: 17px;
    line-height: 1.75;
  }
}

/* Tags, call to action, share */

.nx-article-tags,
.nx-topics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.nx-article-tags {
  margin-top: 32px;
}

.nx-article-tags a,
.nx-topics a {
  padding: 7px 15px;
  border: 1px solid var(--th-border-color);
  border-radius: 999px;
  color: var(--title-color);
  font-size: 14px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.nx-article-tags a:hover,
.nx-topics a:hover,
.nx-topics a[aria-current] {
  border-color: var(--theme-color);
  background: var(--theme-color);
  color: #fff;
}

.nx-article-cta {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 48px;
  padding: 36px;
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(90% 140% at 100% 0%, rgba(123, 93, 255, 0.55), transparent 60%),
    var(--title-color);
  color: #c9c6d6;
}

.nx-article-cta > div {
  flex: 1 1 320px;
}

.nx-article-cta-eyebrow {
  margin: 0 0 8px;
  color: var(--theme-color2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nx-article-cta-title {
  margin: 0 0 8px;
  color: #fff;
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.25;
}

.nx-article-cta p:last-child {
  margin: 0;
  color: #c9c6d6;
}

.nx-article-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--th-border-color);
  color: var(--title-color);
  font-family: var(--title-font);
  font-weight: 600;
}

/* Sidebar */

.nx-article-side {
  position: sticky;
  top: 110px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.nx-side-card {
  padding: 26px;
  border-radius: 20px;
  background: #f6f5fb;
}

.nx-side-title {
  display: block;
  margin: 0 0 14px;
  color: var(--title-color);
  font-family: var(--title-font);
  font-size: 18px;
  font-weight: 600;
}

.nx-ins-toc {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.nx-ins-toc li {
  margin: 0;
}

.nx-ins-toc a {
  display: block;
  padding: 7px 0 7px 14px;
  border-left: 2px solid #dcd8ea;
  color: #5d5a6b;
  font-size: 15px;
  line-height: 1.4;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nx-ins-toc .is-h2 a {
  font-weight: 600;
}

.nx-ins-toc a:hover {
  color: var(--title-color);
}

.nx-ins-toc a.is-current {
  border-left-color: var(--theme-color);
  color: var(--theme-color);
  font-weight: 600;
}

.nx-side-search-row {
  display: flex;
  gap: 8px;
}

.nx-side-search-row input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #fff;
  color: var(--title-color);
  font-size: 15px;
}

.nx-side-search-row input:focus {
  border-color: var(--theme-color);
  outline: 0;
}

.nx-side-search-row button {
  flex: none;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--theme-color);
  color: #fff;
}

.nx-side-search-row button:hover {
  background: var(--title-color);
}

.nx-ins-toc-mobile {
  margin: 0 0 32px;
  border: 1px solid var(--th-border-color);
  border-radius: 16px;
  background: #f6f5fb;
}

.nx-ins-toc-mobile summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  color: var(--title-color);
  font-family: var(--title-font);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.nx-ins-toc-mobile summary::-webkit-details-marker {
  display: none;
}

.nx-ins-toc-mobile summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.2s ease;
}

.nx-ins-toc-mobile[open] summary::after {
  transform: rotate(-135deg) translateY(-2px);
}

.nx-ins-toc-count {
  margin-left: auto;
  color: #6b6b76;
  font-family: var(--body-font);
  font-size: 13px;
  font-weight: 400;
}

.nx-ins-toc-mobile nav {
  padding: 0 20px 16px;
}

/* Keep reading */

.nx-keep {
  margin-top: 90px;
}

.nx-keep-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
}

.nx-keep-head h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 40px);
}

.nx-keep-head a {
  color: var(--theme-color);
  font-weight: 600;
}

.nx-keep-head a:hover {
  color: var(--title-color);
}

.nx-keep-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--th-border-color);
  border-radius: 20px;
  background: #fff;
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.nx-keep-card:hover {
  border-color: transparent;
  box-shadow: 0 18px 44px rgba(16, 12, 40, 0.12);
  transform: translateY(-4px);
}

.nx-keep-img {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(160deg, #8b72ff, #24203a);
}

.nx-keep-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.nx-keep-card:hover .nx-keep-img img {
  transform: scale(1.05);
}

.nx-keep-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px 24px;
}

.nx-keep-meta {
  color: var(--theme-color);
  font-size: 13px;
  font-weight: 600;
}

.nx-keep-title {
  color: var(--title-color);
  font-family: var(--title-font);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
}

.nx-topics {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--th-border-color);
}

.nx-topics > span {
  margin-right: 6px;
  color: var(--title-color);
  font-family: var(--title-font);
  font-weight: 600;
}

@media (max-width: 991px) {
  .nx-article-side {
    position: static;
  }

  .nx-keep {
    margin-top: 64px;
  }
}

@media (max-width: 575px) {
  .nx-article-cta {
    padding: 26px 22px;
  }

  .nx-article-cta .th-btn {
    width: 100%;
    justify-content: center;
  }

  .nx-share-top {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nx-share-btn,
  .nx-keep-card,
  .nx-keep-img img {
    transition: none;
  }

  .nx-keep-card:hover,
  .nx-keep-card:hover .nx-keep-img img,
  .nx-share-btn:hover {
    transform: none;
  }
}

@media print {
  .nx-read-progress,
  .nx-article-side,
  .nx-share-row,
  .nx-article-cta,
  .nx-keep,
  .nx-topics {
    display: none !important;
  }
}

@media (min-width: 1200px) {
  .nx-article-main {
    padding-right: 32px;
  }
}
