/* Footer (DESIGN.md): white ground, a single hairline on top. The disclaimer + GitHub/Feedback links sit on
   one row (muted 13px disclaimer left, orange outbound links right). On region pages, a row of prev/next
   region links sits above that (design reference). */
.site-footer {
  border-top: 1px solid var(--color-border-soft);
  background: var(--color-bg);
  color: var(--color-text-muted);
}

.site-footer__inner {
  /* Matches .site-header__inner — content lands at --content-max-width, flush with the page
     sections above it. */
  max-width: calc(var(--content-max-width) + 2 * var(--space-4));
  margin-inline: auto;
  padding: 20px var(--space-4);
}

/* Prev/next region links — their own row above the disclaimer: prev flush with the content's
   left edge, next flush with its right edge (margin-left:auto also right-aligns "next" when
   it's the only link, e.g. the first region). The wide gap below (in place of a second
   hairline) keeps this row visually separate from the © line. */
.site-footer__regions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  /* Separates this row from the © line without a hairline — ~32px of visible space
     between the two rows' text. */
  margin-bottom: 28px;
}

.site-footer__next {
  margin-left: auto;
}

.site-footer__row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.site-footer__links {
  display: flex;
  flex-shrink: 0;
  gap: 20px;
  white-space: nowrap;
}

.site-footer__disclaimer {
  align-self: stretch;
  font-size: 13px;
  line-height: 1.6;
}

.site-footer__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: none;
}

.site-footer__link:hover,
.site-footer__link:focus-visible {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

/* Outbound (target=_blank): orange, always underlined, ↗ in the label; hover to orange ink
   (DESIGN.md § Links). */
.site-footer__link--out {
  color: var(--color-accent);
  text-decoration: underline;
}

.site-footer__link--out:hover,
.site-footer__link--out:focus-visible {
  color: var(--color-accent-ink);
  text-decoration: underline;
}

@media (min-width: 768px) {
  .site-footer__inner {
    padding: 28px var(--space-4);
  }

  .site-footer__row {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
  }

  .site-footer__disclaimer {
    align-self: auto;
  }
}
