:root {
  --ainivox-shell-width: min(1240px, calc(100vw - 48px));
  --ainivox-nav-height: 72px;
  --ainivox-nav-radius: 18px;
  --ainivox-nav-pill-radius: 999px;
}

.ainivox-shell-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(26px);
  background: rgba(10, 16, 28, 0.76);
}

.ainivox-shell-nav__shell {
  width: var(--ainivox-shell-width);
  min-height: var(--ainivox-nav-height);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.ainivox-shell-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ainivox-shell-nav__brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(173, 198, 255, 0.96), rgba(75, 142, 255, 0.92));
  color: #072148;
  font-family: var(--font-label);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.18);
}

.ainivox-shell-nav__brand-copy {
  display: grid;
  gap: 2px;
}

.ainivox-shell-nav__brand-copy strong {
  font-family: var(--font-headline);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.ainivox-shell-nav__brand-copy span {
  color: rgba(228, 226, 228, 0.54);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.ainivox-shell-nav__center {
  display: flex;
  justify-content: center;
}

.ainivox-shell-nav__track {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: var(--ainivox-nav-pill-radius);
  border: 1px solid rgba(173, 198, 255, 0.12);
  background: rgba(16, 24, 38, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ainivox-shell-nav__indicator {
  position: absolute;
  top: 6px;
  left: 6px;
  height: calc(100% - 12px);
  width: 0;
  border-radius: var(--ainivox-nav-pill-radius);
  background: linear-gradient(135deg, rgba(173, 198, 255, 0.28), rgba(75, 142, 255, 0.26));
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.16);
  opacity: 0;
  transform: translateX(0);
  transition:
    transform 320ms cubic-bezier(0.2, 0.85, 0.2, 1),
    width 320ms cubic-bezier(0.2, 0.85, 0.2, 1),
    opacity 180ms ease;
  pointer-events: none;
}

.ainivox-shell-nav__indicator.is-ready {
  opacity: 1;
}

.ainivox-shell-nav__link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  min-height: 38px;
  padding: 0 18px;
  border-radius: var(--ainivox-nav-pill-radius);
  color: rgba(228, 226, 228, 0.62);
  font-family: var(--font-headline);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color 180ms ease;
}

.ainivox-shell-nav__link:hover,
.ainivox-shell-nav__link:focus-visible,
.ainivox-shell-nav__link.is-current {
  color: var(--color-text);
}

.ainivox-shell-nav .site-nav__account {
  position: relative;
}

.ainivox-shell-nav .site-nav__cta {
  min-height: 42px;
  padding: 0 20px;
  border-radius: 14px;
  border: 1px solid rgba(173, 198, 255, 0.18);
  background: linear-gradient(135deg, rgba(173, 198, 255, 0.96), rgba(75, 142, 255, 0.9));
  color: #072148;
  font-family: var(--font-headline);
  font-size: 0.88rem;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.16);
  white-space: nowrap;
}

.ainivox-shell-nav .site-nav__account-trigger {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ainivox-shell-nav .site-nav__account-trigger.is-authenticated {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text);
  box-shadow: none;
}

.ainivox-shell-nav .site-nav__account-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(280px, calc(100vw - 32px));
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(173, 198, 255, 0.12);
  background: rgba(10, 16, 28, 0.94);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(24px);
}

.ainivox-shell-nav .site-nav__account-meta {
  display: grid;
  gap: 4px;
  padding: 4px 4px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ainivox-shell-nav .site-nav__account-meta strong {
  font-family: var(--font-headline);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.ainivox-shell-nav .site-nav__account-meta span {
  color: var(--color-muted);
  font-size: 0.8rem;
  line-height: 1.6;
  word-break: break-word;
}

.ainivox-shell-nav .site-nav__account-links {
  display: grid;
  gap: 6px;
  padding-top: 12px;
}

.ainivox-shell-nav .site-nav__account-links a,
.ainivox-shell-nav .site-nav__account-links button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--color-text);
  text-align: left;
  cursor: pointer;
}

.ainivox-shell-nav .site-nav__account-links a:hover,
.ainivox-shell-nav .site-nav__account-links button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.ainivox-shell-nav .site-nav__account-links button {
  color: #ffb4b4;
}

@media (max-width: 960px) {
  .ainivox-shell-nav__shell {
    width: min(1240px, calc(100vw - 28px));
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 10px;
    padding: 12px 0 14px;
  }

  .ainivox-shell-nav__center {
    width: 100%;
  }

  .ainivox-shell-nav__track {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .ainivox-shell-nav .site-nav__account {
    width: 100%;
  }

  .ainivox-shell-nav .site-nav__cta {
    width: 100%;
  }

  .ainivox-shell-nav .site-nav__account-panel {
    left: 0;
    right: auto;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ainivox-shell-nav__indicator,
  .ainivox-shell-nav__link {
    transition: none;
  }
}
