:root {
  --deployed-brand-mark-width: clamp(2.55rem, 3.5vw, 3.2rem);
  --deployed-brand-wordmark-width: clamp(8rem, 11vw, 10.5rem);
  --deployed-nav-min-height: 2.5rem;
}

.site-header .topbar,
.shell > header.topbar {
  min-width: 0;
  max-width: 100%;
}

.site-header .brand,
.shell > header.topbar .brand {
  min-width: 0;
  max-width: 100%;
  align-items: center;
}

.site-header .brand-mark,
.shell > header.topbar .brand-mark {
  flex: 0 0 auto;
  width: var(--deployed-brand-mark-width);
  max-width: 100%;
  aspect-ratio: 43 / 39;
}

.site-header .brand-wordmark,
.shell > header.topbar .brand-wordmark {
  flex: 0 1 auto;
  width: var(--deployed-brand-wordmark-width);
  max-width: 100%;
  aspect-ratio: 3 / 1;
}

.site-header .brand-mark img,
.site-header .brand-wordmark img,
.shell > header.topbar .brand-mark img,
.shell > header.topbar .brand-wordmark img {
  display: block;
  width: 100%;
  height: auto;
}

.site-header .topbar-links,
.shell > header.topbar .topbar-links {
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.9rem;
  overflow: visible;
}

.site-header .topbar-links a,
.shell > header.topbar .topbar-links a {
  position: relative;
  min-width: 0;
  min-height: var(--deployed-nav-min-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.44rem 0.3rem;
  line-height: 1.12;
  white-space: nowrap;
}

.site-header .topbar-links a::after,
.shell > header.topbar .topbar-links a::after {
  right: 0.3rem;
  left: 0.3rem;
  bottom: 0.18rem;
  height: 2px;
  border-radius: 999px;
}

.site-header .topbar-links a[aria-current="page"]::after,
.shell > header.topbar .topbar-links a[aria-current="page"]::after,
.shell > header.topbar .topbar-links a.active::after {
  transform: scaleX(1);
}

.site-header .topbar-status,
.shell > header.topbar .topbar-actions,
.shell > header.topbar .topbar-meta {
  min-width: 0;
  max-width: 100%;
}

.site-header a:focus-visible,
.site-header button:focus-visible,
.shell > header.topbar a:focus-visible,
.shell > header.topbar button:focus-visible {
  outline: 3px solid rgba(125, 229, 255, 0.92);
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .site-header .topbar,
  .shell > header.topbar {
    grid-template-columns: 1fr !important;
    grid-template-areas: none !important;
    justify-items: stretch;
    align-items: stretch;
    gap: 0.65rem;
    width: min(100% - 1rem, var(--page-width, 1380px));
    margin-right: auto;
    margin-left: auto;
  }

  .site-header .brand,
  .shell > header.topbar .brand {
    justify-self: start;
    width: auto;
  }

  .site-header .brand-mark,
  .shell > header.topbar .brand-mark {
    width: 2.55rem;
  }

  .site-header .brand-wordmark,
  .shell > header.topbar .brand-wordmark {
    width: 8rem;
  }

  .site-header .topbar-links,
  .shell > header.topbar .topbar-links {
    display: flex;
    flex-wrap: nowrap;
    justify-self: stretch;
    justify-content: flex-start;
    width: 100%;
    gap: 0.4rem;
    padding: 0 0 0.3rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
  }

  .site-header .topbar-links a,
  .shell > header.topbar .topbar-links a {
    flex: 0 0 auto;
    width: auto;
    min-height: 2.35rem;
    padding: 0.48rem 0.72rem;
    border: 1px solid var(--line, rgba(119, 156, 198, 0.2));
    border-radius: 999px;
    background: rgba(8, 14, 24, 0.46);
    text-align: center;
    white-space: nowrap;
    scroll-snap-align: start;
  }

  .site-header .topbar-links a::after,
  .shell > header.topbar .topbar-links a::after {
    right: 0.65rem;
    left: 0.65rem;
    bottom: 0.24rem;
  }

  .site-header .topbar-status,
  .shell > header.topbar .topbar-actions,
  .shell > header.topbar .topbar-meta {
    justify-self: stretch;
    justify-content: flex-start;
    width: 100%;
  }

  body.portfolio-agent-page .site-header .topbar {
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    justify-items: initial;
    align-items: center;
  }

  body.portfolio-agent-page .site-header .topbar-links {
    display: none;
  }

  body.portfolio-agent-page .site-header .topbar-status {
    justify-self: end;
    justify-content: flex-end;
    width: auto;
  }
}
