/* TEI members' design tokens (spec B1.2, Bold, with the light corrections).
   One file for Wealth OS, Sign in and every Client Hub page, so the values
   live in one place. Members' pages only: never load it on the public site.
   Light or dark comes from /hub/js/tei-theme.js (data-theme on <html> and on
   any element marked data-tei-theme).
   Palette change, Paddy 20 Oct 2026: no browns. Champagne #E8D6A8 is the only
   warm colour; light labels, links and rings are brand navy; the champagne
   tile is raised navy with a champagne edge in dark; investment accounts
   (GIA) are teal; light "needs attention" is red. */

:root,
[data-theme="light"] {
  --w-bg: #EEEAE1;
  /* The public site's hero navy (--c-deep), for Hub pages that share a public
     hero (Guides & tools): #0B1729 in light, #0F1E36 in dark, as on the public site. */
  --w-deep: #0B1729;
  --w-side: #FBFAF6;
  --w-tile: #FFFFFF;
  --w-raised: #F7F4ED;
  --w-overlay: #FFFFFF;
  --w-chip: #F5F2EA;
  --w-line: #D9D3C4;
  --w-text: #13213A;
  --w-muted: #4E5B70;
  --w-gold: #14376E;
  --w-champ: #FBF6EA;
  --w-champ-line: #E8D6A8;
  --w-champ-edge: rgba(255, 255, 255, 0.9);
  --w-powder: #DCE5F3;
  --w-nav-active: #0F1E36;
  --w-nav-active-text: #E8D6A8;
  --w-warn: #B3261E;
  --w-pos: #2F6B45;
  --w-track: #E7E2D6;
  --w-third: #C9D3E3;
  /* Hub home (BUILD_Client_Hub_Lobby 2.1): the second series in figure
     covers, and the primary button's glow (none in light). */
  --w-paid: #6F89B4;
  --w-btn-glow: none;
  /* The accent as a chart series beside a navy one (wealth building beside
     essentials, and the like): navy would merge with it in light. */
  --w-gold-fill: #4F74B0;
  --w-edge: rgba(255, 255, 255, 0.9);
  --w-shadow-1: 0 1px 2px rgba(19, 33, 58, 0.08), 0 12px 30px rgba(19, 33, 58, 0.10);
  --w-shadow-2: 0 2px 6px rgba(19, 33, 58, 0.08), 0 22px 50px rgba(19, 33, 58, 0.14);
  --w-glass: rgba(251, 250, 246, 0.86);
  --w-glass-line: rgba(19, 33, 58, 0.08);
  --w-feat-shadow: 0 2px 6px rgba(15, 30, 54, 0.14), 0 22px 48px rgba(15, 30, 54, 0.28);
  /* Active row in the Wealth OS sidebar: a white tile with a navy dot */
  --w-row-active-bg: #FFFFFF;
  --w-row-active-text: #13213A;
  --w-row-active-dot: #14376E;
  --w-row-active-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 2px rgba(19, 33, 58, 0.08), 0 6px 16px rgba(19, 33, 58, 0.08);
  --w-row-active-glow: none;
  /* Account colours on light grounds */
  --w-acc-pension: #14376E;
  --w-acc-isa: #6F89B4;
  --w-acc-lisa: #8DA4C9;
  --w-acc-gia: #2E7F7B;
  --w-acc-cash: #7A879B;
}

