/* Shared product header: one workspace control, one credits control, one account control. */
#mtg-global-header{background:linear-gradient(105deg,#0a1928,#102b39);border-bottom-color:#326174;box-shadow:0 8px 26px #081a2636}
#mtg-global-header .mtg-header-inner{gap:clamp(6px,1vw,14px);height:66px;max-width:1520px}
#mtg-global-header .mtg-brand{margin-right:clamp(4px,1vw,14px)}
#mtg-global-header .mtg-nav{gap:clamp(10px,1.5vw,22px)}
#mtg-global-header .mtg-header-right{display:flex;order:4;flex:none;margin-left:0;gap:7px}
#mtg-global-header .mtg-header-right>a{display:inline-flex;align-items:center;justify-content:center;min-height:37px;padding:7px 12px;border:1px solid #476b75;border-radius:999px;background:#173847;color:#e8fff7!important;font-size:12px;font-weight:750;line-height:1.1;white-space:nowrap}
#mtg-global-header .mtg-header-right>a.mtg-cta{background:linear-gradient(135deg,#b4f2d8,#8ed9df);color:#0e3034!important;border-color:#b4f2d8}
#mtg-global-header .mtg-header-right>a:hover{filter:brightness(1.11);transform:translateY(-1px)}
#mtg-global-header .mtg-header-right>a:focus-visible{outline:2px solid #9eeed3;outline-offset:3px}
#mtg-global-header .mtg-product-short{display:none}
#mtg-global-header .mtg-business-workspace{order:2;flex:0 1 170px;max-width:170px;min-width:0;margin-left:auto}
#mtg-global-header .mtg-workspace-list{width:100%;min-width:0}
#mtg-global-header .mtg-workspace-list>summary{display:flex;align-items:center;gap:6px;width:100%;max-width:none;min-height:37px;padding:5px 10px;border-radius:999px;background:#183847;border:1px solid #507080;color:#effffb;box-shadow:inset 0 1px 0 #ffffff1b}
#mtg-global-header .mtg-workspace-list[open]>summary{border-color:#94e8d0;background:#23515a}
#mtg-global-header .mtg-workspace-icon{display:grid;place-items:center;flex:none;width:23px;height:23px;border-radius:7px;background:#2c6670;color:#b9ffdf;font-size:14px}
#mtg-global-header .mtg-workspace-current{display:block;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}
#mtg-global-header .mtg-workspace-caret{flex:none;color:#a8e9d7;font-size:11px}
#mtg-global-header .mtg-workspace-options{left:auto;right:0;min-width:220px}
#mtg-global-header .mtg-balance-menu{order:3;margin-left:0}
#mtg-global-header .mtg-header-inner:not(:has(.mtg-business-workspace:not([hidden])))>.mtg-balance-menu{margin-left:auto}
#mtg-global-header .mtg-balance-menu>summary{min-height:37px;padding:6px 10px;background:#183847;border-color:#507080}
#mtg-global-header .mtg-account-menu{order:5}
#mtg-global-header .mtg-account-menu>summary{min-height:37px;background:#183847;border-color:#507080}
#mtg-global-header .mtg-mobile-menu{order:-1}
#mtg-global-header :is(.mtg-header-right>a,.mtg-workspace-list>summary,.mtg-balance-menu>summary,.mtg-account-menu>summary){transition:background .16s,border-color .16s,transform .16s}
#mtg-global-header .mtg-mobile-menu>nav{gap:2px}
#mtg-global-header .mtg-mobile-menu>nav .r629-menu-heading{display:block;padding:10px 10px 8px;color:#a4e9d6;font-size:10px;font-weight:850;letter-spacing:.1em;text-transform:uppercase}
#mtg-global-header .mtg-mobile-menu>nav button[data-r622-section]{display:flex;align-items:center;gap:10px;min-height:43px;width:100%;padding:8px 11px;border:0;border-radius:10px;background:transparent;color:#eaf7f5;text-align:left;font:inherit;font-size:13px;font-weight:650;cursor:pointer}
#mtg-global-header .mtg-mobile-menu>nav button[data-r622-section]>span:first-child{display:grid;place-items:center;width:25px;height:25px;border-radius:8px;color:#a9e6d8;background:#1d4655;font-size:14px}
#mtg-global-header .mtg-mobile-menu>nav button[data-r622-section]:is(.selected,:hover,:focus-visible){background:#254e5d;outline:none}
#mtg-global-header .mtg-mobile-menu>nav button[data-r622-section]:focus-visible{outline:2px solid #91ebd2;outline-offset:-2px}
/* In groups the resource tabs stay on the left; the selected group sits at the right edge. */
#ar-app .r206-inbox-nav .r206-resource-top>.r199-chat-sections{flex:1 1 auto;min-width:0}
#ar-app .r206-inbox-nav .r206-resource-top>.r628-group-picker{order:2;flex:0 1 180px;max-width:180px;margin-left:auto}
#ar-app .r206-inbox-nav .r206-resource-top>.r628-group-picker .r628-group-menu{left:auto;right:0}
@media(max-width:1100px){
 #mtg-global-header .mtg-header-inner{height:62px;gap:6px;padding:0 9px}
 #mtg-global-header .mtg-nav{display:none}
 #mtg-global-header .mtg-mobile-menu{display:block;margin:0}
 #mtg-global-header .mtg-business-workspace{flex:0 1 116px;max-width:116px;margin-left:auto;min-width:0}
 #mtg-global-header .mtg-workspace-list>summary{max-width:none;padding:4px 6px}
 #mtg-global-header .mtg-header-right{display:flex;order:4;margin-left:0}
 #mtg-global-header .mtg-product-short{display:inline}
 #mtg-global-header .mtg-product-long{display:none}
 #mtg-global-header .mtg-header-right>a{min-height:34px;padding:6px 8px;font-size:11px}
 #mtg-global-header .mtg-balance-menu{margin-left:0}
 #mtg-global-header .mtg-balance-menu>summary{width:34px;min-width:34px;max-width:34px;min-height:34px;padding:0;display:grid;place-items:center;border:1px solid #507080;border-radius:50%;background:#183847;font-size:17px}
 #mtg-global-header .mtg-balance-menu>summary>span{display:none}
 #mtg-global-header .mtg-account-menu>summary{width:34px;min-height:34px;padding:1px;border:0;background:transparent}
 #mtg-global-header .mtg-account-menu .mtg-account-avatar{width:32px;height:32px}
 #mtg-global-header .mtg-account-menu .mtg-account-label{display:none}
 #mtg-global-header .mtg-mobile-menu>nav{width:min(290px,calc(100vw - 16px));left:0;right:auto;top:62px;padding:10px;max-height:calc(100dvh - 62px);border-radius:0 0 15px 0}
 #mtg-global-header .mtg-workspace-options,#mtg-global-header .mtg-balance-panel,#mtg-global-header .mtg-account-panel{position:fixed;top:62px;right:8px;left:auto;max-height:calc(100dvh - 70px)}
 #ar-app .r206-inbox-nav .r206-resource-top>.r628-group-picker{flex:0 1 116px!important;width:116px!important;max-width:116px!important;min-width:68px!important;margin-left:auto}
 #ar-app .r206-inbox-nav .r206-resource-top>.r199-chat-sections{flex:1 1 0%!important;width:0!important;min-width:0!important}
}
@media(max-width:520px){
 #mtg-global-header .mtg-brand>span:last-child{display:none}
 #mtg-global-header .mtg-brand{margin-right:0}
 #mtg-global-header .mtg-business-workspace{flex-basis:96px;max-width:96px}
 #mtg-global-header .mtg-workspace-icon{width:19px;height:19px;font-size:12px}
 #mtg-global-header .mtg-workspace-current{font-size:11px}
 #mtg-global-header .mtg-workspace-caret{font-size:9px}
}
@media(max-width:365px){
 #mtg-global-header .mtg-header-inner{gap:4px;padding:0 5px}
 #mtg-global-header .mtg-business-workspace{flex-basis:70px;max-width:70px}
 #mtg-global-header .mtg-header-right{gap:3px}
 #mtg-global-header .mtg-header-right>a{padding:5px;font-size:10px}
}
@media(prefers-reduced-motion:reduce){#mtg-global-header .mtg-header-right>a{transition:none}}
