/* MalGuard day/night — Nora: auto / light / dark. Night look kept; night text never black. */
.mg-theme-toggle{
  position:fixed;top:14px;left:14px;z-index:10050;
  width:40px;height:40px;padding:0;border-radius:999px;
  border:1px solid rgba(255,255,255,.28);
  background:rgba(8,8,10,.62);color:#f4f4f5;
  backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);
  display:grid;place-items:center;cursor:pointer;
  box-shadow:0 8px 24px #0007;
}
.mg-theme-toggle:hover,.mg-theme-toggle:focus-visible{background:rgba(255,255,255,.16)}
.mg-theme-toggle:focus-visible{outline:2px solid #ddd;outline-offset:3px}
.mg-theme-toggle svg{width:18px;height:18px;display:block}
html.theme-light .mg-theme-toggle,
html[data-theme=light] .mg-theme-toggle{
  border-color:rgba(0,0,0,.18);background:rgba(255,255,255,.86);color:#111;
  box-shadow:0 8px 24px #0002;
}

html.theme-light,html[data-theme=light]{color-scheme:light}
html.theme-dark,html[data-theme=dark]{color-scheme:dark}

/* Night: keep space look; force light text (never black). */
html.theme-dark body,
html.theme-dark body.mg-deep-space,
html.theme-dark body.ai-product-page,
html.theme-dark body.mg-precision-shared,
html[data-theme=dark] body,
html[data-theme=dark] body.mg-deep-space,
html[data-theme=dark] body.ai-product-page,
html[data-theme=dark] body.mg-precision-shared{
  color:#f4f5f7!important;
}
html.theme-dark :is(h1,h2,h3,h4,.hero h1,.ai-product-hero h1,.ai-section-title>h2,.ai-platform-copy h3),
html[data-theme=dark] :is(h1,h2,h3,h4,.hero h1,.ai-product-hero h1,.ai-section-title>h2,.ai-platform-copy h3){
  color:#f5f5f5!important;
}
html.theme-dark :is(p,li,.hero-description,.hero-statement,.ai-platform-copy p,.ai-product-hero p,.ai-section-title>p,.ai-product-note p),
html[data-theme=dark] :is(p,li,.hero-description,.hero-statement,.ai-platform-copy p,.ai-product-hero p,.ai-section-title>p,.ai-product-note p){
  color:#c9cdd6!important;
}
html.theme-dark .ai-product-page :is(.ai-product-header-cta,.ai-product-primary,.ai-platform-action),
html[data-theme=dark] .ai-product-page :is(.ai-product-header-cta,.ai-product-primary,.ai-platform-action){
  color:#f0f2f6!important;
}

/* Day sky (morning / afternoon) — beat deep-space specificity. */
html.theme-light:root body.mg-deep-space.mg-deep-space.mg-deep-space.mg-deep-space,
html[data-theme=light]:root body.mg-deep-space.mg-deep-space.mg-deep-space.mg-deep-space,
html.theme-light body,
html.theme-light body.mg-deep-space,
html.theme-light body.ai-product-page,
html.theme-light body.mg-precision-shared,
html[data-theme=light] body,
html[data-theme=light] body.mg-deep-space,
html[data-theme=light] body.ai-product-page,
html[data-theme=light] body.mg-precision-shared{
  background-color:#6EB5E8!important;
  background-image:linear-gradient(180deg,#5BA3D9 0%,#8EC8EC 22%,#C5E4F7 52%,#F3F7FB 78%,#FFF8EF 100%)!important;
  background-size:auto!important;background-repeat:no-repeat!important;background-attachment:scroll!important;
  color:#111318!important;
}

html.theme-light:root body.mg-deep-space.mg-deep-space.mg-deep-space::before,
html.theme-light:root body.mg-deep-space.mg-deep-space.mg-deep-space::after,
html[data-theme=light]:root body.mg-deep-space.mg-deep-space.mg-deep-space::before,
html[data-theme=light]:root body.mg-deep-space.mg-deep-space.mg-deep-space::after,
html.theme-light body.mg-deep-space>.particle-atmosphere,
html[data-theme=light] body.mg-deep-space>.particle-atmosphere,
html.theme-light .particle-atmosphere,
html[data-theme=light] .particle-atmosphere{
  display:none!important;
}

html.theme-light body.mg-precision-shared,
html[data-theme=light] body.mg-precision-shared{
  --mg-bg:#E8F4FC;--mg-surface:#ffffff;--mg-text:#111318;--mg-muted:#3d4a5c;--mg-line:#b7c7db;--mg-accent:#1f4f8a;
  --bg:#E8F4FC;--panel:#ffffff;--panel2:#eef5fc;--surface:#ffffff;--text:#111318;--muted:#3d4a5c;--line:#b7c7db;
  --blue:#1f4f8a;--blue2:#163a66;--cyan:#1f4f8a;
}
html.theme-light body.mg-precision-shared main,
html[data-theme=light] body.mg-precision-shared main{color:#111318}
html.theme-light body.mg-precision-shared main :is(h1,h2,h3,h4),
html[data-theme=light] body.mg-precision-shared main :is(h1,h2,h3,h4){color:#0b1220!important}
html.theme-light body.mg-precision-shared main :is(p,li),
html[data-theme=light] body.mg-precision-shared main :is(p,li){color:#334155}
html.theme-light body.mg-precision-shared main :is(.card,.product-entry,.tool,.compare,.compare-card,.notice,.platform-card,.release-card,.result-card,.timeline .step,.secure-card,.feature-card,.radar-card,.product,.mg-home-product),
html[data-theme=light] body.mg-precision-shared main :is(.card,.product-entry,.tool,.compare,.compare-card,.notice,.platform-card,.release-card,.result-card,.timeline .step,.secure-card,.feature-card,.radar-card,.product,.mg-home-product),
html.theme-light:root body.mg-deep-space #products .product,
html.theme-light:root body.mg-deep-space main :is(.product,.mg-home-product,.card,.compare-card),
html[data-theme=light]:root body.mg-deep-space #products .product,
html[data-theme=light]:root body.mg-deep-space main :is(.product,.mg-home-product,.card,.compare-card){
  background-color:#fff!important;
  background-image:none!important;
  border-color:#b7c7db!important;color:#111318!important;
  box-shadow:0 10px 28px rgba(31,79,138,.08);
}
html.theme-light .ai-product-header,
html.theme-light .ai-product-footer,
html.theme-light .ai-platform-card,
html.theme-light .ai-product-note,
html[data-theme=light] .ai-product-header,
html[data-theme=light] .ai-product-footer,
html[data-theme=light] .ai-platform-card,
html[data-theme=light] .ai-product-note{border-color:#b7c7db}
html.theme-light .ai-platform-card,
html[data-theme=light] .ai-platform-card{background:#fff;color:#111318}
html.theme-light .ai-platform-copy p,
html.theme-light .ai-product-hero p:not(.eyebrow),
html.theme-light .ai-section-title>p:not(.eyebrow),
html.theme-light .ai-product-note p,
html[data-theme=light] .ai-platform-copy p,
html[data-theme=light] .ai-product-hero p:not(.eyebrow),
html[data-theme=light] .ai-section-title>p:not(.eyebrow),
html[data-theme=light] .ai-product-note p{color:#3d4a5c}
html.theme-light .ai-product-page :is(h1,h2,h3,.ai-section-title>h2,.ai-platform-copy h3),
html[data-theme=light] .ai-product-page :is(h1,h2,h3,.ai-section-title>h2,.ai-platform-copy h3){color:#0b1220!important}
html.theme-light .ai-product-page :is(.ai-product-header-cta,.ai-product-primary,.ai-platform-action),
html[data-theme=light] .ai-product-page :is(.ai-product-header-cta,.ai-product-primary,.ai-platform-action){
  background:rgba(31,79,138,.08);border-color:#8eabc9;color:#0b1220;
}
html.theme-light .nav,
html.theme-light .mg-context-header,
html.theme-light .site-header,
html.theme-light .ai-product-header,
html[data-theme=light] .nav,
html[data-theme=light] .mg-context-header,
html[data-theme=light] .site-header,
html[data-theme=light] .ai-product-header{
  background:rgba(245,250,255,.92)!important;color:#0b1220!important;
  border-color:rgba(183,199,219,.85);
}
html.theme-light .ai-product-footer,
html[data-theme=light] .ai-product-footer{
  background:rgba(245,250,255,.95)!important;color:#334155!important;
}
html.theme-light body.ai-shell,
html.theme-light #app,
html[data-theme=light] body.ai-shell,
html[data-theme=light] #app{
  background:transparent!important;color:#111318!important;
}
@media(max-width:760px){
  .mg-theme-toggle{top:10px;left:10px;width:36px;height:36px}
}


/* Light: readable muted copy + light nav (beat night defaults). */
html.theme-light,
html[data-theme=light],
html.theme-light body,
html[data-theme=light] body,
html.theme-light body.precision-home,
html[data-theme=light] body.precision-home{
  --bg:#E8F4FC;--text:#111318;--muted:#334155;--line:#b7c7db;--accent:#1f4f8a;
  color:#111318!important;
}
html.theme-light :is(.eyebrow,.hero-description,.hero-statement,.section-description,.activity-caption,.button.quiet,.text-link,.section-intro>.text-link,.footer-brand p,.footer-main nav a,.footer-bottom,.limit,.principles p,.metric dt,.prototype-label),
html[data-theme=light] :is(.eyebrow,.hero-description,.hero-statement,.section-description,.activity-caption,.button.quiet,.text-link,.section-intro>.text-link,.footer-brand p,.footer-main nav a,.footer-bottom,.limit,.principles p,.metric dt,.prototype-label){
  color:#334155!important;
}
html.theme-light :is(.hero h1,.hero-statement,.section-intro>h2,.principles h3,.brand b),
html[data-theme=light] :is(.hero h1,.hero-statement,.section-intro>h2,.principles h3,.brand b){
  color:#0b1220!important;
}
html.theme-light .button.primary,
html[data-theme=light] .button.primary{
  background:#0b1220!important;color:#f5f5f5!important;border-color:#0b1220!important;
}
html.theme-light .button.quiet:hover,
html.theme-light .text-link:hover,
html.theme-light .footer-main nav a:hover,
html[data-theme=light] .button.quiet:hover,
html[data-theme=light] .text-link:hover,
html[data-theme=light] .footer-main nav a:hover{
  color:#0b1220!important;
}
html.theme-light .tiny-dot,
html[data-theme=light] .tiny-dot{background:#1f4f8a!important}

/* Home pill nav stays dark in night CSS — force day glass. */
html.theme-light .precision-home #navbar.nav,
html[data-theme=light] .precision-home #navbar.nav{
  background:rgba(245,250,255,.94)!important;
  border-color:rgba(31,79,138,.22)!important;
  color:#0b1220!important;
  box-shadow:0 8px 30px rgba(31,79,138,.12)!important;
}
html.theme-light .precision-home #navbar .mg-brand,
html.theme-light .precision-home #navbar .mg-primary-links a,
html.theme-light .precision-home #navbar :is(.nav-icon,.menu-btn,.nav-download),
html[data-theme=light] .precision-home #navbar .mg-brand,
html[data-theme=light] .precision-home #navbar .mg-primary-links a,
html[data-theme=light] .precision-home #navbar :is(.nav-icon,.menu-btn,.nav-download){
  color:#0b1220!important;
}
html.theme-light .precision-home #navbar :is(.nav-icon,.menu-btn,.nav-download),
html[data-theme=light] .precision-home #navbar :is(.nav-icon,.menu-btn,.nav-download){
  border-color:rgba(31,79,138,.28)!important;
  background:rgba(31,79,138,.06)!important;
}
html.theme-light .precision-home #navbar .menu-glyph span,
html[data-theme=light] .precision-home #navbar .menu-glyph span{background:#0b1220!important}
html.theme-light .precision-home #navbar .nav-links,
html[data-theme=light] .precision-home #navbar .nav-links{
  background:rgba(245,250,255,.98)!important;
  border-color:rgba(31,79,138,.22)!important;
}
html.theme-light .precision-home #navbar .nav-links :is(a,button),
html[data-theme=light] .precision-home #navbar .nav-links :is(a,button){
  color:#0b1220!important;
}

/* AI product: pale muted leftovers */
html.theme-light .ai-product-page :is(.eyebrow,.ai-platform-status,nav a),
html[data-theme=light] .ai-product-page :is(.eyebrow,.ai-platform-status,nav a){
  color:#334155!important;
}
html.theme-light .ai-platform-copy p,
html.theme-light .ai-product-hero p:not(.eyebrow),
html.theme-light .ai-section-title>p:not(.eyebrow),
html.theme-light .ai-product-note p,
html[data-theme=light] .ai-platform-copy p,
html[data-theme=light] .ai-product-hero p:not(.eyebrow),
html[data-theme=light] .ai-section-title>p:not(.eyebrow),
html[data-theme=light] .ai-product-note p{
  color:#334155!important;
}
