/* Follow the system preference, including native form controls. */
:root{color-scheme:light dark}
@media(prefers-color-scheme:dark){
 :root:not([data-fd-theme="light"]){--cream:#111b17;--ink:#e7efe8;--muted:#b5c4b8;--lime:#d4ed8b;--orange:#f4b18a;--line:#405348}
 :root:not([data-fd-theme="light"]) body{background:var(--cream);color:var(--ink)}
 :root:not([data-fd-theme="light"]) .lab{background:#17251d}
 :root:not([data-fd-theme="light"]) .lab-tabs button{background:#293e30;color:var(--ink)}
 :root:not([data-fd-theme="light"]) :is(.skip,.filters button.active,.lab-tabs button[aria-selected=true]){background:var(--lime);color:#163c2f}
 :root:not([data-fd-theme="light"]) :is(input,textarea,select,dialog){color:var(--ink);background:#1c2b23;border-color:var(--line)}
 :root:not([data-fd-theme="light"]) :is(input,textarea)::placeholder{color:#aebdb1;opacity:1}
 :root:not([data-fd-theme="light"]) :is(.lesson-card,.lab-panel,.lab-controls,.quiz-card,.crypto-card,.wallet-card,.crypto-quiz-card,.investor-profile,.re-card,.re-cash,.edition-card,.news-card,.question-card,.markets-grid article,.practice-card,.coverage-grid article,.reading-example,.desk-grid article,.support-console,.support-console article,.download-card,.feedback-box,.lesson-directory li,.donation-card,.donation-address,.tutor-panel){background:#1c2b23;color:var(--ink);border-color:var(--line)}
 :root:not([data-fd-theme="light"]) :is(.takeaway,.lesson-takeaway,.first-party,.newsletter-note,.news-alert,.markets-notice,.source-note,.re-warning,.support-notice,.download-card .release-warning,.fin-message.notice){background:#383023;color:#f2dfbf;border-color:#8b744c}
 :root:not([data-fd-theme="light"]) :is(.tutor-detail,.tutor-engine-row>span,.tutor-status-row,.tutor-speech button,.tutor-footnote,.fin-message-meta span){color:var(--muted)}
 :root:not([data-fd-theme="light"]) :is(.tutor-settings select,.tutor-speech select,.fin-input-row,.tutor-prompts button,.tutor-engine-row button,.support-console select,.support-console textarea,.practice-card input,.re-form input,.news-controls input,.feedback-box textarea){background:#26392d;color:var(--ink);border-color:var(--line)}
 :root:not([data-fd-theme="light"]) #fin-input{color:var(--ink)}
 :root:not([data-fd-theme="light"]) :is(.fin-message.assistant,.news-category,.lesson-directory li,.crypto-options button,.help-topics button,.support-controls button,.desk-grid button,.news-filters button){background:#293e30;color:var(--ink);border-color:var(--line)}
 :root:not([data-fd-theme="light"]) :is(.button.dark,.button.lime,.fd-passkey-button,.contact-card button,.news-filters button[aria-pressed=true]){background:var(--lime);color:#163c2f}
 :root:not([data-fd-theme="light"]) .button.dark:hover{background:#e3f3b8;color:#163c2f}
 :root:not([data-fd-theme="light"]) :is(.contact-card,.membership,.lab-result,.re-result,.wallet-band,.quiz-band,.closing,.tutor-header,.fin-message.user,.tutor-launch){background:#173c2d;color:#f0f5ed;border-color:#628267}
 :root:not([data-fd-theme="light"]) :is(.contact-card,.membership,.lab-result,.re-result,.wallet-band,.quiz-band,.closing) :is(p,h2,h3,strong){color:#e7efe8}
 :root:not([data-fd-theme="light"]) .fin-message-meta button{color:#d4ed8b}
 :root:not([data-fd-theme="light"]) :is(.tutor-settings,.tutor-speech,.fin-message-meta,.financefd-about){border-color:var(--line)}
 :root:not([data-fd-theme="light"]) .pwa-status{background:#293e30;color:var(--ink)}
 :root:not([data-fd-theme="light"]) :is(.re-ribbon,.crypto-ribbon,.scam-banner,thead){background:#293e30;color:var(--ink)}
 :root:not([data-fd-theme="light"]) .crypto-options button[data-correct=true]{background:#254b32;color:#e7f4da}
 :root:not([data-fd-theme="light"]) .crypto-options button[data-wrong=true]{background:#57322c;color:#ffe4d8}
 :root:not([data-fd-theme="light"]) .financefd-about a{text-decoration:underline;text-underline-offset:4px}
 :root:not([data-fd-theme="light"]) :focus-visible{outline-color:#f4b18a}
}

/* Keep pale illustrations legible while the surrounding page follows dark mode. */
.lesson-visual,.habit-card,.lesson-sticker,.crypto-entry-art,.re-art{color:#163c2f}
.lesson-visual .lesson-number,.habit-card strong,.lesson-sticker strong,.re-art strong,.re-art p{color:#163c2f}.crypto-entry-art b{background:#fffdf4;border-color:#163c2f;color:#163c2f}.crypto-entry-art b:last-child{background:#d4ed8b}.crypto-entry-art>span{color:#42633d}
@media(prefers-color-scheme:dark){:root:not([data-fd-theme="light"]) .progress-account-controls{background:#1c2b23;color:var(--ink);border-color:var(--line)}:root:not([data-fd-theme="light"]) .progress-account-controls button:hover{background:#293e30}:root:not([data-fd-theme="light"]) .lab-controls output{background:#293e30;color:var(--ink)}}

@media(prefers-color-scheme:dark){:root:not([data-fd-theme="light"]) .growth-card,:root:not([data-fd-theme="light"]) .growth-card h2,:root:not([data-fd-theme="light"]) .growth-card .card-top,:root:not([data-fd-theme="light"]) .growth-card .chart-label{color:#163c2f}}

.crypto-entry-art,.ledger-card{--ink:#163c2f;--cream:#fffdf4;color:#163c2f}

/* Footer utilities must wrap before they can widen the page at tablet sizes. */
footer.section-wrap{flex-wrap:wrap;gap:1rem 2rem;align-items:flex-start}footer.section-wrap>*{min-width:0}footer.section-wrap .fd-policy-update{flex-basis:100%;max-width:78ch}footer.section-wrap .footer-note{flex:1 1 360px}
/* Stack the illustrated hero before its fixed artwork outgrows a tablet column. */
@media(min-width:761px) and (max-width:1000px){.hero,.crypto-hero{grid-template-columns:minmax(0,1fr)}.hero-art{width:440px;max-width:100%;justify-self:center}.crypto-art{width:min(440px,100%);justify-self:center}}

@media(prefers-color-scheme:dark){:root:not([data-fd-theme="light"]) .lab .section-heading>p,:root:not([data-fd-theme="light"]) .lab .range-ends{color:#c4d2c4}:root:not([data-fd-theme="light"]) .donation-tabs{background:#293e30}:root:not([data-fd-theme="light"]) .donation-tabs button{color:#e7efe8}:root:not([data-fd-theme="light"]) .donation-tabs button[aria-selected=true]{background:#d4ed8b;color:#163c2f}}

.fd-social-links{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem 1.5rem;margin:.75rem 0}.fd-social-x-link{display:inline-flex;align-items:center;gap:.4rem}.fd-social-x-mark{display:block;width:1rem;height:1rem;flex:none;fill:#000}@media(prefers-color-scheme:dark){:root:not([data-fd-theme="light"]) .fd-social-x-mark{fill:#fff}}.fd-social-item{display:flex;align-items:center;gap:.5rem;min-height:2.25rem}.fd-social-platform{font-size:.85rem;font-weight:700;color:var(--muted,#68746c)}.fd-social-profile{display:flex;align-items:center;gap:.65rem}.fd-snapcode-link{display:inline-flex;align-items:center;justify-content:center;width:112px;height:112px;flex:none;overflow:hidden;border-radius:12px}.fd-snapcode-link img{display:block;width:100%;height:100%;object-fit:cover}

@media(max-width:600px){.fd-social-links{gap:.75rem 1rem}.fd-social-item{flex-wrap:wrap}}

:root[data-fd-theme="light"]{color-scheme:light}
@media(prefers-reduced-motion:reduce){:root:not([data-fd-motion="full"]) *, :root:not([data-fd-motion="full"]) *::before, :root:not([data-fd-motion="full"]) *::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
:root[data-fd-motion="reduce"] *, :root[data-fd-motion="reduce"] *::before, :root[data-fd-motion="reduce"] *::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
