/* BluePixel dark mode. Activated by html[data-theme="dark"]; light mode is untouched. */
html[data-theme="dark"]{
  color-scheme:dark;
  --bg:#0A0E1C;
  --surface:#111730;
  --surface-2:#171E3C;
  --blue:#8EA3FF;           /* accent for text, icons, borders */
  --blue-solid:#3D5AE0;     /* accent for filled buttons and badges */
  --blue-solid-hover:#4D69EE;
  --blue-600:#4D69EE;
  --blue-50:rgba(142,163,255,.10);
  --blue-100:rgba(142,163,255,.22);
  --navy:#0E1430;
  --navy-2:#151C3D;
  --ink:#EEF1FC;
  --body:#B4BAD7;
  --muted:#8B92B4;
  --line:rgba(160,176,255,.13);
  --tint:#0D1227;
  --net-rgb:142,163,255;
}
html[data-theme="dark"] body{background:var(--bg);color:var(--body)}

/* Surfaces that are white in light mode */
html[data-theme="dark"] :is(.drop,.mobile-menu,.menu-toggle,.btn-ghost,.ticker,.card,.plan,.c-item,.form,.list-card,.cities li,.loc-search,.loc-state,.loc-links a,
  .post-card,.cat-chips a,.calc-main,.calc-chip span,.cs-band,.cs-steps li,.cs-frame,.cs-results>div,.cs-card-box,.cs-card,.cs-arrow,.hub-tab,.hub-proof,
  .exit-card,.exit-close,.calc-tick,.cs-frame-bar span,.prob .ib,.float,.cs-cat,.empty-state,.author-box,.pager .page-numbers,.post-tags a){background:var(--surface)}
html[data-theme="dark"] :is(.cs-frame-bar,.help-card,.list-card.alt,.loc-city,.cs-stat,.tags span){background:var(--surface-2)}
html[data-theme="dark"] :is(.card,.plan,.post-card,.cs-card,.loc-state,.c-item,.form,.list-card,.calc-main,.hub-tab,.cs-band,.cs-card-box,.cs-results>div,.cs-steps li){border-color:var(--line)}

