/* Mobile navigation */
.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  padding: 12px;
  align-items: center;
  justify-content: center;
  border: 1px solid #bdcbbf;
  border-radius: 8px;
  background: transparent;
  color: var(--pine);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle:hover { background: #e8eee5; }
.nav-toggle-icon { display: grid; gap: 5px; width: 22px; }
.nav-toggle-icon span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 900px) {
  .nav { position: sticky; top: 0; }
  .nav .navinner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: 68px;
    height: auto;
    gap: 0 12px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .nav .logo { font-size: clamp(17px, 4.6vw, 21px); white-space: nowrap; }
  .nav.nav-ready .nav-toggle { display: inline-flex; }
  .nav .navlinks {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 4px;
    width: 100%;
    margin-top: 8px;
    padding: 8px 0 4px;
    border-top: 1px solid #d8e0d5;
    max-height: calc(100vh - 96px);
    max-height: calc(100dvh - 96px);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    white-space: normal;
    font-size: 16px;
  }
  .nav.nav-ready .navlinks { display: none; }
  .nav.nav-ready .navlinks.is-open { display: flex; }
  .nav .navlinks a,
  .nav .navlinks a:last-child {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 16px;
    line-height: 1.5;
    white-space: normal;
  }
  .nav .navlinks a:hover,
  .nav .navlinks a[aria-current="page"] { background: #e8eee5; color: #183d32; }
  .nav .navlinks a:focus-visible { outline-offset: -3px; box-shadow: none; }
}
@media print { .nav-toggle { display: none !important; } }
