/* ── Navigation ── */
nav.topnav {
  position: fixed; top: 0; left: 0; right: 0;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  padding: 0.75rem 0;
}
.nav-inner { display: flex; justify-content: space-between; align-items: center; gap: 2rem; }
.nav-brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; white-space: nowrap; }
.nav-brand:hover { text-decoration: none; }
.nav-brand-mark { width: 28px; height: 28px; flex-shrink: 0; }
.nav-brand-name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--text-primary); letter-spacing: -0.01em; }
.nav-brand-name::after {
  content: 'Beta';
  display: inline-block;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--accent-light);
  color: var(--accent-primary);
  padding: 0.12rem 0.4rem;
  border-radius: var(--radius-full);
  margin-left: 0.4rem;
  vertical-align: middle;
  text-transform: uppercase;
}

/* Desktop nav */
.nav-links {
  display: flex; gap: 0.15rem; list-style: none; align-items: center;
  margin: 0; padding: 0;
}
.nav-links > li > a,
.nav-links > li > .dropdown-toggle {
  font-size: 0.875rem; font-weight: 500; color: var(--text-secondary);
  text-decoration: none; transition: color 0.2s ease, background-color 0.2s ease;
  padding: 0.45rem 0.8rem; border-radius: var(--radius-sm);
  display: flex; align-items: center; gap: 0.3rem;
  background: none; border: none; cursor: pointer; font-family: inherit; line-height: 1;
}
.nav-links > li > a:hover, .nav-links > li > a.active,
.nav-links > li > .dropdown-toggle:hover, .nav-links > li > .dropdown-toggle.active {
  color: var(--accent-primary); background: rgb(37 99 235 / 0.07);
}
.dropdown-toggle svg { transition: transform 0.2s ease; flex-shrink: 0; }
.has-dropdown:hover > .dropdown-toggle svg { transform: rotate(180deg); }
.has-dropdown { position: relative; }
.dropdown-menu {
  display: none; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%); list-style: none; z-index: 100;
  padding-top: 6px; min-width: 180px;
}
.dropdown-menu::before { content: ''; display: block; height: 6px; }
.dropdown-menu-inner {
  background: #fff; border: 1px solid var(--border-color); border-radius: 10px;
  padding: 0.5rem; box-shadow: 0 8px 24px rgb(0 0 0 / 0.1); overflow: hidden;
}
.has-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block; padding: 0.5rem 0.875rem; font-size: 0.8125rem; font-weight: 500;
  color: var(--text-secondary); text-decoration: none; border-radius: var(--radius-sm);
  transition: color 0.15s ease, background-color 0.15s ease; white-space: nowrap;
}
.dropdown-menu a:hover, .dropdown-menu a.active { color: var(--accent-primary); background: rgb(37 99 235 / 0.07); }

.nav-right { display: flex; align-items: center; gap: 0.6rem; }
.nav-cta {
  font-size: 0.8125rem; font-weight: 600; color: #fff;
  background: var(--text-primary); padding: 0.55rem 1.05rem;
  border-radius: var(--radius-full); text-decoration: none; white-space: nowrap;
  transition: var(--transition);
}
.nav-cta:hover { background: #1E293B; text-decoration: none; }

/* Hamburger */
.mobile-menu-btn {
  display: none; background: none; border: none; cursor: pointer;
  color: var(--text-primary); padding: 0.25rem;
}

/* Bottom Tab Bar — mobile */
.btab-bar { display: none; }

@media (min-width: 901px) { .mobile-cta-wrapper { display: none; } }

@media (max-width: 900px) {
  nav.topnav { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .nav-links { display: none; }
  .nav-right { display: none; }

  .btab-bar {
    display: flex;
    position: fixed; bottom: 0; left: 0; right: 0;
    height: 64px; padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #fff; border-top: 1px solid var(--border-color); z-index: 9000;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .btab-bar::-webkit-scrollbar { display: none; }
  .btab {
    -webkit-tap-highlight-color: transparent;
    flex: 0 0 auto;
    min-width: 64px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; text-decoration: none; color: var(--text-tertiary);
    font-size: 0.58rem; font-weight: 600; letter-spacing: 0.04em;
    text-transform: uppercase; font-family: var(--font-sans);
    padding: 6px; transition: color 0.15s ease;
  }
  .btab svg { display: block; width: 20px; height: 20px; flex-shrink: 0; }
  .btab span { display: block; line-height: 1; white-space: nowrap; }
  .btab.active { color: var(--accent-primary); }
  .btab:active { opacity: 0.7; }
}

@media (max-width: 600px) {
  .container, .container-wide { padding: 0 1.25rem; }
}
