/*
 * Final dark-theme layer. It is loaded after every page-specific stylesheet,
 * so regular site pages share one palette. The isolated game play template
 * does not load this file. Images, video previews, and canvases are untouched.
 */

html[data-theme="dark"] {
  --offer-navy: var(--text);
  --about-lilac: var(--card);
  --about-mint: var(--card);
  --about-peach: var(--card);
  --audience-warm: var(--card-hover);
  --audience-warm-strong: var(--accent);
  --audience-green: var(--card);
  --audience-blue: var(--card);
}

html[data-theme="dark"] body {
  background: var(--bg);
  color: var(--text);
}

html[data-theme="dark"] :where(h1, h2, h3, h4, h5, h6) {
  color: var(--text);
}

html[data-theme="dark"] ::selection {
  background: var(--subscription-primary);
  color: #ffffff;
}

/* Header, navigation, footer, and shared actions. */

html[data-theme="dark"] .site-header,
html[data-theme="dark"] .site-footer {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .site-nav .site-nav-link,
html[data-theme="dark"] .site-nav .site-nav-button,
html[data-theme="dark"] .site-footer,
html[data-theme="dark"] .site-footer a,
html[data-theme="dark"] .site-footer-link,
html[data-theme="dark"] .site-footer__email {
  color: var(--muted);
}

html[data-theme="dark"] .site-nav .site-nav-link:hover,
html[data-theme="dark"] .site-nav .site-nav-button:hover,
html[data-theme="dark"] .site-footer a:hover,
html[data-theme="dark"] .site-footer-link:hover,
html[data-theme="dark"] .site-footer__email:hover {
  background: var(--card-hover);
  color: var(--text);
}

html[data-theme="dark"] .site-nav .site-nav-subscription,
html[data-theme="dark"] .subscription-cta-button {
  border-color: transparent;
  background: var(--subscription-primary);
  color: var(--subscription-primary-text);
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.18);
}

html[data-theme="dark"] .site-nav .site-nav-subscription:hover,
html[data-theme="dark"] .subscription-cta-button:hover {
  background: var(--subscription-dark);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .site-nav .account-nav-button {
  border-color: transparent;
  background: var(--account);
  color: var(--account-text);
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.16);
}

html[data-theme="dark"] .site-nav .account-nav-button:hover {
  background: var(--account-hover);
  color: var(--account-text);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

html[data-theme="dark"] .site-nav-count {
  background: var(--counter);
  color: var(--counter-text);
  box-shadow: none;
}

html[data-theme="dark"] .site-menu-toggle,
html[data-theme="dark"] .site-nav .theme-toggle {
  border-color: var(--line);
  background: var(--card);
  color: var(--text);
  box-shadow: none;
}

html[data-theme="dark"] .site-menu-toggle:hover,
html[data-theme="dark"] .site-nav .theme-toggle:hover {
  border-color: var(--accent);
  background: var(--card-hover);
  color: var(--text);
  box-shadow: none;
}

html[data-theme="dark"] .site-nav .favorite-nav-button {
  border-color: var(--line);
  background: var(--card);
  color: var(--text);
}

html[data-theme="dark"] .site-nav .favorite-nav-button:hover,
html[data-theme="dark"] .site-nav .favorite-nav-button:focus-visible,
html[data-theme="dark"] .site-nav .favorite-nav-button.is-active {
  border-color: var(--subscription-primary);
  background: var(--card-hover);
  color: var(--subscription-primary);
}

html[data-theme="dark"] .game-favorite__button {
  border-color: var(--line);
  background: rgba(32, 40, 58, 0.94);
  color: var(--accent-dark);
  box-shadow: 0 8px 18px rgba(7, 10, 19, 0.28);
}

html[data-theme="dark"] .game-favorite__button:hover,
html[data-theme="dark"] .game-favorite__button:focus-visible,
html[data-theme="dark"] .game-favorite__button.is-active {
  border-color: var(--subscription-primary);
  background: var(--subscription-soft);
  color: var(--subscription-primary);
}

html[data-theme="dark"] .game-card-shell .game-favorite__button,
html[data-theme="dark"] .game-card-shell .game-favorite__button:hover,
html[data-theme="dark"] .game-card-shell .game-favorite__button:focus-visible {
  border-color: transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  box-shadow: none;
}

html[data-theme="dark"] .game-card-shell .game-favorite__button.is-active {
  border-color: transparent;
  background: transparent;
  color: #ff91a7;
}

html[data-theme="dark"] .theme-toggle__icon,
html[data-theme="dark"] .eyebrow {
  color: var(--accent);
}

html[data-theme="dark"] .site-footer__socials a {
  background: var(--card);
  box-shadow: none;
}

html[data-theme="dark"] .logo::before {
  background: var(--accent);
  box-shadow: 14px 7px 0 -4px var(--gold), 26px 1px 0 -5px var(--subscription-badge);
}

html[data-theme="dark"] .button,
html[data-theme="dark"] .game-play-button,
html[data-theme="dark"] .appointment-button,
html[data-theme="dark"] .home-twisters-promo__cta,
html[data-theme="dark"] .game-lists-promo__cta,
html[data-theme="dark"] .therapist-service-card__button {
  border-color: transparent;
  background: var(--account);
  color: var(--account-text);
  text-shadow: none;
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.18);
  animation: none;
}

