/* InfinityLogz theme. Light is the default and lives in each stylesheet (every token below falls back to the original colour).
   Dark mode = the same names, redefined here. Toggle: window.ILTheme (public/assets/js/theme.js) sets <html data-theme="dark">. */
html:root[data-theme="dark"],
html[data-theme="dark"] :is(.od,.sl,.pd,.dm,.ps,.prod-list){   /* :root beats the legacy main.css dark block */
  color-scheme:dark;
  /* tokens used by converted hard-coded colours */
  --tk-bg:#0f141b;--tk-surf:#171e29;--tk-line:#263142;--tk-ink:#e8edf5;--tk-ink2:#b9c4d4;--tk-mut:#8e9bb1;--tk-sub:#66738a;
  --tk-okb:rgba(74,222,128,.13);--tk-ok:#4ade80;--tk-warnb:rgba(251,191,36,.14);--tk-warn:#fbbf24;
  --tk-badb:rgba(255,90,82,.15);--tk-bad:#ff8a84;--tk-infob:rgba(96,165,250,.15);--tk-info:#8bb4ff;
  /* variables the pages already define */
  --bg:#0f141b;--surf:#171e29;--fg:#e8edf5;--m:#8e9bb1;--s:#66738a;--bd:rgba(255,255,255,.09);
  --ink:#e8edf5;--line:#263142;--line2:#323f53;--mut:#8e9bb1;--soft:#171e29;--canvas:#0b1016;
  --ok:#4ade80;--okb:rgba(74,222,128,.13);--warn:#fbbf24;--warnb:rgba(251,191,36,.14);
  --bad:#ff8a84;--badb:rgba(255,90,82,.15);--info:#8bb4ff;--infob:rgba(96,165,250,.15);
  --c-bg:#0f141b;--c-ink:#e8edf5;--c-line:#263142;--c-mut:#8e9bb1;--c-soft:#171e29;--c-bad:#ff8a84;--c-ok:#4ade80;
  --red-l:rgba(229,57,53,.14);--red-t:rgba(229,57,53,.14);--r-tint:rgba(229,57,53,.14);--r-soft:rgba(229,57,53,.32);
  --rl:rgba(229,57,53,.15);--rl2:rgba(229,57,53,.26);--psr-l:rgba(229,57,53,.14);--grn-l:rgba(74,222,128,.12);
  --sh:0 1px 6px rgba(0,0,0,.35);--sh2:0 6px 22px rgba(0,0,0,.45);
  --white:#0f141b;--surface:#171e29;--border:#263142;--muted:#8e9bb1;--black:#e8edf5;
}
html[data-theme="dark"],html[data-theme="dark"] body{background:var(--tk-bg);color:var(--tk-ink)}
html[data-theme="dark"] ::placeholder{color:var(--tk-sub);opacity:1}
html[data-theme="dark"] ::selection{background:rgba(229,57,53,.4);color:#fff}
html[data-theme="dark"] img{filter:brightness(.92)}
html[data-theme="dark"] img[src$=".svg"],html[data-theme="dark"] .no-dim img{filter:none}
html[data-theme="dark"] hr{border-color:var(--tk-line)}
html[data-theme="dark"] input,html[data-theme="dark"] textarea,html[data-theme="dark"] select{caret-color:#fff}
html[data-theme="dark"] input:-webkit-autofill{-webkit-box-shadow:0 0 0 40px #171e29 inset;-webkit-text-fill-color:#e8edf5}

/* the switch in the user menu */
.di.theme{justify-content:flex-start}
.di.theme .di-moon{display:none}
html[data-theme="dark"] .di.theme .di-sun{display:none}
html[data-theme="dark"] .di.theme .di-moon{display:block}
.tgl{margin-left:auto;position:relative;flex:0 0 44px;width:44px;height:26px;border-radius:99px;background:#d5d9e0;transition:background .22s ease}
.tgl::after{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.28);transition:transform .26s cubic-bezier(.34,1.4,.64,1)}
.di.theme[aria-checked="true"] .tgl{background:#E53935}
.di.theme[aria-checked="true"] .tgl::after{transform:translateX(18px)}
@media (prefers-reduced-motion:reduce){.tgl,.tgl::after{transition:none}}
/* smooth crossfade when switching (added briefly by theme.js) */
html.theme-anim,html.theme-anim *,html.theme-anim *::before,html.theme-anim *::after{transition:background-color .28s ease,border-color .28s ease,color .2s ease,fill .2s ease,stroke .2s ease!important}

.theme-fab{position:fixed;top:calc(14px + env(safe-area-inset-top,0px));right:14px;z-index:50;width:42px;height:42px;border-radius:50%;border:1px solid var(--tk-line,#e6e8ec);background:var(--tk-bg,#fff);color:var(--tk-ink,#111);display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0;box-shadow:0 2px 10px rgba(12,18,32,.08);-webkit-tap-highlight-color:transparent;transition:transform .15s ease,border-color .15s}
.theme-fab:hover{border-color:#cdd3de}.theme-fab:active{transform:scale(.94)}
.theme-fab svg{width:20px;height:20px}
.theme-fab .di-moon{display:none}
html[data-theme="dark"] .theme-fab .di-sun{display:none}
html[data-theme="dark"] .theme-fab .di-moon{display:block}
html[data-theme="dark"] .theme-fab{box-shadow:0 2px 12px rgba(0,0,0,.5)}

/* translucent-white surfaces that can't use a token */
html[data-theme="dark"] .hdr{background:rgba(15,20,27,.94)}
html[data-theme="dark"] .skel::after{background:linear-gradient(90deg,transparent,rgba(255,255,255,.07),transparent)}
html[data-theme="dark"] .drw-bg{background:rgba(0,0,0,.6)}
