/*
 * News article review template v2.
 * The article itself follows the current public single-post presentation.
 * Only the sticky contents rail, closing CTA and related articles are new.
 */

.nat {
  --nat-blue: #3062a9;
  --nat-white: #fff;
  --nat-ink: #101828;
  --nat-muted: rgb(16 24 40 / 70%);
  --nat-faint: rgb(16 24 40 / 54%);
  --nat-line: rgb(48 98 169 / 18%);
  --nat-line-strong: rgb(48 98 169 / 34%);
  --nat-soft: rgb(48 98 169 / 6%);
  --nat-shell: min(1400px, calc(100% - 48px));
  position: relative;
  color: var(--nat-ink);
  background: var(--nat-white);
  font-family: Roboto, Arial, sans-serif;
  line-height: 1.5;
}

.nat,
.nat *,
.nat *::before,
.nat *::after {
  box-sizing: border-box;
}

.nat :where(h1, h2, h3, h4, p, figure, ol, ul) {
  margin-top: 0;
}

.nat a {
  text-decoration: none;
}

.nat__shell {
  width: var(--nat-shell);
  margin-inline: auto;
}

/* Current public article header and reading column ----------------------- */

.nat__banner {
  position: relative;
  height: 234px;
  overflow: hidden;
  background: #101828;
}

.nat__banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.nat__article-shell {
  width: var(--nat-shell);
  margin-inline: auto;
  padding-block: 50px 80px;
  display: grid;
  grid-template-columns: minmax(0, 920px) minmax(280px, 340px);
  justify-content: space-between;
  align-items: start;
  gap: clamp(42px, 5vw, 70px);
}

.nat__body,
.nat__rail {
  min-width: 0;
}

.nat__rail {
  align-self: stretch;
}