html[data-theme="dark"] .button:hover,
html[data-theme="dark"] .game-play-button:hover,
html[data-theme="dark"] .appointment-button:hover,
html[data-theme="dark"] .home-twisters-promo__cta:hover,
html[data-theme="dark"] .game-lists-promo__cta:hover,
html[data-theme="dark"] .therapist-service-card__button:hover {
  background: var(--account-hover);
  color: var(--account-text);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

html[data-theme="dark"] .button-secondary,
html[data-theme="dark"] .about-final__actions .button-secondary,
html[data-theme="dark"] .twisters-secondary-button {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  box-shadow: none;
}

html[data-theme="dark"] .button-secondary:hover,
html[data-theme="dark"] .about-final__actions .button-secondary:hover,
html[data-theme="dark"] .twisters-secondary-button:hover {
  border-color: var(--accent);
  background: var(--card-hover);
  color: var(--text);
  box-shadow: none;
}

html[data-theme="dark"] .button.free-games-cta,
html[data-theme="dark"] .home-hero-free-cta {
  border: 1px solid var(--free);
  background: var(--free-cta);
  color: var(--free-cta-text);
  text-shadow: none;
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.18);
  animation: none;
}

html[data-theme="dark"] .button.free-games-cta:hover,
html[data-theme="dark"] .home-hero-free-cta:hover {
  border-color: var(--free-cta-hover);
  background: var(--free-cta-hover);
  color: var(--free-cta-text);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

html[data-theme="dark"] .free-games-cta .home-catalog-cta__icon,
html[data-theme="dark"] .home-hero-free-cta .home-catalog-cta__icon,
html[data-theme="dark"] .free-games-cta:hover .home-catalog-cta__icon,
html[data-theme="dark"] .home-hero-free-cta:hover .home-catalog-cta__icon {
  border-color: rgba(38, 56, 44, 0.26);
  background: rgba(38, 56, 44, 0.12);
  color: var(--free-cta-text);
}

html[data-theme="dark"] .home-catalog-cta__icon {
  border-color: rgba(57, 37, 29, 0.2);
  background: rgba(57, 37, 29, 0.1);
  color: inherit;
}

html[data-theme="dark"] .home-hero-offer__benefits li {
  border-color: var(--line);
  color: var(--text);
}

html[data-theme="dark"] .home-hero-offer__benefits li::before {
  background: var(--subscription-primary);
  color: #ffffff;
  box-shadow: none;
}

/* Shared large surfaces and cards. */

html[data-theme="dark"] :is(
  .hero,
  .free-games-hero,
  .learning-resources-hero,
  .text-page,
  .home-difference,
  .home-support__panel,
  .home-twisters-promo,
  .game-lists-promo,
  .about-hero,
  .about-purpose,
  .about-process,
  .about-principles,
  .about-final,
  .audience-hero,
  .specialists-share-demo,
  .audience-access,
  .audience-team,
  .audience-final,
  .therapist-services,
  .subscription-offer__panel,
  .selection-panel,
  .selection-share-panel,
  .shared-selection-hero,
  .subscription-status
) {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] :is(
  .site-message,
  .cookie-banner-content,
  .auth-card,
  .account-profile,
  .empty-state,
  .benefit-card,
  .price-card,
  .asset-item,
  .filter-panel,
  .progress-summary-card,
  .progress-panel,
  .progress-skill-card,
  .progress-mini-card,
  .home-popular-sections__link,
  .home-difference-card,
  .home-format-card,
  .home-support__feature,
  .free-games-editorial section,
  .free-games-faq details,
  .learning-resource-card,
  .learning-resources-empty,
  .learning-resources-editorial,
  .learning-resource-detail__preview,
  .learning-resource-access,
  .resource-card,
  .taxonomy-index-list a,
  .taxonomy-index-list__empty,
  .sound-automation-page__sound-links a,
  .about-person,
  .about-person__facts > div,
  .about-person__summary,
  .about-purpose__note,
  .about-principles__disclaimer,
  .audience-check-list li,
  .audience-faq details,
  .audience-hero__aside,
  .audience-warning,
  .audience-feature-grid article,
  .audience-team__badge,
  .specialists-advantages li,
  .specialists-share-demo__card,
  .selection-game-group__title,
  .selection-game-option,
  .selection-item-editor,
  .selection-list-card,
  .selection-source-game,
  .selection-status,
  .shared-selection-access-note,
  .shared-selection-game
) {
  border-color: var(--line);
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] :is(
  .home-popular-sections__link,
  .selection-game-option,
  .selection-list-card,
  .resource-card,
  .taxonomy-index-list a,
  .sound-automation-page__sound-links a,
  .free-games-faq details
):hover {
  border-color: var(--accent);
  background: var(--card-hover);
  color: var(--text);
  box-shadow: var(--shadow-hover);
}

html[data-theme="dark"] :is(
  .home-difference p,
  .home-format-card p,
  .home-support__panel p,
  .home-support__feature p,
  .free-games-editorial p,
  .free-games-editorial li,
  .learning-resources-intro p,
  .learning-resources-editorial p,
  .learning-resource-detail__description,
  .about-page p,
  .about-page li,
  .audience-page p,
  .audience-page li
) {
  color: var(--muted);
}

html[data-theme="dark"] :is(
  .home-format-card__actions,
  .home-format-card__footer,
  .about-principles__grid li,
  .audience-section,
  .therapist-service-card__footer
) {
  border-color: var(--line);
}

/* Forms, modals, tables, and account pages. */

html[data-theme="dark"] :is(
  .appointment-modal .modal-content,
  .success-modal .modal-content,
  .login-modal .modal-content,
  .subscription-dev-modal .modal-content,
  .game-share-menu
) {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-hover);
}

