/* StatsSolve Custom Header — scoped entirely under #ssb-header, safe to load on any theme. */
:root{--ssb-bg:#102c6b;--ssb-bg-dark:#0b2454;--ssb-accent:#2563eb;--ssb-pad:14px;--ssb-logo-h:52px;--ssb-logo-h-mobile:42px}

#ssb-header{--sh-brand:var(--ssb-accent);--sh-brand-dark:var(--ssb-bg);--sh-brand-darker:var(--ssb-bg-dark);--sh-teal:#18c6c9;--sh-line:rgba(255,255,255,.14);font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;position:relative;z-index:999}
#ssb-header *{box-sizing:border-box}
#ssb-header a{text-decoration:none;color:inherit}
#ssb-header button{font:inherit;cursor:pointer;appearance:none;-webkit-appearance:none;background:none;border:0;padding:0;margin:0;color:inherit;text-align:inherit}
#ssb-header .sh-container{width:min(1240px,calc(100% - 32px));margin:auto}

/* ---------- utility bar ---------- */
#ssb-header .sh-utility{background:var(--sh-brand-darker);color:#bfdbfe;font-size:.8rem}
#ssb-header .sh-utility .sh-container{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:7px 0}
#ssb-header .sh-utility-tag{display:flex;align-items:center;gap:7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#ssb-header .sh-utility-tag svg{flex:0 0 auto;width:13px;height:13px}
#ssb-header .sh-utility-links{display:flex;align-items:center;gap:16px;flex:0 0 auto}
#ssb-header .sh-utility-links a{display:flex;align-items:center;gap:6px;color:#dbeafe;font-weight:650;white-space:nowrap;transition:.15s}
#ssb-header .sh-utility-links a:hover{color:#fff}
#ssb-header .sh-utility-links svg{width:14px;height:14px}

/* ---------- main bar ---------- */
#ssb-header .sh-main{background:var(--sh-brand-dark);color:#fff;transition:padding .2s ease,box-shadow .2s ease}
#ssb-header .sh-main .sh-container{display:flex;align-items:center;gap:22px;padding:var(--ssb-pad) 0}
#ssb-header.sh-scrolled .sh-main .sh-container{padding:calc(var(--ssb-pad) - 5px) 0}
#ssb-header.sh-scrolled .sh-main{box-shadow:0 12px 30px rgba(2,10,30,.28)}

#ssb-header .sh-logo{display:flex;align-items:center;flex:0 0 auto}
#ssb-header .sh-logo img{height:var(--ssb-logo-h,52px);width:auto;max-width:280px;background:#fff;border-radius:11px;padding:5px 8px;box-shadow:0 8px 20px rgba(0,0,0,.14);transition:height .2s ease}
#ssb-header.sh-scrolled .sh-logo img{height:calc(var(--ssb-logo-h,52px) - 8px)}
#ssb-header .sh-logo-text{font-weight:900;font-size:1.15rem;color:#fff;background:rgba(255,255,255,.1);padding:8px 14px;border-radius:10px}

#ssb-header .sh-nav{display:flex;align-items:center;gap:4px;flex:1 1 auto}
#ssb-header .sh-nav-link{display:flex;align-items:center;gap:6px;padding:10px 13px;border-radius:10px;font-weight:700;font-size:.94rem;color:#e6edff;transition:.15s}
#ssb-header .sh-nav-link:hover,#ssb-header .sh-nav-link.sh-open{background:rgba(255,255,255,.1);color:#fff}
#ssb-header .sh-nav-link svg{width:15px;height:15px;transition:transform .2s ease}
#ssb-header .sh-nav-item.sh-open .sh-nav-link svg{transform:rotate(180deg)}

#ssb-header .sh-nav-item{position:relative}
#ssb-header .sh-dropdown{position:absolute;top:calc(100% + 10px);left:0;min-width:360px;background:#fff;border-radius:18px;box-shadow:0 26px 60px rgba(2,10,30,.28);border:1px solid #e2e8f0;padding:14px;opacity:0;visibility:hidden;transform:translateY(8px);transition:opacity .18s ease,transform .18s ease,visibility .18s;color:#0f172a}
#ssb-header .sh-nav-item.sh-open .sh-dropdown{opacity:1;visibility:visible;transform:none}
#ssb-header .sh-dropdown-eyebrow{font-size:.7rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:#64748b;padding:6px 10px 10px}
#ssb-header .sh-dropdown-item{display:flex;align-items:flex-start;gap:12px;padding:10px;border-radius:13px;transition:.15s}
#ssb-header .sh-dropdown-item:hover{background:#f4f8ff}
#ssb-header .sh-dropdown-icon{flex:0 0 auto;width:38px;height:38px;border-radius:11px;display:grid;place-items:center;background:linear-gradient(135deg,#dbeafe,#ccfbf1);color:var(--sh-brand);font-weight:900;font-size:.92rem}
#ssb-header .sh-dropdown-item strong{display:block;font-size:.92rem;color:#0f172a}
#ssb-header .sh-dropdown-item span{display:block;color:#64748b;font-size:.8rem;margin-top:2px}
#ssb-header .sh-dropdown-all{display:flex;align-items:center;gap:6px;margin-top:6px;padding:10px;border-top:1px solid #eef2f7;font-weight:800;font-size:.86rem;color:var(--sh-brand)}
#ssb-header .sh-dropdown-all svg{width:14px;height:14px}

/* ---------- search ---------- */
#ssb-header .sh-search{position:relative;flex:0 0 auto;width:250px}
#ssb-header .sh-search-box{display:flex;align-items:center;gap:8px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.22);border-radius:11px;padding:8px 11px;transition:.18s}
#ssb-header .sh-search-box:focus-within{background:#fff;border-color:#fff}
#ssb-header .sh-search-box svg{flex:0 0 auto;width:16px;height:16px;color:#cfe0ff}
#ssb-header .sh-search-box:focus-within svg{color:#64748b}
#ssb-header .sh-search-input{border:0;outline:0;background:transparent;color:#fff;width:100%;font-size:.87rem}
#ssb-header .sh-search-input::placeholder{color:#c9dcff}
#ssb-header .sh-search-box:focus-within .sh-search-input{color:#0f172a}
#ssb-header .sh-search-box:focus-within .sh-search-input::placeholder{color:#94a3b8}
#ssb-header .sh-search-panel{position:absolute;top:calc(100% + 10px);right:0;left:0;background:#fff;border-radius:16px;border:1px solid #e2e8f0;box-shadow:0 26px 60px rgba(2,10,30,.28);padding:8px;opacity:0;visibility:hidden;transform:translateY(6px);transition:.16s;max-height:360px;overflow-y:auto;z-index:5}
#ssb-header .sh-search-panel.sh-open{opacity:1;visibility:visible;transform:none}
#ssb-header .sh-search-result{display:flex;align-items:flex-start;gap:11px;padding:10px;border-radius:12px;color:#0f172a}
#ssb-header .sh-search-result:hover,#ssb-header .sh-search-result.sh-active{background:#f4f8ff}
#ssb-header .sh-search-result strong{display:block;font-size:.88rem}
#ssb-header .sh-search-result span{display:block;color:#64748b;font-size:.78rem;margin-top:2px}
/* Mobile results panel: same solid white background + dark text as desktop
   (not the translucent navy overlay used elsewhere in the mobile panel),
   since the result text itself is always dark and needs a light surface
   to stay readable — layout-only differences (inline instead of floating,
   no drop shadow) are the only things that change from desktop. */
#ssb-header .sh-search-panel-mobile{position:static;margin-top:8px;box-shadow:none}
#ssb-header .sh-search-result .sh-result-icon{flex:0 0 auto;width:32px;height:32px;border-radius:9px;display:grid;place-items:center;background:#eef2ff;color:var(--sh-brand)}
#ssb-header .sh-result-icon svg{width:16px;height:16px}
#ssb-header .sh-search-empty,#ssb-header .sh-search-loading{padding:16px 12px;color:#64748b;font-size:.86rem;text-align:center}

/* ---------- hamburger / mobile toggle ---------- */
#ssb-header .sh-burger{display:none;flex:0 0 auto;width:42px;height:42px;border-radius:11px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.2);align-items:center;justify-content:center;color:#fff}
#ssb-header .sh-burger svg{width:20px;height:20px}
#ssb-header .sh-burger .sh-icon-close{display:none}
#ssb-header.sh-mobile-open .sh-burger .sh-icon-open{display:none}
#ssb-header.sh-mobile-open .sh-burger .sh-icon-close{display:block}

/* ---------- mobile panel ---------- */
#ssb-header .sh-backdrop{position:fixed;inset:0;background:rgba(6,12,30,.5);opacity:0;visibility:hidden;transition:opacity .2s ease,visibility .2s;z-index:996}
#ssb-header.sh-mobile-open .sh-backdrop{opacity:1;visibility:visible}
#ssb-header .sh-mobile-panel{position:fixed;top:0;right:0;bottom:0;width:min(360px,86vw);background:var(--sh-brand-dark);color:#fff;z-index:997;transform:translateX(100%);transition:transform .28s cubic-bezier(.2,.7,.2,1);overflow-y:auto;padding:18px 18px 30px;box-shadow:-20px 0 50px rgba(0,0,0,.3)}
#ssb-header.sh-mobile-open .sh-mobile-panel{transform:translateX(0)}
#ssb-header .sh-mobile-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}
#ssb-header .sh-mobile-logo-img{height:var(--ssb-logo-h-mobile,42px);width:auto;max-width:220px;background:#fff;border-radius:9px;padding:4px 7px}
#ssb-header .sh-mobile-close{width:36px;height:36px;border-radius:10px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.2);display:grid;place-items:center;color:#fff}
#ssb-header .sh-mobile-close svg{width:17px;height:17px}
#ssb-header .sh-mobile-search .sh-search-box{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.22)}
/* The mobile search box never turns white on focus (unlike desktop), so it
   must NOT inherit the desktop focus-within rule that switches the input
   text/placeholder/icon to dark colors for a white background — that was
   producing dark text on the still-navy mobile box. Keep everything light
   regardless of focus state on mobile. */
#ssb-header .sh-mobile-search .sh-search-box:focus-within{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.22)}
#ssb-header .sh-mobile-search .sh-search-box:focus-within svg{color:#cfe0ff}
#ssb-header .sh-mobile-search .sh-search-box:focus-within .sh-search-input{color:#fff}
#ssb-header .sh-mobile-search .sh-search-box:focus-within .sh-search-input::placeholder{color:#c9dcff}
#ssb-header .sh-mobile-nav{list-style:none;margin:18px 0 0;padding:0;display:flex;flex-direction:column;gap:3px}
#ssb-header .sh-mobile-link{display:flex;align-items:center;justify-content:space-between;padding:13px 12px;border-radius:11px;font-weight:750;font-size:1rem}
#ssb-header .sh-mobile-link:hover,#ssb-header .sh-mobile-link:active{background:rgba(255,255,255,.08)}
#ssb-header .sh-mobile-acc-btn{width:100%}
#ssb-header .sh-mobile-link svg{width:16px;height:16px;transition:transform .2s ease}
#ssb-header .sh-mobile-acc.sh-open .sh-mobile-link svg{transform:rotate(180deg)}
#ssb-header .sh-mobile-sub{list-style:none;margin:0;padding:0 0 0 8px;max-height:0;overflow:hidden;transition:max-height .25s ease}
#ssb-header .sh-mobile-acc.sh-open .sh-mobile-sub{max-height:640px}
#ssb-header .sh-mobile-sub a{display:flex;flex-direction:column;gap:2px;padding:11px 12px;border-radius:10px;color:#dbeafe;font-size:.89rem;font-weight:650}
#ssb-header .sh-mobile-sub a:hover{background:rgba(255,255,255,.08);color:#fff}
#ssb-header .sh-mobile-sub small{color:#9fb7e8;font-weight:500;font-size:.76rem}
#ssb-header .sh-mobile-utility{margin-top:22px;padding-top:18px;border-top:1px solid var(--sh-line);display:flex;flex-direction:column;gap:10px}
#ssb-header .sh-mobile-utility a{display:flex;align-items:center;gap:9px;color:#dbeafe;font-size:.88rem;font-weight:650}
#ssb-header .sh-mobile-utility svg{width:15px;height:15px;flex:0 0 auto}

/* ---------- responsive ---------- */
@media(max-width:980px){
  #ssb-header .sh-nav,#ssb-header .sh-search{display:none}
  #ssb-header .sh-burger{display:flex}
  #ssb-header .sh-main .sh-container{justify-content:space-between}
}
@media(max-width:700px){
  #ssb-header .sh-utility-tag span{display:none}
  #ssb-header .sh-utility .sh-container{justify-content:flex-end}
  #ssb-header .sh-logo img{height:var(--ssb-logo-h-mobile,42px);max-width:220px}
  #ssb-header.sh-scrolled .sh-logo img{height:calc(var(--ssb-logo-h-mobile,42px) - 6px)}
  #ssb-header .sh-main .sh-container{padding:11px 0}
}
@media(max-width:420px){
  #ssb-header .sh-utility{display:none}
}

/* ---------- accessibility: visible focus ring ---------- */
#ssb-header a:focus-visible,#ssb-header button:focus-visible,#ssb-header input:focus-visible{outline:2px solid #fff;outline-offset:2px}
