/* =========================================================
   LIGHT / DARK MODE (light is the default)
   Every colour in the other stylesheets is light-dark(light, dark),
   written by the build (lib/mode.js). color-scheme picks which one shows.
   This file is not rewritten by the build.
   ========================================================= */
:root{color-scheme:light}
:root[data-mode="dark"]{color-scheme:dark}

/* the switch in the header: shows where you can go */
.mode-btn .to-light{display:none}
:root[data-mode="dark"] .mode-btn .to-light{display:grid;place-items:center}
:root[data-mode="dark"] .mode-btn .to-dark{display:none}
.mode-btn span{display:grid;place-items:center}

/* the colour change itself: one soft crossfade, only when the switch is pressed */
.mode-fade,.mode-fade *,.mode-fade *::before,.mode-fade *::after{transition:background-color .5s var(--ease),color .5s var(--ease),border-color .5s var(--ease),fill .5s var(--ease),stroke .5s var(--ease),box-shadow .5s var(--ease)!important}

/* text that sits on a photo or video keeps the original look in both modes */
.rframe,.dpanel,.vtile,.su-opt,.ph-media{color-scheme:dark}

/* the hexagon cursor stays white with a "difference" blend, so it always shows as the
   opposite of what is under it: black on the light page, white over dark photos */
.cur{color-scheme:dark}
