/* Glinsky Studio light / dark theme (owner pt32u 2026-11-16, sales-glinskyhq-build-theme-toggle-guard-2026-11-16).
   theme-boot.js sets html[data-theme] before first paint. Loaded LAST on every page so it overrides page defaults.
   Hero / band sections over photos keep their own white-on-image ink in both themes; the Marketing red/blue pills and the
   annual "-50%" badge keep fixed colours (white on #d1132a / #1559d6) so they read the same in light and dark. */
html[data-theme=dark]{background:#000;color-scheme:dark}
html[data-theme=light]{background:#fff;color-scheme:light}

/* toggle button: bottom-left, 44px target, visible focus ring, follows reduced motion */
.theme-toggle{position:fixed;left:16px;bottom:16px;z-index:70;width:44px;height:44px;display:grid;place-items:center;border-radius:999px;
  border:1px solid rgba(127,127,127,.45);background:rgba(255,255,255,.92);color:#0b0f17;cursor:pointer;box-shadow:0 6px 22px rgba(0,0,0,.22);
  backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);transition:transform .25s,background .25s,color .25s}
.theme-toggle:hover{transform:translateY(-1px)}
.theme-toggle:focus-visible{outline:3px solid #1559d6;outline-offset:3px}
html[data-theme=dark] .theme-toggle{background:rgba(23,23,23,.92);color:#f5f5f5;border-color:rgba(255,255,255,.28)}
[dir=rtl] .theme-toggle{left:auto;right:16px;bottom:84px}
@media (prefers-reduced-motion:reduce){.theme-toggle{transition:none}}

/* ---- LIGHT theme on the dark-default pages (index, english, product, dashboard, success, admin) ---- */
html[data-theme=light] body,html[data-theme=light] body.dark,html[data-theme=light] body.light{--bg:#fff;--fg:#0a0a0a;--line:#d4d4d4;--muted:#525252;background:#fff;color:#0a0a0a}
html[data-theme=light] body.china{--bg:#fff;--fg:#0a0a0a;--line:#d4d4d4;--muted:#525252}
html[data-theme=light] .chip:not(.ghost){background:rgba(0,0,0,.08)}
html[data-theme=light] .pcard-price .itv-opt[aria-checked=true]{background:#0a0a0a;color:#fff}
html[data-theme=light] .bk-err{color:#b42318}
html[data-theme=light] .ann-price .ann-was{opacity:.72}
html[data-theme] .pdp-card b{color:#737b88}
html[data-theme=light] .pdp-num b{color:#868e9a}
/* annual toggle: same red, darker first stop so white ink stays >= 4.5:1 in both themes */
html[data-theme] .ann-toggle .itv-opt.itv-annual[aria-checked=true]{background:linear-gradient(135deg,#c8102e,#a50d1f);color:#fff}

/* ---- DARK theme: dark-default pages stay dark even after the tour (body.light) ---- */
html[data-theme=dark] body,html[data-theme=dark] body.light,html[data-theme=dark] body.dark{--bg:#000;--fg:#f5f5f5;--line:#2e2e2e;--muted:#b3b3b3;background:#000;color:#f5f5f5}
html[data-theme=dark] .sheet{background:color-mix(in srgb,#0a0a0a 90%,transparent);color:#f5f5f5}
html[data-theme=dark] .sheet .lede{color:#b3b3b3}
html[data-theme=dark] .sheet .specs td{border-color:#2e2e2e}html[data-theme=dark] .sheet .specs td:first-child{color:#a3a3a3}

/* ---- DARK theme on the light-default AERA pages (item PDP, login, book) ---- */
html[data-theme=dark] body.pdp{--bg:#0b0f17;--fg:#eef1f5;--muted:#aab3c0;--line:#2a3442;--slate:#0f1724;--slate-2:#1a2638;background:#0b0f17;color:#eef1f5}
html[data-theme=dark] .pdp .hdr.pdp-hdr{background:rgba(17,24,36,.88);color:#eef1f5}
html[data-theme=dark] .pdp-nav,html[data-theme=dark] .pdp-nav.solid{background:rgba(17,24,36,.9);box-shadow:0 6px 28px rgba(0,0,0,.4)}
html[data-theme=dark] .pdp-nav a{color:#eef1f5}
html[data-theme=dark] .pdp-nav a.on,html[data-theme=dark] .pdp-nav a:hover{background:#1f2937}
html[data-theme=dark] .pdp-nav a.pdp-buy,html[data-theme=dark] .pdp-cta,html[data-theme=dark] .book .bk-btn.pdp-cta{background:#eef1f5;color:#0b0f17}
html[data-theme=dark] .pdp-cta.pdp-cta-light{background:#eef1f5;color:#0b0f17}
html[data-theme=dark] .pdp-dotlabel i{background:#eef1f5}
html[data-theme=dark] .pdp .pill{background:#eef1f5;color:#0b0f17}
html[data-theme=dark] .pdp .pill.ghost{background:transparent;color:#eef1f5;border-color:#4b5563}
html[data-theme=dark] .pdp-pay .itv{box-shadow:inset 0 0 0 1px #4b5563;color:#eef1f5}
html[data-theme=dark] .pdp-pay .itv-opt[aria-checked=true],html[data-theme=dark] .pdp .pcard-price .itv-opt[aria-checked=true]{background:#eef1f5;color:#0b0f17}
html[data-theme=dark] .pdp-pay .itv-opt:focus-visible{outline-color:#eef1f5}
html[data-theme=dark] .pdp .err,html[data-theme=dark] .book .bk-err{color:#fca5a5}
html[data-theme=dark] .pdp-num b{color:#6b7686}
html[data-theme=dark] .pdp-card,html[data-theme=dark] .pdp-contact{background:#141c28}
html[data-theme=dark] .pdp-card b{color:#8a94a3}
html[data-theme=dark] .pdp-form input,html[data-theme=dark] .pdp-form textarea{color:#eef1f5;border-bottom-color:#5b6472}
html[data-theme=dark] .pdp-form input:focus,html[data-theme=dark] .pdp-form textarea:focus{border-bottom-color:#eef1f5}
html[data-theme=dark] .pdp footer{background:#05080d}
html[data-theme=dark] .item-notes li{border-bottom-color:rgba(255,255,255,.12)}
html[data-theme=dark] .plan-note{color:#aab3c0}
html[data-theme=dark] .ae-progress{background:#eef1f5}
/* login card */
html[data-theme=dark] .login-ae .lg-card{background:rgba(17,24,36,.94);color:#eef1f5}
html[data-theme=dark] .login-ae .auth-tabs{box-shadow:inset 0 0 0 1px #4b5563}
html[data-theme=dark] .login-ae .auth-tabs .pill{background:transparent;color:#eef1f5}
html[data-theme=dark] .login-ae .auth-tabs .pill[aria-selected=true]{background:#eef1f5;color:#0b0f17}
html[data-theme=dark] .login-ae .lg-form input{color:#eef1f5;border-bottom-color:#5b6472}
html[data-theme=dark] .login-ae .lg-form input:focus{border-bottom-color:#eef1f5}
/* book */
html[data-theme=dark] .book .bk-form select,html[data-theme=dark] .book .bk-form input,html[data-theme=dark] .book .bk-form textarea{color:#eef1f5;border-bottom-color:#5b6472}
html[data-theme=dark] .book .bk-form select option{color:#0b0f17}
html[data-theme=dark] .book .bk-picked{background:#1f2937;color:#eef1f5}
html[data-theme=dark] .book .bk-link{color:#eef1f5}

/* ---- DARK theme on the Marketing editorial PDP (body.ed) ---- */
html[data-theme=dark] body.ed{--ink:#f2f2f2;--soft:#1a1a1a;--soft2:#141414;--mute:#b0b0b0;background:#0d0d0d;color:#f2f2f2}
html[data-theme=dark] .ed-pill-dark,html[data-theme=dark] .ed-nav a.ed-nav-cta{background:#f2f2f2;color:#0d0d0d}
html[data-theme=dark] .ed-pill-light{background:#1a1a1a;color:#f2f2f2}
html[data-theme=dark] .ed-nav,html[data-theme=dark] .ed-nav.solid{background:rgba(26,26,26,.94)}
html[data-theme=dark] .ed-hero{background:#000}
html[data-theme=dark] .ed-panel{background:#141414;color:#f2f2f2}
html[data-theme=dark] .ed-price .itv-opt[aria-checked="true"],html[data-theme=dark] .ed-price .pill,html[data-theme=dark] .ed-price .ann-off{background:#fff;color:#111}

/* ---- fixed-colour pills: identical in both themes (contrast >= 4.5 on white ink) ---- */
html[data-theme] .mk-pill{color:#fff}
html[data-theme] .mk-red{background:#d1132a;color:#fff}
html[data-theme] .mk-blue{background:#1559d6;color:#fff}
