.msc-estate-header {
  position: sticky;
  top: 0;
  z-index: 999;
  width: min(1000px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0;
  color: #232c39;
  font-family: var(--msc-font-family, Lato, sans-serif);
  transform: translateY(0);
  transition: width .22s ease, padding .22s ease, transform .24s ease;
}
.msc-estate-header.is-scroll-hidden { transform: translateY(calc(-100% - 48px)); }
.msc-estate-header.has-open-panel,
.msc-estate-header.has-open-drawer { z-index: 2147483400; }
.msc-auth-modal,
.msc-registration-modal,
.msc-login-modal,
.msc-native-account-modal,
#account-menu-popup { z-index: 2147483600 !important; }
.admin-bar .msc-estate-header { top: 32px; }
.msc-estate-header * { box-sizing: border-box; }
.msc-estate-header a { color: inherit; text-decoration: none; }
.msc-estate-header__bar {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 60px;
  padding: 0 24px;
  border-radius: 12px;
  background: rgba(238, 238, 238, .64);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-radius .16s ease, background-color .16s ease;
}
.msc-estate-header.has-open-panel .msc-estate-header__bar {
  border-radius: 12px 12px 0 0;
  background: rgba(238, 238, 238, .64);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.msc-estate-header.has-open-drawer .msc-estate-header__bar { border-radius: 12px 12px 0 0; }
.msc-estate-header__brand {
  display: flex;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  margin-right: 28px;
  border-radius: 50%;
}
.msc-estate-header__brand img { display: block; width: 40px; height: 40px; object-fit: contain; }
.msc-estate-header__nav { min-width: 0; flex: 1; }
.msc-estate-header__nav > ul { display: flex; align-items: stretch; gap: 28px; min-height: 60px; margin: 0; padding: 0; list-style: none; }
.msc-estate-header__nav-item,
.msc-estate-header__nav-label { display: flex; align-items: stretch; }
.msc-estate-header__nav-label > a,
.msc-estate-header__nav-label > [aria-controls] {
  display: flex;
  align-items: center;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  text-transform: uppercase;
}
.msc-estate-header__nav-label > a { position: relative; }
.msc-estate-header__nav-label > a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 12px;
  left: 0;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transition: transform .2s ease;
}
.msc-estate-header__nav-item:is(:hover, :focus-within, .is-open) .msc-estate-header__nav-label > a::after { transform: scaleX(1); }
.msc-estate-header__nav-item:is(:hover, :focus-within, .is-open) .msc-estate-header__nav-label > a { color: var(--msc-blue, #0099ff); }
.msc-estate-header__panel {
  position: absolute;
  z-index: 3;
  top: 76px;
  right: 0;
  left: 0;
  display: block;
  padding: 24px;
  border-radius: 0 0 12px 12px;
  background: rgba(238, 238, 238, .64);
  box-shadow: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.msc-estate-header__panel > p { margin: 0 0 20px; color: rgba(35, 44, 57, .84); font-size: 15px; font-weight: 700; letter-spacing: .045em; line-height: 1.45; text-transform: uppercase; }
.msc-estate-header__panel > ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; align-items: stretch; gap: 4px 24px; margin: 0; padding: 0; list-style: none; }
.msc-estate-header__nav-item--courses .msc-estate-header__panel > ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.msc-estate-header__panel li { display: flex; min-width: 0; }
.msc-estate-header__panel li a {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  width: 100%;
  height: 100%;
  min-height: 48px;
  padding: 10px 8px;
  border-radius: 9px;
  transition: background-color .18s ease;
}
.msc-estate-header__panel li a:hover,
.msc-estate-header__panel li a:focus-visible { background: rgba(255, 255, 255, .2); }
.msc-estate-header__item-copy { display: flex; min-width: 0; flex-direction: column; }
.msc-estate-header__item-icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin-top: 3px; color: #232c39; }
.msc-estate-header__item-icon img { display: block; width: 17px; height: 17px; object-fit: contain; filter: grayscale(1) brightness(.42); }
.msc-estate-header__item-title { font-size: 17px; font-weight: 700; line-height: 1.35; }
.msc-estate-header__item-description { margin-top: 2px; color: rgba(35, 44, 57, .82); font-size: 13px; line-height: 1.35; }
.msc-estate-header__badge { display: inline-flex; margin-left: 8px; padding: 3px 7px; border-radius: 999px; background: #2b7de9; color: #fff; font-size: 10px; line-height: 1.2; vertical-align: middle; }
.msc-estate-header__badge--free { background: #2dbf69; }
.msc-estate-header__badge--coming-soon { background: #232c39; }
.msc-estate-header__identity { display: flex; align-items: center; margin-left: 18px; }
.msc-estate-header__toggle,
.msc-estate-header__drawer,
.msc-estate-header__mobile-identity { display: none; }
.msc-estate-header [hidden] { display: none !important; }

@media (max-width: 1024px) {
  .msc-estate-header { width: calc(100% - 80px); }
  .msc-estate-header__bar { min-height: 60px; background: rgba(238, 238, 238, .64); }
  .msc-estate-header__nav { display: none; }
  .msc-estate-header__panel { display: none !important; }
  .msc-estate-header__identity { margin-left: auto; }
  .msc-estate-header__toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-left: 8px;
    padding: 8px;
    border: 0;
    border-radius: 50% !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    color: #232c39 !important;
    appearance: none;
    cursor: pointer;
  }
  .msc-estate-header__toggle:hover,
  .msc-estate-header__toggle:focus-visible { background: rgba(214, 54, 56, .08) !important; color: #d63638 !important; }
  .msc-estate-header__toggle span { position: absolute; top: 50%; left: 50%; display: block; width: 24px; height: 1.5px; background: currentColor; transform-origin: center; transition: transform .2s ease, background-color .2s ease; }
  .msc-estate-header__toggle span:first-child { transform: translate(-50%, -5px); }
  .msc-estate-header__toggle span:last-child { transform: translate(-50%, 5px); }
  .msc-estate-header__toggle[aria-expanded="true"] span:first-child { transform: translate(-50%, -50%) rotate(45deg); }
  .msc-estate-header__toggle[aria-expanded="true"] span:last-child { transform: translate(-50%, -50%) rotate(-45deg); }
  .msc-estate-header__drawer {
    position: absolute;
    top: 76px;
    right: 0;
    left: 0;
    display: block;
    max-height: calc(100vh - 100px);
    overflow: auto;
    border-radius: 0 0 12px 12px;
    background: rgba(238, 238, 238, .64);
    box-shadow: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  .msc-estate-header__drawer nav { padding: 16px 20px; }
  .msc-estate-header__drawer-item { display: grid; grid-template-columns: 1fr auto; }
  .msc-estate-header__drawer-item > a,
  .msc-estate-header__drawer-item > button { padding: 15px 4px; border: 0; background: transparent; color: #232c39; font: inherit; font-weight: 700; text-transform: uppercase; }
  .msc-estate-header__drawer-item > button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    border-radius: 50% !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    color: #232c39 !important;
    appearance: none;
    cursor: pointer;
  }
  .msc-estate-header__drawer-item > button:hover,
  .msc-estate-header__drawer-item > button:focus-visible { background: transparent !important; color: var(--msc-blue, #0099ff) !important; }
  .msc-estate-header__drawer-item > button svg { width: 9px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform .2s ease; }
  .msc-estate-header__drawer-item > button[aria-expanded="true"] svg { transform: rotate(90deg); }
  .msc-estate-header__drawer-item > ul { grid-column: 1 / -1; margin: 0 0 12px; padding: 0; list-style: none; }
  .msc-estate-header__drawer-item li a { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 10px; padding: 10px 12px; border-radius: 8px; }
  .msc-estate-header__drawer-item li a:hover { background: #f5f7f9; }
  .msc-estate-header__drawer-item li span { font-size: 13px; line-height: 1.4; }
  .msc-estate-header__drawer-item li .msc-estate-header__item-icon { width: 18px; height: 18px; }
  .msc-estate-header__drawer-item li .msc-estate-header__item-icon img { width: 17px; height: 17px; }
  .msc-estate-header__drawer-item li .msc-estate-header__badge { font-size: 9px; }
  body.msc-estate-menu-open { overflow: hidden; }
}

@media (max-width: 680px) {
  .msc-estate-header { width: calc(100% - 32px); padding: 10px 0; }
  .admin-bar .msc-estate-header { top: 46px; }
  .msc-estate-header__bar { min-height: 58px; padding: 0 10px 0 12px; }
  .msc-estate-header__brand,
  .msc-estate-header__brand img { width: 38px; height: 38px; }
  .msc-estate-header__brand { flex-basis: 38px; margin-right: auto; }
  .msc-estate-header__identity .msc-identity-header__member,
  .msc-estate-header__identity .msc-identity-header__guest { display: none !important; }
  .msc-estate-header__toggle { width: 38px; margin-left: 2px; }
  .msc-estate-header.has-open-drawer { width: 100%; padding: 10px 0 0; }
  .msc-estate-header.has-open-drawer .msc-estate-header__bar { border-radius: 12px 12px 0 0; }
  .msc-estate-header__drawer { top: 68px; max-height: calc(100vh - 68px); }
  .msc-estate-header__drawer nav { padding-bottom: 92px; }
  body.msc-estate-menu-open .msc-estate-header__mobile-identity {
    position: fixed;
    z-index: 2147483401;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    padding: 14px 20px;
    border: 0;
    background: #fff;
    box-shadow: 0 -8px 18px rgba(24, 45, 67, .1);
  }
  body.msc-estate-menu-open .msc-estate-header__mobile-identity .msc-identity-header--mobile-footer {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
}

@media (max-width: 782px) { .admin-bar .msc-estate-header { top: 46px; } }
@media (prefers-reduced-motion: reduce) { .msc-estate-header * { scroll-behavior: auto !important; transition: none !important; } }
