/* Final mobile and tablet readability overrides. Loaded after all component CSS. */
@media (max-width: 1100px) and (min-width: 861px) {
  .primary-menu .expanded-mega-menu .services-mega-group > a:not(.services-mega-title) {
    min-height: 48px;
    grid-template-columns: 35px minmax(0, 1fr);
    gap: 9px;
    padding: 7px 8px !important;
    font-size: 11.5px;
    line-height: 1.3;
  }

  .primary-menu .expanded-mega-menu .services-mega-group > a:not(.services-mega-title)::before {
    width: 35px;
    height: 35px;
    background-size: 29px 23px;
  }

  .expanded-mega-menu .services-mega-title {
    font-size: 13px !important;
  }
}

@media (max-width: 860px) {
  .site-nav {
    padding: 18px 20px 38px !important;
  }

  .primary-menu > li > a {
    min-height: 54px;
    display: flex !important;
    align-items: center;
    padding: 13px 2px !important;
    font-size: 17px !important;
    line-height: 1.25;
  }

  .services-menu > a::after {
    width: 8px;
    height: 8px;
    border-width: 2px;
  }

  .services-menu.submenu-open > .services-mega-menu.expanded-mega-menu {
    gap: 12px !important;
    margin-bottom: 12px !important;
    padding: 12px !important;
  }

  .expanded-mega-menu .services-mega-group,
  .expanded-mega-menu .services-mega-group:first-child,
  .expanded-mega-menu .services-mega-group:nth-child(4) {
    gap: 7px;
    padding: 13px;
    border-radius: 12px;
  }

  .primary-menu .expanded-mega-menu .services-mega-title {
    min-height: 42px !important;
    display: flex !important;
    align-items: center;
    margin-bottom: 5px !important;
    padding: 0 2px 10px !important;
    font-size: 15px !important;
    line-height: 1.3 !important;
  }

  .expanded-mega-menu .services-mega-title span {
    padding: 6px 8px;
    font-size: 10px;
  }

  .primary-menu .expanded-mega-menu .services-mega-group > a:not(.services-mega-title) {
    min-height: 56px;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    padding: 7px 8px !important;
    border-radius: 9px;
    font-size: 14px !important;
    line-height: 1.3;
  }

  .primary-menu .expanded-mega-menu .services-mega-group > a:not(.services-mega-title)::before {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background-size: 34px 27px;
  }

  .primary-menu .expanded-mega-menu .services-mega-all {
    min-height: 50px;
    padding: 13px 14px !important;
    font-size: 14px !important;
  }

  .site-footer {
    padding-top: 34px;
    padding-bottom: 24px;
  }

  .site-footer .footer-wordmark {
    gap: 12px;
    font-size: 22px;
    line-height: 1.15;
  }

  .site-footer .footer-wordmark::before {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    font-size: 13px;
  }

  .site-footer .expanded-footer-directory,
  .site-footer .footer-service-directory {
    gap: 9px;
    margin-top: 22px;
    padding-top: 18px;
  }

  .site-footer .footer-service-group {
    padding: 16px;
  }

  .site-footer .footer-service-group h2 {
    margin-bottom: 10px;
    padding-left: 14px;
    font-size: 13px;
    line-height: 1.4;
    letter-spacing: .07em;
  }

  .site-footer .footer-service-group h2::before {
    width: 7px;
    height: 7px;
  }

  .site-footer .footer-service-group a {
    display: block;
    min-height: 34px;
    padding: 6px 0;
    color: #bdc9d8;
    font-size: 14px;
    line-height: 1.45;
  }

  .site-footer .footer-contact-line {
    gap: 16px;
    margin-top: 22px;
    padding-top: 20px;
  }

  .site-footer .footer-contact-line p {
    color: #b4c1d1;
    font-size: 14px;
    line-height: 1.65;
  }

  .site-footer .footer-contact-line .button {
    min-height: 48px;
    font-size: 13px;
  }

  .site-footer .footer-trademark {
    margin-top: 18px;
    color: #94a5ba;
    font-size: 12px;
    line-height: 1.7;
  }

  .site-footer .footer-legal {
    gap: 10px;
    margin-top: 18px;
    padding-top: 16px;
    color: #9aabc0;
    font-size: 12.5px;
    line-height: 1.9;
  }

  .site-footer .footer-legal a,
  .site-footer .cookie-settings-link {
    display: inline-block;
    padding: 3px 2px;
    color: #b7c4d4;
    font-size: 12.5px;
  }
}

@media (max-width: 680px) {
  .site-footer .expanded-footer-directory,
  .site-footer .footer-service-directory {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .brand {
    max-width: calc(100vw - 108px);
    font-size: 14px;
    letter-spacing: -.025em;
  }

  .brand-mark {
    width: 45px;
    height: 45px;
    flex-basis: 45px;
    border-radius: 12px;
    font-size: 14px;
  }

  .expanded-mega-menu .services-mega-group,
  .expanded-mega-menu .services-mega-group:first-child,
  .expanded-mega-menu .services-mega-group:nth-child(4),
  .expanded-mega-menu .funds-mega-group {
    grid-template-columns: 1fr;
  }

  .primary-menu .expanded-mega-menu .services-mega-group > a:not(.services-mega-title) {
    min-height: 60px;
    grid-template-columns: 46px minmax(0, 1fr);
    font-size: 15px !important;
  }

  .primary-menu .expanded-mega-menu .services-mega-group > a:not(.services-mega-title)::before {
    width: 46px;
    height: 46px;
    background-size: 37px 30px;
  }

  .site-footer .footer-service-group a {
    font-size: 15px;
  }

  .site-footer .footer-contact-line p {
    font-size: 14.5px;
  }
}
