/* Light / dark theme. Dark is the default look (base.css).
   Light mode swaps the page tokens; the header, footer card, TV preview, video player
   and the cream "paper" cards keep their original colours so the logo and brand stay intact. */

/* Keep our own colours even when the phone tries to adjust them */
html[data-theme="light"], html[data-theme="light"] body { forced-color-adjust: none; }

/* Instant switch: no element animates its colour while the theme changes */
html.theme-switching *, html.theme-switching *::before, html.theme-switching *::after { transition: none !important; }

/* ---------- Toggle button ---------- */
.site-nav { margin-left: auto; }
.site-header__tools { display: flex; align-items: center; gap: 10px; flex: none; }
.theme-btn { flex: none; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0; background: transparent; color: var(--cream); border: 1px solid rgba(244, 240, 232, .25); border-radius: 999px; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: border-color .15s, color .15s; }
.theme-btn:hover { border-color: var(--orange); color: var(--orange); }
.theme-btn svg { display: block; }
html[data-theme="light"] .theme-btn__sun, html:not([data-theme="light"]) .theme-btn__moon { display: none; }
@media (max-width: 899px) {
  .theme-btn { width: 48px; height: 48px; border-radius: 6px; border-color: rgba(244, 240, 232, .2); }
}

/* ---------- Light tokens ---------- */
html[data-theme="light"] {
  color-scheme: light dark;
  background-color: #F7F4EE;
  --navy: #F7F4EE; --navy-2: #FFFFFF; --navy-3: #EFEAE0; --navy-4: #E4DED2;
  --cream: #0A1D2E; --cream-2: #16354F;
  --mist: #3A4856; --mist-2: #4A5866; --mist-3: #5B6977;
  --line: rgba(10, 29, 46, .10); --line-2: rgba(10, 29, 46, .22);
  --orange-ink: #A3530B; --on-orange: #0A1D2E;
}

/* Areas that keep the original dark / paper colours */
html[data-theme="light"] :is(site-header, .site-footer__card, .cert, .doc, .ask, .tv, .player, .hero, .investor--named) {
  --navy: #0A1D2E; --navy-2: #10293F; --navy-3: #0E2438; --navy-4: #16354F;
  --cream: #F4F0E8; --cream-2: #E6E1D6;
  --mist: #C9D2DB; --mist-2: #B4C0CC; --mist-3: #93A3B3;
  --line: rgba(244, 240, 232, .08); --line-2: rgba(244, 240, 232, .16);
}
html[data-theme="light"] :is(site-header, .tv, .player, .hero, .investor--named) { color: var(--cream); color-scheme: dark; }
html[data-theme="light"] main .eps__watch { color: var(--orange-ink); }
html[data-theme="light"] :is(.cert, .doc, .site-footer__card) { box-shadow: 0 0 0 1px rgba(10, 29, 46, .12); }

/* Text on orange stays dark navy */
html[data-theme="light"] :is(.btn--primary, .btn--primary:hover, .investor__tag, .tab[aria-selected="true"], .band) { color: var(--on-orange); }
html[data-theme="light"] ::selection { color: var(--on-orange); }

/* Orange text gets a deeper shade so it stays readable on the light page */
html[data-theme="light"] :is(main, .modal) :is(.kicker, .accent, .step-card__n, .notify-done, .eps__n, .contact-card__kicker, .contact-card__email, .panel__count, .done__title, .note__title, .text-link, .faq summary:hover) { color: var(--orange-ink); }
html[data-theme="light"] :is(main, .modal) a:not(.btn):not(.cert__btn) { color: var(--orange-ink); }
html[data-theme="light"] :is(main, .modal) a:not(.btn):not(.cert__btn):hover { color: var(--cream); }
html[data-theme="light"] main .ticks li::before,
html[data-theme="light"] main .faq summary::after { color: var(--orange-ink); }
html[data-theme="light"] :is(main, .modal) .btn--outline { color: var(--orange-ink); border-color: var(--orange-ink); }
html[data-theme="light"] :is(main, .modal) .btn--outline:hover { background: var(--orange); border-color: var(--orange); color: var(--on-orange); }
html[data-theme="light"] :is(main, .modal) .btn--ghost { border-color: rgba(10, 29, 46, .3); }
html[data-theme="light"] :is(main, .modal) .btn--ghost:hover { border-color: var(--orange-ink); color: var(--orange-ink); }

/* Hairlines and borders that were cream-tinted */
html[data-theme="light"] .eps { border-color: rgba(10, 29, 46, .12); }
html[data-theme="light"] .steps__bar { background: rgba(10, 29, 46, .12); }
html[data-theme="light"] :is(main, .modal) .icon-btn { border-color: rgba(10, 29, 46, .25); }
html[data-theme="light"] .tab { border-color: rgba(10, 29, 46, .3); }
html[data-theme="light"] .tab[aria-selected="true"] { border-color: var(--orange); }

/* Messages */
html[data-theme="light"] :is(main, .modal) .form-error { color: #B3261E; }
html[data-theme="light"] .note__body { color: var(--ink-2); }

/* Photo shades fade into the light page instead of navy */
html[data-theme="light"] .intro__shade { background:
  linear-gradient(90deg, var(--navy) 0%, rgba(247, 244, 238, .92) 34%, rgba(247, 244, 238, .6) 70%, rgba(247, 244, 238, .72) 100%),
  linear-gradient(180deg, rgba(247, 244, 238, .35) 0%, rgba(247, 244, 238, 0) 30%, rgba(247, 244, 238, 0) 72%, var(--navy-2) 100%); }
html[data-theme="light"] .page-hero__shade { background: linear-gradient(180deg, rgba(247, 244, 238, .6) 0%, rgba(247, 244, 238, .82) 60%, var(--navy) 100%); }
@media (max-width: 700px) {
  html[data-theme="light"] .intro__shade { background: linear-gradient(180deg, rgba(247, 244, 238, .78) 0%, rgba(247, 244, 238, .9) 55%, var(--navy-2) 100%); }
}
html[data-theme="light"] .modal { box-shadow: 0 20px 60px rgba(10, 29, 46, .25); }
