/* Dark mode: html[data-theme="dark"], switched with the header toggle and remembered in localStorage.
   Only surfaces and text colours change; layout and brand colours stay as they are. */
html[data-theme="dark"]{
  color-scheme:dark;
  --bg:#15142a;--white:#0f0e1d;--ink:#f1f1f8;--text:#bfc0d6;--muted:#9a9bb5;--line:#2b2a46;
  --indigo:#a79fff;--indigo-d:#6f63e8;
  --shadow:0 10px 30px rgba(0,0,0,.45);--shadow-lg:0 24px 60px rgba(0,0,0,.6);
  --surface:#181731;
}
html[data-theme="dark"] body{background:#0e0d1c;color:var(--text)}

/* surfaces */
html[data-theme="dark"] .card,html[data-theme="dark"] .pcard,html[data-theme="dark"] .stat,
html[data-theme="dark"] .form,html[data-theme="dark"] .calc,html[data-theme="dark"] .faq details,
html[data-theme="dark"] .guide,html[data-theme="dark"] .choice-card,html[data-theme="dark"] .step,
html[data-theme="dark"] .cmp,html[data-theme="dark"] .co{background:var(--surface);border-color:var(--line)}
html[data-theme="dark"] .field input,html[data-theme="dark"] .field textarea,html[data-theme="dark"] .calc select,
html[data-theme="dark"] .calc textarea{background:#0f0e1d;border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] .field input:focus,html[data-theme="dark"] .field textarea:focus{background:#0b0a16;border-color:var(--indigo);box-shadow:0 0 0 4px rgba(167,159,255,.2)}
html[data-theme="dark"] .seg label{background:#0f0e1d;border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] .seg input:checked+label{background:rgba(227,6,19,.16);color:#ff8089;border-color:var(--red)}
html[data-theme="dark"] .money span{color:var(--muted)}
html[data-theme="dark"] .alert.ok{background:#0f2a1c;color:#7be0a6}
html[data-theme="dark"] .alert.err{background:#33110f;color:#ff9a92}
html[data-theme="dark"] .calc .bill-err{color:#ff9a92}
html[data-theme="dark"] .calc.result .est tfoot td{color:#ff8089}
html[data-theme="dark"] .calc.result .est tfoot th,html[data-theme="dark"] .calc.result .est tfoot td{border-top-color:var(--ink)}
html[data-theme="dark"] .stepper .dot{background:#0f0e1d}
html[data-theme="dark"] .chips span{background:var(--surface);border-color:var(--line)}
html[data-theme="dark"] .mini-row .money input{background:#0f0e1d;border-color:var(--line)}
html[data-theme="dark"] .text-link{color:var(--indigo)}
html[data-theme="dark"] .crumbs,html[data-theme="dark"] .xlink{background:var(--bg);border-color:var(--line)}
html[data-theme="dark"] .article blockquote{background:var(--bg)}
html[data-theme="dark"] .disclaimer{background:var(--bg);border-color:var(--line);color:var(--text)}

/* text that was brand blue on white */
html[data-theme="dark"] .btn-dark{background:var(--brand-blue);color:#fff}
html[data-theme="dark"] .btn-dark:hover{background:#4a3aa8}
html[data-theme="dark"] .btn-outline:hover{background:#fff;color:var(--brand-blue)}
html[data-theme="dark"] .cmp thead th{background:var(--brand-blue);color:#fff}
html[data-theme="dark"] .kicker,html[data-theme="dark"] .opt .opt-tag,html[data-theme="dark"] .guide .go{color:#ff6a74}
html[data-theme="dark"] .article a,html[data-theme="dark"] .crumbs a{color:var(--indigo)}
html[data-theme="dark"] .theme-ci{--red:#8f83f0}
html[data-theme="dark"] .theme-ci .btn-primary{background:#5a49d6;color:#fff}
html[data-theme="dark"] .theme-ci .stat b,html[data-theme="dark"] .theme-ci .facts b{color:#b7afff}
html[data-theme="dark"] .facts b{color:#ff6a74}
html[data-theme="dark"] .stat b{color:#ff6a74}
html[data-theme="dark"] .partner-logos img{background:#fff}

/* header */
html[data-theme="dark"] .header-main{background:#0f0e1c;border-bottom-color:var(--line);box-shadow:0 4px 20px rgba(0,0,0,.5)}
html[data-theme="dark"] .logo-brand{background:#fff;padding:4px 12px}
html[data-theme="dark"] .profile-submenu{background:#181731;border-color:var(--line)}
html[data-theme="dark"] .profile-submenu::after{background:#181731;border-color:var(--line)}
html[data-theme="dark"] .profile-submenu-link{color:#e6e5ff!important}
html[data-theme="dark"] .profile-submenu-link:hover,html[data-theme="dark"] .profile-submenu-link:focus,html[data-theme="dark"] .profile-submenu-link.active{background:rgba(255,255,255,.07);color:#fff!important}
html[data-theme="dark"] .nav-purple-pill-bar{background:#2a1f66}

/* the pointer becomes a light: bright core, blurred edges */
#cursorGlow{position:fixed;left:0;top:0;width:34px;height:34px;margin:-17px 0 0 -17px;border-radius:50%;pointer-events:none;z-index:2147483000;opacity:0;
  background:radial-gradient(circle,#fff 0,rgba(255,255,255,.96) 16%,rgba(255,255,255,.6) 36%,rgba(196,204,255,.26) 58%,rgba(196,204,255,0) 72%);
  box-shadow:0 0 18px 7px rgba(255,255,255,.5),0 0 64px 30px rgba(150,160,255,.26);
  filter:blur(1.4px);mix-blend-mode:screen;transition:opacity .25s ease,width .18s ease,height .18s ease,margin .18s ease;will-change:transform}
#cursorGlow.on{opacity:1}
#cursorGlow.hot{width:54px;height:54px;margin:-27px 0 0 -27px}
#cursorGlow.down{width:22px;height:22px;margin:-11px 0 0 -11px}
@media(pointer:fine){
  html[data-theme="dark"].has-glow,html[data-theme="dark"].has-glow *{cursor:none!important}
}
@media(pointer:coarse){#cursorGlow{display:none}}
@media(prefers-reduced-motion:reduce){#cursorGlow{transition:none}}
