/* Sentinel dark mode for standalone article pages (dark is the site default).
   Per-page colors are remapped by each page's #sentinel-dark-map block; this file
   covers the shared bits: Tailwind light utility classes and common elements. */

html:not(.light) { color-scheme: dark; }
html:not(.light) body { color: #D4E4E6; }

/* Tailwind light utilities used by some articles */
html:not(.light) .bg-white { background-color: #0A1F26 !important; }
html:not(.light) :is(.bg-gray-50, .bg-slate-50, .bg-gray-100, .bg-slate-100, .bg-zinc-50, .bg-neutral-50) { background-color: #0D2830 !important; }
html:not(.light) :is(.bg-gray-200, .bg-slate-200) { background-color: #12333C !important; }
html:not(.light) :is(.text-gray-900, .text-slate-900, .text-gray-800, .text-slate-800, .text-black) { color: #E6F3F4 !important; }
html:not(.light) :is(.text-gray-700, .text-slate-700) { color: #C9DADC !important; }
html:not(.light) :is(.text-gray-600, .text-slate-600, .text-gray-500, .text-slate-500) { color: #9BB8BD !important; }
html:not(.light) :is(.border-gray-100, .border-gray-200, .border-slate-200, .border-gray-300, .border-slate-300) { border-color: rgba(94, 234, 212, 0.16) !important; }
html:not(.light) :is(.bg-red-50, .bg-rose-50) { background-color: #2A1214 !important; }
html:not(.light) :is(.bg-blue-50, .bg-sky-50, .bg-indigo-50) { background-color: #0F1E33 !important; }
html:not(.light) :is(.bg-green-50, .bg-emerald-50, .bg-teal-50) { background-color: #0B2A24 !important; }
html:not(.light) :is(.bg-yellow-50, .bg-amber-50, .bg-orange-50) { background-color: #2A2010 !important; }
html:not(.light) :is(.bg-purple-50, .bg-violet-50) { background-color: #1E1733 !important; }

/* Common elements */
html:not(.light) :is(h1, h2, h3, h4, h5, h6) { color: inherit; }
html:not(.light) a { text-decoration-color: rgba(94, 234, 212, 0.5); }
html:not(.light) ::selection { background: rgba(94, 234, 212, 0.25); color: #fff; }
html:not(.light) hr { border-color: rgba(94, 234, 212, 0.16); }
html:not(.light) img[src*="km_cipher_logo"] { filter: none; }

/* Floating theme switch for pages without the site navigation toggle */
.sx-theme-btn {
    position: fixed; right: 16px; bottom: 16px; z-index: 9990;
    width: 40px; height: 40px; border-radius: 999px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    font: 600 16px/1 system-ui, sans-serif;
    border: 1px solid rgba(94, 234, 212, 0.4); background: rgba(10, 31, 38, 0.85); color: #5EEAD4;
    backdrop-filter: blur(6px);
}
html.light .sx-theme-btn { background: rgba(255, 255, 255, 0.9); color: #0F766E; border-color: rgba(15, 118, 110, 0.35); }
@media (max-width: 640px) { .sx-theme-btn { bottom: 84px; } }
