/* ================================================================
   TBC theme — overrides for tbc.shuttlestats.{dev,app}.

   Served from cdn.shuttlestats.{dev,app}/tbc/theme.css. Loaded by
   index.html's boot script via:
     <link rel="stylesheet" href="https://cdn.{apex}/tbc/theme.css">

   Selectors use `html[data-tenant="tbc"]` to outrank the inline
   default's `:root` via specificity (0,1,1) > (0,1,0). The boot
   script sets `data-tenant="tbc"` synchronously before paint, so
   the override wins regardless of which stylesheet finishes loading
   first.

   Only TBC-specific token values appear here. Everything not listed
   falls through to the default theme baked into the SPA bundle.
   ================================================================ */

html[data-tenant="tbc"] {
  /* Ground — a hint of warm linen instead of flat near-white, so the
     lifted card has somewhere to rise from (two-step surface hierarchy). */
  --background: oklch(0.972 0.004 95);
  /* Ink — confident near-black graphite, faintly warm rather than dead grey. */
  --foreground: oklch(0.215 0.006 75);
  /* Burnished forest green — deeper, richer, hue nudged off the cheap
     yellow-green (156) toward true forest (152). */
  --singles: oklch(0.455 0.108 152);
  --doubles: oklch(0.620 0.108 190);
  /* Card — clean paper-white that visibly lifts off the linen ground. */
  --card: oklch(0.998 0.001 95);
  --card-foreground: oklch(0.215 0.006 75);
  --tier-bronze: oklch(0.560 0.119 62);
  --tier-silver: oklch(0.551 0.023 264);
  --tier-gold: oklch(0.554 0.112 92);
  --tier-platinum: oklch(0.559 0.116 308);
  --tier-diamond: oklch(0.537 0.097 221);
  --tier-legendary: oklch(0.584 0.166 302);
  --tier-dot-text-bronze: oklch(1.000 0.000 0);
  --tier-dot-text-silver: oklch(1.000 0.000 0);
  --tier-dot-text-gold: oklch(1.000 0.000 0);
  --tier-dot-text-platinum: oklch(1.000 0.000 0);
  --tier-dot-text-diamond: oklch(0.159 0.011 268);
  --tier-dot-text-legendary: oklch(1.000 0.000 0);
  /* Primary — the burnished forest green. Deeper + richer than the old flat
     0.484/156; carries more presence on buttons and reads "expensive". */
  --primary: oklch(0.455 0.108 152);
  --primary-foreground: oklch(1.000 0.000 0);
  /* Toolbar tabs — a calm graphite with a faint forest undertone, NOT the
     brand green that buttons use; softer chrome, now warmer + deeper. */
  --tab-active: oklch(0.288 0.016 152);
  --tab-active-foreground: oklch(1.000 0.000 0);
  /* Secondary — a faintly green-warmed neutral surface. */
  --secondary: oklch(0.938 0.006 100);
  --secondary-foreground: oklch(0.378 0.082 152);
  --muted: oklch(0.946 0.004 95);
  --muted-foreground: oklch(0.505 0.008 80);
  --accent: oklch(0.952 0.006 98);
  --accent-foreground: oklch(0.300 0.008 75);
  /* Semantic states — softened off their garish edge: a touch deeper,
     slightly less screaming chroma, still clearly readable. */
  --destructive: oklch(0.575 0.182 27);
  --success: oklch(0.628 0.150 150);
  --warning: oklch(0.682 0.158 58);
  --info: oklch(0.560 0.158 255);
  --credit: oklch(0.522 0.198 298);
  /* Brand orange — warm, confident antique-amber; pulled back from the
     bright/garish 0.775 to a richer, more premium burnt-orange (hue 66). */
  --brand: oklch(0.728 0.158 66);
  /* Edges — a touch deeper + warmer so cards and inputs have a crisp,
     intentional outline against the linen ground. */
  --border: oklch(0.868 0.010 92);
  --input: oklch(0.898 0.008 92);
  --ring: oklch(0.455 0.108 152);
  /* TBC's signature dark wordmark band — a confident warm graphite-black,
     no longer dead neutral grey. */
  --nav: oklch(0.232 0.006 80);
  --nav-foreground: oklch(0.965 0.002 95);

  --chart-1: oklch(0.455 0.108 152);
  --chart-2: oklch(0.728 0.158 66);
  --chart-3: oklch(0.609 0.193 28);
  --chart-4: oklch(0.612 0.122 237);
  --chart-5: oklch(0.560 0.175 304);
  --chart-6: oklch(0.626 0.092 195);
  --chart-7: oklch(0.570 0.191 6);
  --chart-8: oklch(0.763 0.153 104);
  --chart-9: oklch(0.532 0.168 262);
  --chart-10: oklch(0.690 0.125 157);

  --kind-training: oklch(0.612 0.122 237);
  --state-pending-payment: oklch(0.658 0.185 51);
  /* rank-runner-up / rank-third removed — rank-* tokens dropped from the design system (merged into medal-*). */
  --env-dev: oklch(0.658 0.185 51);
  --env-sandbox: oklch(0.609 0.193 28);
  --skill-int-plus: oklch(0.658 0.185 51);
  --achievement-dedication: oklch(0.626 0.193 237);
  --achievement-battle:     oklch(0.640 0.221 18);
  --achievement-flock:      oklch(0.696 0.180 158);
  --achievement-moments:    oklch(0.751 0.180 79);
  --achievement-legendary:  oklch(0.610 0.226 304);

  --venue-pin-bg: oklch(0.220 0.000 0);
  --venue-pin-outline: oklch(1.000 0.000 0);
  --qr-fg: oklch(0.250 0.040 280);
  --qr-bg: oklch(1.000 0.000 0);
  --scrim: oklch(0.140 0.000 0);
  --on-color: oklch(1.000 0.000 0);

  --monogram-0-bg: oklch(0.940 0.040 247); --monogram-0-fg: oklch(0.498 0.165 257);
  --monogram-1-bg: oklch(0.892 0.064 8);   --monogram-1-fg: oklch(0.500 0.190 0);
  --monogram-2-bg: oklch(0.940 0.057 134); --monogram-2-fg: oklch(0.560 0.181 136);
  --monogram-3-bg: oklch(0.901 0.045 277); --monogram-3-fg: oklch(0.358 0.130 277);
  --monogram-4-bg: oklch(0.916 0.040 192); --monogram-4-fg: oklch(0.480 0.090 192);
  --monogram-5-bg: oklch(0.945 0.063 95);  --monogram-5-fg: oklch(0.580 0.123 92);
  --monogram-6-bg: oklch(0.901 0.061 313); --monogram-6-fg: oklch(0.460 0.165 314);
  --monogram-7-bg: oklch(0.917 0.057 154); --monogram-7-fg: oklch(0.515 0.124 155);
  --monogram-8-bg: oklch(0.911 0.062 41);  --monogram-8-fg: oklch(0.515 0.151 36);
  --monogram-9-bg: oklch(0.917 0.034 257); --monogram-9-fg: oklch(0.418 0.140 263);

  /* Stripe Elements iframe can't read CSS vars — mirror the burnished
     green/graphite tokens above as the nearest sRGB hex. */
  --stripe-color-primary: #2c6f4f;
  --stripe-color-background: #fbfaf7;
  --stripe-color-text: #222019;
  --stripe-color-text-muted: #6a685f;
  --stripe-color-destructive: #cf3f30;
  --stripe-color-border: #cfcdc6;
}

