:root {
  --article-paper-cash-flow: #fff8f6;
  --article-paper-liabilities: #fff9f2;
  --article-paper-assets: #fffced;
  --article-paper-retirement-readiness: #f5fbf4;
  --article-paper-insurance-and-risk: #f5faff;
  --article-paper-tax-optimization: #f8f7ff;
  --article-paper-you: #fcf7ff;
  --article-page-surface: #f7faf6;
  --article-paper-ink: #18211d;
  --article-paper-secondary: #526159;
  --article-paper-link: #0b6258;
  --article-paper-rule: #bdcbc3;
  --article-paper-rule-strong: #81968b;
  --article-prose-indent: clamp(44px, 4.8vw, 64px);
  --article-reading-measure: 960px;
}

html.article-editorial-paper[data-article-paper="cash-flow"] { --article-page-surface: var(--article-paper-cash-flow); }
html.article-editorial-paper[data-article-paper="liabilities"] { --article-page-surface: var(--article-paper-liabilities); }
html.article-editorial-paper[data-article-paper="assets"] { --article-page-surface: var(--article-paper-assets); }
html.article-editorial-paper[data-article-paper="retirement-readiness"] { --article-page-surface: var(--article-paper-retirement-readiness); }
html.article-editorial-paper[data-article-paper="insurance-and-risk"] { --article-page-surface: var(--article-paper-insurance-and-risk); }
html.article-editorial-paper[data-article-paper="tax-optimization"] { --article-page-surface: var(--article-paper-tax-optimization); }
html.article-editorial-paper[data-article-paper="you"] { --article-page-surface: var(--article-paper-you); }

html.article-editorial-paper,
html.article-editorial-paper body,
html.article-editorial-paper :is(.site-header, .article-page, .article-layout, .article-shell, .article-header, .article-body, .article-tab-content, .article-toc, .article-related-section, .article-sources, .article-disclaimer, .article-sidebar, .article-sidebar-card, .calculator-sidebar-callout, .site-footer) {
  background-color: var(--article-page-surface);
  background-image: none;
}

html.article-editorial-paper,
html.article-editorial-paper body {
  min-height: 100%;
}

html.article-editorial-paper body {
  color: var(--article-paper-ink);
}

html.article-editorial-paper .site-header {
  padding-right: max(20px, calc((100% - 1160px) / 2));
  padding-left: max(20px, calc((100% - 1160px) / 2));
  border-bottom-color: color-mix(in srgb, var(--article-paper-rule) 76%, transparent);
  backdrop-filter: none;
  box-shadow: none;
}

html.article-editorial-paper .article-page {
  width: min(calc(100% - 40px), 1080px);
  max-width: none;
  margin-inline: auto;
  padding: clamp(24px, 3vw, 38px) 0 48px;
}

html.article-editorial-paper .article-layout {
  display: block;
}

html.article-editorial-paper .article-shell {
  position: relative;
  width: 100%;
  margin-inline: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: var(--article-paper-ink);
}

html.article-editorial-paper .article-header[data-clarity-primary] {
  max-width: 100%;
  margin: 0;
  padding: clamp(18px, 2vw, 26px) 0 clamp(10px, 1.2vw, 14px);
  border: 0;
  border-top: 2px solid var(--article-pillar-accent);
  box-shadow: none;
}

