/* Shared hamburger navigation — fixed so it lands in the same spot on every page */
.nav-toggle {
  appearance: none;
  position: fixed;
  top: max(0.65rem, env(safe-area-inset-top, 0px));
  right: max(0.65rem, env(safe-area-inset-right, 0px));
  z-index: 70;
  border: 1px solid var(--line, rgba(230, 238, 235, 0.12));
  background: rgba(16, 24, 22, 0.92);
  color: var(--ink, #e6eeeb);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

/* Keep header controls clear of the fixed hamburger */
.topbar .top-actions,
.page-top .top-actions,
header .top-actions {
  padding-right: 3.1rem;
}

.nav-toggle span {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 80;
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(20rem, 88vw);
  background: #101816;
  border-left: 1px solid var(--line, rgba(230, 238, 235, 0.1));
  box-shadow: -16px 0 40px rgba(0, 0, 0, 0.45);
  transform: translateX(105%);
  transition: transform 0.22s ease;
  z-index: 90;
  display: flex;
  flex-direction: column;
  padding: 1rem 1rem 1.25rem;
}

body.nav-open .nav-backdrop {
  opacity: 1;
  pointer-events: auto;
}

body.nav-open .nav-drawer {
  transform: translateX(0);
}

.nav-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.nav-drawer-head strong {
  font-family: var(--font-display, Sora, sans-serif);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.nav-close {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted, #7a918a);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  overflow: auto;
}

.nav-list a {
  display: block;
  text-decoration: none;
  color: var(--ink, #e6eeeb);
  padding: 0.7rem 0.8rem;
  border-radius: 8px;
  font-weight: 600;
}

.nav-list a:hover {
  background: rgba(61, 155, 132, 0.12);
}

.nav-list a.active {
  background: rgba(61, 155, 132, 0.22);
  color: #9fe0cb;
}

.nav-list .nav-note {
  display: block;
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--muted, #7a918a);
  margin-top: 0.15rem;
}

.nav-footer {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line, rgba(230, 238, 235, 0.1));
  color: var(--muted, #7a918a);
  font-size: 0.75rem;
}
