.topbar nav {
  align-items: center;
}

.account-menu {
  position: relative;
  margin-left: 4px;
}

.account-menu-button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 5px 9px 5px 6px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.account-menu-button:hover,
.account-menu-button[aria-expanded="true"] {
  border-color: var(--line);
  background: #f5f7f2;
}

.account-menu-button:focus-visible,
.account-dropdown button:focus-visible {
  outline: 3px solid #b8da50;
  outline-offset: 2px;
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  overflow: hidden;
  border: 2px solid #d5e7dc;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .04em;
}

.account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-copy {
  display: grid;
  min-width: 0;
  max-width: 155px;
}

.account-copy strong,
.account-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-copy strong {
  font-size: 13px;
}

.account-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.account-chevron {
  color: var(--muted);
  font-size: 12px;
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  width: min(260px, calc(100vw - 28px));
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
  box-shadow: 0 18px 48px #102b1d2e;
}

.account-dropdown button {
  width: 100%;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  padding: 10px 11px;
  text-align: left;
  font-weight: 700;
}

.account-dropdown button:hover:not(:disabled) {
  background: #edf3ed;
  color: var(--green);
}

.account-dropdown button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.account-dropdown .account-sign-out {
  border-top: 1px solid var(--line);
  border-radius: 0 0 9px 9px;
  margin-top: 6px;
  padding-top: 12px;
  color: var(--danger);
}

.account-photo-hint {
  margin: 3px 9px 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.account-photo-preview {
  display: grid;
  gap: 12px;
}

.account-photo-preview img {
  width: 104px;
  height: 104px;
  object-fit: cover;
  border: 2px solid var(--green);
  border-radius: 50%;
}

@media (max-width: 720px) {
  .topbar {
    height: 68px;
    padding: 0 14px;
  }

  .brand-logo {
    width: 44px !important;
    height: 44px !important;
  }

  .brand > span,
  .topbar nav > a {
    display: none;
  }

  .account-copy {
    max-width: 105px;
  }
}

@media (max-width: 440px) {
  .account-copy,
  .account-chevron {
    display: none;
  }

  .account-menu-button {
    padding-right: 6px;
  }

  .topbar nav {
    gap: 2px;
  }

  .topbar .link-btn {
    padding-inline: 7px;
  }
}
