/* Opt-in only: normal mode keeps every existing authored color and layout. */
html[data-site-theme="dark"] {
  color-scheme: dark;
  background: var(--site-dark-background,#363534);
}
html[data-site-theme="dark"] body:is(.motion-lp,.detail-page) {
  --theme-background: var(--site-dark-background,#363534);
  --theme-foreground: #fff;
  --theme-secondary: #e0dedb;
  --theme-line: #777470;
  --muted: var(--theme-secondary);
  --line: var(--theme-line);
  --seminar-ink: var(--theme-foreground);
  --seminar-muted: var(--theme-secondary);
  --seminar-paper: var(--theme-background);
  --seminar-line: var(--theme-line);
  background: var(--theme-background);
  color: var(--theme-foreground);
}
/* Whole-page surfaces, including phone product cards and expanded accordions. */
html[data-site-theme="dark"] body:is(.motion-lp,.detail-page) :is(
  [data-lp-section],.site-header,.hero-stage,.hero-scroll,.footer,.menu-dialog,
  .events-section,.cases-section,.upcoming-item,.event-card,.case-card,
  .product-card,.faq-list details,.story-process li,.plan-grid article,
  .example-grid article,.detail-diagram,.detail-product .detail-image,
  .seminar-hero,.seminar-overview,.seminar-benefit,.seminar-status,
  .seminar-mobile-action,.mobile-cta,.content-dialog,.mobile-menu-toggle.is-scrolled
) {
  background: var(--theme-background);
  color: var(--theme-foreground);
  border-color: var(--theme-line);
}
html[data-site-theme="dark"] body:is(.motion-lp,.detail-page) :is(
  h1,h2,h3,h4,summary,.support-closing,.story-copy h3,.brand-caption,.motion-description
) { color: var(--theme-foreground); }
html[data-site-theme="dark"] body:is(.motion-lp,.detail-page) :is(
  .eyebrow,.section-heading>.eyebrow,.benefit-number,.step-number,
  .upcoming-date,.upcoming-location,.event-date,.event-ended,
  .event-card .entry-body,.case-card .entry-body,.case-process dt,.case-process dd,
  .cost-checklist p,.plan-grid p,.plan-scope,.company-fit p,
  .detail-breadcrumb,.detail-heading>p,.detail-content p,.detail-facts dt,
  .contact-phone span,.support-video-link,.support-links a,.support-links button,
  .news-toggle,.count-total,.field
) { color: var(--theme-secondary); }
html[data-site-theme="dark"] body:is(.motion-lp,.detail-page) :is(
  .case-records,.case-record,.story-process li,.inline-steps li>span,
  .event-ended,.seminar-detail-banner,.case-card,.entry-link,.text-link,.event-action
) { border-color: var(--theme-line); }
html[data-site-theme="dark"] body:is(.motion-lp,.detail-page) :is(
  .reference-photo,.benefit-photo,.card-photo,.seminar-banner
) { background: var(--theme-background); }
html[data-site-theme="dark"] body:is(.motion-lp,.detail-page) .brand img {
  filter: url(#brand-white);
  mix-blend-mode: normal;
}
html[data-site-theme="dark"] body:is(.motion-lp,.detail-page) :is(.plus:before,.plus:after) {
  background: var(--theme-secondary);
}
html[data-site-theme="dark"] body:is(.motion-lp,.detail-page) :is(
  .story-process li+li:before,.detail-steps li:before,.seminar-checks li:before
) { color: var(--theme-secondary); }
html[data-site-theme="dark"] body:is(.motion-lp,.detail-page) .inline-steps li:not(:last-child):before {
  background: var(--theme-line);
}
/* White primary actions and white-outline secondary actions keep their contrast. */
html[data-site-theme="dark"] body:is(.motion-lp,.detail-page) :is(.button-white,.button-dark,.seminar-button) {
  background: #fff;
  color: #363534;
  border: 1px solid #fff;
}
html[data-site-theme="dark"] body:is(.motion-lp,.detail-page) :is(.button-outline,.button-ghost,.product-resource-link) {
  background: transparent;
  color: #fff;
  border-color: #d2cfca;
}
html[data-site-theme="dark"] body:is(.motion-lp,.detail-page) :is(.entry-link,.text-link,.event-action) {
  color: #fff;
}
/* Menu branding uses the caption underline defined in styles.css. */
html[data-site-theme="dark"] body:is(.motion-lp,.detail-page) :is(a,button,summary,input):focus-visible:not(.menu-dialog .brand) {
  outline: 2px solid #fff;
  outline-offset: 5px;
}
html[data-site-theme="dark"] body:is(.motion-lp,.detail-page) .product-resource-link:focus-visible {
  background: #4b4946;
}
html[data-site-theme="dark"] body:is(.motion-lp,.detail-page) .field input {
  background: var(--theme-background);
  color: #fff;
  border-color: #a8a49e;
}
html[data-site-theme="dark"] body:is(.motion-lp,.detail-page) .field input::placeholder { color: #cfccc7; }
html[data-site-theme="dark"] body:is(.motion-lp,.detail-page) input { accent-color: #fff; }
@media(hover:hover) and (pointer:fine) {
  html[data-site-theme="dark"] body:is(.motion-lp,.detail-page) :is(.button-white,.button-dark,.seminar-button):hover {
    background: #e0dedb;
    color: #363534;
    border-color: #e0dedb;
  }
  html[data-site-theme="dark"] body:is(.motion-lp,.detail-page) :is(.button-outline,.button-ghost,.product-resource-link):hover {
    background: #fff;
    color: #363534;
    border-color: #fff;
  }
  html[data-site-theme="dark"] body:is(.motion-lp,.detail-page) :is(summary,.entry-link,.text-link,.event-action):hover { color: #fff; }
}
