/* Light keeps the original palette. The early head script selects the visitor's saved/system theme. */
html { color-scheme:light; }
.theme-toggle { display:grid; place-items:center; flex-shrink:0; width:44px; height:44px; padding:0; border:1px solid #cedce5; border-radius:50%; background:#fff; color:var(--ink); cursor:pointer; }
.theme-toggle:hover { background:#eaf3f9; border-color:#99b9ce; }
.theme-toggle svg { width:20px; height:20px; }
.theme-toggle .theme-icon-sun { display:none; }
.mobile-menu .theme-toggle { display:flex; align-items:center; width:100%; height:auto; min-height:44px; gap:12px; padding:12px; margin-block:4px 8px; border-radius:10px; background:#f1f5f7; font-size:13px; }
.theme-toggle-label { flex:1; text-align:left; }
.theme-toggle-state { color:var(--muted); font-size:11px; }
.theme-toggle[hidden] { display:none; }
@media(max-width:600px) {
  .header-actions .theme-toggle { display:none; }
}

html[data-theme="dark"] {
  color-scheme:dark;
  --paper:#242b33;
  --ink:#edf3f8;
  --muted:#b8c6d1;
  --blue:#94c9ee;
  --line:#4c5b69;
  --dark-surface:#2f3740;
  --dark-soft:#35414d;
  --dark-field:#252e38;
  --dark-button-text:#1f2a33;
}
html[data-theme="dark"] ::selection { background:#f6d66d; color:#1f2a33; }
html[data-theme="dark"] .theme-toggle { background:var(--dark-surface); border-color:var(--line); }
html[data-theme="dark"] .theme-toggle:hover { background:var(--dark-soft); border-color:var(--blue); }
html[data-theme="dark"] .theme-toggle .theme-icon-moon { display:none; }
html[data-theme="dark"] .theme-toggle .theme-icon-sun { display:block; }
html[data-theme="dark"] .mobile-menu .theme-toggle { background:var(--dark-soft); color:var(--ink); }

/* Navigation and account controls. */
html[data-theme="dark"] .site-header { background:#242b33f5; border-bottom-color:var(--line); }
html[data-theme="dark"] .desktop-nav > a,
html[data-theme="dark"] .platform-menu > summary { color:var(--muted); }
html[data-theme="dark"] .desktop-nav > a:hover,
html[data-theme="dark"] .platform-menu[open] > summary { color:var(--blue); }
html[data-theme="dark"] .platform-dropdown,
html[data-theme="dark"] .mobile-menu nav { background:var(--dark-surface); border-color:var(--line); box-shadow:0 18px 55px #11182055; }
html[data-theme="dark"] .menu-label,
html[data-theme="dark"] .platform-menu-link small,
html[data-theme="dark"] .platform-menu-link b { color:var(--muted); }
html[data-theme="dark"] .platform-dropdown .platform-menu-link:hover,
html[data-theme="dark"] .platform-menu-link[aria-current="page"],
html[data-theme="dark"] .mobile-menu nav a:hover,
html[data-theme="dark"] .mobile-menu .mobile-contact { background:var(--dark-soft); }
html[data-theme="dark"] .header-contact,
html[data-theme="dark"] .mi-auth-submit,
html[data-theme="dark"] .element-button,
html[data-theme="dark"] .contact-cta,
html[data-theme="dark"] .skip-link { background:var(--blue); border-color:var(--blue); color:var(--dark-button-text); }
html[data-theme="dark"] .header-contact:hover,
html[data-theme="dark"] .mi-auth-submit:hover,
html[data-theme="dark"] .element-button:hover,
html[data-theme="dark"] .contact-cta:hover { background:#b8dfff; border-color:#b8dfff; }
html[data-theme="dark"] .mi-auth-submit span { color:inherit; }
html[data-theme="dark"] .mi-auth-card,
html[data-theme="dark"] .recovery-card { background:var(--dark-surface); border-color:var(--line); box-shadow:0 16px 54px #10182030; }
html[data-theme="dark"] .mi-auth .mi-auth-card { background:#242b33; }
html[data-theme="dark"] .mi-auth-tabs { background:var(--dark-field); }
html[data-theme="dark"] .mi-auth-tabs a { color:var(--muted); }
html[data-theme="dark"] .mi-auth-tabs a[aria-current="true"] { background:#3d4a58; border-color:#667d8f; }
html[data-theme="dark"] .mi-auth-heading p,
html[data-theme="dark"] .auth-bottom,
html[data-theme="dark"] .mi-auth-ready .registration-progress { color:var(--muted); }
html[data-theme="dark"] .auth-field label { color:#d0dce5; }
html[data-theme="dark"] .auth-field input { background:var(--dark-field); border-color:#627486; }
html[data-theme="dark"] .auth-field input::placeholder { color:#a6bac9; }
html[data-theme="dark"] .auth-field input:focus { background:#293744; border-color:var(--blue); box-shadow:0 0 0 3px #94c9ee25; }
html[data-theme="dark"] .mi-auth-forgot,
html[data-theme="dark"] .mi-auth-ready .registration-back { color:var(--blue); }
html[data-theme="dark"] .password-toggle { color:var(--muted); }
html[data-theme="dark"] .password-toggle:hover,
html[data-theme="dark"] .password-toggle[aria-pressed="true"] { background:var(--dark-soft); color:var(--blue); }
html[data-theme="dark"] .auth-bottom { border-color:var(--line); }
html[data-theme="dark"] .registration-progress i { background:var(--line); }
html[data-theme="dark"] .registration-progress i.is-current { background:var(--blue); }
html[data-theme="dark"] .field-validation-error,
html[data-theme="dark"] .validation-summary-errors { color:#ffb7be; }
html[data-theme="dark"] .auth-field .input-validation-error { background:#4a3039; border-color:#e79ba5; }

/* Main page: charcoal surfaces, quiet product tints and unchanged reference logo artwork. */
html[data-theme="dark"] .hero-surface { background:var(--dark-surface); }
html[data-theme="dark"] .hero-surface::before { border-color:#3c4855; }
html[data-theme="dark"] .hero-copy .eyebrow,
html[data-theme="dark"] .hero-copy > p,
html[data-theme="dark"] .hero-footnote,
html[data-theme="dark"] .section-intro .eyebrow,
html[data-theme="dark"] .card-topline,
html[data-theme="dark"] .card-more,
html[data-theme="dark"] .life-copy .eyebrow,
html[data-theme="dark"] .life-photo figcaption,
html[data-theme="dark"] .feature-number,
html[data-theme="dark"] .video-copy .eyebrow { color:var(--muted); }
html[data-theme="dark"] .title-spark { color:var(--yellow); }
html[data-theme="dark"] .status-dot { box-shadow:0 0 0 4px #94c9ee18; }
html[data-theme="dark"] .art-orbit { border-color:#70879a; }
html[data-theme="dark"] .art-note { background:#3c4855; border-color:#66798a; }
html[data-theme="dark"] .note-icon { background:var(--yellow); color:#392f18; }
html[data-theme="dark"] .hero-footnote { border-color:var(--line); }
html[data-theme="dark"] .hero-footnote i { background:#91a7b7; }
html[data-theme="dark"] .circle-arrow { border-color:#839bad; }
html[data-theme="dark"] .text-link:hover .circle-arrow { background:var(--blue); border-color:var(--blue); color:var(--dark-button-text); }
html[data-theme="dark"] .network-caption strong { color:var(--ink); }
html[data-theme="dark"] .network-logo { background:var(--dark-surface); border-color:var(--line); color:var(--ink); isolation:isolate; }
/* Inversion and screen blending remove baked-in white canvases without changing the source logos. */
html[data-theme="dark"] .network-logo img { mix-blend-mode:screen; filter:grayscale(1) invert(1) hue-rotate(180deg) brightness(1.15); opacity:.82; }
html[data-theme="dark"] .network-logo:hover { background:var(--dark-soft); }
html[data-theme="dark"] .network-logo:hover img { filter:grayscale(0) invert(1) hue-rotate(180deg) brightness(1.15); opacity:1; }
html[data-theme="dark"] .platform-resident { background:#2d4050; }
html[data-theme="dark"] .platform-team { background:#3b364d; }
html[data-theme="dark"] .platform-company { background:#45402f; }
html[data-theme="dark"] .card-symbol,
html[data-theme="dark"] .card-primary { border-color:#ffffff30; }
html[data-theme="dark"] .life-points b { background:#374b5c; }
html[data-theme="dark"] .feature-section { background:#29323c; }
html[data-theme="dark"] .feature-grid { background:var(--line); border-color:var(--line); }
html[data-theme="dark"] .feature-grid article,
html[data-theme="dark"] .video-surface { background:var(--dark-surface); }
html[data-theme="dark"] .video-frame video { background:#202730; }
html[data-theme="dark"] .faq-intro { background:var(--dark-surface); border-color:var(--line); }
html[data-theme="dark"] .faq-intro .eyebrow,
html[data-theme="dark"] .faq-number,
html[data-theme="dark"] .faq-access-list small,
html[data-theme="dark"] .faq-access-list a > span { color:var(--muted); }
html[data-theme="dark"] .faq-list details { background:var(--dark-surface); border-color:var(--line); }
html[data-theme="dark"] .faq-list details:hover { background:var(--dark-soft); border-color:#728b9e; }
html[data-theme="dark"] .faq-list details[open]:not([data-expanded="false"]) { background:#354351; border-color:#80b5d9; box-shadow:0 10px 26px #11182020; }
html[data-theme="dark"] .faq-toggle { background:var(--dark-field); border-color:#7892a6; color:#d0e0ec; }
html[data-theme="dark"] .faq-list details[open]:not([data-expanded="false"]) .faq-toggle { background:var(--blue); border-color:var(--blue); color:var(--dark-button-text); }
html[data-theme="dark"] .faq-access-list a { background:#283541; border-color:#60788c; }
html[data-theme="dark"] .faq-access-list a:hover { background:#3a5063; border-color:var(--blue); }
html[data-theme="dark"] .contact-surface { background:#403e33; }
html[data-theme="dark"] .contact-surface .eyebrow,
html[data-theme="dark"] .contact-details > span { color:#ead695; }
html[data-theme="dark"] .contact-surface h2 em { color:var(--yellow); }
html[data-theme="dark"] .contact-description { color:#d5cfb9; }
html[data-theme="dark"] .contact-details { border-color:#776e4d; }
html[data-theme="dark"] .site-footer { background:var(--dark-surface); }

/* Product pages, recovery and long legal documents use the same readable surfaces. */
html[data-theme="dark"] .mi-subpage { --page-tint:#2f3740; --page-soft:#2b3540; }
html[data-theme="dark"] .mi-subpage.theme-team { --page-tint:#3b364d; --page-soft:#302e3c; }
html[data-theme="dark"] .mi-subpage.theme-company { --page-tint:#45402f; --page-soft:#38362d; }
html[data-theme="dark"] .mi-breadcrumbs,
html[data-theme="dark"] .subpage-nav a,
html[data-theme="dark"] .subpage-hero .mi-intro > p:first-child,
html[data-theme="dark"] .subpage-hero .mv-intro > p:first-child,
html[data-theme="dark"] .mi-video-label,
html[data-theme="dark"] .legal-heading .eyebrow { color:var(--muted); }
html[data-theme="dark"] .mi-breadcrumbs [aria-current="page"] { color:var(--ink); }
html[data-theme="dark"] .subpage-nav a { border-color:var(--line); }
html[data-theme="dark"] .subpage-nav a:hover { background:var(--dark-soft); border-color:var(--blue); color:var(--blue); }
html[data-theme="dark"] .mi-heading-icon,
html[data-theme="dark"] .recovery-symbol { background:#374b5c; border-color:#657f94; }
html[data-theme="dark"] .subpage-hero > figure::before { background:#ffffff0b; }
html[data-theme="dark"] .subpage-card,
html[data-theme="dark"] .video-consent,
html[data-theme="dark"] .legal-document { background:var(--dark-surface); border-color:var(--line); }
html[data-theme="dark"] .subpage-card:hover { border-color:#7ba4bf; }
html[data-theme="dark"] .subpage-section.mv-summary,
html[data-theme="dark"] .subpage-section.mv-contact,
html[data-theme="dark"] .subpage-section.mi-warm { border-color:var(--line); }
html[data-theme="dark"] .video-preview-button { background:#202730; }
html[data-theme="dark"] .video-preview-play { background:#202730dd; }
html[data-theme="dark"] .video-action-label { background:#202730e6; }
html[data-theme="dark"] .legal-heading { background:var(--dark-surface); }
html[data-theme="dark"] .legal-document p,
html[data-theme="dark"] .legal-document li { color:var(--muted); }
html[data-theme="dark"] .table-scroll th { background:#3b4b5b; }
html[data-theme="dark"] .recovery-back { color:var(--blue); }