html.article-editorial-paper .article-header h1 {
  max-width: 1040px;
  margin-bottom: clamp(10px, 1.2vw, 14px);
  color: var(--article-paper-ink);
  font-family: var(--font-article-serif);
  font-size: clamp(2.35rem, 3.15vw, 3rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.11;
  overflow-wrap: normal;
  text-wrap: pretty;
}

html.article-editorial-paper .article-lede {
  max-width: 70ch;
  margin-bottom: 10px;
  color: var(--article-paper-secondary);
  font-family: var(--font-article-serif);
  font-size: clamp(1.08rem, 1.18vw, 1.2rem);
  line-height: 1.58;
}

html.article-editorial-paper .article-chip-row {
  gap: 0;
}

html.article-editorial-paper .article-shell .eyebrow {
  font-weight: 650;
  letter-spacing: 0.035em;
  text-transform: none;
}

html.article-editorial-paper .article-chip {
  min-height: 0;
  padding: 3px 0 4px;
  border: 0;
  border-bottom: 1px solid var(--article-pillar-accent);
  border-radius: 0;
  background: transparent;
  color: var(--article-pillar-readable);
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.35;
}

/* CLARITY uses the calculator label/link treatment. Static text is not a link. */
html.article-editorial-paper .article-chip[data-clarity-pillar-chip] {
  border-bottom: 0;
}

html.article-editorial-paper .article-pillar-strip {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  min-width: 0;
  padding: 3px 0 4px;
  font-size: 0.92rem;
}

html.article-editorial-paper .article-tabs {
  width: 100%;
  margin: 0;
  padding: 0;
  gap: clamp(26px, 4vw, 42px);
  border-bottom: 1px solid var(--article-paper-rule);
}

html.article-editorial-paper .article-tab-button {
  min-height: 44px;
  padding: 10px 0 11px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--article-paper-secondary);
  font-size: 0.96rem;
  font-weight: 680;
}

html.article-editorial-paper .article-tab-button:hover,
html.article-editorial-paper .article-tab-button.is-active {
  border: 0;
  background: transparent;
  color: var(--article-pillar-readable);
}

html.article-editorial-paper .article-tab-button.is-active::after {
  bottom: -1px;
  height: 3px;
  border-radius: 0;
  background: var(--article-pillar-accent);
}

html.article-editorial-paper :where(a, button, summary, [tabindex]):not(.article-share-rail__button):not(.article-share-rail__handle):focus-visible {
  outline: 3px solid var(--article-paper-link);
  outline-offset: 3px;
  box-shadow: 0 0 0 2px var(--article-page-surface);
}

html.article-editorial-paper .article-body {
  margin-top: 0;
}

html.article-editorial-paper .article-tab-content {
  color: var(--article-paper-ink);
  font-size: clamp(1.05rem, 1.02rem + 0.18vw, 1.16rem);
  line-height: 1.76;
}

html.article-editorial-paper .article-tab-content p {
  margin-bottom: 0.85em;
}

html.article-editorial-paper .article-tab-content :is(ul, ol) {
  margin-bottom: 1em;
}

html.article-editorial-paper .article-tab-content[data-tab="quick-read"] {
  width: min(calc(100% - var(--article-prose-indent) + 16px), calc(var(--article-reading-measure) + 16px));
  margin: clamp(14px, 1.8vw, 20px) auto 0;
  margin-left: calc(var(--article-prose-indent) - 16px);
  padding-left: 14px;
  border-left: 2px solid var(--article-pillar-accent);
}

html.article-editorial-paper .article-tab-content[data-tab="in-depth"] > :where(p, h3, ul, ol, blockquote) {
  width: min(calc(100% - var(--article-prose-indent)), var(--article-reading-measure));
  margin-right: auto;
  margin-left: var(--article-prose-indent);
}

html.article-editorial-paper .article-tab-content[data-tab="in-depth"] > h2 {
  width: 100%;
  margin-right: 0;
  margin-left: 0;
}

html.article-editorial-paper .article-tab-content h2,
html.article-editorial-paper .article-tab-content h3 {
  color: var(--article-paper-ink);
  font-family: var(--font-article-serif);
  letter-spacing: 0;
}

html.article-editorial-paper .article-tab-content h2 {
  margin-top: clamp(28px, 3.2vw, 42px);
  margin-bottom: 10px;
  font-size: clamp(1.42rem, 1.8vw, 1.75rem);
  font-weight: 600;
  line-height: 1.24;
}

html.article-editorial-paper .article-tab-content h3 {
  margin-top: 22px;
  margin-bottom: 8px;
  font-size: clamp(1.12rem, 1.25vw, 1.25rem);
  font-weight: 600;
  line-height: 1.3;
}

