.global-site-header {
  --global-ink: #071c5f;
  --global-soft: #50628c;
  --global-line: #dfe8f4;
  --global-blue: #0b5cff;
  position: sticky;
  top: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: auto minmax(190px, 270px) minmax(360px, 1fr) auto;
  align-items: center;
  gap: clamp(14px, 1.2vw, 22px);
  min-height: 82px;
  padding: 10px clamp(22px, 2.8vw, 52px);
  border-bottom: 1px solid var(--global-line);
  background: rgba(255, 255, 255, .96);
  color: var(--global-ink);
  font-family: Inter, Aptos, "Segoe UI", Arial, sans-serif;
  box-shadow: 0 1px 0 rgba(7, 28, 95, .02);
}

.global-site-header--hidden-mode {
  position: fixed;
  left: 0;
  right: 0;
  /* The slide-down lesson header is the final UI layer. It must unfold over
     lesson sidebars, tool popups, media companions and the class panel. */
  z-index: 2147483647;
  transform: translateY(calc(-100% + 8px));
  transition: transform .18s ease, box-shadow .18s ease;
}

.global-site-header--hidden-mode::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -18px;
  height: 18px;
}

.global-site-header--hidden-mode:hover,
.global-site-header--hidden-mode:focus-within,
.global-site-header--hidden-mode.global-site-header--menu-open {
  transform: translateY(0);
  box-shadow: 0 18px 48px rgba(7, 28, 95, .12);
}

.global-brand {
  display: flex;
  align-items: center;
  padding-right: clamp(10px, .9vw, 18px);
}

.global-brand img {
  width: clamp(166px, 11vw, 216px);
  height: auto;
  display: block;
}

.global-page-title {
  display: grid;
  align-content: center;
  min-height: 44px;
  padding-right: clamp(12px, 1.1vw, 20px);
  border-right: 1px solid #cfd9ea;
  line-height: 1.18;
}

.global-page-title b {
  font-size: clamp(14px, 1vw, 18px);
  font-weight: 800;
  color: var(--global-ink);
}

.global-page-title span {
  margin-top: 2px;
  font-size: clamp(12px, .82vw, 14px);
  font-weight: 500;
  color: #24406f;
}

.global-page-title .global-page-subtitle-lines {
  display: grid;
  gap: 1px;
}

.global-page-title .global-page-subtitle-lines i {
  font-style: normal;
}

.global-site-header--home {
  grid-template-columns: auto 164px minmax(420px, 1fr) auto;
  min-height: 92px;
}

.global-site-header--home .global-brand img {
  width: clamp(188px, 12vw, 228px);
}

.global-site-header--home .global-brand {
  padding-right: clamp(8px, .75vw, 14px);
  border-right: 1px solid #cfd9ea;
}

.global-site-header--home .global-page-title {
  width: 164px;
  max-width: 164px;
  padding-left: 0;
  padding-right: 12px;
}

.global-site-header--home .global-header-links {
  justify-content: flex-start;
  gap: clamp(8px, .56vw, 12px);
  transform: translateX(-8px);
}

.global-site-header--home .global-page-title b,
.global-site-header--home .global-page-title span {
  font-size: clamp(13px, .86vw, 15px);
  line-height: 1.18;
}

.global-site-header--home .global-page-title b {
  font-weight: 800;
}

.global-site-header--home .global-page-title span {
  font-weight: 800;
  color: var(--global-ink);
}

.global-site-header:not(.global-site-header--home) {
  grid-template-columns: auto minmax(198px, 224px) minmax(320px, 1fr) auto;
  gap: clamp(10px, .85vw, 16px);
}

.global-site-header--wide-title:not(.global-site-header--home) {
  grid-template-columns: auto minmax(264px, 298px) minmax(280px, 1fr) auto;
}

.global-site-header:not(.global-site-header--home) .global-brand {
  border-right: 1px solid #cfd9ea;
}

.global-site-header:not(.global-site-header--home) .global-page-title {
  padding-right: 10px;
}

.global-site-header:not(.global-site-header--home) .global-header-links {
  justify-content: flex-start;
  transform: translateX(-8px);
}

.global-site-header--wide-title:not(.global-site-header--home) .global-header-links {
  transform: translateX(-4px);
}

.global-header-links,
.global-header-actions {
  display: flex;
  align-items: center;
}

.global-header-links {
  justify-content: flex-end;
  min-width: 0;
  gap: clamp(12px, .92vw, 20px);
  font-size: clamp(13px, .88vw, 15px);
  font-weight: 700;
  white-space: nowrap;
}

.global-header-links a {
  color: var(--global-ink);
  text-decoration: none;
}

.global-header-links a:hover {
  color: var(--global-blue);
}

.global-header-actions {
  gap: 10px;
  justify-content: flex-end;
}

.global-nav-wrap,
.global-language-wrap,
.global-account-wrap {
  position: relative;
}

