/* One header geometry across the public site and signed-out account screens.
   The authenticated workspace owns its own compact application navigation. */
body.onboarding-v2:not(.has-account-workspace) { --ob-header-height: 64px; }
body:not(.has-account-workspace) .mailcore-public-header {
  --public-header-height: 64px;
  position: sticky;
  inset-block-start: 0;
  z-index: 150;
  min-block-size: var(--public-header-height) !important;
  block-size: var(--public-header-height) !important;
  box-sizing: border-box;
  padding: 0 !important;
  border-block-end: 1px solid #e5e5e5;
  background: #fff;
  color: #262626;
  backdrop-filter: none;
}
body:not(.has-account-workspace) .mailcore-public-header > :is(.dashboard-topbar__inner,.api-header__inner,.blog-header__inner,.docs-header__inner,.onboarding-header__inner) {
  box-sizing: border-box;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  inline-size: 100%;
  max-inline-size: 1480px;
  min-block-size: calc(var(--public-header-height) - 1px) !important;
  margin-inline: auto;
  padding: 0 24px !important;
}
body:not(.has-account-workspace) .mailcore-public-header .mailcore-logo {
  --logo-box: 44px;
  --logo-size: 22px;
  display: inline-flex !important;
  align-items: baseline;
  flex: 0 0 auto;
  inline-size: auto;
  min-inline-size: 0;
  min-block-size: 44px;
  font-size: var(--logo-size) !important;
  font-weight: 600;
  line-height: 44px !important;
  gap: 0;
  padding: 0;
  white-space: nowrap;
}
body:not(.has-account-workspace) .mailcore-public-header .mailcore-logo__mark {
  block-size: .741em;
  inline-size: auto;
}
body:not(.has-account-workspace) .mailcore-public-header .mailcore-logo > span { display: inline !important; }
body:not(.has-account-workspace) .mailcore-public-header :is(.dashboard-topbar__nav,.api-header__nav,.blog-nav) {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.8vw, 26px);
  margin-inline: auto;
  min-inline-size: 0;
}
body:not(.has-account-workspace) .mailcore-public-header :is(.dashboard-topbar__nav,.api-header__nav,.blog-nav) > a {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
  padding: 0 4px;
  color: #404040;
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  white-space: nowrap;
  text-decoration: none;
}
body:not(.has-account-workspace) .mailcore-public-header :is(.site-header__actions,.api-header__actions,.blog-header__actions,.docs-header__actions,.onboarding-header__actions) {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: 8px;
  min-inline-size: 0;
  margin: 0;
  padding: 0;
}
body:not(.has-account-workspace) .mailcore-public-header :is(.btn,.onboarding-header__exit,.docs-header__section) {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: 44px;
  block-size: 44px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 20px;
}
body:not(.has-account-workspace) .mailcore-public-header .mailcore-language > summary {
  inline-size: 72px;
  min-inline-size: 72px;
  block-size: 44px;
  min-block-size: 44px;
  border-radius: 8px;
  box-shadow: none;
}
/* The language controller shifts the popup away from viewport edges. Keep
   that placement even when reduced motion disables its entry keyframes. */
