/* Shared light/dark control, used by the marketing and retained React pages. */
:root { color-scheme: light; }
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #fff;
  --gray: #b6b6ba;
  --paper: #141414;
  --line: #333336;
  --green: #00cc2d;
  --theme-surface: #141414;
}
.theme-switch {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 4px;
  color: #3c3c3e;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.theme-switch button {
  -webkit-appearance: none;
  appearance: none;
  -webkit-text-fill-color: currentColor;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 12px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: #6e6e70;
  font: inherit;
  cursor: pointer;
  transition: color .15s ease;
}
.theme-switch svg { display: block; width: 20px; height: 20px; flex-shrink: 0; }
.theme-switch button[aria-pressed="true"] {
  color: #3c3c3e;
}
.theme-switch button:hover { color: #3c3c3e; }
.theme-switch button:focus-visible { outline: 2px solid #00841d; outline-offset: 3px; }
html[data-theme="dark"] .theme-switch { color: #fff; }
html[data-theme="dark"] .theme-switch button { color: #8e8e8a; }
html[data-theme="dark"] .theme-switch button[aria-pressed="true"] {
  color: #eeeee9;
}
html[data-theme="dark"] .theme-switch button:hover { color: #fff; }
html[data-theme="dark"] .theme-switch button:focus-visible { outline-color: #00cc2d; }
@media (prefers-reduced-motion: reduce) { .theme-switch button { transition: none; } }
.site-header .header-inner { gap: 28px; }
.site-header .menu-toggle {
  -webkit-appearance: none;
  appearance: none;
  color: var(--ink);
  -webkit-text-fill-color: currentColor;
  background: transparent;
  min-width: 44px;
  min-height: 44px;
}
@media (max-width: 850px) { .site-header .header-inner { gap: 18px; } }
@media (max-width: 800px) {
  .site-header .menu-toggle { display: block; margin-left: auto; padding: 0; font-size: 13px; }
  .site-header .nav { display: none; position: absolute; top: 70px; left: 0; right: 0; margin: 0; padding: 20px 24px; gap: 8px; flex-direction: column; align-items: stretch; background: #fff; border-bottom: 1px solid var(--line); max-height: calc(100vh - 70px); max-height: calc(100dvh - 70px); overflow-y: auto; overscroll-behavior: contain; }
  .site-header .nav a { display: flex; align-items: center; min-height: 44px; width: fit-content; }
  .site-header .nav.open { display: flex; }
}
@media (max-width: 400px) {
  .site-header .header-inner { gap: 12px; padding-inline: 16px; }
  .site-header .brand { font-size: 23px; gap: 6px; }
}

/* Apple report palette: black canvas, white type, neutral panels, green accents. */
html[data-theme="dark"] body { background: #000; color: #fff; }
html[data-theme="dark"] .skip { background: #141414; color: #fff; }
html[data-theme="dark"] .site-header { background: rgb(0 0 0 / var(--header-opacity, .94)); }
html[data-theme="dark"] :is(.brand, .site-header .brand, .menu-toggle) { color: #fff; }
html[data-theme="dark"] .site-header .nav { background: transparent; }
html[data-theme="dark"] .product-nav { background: rgb(0 0 0 / .94); }
html[data-theme="dark"] :is(.product-hero, .product-preview, .hero-video-stage, .feature, .home-news, .footer, .closing, .company-hero, .gray-section, .research-hero, .research-teaser) { background-color: #000; }
html[data-theme="dark"] .page-product :is(#globe, #tradeoffs) .feature-heading { background: #000; }
html[data-theme="dark"] :is(.button, .button.outline) { background: #141414; color: #fff; border-color: #555558; }
html[data-theme="dark"] :is(.button, .button.outline):hover { background: #29292b; border-color: #8e8e93; }
html[data-theme="dark"] :is(.button.green, .button.demo-cta) { background: #00cc2d; color: #000; border-color: #00cc2d; }
html[data-theme="dark"] :is(.button.green, .button.demo-cta):hover { background: #1ada42; color: #000; border-color: #1ada42; }
html[data-theme="dark"] :is(.home-news-category, .news-archive-category) { background: #1d1d1f; color: #fff; }
html[data-theme="dark"] :is(.home-news-copy, .home-news-image, .home-news-view-all) { border-color: #555558; }
/* A clean dark derivative preserves smooth shading and defined wave contours
   without amplifying the light artwork's texture through color inversion. */
html[data-theme="dark"] .page-product :is(.product-hero, .hero-video-stage, .product-preview, .feature)::before,
html[data-theme="dark"] .page-product #tradeoffs::after {
  background-image: url('/assets/hero-green-waves-dark.png');
  filter: brightness(.8);
}
/* The video source and controls follow the resolved site theme. */
html[data-theme="dark"] .hero-video { --ink: #fff; background: #000; }
html[data-theme="dark"] .hero-product-video { background: #000; }
html[data-theme="dark"] :is(.profile-social-link, .profile-social-link:focus-visible) { color: #b6b6ba; }
html[data-theme="dark"] .profile-social-link:hover { background: #1d1d1f; color: #fff; }
html[data-theme="dark"] .partner-logo span { color: #fff; }
/* Advisor logos sit directly on the page; only their dark artwork adapts. */
html[data-theme="dark"] .advisor-logo { background: transparent; }
html[data-theme="dark"] .advisor-logo[data-dark-logo="wordmark"] img { filter: url(#advisor-light-wordmark); }
html[data-theme="dark"] .advisor-logo[data-dark-logo="mixed"] img { filter: url(#advisor-light-lettering); }
html[data-theme="dark"] .advisor-logo-light { display: none; }
html[data-theme="dark"] .advisor-logo-dark { display: block; }
/* Partner artwork shares the advisor treatment, keeping colored marks intact. */
html[data-theme="dark"] .partner-logo { background: transparent; }
html[data-theme="dark"] .partner-logo[data-dark-logo="wordmark"] img { filter: url(#partner-light-wordmark); }
html[data-theme="dark"] .partner-logo[data-dark-logo="mixed"] img { filter: url(#partner-light-lettering); }
html[data-theme="dark"] .partner-logo-light { display: none; }
html[data-theme="dark"] .partner-logo-dark { display: block; }
html[data-theme="dark"] .person-logos { background: #f5f5f7; padding: 10px; border-radius: 6px; }
html[data-theme="dark"] .page-news main { background: #000; color: #fff; }
html[data-theme="dark"] .news-archive-heading { background: #000; box-shadow: none; border-bottom: 1px solid #333336; }
html[data-theme="dark"] :is(.news-archive-copy, .news-archive-image) { border-color: #555558; }
html[data-theme="dark"] .contact-form :is(input:not([type="hidden"]), textarea) { background: #141414; color: #fff; border-color: #555558; }
html[data-theme="dark"] .contact-form :is(input, textarea)::placeholder { color: #b6b6ba; }
html[data-theme="dark"] .contact-form :is(input, textarea):focus-visible { outline-color: #00cc2d; }
html[data-theme="dark"] ::selection { background: #00cc2d; color: #000; }
/* Keep mobile navigation neutral even when the blue globe passes beneath it. */
@media (max-width: 800px) {
  .site-header, .product-nav { background: #fff; }
  html[data-theme="dark"] :is(.site-header, .site-header .nav, .product-nav) { background: #000; }
}
/* Readable foreground on the shared bright-green action buttons in both themes. */
:is(.button.green, .button.demo-cta),
:is(.button.green, .button.demo-cta):hover { color: #000; }
