/* GTS light/dark theme tokens.
 *
 * Dark is still the default everywhere (every page's own inline <style>
 * declares the dark values on plain :root, unchanged). This file only
 * supplies the LIGHT half of the swap, scoped to :root[data-theme="light"].
 * That attribute selector is more specific than a bare :root, so these
 * overrides win regardless of load order - no need to touch each page's
 * own <style> block or fight over which stylesheet loads last.
 *
 * Light is deliberately a soft off-white/grey, never pure #fff-on-#000
 * stark - and the brand accents (cyan, gold, green, amber, burgundy) are
 * darkened just enough to keep real contrast on a light background while
 * staying recognisably the same GTS palette, not a different theme.
 *
 * Token names cover every variable declared by index.html's and app.html's
 * own :root blocks (--card and --surf2 are two names for the same "second
 * surface" tier depending on the page); a name a given page never declares
 * is simply unused there. gts-theme.js is what actually flips
 * data-theme on <html> - this file only says what each value should be.
 */
:root[data-theme="light"]{
  --bg:#EEF1F4;
  --surf:#FFFFFF;
  --surf2:#F7F9FB;
  --card:#F7F9FB;
  --line:#DCE2E8;
  --txt:#1A2330;
  --txt2:#4B5768;
  --silver:#3F4B5A;
  --mute:#69737F;
  --dim:#69737F;
  --cyan:#0A87A6;
  --cyan-dim:#0A87A61f;
  --gold:#96731A;
  --green:#1E8A57;
  --amber:#AD7A22;
  --burg:#AE2C43;
  --burg-deep:#7A1F2B;
}

/* A page's own <meta name="theme-color"> is kept in sync by gts-theme.js,
   but set a sane light-mode default here too in case that runs late. */
:root[data-theme="light"] body{background:var(--bg)}

/* --- Theme toggle control, shared by index.html and app.html --- */
.gts-theme-toggle{display:inline-flex;align-items:center;gap:2px;border:1px solid var(--line);
  border-radius:999px;padding:3px;background:var(--surf);flex:none}
.gts-theme-toggle button{display:flex;align-items:center;justify-content:center;width:30px;height:30px;
  border:none;border-radius:999px;background:transparent;color:var(--mute);cursor:pointer;padding:0;
  transition:background .15s,color .15s}
.gts-theme-toggle button svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.9;
  stroke-linecap:round;stroke-linejoin:round}
.gts-theme-toggle button.on{background:var(--cyan-dim);color:var(--cyan)}


/* Compact single-button variant: cycles Dark -> Light -> Adaptive on each
   tap instead of showing all three at once, for headers with no room for
   a segmented control (index.html's, next to the logo and Sign in). */
.gts-theme-cycle{display:flex;align-items:center;justify-content:center;width:34px;height:34px;flex:none;
  border:1px solid var(--line);border-radius:50%;background:var(--surf);color:var(--silver);cursor:pointer;padding:0;
  transition:color .15s,border-color .15s}
.gts-theme-cycle svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.9;
  stroke-linecap:round;stroke-linejoin:round}

.gts-theme-toggle button:hover{color:var(--cyan)}
.gts-theme-cycle:hover{color:var(--cyan);border-color:var(--cyan)}
