.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.top-nav.sticky,
.top-nav.nav-scrolled {
  background-color: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(12px) !important;
  box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.05);
}

.top-nav-inner {
  width: min(100%, 1200px);
  margin: 0 auto;
  padding: 0.875rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.top-nav-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.top-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  font-size: .875rem;
  line-height: 1;
  font-weight: 700;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-title {
  color: #0f172a;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.1;
}

.brand-subtitle {
  color: #64748b;
  font-size: 0.75rem;
  line-height: 1.2;
}

.ui-link-nav {
  color: #475569;
  font-size: 0.95rem;
  font-weight: 600;
  transition: color .2s ease;
}

.ui-link-nav:hover,
.ui-link-nav-active {
  color: #e11d48;
}

@media (max-width: 767px) {
  .top-nav-inner {
    padding: 0.75rem 0.875rem;
  }

  .top-nav-group {
    gap: 0.75rem;
  }

  .ui-link-nav {
    display: none;
  }

  .brand-subtitle {
    display: none;
  }
}

.brand-mark-sm {
  width: 1.75rem;
  height: 1.75rem;
  min-width: 1.75rem;
  min-height: 1.75rem;
  font-size: 0.75rem;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 80;
  transform: translateY(-200%);
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  background: #f43f5e;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Auth & User Navigation Button */
.nav-user-btn {
  min-width: 2.5rem;
  min-height: 2.5rem;
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 9999px;
  color: #475569;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-user-btn:hover {
  background: rgba(241, 245, 249, 0.9);
  color: #0f172a;
}

.nav-user-btn:focus-visible {
  outline: 2px solid rgba(244, 63, 94, 0.35);
  outline-offset: 2px;
}

.nav-user-label {
  display: none;
}

/* Auth Pending State - Hide auth buttons until auth confirmed */
#nav-auth-container.auth-pending #nav-login-btn,
#nav-auth-container.auth-pending #nav-user-group {
  display: none !important;
}

@media (min-width: 1024px) {
  .nav-user-btn {
    width: auto;
    padding: 0 1rem;
    gap: 0.6rem;
    border-radius: 0.75rem;
  }
  .nav-user-label {
    display: inline;
    font-size: 0.875rem;
    font-weight: 700;
  }
}
