/* Sitewide light/dark theme. The inline head script sets html[data-theme] before first paint;
   colours for dark mode live in tokens here plus the generated /theme-dark.css overrides. */
html[data-theme="dark"]{color-scheme:dark;
  --dm-bg:#0b1d2a;--dm-surface:#10283a;--dm-surface-2:#163449;--dm-ink:#e6edf2;--dm-muted:#aebfca;
  --dm-link:#7cc0ea;--dm-line:#2b4659;--dm-line-strong:#4a6a80;--dm-panel:#1a3d55;--dm-soft-blue:#b3d2e4;
  --ink:var(--dm-ink);--paper:var(--dm-surface);--line:var(--dm-line);--muted:var(--dm-muted);--accent:#e2d2b2}
html[data-theme="dark"] body{background:var(--dm-bg);color:var(--dm-ink)}
html[data-theme="dark"] a:focus-visible,html[data-theme="dark"] button:focus-visible{outline-color:var(--dm-link)}
html[data-theme="dark"] main a:not([class]){color:var(--dm-link)}
html[data-theme="dark"] nav a:hover,html[data-theme="dark"] .text-link:hover{color:var(--dm-link);border-color:var(--dm-link)}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{background:var(--dm-surface);color:var(--dm-ink);border-color:var(--dm-line-strong)}
html[data-theme="dark"] ::placeholder{color:#8ea3b1}
html[data-theme="dark"] table{color:var(--dm-ink)}
html[data-theme="dark"] th,html[data-theme="dark"] td{border-color:var(--dm-line)}
html[data-theme="dark"] tr:nth-child(even) td{background:rgba(255,255,255,.025)}
html[data-theme="dark"] details,html[data-theme="dark"] summary{border-color:var(--dm-line)}
/* Logo is navy-on-transparent: render it light. Illustrations swap to recoloured *-dark.svg variants (theme-dark.css); photos are only slightly dimmed. */
html[data-theme="dark"] .brand img{filter:brightness(0) invert(1);opacity:.94}
html[data-theme="dark"] main img:not([src$=".svg"]){filter:brightness(.92)}
/* Theme toggle */
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:8px;width:40px;height:40px;padding:0;margin:0;border:1px solid var(--line,#d2dadd);border-radius:50%;background:transparent;color:inherit;flex-shrink:0;transition:border-color .18s,color .18s}
.theme-toggle:hover{border-color:currentColor}
.theme-toggle svg{width:18px;height:18px;display:block}
.theme-toggle .tt-sun{display:none}
html[data-theme="dark"] .theme-toggle .tt-sun{display:block}
html[data-theme="dark"] .theme-toggle .tt-moon{display:none}
.theme-toggle-menu{display:none}
.theme-toggle-menu .tt-label{font-size:14px}
@media(max-width:1300px){.theme-toggle-menu{display:flex;width:auto;height:auto;border:0;border-radius:0;padding:14px 0;justify-content:flex-start;background:none}.header>.theme-toggle{margin-left:auto}}
@media(max-width:1300px){.header>.theme-toggle{order:1}.header>.menu-toggle{order:2}.header>.brand{order:0}}
@media(min-width:1301px){.header>.theme-toggle{margin-left:-6px}}
/* Page-family palettes (scoped custom properties) */
html[data-theme="dark"] .gs-business{--gs-ink:var(--dm-ink);--gs-muted:var(--dm-muted);--gs-line:var(--dm-line);--gs-paper:var(--dm-surface);--gs-sage:var(--dm-surface-2)}
html[data-theme="dark"] .gm-page{--gm-ink:var(--dm-ink);--gm-muted:var(--dm-muted);--gm-line:var(--dm-line);--gm-paper:var(--dm-surface);--gm-mist:var(--dm-surface-2);--gm-accent:#9fc4d8}
html[data-theme="dark"] .ge-page{--ge-ink:var(--dm-ink);--ge-muted:var(--dm-muted);--ge-paper:var(--dm-surface);--ge-line:var(--dm-line);--ge-accent:#e9a07c}
html[data-theme="dark"] .wealth-service-concept{--ws-ink:var(--dm-ink);--ws-muted:var(--dm-muted)}
html[data-theme="dark"] .ed-page{--ed-ink:var(--dm-ink);--ed-navy:var(--dm-ink);--ed-teal:#8fb8ab;--ed-gold:#cfc2a3;--ed-paper:var(--dm-surface);--ed-line:var(--dm-line)}
html[data-theme="dark"] #stock-feed{--sf-muted:var(--dm-muted);--sf-line:var(--dm-line);--sf-teal:#7cc7c9;--sf-bg:var(--dm-surface)}
html[data-theme="dark"] .rewards-preview{--rp-ink:var(--dm-ink);--rp-muted:var(--dm-muted);--rp-paper:var(--dm-surface);--rp-line:var(--dm-line)}
html[data-theme="dark"] .society-page{--society-paper:var(--dm-surface);--society-muted:var(--dm-muted)}
html[data-theme="dark"] .gs-shop{--shop-ink:var(--dm-ink);--shop-muted:var(--dm-muted)}
html[data-theme="dark"] .land-page{--land-ink:var(--dm-ink);--land-paper:var(--dm-surface);--land-muted:var(--dm-muted)}
html[data-theme="dark"] .gmc-page{--gmc-paper:var(--dm-surface);--gmc-line:var(--dm-line);--gmc-muted:var(--dm-muted)}
html[data-theme="dark"] .cg{--ink:var(--dm-ink);--mist:var(--dm-surface-2);--sand:var(--dm-surface);--text:var(--dm-ink);--muted:var(--dm-muted);--slate:#8fb6cc}
html[data-theme="dark"] .rewards-preview .rp-button{color:#102f38}
html[data-theme="dark"] .listen-link{color:var(--dm-link)!important}
