/* Shared site footer: legal links, company line, social links.
   Desktop: one row. Mobile: stacked and centred. Uses each page's theme
   tokens (--text, --muted, --border) with fallbacks. */
.site-footer {
  width: 100%;
  box-sizing: border-box;
  margin: 48px 0 0;
  padding: 10px 32px calc(10px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border-top: 1px solid var(--border, rgba(128, 128, 128, 0.35));
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: 9px;
  letter-spacing: 0.4px;
  line-height: 1.5;
  color: var(--muted, #777);
  text-align: center;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--text, #111);
}

.site-footer-links {
  display: flex;
  gap: 14px;
}

.site-footer-entity {
  margin: 0;
}

.site-footer-entity a {
  text-decoration: underline;
}

.site-footer-social {
  display: flex;
  gap: 16px;
}

.site-footer-social img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  opacity: 0.75;
  /* Icons are white; flip them on the default light theme. */
  filter: invert(1);
}

:root[data-theme="dark"] .site-footer-social img {
  filter: none;
}

.site-footer-social a:hover img,
.site-footer-social a:focus-visible img {
  opacity: 1;
}

@media (min-width: 900px) {
  .site-footer {
    flex-direction: row;
    justify-content: space-between;
    gap: 24px;
    padding-top: 8px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
  }

  .site-footer-entity {
    flex: 1 1 auto;
  }

  .site-footer-links,
  .site-footer-social {
    flex: 0 0 auto;
  }

  .site-footer-social img {
    width: 16px;
    height: 16px;
  }
}
