/* Keep touch targets centred and allow whole links to wrap on narrow screens. */
footer > nav.footer-links {
  display:inline-flex !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  justify-content:center !important;
  gap:4px 8px !important;
  min-width:0;
  max-width:100%;
  white-space:normal !important;
}
footer > nav.footer-links a {
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  box-sizing:border-box;
  min-height:44px;
  padding:0 4px;
  line-height:1.4;
  white-space:nowrap;
}
/* Spacing separates the links without loose dots on a wrapped row. */
footer > nav.footer-links > span[aria-hidden="true"] { display:none !important; }

/* One shared layout overrides legacy page-specific footer rules. */
footer:has(> nav.footer-links){
 display:grid !important;
 grid-template-columns:auto minmax(0,1fr) auto !important;
 align-items:center !important;
 gap:8px 24px !important;
 padding:14px 24px !important;
 font-size:.76rem !important;
 line-height:1.4 !important;
 white-space:normal !important;
 overflow:visible !important;
 text-align:left !important;
}
footer:has(> nav.footer-links)>span{
 display:block !important;
 align-self:center !important;
 margin:0 !important;
 min-width:0;
 font-size:inherit !important;
 line-height:inherit !important;
}
footer:has(> nav.footer-links)>span:first-child{justify-self:start !important;white-space:nowrap !important;order:0 !important}
footer:has(> nav.footer-links)>span:nth-child(2){justify-self:center !important;text-align:center !important;white-space:normal !important;order:0 !important}
footer:has(> nav.footer-links)>span::before,
footer:has(> nav.footer-links)>span::after{content:none !important}
footer>nav.footer-links{justify-self:end !important;align-self:center !important;margin:0 !important;padding:0 !important;order:0 !important;line-height:1.4 !important}
footer>nav.footer-links a{margin:0 !important;font-size:inherit !important}
@media(max-width:1100px){
 footer:has(> nav.footer-links){grid-template-columns:1fr auto !important;gap:0 16px !important}
 footer:has(> nav.footer-links)>span:first-child{grid-column:1;grid-row:1}
 footer:has(> nav.footer-links)>nav.footer-links{grid-column:2;grid-row:1}
 footer:has(> nav.footer-links)>span:nth-child(2){grid-column:1/-1;grid-row:2;justify-self:start !important;text-align:left !important}
}
@media(max-width:700px){
 footer:has(> nav.footer-links){grid-template-columns:minmax(0,1fr) !important;gap:6px !important;padding:16px 12px !important;text-align:center !important}
 footer:has(> nav.footer-links)>span:first-child{grid-column:1;grid-row:1;justify-self:center !important}
 footer:has(> nav.footer-links)>span:nth-child(2){grid-column:1;grid-row:2;justify-self:center !important;text-align:center !important}
 footer:has(> nav.footer-links)>nav.footer-links{grid-column:1;grid-row:3;justify-self:center !important;justify-content:center !important}
}
@media print{footer:has(> nav.footer-links){display:none !important}}