html[data-theme="dark"] :is(
  input:not([type="checkbox"]):not([type="radio"]),
  textarea,
  select,
  .form-control,
  .form-select,
  .catalog-field .form-select,
  .catalog-sort .form-select,
  .catalog-filter-form .form-select,
  .social-signup-form input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
  .social-signup-form select,
  .social-signup-form textarea
) {
  border-color: var(--line);
  color: var(--text);
  box-shadow: none;
}

html[data-theme="dark"] :is(input, textarea)::placeholder {
  color: var(--light-text);
  opacity: 1;
}

html[data-theme="dark"] :is(input, textarea, select, .form-control, .form-select):focus {
  border-color: var(--accent);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 0 0 3px rgba(169, 155, 234, 0.2);
}

html[data-theme="dark"] .profile-form input[type="file"] {
  border-color: var(--line);
  background: var(--surface);
  color: var(--muted);
}

html[data-theme="dark"] .profile-form input[type="file"]::file-selector-button {
  border-right-color: var(--line);
  background: var(--card);
  color: var(--text);
}

html[data-theme="dark"] .profile-form input[type="file"]::file-selector-button:hover {
  background: var(--card-hover);
  color: var(--text);
}

html[data-theme="dark"] option {
  background: var(--surface);
  color: var(--text);
}

html[data-theme="dark"] .profile-form input[readonly] {
  background: var(--bg);
  color: var(--light-text);
}

html[data-theme="dark"] .table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text);
  --bs-table-border-color: var(--line);
  --bs-table-striped-bg: var(--card-hover);
  --bs-table-striped-color: var(--text);
  --bs-table-hover-bg: var(--card-hover);
  --bs-table-hover-color: var(--text);
}

html[data-theme="dark"] .site-message-error {
  border-color: var(--subscription-dark);
  background: #35263a;
  color: var(--counter-text);
}

html[data-theme="dark"] :is(
  .text-link,
  .breadcrumbs__link:hover,
  .selection-share-status,
  .selection-form .errorlist,
  .shared-selection-game__note,
  .game-share-status
) {
  color: var(--accent);
}

html[data-theme="dark"] .social-confirm-card .magic-link-spam-notice {
  border-color: var(--line);
  background: var(--card-hover);
  color: var(--muted);
}

/* Catalog filters and chips. */

