:root {
  --ainivox-shell-width: min(1280px, calc(100vw - 64px));
  --ainivox-nav-height: 76px;
}

.ainivox-shell-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  backdrop-filter: blur(30px);
  background: rgba(19, 19, 21, 0.72);
}

.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: 32px;
  padding: 16px 0;
}

.ainivox-shell-nav__brand {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

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

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

.ainivox-shell-nav__track {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 40px;
}

.ainivox-shell-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 0 8px;
  border-bottom: 2px solid transparent;
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-headline);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  transition: color 180ms ease, border-color 180ms ease;
}

.ainivox-shell-nav__link:hover,
.ainivox-shell-nav__link:focus-visible {
  color: rgba(255, 255, 255, 0.84);
}

.ainivox-shell-nav__link.is-current,
.ainivox-shell-nav__link[aria-current="page"] {
  color: var(--color-on-surface);
  border-color: var(--color-primary);
}

.ainivox-shell-nav .site-nav__actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

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

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

.ainivox-shell-nav .site-nav__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-container) 100%);
  color: #08224a;
  font-family: var(--font-headline);
  font-size: 0.88rem;
  font-weight: 800;
  box-shadow: 0 14px 32px rgba(75, 142, 255, 0.18);
  white-space: nowrap;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.ainivox-shell-nav .site-nav__cta:hover {
  transform: translateY(-1px);
}

.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% + 14px);
  right: 0;
  width: min(280px, calc(100vw - 32px));
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(19, 19, 21, 0.96);
  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: 10px;
  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;
}

.ainivox-shell-nav .site-nav__support-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition:
    transform 180ms ease,
    color 180ms ease,
    opacity 180ms ease;
}

.ainivox-shell-nav .site-nav__support-trigger:hover,
.ainivox-shell-nav .site-nav__support-trigger:focus-visible {
  color: rgba(255, 255, 255, 0.96);
  transform: translateY(-1px);
  outline: none;
}

.ainivox-shell-nav .site-nav__support-icon {
  width: 22px;
  height: 22px;
}

.ainivox-shell-nav .site-nav__support-panel {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: min(288px, calc(100vw - 32px));
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(19, 19, 21, 0.96);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(24px);
}

.ainivox-shell-nav .site-nav__support-card {
  display: grid;
  gap: 12px;
}

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

.ainivox-shell-nav .site-nav__support-copy p {
  margin: 6px 0 0;
  color: var(--color-muted);
  font-size: 0.82rem;
  line-height: 1.65;
}

.ainivox-shell-nav .site-nav__support-qr-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.ainivox-shell-nav .site-nav__support-qr {
  display: block;
  width: 100%;
  max-width: 176px;
  height: auto;
  border-radius: 12px;
  background: #ffffff;
}

.ainivox-shell-nav .site-nav__support-hint {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.76rem;
  line-height: 1.6;
}

@media (max-width: 1080px) {
  .ainivox-shell-nav__shell {
    width: min(1280px, calc(100vw - 40px));
    gap: 20px;
  }

  .ainivox-shell-nav__track {
    gap: 20px;
  }
}

@media (max-width: 920px) {
  .ainivox-shell-nav__shell {
    grid-template-columns: 1fr auto;
    justify-items: center;
  }

  .ainivox-shell-nav__center {
    grid-column: 1 / -1;
    width: 100%;
    order: 3;
  }

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

@media (max-width: 720px) {
  .ainivox-shell-nav__shell {
    width: min(1280px, calc(100vw - 24px));
    gap: 16px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .ainivox-shell-nav__track {
    gap: 14px;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .ainivox-shell-nav__link {
    font-size: 0.82rem;
  }

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

  .ainivox-shell-nav .site-nav__actions {
    width: 100%;
    justify-content: flex-end;
  }

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

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

  .ainivox-shell-nav .site-nav__support-panel {
    left: auto;
    right: 0;
    width: min(288px, calc(100vw - 24px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .ainivox-shell-nav__link,
  .ainivox-shell-nav .site-nav__cta,
  .ainivox-shell-nav .site-nav__support-trigger {
    transition: none;
  }
}
