/* Brand Founder Academy · shared layer for every tool, resource and vault page
   1. the top bar (wordmark · crumb · theme toggle)
   2. the light theme (dark stays the default; the choice follows the visitor site-wide)
   Loaded in <head> BEFORE the page's own <style>, so a page can still override anything. */

:root{
  /* fallbacks for pages that do not define these themselves */
  --bg:#0A0A0C;--bg-deep:#000;--card:#141417;--card2:#0E0E11;--line:#26262A;
  --text:#F5F2EA;--muted:#9B968A;--cream:#F0E8D0;--steel:#8FA8C0;--white:#fff;
  --gold:#E8B830;--gold-hover:#F0C840;--gold-hi:#F6DA8C;--gold-deep:#B8881E;
  --gold-tint:rgba(232,184,48,.07);--gold-line:rgba(232,184,48,.35);
  --hair:rgba(255,255,255,.08);--hair-gold:rgba(232,184,48,.30);
  --good:#4CAF7A;--bad:#D9534F;
  /* new, theme-aware tokens used by the color pass */
  --gold-ink:#E8B830;        /* gold used as text: darkens on light */
  --good-ink:#4CAF7A;--bad-ink:#F2A29F;--gold-soft:#FBE9B4;
  --on-gold:#0A0A0C;         /* dark text on gold fills: same in both themes */
  --text-strong:#FFFFFF;     /* headings that were hardcoded white */
  --text-2:#D7D7DC;          /* body copy that was hardcoded light grey */
  --wash-1:rgba(255,255,255,.02);--wash-2:rgba(255,255,255,.04);--wash-3:rgba(255,255,255,.08);
  --bar-bg:rgba(10,10,12,.92);
  --shadow-ink:rgba(0,0,0,.5);
  --scheme:dark;
}

/* ── LIGHT THEME · same palette as the homepage (assets/css/base.css) ── */
html.theme-light{
  color-scheme:light;
  --bg:#FAF9F6;--bg-deep:#F2EFE9;--bg-dark:#EDEAE2;--bg-card:#FFFFFF;
  --card:#FFFFFF;--card2:#F2EFE9;--panel:#FFFFFF;--rise:#F2EFE9;
  --line:rgba(20,20,22,.12);--line2:rgba(20,20,22,.18);
  --hair:rgba(20,20,22,.10);--hair-2:rgba(20,20,22,.16);--hair-gold:rgba(156,122,14,.35);
  --text:#141416;--txt:#141416;--ink:#141416;--white:#141416;--text-strong:#141416;--text-2:#3A3A40;
  --muted:#5A5A60;--dim:#6A6A70;--steel:#4F6378;--steel-dim:#8A8A90;--cream:#6B5A20;
  --gold-ink:#9C7A0E;--gold-hi:#8A6410;--gold-deep:#7A5E0A;--gold-soft:#6B5A20;
  --gold-tint:rgba(232,184,48,.14);--gold-line:rgba(156,122,14,.40);--gold-dim:rgba(156,122,14,.40);
  --good-ink:#2E7D52;--bad-ink:#B3261E;
  --wash-1:rgba(20,20,22,.03);--wash-2:rgba(20,20,22,.05);--wash-3:rgba(20,20,22,.09);
  --bar-bg:rgba(250,249,246,.92);
  --shadow-ink:rgba(20,20,22,.18);
  --eyebrow:#6B5A20;
  /* the /r/ shared tokens (r.css) */
  --r-bg:#FAF9F6;--r-card:#FFFFFF;--r-card2:#F2EFE9;--r-line:rgba(20,20,22,.12);
  --r-text:#141416;--r-muted:#5A5A60;--r-gold-ink:#9C7A0E;--r-gold-hi:#8A6410;--r-gold-deep:#7A5E0A;
  --r-gold-line:rgba(156,122,14,.40);--r-gold-tint:rgba(232,184,48,.14);--r-steel:#4F6378;--r-cream:#6B5A20;
  --r-text-2:#3A3A40;--r-wash:rgba(20,20,22,.03);--r-bar-bg:rgba(250,249,246,.92);
}
html.theme-light body{background-image:none}

/* ── THE BAR ── */
.bfa-bar{position:sticky;top:0;z-index:60;display:flex;align-items:center;gap:14px;flex-wrap:wrap;
  padding:14px clamp(16px,4vw,40px);background:var(--bar-bg);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);
  border-bottom:1px solid var(--line);font-family:"DM Sans",system-ui,sans-serif;color:var(--text)}
.bfa-wordmark{font-weight:700;font-size:12px;letter-spacing:.2em;text-transform:uppercase;color:var(--text);text-decoration:none;white-space:nowrap}
.bfa-wordmark span{color:var(--gold-ink)}
.bfa-wordmark:hover span{color:var(--gold-hover)}
html.theme-light .bfa-wordmark:hover span{color:var(--gold-deep)}
.bfa-crumb{flex:1;min-width:0;font-size:11px;letter-spacing:.16em;text-transform:uppercase;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bfa-actions{display:flex;align-items:center;gap:10px;margin-left:auto}
.bfa-actions .r-btn,.bfa-actions .btn{margin:0}
.bfa-theme{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;
  border:1px solid var(--line);background:transparent;color:var(--text);cursor:pointer;padding:0;transition:background .15s,border-color .15s}
.bfa-theme:hover{background:var(--gold-tint);border-color:var(--gold-line)}
.bfa-theme:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
.bfa-theme svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.bfa-theme .ico-sun{display:none}
html.theme-light .bfa-theme .ico-moon{display:none}
html.theme-light .bfa-theme .ico-sun{display:block}
@media (max-width:560px){.bfa-crumb{display:none}}
@media print{.bfa-bar{display:none!important}}

/* ── the old bars are retired; keep anything that still uses their classes quiet ── */
.bfa-bar .r-word,.bfa-bar .word,.bfa-bar .wordmark{display:none}

/* ── light-mode fixes for patterns shared across many pages ── */
html.theme-light .r-steps li,html.theme-light .r-panel{background:var(--card)}
html.theme-light .r-sub,html.theme-light .r-panel p,html.theme-light .r-steps li{color:var(--text-2)}
html.theme-light .r-consent{background:var(--card);color:var(--text-2)}
html.theme-light ::selection{background:rgba(232,184,48,.35)}