html.article-editorial-paper .article-toc {
  width: 100%;
  margin: clamp(20px, 2.5vw, 28px) 0 0;
  padding: 16px 0 18px;
  border: 0;
  border-top: 1px solid var(--article-paper-rule-strong);
  border-bottom: 1px solid var(--article-paper-rule);
  border-radius: 0;
  box-shadow: none;
}

html.article-editorial-paper .article-toc :is(ol, ul) {
  display: block;
  margin: 0;
  padding-left: 1.35rem;
}

html.article-editorial-paper .article-toc li {
  margin: 0;
  padding: 0;
}

html.article-editorial-paper .article-toc li::marker {
  color: var(--article-pillar-readable);
  font-weight: 700;
}

html.article-editorial-paper .article-toc li + li {
  margin-top: 0;
}

html.article-editorial-paper :is(.article-tab-content, .article-related-list, .article-source-list, .article-disclaimer) a {
  color: var(--article-paper-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

html.article-editorial-paper .article-inline-note {
  display: block;
  width: min(100%, 70ch);
  margin: 18px auto;
  padding: 4px 0 4px 18px;
  border-left: 2px solid var(--article-pillar-accent);
  color: var(--article-paper-secondary);
  font-size: 0.92em;
  line-height: 1.65;
}

html.article-editorial-paper .article-inline-figure {
  width: min(100%, 900px);
  margin: clamp(24px, 3.5vw, 40px) auto;
}

html.article-editorial-paper .article-inline-figure img {
  width: 100%;
  max-width: 860px;
  max-height: none;
  border-radius: 2px;
  box-shadow: none;
}

html.article-editorial-paper .article-inline-figure figcaption {
  max-width: 76ch;
  margin-top: 10px;
  color: var(--article-paper-secondary);
  font-size: 0.93rem;
}

html.article-editorial-paper .article-table-wrap,
html.article-editorial-paper .article-body > table,
html.article-editorial-paper .article-tab-content > table {
  width: min(100%, 900px);
  margin: 22px auto;
  border-top: 1px solid var(--article-paper-rule-strong);
  border-bottom: 1px solid var(--article-paper-rule-strong);
}

html.article-editorial-paper .article-table th,
html.article-editorial-paper .article-table td {
  background: transparent;
  border-bottom-color: var(--article-paper-rule);
}

html.article-editorial-paper .article-table th {
  color: var(--article-paper-ink);
  font-weight: 700;
}

html.article-editorial-paper .article-related-section,
html.article-editorial-paper .article-sources,
html.article-editorial-paper .article-disclaimer {
  width: 100%;
  margin: clamp(30px, 4vw, 46px) auto 0 0;
  padding: 18px 0 0;
  border: 0;
  border-top: 1px solid var(--article-paper-rule-strong);
  border-radius: 0;
  box-shadow: none;
}

html.article-editorial-paper .article-related-section + .article-related-section {
  margin-top: 18px;
}

html.article-editorial-paper .article-related-list {
  gap: 8px 22px;
}

html.article-editorial-paper .article-related-list a {
  font-weight: 600;
}

html.article-editorial-paper :is(.article-related-section, .article-sources, .article-disclaimer) > .eyebrow {
  font-size: 0.9rem;
  line-height: 1.45;
  letter-spacing: 0.025em;
}

html.article-editorial-paper .article-sources .article-source-list {
  columns: 2 290px;
  column-gap: 42px;
  padding-left: 1.2rem;
}

html.article-editorial-paper .article-sources .article-source-list li {
  margin-bottom: 9px;
  break-inside: avoid;
}

html.article-editorial-paper .article-disclaimer .article-disclaimer {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
}

html.article-editorial-paper .article-sidebar {
  width: min(100%, 1080px);
  margin: clamp(30px, 4vw, 44px) auto 0 max(0px, calc(50% - 540px));
  gap: 22px;
}

html.article-editorial-paper .article-sidebar-card {
  padding: 18px 0 0;
  border: 0;
  border-top: 1px solid var(--article-paper-rule-strong);
  border-radius: 0;
  box-shadow: none;
}

html.article-editorial-paper .article-sidebar-card :is(h2, p) {
  color: var(--article-paper-ink);
}

html.article-editorial-paper .site-footer {
  border-top: 1px solid var(--article-paper-rule);
  box-shadow: none;
}

html[lang^="zh"].article-editorial-paper .article-header h1,
html[lang^="zh"].article-editorial-paper .article-lede,
html[lang^="zh"].article-editorial-paper .article-tab-content h2,
html[lang^="zh"].article-editorial-paper .article-tab-content h3 {
  font-family: var(--font-article-zh-sans);
}

html[lang^="zh"].article-editorial-paper .article-header h1 {
  font-size: clamp(2rem, 2.7vw, 2.55rem);
  font-weight: 620;
  line-height: 1.22;
}

html[lang^="zh"].article-editorial-paper .article-tab-content {
  color: var(--article-paper-ink);
  font-size: clamp(1rem, 1rem + 0.1vw, 1.08rem);
  line-height: 1.86;
  letter-spacing: 0;
}

@media (max-width: 1120px) {
  html[lang^="fr"].article-editorial-paper .site-header { align-items: center; }
}

@media (max-width: 760px) {
  html[lang^="fr"].article-editorial-paper .site-language-menu summary {
    min-height: 44px;
    padding-block: 0;
    line-height: 1;
  }
  html.article-editorial-paper .article-page { padding-top: 22px; padding-bottom: 48px; }
  html.article-editorial-paper .article-header h1 { font-size: clamp(2.05rem, 6vw, 2.45rem); }
  html.article-editorial-paper .article-tabs { scrollbar-width: none; }
  html.article-editorial-paper .article-tabs::-webkit-scrollbar { display: none; }
  html.article-editorial-paper .article-sources .article-source-list { columns: 1; }
  html.article-editorial-paper .article-sidebar { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  html.article-editorial-paper .article-page { width: min(calc(100% - 40px), 1080px); padding: 16px 0 42px; }
  html.article-editorial-paper .article-shell { padding-inline: 0; }
  html.article-editorial-paper .article-sidebar { width: calc(100% - 26px); margin-left: 13px; }
  html.article-editorial-paper .article-header[data-clarity-primary] { padding-left: 8px; padding-top: 16px; padding-bottom: 9px; }
  html.article-editorial-paper .article-header h1 { max-width: none; font-size: clamp(1.95rem, 8.2vw, 2.12rem); line-height: 1.14; overflow-wrap: normal; }
  html[lang^="zh"].article-editorial-paper .article-header h1 { font-size: clamp(1.8rem, 7.5vw, 2rem); line-height: 1.25; }
  html.article-editorial-paper .article-lede { font-size: 1.04rem; margin-bottom: 8px; }
  html.article-editorial-paper .article-tabs { gap: 26px; }
  html.article-editorial-paper .article-tab-content[data-tab="quick-read"] { margin-top: 12px; }
  html.article-editorial-paper :is(.article-toc, .article-related-section, .article-sources, .article-disclaimer, .article-sidebar-card) { padding-right: 0; padding-left: 0; }
  html.article-editorial-paper .article-table th,
  html.article-editorial-paper .article-table td { padding: 10px 11px; }
}

@media (prefers-reduced-motion: reduce) {
  html.article-editorial-paper *,
  html.article-editorial-paper *::before,
  html.article-editorial-paper *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  html.article-editorial-paper,
  html.article-editorial-paper body,
  html.article-editorial-paper :is(.article-page, .article-layout, .article-shell, .article-header, .article-body, .article-tab-content, .article-toc, .article-sources, .article-disclaimer) {
    background: #fff !important;
  }
  html.article-editorial-paper .article-sources { display: block !important; }
  html.article-editorial-paper .article-header h1 { font-family: var(--font-article-serif); font-size: 24pt; font-weight: 600; }
}
