/* Public ESIR return navigation — only present for authorized internal previews.
   Desktop: inside the right-hand toolbar group; compact/mobile: separate utility row.
   Never float over the ClokIt logo or report document. */
@media(min-width:1221px){
  html.clokit-report-return-ready .topbar-inner #topActions{
    margin-left:auto!important;display:flex!important;justify-content:flex-end!important;
    align-items:center!important;gap:8px!important;flex-wrap:nowrap!important;
  }
  html.clokit-report-return-ready #topActions #clokitInternalBackToApp{
    order:-1!important;
  }
}
html.clokit-report-return-ready #clokitInternalBackToApp{
  position:static!important;left:auto!important;top:auto!important;right:auto!important;bottom:auto!important;
  z-index:auto!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;
  width:auto!important;height:auto!important;min-height:40px!important;flex:0 0 auto;
  margin:0!important;padding:10px 14px!important;
  font:800 12px/1.2 Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  color:#eaf5ff!important;background:rgba(255,255,255,.10)!important;
  border:1px solid rgba(255,255,255,.24)!important;border-radius:11px!important;
  box-shadow:none!important;backdrop-filter:none!important;
  text-decoration:none!important;white-space:nowrap!important;
}
html.clokit-report-return-ready #clokitInternalBackToApp:hover,
html.clokit-report-return-ready #clokitInternalBackToApp:focus-visible{
  background:rgba(255,255,255,.18)!important;
}
.clokit-public-report-return-strip{display:none}
@media(max-width:1220px){
  html.clokit-report-return-ready .clokit-public-report-return-strip:not(:empty){
    display:flex!important;align-items:center;justify-content:flex-start;gap:8px;
    min-height:50px;padding:7px max(14px,env(safe-area-inset-right)) 7px max(14px,env(safe-area-inset-left));
    box-sizing:border-box;background:#ebf3f9;border-bottom:1px solid #d4e3ed;
    width:100%;z-index:6;position:relative;
  }
  html.clokit-report-return-ready .clokit-public-report-return-strip #clokitInternalBackToApp{
    color:#123047!important;background:#fff!important;
    border-color:#c9dbe7!important;min-height:36px!important;
    padding:8px 12px!important;font-size:12px!important;
  }
  html.clokit-report-return-ready .clokit-public-report-return-strip #clokitInternalBackToApp:hover{
    background:#f8fcff!important;
  }
}
@media print{
  .clokit-public-report-return-strip,#clokitInternalBackToApp{
    display:none!important;
  }
}

/* Hide any late workspace-only widgets in the public report header. */
html[data-public-report="true"] body > header.topbar > :not(.topbar-inner):not(.clokit-report-home-brand),
html[data-public-report="true"] .topbar-inner > :not(.brand):not(#topActions),
html[data-public-report="true"] #topActions > :not(#clokitInternalBackToApp):not(.public-view-chip):not(.public-save-btn){
  display:none!important;
}

/* Keep the official brand asset in the report header on desktop and mobile.
   The logo sits outside .topbar-inner by design, so never hide or remove it. */
html[data-public-report="true"] body > header.topbar > a.clokit-report-home-brand {
  display:inline-flex!important;
  visibility:visible!important;
  opacity:1!important;
  position:absolute!important;
  left:24px!important;
  right:auto!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  max-width:calc(100% - 360px)!important;
  z-index:8!important;
}
@media (max-width:1220px){
  html[data-public-report="true"] body > header.topbar > a.clokit-report-home-brand{
    left:14px!important;
    max-width:calc(100% - 230px)!important;
  }
}
@media (max-width:520px){
  html[data-public-report="true"] body > header.topbar > a.clokit-report-home-brand{
    left:12px!important;
    max-width:calc(100% - 80px)!important;
  }
}

/* Published ESIR masthead: canonical ClokIt lockup on the LEFT.
   Preserve the full official hand / wordmark / tagline.
   Avoid a second floating logo and keep toolbar controls untouched. */
html[data-public-report="true"] body > header.topbar .topbar-inner > .brand {
  display:flex!important;
  visibility:visible!important;
  opacity:1!important;
  position:absolute!important;
  left:24px!important;
  right:auto!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  z-index:9!important;
  grid-column:auto!important;
  justify-self:start!important;
  align-items:center!important;
  width:auto!important;
  height:auto!important;
  max-width:calc(100% - 520px)!important;
  margin:0!important;
  padding:0!important;
}
html[data-public-report="true"] body > header.topbar .topbar-inner > .brand .clokit-master-brand-v12 {
  display:flex!important;
  visibility:visible!important;
  opacity:1!important;
  align-items:center!important;
  text-decoration:none!important;
}
html[data-public-report="true"] body > header.topbar > a.clokit-report-home-brand {
  display:none!important;
}
@media(max-width:1220px) {
  html[data-public-report="true"] body > header.topbar .topbar-inner > .brand {
    left:14px!important;
    max-width:calc(100% - 280px)!important;
  }
}
@media(max-width:760px) {
  html[data-public-report="true"] body > header.topbar .topbar-inner > .brand {
    left:10px!important;
    max-width:calc(100% - 160px)!important;
  }
  html[data-public-report="true"] body > header.topbar .topbar-inner > .brand .clokit-master-name {
    font-size:15px!important;
  }
  html[data-public-report="true"] body > header.topbar .topbar-inner > .brand .clokit-master-tag {
    font-size:7px!important;
  }
}
@media(max-width:480px) {
  html[data-public-report="true"] body > header.topbar .topbar-inner > .brand .clokit-master-copy {
    display:none!important;
  }
}