.nat__crumb {
  margin: 0 0 22px;
  color: var(--nat-ink);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.nat__crumb a,
.nat__meta a {
  color: var(--nat-blue);
}

.nat__crumb a:hover,
.nat__crumb a:focus-visible,
.nat__meta a:hover,
.nat__meta a:focus-visible {
  text-decoration: underline;
}

.nat__meta {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  color: var(--nat-ink);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
}

.nat__meta-row {
  min-height: 27px;
  display: flex;
  align-items: center;
}

.nat__meta svg {
  width: 14px;
  height: 16px;
  margin-right: 5px;
  color: var(--nat-blue);
  fill: currentColor;
  flex: 0 0 auto;
}

.nat .nat__title {
  margin: 0 0 40px;
  color: var(--nat-blue);
  font-family: Arial, sans-serif;
  font-size: 35px;
  font-weight: 700;
  line-height: 1.05;
}

.nat__trust-meta {
  margin: 42px 0 0;
  padding-top: 17px;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}

.nat__trust-meta p {
  margin: 0;
}

.nat__trust-meta p + p {
  margin-top: 5px;
}

.nat__trust-meta span {
  color: #64748b;
}

.nat__trust-meta strong {
  margin-inline: 3px;
  color: #43536a;
  font-size: inherit;
  font-weight: 650;
}

.nat__trust-meta small {
  color: #64748b;
  font-size: 13px;
}

.nat__trust-meta a {
  color: inherit;
}

.nat__trust-meta a:hover,
.nat__trust-meta a:focus-visible {
  color: var(--nat-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Existing article-body presentation ------------------------------------ */

.nat__content {
  min-width: 0;
  color: var(--nat-ink);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: .01em;
}

.nat__content p {
  margin: 0 0 22px;
}

.nat__content p:empty {
  display: none;
}

.nat__content h2 {
  margin: 68px 0 22px;
  padding: 0;
  color: var(--nat-ink);
  font-family: Arial, sans-serif;
  font-size: 25px;
  font-weight: 600;
  line-height: 1.28;
  scroll-margin-top: 112px;
}

.nat__content h3 {
  margin: 48px 0 18px;
  padding: 0;
  color: var(--nat-ink);
  font-family: Arial, sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
  scroll-margin-top: 112px;
}

.nat__content h4 {
  margin: 38px 0 16px;
  padding: 0;
  color: var(--nat-ink);
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

.nat__content a {
  color: var(--nat-blue);
}

.nat__content a:hover,
.nat__content a:focus-visible {
  text-decoration: underline;
}

.nat__content :is(ul, ol) {
  margin: 4px 0 26px;
  padding-left: 40px;
}

.nat__content ul {
  list-style: disc outside;
}

.nat__content ol {
  list-style: decimal outside;
}

.nat__content li {
  margin: 0 0 8px;
}

.nat__content li:last-child {
  margin-bottom: 0;
}

.nat__content img {
  max-width: 100%;
  height: auto;
  display: block;
  vertical-align: bottom;
}

.nat__content figure {
  max-width: 100%;
  margin: 34px 0 38px;
}

.nat__content figure.aligncenter {
  margin-inline: auto;
  text-align: center;
}

.nat__content figure.aligncenter img {
  margin-inline: auto;
}

.nat__content figcaption {
  margin: 12px 0 0;
  color: var(--nat-ink);
  font-size: 16px;
  line-height: 1.5;
  text-align: start;
}

.nat__content figure.aligncenter figcaption {
  text-align: center;
}

.nat__content blockquote,
.nat__content .wp-block-quote {
  margin: 1em 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--nat-ink);
}

.nat__content figure.wp-block-table {
  margin-block: 34px 40px;
  max-width: 100%;
  overflow-x: auto;
}

.nat__content table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  display: table;
  font-size: .9em;
}

.nat__content table.has-fixed-layout {
  table-layout: fixed;
}

.nat__content :is(th, td) {
  padding: .5em;
  border: 1px solid var(--nat-line-strong);
  line-height: 1.5;
  text-align: left;
  vertical-align: top;
}

.nat__content table.has-fixed-layout :is(th, td) {
  word-break: break-word;
}

.nat__content th {
  background: var(--nat-soft);
  font-weight: 600;
}

.nat__content strong {
  font-weight: 700;
}

.nat__content hr {
  height: 1px;
  margin: 48px 0 0;
  border: 0;
  border-top: 1px solid var(--nat-line-strong);
}

.nat__content mjx-container {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

/* Display formulas are centered by default and keep a full reading beat.
 * The component adds .nat__formula to $$...$$ and \[...\] paragraphs, so
 * authors can paste equations into WordPress without manual alignment work. */
.nat__content .nat__formula {
  width: 100%;
  margin: 34px 0 38px;
  padding: 8px 0;
  color: var(--nat-ink);
  display: block;
  overflow-x: auto;
  overflow-y: hidden;
  font-size: 1.08em;
  line-height: 1.55;
  text-align: center;
  scrollbar-width: thin;
}

.nat__content .nat__formula mjx-container[display="true"] {
  min-width: max-content;
  margin: 0 auto !important;
  overflow: visible;
}

.nat__content :is(h2, h3, h4) + :is(p, ul, ol) {
  margin-top: 0;
}

.nat__content :is(figure, .wp-block-table) + h2 {
  margin-top: 72px;
}

.nat__content :is(figure, .wp-block-table) + h3 {
  margin-top: 52px;
}

.nat__content iframe {
  max-width: 100%;
}

.nat__content .wp-block-embed__wrapper {
  position: relative;
}

.nat__content .wp-has-aspect-ratio .wp-block-embed__wrapper::before {
  content: "";
  padding-top: 56.25%;
  display: block;
}

.nat__content .wp-has-aspect-ratio iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Right-hand sticky contents --------------------------------------------- */

.nat__rail-sticky {
  position: sticky;
  top: 104px;
}

.nat__toc {
  padding: 26px;
  border: 1px solid var(--nat-line);
  border-radius: 20px;
  background: var(--nat-white);
}

.nat__eyebrow {
  margin-bottom: 9px;
  color: var(--nat-blue);
  font-size: 12px;
  font-weight: 820;
  line-height: 1.35;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.nat__toc summary {
  margin: 0 0 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
}

.nat__toc summary::-webkit-details-marker {
  display: none;
}

/*
 * The mobile contents panel starts collapsed. This class is added in <head>
 * so the open list cannot paint before the article script closes <details>.
 */
html.nat-toc-mobile-initial .nat__toc > :not(summary) {
  display: none !important;
}

.nat__toc summary .nat__eyebrow {
  margin-bottom: 7px;
  display: block;
}

.nat__toc summary strong {
  color: var(--nat-ink);
  display: block;
  font-size: 22px;
  font-weight: 690;
  line-height: 1.22;
  letter-spacing: -.02em;
}

.nat__toc-toggle {
  position: relative;
  width: 30px;
  height: 30px;
  margin-top: 3px;
  border: 1px solid var(--nat-line-strong);
  border-radius: 50%;
  flex: 0 0 auto;
}

.nat__toc-toggle::before,
.nat__toc-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 2px;
  border-radius: 99px;
  background: var(--nat-blue);
  transform: translate(-50%, -50%);
}

.nat__toc-toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
  transition: transform 150ms ease;
}

.nat__toc[open] .nat__toc-toggle::after {
  transform: translate(-50%, -50%) rotate(0);
}

.nat__toc ol {
  max-height: min(62vh, 620px);
  margin: 0;
  padding: 0 8px 0 0;
  list-style: none;
  overflow-y: auto;
  scrollbar-color: rgb(48 98 169 / 44%) transparent;
  scrollbar-width: thin;
}

.nat__toc li {
  margin: 0;
  border-bottom: 1px solid var(--nat-line);
}

.nat__toc li:last-child {
  border-bottom: 0;
}

.nat__toc li.is-subsection {
  padding-left: 13px;
}

.nat__toc a {
  position: relative;
  padding: 10px 0 10px 14px;
  color: var(--nat-muted);
  display: block;
  font-size: 13px;
  font-weight: 580;
  line-height: 1.38;
  transition: color 150ms ease;
}

.nat__toc a::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 0;
  width: 3px;
  border-radius: 99px;
  background: var(--nat-blue);
  opacity: 0;
  transform: scaleY(.3);
  transition: opacity 150ms ease, transform 150ms ease;
}

.nat__toc a:hover,
.nat__toc a:focus-visible,
.nat__toc a.is-active {
  color: var(--nat-blue);
}

.nat__toc a.is-active::before {
  opacity: 1;
  transform: scaleY(1);
}

/* Preserved closing CTA -------------------------------------------------- */

.nat__project {
  padding-block: clamp(72px, 8vw, 106px);
  border-block: 1px solid var(--nat-line);
  background:
    linear-gradient(120deg, rgb(48 98 169 / 9%), transparent 46%),
    var(--nat-white);
}

.nat__project-inner {
  display: grid;
  grid-template-columns: minmax(0, 850px) auto;
  align-items: end;
  justify-content: space-between;
  gap: 42px;
}

.nat__project h2 {
  max-width: 820px;
  margin-bottom: 18px;
  color: var(--nat-ink);
  font-size: clamp(34px, 4.2vw, 54px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.035em;
}

.nat__project p:not(.nat__eyebrow) {
  max-width: 770px;
  margin-bottom: 0;
  color: var(--nat-muted);
  font-size: 18px;
  line-height: 1.72;
}

.nat__project-actions {
  min-width: 234px;
  display: grid;
  gap: 12px;
}

.nat__button {
  min-height: 52px;
  padding: 13px 20px;
  border: 2px solid var(--nat-blue);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 780;
  line-height: 1.2;
  transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

.nat__button:hover,
.nat__button:focus-visible {
  transform: translateY(-1px);
}

.nat__button--primary {
  color: var(--nat-white) !important;
  background: var(--nat-blue);
}

.nat__button--outline {
  color: var(--nat-blue) !important;
  background: var(--nat-white);
}

.nat__button--outline:hover,
.nat__button--outline:focus-visible {
  color: var(--nat-white) !important;
  background: var(--nat-blue);
}

/* Preserved related articles --------------------------------------------- */

.nat__related {
  padding-block: clamp(76px, 8vw, 112px);
  background: var(--nat-white);
}

.nat__related-head {
  margin-bottom: 40px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
}

.nat__related-head h2 {
  margin-bottom: 0;
  color: var(--nat-ink);
  font-size: clamp(34px, 3.8vw, 50px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.035em;
}

.nat__related-head > a {
  padding-bottom: 6px;
  color: var(--nat-blue);
  font-size: 14px;
  font-weight: 760;
}

.nat__related-head > a:hover,
.nat__related-head > a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nat__related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.nat__card {
  min-width: 0;
  border: 1px solid var(--nat-line);
  border-radius: 20px;
  overflow: hidden;
  background: var(--nat-white);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.nat__card:hover {
  border-color: var(--nat-line-strong);
  box-shadow: 0 18px 44px rgb(48 98 169 / 12%);
  transform: translateY(-4px);
}

.nat__card-image {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--nat-soft);
  display: block;
}

.nat__card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 350ms ease;
}

.nat__card:hover .nat__card-image img {
  transform: scale(1.035);
}

.nat__card-image > span {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--nat-blue);
  background: var(--nat-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 820;
  letter-spacing: .05em;
  box-shadow: 0 7px 20px rgb(16 24 40 / 14%);
}

.nat__card-copy {
  padding: 24px;
}

.nat__card-copy time {
  margin-bottom: 11px;
  color: var(--nat-faint);
  display: block;
  font-size: 13px;
  font-weight: 620;
}

.nat__card-copy h3 {
  margin-bottom: 12px;
  font-size: clamp(20px, 1.7vw, 25px);
  font-weight: 680;
  line-height: 1.28;
  letter-spacing: -.02em;
}

.nat__card-copy h3 a {
  color: var(--nat-ink);
}

.nat__card-copy h3 a:hover,
.nat__card-copy h3 a:focus-visible {
  color: var(--nat-blue);
}

.nat__card-copy p {
  margin-bottom: 18px;
  color: var(--nat-muted);
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.nat__card-link {
  color: var(--nat-blue);
  font-size: 14px;
  font-weight: 760;
}

.nat__card-link:hover,
.nat__card-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Responsive ------------------------------------------------------------- */

@media (max-width: 1024px) {
  .nat__banner {
    height: 219px;
  }

  .nat__article-shell {
    padding: 80px 25px;
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
  }

  .nat__rail {
    grid-row: 1;
    align-self: auto;
  }

  .nat__rail-sticky {
    position: static;
  }

  .nat__toc ol {
    max-height: 300px;
  }

  .nat__crumb,
  .nat__meta {
    font-size: 16px;
    line-height: 1.5;
  }

  .nat__title {
    font-size: 20px;
    line-height: 1.1;
  }

  .nat__content {
    font-size: 16px;
    line-height: 1.72;
  }

  .nat__content h2 {
    margin-top: 58px;
  }

  .nat__content h3 {
    margin-top: 44px;
  }

  .nat__content h4 {
    margin-top: 34px;
  }

  .nat__project-inner {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .nat__project-actions {
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 230px));
  }

  .nat__related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nat__card:last-child {
    display: none;
  }
}

@media (max-width: 680px) {
  .nat {
    --nat-shell: calc(100% - 32px);
  }

  .nat__article-shell {
    width: 100%;
    padding: 56px 16px 68px;
  }

  .nat__content p {
    margin-bottom: 20px;
  }

  .nat__content h2 {
    margin-top: 52px;
    margin-bottom: 18px;
    font-size: 23px;
  }

  .nat__content h3 {
    margin-top: 40px;
    margin-bottom: 16px;
    font-size: 19px;
  }

  .nat__content h4 {
    margin-top: 32px;
  }

  .nat__content figure,
  .nat__content figure.wp-block-table {
    margin-block: 28px 32px;
  }

  .nat__content .nat__formula {
    margin-block: 28px 32px;
    padding-block: 6px;
    font-size: 1em;
  }

  .nat__toc {
    padding: 22px;
  }

  .nat__toc summary {
    margin-bottom: 0;
  }

  .nat__toc[open] summary {
    margin-bottom: 14px;
  }

  .nat__toc ol {
    max-height: 286px;
  }

  .nat__project {
    padding-block: 68px;
  }

  .nat__project-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .nat__related {
    padding-block: 72px;
  }

  .nat__related-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .nat__related-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .nat__card:last-child {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nat *,
  .nat *::before,
  .nat *::after {
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}

@media print {
  .nat__rail,
  .nat__project,
  .nat__related {
    display: none !important;
  }

  .nat__article-shell {
    width: 100%;
    padding-block: 32px;
    display: block;
  }
}
