.topbar {
  box-sizing: border-box;
  width: 100%;
  height: 76px;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 0 clamp(20px, 5vw, 76px);
  border-bottom: 1px solid #edf0f5;
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar .brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  min-width: 0;
  color: #081735;
  text-decoration: none;
}

.topbar .brand-logo {
  display: block;
  width: 176px;
  height: auto;
  max-height: 52px;
  object-fit: contain;
  object-position: left center;
}

.topbar > nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: 0;
}

.topbar nav a,
.topbar .ghost {
  color: #536075;
  text-decoration: none;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
}

.topbar nav a:hover,
.topbar nav a:focus-visible,
.topbar .ghost:hover,
.topbar .ghost:focus-visible {
  color: #075bff;
}

.topbar .header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar .ghost {
  padding: 10px 4px;
  border: 0;
  background: none;
  cursor: pointer;
}

.topbar .primary {
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #003fbe, #075bff 58%, #079cff);
  color: #fff;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(7, 91, 255, 0.26);
}

.topbar .primary.small {
  padding: 11px 17px;
  font-size: 14px;
}

.topbar .primary:hover,
.topbar .primary:focus-visible {
  background: linear-gradient(135deg, #002f96, #003fbe 54%, #075bff);
  transform: translateY(-1px);
}

.topbar .menu {
  display: none;
  margin-left: auto;
  padding: 7px 9px;
  border: 1px solid #d8e5fb;
  border-radius: 9px;
  background: #fff;
  color: #081735;
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 820px) {
  .topbar {
    gap: 18px;
  }

  .topbar nav,
  .topbar .header-actions {
    display: none;
  }

  .topbar .menu {
    display: block;
  }

  .topbar.open {
    height: auto;
    flex-wrap: wrap;
    padding-top: 12px;
    padding-bottom: 14px;
  }

  .topbar.open nav {
    display: flex;
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding-top: 8px;
    border-top: 1px solid #edf0f5;
  }

  .topbar.open nav a {
    display: block;
    padding: 9px 4px;
  }

  .topbar.open .header-actions {
    display: flex;
    order: 4;
    width: 100%;
    align-items: center;
  }
}

@media (max-width: 520px) {
  .topbar {
    height: 68px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .topbar .brand-logo {
    width: 148px;
    max-height: 46px;
  }

  .topbar.open .header-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar.open .header-actions > * {
    width: 100%;
    text-align: center;
  }
}