/* Header, top bar, footer, bottom bar */
html[data-theme="dark"] .site-header{background:rgba(10,14,28,.82)}
html[data-theme="dark"] .site-header.scrolled{box-shadow:0 8px 30px -18px rgba(0,0,0,.9)}
html[data-theme="dark"] :is(.topbar,.footer){background:#060914}
html[data-theme="dark"] .mbar{background:rgba(10,14,28,.96);border-top-color:var(--line)}
html[data-theme="dark"] .mbar a{border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] .nav-links>li>a:hover,html[data-theme="dark"] .drop-btn:hover,html[data-theme="dark"] .drop a:hover{background:var(--surface-2)}
html[data-theme="dark"] .mobile-menu .mm-main a{border-color:var(--line)}

/* Filled accent elements: deeper blue so white text stays readable */
html[data-theme="dark"] :is(.btn-primary,.cta-band,.badge,.calc-num,.cs-step-n,.cs-quote,.cs-dot.on,.hub-tab.on .ib,.pager .page-numbers.current,.prose .wp-block-button__link,.skip){background:var(--blue-solid)}
html[data-theme="dark"] .btn-primary{color:#fff;box-shadow:0 10px 26px -10px rgba(61,90,224,.7)}
html[data-theme="dark"] .btn-primary:hover{background:var(--blue-solid-hover)}
html[data-theme="dark"] .mbar a.book{background:var(--blue-solid);border-color:var(--blue-solid);color:#fff}
html[data-theme="dark"] :is(.calc-opt input:checked+.calc-opt-box .calc-tick,.calc-chip input:checked+span){background:var(--blue-solid);border-color:var(--blue-solid);color:#fff}
html[data-theme="dark"] .ticker li::after{background:var(--blue)}
html[data-theme="dark"] .cs-dot{background:rgba(160,176,255,.25)}
html[data-theme="dark"] .elementor .btn-primary{box-shadow:0 10px 26px -10px rgba(61,90,224,.7)}

/* Dark panels stay distinct from the page */
html[data-theme="dark"] :is(.panel,.plan.featured,.cs-cta-box,.step){border:1px solid var(--line)}
html[data-theme="dark"] .dark{background:#0C1129}
html[data-theme="dark"] .cs-hero{background:#0C1129}
html[data-theme="dark"] .btn-light{background:#fff;color:#0A0E1C}

/* Forms */
html[data-theme="dark"] :is(.field input,.field select,.field textarea,.calc-input){background:var(--tint);border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] :is(.field input:focus,.field select:focus,.field textarea:focus,.calc-input:focus-within){background:var(--surface);border-color:var(--blue)}
html[data-theme="dark"] ::placeholder{color:#6F7699}

/* Shadows read better slightly stronger on dark */
html[data-theme="dark"] :is(.cs-band,.form,.cs-frame,.exit-card){box-shadow:0 30px 70px -35px rgba(0,0,0,.85)}
html[data-theme="dark"] :is(a.card:hover,.cs-card:hover,.post-card:hover,.hub-tab.on){box-shadow:0 24px 60px -30px rgba(0,0,0,.9),0 0 0 1px rgba(142,163,255,.18)}

/* Photos and screenshots: tone down glare a touch */
html[data-theme="dark"] :is(.cs-frame-body img,.cs-card-img,.post-img,.cs-plain-img,.video-btn img){filter:brightness(.92)}

/* Footer wordmark and editor notices */
html[data-theme="dark"] .wordmark{-webkit-text-stroke-color:rgba(142,163,255,.14)}
html[data-theme="dark"] .exit-pop{background:rgba(3,5,12,.7)}

/* ---------- Theme toggle ---------- */
.theme-toggle{flex:none;border:0;background:none;padding:4px;cursor:pointer;border-radius:999px;-webkit-tap-highlight-color:transparent}
.tt-track{position:relative;display:block;width:62px;height:32px;border-radius:999px;background:var(--tint);border:1px solid var(--line);box-shadow:inset 0 1px 3px rgba(26,26,46,.12);transition:background .4s,border-color .4s}
.tt-icon{position:absolute;top:50%;width:16px;height:16px;margin-top:-8px;display:grid;place-items:center;color:var(--muted);transition:opacity .3s}
.tt-icon svg{width:14px;height:14px}
.tt-sun{left:9px}.tt-moon{right:9px}
.tt-knob{position:absolute;top:3px;left:3px;width:24px;height:24px;border-radius:50%;background:#fff;box-shadow:0 2px 8px rgba(16,42,149,.25),0 0 0 1px rgba(16,42,149,.06);display:grid;place-items:center;color:#102A95;transition:transform .45s cubic-bezier(.65,0,.35,1),background .4s,color .4s}
.tt-knob svg{width:14px;height:14px;transition:transform .5s cubic-bezier(.65,0,.35,1)}
.tt-knob .k-moon{display:none}
.tt-stars{position:absolute;inset:0;border-radius:inherit;overflow:hidden;opacity:0;transition:opacity .4s}
.tt-stars i{position:absolute;width:2px;height:2px;border-radius:50%;background:#fff}
.tt-stars i:nth-child(1){left:12px;top:8px}.tt-stars i:nth-child(2){left:20px;top:19px;width:1.5px;height:1.5px}.tt-stars i:nth-child(3){left:9px;top:21px;width:1px;height:1px}
.theme-toggle:hover .tt-track{border-color:var(--blue)}
.theme-toggle:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
html[data-theme="dark"] .tt-track{background:#0D1330;border-color:rgba(142,163,255,.3);box-shadow:inset 0 1px 4px rgba(0,0,0,.6),0 0 18px -6px rgba(142,163,255,.6)}
html[data-theme="dark"] .tt-knob{transform:translateX(30px) rotate(360deg);background:#1C2558;color:#C9D3FF;box-shadow:0 0 12px rgba(142,163,255,.55)}
html[data-theme="dark"] .tt-knob .k-sun{display:none}
html[data-theme="dark"] .tt-knob .k-moon{display:block}
html[data-theme="dark"] .tt-moon{opacity:0}
html[data-theme="dark"] .tt-sun{opacity:.6}
html[data-theme="dark"] .tt-stars{opacity:1}
html:not([data-theme="dark"]) .tt-sun{opacity:0}
.nav .theme-toggle{margin-left:auto}
@media(min-width:1080px){.nav .theme-toggle{margin-left:0}}
.topbar .theme-toggle{display:none}

/* ---------- Switch animation ---------- */
::view-transition-old(root),::view-transition-new(root){animation:none;mix-blend-mode:normal}
::view-transition-new(root){animation:bp-reveal .65s cubic-bezier(.65,0,.35,1)}
@keyframes bp-reveal{from{clip-path:circle(0 at var(--vt-x,50%) var(--vt-y,0))}to{clip-path:circle(var(--vt-r,150vmax) at var(--vt-x,50%) var(--vt-y,0))}}
html.theme-fade,html.theme-fade *,html.theme-fade *::before,html.theme-fade *::after{transition:background-color .35s ease,color .35s ease,border-color .35s ease,box-shadow .35s ease!important}
@media(prefers-reduced-motion:reduce){::view-transition-new(root){animation:none}.tt-knob,.tt-knob svg{transition:none}}
html[data-theme="dark"] .form-msg{background:rgba(220,60,60,.16);color:#FFC9C9}
html[data-theme="dark"] .form-msg.ok{background:rgba(37,211,102,.14);color:#B6F0CB}
