/* Social accounts remain at the top-left of every footer. */
.site-footer .footer-social {
  grid-column: 1 / -1;
  grid-row: 1;
  justify-self: start;
  min-width: 0;
  max-width: 100%;
  margin: 0 0 8px;
}
.site-footer .footer-team, .site-footer .footer-links { grid-row: 2; }
.site-footer .footer-fan-policy { grid-row: 3; }
.footer-social-label { margin: 0 0 6px; color: var(--text, #f2f3f5); font-size: .75rem; font-weight: 700; }
.footer-social-icons { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(0px, 1vw, 8px); }
.site-footer .footer-social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  color: var(--text, #f2f3f5) !important;
  -webkit-text-fill-color: currentColor;
  background: none;
  text-decoration: none !important;
  border-radius: 4px;
}
.footer-social-icons i { display: block; font-size: 24px; line-height: 1; }
.site-footer .footer-social-icons a:is(:hover, :focus-visible) { color: var(--brand, #ffca0a) !important; }
.footer-social-icons a:focus-visible { outline: 2px solid var(--brand, #ffca0a); outline-offset: 2px; }
@media (max-width: 760px) {
  .site-footer .footer-links { grid-row: 3; }
  .site-footer .footer-fan-policy { grid-row: 4; }
  .site-footer:has(.footer-social) ~ .back-to-top { bottom: max(calc(84px + env(safe-area-inset-bottom)), var(--footer-clearance, 0px)); }
}

/* Compact social links, followed by navigation, identity and legal text. */
@media (max-width: 1100px) {
  .site-footer .footer-social { margin: 0; }
  .site-footer .footer-social-icons i { font-size: 20px; }
  .site-footer .footer-links {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: clamp(6px, 2vw, 16px);
    padding-top: 16px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
  }
  .site-footer .footer-links a { font-size: .6875rem; white-space: nowrap; }
  .site-footer .footer-team { grid-column: 1 / -1; grid-row: 3; margin-top: 6px; }
  .site-footer .footer-fan-policy { grid-column: 1 / -1; grid-row: 4; }
}

/* Compact social links, followed by navigation, identity and legal text. */
@media (max-width: 1100px) {
  .site-footer .footer-social { margin: 0; }
  .site-footer .footer-social-icons i { font-size: 20px; }
  .site-footer .footer-links {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: clamp(6px, 2vw, 16px);
    padding-top: 16px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
  }
  .site-footer .footer-links a { font-size: .6875rem; white-space: nowrap; }
  .site-footer .footer-team { grid-column: 1 / -1; grid-row: 3; margin-top: 6px; }
  .site-footer .footer-fan-policy { grid-column: 1 / -1; grid-row: 4; }
}
