/* Colour tokens for every egega.me page, dark (default) and light, and the theme button.
   theme.js sets data-theme on <html> from the visitor's choice or the system setting. */
:root{
  --bg:#050b10;--panel:#0b1720;--line:#16303b;--fg:#eef6f8;--muted:#98adb8;
  --accent:#00d9e5;--brand1:#00d9e5;--brand2:#00bfcb;--ink:#03161a;
  --glow:#0c2a33;--sunk:#08121a;--rule:rgba(255,255,255,.05);--tint:rgba(0,217,229,.1);
  --warn:#ffb4a8;--danger:#ff6b5a;--danger-ink:#1a0400;--bad-bg:rgba(255,120,100,.1);--bad-line:rgba(255,120,100,.35);
  color-scheme:dark;
}
:root[data-theme=light]{
  --bg:#f3f7f9;--panel:#ffffff;--line:#d3e1e7;--fg:#0c1a21;--muted:#4d6470;
  --accent:#007c87;--ink:#03161a;
  --glow:#d3f1f4;--sunk:#e2ecf0;--rule:rgba(0,0,0,.07);--tint:rgba(0,150,165,.1);
  --warn:#a3261d;--danger:#c4321f;--danger-ink:#ffffff;--bad-bg:rgba(196,50,31,.08);--bad-line:rgba(196,50,31,.35);
  color-scheme:light;
}
@media (prefers-color-scheme:light){
  :root:not([data-theme]){
    --bg:#f3f7f9;--panel:#ffffff;--line:#d3e1e7;--fg:#0c1a21;--muted:#4d6470;
    --accent:#007c87;--ink:#03161a;
    --glow:#d3f1f4;--sunk:#e2ecf0;--rule:rgba(0,0,0,.07);--tint:rgba(0,150,165,.1);
    --warn:#a3261d;--danger:#c4321f;--danger-ink:#ffffff;--bad-bg:rgba(196,50,31,.08);--bad-line:rgba(196,50,31,.35);
    color-scheme:light;
  }
  :root:not([data-theme]) .logo-dark{display:none!important}
}
@media not (prefers-color-scheme:light){
  :root:not([data-theme]) .logo-light{display:none!important}
}
/* Pages carry both logo images; only the one for the current theme shows. */
:root[data-theme=dark] .logo-light,:root[data-theme=light] .logo-dark{display:none!important}

.theme-btn{margin-left:auto;flex:none;display:inline-grid;place-items:center;width:34px;height:34px;padding:0;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--fg);cursor:pointer}
.theme-btn:hover{border-color:var(--accent)}
.theme-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.theme-btn svg{width:18px;height:18px}
.theme-btn+.lang{margin-left:0}
.theme-btn.floating{position:fixed;top:14px;right:14px;z-index:10}
