/* v6 DARK mode (Lee 2 Dec: "a light and dark mode ... light purple against dark background ... a little bit more
   professional. Just have a toggle"). Light is the default. html[data-v6-mode="dark"] is set by the header toggle.
   Loaded last (file name sorts after the page files), so it wins over every v6 page file. */

/* the toggle (both modes) */
.v6-mode{display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;margin-right:8px;flex:none;border-radius:50%;
  border:1px solid var(--v6-line2);background:rgba(255,255,255,.8);color:var(--v6-navy);cursor:pointer;transition:background .2s,transform .2s}
.v6-mode:hover{transform:rotate(-12deg)}
.v6-mode:focus-visible{outline:2px solid var(--v6-cobalt);outline-offset:2px}
.v6-mode svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}
.v6-mode .v6-mode__moon{fill:currentColor;stroke:none}
.v6-mode .v6-mode__sun{display:none}
html[data-v6-mode="dark"] .v6-mode .v6-mode__sun{display:block}
html[data-v6-mode="dark"] .v6-mode .v6-mode__moon{display:none}

/* ---------- dark tokens ---------- */
html[data-v6-mode="dark"]{
  color-scheme:dark;
  --v6-navy:#eef1ff; --v6-ink:#dfe4fb; --v6-ink2:#b3bbdb; --v6-mute:#8790b4; --v6-line:rgba(255,255,255,.08); --v6-line2:rgba(255,255,255,.16);
  --v6-cobalt:#9db4ff; --v6-violet:#c4b5ff; --v6-rose:#f0a6c8; --v6-amber:#ffc978; --v6-sky:#8fd0ff;
  --v6-bg:#0b1130; --v6-bg2:#121a3f; --v6-card:#111a3d;
  --v6-good:#9db4ff; --v6-good-t:rgba(157,180,255,.12); --v6-warn:#ffc978; --v6-warn-t:rgba(255,201,120,.12); --v6-bad:#f0a6c8; --v6-bad-t:rgba(240,166,200,.12);
  /* no loud purple: a calm lavender to soft blue */
  --v6-grad:linear-gradient(100deg,#c9bcff 0%,#a9c0ff 60%,#bfe3ff 100%);
  --v6-shadow:0 1px 0 rgba(255,255,255,.04) inset,0 20px 50px -30px rgba(0,0,0,.7);
  --v6-shadow-sm:0 10px 24px -14px rgba(0,0,0,.6);
  --ink:#e6eaff; --ink-2:#b3bbdb; --muted:#8790b4; --line:rgba(255,255,255,.08); --line-strong:rgba(255,255,255,.16); --surface:#111a3d; --bg:#0b1130;
  --tint:rgba(157,180,255,.10); --tint-2:rgba(157,180,255,.14); --accent:#9db4ff; --accent-ink:#b8c8ff;
  background:#050817!important;background-image:radial-gradient(rgba(255,255,255,.07) 1px,transparent 1.2px)!important;
}
html[data-v6-mode="dark"] body{background:var(--v6-bg)!important;color:var(--v6-ink)!important;
  box-shadow:0 0 0 1px rgba(255,255,255,.06),0 30px 80px -40px rgba(0,0,0,.9)!important}
html[data-v6-mode="dark"] body::before{background:radial-gradient(rgba(255,255,255,.05) 1px,transparent 1.2px) 0 0/22px 22px}
html[data-v6-mode="dark"] body::after{opacity:.35;
  background:radial-gradient(38vmax 30vmax at 12% 8%,rgba(120,150,255,.18),transparent 70%),radial-gradient(34vmax 28vmax at 88% 14%,rgba(170,150,255,.14),transparent 70%),
             radial-gradient(30vmax 26vmax at 70% 90%,rgba(120,180,255,.10),transparent 70%)}

/* text everywhere (many older layers print dark text inline) */
html[data-v6-mode="dark"] :is(h1,h2,h3,h4,h5,h6,.tskn-h1,.ua-phero__h1,#ua-h1){color:#f1f3ff!important}
html[data-v6-mode="dark"] :is(p,li,td,th,dd,dt,span,label,small,figcaption,blockquote,cite){color:inherit}
html[data-v6-mode="dark"] main,html[data-v6-mode="dark"] .ua-main,html[data-v6-mode="dark"] section{color:var(--v6-ink)}
html[data-v6-mode="dark"] [style*="color:#0B1B4A" i]:not(.uh-app *):not(.uh-w *):not(.v6-shot *),html[data-v6-mode="dark"] [style*="color:#0A1640" i]:not(.uh-app *):not(.uh-w *):not(.v6-shot *),html[data-v6-mode="dark"] [style*="color:#0e1a33" i]:not(.uh-app *):not(.uh-w *):not(.v6-shot *),
html[data-v6-mode="dark"] [style*="color:#26324a" i]:not(.uh-app *):not(.uh-w *):not(.v6-shot *),html[data-v6-mode="dark"] [style*="color:#151d3f" i]:not(.uh-app *):not(.uh-w *):not(.v6-shot *),html[data-v6-mode="dark"] [style*="color:#0a1235" i]:not(.uh-app *):not(.uh-w *):not(.v6-shot *){color:#e6eaff!important}
html[data-v6-mode="dark"] [style*="color:#586684" i]:not(.uh-app *):not(.uh-w *):not(.v6-shot *),html[data-v6-mode="dark"] [style*="color:#7A86A8" i]:not(.uh-app *):not(.uh-w *):not(.v6-shot *),html[data-v6-mode="dark"] [style*="color:#4d5a70" i]:not(.uh-app *):not(.uh-w *):not(.v6-shot *){color:#97a0c4!important}
html[data-v6-mode="dark"] [style*="color:#2456F0" i]:not(.uh-app *):not(.uh-w *):not(.v6-shot *),html[data-v6-mode="dark"] [style*="color:#2a5bf5" i]:not(.uh-app *):not(.uh-w *):not(.v6-shot *){color:#a9bcff!important}
html[data-v6-mode="dark"] a{color:#a9bcff}
html[data-v6-mode="dark"] a:hover{color:#d3dcff}
html[data-v6-mode="dark"] :is(.tskn-lede,.ua-phero__lede,.uh-lede,.v6-what){color:#b3bbdb!important}

/* surfaces: every white card becomes a dark glass card */
html[data-v6-mode="dark"] :is([style*="background:#fff" i],[style*="background: #fff" i],[style*="background:#ffffff" i],[style*="background-color:#fff" i],[style*="background:rgba(255,255,255" i]){background:rgba(255,255,255,.04)!important}
html[data-v6-mode="dark"] :is(.tskn-newscard,.tskn-panel,.t32-panel,.uh-w,.uh-plan,.uh-prod,.uh-real__in,.uh-end__in,.ua-card,.ua-paper,.uf-card,.uf-az,.uf-strip,
  .tskn-row,.t32-row,[class*="__card"],[class*="-card"],.ua-box,.uh-box,.uh-c,.ursy-citebox,.tskn-otp,.tskn-otp-in,.ua-table){
  background:linear-gradient(180deg,rgba(255,255,255,.055),rgba(255,255,255,.03))!important;border-color:rgba(255,255,255,.09)!important;outline-color:rgba(255,255,255,.06)!important;
  box-shadow:var(--v6-shadow)!important;color:var(--v6-ink)}
html[data-v6-mode="dark"] :is(input,textarea,select){background:#0e1638!important;color:#e6eaff!important;border-color:rgba(255,255,255,.16)!important}
html[data-v6-mode="dark"] ::placeholder{color:#7f89b0!important}
html[data-v6-mode="dark"] :is(table th,table td){border-color:rgba(255,255,255,.08)!important}
html[data-v6-mode="dark"] :is(code,pre,kbd){background:rgba(255,255,255,.06)!important;color:#dfe4ff!important}
html[data-v6-mode="dark"] hr{border-color:rgba(255,255,255,.1)!important}

/* header: dark glass pill, light text */
html[data-v6-mode="dark"] .ua-hd__row{background:rgba(14,21,52,.78)!important;border-color:rgba(255,255,255,.08)!important;outline-color:rgba(255,255,255,.06)!important}
html[data-v6-mode="dark"] .ua-nav a{color:#c4cbe9!important}
html[data-v6-mode="dark"] .ua-nav a:hover{background:rgba(255,255,255,.07)!important;color:#fff!important}
html[data-v6-mode="dark"] .ua-nav a.is-on,html[data-v6-mode="dark"] .ua-nav a[aria-current]{background:#e9ecff!important;color:#0b1130!important}
html[data-v6-mode="dark"] .ua-logo__word span{color:#f1f3ff!important}
html[data-v6-mode="dark"] .ua-hd__cta,html[data-v6-mode="dark"] .tskn-h-dark,html[data-v6-mode="dark"] .ua-btn{background:#e9ecff!important;color:#0b1130!important}
html[data-v6-mode="dark"] .tskn-h-ghost{background:rgba(255,255,255,.05)!important;color:#e6eaff!important;border-color:rgba(255,255,255,.16)!important}
html[data-v6-mode="dark"] .v6-mode{background:rgba(255,255,255,.06);color:#ffe2a8;border-color:rgba(255,255,255,.14)}
html[data-v6-mode="dark"] .ua-menu{background:rgba(255,255,255,.06)!important;color:#e6eaff!important;border-color:rgba(255,255,255,.16)!important}

/* announcement line + footer sit a shade deeper than the page */
html[data-v6-mode="dark"] .v6-bar,html[data-v6-mode="dark"] .ua-ft,html[data-v6-mode="dark"] .ua-ft3{background:#070c26!important}
html[data-v6-mode="dark"] .v6-bar::before,html[data-v6-mode="dark"] .ua-ft3::before{opacity:.35}

/* chips and pills */
html[data-v6-mode="dark"] :is(.uh-c,.uh-pill,.uf-fact,.uh-chip,[class*="__chip"],[class*="-chip"],.tskn-pnav):not(.uh-app *):not(.uh-w *):not(.v6-shot *){background:rgba(255,255,255,.06)!important;color:#d6dcf7!important;border-color:rgba(255,255,255,.12)!important}
html[data-v6-mode="dark"] .ursy-citebox a.uab-pl{background:rgba(255,255,255,.05)!important;color:#b8c8ff!important;border-color:rgba(255,255,255,.12)!important}
html[data-v6-mode="dark"] .ursy-citebox a.uab-pl:hover{background:#e9ecff!important;color:#0b1130!important}
html[data-v6-mode="dark"] .ursy-citebox .uab-cols,html[data-v6-mode="dark"] .ursy-citebox .uab-ref{background:rgba(255,255,255,.025)!important}
html[data-v6-mode="dark"] .ursy-copy{background:rgba(255,255,255,.06)!important;color:#e6eaff!important;border-color:rgba(255,255,255,.14)!important}

/* small "screenshot" visuals (home example report, product card visuals, any .v6-shot) keep their light look in dark mode */
html[data-v6-mode="dark"] :is(.uh-app,.uh-w,.v6-shot){--v6-navy:#0a1235;--v6-ink:#151d3f;--v6-ink2:#3b4566;--v6-mute:#6a7391;--v6-cobalt:#2a5bf5;--v6-good-t:#e9effe;
  --ink:#0e1a33;--ink-2:#26324a;--muted:#4d5a70;--line:#e3e8ef;--line-strong:#c8d0dc;--surface:#fff;--bg:#f6f8fb;color:#151d3f}
html[data-v6-mode="dark"] :is(.uh-app,.uh-w,.v6-shot) :is(p,span,b,li,small,strong,em){color:inherit}
html[data-v6-mode="dark"] .uh-w{background:#f7f8fd!important}
