/* ─── Shared site nav ─────────────────────────────────────────────────── */
/* N- prefix to avoid collisions with Tailwind or existing L- classes.     */
/* Accent colours are driven by CSS variables set inline on <header>.       */

site-nav { display: contents; }

/* Header shell */
.N-header {
  position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid rgba(255,255,255,.1);
  background: rgba(10,11,13,.9);
  backdrop-filter: blur(12px);
}

/* Inner grid: left brand | centre nav | right controls */
.N-inner {
  max-width: 80rem; margin: 0 auto;
  padding: 0.75rem 1rem;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
}

/* Right side wrapper forces status/burger to the trailing edge */
.N-right { display: flex; align-items: center; justify-content: flex-end; }

/* ── Left brand strip ──────────────────────────────────────────────────── */
.N-brand {
  display: flex; align-items: center; gap: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
               "Liberation Mono", "Courier New", monospace;
  font-size: 0.75rem; line-height: 1rem;
}

/* Shared base for home link AND return button */
.N-home, .N-home-btn {
  font-size: 0.75rem; line-height: 1rem; font-weight: 600; letter-spacing: .05em;
  color: #a1a1aa; text-decoration: none; transition: color .15s;
}
.N-home-btn {
  background: none; border: none; cursor: pointer; padding: 0;
}
.N-home:hover, .N-home-btn:hover { color: #6ee7b7; }

.N-sep    { color: #52525b; }
.N-root   { color: var(--nav-accent, #34d399); }
.N-dollar { color: #a1a1aa; }

/* Badge — hidden below sm, shown above */
.N-badge {
  display: none;
  background: var(--nav-badge-bg, rgba(16,185,129,.1));
  color: var(--nav-badge-text, #6ee7b7);
  border-radius: 0.25rem; padding: 0.125rem 0.375rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
               "Liberation Mono", "Courier New", monospace;
  font-size: 0.75rem; line-height: 1rem;
}
@media (min-width: 640px) { .N-badge { display: inline-block; } }

/* ── Centre nav links ──────────────────────────────────────────────────── */
.N-nav { display: none; align-items: center; gap: 1.5rem; }

.N-nav a {
  font-size: 0.75rem; line-height: 1rem; font-weight: 600; letter-spacing: .05em;
  color: #d4d4d8; text-decoration: none; transition: color .15s;
  font-family: 'Inter', sans-serif;
}
.N-nav a:hover   { color: #fff; }
.N-nav a.N-active { color: var(--nav-accent, #34d399); }

@media (min-width: 768px) { .N-nav { display: flex; } }

/* ── Status indicator ─────────────────────────────────────────────────── */
.N-status {
  display: none; align-items: center; gap: 0.5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
               "Liberation Mono", "Courier New", monospace;
  font-size: 0.6875rem; line-height: 1rem;
}
.N-status-lbl { color: #71717a; }
.N-status-on  {
  display: inline-flex; align-items: center; gap: 0.25rem;
  color: var(--nav-accent, #34d399);
}
.N-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--nav-accent, #34d399);
  animation: Npulse 2s cubic-bezier(.4,0,.6,1) infinite;
  flex-shrink: 0;
}
@keyframes Npulse { 0%,100%{opacity:1} 50%{opacity:.5} }

@media (min-width: 768px) { .N-status { display: flex; } }

/* ── Hamburger button ─────────────────────────────────────────────────── */
.N-burger {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 2.25rem; height: 2.25rem; background: none; cursor: pointer;
  border: 1px solid rgba(255,255,255,.1); border-radius: 0.375rem; padding: 0.5rem;
  transition: border-color .15s;
}
.N-burger:hover { border-color: rgba(255,255,255,.2); }
.N-burger span  {
  display: block; height: 1px; background: #a1a1aa;
  transition: transform .2s, opacity .2s, background .2s;
}

@media (min-width: 768px) { .N-burger { display: none; } }

/* ── Mobile drawer ────────────────────────────────────────────────────── */
.N-mobile {
  border-top: 1px solid rgba(255,255,255,.1);
  background: rgba(10,11,13,.98);
  padding: 0.5rem 1.5rem 1.5rem;
}
.N-mobile nav { display: flex; flex-direction: column; }

.N-mobile nav a {
  border-bottom: 1px solid rgba(255,255,255,.1); padding: 0.875rem 0;
  font-size: 0.8125rem; line-height: 1.25rem; font-weight: 600; letter-spacing: .05em;
  color: #a1a1aa; text-decoration: none; transition: color .15s;
  font-family: 'Inter', sans-serif;
}
.N-mobile nav a:last-child  { border-bottom: none; }
.N-mobile nav a:hover       { color: #fff; }
.N-mobile nav a.N-active    { color: var(--nav-accent, #34d399); }

.N-mobile-status {
  display: flex; align-items: center; gap: 0.5rem; margin-top: 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
               "Liberation Mono", "Courier New", monospace;
  font-size: 0.6875rem; line-height: 1rem; color: #52525b;
}
.N-dot-sm {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--nav-accent, #34d399);
  animation: Npulse 2s cubic-bezier(.4,0,.6,1) infinite; flex-shrink: 0;
}