.global-header-btn,
.global-lang-btn,
.global-login-btn {
  min-height: 48px;
  border-radius: 8px;
  border: 1px solid #cfdcf0;
  background: #fff;
  color: var(--global-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  font: inherit;
  font-size: clamp(13px, .88vw, 15px);
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.global-header-btn:hover,
.global-header-btn:focus-visible,
.global-lang-btn:hover,
.global-lang-btn:focus-visible,
.global-login-btn:hover,
.global-login-btn:focus-visible {
  border-color: #9bb8eb;
  box-shadow: 0 10px 24px rgba(7, 28, 95, .08);
  outline: none;
}

.global-nav-grid {
  display: grid;
  grid-template-columns: repeat(3, 4px);
  gap: 4px;
}

.global-nav-grid i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.global-help-icon {
  width: 23px;
  height: 23px;
  border: 2px solid currentColor;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
}

.global-lang-btn {
  width: 78px;
  min-width: 78px;
  height: 32px;
  min-height: 32px;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  padding: 0;
  font-size: 0;
  box-shadow: none;
}

.global-lang-btn.global-lang-ru {
  background-image: url("/assets/buttons/language/RU_01.png");
}

.global-lang-btn.global-lang-ru:hover,
.global-lang-btn.global-lang-ru:focus-visible {
  background-image: url("/assets/buttons/language/RU_02.png");
  box-shadow: none;
}

.global-lang-btn.global-lang-ru:active {
  background-image: url("/assets/buttons/language/RU_03.png");
}

.global-lang-btn.global-lang-en {
  background-image: url("/assets/buttons/language/EN_01.png");
}

.global-lang-btn.global-lang-en:hover,
.global-lang-btn.global-lang-en:focus-visible {
  background-image: url("/assets/buttons/language/EN_02.png");
  box-shadow: none;
}

.global-lang-btn.global-lang-en:active {
  background-image: url("/assets/buttons/language/EN_03.png");
}

.global-login-btn {
  min-width: 86px;
  min-height: 50px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, #0b64ff, #0045dc);
  box-shadow: 0 12px 28px rgba(7, 75, 210, .18);
}

.global-login-btn.signed-in {
  max-width: 168px;
  min-width: 112px;
}

.global-login-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 100;
  min-width: 240px;
  border: 1px solid #bcd1f4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(7, 28, 95, .16);
  padding: 10px;
}

.global-menu::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 22px;
  width: 12px;
  height: 12px;
  border-left: 1px solid #bcd1f4;
  border-top: 1px solid #bcd1f4;
  background: #fff;
  transform: rotate(45deg);
}

.global-navigation-menu a,
.global-account-menu a,
.global-account-menu button,
.global-language-menu button {
  width: 100%;
  min-height: 39px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--global-ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.global-navigation-menu a:hover,
.global-account-menu a:hover,
.global-account-menu button:hover,
.global-language-menu button:hover {
  background: #eef5ff;
}

.global-language-menu {
  min-width: 164px;
}

.global-language-menu button {
  font-size: 15px;
  font-weight: 400;
}

.global-language-menu b {
  color: #697790;
  font-weight: 700;
}

.global-account-user {
  display: grid;
  gap: 4px;
  padding: 6px 12px 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--global-line);
}

.global-account-user b {
  font-size: 16px;
}

.global-account-user span {
  color: var(--global-soft);
  font-size: 13px;
}

.global-account-menu .danger {
  color: #f0141e;
}

.global-login-menu {
  width: 292px;
  padding: 16px;
}

.global-login-form {
  display: grid;
  gap: 12px;
}

.global-login-form h2 {
  margin: 0 0 2px;
  color: var(--global-ink);
  font-size: 20px;
  line-height: 1.15;
}

.global-login-form label {
  display: grid;
  gap: 6px;
  color: var(--global-ink);
  font-size: 13px;
  font-weight: 650;
}

.global-login-form input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d5e0ef;
  border-radius: 6px;
  padding: 0 12px;
  color: var(--global-ink);
  font: inherit;
  font-size: 14px;
  background: #fff;
  outline: none;
}

.global-login-form input:focus {
  border-color: #8eb3f4;
  box-shadow: 0 0 0 3px rgba(11, 92, 255, .1);
}

.global-login-form > a,
.global-login-form p button {
  width: fit-content;
  border: 0;
  padding: 0;
  color: var(--global-blue);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

.global-login-submit {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: linear-gradient(180deg, #0b64ff, #0045dc);
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

.global-login-submit:hover,
.global-login-submit:focus-visible {
  box-shadow: 0 10px 22px rgba(7, 75, 210, .18);
  outline: none;
}

.global-login-submit:disabled {
  cursor: wait;
  opacity: .7;
}

.global-login-form p {
  margin: 2px 0 0;
  color: var(--global-soft);
  font-size: 13px;
}

@media (max-width: 1180px) {
  .global-site-header {
    grid-template-columns: auto minmax(150px, 220px) 1fr;
  }
  .global-header-links {
    display: none;
  }
}

@media (max-width: 760px) {
  .global-site-header {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .global-brand {
    border-right: 0;
  }
  .global-page-title {
    border-right: 0;
    padding-right: 0;
  }
  .global-header-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}