body:not(.has-account-workspace) .mailcore-public-header .mailcore-language > nav {
  transform: translateX(var(--mailcore-language-shift-x, 0px));
  /* Keep horizontal geometry fixed while the controller measures its bounds. */
  animation: mailcore-header-language-reveal 140ms ease-out both;
}
body:not(.has-account-workspace) .mailcore-public-header .mailcore-auth:not(.mailcore-auth--menu) {
  position: relative;
  min-inline-size: 128px;
}
body:not(.has-account-workspace) .mailcore-public-header .mailcore-auth:not(.mailcore-auth--menu) .mailcore-auth__link {
  box-sizing: border-box;
  grid-template-columns: 8px minmax(0,1fr);
  inline-size: 128px;
  block-size: 44px;
  min-block-size: 44px;
  padding: 6px 10px;
  column-gap: 8px;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  transform: none;
}
body:not(.has-account-workspace) .mailcore-public-header .mailcore-auth__arrow { display: none; }
body:not(.has-account-workspace) .mailcore-public-header .mailcore-auth:not(.mailcore-auth--menu) .mailcore-auth__guest-only { display: none; }
body:not(.has-account-workspace) .mailcore-public-header .mailcore-auth__popup {
  max-inline-size: calc(100vw - 24px);
  max-block-size: calc(100dvh - 84px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
body:not(.has-account-workspace) .mailcore-public-header :is(.mailcore-auth__item,.mailcore-language nav > a) { min-block-size: 44px; }
body:not(.has-account-workspace) .mailcore-public-header :is(.dashboard-menu,.api-menu,.blog-menu) { position: relative; display: none; }
body:not(.has-account-workspace) .mailcore-public-header :is(.dashboard-menu,.api-menu,.blog-menu) > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 44px;
  min-inline-size: 44px;
  block-size: 44px;
  min-block-size: 44px;
  padding: 0;
  margin: 0;
  border: 1px solid #d8d3ce;
  border-radius: 8px;
  background: #fff;
  color: #404040;
  list-style: none;
  cursor: pointer;
}
body:not(.has-account-workspace) .mailcore-public-header summary::-webkit-details-marker { display: none; }
body:not(.has-account-workspace) .mailcore-public-header :is(.dashboard-menu__panel,.api-menu__panel,.blog-menu__panel) {
  box-sizing: border-box;
  position: absolute;
  inset: calc(100% + 10px) 0 auto auto;
  display: grid;
  gap: 2px;
  inline-size: min(336px,calc(100vw - 24px));
  max-block-size: calc(100vh - 88px);
  max-block-size: calc(100dvh - 88px);
  padding: 8px;
  margin: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #e5e1de;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px #2626261a;
}
body:not(.has-account-workspace) .mailcore-public-header :is(.dashboard-menu__panel,.api-menu__panel,.blog-menu__panel) > a {
  display: flex;
  align-items: center;
  min-block-size: 44px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 20px;
  color: #404040;
  text-decoration: none;
}
body:not(.has-account-workspace) .mailcore-public-header :is(.dashboard-menu__panel,.api-menu__panel,.blog-menu__panel) > a:hover { background: #f5f5f5; }
body:not(.has-account-workspace) .mailcore-public-header :is(a,button,summary):focus-visible { outline: 2px solid #e87527; outline-offset: 2px; }
body:not(.has-account-workspace) .mailcore-public-header details:not(.mailcore-language)[open] > nav,
body:not(.has-account-workspace) .mailcore-public-header [data-mailcore-auth-popup]:not([hidden]) { animation: mailcore-header-reveal 140ms ease-out; }
@keyframes mailcore-header-reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes mailcore-header-language-reveal { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 1199px) {
  body:not(.has-account-workspace) .mailcore-public-header :is(.dashboard-topbar__nav,.api-header__nav,.blog-nav) { display: none; }
  body:not(.has-account-workspace) .mailcore-public-header :is(.dashboard-menu,.api-menu,.blog-menu) { display: block; }
  body:not(.has-account-workspace) .mailcore-public-header :is(.dashboard-topbar__webmail,.api-header__mail,.blog-header__connect) { display: none; }
}
@media (max-width: 767px) {
  body:not(.has-account-workspace) .mailcore-public-header > :is(.dashboard-topbar__inner,.api-header__inner,.blog-header__inner,.docs-header__inner,.onboarding-header__inner) { gap: 12px; padding-inline: 12px !important; }
  body:not(.has-account-workspace) .mailcore-public-header .mailcore-logo { --logo-size: 20px; }
  body:not(.has-account-workspace) .mailcore-public-header :is(.site-header__actions,.api-header__actions,.blog-header__actions,.docs-header__actions,.onboarding-header__actions) { gap: 6px; }
  body:not(.has-account-workspace) .mailcore-public-header .mailcore-auth:not(.mailcore-auth--menu) { min-inline-size: 104px; }
  body:not(.has-account-workspace) .mailcore-public-header .mailcore-auth:not(.mailcore-auth--menu) .mailcore-auth__link { inline-size: 104px; padding-inline: 8px; }
  body:not(.has-account-workspace) .mailcore-public-header .mailcore-auth__status { display: none; }
  body:not(.has-account-workspace) .mailcore-public-header .mailcore-auth__label { margin: 0; font-size: 13px; }
  body:not(.has-account-workspace) .mailcore-public-header .mailcore-language > summary { inline-size: 60px; min-inline-size: 60px; gap: 5px; padding-inline: 8px; }
  body:not(.has-account-workspace) .mailcore-public-header .mailcore-language__chevron { display: none; }
  body:not(.has-account-workspace) .mailcore-public-header :is(.api-header__cta,.docs-header__section,.onboarding-header__context,.onboarding-save-state) { display: none; }
  /* Home is already reachable through the logo; keep the setup exit action. */
  body.account-access:not(.has-account-workspace) .mailcore-public-header .onboarding-header__exit { display: none; }
  body:not(.has-account-workspace) .mailcore-public-header .account-dashboard-toggle { display: none; }
}
@media (max-width: 380px) {
  body:not(.has-account-workspace) .mailcore-public-header > :is(.dashboard-topbar__inner,.api-header__inner,.blog-header__inner,.docs-header__inner,.onboarding-header__inner) { gap: 6px; }
  body:not(.has-account-workspace) .mailcore-public-header .mailcore-logo { --logo-size: 18px; }
  body:not(.has-account-workspace) .mailcore-public-header :is(.site-header__actions,.api-header__actions,.blog-header__actions,.docs-header__actions,.onboarding-header__actions) { gap: 4px; }
  body:not(.has-account-workspace) .mailcore-public-header .mailcore-language > summary { inline-size: 54px; min-inline-size: 54px; padding-inline: 6px; }
  body:not(.has-account-workspace) .mailcore-public-header .mailcore-auth:not(.mailcore-auth--menu) { min-inline-size: 88px; }
  body:not(.has-account-workspace) .mailcore-public-header .mailcore-auth:not(.mailcore-auth--menu) .mailcore-auth__link { inline-size: 88px; padding-inline: 6px; column-gap: 6px; }
  body:not(.has-account-workspace) .mailcore-public-header .mailcore-auth__label { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  body:not(.has-account-workspace) .mailcore-public-header *,
  body:not(.has-account-workspace) .mailcore-public-header *::before,
  body:not(.has-account-workspace) .mailcore-public-header *::after { animation: none !important; transition: none !important; }
}
