/* Footer refinement: mobile only. Desktop is unchanged. */
@media (max-width: 767px) {
  body:has(.site-header) footer {
    padding: 34px 0 calc(28px + env(safe-area-inset-bottom));
  }
  body:has(.site-header) footer .container {
    width: min(100% - 40px, 540px);
    margin-inline: auto;
  }
  body:has(.site-header) footer .footer-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 25px !important;
  }
  body:has(.site-header) footer .footer-grid > div {
    min-width: 0;
  }
  body:has(.site-header) footer .brand {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 18px;
    line-height: 1.25;
  }
  body:has(.site-header) footer .brand img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
  }
  body:has(.site-header) footer .brand span {
    font-size: 18px;
  }
  body:has(.site-header) footer .footer-grid p {
    max-width: 48ch !important;
    margin: 12px 0 0;
    font-size: 14px;
    line-height: 1.65;
  }
  body:has(.site-header) footer h4 {
    font-size: 17px;
    line-height: 1.3;
    margin: 0 0 10px;
  }
  body:has(.site-header) footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }
  body:has(.site-header) footer li {
    margin: 0;
    padding: 5px 0;
    font-size: 14px;
    line-height: 1.55;
    overflow-wrap: anywhere;
  }
  body:has(.site-header) footer li a {
    display: inline-block;
    padding: 3px 0;
    text-decoration: none;
    overflow-wrap: anywhere;
  }
  body:has(.site-header) footer li a:focus-visible {
    outline: 2px solid #7de28d;
    outline-offset: 3px;
  }
  body:has(.site-header) footer .copyright {
    margin-top: 25px;
    padding-top: 17px;
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
    overflow-wrap: anywhere;
  }
  /* Service pages: keep their footer columns readable on narrow screens. */
  body:not(:has(.site-header)) footer .footer-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 20px !important;
  }
  body:not(:has(.site-header)) footer {
    padding: 34px 6% 24px;
  }
  body:not(:has(.site-header)) footer a,
  body:not(:has(.site-header)) footer p {
    overflow-wrap: anywhere;
  }
}
