.footer { justify-content: center; gap: 0; }
.footer nav { width: 100%; justify-content: center; gap: 8px 0; }

.masthead .main-nav {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: stretch;
  gap: 11px;
  width: min(1030px, calc(100% - 12px));
  min-height: 70px;
  margin: 23px auto 0;
  padding: 9px;
  border: 1px solid #b6ceba;
  border-radius: 35px;
  background: linear-gradient(135deg, #dceaddd9, #c7dfcfb3);
  box-shadow: inset 0 1px 0 #fffdf6b8, 0 5px 18px #2e553b0c;
}
.masthead .main-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 50px;
  padding: 11px 16px;
  border: 1px solid #becdb4;
  border-radius: 27px;
  background: linear-gradient(180deg, #fffaf0, #f0eddd);
  color: #254a38;
  font: 18px/1.25 var(--serif);
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 3px 0 #8fa6864d, 0 6px 11px #294d351a, inset 0 1px 0 #ffffffd9;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.masthead .main-nav a::after { display: none; }
.masthead .main-nav a:hover {
  transform: translateY(-2px);
  border-color: #91ac87;
  background: linear-gradient(180deg, #fffdf5, #e4eddc);
  box-shadow: 0 4px 0 #8fa6864d, 0 9px 16px #294d3526, inset 0 1px 0 #fff;
}
.masthead .main-nav a.is-current,
.masthead .main-nav a[aria-current="page"] {
  border-color: #335e46;
  background: linear-gradient(160deg, #38634b, #244c38);
  color: #fff9eb;
  box-shadow: 0 3px 0 #183d2a80, 0 7px 13px #244b3829, inset 0 1px 0 #7b9b7970;
}
.masthead .main-nav a:focus-visible {
  outline: 3px solid #678b5c;
  outline-offset: 4px;
}
.masthead .main-nav a:active { transform: translateY(1px); }
@media (min-width: 601px) and (max-width: 900px) {
  .masthead .main-nav { gap: 8px; margin-top: 19px; padding: 8px; }
  .masthead .main-nav a { padding-inline: 10px; font-size: 16px; }
}
@media (min-width: 601px) and (max-width: 850px) {
  .masthead .main-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: 28px; }
}
@media (max-width: 600px) {
  .masthead .main-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    min-height: 0;
    margin-top: 21px;
    padding: 9px;
    border-radius: 27px;
  }
  .masthead .main-nav a { min-height: 48px; padding: 11px 10px; font-size: 16px; }
}
@media (max-width: 370px) {
  .masthead .main-nav { gap: 9px; padding: 8px; }
  .masthead .main-nav a { padding-inline: 7px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .masthead .main-nav a { transition: none; }
  .masthead .main-nav a:hover,
  .masthead .main-nav a:active { transform: none; }
}
