/* The site footer, shared by every page. One copy, linked from each page's <head>.
   Colors fall back to the docs stylesheet's names, so it works on both page families. */
footer.ff {
  margin: 0; padding: 0; text-align: left; background: transparent;
  border-top: 1px solid var(--divider, var(--border));
}
footer.ff .ff-inner {
  display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 2.5rem 3rem;
  max-width: none; margin: 0; padding: 3.5rem var(--gutter, 24px) 2rem;
}
footer.ff .ff-left { display: flex; flex-direction: column; gap: 1.25rem; align-items: flex-start; }
footer.ff .ff-brand { display: inline-block; line-height: 0; }
footer.ff .ff-brand img { height: 42px; width: auto; }
footer.ff .ff-tagline { margin: 0.5rem 0 0; color: var(--muted, var(--text-muted)); font-size: 0.95rem; line-height: 1.55; text-wrap: balance; }
footer.ff .social-links { display: flex; gap: 0.6rem; justify-content: flex-start; }
/* Same icon color on every page; some pages color all links blue. */
footer.ff .social-link { color: var(--muted, var(--text-secondary)); }
footer.ff .social-link:hover { color: var(--text, var(--text-primary)); }
footer.ff .ff-cols { display: flex; gap: 4.5rem; }
/* The link group is a <nav>; undo the menu-bar styles some stylesheets give every nav. */
footer.ff nav.ff-cols { position: static; top: auto; z-index: auto; height: auto; min-height: 0; padding: 0; margin: 0;
  border: 0; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
footer.ff .ff-col h3 { margin: 0 0 0.75rem; padding: 0; border: 0; font-size: 0.85rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text, var(--text-primary)); }
footer.ff .ff-col a { display: block; padding: 0.3rem 0; color: var(--muted, var(--text-muted)); text-decoration: none; font-size: 0.875rem; }
footer.ff .ff-col a:hover { color: var(--text, var(--text-primary)); }
footer.ff .ff-bottom {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 1.25rem 1.5rem; flex-wrap: wrap;
  position: relative;
}
footer.ff .ff-legal { font-size: 0.85rem; color: var(--muted, var(--text-muted)); }

/* Logo per theme. Pages with one theme (the docs) carry only one logo, so these rules do nothing there. */
footer.ff .ff-brand .logo-light { display: none; }
:root[data-theme="light"] footer.ff .ff-brand .logo-dark { display: none; }
:root[data-theme="light"] footer.ff .ff-brand .logo-light { display: inline; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) footer.ff .ff-brand .logo-dark { display: none; }
  :root:not([data-theme="dark"]) footer.ff .ff-brand .logo-light { display: inline; }
}

/* Docs pages: line up with the docs header, centered at 1200px (docs.css .docs-header-inner). */
.docs-header ~ footer.ff .ff-inner { max-width: 1200px; margin: 0 auto; padding-left: 2rem; padding-right: 2rem; }
@media (max-width: 1024px) { .docs-header ~ footer.ff .ff-inner { padding-left: 1rem; padding-right: 1rem; } }
@media (max-width: 420px) { .docs-header ~ footer.ff .ff-inner { padding-left: 0.75rem; padding-right: 0.75rem; } }

@media (max-width: 768px) {
  footer.ff .ff-inner { grid-template-columns: 1fr; }
  footer.ff .ff-cols { gap: 2rem 3rem; flex-wrap: wrap; }
}
