/* AKNB Dark Overrides — catch hardcoded whites/colors that bypass the token system */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body,
  :root:not([data-theme="light"]) .aknb-site,
  :root:not([data-theme="light"]) .aknb-page,
  :root:not([data-theme="light"]) .aknb-container,
  :root:not([data-theme="light"]) .cc-container {
    background: #0A0D13;
    color: #F8FAFC;
  }
  :root:not([data-theme="light"]) .aknb-main,
  :root:not([data-theme="light"]) .cc-main {
    background: transparent;
    color: #F8FAFC;
  }
  :root:not([data-theme="light"]) .aknb-header{
    background: #0A0D13;
    color: #F8FAFC;
    border-color: #2A303C;
  }
  :root:not([data-theme="light"]) .aknb-header__inner,
  :root:not([data-theme="light"]) .cc-header__inner,
  :root:not([data-theme="light"]) .cc-hero__inner {
    background: transparent;
  }
  :root:not([data-theme="light"]) .aknb-primary-nav__link,
  :root:not([data-theme="light"]) .aknb-header__inner a{ color: #F8FAFC; }
  :root:not([data-theme="light"]) .aknb-card,
  :root:not([data-theme="light"]) .aknb-product-card,
  :root:not([data-theme="light"]) .aknb-article-card,
  :root:not([data-theme="light"]) .cc-card,
  :root:not([data-theme="light"]) .aknb-shop-sidebar,
  :root:not([data-theme="light"]) .cc-editorial,
  :root:not([data-theme="light"]) .cc-categories,
  :root:not([data-theme="light"]) .cc-vip,
  :root:not([data-theme="light"]) .aknb-cat-grid > *,
  :root:not([data-theme="light"]) .aknb-review,
  :root:not([data-theme="light"]) .aknb-delivery-trust,
  :root:not([data-theme="light"]) .aknb-ship-note,
  :root:not([data-theme="light"]) .cc-pdp__brandrow,
  :root:not([data-theme="light"]) .cc-pdp-delivery-card,
  :root:not([data-theme="light"]) .woocommerce-Tabs-panel,
  :root:not([data-theme="light"]) .woocommerce-tabs,
  :root:not([data-theme="light"]) .aknb-qv-modal__panel,
  :root:not([data-theme="light"]) .aknb-qv,
  :root:not([data-theme="light"]) .cart_totals,
  :root:not([data-theme="light"]) .cart-collaterals,
  :root:not([data-theme="light"]) .woocommerce table.shop_table,
  :root:not([data-theme="light"]) .woocommerce table.shop_table td,
  :root:not([data-theme="light"]) .woocommerce table.shop_table th,
  :root:not([data-theme="light"]) .woocommerce-checkout-review-order,
  :root:not([data-theme="light"]) .aknb-review-order,
  :root:not([data-theme="light"]) .aknb-editorial-hero,
  :root:not([data-theme="light"]) .aknb-help,
  :root:not([data-theme="light"]) .aknb-help__card,
  :root:not([data-theme="light"]) .cc-help__hero,
  :root:not([data-theme="light"]) .cc-article__hero,
  :root:not([data-theme="light"]) .cc-article__body,
  :root:not([data-theme="light"]) .cc-index-drawer,
  :root:not([data-theme="light"]) .aknb-form,
  :root:not([data-theme="light"]) .fluentform,
  :root:not([data-theme="light"]) input[type="text"],
  :root:not([data-theme="light"]) input[type="email"],
  :root:not([data-theme="light"]) input[type="password"],
  :root:not([data-theme="light"]) input[type="tel"],
  :root:not([data-theme="light"]) input[type="number"],
  :root:not([data-theme="light"]) input[type="search"],
  :root:not([data-theme="light"]) textarea,
  :root:not([data-theme="light"]) select {
    background: #141822;
    color: #F8FAFC;
    border-color: #2A303C;
  }
  :root:not([data-theme="light"]) .aknb-shop__layout,
  :root:not([data-theme="light"]) .cc-shop {
    background: transparent;
    border-color: transparent;
  }
  :root:not([data-theme="light"]) input,
  :root:not([data-theme="light"]) textarea,
  :root:not([data-theme="light"]) select { color: #F8FAFC; }
  :root:not([data-theme="light"]) input::placeholder,
  :root:not([data-theme="light"]) textarea::placeholder { color: #8B93A3; }
  :root:not([data-theme="light"]) h1,
  :root:not([data-theme="light"]) h2,
  :root:not([data-theme="light"]) h3,
  :root:not([data-theme="light"]) h4,
  :root:not([data-theme="light"]) h5,
  :root:not([data-theme="light"]) h6,
  :root:not([data-theme="light"]) p,
  :root:not([data-theme="light"]) li,
  :root:not([data-theme="light"]) label,
  :root:not([data-theme="light"]) .aknb-prose,
  :root:not([data-theme="light"]) .aknb-article__title,
  :root:not([data-theme="light"]) .aknb-article__excerpt,
  :root:not([data-theme="light"]) .cc-pdp__title,
  :root:not([data-theme="light"]) .cc-pdp__price,
  :root:not([data-theme="light"]) .aknb-product-card__title,
  :root:not([data-theme="light"]) .aknb-product-card__price {
    color: #F8FAFC;
  }
  :root:not([data-theme="light"]) .aknb-muted,
  :root:not([data-theme="light"]) .aknb-caption,
  :root:not([data-theme="light"]) .cc-pdp__desc,
  :root:not([data-theme="light"]) .aknb-article-meta,
  :root:not([data-theme="light"]) small,
  :root:not([data-theme="light"]) .text-muted {
    color: #C7CDD6;
  }
  :root:not([data-theme="light"]) hr,
  :root:not([data-theme="light"]) .aknb-divider {
    border-color: #2A303C;
  }
  :root:not([data-theme="light"]) .aknb-badge,
  :root:not([data-theme="light"]) .aknb-chip,
  :root:not([data-theme="light"]) .aknb-pill {
    background: #1A1F2A;
    color: #F8FAFC;
    border-color: #2A303C;
  }
  :root:not([data-theme="light"]) img { opacity: .96; }
  :root:not([data-theme="light"]) .aknb-logo,
  :root:not([data-theme="light"]) .cc-header__brand-mark { filter: brightness(1.05); }
  :root:not([data-theme="light"]) .cc-header__brand-text {
    color: #F8FAFC;
    -webkit-text-fill-color: #F8FAFC;
  }
  /* TranslatePress switcher: colours now come from its design option (--cc-* tokens), no dark twin needed. */

  /* Headings hardcoded with color + -webkit-text-fill-color:#0A0D13 (bypasses the token system the same way the header wordmark did) */
  :root:not([data-theme="light"]) .cc-shop__title,
  :root:not([data-theme="light"]) .cc-featured-article__title,
  :root:not([data-theme="light"]) .cc-articles-header__title,
  :root:not([data-theme="light"]) .cc-help__hero-title {
    color: #F8FAFC;
    -webkit-text-fill-color: #F8FAFC;
  }

  /* Help Center FAQ cards + "still need help" card: hardcoded white surfaces */
  :root:not([data-theme="light"]) .cc-help__item,
  :root:not([data-theme="light"]) .cc-help__assist {
    background: #12151c;
    border-color: #2A303C;
  }
  :root:not([data-theme="light"]) .cc-help__q,
  :root:not([data-theme="light"]) .cc-help__assist-title { color: #F8FAFC; }
  :root:not([data-theme="light"]) .cc-help__a,
  :root:not([data-theme="light"]) .cc-help__q-chev,
  :root:not([data-theme="light"]) .cc-help__assist-sub { color: #C7CDD6; }
  :root:not([data-theme="light"]) .cc-help__assist-btn--ghost {
    background: transparent;
    color: #F8FAFC;
    border-color: #2A303C;
  }


  /* Checkout (aknb-checkout-page mu-plugin): built entirely with hardcoded light-mode
     colors, no token system -- none of it was covered until now. */
  :root:not([data-theme="light"]) .cc-checkout-trust,
  :root:not([data-theme="light"]) .cc-step,
  :root:not([data-theme="light"]) .cc-checkout-summary__inner {
    background: transparent;
    border-color: #2A303C;
  }
  :root:not([data-theme="light"]) .cc-trust-left,
  :root:not([data-theme="light"]) .cc-trust-left strong,
  :root:not([data-theme="light"]) .cc-step h3,
  :root:not([data-theme="light"]) .cc-shipping-methods label,
  :root:not([data-theme="light"]) .cc-checkout-summary h2,
  :root:not([data-theme="light"]) .cc-checkout-item__name,
  :root:not([data-theme="light"]) .cc-checkout-item__price,
  :root:not([data-theme="light"]) .cc-tot-row strong,
  :root:not([data-theme="light"]) .cc-shipping-fields h3#ship-to-different-address {
    color: #F8FAFC;
  }
  :root:not([data-theme="light"]) .cc-billing-fields .form-row label,
  :root:not([data-theme="light"]) .cc-shipping-fields .form-row label,
  :root:not([data-theme="light"]) .cc-shipping-fields h3#ship-to-different-address label {
    color: #C7CDD6;
  }
  :root:not([data-theme="light"]) .cc-trust-right,
  :root:not([data-theme="light"]) .cc-pci-line,
  :root:not([data-theme="light"]) .cc-checkout-summary h2 span,
  :root:not([data-theme="light"]) .cc-checkout-item__qty,
  :root:not([data-theme="light"]) .cc-tot-row,
  :root:not([data-theme="light"]) .cc-checkout-secure,
  :root:not([data-theme="light"]) .cc-checkout .payment_box {
    color: #8B93A3;
  }
  :root:not([data-theme="light"]) .cc-checkout-items,
  :root:not([data-theme="light"]) .cc-checkout-totals,
  :root:not([data-theme="light"]) .cc-checkout-coupon,
  :root:not([data-theme="light"]) .cc-coupon-form > div {
    border-color: #2A303C;
  }
  :root:not([data-theme="light"]) .cc-shipping-methods li,
  :root:not([data-theme="light"]) .cc-checkout .wc_payment_method {
    border-color: #2A303C;
    background: transparent;
  }
  :root:not([data-theme="light"]) .woocommerce-checkout #payment div.payment_box, :root:not([data-theme="light"]) .cc-checkout .payment_box { background: #1A1F2A; color: #8B93A3; }
  :root:not([data-theme="light"]) .payment_methods img { background: #fff; border-radius: 6px; padding: 3px 6px; vertical-align: middle; }
  :root:not([data-theme="light"]) .woocommerce-checkout form .form-row textarea {
    background: #141822;
    color: #F8FAFC;
    border-color: #2A303C;
  }
  :root:not([data-theme="light"]) .cc-wallet-card {
    background: transparent;
    border-color: rgba(47, 123, 255, 0.4);
  }
  :root:not([data-theme="light"]) .cc-wallet-card span,
  :root:not([data-theme="light"]) .cc-wallet-card strong {
    color: #8FB8FF;
  }
  :root:not([data-theme="light"]) .cc-wallet-card small {
    color: #8B93A3;
  }
  :root:not([data-theme="light"]) .select2-dropdown {
    background: #141822;
    border-color: #2A303C;
  }
  :root:not([data-theme="light"]) .select2-results__option {
    color: #F8FAFC;
  }
  :root:not([data-theme="light"]) .select2-results__option--highlighted[aria-selected] {
    background: #2F7BFF;
    color: #fff;
  }
  :root:not([data-theme="light"]) .select2-results__option[aria-selected=true] {
    background: #1A1F2A;
  }
  :root:not([data-theme="light"]) .cc-checkout-coupon input,
  :root:not([data-theme="light"]) .cc-coupon-form input[type="text"] {
    background: #0A0D13;
    color: #F8FAFC;
    border-color: #2A303C;
  }

  /* Wishlist page (aknb-account-pages.php) -- separate hardcoded component,
     never used the token system. Empty-state text was already flipping light
     via the generic `p` rule below, but its own white card background wasn't,
     so it went white-on-white. */
  :root:not([data-theme="light"]) .aknb-wl-empty,
  :root:not([data-theme="light"]) .aknb-wl-card,
  :root:not([data-theme="light"]) .aknb-wallet-panel,
  :root:not([data-theme="light"]) .aknb-ops-card {
    background: #12151c;
    border-color: #2A303C;
  }
  :root:not([data-theme="light"]) .aknb-wl-head h1,
  :root:not([data-theme="light"]) .aknb-wl-name,
  :root:not([data-theme="light"]) .aknb-wl-price,
  :root:not([data-theme="light"]) .aknb-wl-price .woocommerce-Price-amount {
    color: #F8FAFC;
  }
  :root:not([data-theme="light"]) .aknb-wl-count,
  :root:not([data-theme="light"]) .aknb-wl-head p,
  :root:not([data-theme="light"]) .aknb-wl-brand {
    color: #C7CDD6;
    background: #1A1F2A;
  }
  :root:not([data-theme="light"]) .aknb-wl-media { background: #0A0D13; }
  :root:not([data-theme="light"]) .aknb-wl-shop-btn {
    background: transparent;
    color: #F8FAFC;
    border-color: #2A303C;
  }
  :root:not([data-theme="light"]) .aknb-wallet-input {
    background: #0A0D13;
    color: #F8FAFC;
    border-color: #2A303C;
  }

  /* Returns tab (aknb-returns.php) and Orders/Account Details tables
     (aknb-account-ux.php) -- same hardcoded-white pattern. */
  :root:not([data-theme="light"]) .aknb-return-section,
  :root:not([data-theme="light"]) .aknb-return-order,
  :root:not([data-theme="light"]) .aknb-return-empty,
  :root:not([data-theme="light"]) table.woocommerce-orders-table {
    background: #12151c;
    border-color: #2A303C;
  }
  :root:not([data-theme="light"]) table.woocommerce-orders-table thead th {
    background: #0A0D13;
  }

  /* AKNB Ops admin dashboard (aknb-dashboard.php) -- same hardcoded-white pattern */
  :root:not([data-theme="light"]) .aknb-c { background: #12151c; border-color: #2A303C; }
  :root:not([data-theme="light"]) .aknb-c .l { color: #8B93A3; }
  :root:not([data-theme="light"]) .aknb-c .v { color: #F8FAFC; }

  /* Learn hub featured-article card: title was already flipped to white in an
     earlier pass, but the card itself (and its meta/excerpt) never was --
     title ended up white-on-white. */
  :root:not([data-theme="light"]) .cc-featured-article--link {
    background: #12151c;
    border-color: #2A303C;
  }
  :root:not([data-theme="light"]) .cc-featured-article__meta { color: #8B93A3; }
  :root:not([data-theme="light"]) .cc-featured-article__excerpt { color: #C7CDD6; }


/* Shop mobile filters drawer */
:root:not([data-theme="light"]) .cc-shop__filters {
  background: #0A0D13;
}
:root:not([data-theme="light"]) .cc-filter__label,
:root:not([data-theme="light"]) .cc-shop__filters-close {
  color: #F8FAFC;
}
}