@media screen {
  html[data-doktorland-theme="light"] {
    color-scheme: light;
    --dl-bg: #f9f6fc;
    --dl-surface: #fff;
    --dl-raised: #f2eaf8;
    --dl-line: #dfd0eb;
    --dl-ink: #2a1837;
    --dl-muted: #635371;
    --dl-link: #632790;
    --dl-gold: #ffda69;
    --dl-button: #6830a0;
    --dl-button-hover: #552183;
    --dl-input-line: #a891b8;
    --dl-focus: #7642ac;
    --dl-error-bg: #fff0f3;
    --dl-error-text: #9d224d;
    --dl-success-bg: #e7f6ef;
    --dl-success-text: #156345;
  }

  html[data-doktorland-theme="dark"] {
    --dl-input-line: #857494;
    --dl-focus: #d9b6ff;
    --dl-error-bg: #442334;
    --dl-error-text: #ffe3eb;
    --dl-success-bg: #19372e;
    --dl-success-text: #aff3d7;
  }

  /* Shared navigation, dropdowns, and search results. */
  html[data-doktorland-theme="dark"] .elementor-location-header :is(
    .elementor-nav-menu--dropdown .elementor-item,
    .elementor-nav-menu--dropdown .elementor-sub-item,
    .elementor-menu-toggle
  ) {
    background-color: var(--dl-surface);
    color: var(--dl-ink);
  }

  html[data-doktorland-theme="dark"] :is(
    .elementor-nav-menu--dropdown .elementor-item,
    .elementor-nav-menu--dropdown .elementor-sub-item,
    .select2-results__option
  ):is(:hover, :focus-visible, [aria-selected="true"], .select2-results__option--highlighted) {
    background-color: var(--dl-raised) !important;
    color: var(--dl-link) !important;
  }

  html[data-doktorland-theme="dark"] :is(
    .spwp-results-container a, .elementor-menu-cart__product-price,
    .elementor-menu-cart__product-remove a, .select2-results__message,
    .wp-block-search__label
  ) {
    color: var(--dl-ink);
  }

  html[data-doktorland-theme="dark"] .elementor-divider-separator {
    --divider-color: var(--dl-line);
    border-color: var(--dl-line) !important;
    background-color: var(--dl-line);
  }

  /* Form feedback and fields are shared by Gravity Forms and WooCommerce. */
  html[data-doktorland-theme] :is(.consulting-form, .gform_confirmation_message) {
    background-color: var(--dl-surface) !important;
    border-color: var(--dl-line) !important;
    color: var(--dl-ink);
  }

  html[data-doktorland-theme="dark"] :is(
    .gform_wrapper, .woocommerce, .wc-block-components-form, .msotp
  ) :is(
    input:not([type="hidden"], [type="button"], [type="reset"], [type="submit"],
      [type="image"], [type="range"], [type="file"], [type="color"], [type="radio"], [type="checkbox"]),
    select, textarea
  ) {
    border-color: var(--dl-input-line) !important;
  }

  html[data-doktorland-theme="dark"] :is(.gform_wrapper, .woocommerce, .wc-block-components-form) :is(
    input[type="checkbox"], input[type="radio"]
  ) {
    accent-color: var(--dl-button);
  }

  html[data-doktorland-theme="dark"] .gform_wrapper .gfield-choice-input:not(:checked) {
    background-color: var(--dl-bg) !important;
    border-color: var(--dl-input-line) !important;
  }

  html[data-doktorland-theme="dark"] :is(.gform_wrapper, .woocommerce) :is(
    label, legend, .gform_description, .gform_required_legend, .ginput_counter,
    .gform-field-label--type-sub, .woocommerce-form__label-for-checkbox
  ) {
    color: var(--dl-ink);
  }

  html[data-doktorland-theme] :is(.gform_validation_errors, .woocommerce .woocommerce-error) {
    background-color: var(--dl-error-bg) !important;
    color: var(--dl-error-text) !important;
  }

  html[data-doktorland-theme] :is(
    .gfield_validation_message, .gform_validation_errors h2, .gfield_required,
    .woocommerce-error a, .wc-block-components-validation-error
  ) {
    color: var(--dl-error-text) !important;
  }

  html[data-doktorland-theme] :is(.gform_confirmation_message, .woocommerce .woocommerce-message) {
    background-color: var(--dl-success-bg) !important;
    color: var(--dl-success-text) !important;
  }

  html[data-doktorland-theme="dark"] body.page-id-9258 .elementor-element-1ed477f {
    background-image: linear-gradient(180deg, #3a2c27, var(--dl-surface)) !important;
  }

  /* Neutral text inserted into Elementor HTML and text-editor widgets. */
  html[data-doktorland-theme="dark"] body:is(
    .page-id-9258, .page-id-1268, .page-id-1330, .page-id-1347, .page-id-12373, .page-id-11105
  ) .elementor-widget-text-editor :is(h2, h3) {
    color: var(--dl-link) !important;
  }

  html[data-doktorland-theme="dark"] body:is(
    .page-id-9258, .page-id-1347, .page-id-12373, .page-id-11105
  ) .elementor-widget-text-editor a:not(.elementor-button, .wp-block-button__link) {
    color: var(--dl-link) !important;
  }

  html[data-doktorland-theme="dark"] body.home .full-comparison-table :is(td, th) {
    color: var(--dl-ink);
    border-color: var(--dl-line);
  }

  html[data-doktorland-theme="dark"] body.page-id-1347 :is(
    .elementor-element-d40dda8, .elementor-element-7939687, .elementor-element-a7e7698
  ) {
    background-color: var(--dl-raised) !important;
    border-color: var(--dl-line) !important;
  }

  html[data-doktorland-theme="dark"] body.page-id-1347 .elementor-element-896ac53,
  html[data-doktorland-theme="dark"] body.page-id-11670 .elementor-element-b277c0d {
    background-image: linear-gradient(180deg, var(--dl-surface), var(--dl-bg)) !important;
  }

  html[data-doktorland-theme="dark"] body.page-id-12373 .elementor-element-571c8d5c {
    background-image: linear-gradient(var(--dl-surface), var(--dl-surface)),
      linear-gradient(115deg, #8d62b1, #756049, var(--dl-line)) !important;
  }

  html[data-doktorland-theme="dark"] body.page-id-12373 .elementor-heading-title a {
    color: var(--dl-link) !important;
  }

  html[data-doktorland-theme] .drland-seminars-page {
    background-color: var(--dl-bg) !important;
    color: var(--dl-ink);
  }

  html[data-doktorland-theme] .drland-seminars-page :is(.elementor-widget-video, .drland-counter) {
    background-color: var(--dl-surface) !important;
    border-color: var(--dl-line) !important;
    color: var(--dl-ink);
  }

  html[data-doktorland-theme="dark"] .drland-seminars-page .elementor-widget-text-editor p {
    color: var(--dl-muted) !important;
  }

  /* Parent introduction and the mentor's independent landing page. */
  html[data-doktorland-theme="light"] .dlp .hero {
    background: radial-gradient(ellipse at 18% 40%, #ead8f9 0%, transparent 56%),
      linear-gradient(135deg, #fcf9ff, #f2e8fa);
    color: var(--dl-ink);
  }

  html[data-doktorland-theme="light"] .dlp :is(.hero, .video-zone) .kicker,
  html[data-doktorland-theme="light"] .dlp .hero .line:nth-child(2) {
    color: var(--dl-link);
  }

  html[data-doktorland-theme="light"] .dlp .hero .lead,
  html[data-doktorland-theme="light"] .dlp .video-zone .intro p:last-child {
    color: var(--dl-muted);
  }

  html[data-doktorland-theme="light"] .dlp .hero .secondary {
    background-color: var(--dl-surface);
    color: var(--dl-link);
    box-shadow: inset 0 0 0 1px var(--dl-line);
  }

  html[data-doktorland-theme="light"] .dlp :is(.video-zone, .video-card) {
    background: var(--dl-raised);
    color: var(--dl-ink);
  }

  html[data-doktorland-theme="dark"] body.page-id-12039 .drland-landing-wrapper {
    --purple-soft: var(--dl-raised);
    background-color: var(--dl-bg);
    color: var(--dl-ink);
  }

  html[data-doktorland-theme="dark"] body.page-id-12039 .drland-landing-wrapper :is(
    .mentor-hero, .why-section, .story-section, .flow-section, .grades-section
  ) {
    background: linear-gradient(180deg, var(--dl-surface), var(--dl-bg));
    color: var(--dl-ink);
  }

  html[data-doktorland-theme="dark"] body.page-id-12039 .drland-landing-wrapper :is(
    .stat-box:not(.gold-stat), .why-card, .why-icon-box, .story-card, .goal-quote, .grade-item,
    .hero-badge, .quote-icon-circle, .btn-secondary-drl
  ) {
    background: var(--dl-raised);
    border-color: var(--dl-line);
    color: var(--dl-ink);
  }

  html[data-doktorland-theme="dark"] body.page-id-12039 .drland-landing-wrapper :is(
    .mentor-hero h1, .mentor-subtitle, .section-header h2, .section-header p,
    .why-card h3, .why-card p, .story-author-meta :is(h3, p, span), .story-content,
    .goal-quote strong, .grades-info h2, .grade-item-text :is(h4, p, span),
    .stat-box:not(.gold-stat) :is(.stat-val, .stat-lbl)
  ) {
    color: var(--dl-ink);
  }

  html[data-doktorland-theme="dark"] body.page-id-12039 .drland-landing-wrapper :is(
    .highlight-rank, .highlight-rank strong, .mentor-subtitle strong,
    .hero-badge, .quote-icon-circle, .btn-secondary-drl
  ) {
    color: var(--dl-link);
  }

  html[data-doktorland-theme="dark"] body.page-id-12039 .drland-landing-wrapper .gradient-name {
    background-image: linear-gradient(100deg, #dfbcff, #eba4dd);
  }

  html[data-doktorland-theme="dark"] body.page-id-12039 .drland-landing-wrapper .story-blur-overlay {
    background-image: linear-gradient(180deg, transparent, var(--dl-raised) 70%);
  }

  html[data-doktorland-theme="dark"] body.page-id-12039 .drland-landing-wrapper .flow-number {
    background: var(--dl-surface);
    color: var(--dl-link);
  }

  /* Article/category metadata and product layouts. */
  html[data-doktorland-theme="dark"] body :is(.elementor-1268, .elementor-1330) :is(
    .elementor-post-info__terms-list-item, .elementor-post-info__item--type-terms,
    .elementor-post-info__item--type-date, time
  ),
  html[data-doktorland-theme="dark"] body.page-id-1330 .elementor-7160
    .elementor-element-cdb84c7 .elementor-post-info__terms-list-item {
    color: var(--dl-link) !important;
  }

  html[data-doktorland-theme="dark"] .drl-article .drl-article-copy :is(
    table, td, th, blockquote, pre, code
  ) {
    border-color: var(--dl-line);
    color: var(--dl-ink);
  }

  html[data-doktorland-theme="dark"] .drl-article .drl-article-copy :is(th, pre, code) {
    background-color: var(--dl-raised) !important;
  }

  html[data-doktorland-theme="dark"] .single-product .dl-course-syllabus :is(h2, h3, summary),
  html[data-doktorland-theme="dark"] .single-product .dl-rank-audience h3 {
    background-color: var(--dl-raised) !important;
    color: var(--dl-ink) !important;
  }

  html[data-doktorland-theme="dark"] body.error404 :is(.error-title, .error-description) {
    color: var(--dl-ink) !important;
  }

  html[data-doktorland-theme="dark"] body.error404 :is(.shape.shape-1, .shape.shape-2) {
    background-image: linear-gradient(135deg, var(--dl-raised), var(--dl-line)) !important;
  }

  /* WooCommerce classic templates and block cart / checkout. */
  html[data-doktorland-theme="dark"] :is(.woocommerce, .wc-block-cart, .wc-block-checkout) {
    --wc-content-bg: var(--dl-surface);
    --wc-primary: var(--dl-button);
    --wc-primary-text: #fff;
    --wc-secondary: var(--dl-raised);
    --wc-secondary-text: var(--dl-ink);
    --wc-subtext: var(--dl-muted);
    --wc-form-border-color: var(--dl-line);
    color: var(--dl-ink);
  }

  html[data-doktorland-theme="dark"] :is(
    .woocommerce .woocommerce-checkout-review-order-table, .woocommerce .woocommerce-order-details,
    .woocommerce .woocommerce-form, .woocommerce .woocommerce-order-downloads,
    .woocommerce .quantity .qty, .woocommerce .coupon,
    .woocommerce .wc_payment_methods, .woocommerce .woocommerce-customer-details address,
    .wc-block-components-order-summary, .wc-block-components-totals-wrapper,
    .wc-block-components-checkout-step, .wc-block-components-payment-methods,
    .wc-block-components-radio-control-accordion-content,
    .wc-block-components-address-card, .wc-block-components-address-form
  ) {
    background-color: var(--dl-surface);
    border-color: var(--dl-line) !important;
    color: var(--dl-ink);
  }

  html[data-doktorland-theme="dark"] :is(
    .woocommerce-MyAccount-content, .woocommerce-checkout-review-order, .woocommerce-cart-form,
    .wc-block-cart, .wc-block-checkout
  ) :is(td, th, .wc-block-components-totals-item) {
    border-color: var(--dl-line) !important;
    color: var(--dl-ink);
  }

  html[data-doktorland-theme="dark"] :is(
    .woocommerce-breadcrumb, .woocommerce-MyAccount-content, .woocommerce-checkout-review-order,
    .woocommerce-cart-form, .wc-block-cart, .wc-block-checkout
  ) a:not(.button, .elementor-button, .wpast-btn, .wc-block-components-button, .wc-download-button) {
    color: var(--dl-link);
  }

  html[data-doktorland-theme="dark"] :is(
    .wc-block-components-button, .wc-block-cart__submit-button, #place_order
  ):not(.is-link) {
    background-color: var(--dl-button) !important;
    color: #fff !important;
  }

  html[data-doktorland-theme="dark"] .woocommerce #payment div.payment_box::before {
    border-bottom-color: var(--dl-raised);
  }

  /* Doktorland's custom cart and the Zibal payment option. */
  html[data-doktorland-theme="dark"] .woo__cart-container :is(
    .woo__cart-item, .woo__cart-summary, .woo__cart-coupon, .woo__cart-empty
  ),
  html[data-doktorland-theme="dark"] form.woocommerce-checkout #order_review,
  html[data-doktorland-theme="dark"] form.woocommerce-checkout .wc_payment_method {
    background-color: var(--dl-surface) !important;
    border-color: var(--dl-line) !important;
    color: var(--dl-ink);
  }

  html[data-doktorland-theme="dark"] .woo__cart-container :is(
    .woo__cart-header h1, .woo__cart-item-title, .woo__summary-title,
    .woo__cart-item-price, .woo__cart-item-subtotal, .woo__cart-summary strong,
    .woo__cart-coupon :is(h2, h3), .woo__cart-empty :is(h2, h3)
  ),
  html[data-doktorland-theme="dark"] form.woocommerce-checkout :is(
    .woocommerce-billing-fields h3, #order_review_heading, #ship-to-different-address
  ) {
    color: var(--dl-ink) !important;
  }

  html[data-doktorland-theme="dark"] .woo__cart-container :is(
    .woo__cart-item-meta, .woo__cart-item-regular-price,
    .woo__cart-item-remove, .woo__cart-empty p
  ) {
    color: var(--dl-muted) !important;
  }

  html[data-doktorland-theme="dark"] .woo__cart-container .woo__cart-item-title a {
    color: var(--dl-link) !important;
  }

  html[data-doktorland-theme="dark"] .woo__cart-container :is(
    .woo__cart-counter, .woo__cart-item-stock.in-stock, .woo__discount-amount
  ) {
    color: var(--dl-success-text) !important;
  }

  html[data-doktorland-theme="dark"] .woo__cart-container .woo__cart-counter {
    background-color: var(--dl-success-bg) !important;
  }

  html[data-doktorland-theme="dark"] .woo__cart-container :is(.woo__btn-secondary, .woo__qty-btn) {
    background-color: var(--dl-raised);
    border-color: var(--dl-line);
    color: var(--dl-ink);
  }

  html[data-doktorland-theme="dark"] .woo__cart-container .woo__btn-primary {
    background-color: var(--dl-button);
    color: #fff;
  }

  /* WordPress sign-in, password reset and registration use the same control. */
  html[data-doktorland-theme="dark"] body.login {
    background-image: radial-gradient(ellipse at 15% 0%, #39224d, transparent 65%),
      linear-gradient(145deg, var(--dl-surface), var(--dl-bg)) !important;
  }

  html[data-doktorland-theme="dark"] body.login #login,
  html[data-doktorland-theme="dark"] body.login #login :is(label, .message, .notice, .success) {
    color: var(--dl-ink) !important;
  }

  html[data-doktorland-theme="dark"] body.login :is(
    #loginform, #lostpasswordform, #registerform, #resetpassform, .message, .notice, .success,
    .language-switcher, .wp-tooltip__content
  ) {
    background-color: var(--dl-surface) !important;
    border-color: var(--dl-line) !important;
    color: var(--dl-ink);
  }

  html[data-doktorland-theme="dark"] body.login :is(#nav a, #backtoblog a, .privacy-policy-link, .wp-hide-pw) {
    color: var(--dl-link) !important;
  }

  body.login #doktorland-theme-toggle {
    top: max(16px, calc(env(safe-area-inset-top) + 8px));
    bottom: auto;
  }
}