html[data-theme="dark"] :is(
  .catalog-search,
  .catalog-toolbar,
  .catalog-scroll-button,
  .catalog-advanced__toggle,
  .catalog-advanced__panel,
  .catalog-sidebar-inner,
  .catalog-checkbox-filter,
  .catalog-segmented span,
  .catalog-filter-toggle-label,
  .filter-help,
  .filter-help-tooltip,
  .filter-list a,
  .filter-summary span,
  .tag-list a,
  .tag-list span,
  .catalog-load-more,
  .progress-pagination,
  .progress-pagination-button
) {
  border-color: var(--line);
  background: var(--card);
  color: var(--text);
  box-shadow: none;
}

html[data-theme="dark"] :is(.catalog-pill, .catalog-chip) {
  border-color: var(--line);
  background: var(--card);
  color: var(--muted);
  box-shadow: none;
}

html[data-theme="dark"] .catalog-chip--age {
  background: var(--card);
}

html[data-theme="dark"] :is(
  .catalog-chip--tone-1,
  .catalog-chip--tone-2,
  .catalog-chip--tone-3,
  .catalog-chip--tone-4,
  .catalog-chip--tone-5,
  .catalog-chip--tone-6
) {
  border-color: var(--line);
  background: var(--card);
  color: var(--muted);
}

html[data-theme="dark"] :is(.catalog-pill, .catalog-chip):hover,
html[data-theme="dark"] :is(.catalog-advanced__toggle, .catalog-scroll-button):hover {
  border-color: var(--accent);
  background: var(--card-hover);
  color: var(--text);
}

html[data-theme="dark"] .catalog-search input {
  background: transparent;
  color: var(--text);
}

html[data-theme="dark"] .catalog-search button {
  border: 0;
  background: var(--secondary-accent);
  color: #20283a;
  box-shadow: none;
}

html[data-theme="dark"] .catalog-search button:hover {
  background: #b7abf0;
  color: #20283a;
}

html[data-theme="dark"] :is(.catalog-pill, .catalog-chip).is-active,
html[data-theme="dark"] .catalog-segmented input:checked + span {
  border-color: var(--subscription-primary);
  background: var(--subscription-primary);
  color: #ffffff;
  box-shadow: none;
}

html[data-theme="dark"] :is(
  .catalog-active-filter,
  .catalog-toolbar .catalog-active-filter,
  .catalog-toolbar .catalog-active-filter:nth-of-type(3n + 1),
  .catalog-toolbar .catalog-active-filter:nth-of-type(3n + 2),
  .catalog-toolbar .catalog-active-filter:nth-of-type(3n)
) {
  border-color: var(--subscription-primary);
  background: var(--counter);
  color: var(--counter-text);
  box-shadow: none;
}

html[data-theme="dark"] :is(.catalog-active-filter, .catalog-toolbar .catalog-active-filter):hover {
  border-color: var(--subscription-dark);
  background: var(--card-hover);
  color: var(--text);
}

html[data-theme="dark"] .catalog-active-filter__remove {
  background: rgba(255, 216, 225, 0.12);
  color: var(--counter-text);
}

html[data-theme="dark"] .catalog-reset-all,
html[data-theme="dark"] .catalog-filter-reset {
  color: var(--accent);
}

html[data-theme="dark"] .filter-list a.is-active {
  border-color: var(--subscription-primary);
  background: var(--counter);
  color: var(--counter-text);
}

html[data-theme="dark"] .catalog-pill__icon--free {
  color: var(--free);
}

html[data-theme="dark"] :is(
  .catalog-pill__icon--tone-1,
  .catalog-pill__icon--tone-3,
  .catalog-pill__icon--tone-6
) {
  color: var(--accent);
}

html[data-theme="dark"] :is(
  .catalog-pill__icon--popular,
  .catalog-pill__icon--tone-2,
  .catalog-pill__icon--tone-4
) {
  color: var(--gold);
}

html[data-theme="dark"] :is(.catalog-pill__icon--new, .catalog-pill__icon--tone-5) {
  color: var(--subscription-badge);
}

/* Game cards and game detail pages. Preview media stays unchanged. */

