.portal-header-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.portal-language-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.portal-language-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.portal-brand .portal-brand-copy {
  display: grid !important;
  flex: 1 1 auto;
  min-width: 0;
  visibility: visible;
}

.portal-brand .portal-brand-copy strong,
.portal-brand .portal-brand-copy small {
  display: block;
  visibility: visible;
}

.portal-language-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  background: #f7f9fc;
  border-radius: 999px;
}

.portal-lang-btn {
  min-height: 30px;
  padding: 5px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 800;
  cursor: pointer;
}

.portal-lang-btn.active {
  background: var(--navy);
  color: #fff;
}

.portal-lang-btn:focus-visible {
  outline: 3px solid rgba(11, 77, 145, .22);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .portal-header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "language language"
      "brand back";
    height: auto;
    min-height: 92px;
    padding: 10px 0;
    gap: 8px 12px;
  }

  .portal-brand {
    grid-area: brand;
    gap: 10px;
    min-width: 0;
    width: auto;
    align-self: center;
  }

  .portal-brand img {
    width: 58px;
    height: 38px;
    flex: 0 0 58px;
  }

  .portal-brand-copy {
    min-width: 0;
  }

  .portal-brand strong {
    font-size: 12px;
    line-height: 1.2;
  }

  .portal-brand small {
    font-size: 10px;
    line-height: 1.2;
    white-space: normal;
  }

  .portal-header-actions {
    display: contents;
  }

  .portal-language-row {
    grid-area: language;
    gap: 7px;
    justify-self: end;
  }

  .portal-language-label {
    font-size: 10px;
  }

  .portal-lang-btn {
    min-height: 27px;
    padding: 4px 7px;
    font-size: 10px;
  }

  .portal-back {
    grid-area: back;
    font-size: 11px;
    align-self: center;
    white-space: nowrap;
  }

  .portal-main {
    padding-top: 26px;
  }
}

@media (max-width: 360px) {
  .portal-header-inner {
    column-gap: 8px;
  }

  .portal-brand img {
    width: 50px;
    flex-basis: 50px;
  }

  .portal-brand {
    gap: 7px;
  }

  .portal-brand strong {
    font-size: 11px;
  }

  .portal-brand small {
    font-size: 9px;
  }

  .portal-lang-btn {
    padding-inline: 5px;
  }

  .portal-language-row {
    gap: 5px;
  }

  .portal-language-label {
    font-size: 9px;
  }
}

.registration-shortcuts {
  position: fixed;
  z-index: 90;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  padding: 9px 10px calc(9px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 -8px 22px rgba(7, 51, 108, .08);
}

.hero-form {
  padding-bottom: 100px;
}

.registration-shortcuts .btn {
  min-height: 48px;
}

.registration-shortcuts .btn-green img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

@media (max-width: 420px) {
  .registration-shortcuts {
    gap: 8px;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }

  .registration-shortcuts .btn {
    min-height: 46px;
    padding: 9px 8px;
    font-size: 12px;
    gap: 6px;
  }
}

@media (min-width: 720px) {
  .registration-shortcuts {
    left: 50%;
    right: auto;
    bottom: 16px;
    width: min(680px, calc(100% - 32px));
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 18px;
    transform: translateX(-50%);
    box-shadow: 0 8px 28px rgba(7, 51, 108, .16);
  }
}
