/* Website header geometry shared with site/styles.css. Portal content keeps its
   own layout; these rules apply equally before and after authentication. */
#studio-header {
  --studio-gutter: clamp(22px, 5.4vw, 80px);
  position: relative;
  z-index: 40;
  width: min(1320px, calc(100% - var(--studio-gutter) * 2));
  height: auto;
  min-height: 83px;
  margin-inline: auto;
  padding: 0;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 0;
  background: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: normal;
}
#studio-header .brand { width: 223px; flex: 0 0 auto; padding-block: 13px; }
#studio-header .brand img { width: 100%; height: auto; }
.studio-navigation { display: flex; align-items: center; gap: 28px; font-size: 16px; }
.studio-navigation a { display: flex; align-items: center; min-height: 48px; color: #e5ebef; font: inherit; white-space: nowrap; }
.studio-navigation a:hover,
.studio-navigation a[aria-current] { color: #00cce8; }
#studio-header a:focus-visible,
#studio-header button:focus-visible { outline: 2px solid #00cce8; outline-offset: 6px; border-radius: 3px; }
.studio-menu-toggle { display: none; }
@media (max-width: 900px) {
  #studio-header { --studio-gutter: 32px; }
  #studio-header .brand { width: 176px; }
  .studio-navigation { gap: 24px; font-size: 15px; }
}
@media (max-width: 720px) {
  /* Without JavaScript, links remain visible and usable in normal flow. */
  #studio-header { flex-wrap: wrap; gap: 0 24px; }
  .studio-navigation { width: 100%; flex-wrap: wrap; gap: 0 20px; padding-bottom: 12px; }
  #studio-header.navigation-ready { flex-wrap: nowrap; gap: 24px; }
  .navigation-ready .studio-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    flex: 0 0 auto;
    gap: 5px;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #edf5f8;
    cursor: pointer;
  }
  .studio-menu-toggle span:not(.sr-only) { width: 23px; height: 2px; border-radius: 999px; background: currentColor; transition: transform .18s ease, opacity .18s ease; }
  .studio-menu-toggle[aria-expanded="true"] span:nth-of-type(2) { transform: translateY(7px) rotate(45deg); }
  .studio-menu-toggle[aria-expanded="true"] span:nth-of-type(3) { opacity: 0; }
  .studio-menu-toggle[aria-expanded="true"] span:nth-of-type(4) { transform: translateY(-7px) rotate(-45deg); }
  .navigation-ready .studio-navigation {
    position: absolute;
    z-index: 40;
    top: calc(100% - 4px);
    right: 0;
    width: min(290px, calc(100vw - var(--studio-gutter) * 2));
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    border: 1px solid rgba(47, 86, 108, .9);
    border-radius: 10px;
    background: rgba(4, 14, 22, .97);
    box-shadow: 0 18px 45px rgba(0, 0, 0, .48);
  }
  .navigation-ready .studio-navigation.is-open { display: flex; }
  .navigation-ready .studio-navigation a { width: 100%; min-height: 46px; padding: 0 12px; border-radius: 6px; }
  .navigation-ready .studio-navigation a:hover { background: rgba(17, 46, 63, .7); }
}
@media (max-width: 600px) {
  #studio-header { --studio-gutter: 22px; min-height: 68px; }
  #studio-header .brand { width: 168px; padding-block: 8px; }
}
/* Preserve the existing full-screen avatar picker at its own breakpoint. */
@media (max-width: 700px) {
  body.avatar-picker-active #studio-header { display: none; }
}
@media (max-width: 359px) {
  #studio-header { --studio-gutter: 18px; }
  #studio-header .brand { width: 148px; }
}
@media (prefers-reduced-motion: reduce) {
  .studio-menu-toggle span { transition: none; }
}
@media print { #studio-header { display: none; } }
