/* HEADER / TOPBAR — app top bar: brand + nav. */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 16px 26px;
  background: var(--primary);
  border-bottom: var(--border-w-bold) solid var(--border);
}
.topbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--on-color);
  text-decoration: none;
}
.topbar__brand-star {
  width: 23px;
  height: 23px;
  flex: none;
  color: var(--highlight);
}
/* Persistent value proposition next to the wordmark — desktop only (no room on mobile). */
.topbar__tagline {
  display: none;
}

@media (max-width: 720px) {
  /* --bp-md */
  .topbar {
    flex-wrap: nowrap;
  }
  .topbar__nav {
    flex: 0 0 auto;
  }
  .topbar__brand {
    flex: 0 1 auto;
    flex-wrap: wrap;
    align-content: flex-start;
    min-width: 23px; /* the star's width — never clip the star itself */
    max-height: 28px; /* one row tall — a wrapped wordmark falls out of view */
    overflow: hidden;
  }
  .topbar__brand-text {
    line-height: 1;
    white-space: nowrap;
  }
}
.topbar__nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.topbar__link {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--on-color);
  text-decoration: none;
  padding: 8px 12px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.topbar__link--on {
  background: var(--on-color);
  color: var(--text);
  border-radius: var(--radius-pill);
}
.topbar__account {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-body);
  font-weight: var(--fw-bold);
  font-size: 15px;
  color: var(--text);
  background: var(--on-color);
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  cursor: pointer;
  text-decoration: none;
}
.topbar__caret {
  display: inline-block;
  font-size: 11px;
  line-height: 1;
  transition: transform 0.15s ease;
}
.menu--open .topbar__caret {
  transform: rotate(180deg);
}

.topbar__burger {
  width: 15px;
  height: 11px;
  flex: none;
  background:
    linear-gradient(currentColor, currentColor) left top,
    linear-gradient(currentColor, currentColor) left center,
    linear-gradient(currentColor, currentColor) left bottom;
  background-size: 100% 2px;
  background-repeat: no-repeat;
}

.topbar__link--desktop,
.topbar__account--desktop {
  display: none;
}

@media (min-width: 721px) {
  /* --bp-md — unfold the bar: links inline, mobile-only bits hidden */
  .topbar__tagline {
    display: inline-block;
    padding-left: 11px;
    border-left: var(--border-w) solid color-mix(in srgb, var(--on-color) 35%, transparent);
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: var(--label-spacing-wide);
    color: var(--on-color);
    opacity: 0.85;
  }
  .topbar__link--desktop {
    display: inline-block;
  }
  .topbar__account--desktop {
    display: inline-flex;
  }
  .topbar__nav .menu--mobile,
  .topbar__nav .menu__item--mobile,
  .topbar__nav .menu__sep--mobile {
    display: none;
  }
}
