/* WILDCARD tokens. THIS FILE IS THE SOURCE: every site, portal, engine page and document reads it live from
   https://brand.teamwildcard.ca/v1/ (served same-origin at /brand/v1/ on each host). Never paste these values
   into a consumer; link the file. Decisions: brand framework audit 2026-11-15 (Alex, Claude Doc round 2). */
:root {
  --bg:            #0b1215;
  --card:          #111a1f;
  --card-deep:     #0e1a20;
  --elevated:      #182028;
  --gold:          #af9154;
  --gold-b:        #c8a96e;
  --gold-hi:       #f0cd82;
  --gold-dim:      rgba(175,145,84,0.35);
  --gold-faint:    rgba(175,145,84,0.10);
  --white:         #F0EDE6;
  --muted:         #9A9EA8;
  --faint:         #1e2d35;
  --hair:          rgba(240,237,230,0.07);
  --hair2:         rgba(240,237,230,0.12);
  --on-gold:       #0b1215;
  --max-w:         1100px;
  --folio-gradient: linear-gradient(145deg,
    rgba(218,180,100,0.9) 0%,
    rgba(175,145,84,0.4)  30%,
    rgba(240,205,130,0.85) 55%,
    rgba(175,145,84,0.4)  75%,
    rgba(210,172,92,0.8)  100%);

  /* Status (6b, Alex 2026-11-15): sage and rose, amber unchanged. All pass AA as text on --bg and --card. */
  --protected: #6b9b7e;
  --exposed:   #e0922f;
  --atrisk:    #c47585;

  /* Type: two faces, nine steps (locked by Alex 2026-11-15, 3a). Each step has a paired subtitle size (--fs-*-pair):
     the Inter line under a Tomorrow heading, sized so it runs the same width as the heading. Measured: a Tomorrow 800
     heading runs 0.717 times the width of the same-size Inter 400 line. Pairs never go below 10px (readability floor),
     so from --fs-body down the pair is the floor and runs wider than its heading. */
  --disp: 'Tomorrow', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
  --fs-micro: 9px; --fs-label: 10px; --fs-fine: 11px; --fs-small: 12px; --fs-body: 15px;
  --fs-lede: 17px; --fs-sub: 20px; --fs-title: 28px; --fs-hero: 44px;
  --fs-pair-ratio: 0.717;
  --fs-hero-pair:  max(10px, calc(var(--fs-hero)  * var(--fs-pair-ratio)));
  --fs-title-pair: max(10px, calc(var(--fs-title) * var(--fs-pair-ratio)));
  --fs-sub-pair:   max(10px, calc(var(--fs-sub)   * var(--fs-pair-ratio)));
  --fs-lede-pair:  max(10px, calc(var(--fs-lede)  * var(--fs-pair-ratio)));
  --fs-body-pair:  max(10px, calc(var(--fs-body)  * var(--fs-pair-ratio)));
  --fs-small-pair: max(10px, calc(var(--fs-small) * var(--fs-pair-ratio)));
  --fs-fine-pair:  max(10px, calc(var(--fs-fine)  * var(--fs-pair-ratio)));
  --fs-label-pair: max(10px, calc(var(--fs-label) * var(--fs-pair-ratio)));
  --fs-micro-pair: max(10px, calc(var(--fs-micro) * var(--fs-pair-ratio)));

  /* The button (2a, 4a: one canonical button; change it here and every button on every host follows). */
  --btn-h: 48px;            --btn-h-sm: 30px;          --btn-icon: 36px;
  --btn-pad: 0 20px;        --btn-pad-sm: 0 12px;
  --btn-r: 11px;            --btn-r-sm: 8px;
  --btn-font: 600 15px/1 var(--body);                  --btn-font-sm: 600 12px/1 var(--body);
  --btn-bg: linear-gradient(180deg, var(--gold-b), var(--gold));
  --btn-glow: inset 0 1px 0 rgba(255,255,255,.35), 0 6px 18px rgba(175,145,84,.22);
  --btn-glow-hover: inset 0 1px 0 rgba(255,255,255,.4), 0 8px 24px rgba(175,145,84,.3);
  --btn-hover: brightness(1.06);                       --btn-press: .98;

  /* The coin button (10a, Alex 2026-11-15): one round control in two finishes, gold (the play coin) and glass (the
     Guide, the dock's centre). Size comes from --coin-size; every glow and glass value lives here. */
  --coin-size: 40px;
  --coin-gold-ink: var(--bg);
  --coin-gold-glow: inset 0 1px 0 rgba(255,240,200,.5), 0 0 12px rgba(200,169,110,.35);
  --coin-gold-glow-sm: inset 0 1px 0 rgba(255,240,200,.5), 0 0 7px rgba(200,169,110,.28);
  --coin-gold-glow-hover: inset 0 1px 0 rgba(255,240,200,.5), 0 0 16px rgba(240,205,130,.55);
  --coin-glass-bg: transparent;
  --coin-glass-border: var(--hair2);
  --coin-glass-shadow: 0 12px 36px rgba(0,0,0,.45);
  --coin-glass-blur: 14px;

  /* The phone menu's page dots under the card name. 0 is what teamwildcard.ca draws today: its scoped style never reached the
     dots, so they were never seen. Set 6px to show them as the deck's design intended. */
  --deck-pip: 0px;

  /* The phone dock (11a): the bar's offset from the screen foot (safe area included), its height, and so the
     height every floating control above it clears. */
  --dock-bot: calc(14px + env(safe-area-inset-bottom, 0px));
  --dock-barh: 64px;
  --dock-top: calc(var(--dock-bot) + var(--dock-barh));

  /* Spacing: multiples of 4. */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-7: 32px; --sp-8: 48px; --sp-9: 80px;

  /* Corners: four values. Small (pills inside dense UI, inputs), button, card, pill. */
  --r-sm: 6px; --r-btn: 11px; --r-card: 16px; --r-pill: 999px;

  /* Paper (8b, Alex 2026-11-15): the proposal paper is the one paper theme for proposals, legal
     documents, policies and PDFs. Print surfaces only; never a screen theme. */
  --paper-page:   #FBF9F5;
  --paper-face:   #FFFDF9;
  --paper-elev:   #F2EDE3;
  --paper-ink:    #141C20;
  --paper-muted:  #4E545E;
  --paper-dim:    #7C818B;
  --paper-line:   #E4DDCF;
  --paper-line-2: #D6CDBB;
  --paper-gold:   #AF9154;
  --paper-gold-b: #7E6229;
  --paper-gilt:   #8F6B2A;
  --paper-lattice: rgba(126,98,41,0.05);
  --paper-good:   #2B7049;
  --paper-bad:    #A23A2F;
}