[data-theme="dark"] {
  --w-bg: #08111F;
  --w-deep: #0F1E36;
  --w-side: #0B1729;
  --w-tile: #152845;
  --w-raised: #1F3456;
  --w-overlay: #22395C;
  --w-chip: rgba(255, 255, 255, 0.05);
  --w-line: rgba(232, 214, 168, 0.16);
  --w-text: #F7F4ED;
  --w-muted: #AEB9CA;
  --w-gold: #E8D6A8;
  --w-champ: #1F3456;
  --w-champ-line: rgba(232, 214, 168, 0.45);
  --w-champ-edge: rgba(232, 214, 168, 0.30);
  --w-powder: #1B375B;
  --w-nav-active: #E8D6A8;
  --w-nav-active-text: #0F1E36;
  --w-warn: #F0A97E;
  --w-pos: #B9E0C4;
  --w-track: rgba(255, 255, 255, 0.10);
  --w-third: #5D6F8C;
  --w-paid: #8FA3C4;
  --w-btn-glow: 0 0 0 1px rgba(232, 214, 168, 0.35), 0 6px 22px rgba(232, 214, 168, 0.28);
  --w-gold-fill: #E8D6A8;
  --w-edge: rgba(255, 255, 255, 0.11);
  --w-shadow-1: 0 1px 2px rgba(0, 0, 0, 0.40), 0 14px 34px rgba(0, 0, 0, 0.38);
  --w-shadow-2: 0 2px 6px rgba(0, 0, 0, 0.35), 0 24px 56px rgba(0, 0, 0, 0.48);
  --w-glass: rgba(10, 22, 40, 0.80);
  --w-glass-line: rgba(255, 255, 255, 0.08);
  --w-feat-shadow: inset 0 1px 0 rgba(232, 214, 168, 0.28), 0 2px 6px rgba(0, 0, 0, 0.35), 0 24px 56px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(232, 214, 168, 0.10), 0 0 60px rgba(232, 214, 168, 0.10);
  /* Active row: chip fill, a faint champagne ring and a glowing dot */
  --w-row-active-bg: rgba(255, 255, 255, 0.05);
  --w-row-active-text: #F7F4ED;
  --w-row-active-dot: #E8D6A8;
  --w-row-active-shadow: inset 0 0 0 1px rgba(232, 214, 168, 0.22);
  --w-row-active-glow: 0 0 8px rgba(232, 214, 168, 0.75);
  /* Account colours on dark grounds */
  --w-acc-pension: #E8D6A8;
  --w-acc-isa: #B9CAE6;
  --w-acc-lisa: #DFE6F2;
  --w-acc-gia: #6FB3AE;
  --w-acc-cash: #AAB6C8;
}

/* Theme-independent: featured tiles look identical in both themes */
:root {
  --w-feat: #14376E;
  --w-feat-line: rgba(232, 214, 168, 0.45);
  --w-glow: radial-gradient(closest-side, rgba(232, 214, 168, 0.26), rgba(232, 214, 168, 0));
  --w-glow-soft: radial-gradient(closest-side, rgba(185, 202, 230, 0.18), rgba(185, 202, 230, 0));
  --w-glass-blur: 20px;
  --w-chart-fill: rgba(232, 214, 168, 0.36);
  /* Fixed colours on featured navy tiles (never the theme tokens) */
  --w-on-feat-text: #F7F4ED;
  --w-on-feat-accent: #E8D6A8;
  --w-on-feat-muted: #C9D3E3;
  --w-on-feat-pos: #B9E0C4;
  --w-on-feat-neg: #F0A97E;
  /* Account colours on navy tiles (always the dark set) */
  --w-acc-on-feat-pension: #E8D6A8;
  --w-acc-on-feat-isa: #B9CAE6;
  --w-acc-on-feat-lisa: #DFE6F2;
  --w-acc-on-feat-gia: #6FB3AE;
  --w-acc-on-feat-cash: #AAB6C8;
}

/* Recipes (B1.2 tile recipe; glass on navigation only, B14) */
.w-tile { background: var(--w-tile); border-radius: 26px; box-shadow: inset 0 1px 0 var(--w-edge), var(--w-shadow-1); }
.w-raised { background: var(--w-raised); box-shadow: inset 0 1px 0 var(--w-edge), var(--w-shadow-2); }
.w-feat { position: relative; overflow: hidden; background: var(--w-feat); border: 1px solid var(--w-feat-line); border-radius: 26px; color: var(--w-on-feat-text); box-shadow: var(--w-feat-shadow); }
.w-glass { background: var(--w-glass); border-color: var(--w-glass-line); -webkit-backdrop-filter: blur(var(--w-glass-blur)) saturate(140%); backdrop-filter: blur(var(--w-glass-blur)) saturate(140%); }
@media (max-width: 860px) { .w-tile, .w-feat { border-radius: 24px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
