/* Keep the company name once; dock cloud status independently of banner content. */
html body #mythdModernApp .m-topbar #mModeBtn,
html body #mythdModernApp .m-topbar .m-role-chip,
html body #mythdModernApp .m-topbar .m-company{display:none!important}
html body #mythdModernApp .m-topbar{position:relative!important;padding-bottom:44px!important}
html body #mythdModernApp .m-topbar .m-top-actions{position:absolute!important;right:14px!important;bottom:10px!important;top:auto!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;flex-wrap:nowrap!important;width:auto!important;max-width:calc(100% - 28px)!important;gap:0!important;margin:0!important;z-index:2}
html body #mythdModernApp .m-topbar #mSystemStatus{display:inline-flex!important;align-items:center;flex:0 0 auto;width:auto!important;min-height:0!important;padding:4px 9px!important;border:1px solid transparent!important;border-radius:999px!important;background:linear-gradient(#101b29,#101b29) padding-box,linear-gradient(125deg,#e5eefc,#647e96,#d2e8f5) border-box!important;box-shadow:0 1px 5px #0006!important;color:#b9d9ff!important;font-size:10px!important;font-weight:600!important;line-height:1.4!important;letter-spacing:0!important;white-space:nowrap}
html body #mythdModernApp .m-topbar #mSystemStatus[data-system-state="ready"]{color:#8ee8b2!important}
html body #mythdModernApp .m-topbar #mSystemStatus[data-system-state="offline"]{color:#ffd59a!important}
html body #mythdModernApp .m-topbar #mSystemStatus[data-system-state="error"]{color:#ffb4af!important}
/* Personal artwork overrides preset imagery while keeping theme colors independent. */
html body .mythd-personal-banner-button{flex:0 0 auto;align-self:center;border:1px solid var(--graphite-700);border-radius:6px;background:var(--graphite-900);color:var(--paper);padding:6px 9px;font:700 11px var(--font-body);cursor:pointer}
@media print{.mythd-personal-banner-button{display:none!important}}
html[data-mythd-theme-banner="guardians"]{--mythd-banner-image:url('/theme-banners/baseball.webp');--mythd-banner-position:center 52%}
html[data-mythd-theme-banner="browns"]{--mythd-banner-image:url('/theme-banners/football.webp');--mythd-banner-position:center 50%}
html[data-mythd-theme-banner="cavaliers"]{--mythd-banner-image:url('/theme-banners/basketball.webp');--mythd-banner-position:center 52%}
html[data-mythd-theme-banner] body #mythdModernApp .m-topbar,
html[data-mythd-theme-banner] body .hud-header{
  --paper:#ffffff;--steel-400:#dce5ef;--steel-200:#f0f4f8;
  --graphite-900:#17212e;--graphite-800:#243244;--graphite-700:#5b6b7e;
  background-color:#17212e!important;
  background-image:linear-gradient(90deg,rgba(10,16,26,.86) 0%,rgba(10,16,26,.58) 45%,rgba(10,16,26,.36) 100%),var(--mythd-banner-image)!important;
  background-size:cover!important;background-position:var(--mythd-banner-position)!important;background-repeat:no-repeat!important;
  min-height:132px!important;box-sizing:border-box;
  border-bottom:1px solid var(--amber-500)!important;
}
html[data-mythd-theme-banner] body #mythdModernApp .m-head-title,
html[data-mythd-theme-banner] body .hud-header .hud-title{color:#fff!important;text-shadow:0 2px 8px #0009}
html[data-mythd-theme-banner] body #mythdModernApp .m-head-sub,
html[data-mythd-theme-banner] body .hud-header .hud-sub{color:#dce5ef!important;text-shadow:0 1px 4px #0009}
html[data-mythd-theme-banner] body #mythdModernApp .m-company{color:#fff!important}
html[data-mythd-theme-banner] body #mythdModernApp .m-system-chip{background:#111b28e6}
@media(max-width:680px){
  html[data-mythd-theme-banner] body #mythdModernApp .m-topbar,
  html[data-mythd-theme-banner] body .hud-header{min-height:136px!important;background-position:58% center!important}
}

/* Brand banners for the light and dark defaults; personal uploads use their existing rules. */
html[data-mythd-theme-banner="standard"]{--mythd-banner-image:url('/theme-banners/mythd-standard.svg');--mythd-brand-banner-bg:#f7f9f8;--mythd-brand-banner-text:#202925}
html[data-mythd-theme-banner="standardDark"]{--mythd-banner-image:url('/theme-banners/mythd-standard-dark.svg');--mythd-brand-banner-bg:#000000;--mythd-brand-banner-text:#f1f6f3}
html:is([data-mythd-theme-banner="standard"],[data-mythd-theme-banner="standardDark"]) body #mythdModernApp .m-topbar{
  --paper:var(--mythd-brand-banner-text);
  background-color:var(--mythd-brand-banner-bg)!important;
  background-image:var(--mythd-banner-image)!important;
  background-size:min(calc(100% - 24px),560px) auto!important;
  background-position:center 4px!important;
  background-repeat:no-repeat!important;
  min-height:144px!important;
}
html:is([data-mythd-theme-banner="standard"],[data-mythd-theme-banner="standardDark"]) body #mythdModernApp .m-head-identity>div{display:block!important;position:absolute;top:16px;left:28px;max-width:calc((100% - 560px)/2 - 48px);z-index:1}
html:is([data-mythd-theme-banner="standard"],[data-mythd-theme-banner="standardDark"]) body #mythdModernApp .m-head-title{color:var(--mythd-brand-banner-text)!important;text-shadow:none!important;max-width:100%}
html:is([data-mythd-theme-banner="standard"],[data-mythd-theme-banner="standardDark"]) body #mythdModernApp .m-head-sub{color:var(--mythd-brand-banner-text)!important;text-shadow:none!important;opacity:.75;max-width:100%}
html:is([data-mythd-theme-banner="standard"],[data-mythd-theme-banner="standardDark"]) body #mythdModernApp .m-head-identity #mLogoRefresh{
  position:absolute;top:4px;left:50%;transform:translateX(-50%);width:min(calc(100% - 24px),560px);height:100px;padding:0;border:0;background:transparent;box-shadow:none;display:flex!important;justify-content:center;
}
html:is([data-mythd-theme-banner="standard"],[data-mythd-theme-banner="standardDark"]) body #mythdModernApp #mLogoRefresh .m-head-logo{visibility:hidden}
html:is([data-mythd-theme-banner="standard"],[data-mythd-theme-banner="standardDark"]) body #mythdModernApp #mLogoRefresh:focus-visible{outline:2px solid var(--amber-500);outline-offset:2px;border-radius:8px}
@media(max-width:680px){
  html:is([data-mythd-theme-banner="standard"],[data-mythd-theme-banner="standardDark"]) body #mythdModernApp .m-topbar{min-height:132px!important;background-position:center 8px!important}
  html:is([data-mythd-theme-banner="standard"],[data-mythd-theme-banner="standardDark"]) body #mythdModernApp .m-head-identity #mLogoRefresh{top:8px;height:80px}
}

/* Keep workspace identity at the top left; stack branding beneath it on smaller screens. */
@media(max-width:1100px){
  html:is([data-mythd-theme-banner="standard"],[data-mythd-theme-banner="standardDark"]) body #mythdModernApp .m-topbar{min-height:190px!important;background-position:center 56px!important;background-size:min(calc(100% - 24px),440px) auto!important}
  html:is([data-mythd-theme-banner="standard"],[data-mythd-theme-banner="standardDark"]) body #mythdModernApp .m-head-identity>div{top:12px;left:14px;max-width:calc(100% - 28px)}
  html:is([data-mythd-theme-banner="standard"],[data-mythd-theme-banner="standardDark"]) body #mythdModernApp .m-head-identity #mLogoRefresh{top:56px;width:min(calc(100% - 24px),440px);height:88px}
}