/* Light mode (4a, Alex 2026-11-15): the quotes palette, warmer, every gold passes AA as text
   (gold 4.7:1 on --bg, 5.3:1 on --card). Opt-in: theme.js sets data-theme="light" on the html element before paint
   from localStorage `wc-theme`. Dark stays the default. */
html[data-theme="light"] {
  --bg:            #ECE8DF;
  --card:          #F7F5F0;
  --card-deep:     #F1EDE5;
  --elevated:      #FBFAF7;
  --white:         #141C20;
  --muted:         #575C67;
  --faint:         #DCD5C7;
  --hair:          rgba(20,28,32,0.07);
  --hair2:         rgba(20,28,32,0.14);
  --gold:          #7E6229;
  --gold-b:        #6F5520;
  --gold-hi:       #8F6B2A;
  --gold-dim:      rgba(126,98,41,0.38);
  --gold-faint:    rgba(175,145,84,0.13);
  --on-gold:       #FBFAF7;
  --btn-glow:      inset 0 1px 0 rgba(255,255,255,.25), 0 6px 18px rgba(126,98,41,.18);
  --btn-glow-hover: inset 0 1px 0 rgba(255,255,255,.3), 0 8px 24px rgba(126,98,41,.26);
  --coin-glass-shadow: 0 12px 36px rgba(40,32,12,.14);
  --protected:     #47705a;
  --exposed:       #965409;
  --atrisk:        #9c4a5b;
  color-scheme: light;
}

/* Metal finishes (part 6, from the portal): a client's finish swaps the accent, so cards, marks and type follow.
   Set data-finish on the html element. Gold is the default and needs no attribute. */
:root[data-finish="silver"]{--gold:#9aa1a8;--gold-b:#cfd3d8;--gold-hi:#cfd3d8;--gold-dim:rgba(170,176,183,.35);--gold-faint:rgba(170,176,183,.10);
  --folio-gradient:linear-gradient(145deg,rgba(214,218,222,.92) 0%,rgba(140,146,152,.45) 30%,rgba(236,239,242,.88) 55%,rgba(140,146,152,.45) 75%,rgba(200,205,210,.82) 100%)}
:root[data-finish="rose"]{--gold:#b07a6e;--gold-b:#dba79a;--gold-hi:#dba79a;--gold-dim:rgba(196,140,126,.35);--gold-faint:rgba(196,140,126,.10);
  --folio-gradient:linear-gradient(145deg,rgba(226,170,152,.92) 0%,rgba(176,122,110,.45) 30%,rgba(244,196,180,.88) 55%,rgba(176,122,110,.45) 75%,rgba(214,158,142,.82) 100%)}
:root[data-finish="black"]{--gold:#7b8087;--gold-b:#b4b9bf;--gold-hi:#b4b9bf;--gold-dim:rgba(150,155,162,.32);--gold-faint:rgba(150,155,162,.09);
  --folio-gradient:linear-gradient(145deg,rgba(96,99,104,.95) 0%,rgba(28,30,33,.7) 30%,rgba(150,153,158,.85) 55%,rgba(28,30,33,.7) 75%,rgba(84,87,92,.9) 100%)}
