/* Frontend header only. Never affects admin or the chart component. */
.web-header{--wh-bg:var(--bb-theme-canvas, #08090b);--wh-panel:var(--bb-theme-surface, #131518);--wh-line:var(--bb-theme-line, #303237);--wh-text:var(--bb-theme-ink, #f5f5f2);--wh-muted:var(--bb-theme-muted, #9a9ba2);--wh-accent:var(--bb-theme-accent, #b8ff3d);position:fixed;z-index:90;top:16px;left:22px;right:22px;margin:0 auto;max-width:1440px;min-height:68px;display:flex;align-items:center;gap:24px;padding:10px 18px;border:1px solid var(--wh-line);border-radius:14px;background:rgba(var(--bb-theme-surface-rgb, 10,11,13), 0.96);color:var(--wh-text);font:14px/1.35 Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;box-sizing:border-box;isolation:isolate}
.web-header *, .web-sheet *, .web-drawer *{box-sizing:border-box}
.web-header [hidden],.web-drawer [hidden],.web-account-bar[hidden],.web-sheet [hidden]{display:none!important}
.web-header a,.web-header button,.web-header summary,.web-sheet button,.web-drawer button,.web-drawer a{color:inherit;text-decoration:none;font:inherit;cursor:pointer}
.web-header button,.web-sheet button,.web-drawer button{border:1px solid var(--bb-theme-line, #303237);border-radius:8px;background:var(--bb-theme-surface, #17191d);padding:9px 12px;min-height:40px}
.web-header button:focus-visible,.web-header a:focus-visible,.web-header summary:focus-visible,.web-sheet button:focus-visible,.web-drawer a:focus-visible{outline:2px solid var(--bb-theme-accent, #b8ff3d);outline-offset:3px}
.web-brand{display:flex;align-items:center;flex:0 0 auto;gap:10px;max-width:200px;min-width:0}
.web-brand>span{font-weight:600;font-size:14px;line-height:1.25;white-space:nowrap}
.web-header .web-brand img{display:block;object-fit:contain;max-width:100%;flex:none}
.web-header .web-arena-mark{width:54px;height:26px}
.web-header .web-bigbit-mark{width:70px;height:18px;margin-top:3px;border-radius:2px}
.web-region-nav{display:flex;align-items:center;justify-content:center;gap:22px;flex:1;min-width:0}
.web-region-nav>a,.web-region-nav summary{font-size:13px;white-space:nowrap;padding:8px 0}
.web-region-nav [aria-current="page"]{color:var(--bb-theme-accent-text, #b8ff3d)}
.web-nav-group{position:relative}.web-nav-group summary{list-style:none}.web-nav-group summary::-webkit-details-marker{display:none}.web-nav-group summary::after{content:'⌄';margin-left:5px;color:var(--bb-theme-muted, #9a9ba2)}
.web-nav-group>div,.web-avatar-panel{position:absolute;top:calc(100% + 12px);min-width:210px;display:grid;gap:4px;background:var(--bb-theme-surface, #111317);border:1px solid var(--bb-theme-line, #303237);padding:8px;border-radius:12px;box-shadow:0 16px 45px rgba(var(--bb-theme-shadow-rgb, 0,0,0), 0.5333333333333333)}
.web-nav-group>div a,.web-avatar-panel a,.web-avatar-panel button{display:block;padding:11px 12px;text-align:left;border:0;border-radius:7px;background:none;line-height:1.4;font-size:13px}
.web-nav-group>div a:hover,.web-avatar-panel a:hover,.web-avatar-panel button:hover{background:var(--bb-theme-inset, #24262b)}
.web-header-actions{display:flex;align-items:center;gap:8px;flex:none;min-width:0}
.web-account-bar{display:flex;gap:6px;align-items:center;color:var(--bb-theme-ink, #f5f5f2);font:13px/1.25 Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}
.web-account-button{display:grid;gap:3px;max-width:220px;text-align:left;white-space:nowrap;min-height:42px;background:var(--bb-theme-surface, #17191d);color:var(--bb-theme-ink, #f5f5f2);border:1px solid var(--bb-theme-line, #303237);border-radius:8px;padding:6px 12px;font:inherit;cursor:pointer}
.web-account-button small{font-size:11px;color:var(--bb-theme-muted, #9a9ba2);overflow:hidden;text-overflow:ellipsis}.web-account-label{font-size:12px;font-weight:600;overflow:hidden;text-overflow:ellipsis;max-width:200px}
.web-deposit{background:var(--bb-theme-accent, #b8ff3d)!important;border-color:var(--bb-theme-accent-text, #b8ff3d)!important;color:var(--bb-theme-accent-ink, #070907)!important}
.web-account-bar[data-state="guest"] .web-account-button{background:var(--bb-theme-accent, #b8ff3d);color:var(--bb-theme-accent-ink, #070907);border-color:var(--bb-theme-accent-text, #b8ff3d)}.web-account-bar[data-state="guest"] small{color:var(--bb-theme-accent-ink, #273118)}
.web-notifications{position:relative;width:40px;padding:8px!important;display:grid;place-items:center}.web-header svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.web-notifications b{position:absolute;right:3px;top:2px;border-radius:10px;background:var(--bb-theme-accent, #b8ff3d);color:var(--bb-theme-accent-ink, #08090b);font-size:10px;min-width:14px;padding:1px 3px}
.web-avatar{position:relative}.web-avatar summary{display:flex;align-items:center;gap:5px;list-style:none;cursor:pointer;min-height:40px;padding:5px 8px;border:1px solid var(--bb-theme-line, #303237);border-radius:8px}.web-avatar summary::-webkit-details-marker{display:none}.web-avatar summary>span{display:none}.web-avatar-panel{right:0;max-height:70vh;overflow:auto}.web-signout{color:var(--bb-theme-muted, #9a9ba2)!important}
.web-menu-trigger{display:none!important}.web-settings-trigger{font-size:11px!important;max-width:60px}
.web-sheet,.web-drawer{color-scheme:var(--bb-theme-color-scheme, dark);position:fixed;inset:auto 0 0;margin:0 auto;padding:20px;max-width:760px;width:min(100%,760px);max-height:90dvh;overflow:auto;background:var(--bb-theme-surface, #111317);color:var(--bb-theme-ink, #f5f5f2);border:1px solid var(--bb-theme-line, #303237);border-radius:18px 18px 0 0;font:14px/1.5 Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;box-shadow:0 -15px 70px rgba(var(--bb-theme-shadow-rgb, 0,0,0), 0.5333333333333333);overscroll-behavior:contain}
.web-sheet::backdrop,.web-drawer::backdrop{background:rgba(var(--bb-theme-shadow-rgb, 0,0,0), 0.6)}.web-sheet[open],.web-drawer[open]{animation:web-sheet-in .18s ease-out}.web-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:16px}.web-sheet-head button{min-width:44px}.web-sheet .language-switcher,.web-sheet .currency-switcher,.web-language{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 0;color:inherit}.web-language select{font:inherit;background:var(--bb-theme-inset, #22252a);color:var(--bb-theme-ink, #f5f5f2);border:1px solid var(--bb-theme-line, #303237);border-radius:7px;padding:10px}
.web-mobile-nav,.web-personal-nav{display:grid;gap:4px;padding-bottom:16px;margin-bottom:16px;border-bottom:1px solid var(--bb-theme-line, #303237)}.web-mobile-nav>a,.web-personal-nav>a,.web-mobile-nav summary{padding:12px 8px;font-weight:500;line-height:1.5}.web-drawer .web-nav-group>div{position:static;border:none;background:var(--bb-theme-surface, #17191d);box-shadow:none;margin:4px 0}.web-drawer>button{width:100%;margin-top:8px;text-align:left}.web-personal-nav a{color:var(--bb-theme-ink, #f5f5f2);text-decoration:none}.web-personal-nav .web-signout{padding-top:16px}
.web-account-sheet{height:min(88dvh,800px);padding-bottom:0;display:none;flex-direction:column;overflow:hidden}.web-account-sheet[open]{display:flex}.web-account-sheet iframe{display:block;width:100%;flex:1;min-height:0;border:0;background:var(--bb-theme-surface, #050506)}.web-account-sheet [data-web-frame-status]{padding:8px 0;color:var(--bb-theme-muted, #9a9ba2)}
.web-notification-item{border-bottom:1px solid var(--bb-theme-line, #303237);padding:12px 0;overflow-wrap:anywhere}.web-notification-item summary{cursor:pointer;font-weight:600}.web-notification-item p{white-space:pre-wrap;line-height:1.6}.web-notification-item time{font-size:12px;color:var(--bb-theme-muted, #9a9ba2)}
.web-account-bar[data-scope="app"]{margin:0 12px 8px;padding:7px;border-bottom:1px solid var(--bb-theme-line, #24262b);justify-content:space-between;flex:none}.web-account-bar[data-scope="app"] .web-account-button{flex:1;max-width:none;display:flex;justify-content:space-between;align-items:center;border:0;background:none;padding:4px 6px}.web-account-bar[data-scope="app"] .web-account-label{max-width:65vw}.web-account-bar[data-scope="app"] .web-deposit{font:inherit;border-radius:7px;padding:8px 12px;border:0;cursor:pointer}
.public-ai[data-web-ai-launcher]:has(.public-ai-panel[hidden]) .public-ai-bar{display:none!important}.public-ai[data-web-ai-launcher]:has(.public-ai-panel:not([hidden])) .web-ai-launch{display:none!important}.public-ai .web-ai-launch{display:block;position:fixed;bottom:calc(20px + env(safe-area-inset-bottom));right:20px;height:44px;padding:0 16px;border:1px solid var(--bb-theme-line, #303237);border-radius:22px;background:var(--bb-theme-surface, #181a1e);color:var(--bb-theme-ink, #f5f5f2);font:500 13px/1 Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;cursor:pointer;box-shadow:0 8px 24px rgba(var(--bb-theme-shadow-rgb, 0,0,0), 0.4666666666666667)}
@keyframes web-sheet-in{from{transform:translateY(30px);opacity:.3}to{transform:translateY(0);opacity:1}}
@media(max-width:1100px){.web-header{gap:12px}.web-region-nav{display:none}.web-header-actions{margin-left:auto}.web-menu-trigger{display:block!important}.web-header .web-settings-trigger,.web-header .web-avatar,.web-header .web-notifications,.web-header .web-login{display:none!important}.web-account-button{max-width:190px}.web-deposit{display:none!important}.web-brand{max-width:190px}}
@media(max-width:540px){.web-header{top:10px;left:10px;right:10px;min-height:62px;padding:8px 10px;gap:6px}.web-brand{gap:7px;max-width:145px}.web-header .web-arena-mark{width:32px;height:22px}.web-brand>span{font-size:11px}.web-header .web-bigbit-mark{width:58px;height:15px}.web-header-actions{gap:5px;min-width:0}.web-account-button{padding:5px 8px;max-width:140px;min-height:38px}.web-account-label{font-size:11px;max-width:118px}.web-account-button small{font-size:10px}.web-menu-trigger{min-width:36px!important;padding:8px!important}.web-sheet,.web-drawer{padding:16px;max-height:92dvh}.web-sheet-head{padding-bottom:12px}.web-sheet-head strong{font-size:16px}.web-sheet-head button{padding:8px}.web-account-sheet{height:92dvh}.web-account-bar[data-scope="app"]{margin-bottom:5px}}
@media(prefers-reduced-motion:reduce){.web-sheet[open],.web-drawer[open]{animation:none}}
.web-sheet.web-closing,.web-drawer.web-closing{transform:translateY(80px);opacity:0;transition:transform .15s ease-in,opacity .15s ease-in}

.h5-shell>.web-account-bar[data-scope="app"]{position:absolute;z-index:40;top:0;left:0;right:0;margin:0;height:52px;padding:5px 12px;background:var(--bb-theme-surface, #090a0c)}body.web-app-accountbar .h5-shell .h5-panes{top:52px!important}

@media(max-width:540px){.web-account-button small{white-space:normal;overflow:visible;text-overflow:clip;line-height:1.25}.web-account-button{height:auto}.web-account-bar .web-account-label{white-space:normal;overflow:visible;text-overflow:clip}}

@media(max-width:540px){.web-account-bar[data-scope="app"] .web-account-button{display:grid;justify-content:start;gap:1px;max-width:none}.web-account-bar[data-scope="app"] .web-account-label{max-width:none}}

.web-account-bar:is([data-state="guest"],[data-state="empty"],[data-state="opening"]) .web-account-button{background:var(--bb-theme-accent, #b8ff3d);color:var(--bb-theme-accent-ink, #070907);border-color:var(--bb-theme-accent-text, #b8ff3d)}.web-account-bar:is([data-state="guest"],[data-state="empty"],[data-state="opening"]) [data-arena-state]{display:none}

/* Native verified first-source notice. No identity or source policy changes. */
.web-inviter-notice{width:100vw;max-width:none;margin-inline:calc(50% - 50vw);box-sizing:border-box;color:var(--web-muted,var(--bb-theme-muted, #94949c));font-size:12px;line-height:1.6;background:rgba(var(--bb-theme-surface-rgb, 0,0,0), 0.0);padding:8px 24px}.web-inviter-content{max-width:1200px;box-sizing:border-box;width:100%;margin-inline:auto;overflow-wrap:anywhere}.web-inviter-content b{font-weight:500}@media(max-width:540px){.web-inviter-notice{padding:8px 16px}}

/* Owned workspace read model, compact persistent account context and sheet. */
.web-account-button [data-arena-extra]{font-size:var(--site-size-legal,12px);line-height:1.25;color:var(--site-muted,var(--bb-theme-muted, #9a9ba2));white-space:normal;overflow-wrap:anywhere;max-width:210px}
.web-account-summary{flex:none;max-height:29dvh;overflow:auto;padding:0 0 12px;color:inherit}.web-account-summary:empty{display:none}.web-account-summary p{margin:4px 0;overflow-wrap:anywhere;font-size:var(--site-size-note,14px)}.web-account-summary strong{font-weight:500}.web-account-controls{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.web-account-controls button:disabled{opacity:.55;cursor:default}
@media(max-width:540px){.web-account-button [data-arena-extra]{font-size:var(--site-size-legal,12px);max-width:118px}.web-account-summary{max-height:32dvh}}

.web-header .web-account-bar[data-workspace-account] .web-account-button{display:grid!important;justify-content:start;gap:3px;height:auto;min-width:0;white-space:normal}
.web-header .web-account-bar[data-workspace-account] [data-arena-state]{overflow-wrap:anywhere;min-width:0}

/* Workspace only: persisted identity/month and explicit account actions stay visible. */
.web-header[data-workspace-header]{flex-wrap:wrap}
.web-workspace-context{flex:0 0 100%;min-width:0;display:flex;align-items:center;gap:12px 20px;border-top:1px solid var(--site-subdued,var(--bb-theme-line, #8a8a90));padding-top:10px;color:var(--site-ink,var(--bb-theme-ink, #0b0b0c));font:var(--site-size-note,14px)/1.4 var(--site-font,Inter,sans-serif)}
.web-workspace-metric{display:grid;gap:2px;min-width:0;overflow-wrap:anywhere}.web-workspace-metric span{color:var(--site-muted,var(--bb-theme-ink, #3a3a3f));font-size:14px}.web-workspace-metric strong{font-weight:500;font-size:14px}
.web-workspace-actions{display:flex;flex-wrap:wrap;gap:8px;margin-left:auto}.web-workspace-actions button{font:inherit;color:inherit;background:var(--site-white,var(--bb-theme-surface, #fff));border:1px solid var(--site-subdued,var(--bb-theme-line, #8a8a90));border-radius:8px;padding:7px 10px;cursor:pointer}.web-workspace-actions button:disabled{color:var(--site-subdued,var(--bb-theme-muted, #8a8a90));cursor:default}.web-workspace-actions button:focus-visible{outline:2px solid var(--site-ink,var(--bb-theme-line, #0b0b0c));outline-offset:2px}
@media(max-width:540px){.web-workspace-context{flex-wrap:wrap;gap:8px 12px}.web-workspace-metric{flex:1 1 120px}.web-workspace-actions{margin-left:0;flex:1 1 100%;gap:6px}.web-workspace-actions button{flex:1;padding:6px;min-width:0}}

/* Workspace header: match the existing light workspace surface without changing layout. */
html[data-site-workspace] .web-header :is(.web-account-button,.web-menu-trigger,.web-notifications,.web-avatar>summary,.web-workspace-actions>button){background:var(--site-panel,var(--bb-theme-canvas, #fff));color:var(--site-text,var(--bb-theme-ink, #0b0b0c));border-color:var(--site-border,var(--bb-theme-line, #dfe0e4))}
html[data-site-workspace] .web-header .web-account-button :is(small,[data-arena-extra]),html[data-site-workspace] .web-header .web-signout{color:var(--site-muted,var(--bb-theme-ink, #3a3a3f))!important}
html[data-site-workspace] .web-header .web-account-bar:is([data-state="guest"],[data-state="empty"],[data-state="opening"]) .web-account-button{background:var(--bb-theme-accent, #b8ff3d);border-color:var(--bb-theme-accent-text, #b8ff3d);color:var(--bb-theme-accent-ink, #070907)!important}
html[data-site-workspace] .web-header .web-account-bar:is([data-state="guest"],[data-state="empty"],[data-state="opening"]) .web-account-button :is(small,[data-arena-extra]){color:var(--bb-theme-accent-ink, #273118)!important}
html[data-site-workspace] .web-header .web-workspace-actions>button:disabled{color:var(--site-subdued,var(--bb-theme-muted, #8a8a90))}
html[data-site-workspace] :is(.web-sheet,.web-drawer) :is(button,select,.web-nav-group>div){background:var(--bb-theme-inset, var(--site-panel,var(--bb-theme-canvas, #fff)));color:var(--site-text,var(--bb-theme-ink, #0b0b0c));border-color:var(--site-border,var(--bb-theme-line, #dfe0e4))}
html[data-site-workspace] :is(.web-sheet,.web-drawer) :is(.web-personal-nav a,.web-signout){color:var(--site-text,var(--bb-theme-ink, #0b0b0c))!important}
html[data-site-workspace] .web-header .web-avatar-panel :is(a,button):hover{background:var(--site-inset,var(--bb-theme-canvas, #f6f7f8))}
html[data-site-workspace] .web-header .web-region-nav [aria-current="page"]{color:var(--site-text,var(--bb-theme-ink, #0b0b0c));box-shadow:inset 0 -2px 0 rgba(var(--bb-theme-shadow-rgb, 184,255,61), 1.0)}
/* Every page that carries the header, the App shell and its inner pages opt in to carrying the page across navigations.
   Without this, a browser logs "ViewTransition opt-in disabled" when moving from a page that opts in to one that does not. */
@media(min-width:681px){@view-transition{navigation:auto}}
@media(max-width:680px),(prefers-reduced-motion:reduce){@view-transition{navigation:none}}