html[data-theme="dark"] .game-card,
html[data-theme="dark"] .game-card:nth-child(4n + 2),
html[data-theme="dark"] .game-card:nth-child(4n + 3),
html[data-theme="dark"] .game-card:nth-child(4n + 4) {
  border-color: var(--line);
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .game-card-body {
  background: var(--card);
  color: var(--text);
  transition: background-color 160ms ease;
}

html[data-theme="dark"] .game-card:hover,
html[data-theme="dark"] .game-card:hover .game-card-body {
  border-color: var(--accent);
  background: var(--card-hover);
}

html[data-theme="dark"] .game-card__title,
html[data-theme="dark"] .game-card__title a {
  color: var(--text);
}

html[data-theme="dark"] .game-card__category,
html[data-theme="dark"] .game-card__description,
html[data-theme="dark"] .game-card__meta {
  color: var(--muted);
}

html[data-theme="dark"] .game-card__free-label {
  background: var(--free);
  color: var(--free-cta-text);
  box-shadow: none;
}

html[data-theme="dark"] .game-card__subscription-label {
  background: var(--subscription-badge);
  color: #ffffff;
  box-shadow: none;
}

html[data-theme="dark"] :is(.game-age-label, .game-card__badge, .game-card__badge-blue) {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  box-shadow: none;
}

html[data-theme="dark"] .game-card__diagnostic-label {
  background: var(--gold);
  color: var(--account-text);
  box-shadow: none;
}

html[data-theme="dark"] .game-detail-info-card,
html[data-theme="dark"] .game-detail-info-card:nth-child(2),
html[data-theme="dark"] .game-detail-info-card:nth-child(3),
html[data-theme="dark"] .game-detail-info-card-help {
  border-color: var(--line);
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .game-detail-info-card p,
html[data-theme="dark"] .game-detail-content p,
html[data-theme="dark"] .rich-text {
  color: var(--muted);
}

html[data-theme="dark"] .game-share-button,
html[data-theme="dark"] .game-share-service,
html[data-theme="dark"] .game-share-menu__close {
  border-color: var(--line);
  background: var(--card);
  color: var(--text);
  box-shadow: none;
}

html[data-theme="dark"] .game-share-button:hover,
html[data-theme="dark"] .game-share-service:hover,
html[data-theme="dark"] .game-share-menu__close:hover {
  border-color: var(--accent);
  background: var(--card-hover);
  color: var(--text);
}

html[data-theme="dark"] .game-free-games-link {
  color: var(--free-cta);
  text-decoration-color: rgba(155, 207, 169, 0.46);
}

html[data-theme="dark"] .game-free-games-link:hover {
  color: var(--free-cta-hover);
}

/* Subscription offer and paywalls. */

html[data-theme="dark"] .subscription-offer::before {
  background: transparent;
}

html[data-theme="dark"] .subscription-offer__panel {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .subscription-offer__summary,
html[data-theme="dark"] .subscription-offer__benefits li {
  border-color: var(--line);
}

html[data-theme="dark"] :is(
  .subscription-offer__header h2,
  .subscription-offer__return-note strong,
  .subscription-offer__intro h3,
  .subscription-offer__plans > h3,
  .therapist-services__header h2,
  .therapist-service-card h3
) {
  color: var(--text);
}

html[data-theme="dark"] :is(
  .subscription-offer__return-note,
  .subscription-offer__intro p,
  .subscription-offer__benefits,
  .subscription-offer__unavailable,
  .therapist-services__header p,
  .therapist-service-card__copy > p,
  .therapist-service-card__copy ul,
  .therapist-service-card__note
) {
  color: var(--muted);
}

html[data-theme="dark"] .subscription-offer__benefits li::before,
html[data-theme="dark"] .therapist-service-card__copy li::before {
  background: var(--subscription-primary);
  color: #ffffff;
}

html[data-theme="dark"] .subscription-offer__plan {
  border-color: transparent;
  background: var(--light-accent) !important;
  color: #20283a;
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.18);
}

html[data-theme="dark"] .subscription-offer__plan:nth-child(even),
html[data-theme="dark"] .subscription-offer__plan--best-value {
  background: var(--subscription-dark) !important;
  color: #ffffff;
}

html[data-theme="dark"] .subscription-offer__plan:nth-child(3n) {
  background: var(--secondary-accent) !important;
  color: #29253d;
}

html[data-theme="dark"] .subscription-offer__plan--best-value {
  background: var(--subscription-primary) !important;
  color: #ffffff;
}

html[data-theme="dark"] .subscription-offer__plan:hover {
  background: #9bd3e2 !important;
}

html[data-theme="dark"] .subscription-offer__plan:nth-child(even):hover,
html[data-theme="dark"] .subscription-offer__plan--best-value:hover {
  background: var(--subscription-dark) !important;
}

html[data-theme="dark"] .subscription-offer__plan:nth-child(3n):hover {
  background: #b7abf0 !important;
}

html[data-theme="dark"] .subscription-offer__plan--best-value:hover {
  background: var(--subscription-dark) !important;
}

html[data-theme="dark"] .subscription-offer__plan:has(input:checked) {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

html[data-theme="dark"] .subscription-offer__radio {
  border-color: rgba(255, 255, 255, 0.72);
  background: var(--surface);
}

html[data-theme="dark"] .subscription-offer__plan input:checked + .subscription-offer__radio::after {
  background: var(--text);
}

html[data-theme="dark"] .subscription-offer__plan-prices strong,
html[data-theme="dark"] .home-format-card__current-price,
html[data-theme="dark"] .home-format-card__price,
html[data-theme="dark"] .therapist-service-card__price {
  color: var(--gold);
}

html[data-theme="dark"] .subscription-offer__plan-prices strong {
  color: inherit;
}

html[data-theme="dark"] .subscription-offer__plan-prices del {
  color: inherit;
  opacity: 0.68;
}

html[data-theme="dark"] .subscription-offer__discount {
  background: rgba(23, 28, 43, 0.3);
  color: inherit;
}

html[data-theme="dark"] .subscription-offer__plan-badge {
  border: 1px solid rgba(32, 40, 58, 0.18);
  background: var(--text);
  color: var(--account-text);
  box-shadow: none;
}

html[data-theme="dark"] .subscription-offer__submit {
  background: var(--subscription-primary);
  color: #ffffff;
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.18);
}

html[data-theme="dark"] .subscription-offer__submit:hover {
  background: var(--subscription-dark);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .subscription-offer__trust {
  border-color: var(--line);
  background: var(--card);
  color: var(--muted);
}

html[data-theme="dark"] .subscription-offer__trust .subscription-offer__trust-icon {
  background: var(--subscription-primary);
  color: #ffffff;
}

html[data-theme="dark"] .therapist-services {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .therapist-services__art {
  display: none;
}

html[data-theme="dark"] .therapist-service-card,
html[data-theme="dark"] .therapist-service-card--lessons {
  border-color: var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .therapist-service-card__note,
html[data-theme="dark"] .therapist-service-card--lessons .therapist-service-card__note {
  background: var(--card-hover);
  color: var(--muted);
}

html[data-theme="dark"] .therapist-service-card--lessons .therapist-service-card__button {
  background: var(--subscription-primary);
  color: #ffffff;
}

html[data-theme="dark"] .therapist-service-card--lessons .therapist-service-card__button:hover {
  background: var(--subscription-dark);
  color: #ffffff;
}

/* Home page feature blocks. */

html[data-theme="dark"] .home-popular-sections__link--mint {
  border-color: var(--free);
}

html[data-theme="dark"] :is(
  .home-popular-sections__link--pink,
  .home-popular-sections__link--mint,
  .home-popular-sections__link--yellow,
  .home-popular-sections__link--sky,
  .home-popular-sections__link--lilac,
  .home-popular-sections__link--peach
) {
  background: var(--card);
  color: var(--text);
}

html[data-theme="dark"] .home-difference,
html[data-theme="dark"] .home-support__panel,
html[data-theme="dark"] .home-twisters-promo,
html[data-theme="dark"] .game-lists-promo {
  background: var(--surface);
}

html[data-theme="dark"] .home-difference-card,
html[data-theme="dark"] .home-support__feature,
html[data-theme="dark"] .home-format-card,
html[data-theme="dark"] .game-lists-promo__preview,
html[data-theme="dark"] .game-lists-promo__games li,
html[data-theme="dark"] .game-lists-promo__short-link,
html[data-theme="dark"] .game-lists-promo__note {
  border-color: var(--line);
  background: var(--card);
  color: var(--text);
  box-shadow: none;
}

html[data-theme="dark"] :is(
  .home-format-card__service-info,
  .home-format-card__note,
  .home-format-card__note-purple,
  .home-format-card__note-green,
  .home-format-card__note-pink
) {
  background: var(--card-hover);
  color: var(--muted);
}

html[data-theme="dark"] .home-format__trust {
  border-color: var(--line);
  background: var(--card);
  color: var(--muted);
}

html[data-theme="dark"] .game-lists-promo__eyebrow,
html[data-theme="dark"] .game-lists-promo__game-number,
html[data-theme="dark"] .game-lists-promo__short-link {
  background: var(--counter);
  color: var(--counter-text);
}

html[data-theme="dark"] .game-lists-promo__preview-mark,
html[data-theme="dark"] .game-lists-promo__preview-footer {
  background: var(--subscription-primary);
  color: #ffffff;
}

html[data-theme="dark"] :is(
  .game-lists-promo__feature-icon--purple,
  .game-lists-promo__feature-icon--yellow,
  .game-lists-promo__feature-icon--green,
  .game-lists-promo__note > span
) {
  background: var(--card-hover);
  color: var(--gold);
}

html[data-theme="dark"] .home-twisters-promo__label {
  background: var(--counter);
  color: var(--counter-text);
}

html[data-theme="dark"] :is(
  .home-support__icon-gold,
  .home-support__icon-green,
  .home-support__icon-lilac,
  .home-support__icon-rose
) {
  background: var(--card-hover);
  color: var(--gold);
}

html[data-theme="dark"] :is(
  .game-lists-promo h2,
  .game-lists-promo__features li,
  .game-lists-promo__game-copy strong,
  .game-lists-promo__preview-title h3
) {
  color: var(--text);
}

html[data-theme="dark"] :is(
  .game-lists-promo__lead,
  .game-lists-promo__game-copy small,
  .game-lists-promo__note p,
  .game-lists-promo__chevron
) {
  color: var(--muted);
}

/* Progress, selections, and status components. */

html[data-theme="dark"] .progress-bar {
  background: var(--card-hover);
}

html[data-theme="dark"] :is(.progress-fill-good, .progress-fill-mastered) {
  background: var(--accent);
}

html[data-theme="dark"] .progress-fill-learning {
  background: var(--gold);
}

html[data-theme="dark"] .progress-fill-new {
  background: var(--light-text);
}

html[data-theme="dark"] :is(
  .progress-status-good,
  .progress-status-mastered,
  .progress-status-learning,
  .progress-status-new,
  .access-badge,
  .selection-game-option:has(input:checked)
) {
  border-color: var(--line);
  background: var(--card-hover);
  color: var(--text);
}

html[data-theme="dark"] .selection-share-panel,
html[data-theme="dark"] .shared-selection-hero,
html[data-theme="dark"] .subscription-status {
  background: var(--surface);
}

html[data-theme="dark"] :is(.selection-status, .selection-share-status, .shared-selection-game__note) {
  color: var(--muted);
}

/* About and audience pages. */

html[data-theme="dark"] :is(
  .about-hero,
  .about-purpose,
  .about-process,
  .about-principles,
  .about-final,
  .audience-hero,
  .audience-page--specialists .audience-hero,
  .specialists-share-demo,
  .audience-access,
  .audience-team,
  .audience-final
) {
  background: var(--surface);
}

html[data-theme="dark"] :is(
  .audience-hero__aside,
  .audience-page--parents .audience-hero__aside,
  .audience-hero__aside--specialists,
  .audience-warning,
  .audience-warning--blue,
  .audience-feature-grid article,
  .audience-feature-grid article:first-child,
  .audience-feature-grid article:last-child,
  .audience-list-feature,
  .specialists-share-demo__card,
  .audience-team__badge
) {
  border-color: var(--line);
  background: var(--card);
  color: var(--text);
}

html[data-theme="dark"] :is(
  .audience-list-feature__badge,
  .audience-warning__icon,
  .audience-warning--blue .audience-warning__icon,
  .audience-feature-grid__mark,
  .audience-feature-grid article:last-child .audience-feature-grid__mark,
  .specialists-share-demo__steps li > span,
  .specialists-share-demo__link-row span
) {
  background: var(--account);
  color: var(--account-text);
}

html[data-theme="dark"] .specialists-share-demo__link-row {
  border-color: var(--line);
  background: var(--card-hover);
  color: var(--text);
}

html[data-theme="dark"] :is(
  .audience-hero__aside--specialists strong,
  .audience-page--parents .audience-hero__aside > strong,
  .audience-hero__number,
  .audience-section__index,
  .audience-team__badge
) {
  color: var(--gold);
}

html[data-theme="dark"] .audience-team__proposal {
  border-color: transparent;
  background: var(--account);
  color: var(--account-text);
  box-shadow: none;
}

html[data-theme="dark"] .audience-team__proposal:hover {
  background: var(--account-hover);
  color: var(--account-text);
}

html[data-theme="dark"] :is(
  .specialists-advantages li::before,
  .specialists-share-demo__card-icon
) {
  background: var(--card-hover);
  color: var(--gold);
}

html[data-theme="dark"] .specialists-share-demo__link-row code {
  color: var(--counter-text);
}

html[data-theme="dark"] :is(
  .about-purpose__note,
  .about-principles__disclaimer,
  .about-person__facts > div,
  .about-person__summary
) {
  background: var(--card-hover);
  color: var(--muted);
}

html[data-theme="dark"] :is(
  .about-principles__grid li::before,
  .audience-check-list li::before,
  .about-process__list li::before
) {
  background: var(--accent);
  color: var(--account-text);
}

/* Learning resources and editorial pages. */

html[data-theme="dark"] :is(
  .learning-resources-empty,
  .learning-resources-editorial,
  .learning-resource-detail__preview,
  .learning-resource-access,
  .free-games-editorial section,
  .free-games-editorial section:last-child,
  .free-games-faq details,
  .free-games-faq details[open],
  .taxonomy-index-list a,
  .taxonomy-index-list__empty,
  .sound-automation-page__sound-links a
) {
  border-color: var(--line);
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .free-games-faq summary::after,
html[data-theme="dark"] .audience-faq summary::after {
  background: var(--card-hover);
  color: var(--accent);
}

html[data-theme="dark"] .sound-automation-page__sound-links a,
html[data-theme="dark"] .sound-automation-page__sound-links a::after {
  color: var(--text);
}

html[data-theme="dark"] .popular-games-slider__control {
  border-color: var(--line);
  background: var(--card);
  color: var(--text);
  box-shadow: none;
}

html[data-theme="dark"] .popular-games-slider__control:hover {
  border-color: var(--accent);
  background: var(--card-hover);
  color: var(--text);
}

/* Tongue-twister page-specific stylesheet. */

html[data-theme="dark"] :is(
  .twisters-mode-tabs,
  .twisters-catalog,
  .twisters-editorial > section,
  .twisters-faq details,
  .twisters-trainer__shell,
  .twisters-practice-card,
  .twister-card,
  .speed-ladder li,
  .twisters-complete
) {
  border-color: var(--line);
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] :is(
  .twisters-mode-tab,
  .twisters-filters label > span,
  .twisters-result-count,
  .twisters-editorial p,
  .twisters-editorial li,
  .twisters-practice-card__instruction,
  .twisters-practice-card__status,
  .speed-ladder li,
  .twisters-empty p
) {
  color: var(--muted);
}

html[data-theme="dark"] :is(
  .twisters-filters select,
  .twisters-trainer__modes button,
  .twisters-secondary-button,
  .twister-card__sound,
  .twister-card__meta span,
  .speed-ladder li > span,
  .twister-card__illustration,
  .twister-card__illustration--2,
  .twister-card__illustration--3,
  .twister-card__illustration--4
) {
  border-color: var(--line);
  background: var(--card-hover);
  color: var(--muted);
}

html[data-theme="dark"] :is(
  .twisters-mode-tab.is-active,
  .twisters-primary-button,
  .twister-card__start,
  .twisters-filter-submit
) {
  background: var(--account);
  color: var(--account-text);
  box-shadow: none;
}

html[data-theme="dark"] :is(
  .twisters-mode-tab.is-active:hover,
  .twisters-primary-button:hover,
  .twister-card__start:hover,
  .twisters-filter-submit:hover
) {
  background: var(--account-hover);
  color: var(--account-text);
}

html[data-theme="dark"] :is(
  .twister-target-letter,
  .twisters-practice-card__words span.is-active,
  .speed-ladder li.is-current,
  .twister-card__meta .twister-difficulty--hard
) {
  border-color: var(--subscription-primary);
  background: var(--counter);
  color: var(--counter-text);
}

html[data-theme="dark"] :is(
  .twister-card__meta .twister-difficulty--easy,
  .twister-card__meta .twister-difficulty--medium,
  .speed-ladder li.is-complete,
  .twisters-bonus
) {
  border-color: var(--line);
  background: var(--card-hover);
  color: var(--gold);
}

html[data-theme="dark"] .twisters-star.is-earned .twisters-star__icon {
  fill: var(--gold);
  stroke: var(--gold);
}

html[data-theme="dark"] .twisters-stars__bonus {
  border-color: var(--line);
}

html[data-theme="dark"] .twisters-practice-card__words span.is-past {
  color: var(--accent);
}

html[data-theme="dark"] .twisters-practice-card__words span.is-missing {
  border-color: var(--line);
}

/* These hero sections are transparent in the light theme as well. */

html[data-theme="dark"] :is(
  .home-hero,
  .free-games-hero,
  .learning-resources-hero
) {
  border: 0;
  background: transparent;
  box-shadow: none;
}

html[data-theme="dark"] :is(
  .twisters-filter-reset,
  .twisters-related__heading a,
  .twisters-trainer-games .twisters-related__heading a,
  .twisters-trainer__back
) {
  color: var(--accent);
}
