/* Page canvas shared by the site, language entry points and archived documents. */
:root {
  --page-background: #000000;
  --paper: var(--page-background);
  --night: var(--page-background);
}
html:root, html body {
  background: var(--page-background) !important;
}
#root,
body[data-catalog] #root > :is(div, main):not([role]),
body[data-catalog] #root main,
body > #app, #app > .app-container, .app-container > main > .page {
  background-color: var(--page-background) !important;
}
body[data-catalog] #root > .min-h-screen.bg-gradient-to-br {background-image: none;}
:is(.front-page, .feature-page) > footer {
  background-color: var(--page-background);
}
body:has(> .directory-links), body:has(> [data-edition-entry]) {
  color: #eff5f1;
}
body:has(> .directory-links) :is(main, section, p, ul) a,
body:has(> [data-edition-entry]) > a {color: #82e9b9;}
body:has(> .directory-links) .item small {color: #bec9c2;}

/* The Forex article and its footer share a single content edge. */
.forex-page :is(main, footer) > .container {
  width: min(1280px, calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}
.forex-page main .section {grid-template-columns: minmax(0, 1fr);}
.forex-page footer .risk {width: 100%; max-width: none;}

/* Text on the black canvas in the archived layouts. */
[data-canvas-ink="body"] {color: #e5ebe8 !important;}
[data-canvas-ink="muted"] {color: #b7c2bc !important;}
[data-canvas-ink="link"] {color: #83edbd !important;}

/* Footer text links use the brand color as their hover cue. */
footer :is(a:not(:has(> :is(img, svg):only-child)), summary, .tradfi-footer-toggle) {
  text-decoration: none !important;
}
footer :is(a:not(:has(> :is(img, svg):only-child)), summary, .tradfi-footer-toggle):hover {
  color: var(--market-green, #33FFB5) !important;
}

/* Omit the small captions that precede content headings in the site and archive layouts. */
.section-label,
.closing-label,
.front-page .chapter,
.risk-eyebrow,
.gold-action-eyebrow,
.aft-faq-eyebrow,
.aft-support-eyebrow,
.aft-fx-eyebrow,
.aft-download-eyebrow,
.pp-eyebrow,
.rf-eyebrow,
.rf-calc-eyebrow,
.account-eyebrow,
.ProductHub_eyebrow__qINDT,
.CardStyle2_eyebrow__dq7c7 {
  display: none !important;
}

.section > .section-label + .section-content { grid-column: 1 / -1; }

/* Shared by all pages, including archived layouts with their own important type rules. */
@layer site-letter-spacing {
  *, ::before, ::after, ::marker, ::placeholder, ::file-selector-button {
    letter-spacing: 0 !important;
  }
}

/* Shared note size across the current and archived page templates. */
@layer site-fine-print {
  :root { --fine-print-size: 12px; }
  :is(
    .payment-guidance, .payment-guidance li, .fine, [role="note"],
    .notice, .disclaimer, .disclaimers p, .disclaimer-group p,
    p[class$="-note"], p[class$="-disclosure"], p[class$="-disclaimer"],
    .account-comparison-notes p, .pamm-performance-notice,
    .pm-risk, .pd-risk, .ct-risk, .ctd-risk,
    .field-error, .result-group p, .trust-source, .quote-source, .quote-asof,
    footer .risk, footer .answer p, .footer-disclosures p
  ),
  :is(.payment-guidance, .fine, [role="note"], .notice, .disclaimer,
      p[class$="-note"], .pamm-performance-notice, .footer-disclosures p,
      footer .answer p) :is(p, span, time, strong, em, small, a) {
    font-size: var(--fine-print-size) !important;
  }
}

/* A press should not underline a label, including labels nested inside cards. */
@layer site-press {
  :is(a, button, summary, label, [role="link"], [role="button"], [role="tab"]):active,
  :is(a, button, summary, label, [role="link"], [role="button"], [role="tab"]):active * {
    text-decoration-line: none !important;
  }
}
