/* Connectify light / dark tokens. Load after each page's own stylesheet.
   Every page keeps its dark values in its own :root; this file adds the shared helper tokens and
   swaps everything for light mode. The light selector outranks a plain :root, so it always wins.

   Helper tokens (space-separated RGB, used as rgb(var(--hi) / .1)):
   --hi   lines and tints drawn over the background   (white on dark, ink on light)
   --sf   raised surfaces: cards, panels, chips        (graphite on dark, white on light)
   --bgc  the page background, for glass and fades     */
:root{
  --hi:255 255 255; --sf:16 18 23; --bgc:10 11 14;
  --on-fg:#0A0B0E;                       /* text on a var(--fg) button */
  --amber:#FFC97A; --amber-rgb:255 201 122; --wa:#BFF2DA; --wa-rgb:95 211 160; --err:#FF9C8F;
  --sha:1;                               /* shadow strength */
  --bars:#000;                           /* film letterbox */
  --strong:#fff;                         /* hover text, a step brighter than --fg */
  --blue-soft:#B9CBFF; --blue-soft-2:#C9D7FF; --amber-2:#D9B88A; --amber-3:#FFE2B5;
  --sf2:12 14 19; --ph-a:#1A2033; --ph-b:#10131c; --flash-a:#cfdcff; --flash-c:#0b1230;
}
:root[data-theme="light"]{
  --bg:#F4F5F8; --bg-2:#FFFFFF; --panel:rgba(255,255,255,.9);
  --line:rgba(14,18,30,.1); --line-2:rgba(14,18,30,.17);
  --fg:#0C0E13; --fg-2:#3B404C; --muted:#5E6472; --dim:#878C98;
  --blue:#3563E9; --blue-d:#2F5BE0; --ok:#13865A;
  --hi:14 18 30; --sf:255 255 255; --bgc:244 245 248;
  --on-fg:#FFFFFF;
  --amber:#9A5A00; --amber-rgb:176 104 0; --wa:#0E7A4C; --wa-rgb:14 140 90; --err:#B93A2B;
  --sha:.22;
  --bars:#F4F5F8;
  --ink:#F4F5F8;
  --strong:#000;
  --blue-soft:#2F5BE0; --blue-soft-2:#2F5BE0; --amber-2:#8A5200; --amber-3:#6E4100;
  --sf2:255 255 255; --ph-a:#E3E7EF; --ph-b:#F1F3F7; --flash-a:#ffffff; --flash-c:#F4F5F8;
}

/* the switch */
.cx-theme{display:inline-grid;place-items:center;width:36px;height:36px;flex:none;border-radius:9px;border:1px solid rgb(var(--hi) / .16);background:rgb(var(--hi) / .04);color:var(--fg);cursor:pointer;padding:0;transition:border-color .2s}
.cx-theme:hover{border-color:rgb(var(--hi) / .4)}
.cx-theme svg{display:block}

/* a short cross-fade when the visitor switches */
html.cx-theming,html.cx-theming *,html.cx-theming *::before,html.cx-theming *::after{transition:background-color .35s ease,color .35s ease,border-color .35s ease,fill .35s ease,stroke .35s ease!important}
