/* Footer: plum in light, the footer token in dark. The theme switch lives here and nowhere else. */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--gutter);
  background: var(--footer);
  color: var(--white);
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--white); }
.site-footer { margin-block-start: auto; }
.site-footer--slim { justify-content: flex-end; padding-block: var(--space-2); }

.theme-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap-min);
  height: var(--tap-min);
  padding: 0;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: var(--white);
  cursor: pointer;
}
/* Moon in light, sun in dark. */
.theme-switch__sun { display: none; }
:root[data-theme="dark"] .theme-switch__moon { display: none; }
:root[data-theme="dark"] .theme-switch__sun { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-switch__moon { display: none; }
  :root:not([data-theme="light"]) .theme-switch__sun { display: inline; }
}

/* Public footer: wordmark, links, switch. */
.site-footer__wordmark { font-weight: 700; font-size: var(--text-lg); }
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  font-size: var(--text-sm);
}

/* Holding page footer (M32): the policy links on a row of their own, then the copyright line
   and the switch. */
.holding-footer .site-footer__nav { flex: 1 1 100%; }
.holding-footer .site-footer__links { justify-content: center; }

.site-footer a:focus-visible,
.site-footer button:focus-visible {
  outline: var(--focus-ring-width) solid var(--gold);
  outline-offset: var(--focus-ring-gap);
}

/* Organizer and admin screens (L23): the page is a column that fills the screen, so the slim
   footer sits at the bottom when the content is short and after it when it is long. body has
   min-height: 100vh in base.css; the content (main, or the admin shell) takes the spare height. */
body { display: flex; flex-direction: column; }
body > main,
body > .staff-shell { flex: 1 0 auto; }

/* Phones (fix 4.15, board 1): the theme switch sits at the bottom right. From 1024px the
   space-between layout places it. */
@media (max-width: 1023.98px) {
  .site-footer .theme-switch { margin-inline-start: auto; }
}
