/* Light/dark button and base colours of templates without a dark design of their own. See assets/js/site-dark.js. */
.site-dark-toggle { position: fixed; left: 16px; bottom: 16px; z-index: 900; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0; padding: 0; border: 1px solid rgba(15, 23, 42, .14); border-radius: 50%; background: #fff; color: #1e293b; box-shadow: 0 6px 18px rgba(15, 23, 42, .18); cursor: pointer; }
.site-dark-toggle[hidden] { display: none; }
.site-dark-toggle:hover { transform: translateY(-1px); }
.site-dark-toggle:focus-visible { outline: 3px solid #6366f1; outline-offset: 2px; }
.site-dark-toggle .icon-sun { display: none; }
html:not([data-theme]) .site-dark-toggle { display: none; }
@media print { .site-dark-toggle { display: none; } }
@media screen {
    html[data-theme="dark"] { color-scheme: dark; background: #0b101b; color: #e5e7eb; }
    html[data-theme="dark"] .site-dark-toggle { background: #1e293b; color: #f8fafc; border-color: rgba(255, 255, 255, .2); }
    html[data-theme="dark"] .site-dark-toggle .icon-moon { display: none; }
    html[data-theme="dark"] .site-dark-toggle .icon-sun { display: block; }
    html[data-theme="dark"] img.site-dark-plate { background: #fff !important; border-radius: 8px; box-shadow: 0 0 0 4px #fff; }
    /* No flash of the light page while the dark colours are prepared; shown anyway if scripts fail. */
    html[data-theme="dark"]:not([data-site-dark]) body { visibility: hidden; animation: site-dark-show 0s 1.5s forwards; }
}
@keyframes site-dark-show { to { visibility: visible; } }
@media (prefers-reduced-motion: reduce) { .site-dark-toggle:hover { transform: none; } }
