.navlinks .nav-legal { display: flex; flex-direction: column; gap: 0; }
.navlinks .nav-legal a { padding: 2px 10px; font-size: .7rem; line-height: 1.5; }
.navlinks .nav-legal-desktop { margin-right: 8px; }
.navlinks .nav-legal-mobile { display: none; }
.navlinks .nav-legal a:hover { background: #e9edf0; color: var(--navy); }
.navlinks a:focus-visible, .scroll-tools button:focus-visible { outline: 3px solid #446b94; outline-offset: 3px; }
.scroll-tools {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 25;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.scroll-tools[hidden], .scroll-tools button[hidden] { display: none !important; }
.scroll-tools button {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #17263b;
  border: 1px solid #ffffffd9;
  border-radius: 50%;
  background: #f4f7fae8;
  box-shadow: 0 4px 18px #17263b29, inset 0 1px 0 #fff;
  transition: background .18s ease, transform .18s ease;
}
@supports ((backdrop-filter: blur(14px)) or (-webkit-backdrop-filter: blur(14px))) {
  .scroll-tools button { background: #f4f7faad; backdrop-filter: blur(14px) saturate(150%); -webkit-backdrop-filter: blur(14px) saturate(150%); }
}
@media (hover: hover) {
  .scroll-tools button:hover { background: #ffffffeb; transform: translateY(-2px); }
}
.scroll-tools button:active { transform: scale(.94); }
.toast { bottom: calc(132px + env(safe-area-inset-bottom)); }
.site-footer { padding-right: max(86px, calc(70px + env(safe-area-inset-right))); }
/* Switch before the authenticated navigation runs out of room. */
@media (max-width: 1200px) {
  .menu-toggle { display: block; }
  .navlinks { display: none; position: absolute; left: 0; right: 0; top: calc(var(--header-height) - 1px); background: #fbfbf8; padding: 12px 18px 16px; box-shadow: 0 12px 20px #16243518; flex-direction: column; align-items: stretch; max-height: calc(100dvh - var(--header-height)); overflow-y: auto; }
  .navlinks.open { display: flex; }
  .navlinks button, .navlinks a { text-align: left; padding: 10px 12px; }
  .navlinks .nav-legal-desktop { display: none; }
  .navlinks .nav-legal-mobile { display: flex; }
  .navlinks .nav-legal-mobile a { font-size: .82rem; padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-tools button { transition: none; }
}