html[data-tenant="tbc"].dark {
  /* Ground — a deep, warm graphite-black (espresso undertone) instead of the
     flat charcoal; richer, more cinematic. */
  --background: oklch(0.168 0.006 75);
  /* Foreground — soft warm ivory, not clinical white. */
  --foreground: oklch(0.945 0.005 88);
  /* Luminous forest green — bright enough to glow on the dark ground,
     hue aligned to the new light-mode forest (152). */
  --singles: oklch(0.672 0.138 152);
  --doubles: oklch(0.752 0.118 190);
  /* Card — a clearer two-step lift off the espresso ground. */
  --card: oklch(0.224 0.008 75);
  --card-foreground: oklch(0.945 0.005 88);
  --tier-bronze: oklch(0.666 0.132 61);
  --tier-silver: oklch(0.727 0.022 264);
  --tier-gold: oklch(0.840 0.160 89);
  --tier-platinum: oklch(0.865 0.073 319);
  --tier-diamond: oklch(0.874 0.102 215);
  --tier-legendary: oklch(0.722 0.177 306);
  --tier-dot-text-bronze: oklch(0.159 0.011 268);
  --tier-dot-text-silver: oklch(0.159 0.011 268);
  --tier-dot-text-gold: oklch(0.159 0.011 268);
  --tier-dot-text-platinum: oklch(0.159 0.011 268);
  --tier-dot-text-diamond: oklch(0.159 0.011 268);
  --tier-dot-text-legendary: oklch(0.159 0.011 268);
  /* Primary — luminous forest green; richer than the old 0.660/156, aligned
     to the 152 forest hue. */
  --primary: oklch(0.672 0.138 152);
  --primary-foreground: oklch(1.000 0.000 0);
  /* Dark mode: the brand GREEN reads as a clean vibrant accent on the dark bg
     (it's only "too intense" on the LIGHT surface). The label is DARK, not
     white: white-on-this-green fails AA (~2.9:1), the dark label clears it. */
  --tab-active: oklch(0.672 0.138 152);
  --tab-active-foreground: oklch(0.198 0.034 152);
  /* Surfaces — warm graphite steps that match the espresso ground. */
  --secondary: oklch(0.282 0.012 75);
  --secondary-foreground: oklch(0.818 0.082 154);
  --muted: oklch(0.256 0.010 75);
  --muted-foreground: oklch(0.640 0.008 80);
  --accent: oklch(0.292 0.012 75);
  --accent-foreground: oklch(0.858 0.008 88);
  /* Semantic states — softened, slightly deeper, still vivid on dark. */
  --destructive: oklch(0.628 0.170 27);
  --success: oklch(0.712 0.168 150);
  --warning: oklch(0.722 0.162 58);
  --info: oklch(0.668 0.140 254);
  --credit: oklch(0.682 0.150 300);
  /* Brand orange — lustrous warm amber; confident, not neon. */
  --brand: oklch(0.776 0.150 68);
  --border: oklch(0.300 0.010 75);
  --input: oklch(0.300 0.010 75);
  --ring: oklch(0.688 0.142 152);
  /* Wordmark band — deep warm graphite-black. */
  --nav: oklch(0.198 0.006 78);
  --nav-foreground: oklch(0.945 0.003 88);

  --chart-1: oklch(0.718 0.148 152);
  --chart-2: oklch(0.776 0.150 68);
  --chart-3: oklch(0.640 0.157 27);
  --chart-4: oklch(0.709 0.117 234);
  --chart-5: oklch(0.656 0.136 306);
  --chart-6: oklch(0.747 0.107 195);
  --chart-7: oklch(0.639 0.159 2);
  --chart-8: oklch(0.841 0.159 104);
  --chart-9: oklch(0.623 0.132 263);
  --chart-10: oklch(0.737 0.108 159);

  --kind-training: oklch(0.709 0.117 234);
  --state-pending-payment: oklch(0.738 0.157 53);
  /* rank-runner-up / rank-third removed — rank-* tokens dropped from the design system (merged into medal-*). */
  --env-dev: oklch(0.738 0.157 53);
  --env-sandbox: oklch(0.640 0.157 27);
  --skill-int-plus: oklch(0.738 0.157 53);
  --achievement-dedication: oklch(0.709 0.117 234);
  --achievement-battle:     oklch(0.696 0.213 18);
  --achievement-flock:      oklch(0.760 0.166 158);
  --achievement-moments:    oklch(0.820 0.165 79);
  --achievement-legendary:  oklch(0.680 0.196 304);

  --venue-pin-bg: oklch(0.220 0.000 0);
  --venue-pin-outline: oklch(1.000 0.000 0);

  --monogram-0-bg: oklch(0.282 0.054 257); --monogram-0-fg: oklch(0.790 0.111 257);
  --monogram-1-bg: oklch(0.270 0.058 6);   --monogram-1-fg: oklch(0.756 0.118 6);
  --monogram-2-bg: oklch(0.290 0.054 137); --monogram-2-fg: oklch(0.812 0.144 138);
  --monogram-3-bg: oklch(0.220 0.040 273); --monogram-3-fg: oklch(0.638 0.103 264);
  --monogram-4-bg: oklch(0.260 0.034 192); --monogram-4-fg: oklch(0.776 0.084 191);
  --monogram-5-bg: oklch(0.275 0.043 89);  --monogram-5-fg: oklch(0.819 0.123 95);
  --monogram-6-bg: oklch(0.260 0.063 314); --monogram-6-fg: oklch(0.760 0.117 313);
  --monogram-7-bg: oklch(0.276 0.045 153); --monogram-7-fg: oklch(0.776 0.110 157);
  --monogram-8-bg: oklch(0.255 0.046 38);  --monogram-8-fg: oklch(0.780 0.097 53);
  --monogram-9-bg: oklch(0.246 0.041 263); --monogram-9-fg: oklch(0.732 0.089 257);

  --surface-translucent: color-mix(in oklab, var(--nav) 78%, transparent);

  /* Stripe Elements (dark) — mirror the espresso card + luminous green. */
  --stripe-color-primary: #4fb487;
  --stripe-color-background: #2b2924;
  --stripe-color-text: #f1efe9;
  --stripe-color-text-muted: #a3a097;
  --stripe-color-destructive: #e8624e;
  --stripe-color-border: #423f38;
}
