/* One footer for every hosted page. Keep its tokens independent of page styles. */
body[data-site-footer] { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; margin: 0; padding: 0; }
body[data-site-footer] > main { flex: 1 0 auto; min-width: 0; }
body[data-site-footer] > main:not(.legal-page):not(#live-access-gate) { width: 100%; }
body[data-site-footer] > .live-layout { min-height: 0; }
body[data-site-footer] > #live-access-gate { flex: 0 0 auto; }
body[data-site-footer]:has(> #live-access-gate) > .site-footer { margin-top: auto; }
body[data-site-footer] > .editor-container { padding: 20px; }
.site-footer {
  --footer-bg: #fff;
  --footer-text: #566173;
  --footer-strong: #1f2733;
  --footer-line: #cbd2dd;
  --footer-accent: #0f766e;
  flex-shrink: 0;
  width: 100%;
  margin: 28px 0 0;
  border-top: 1px solid var(--footer-line);
  background: var(--footer-bg);
  color: var(--footer-text);
  font: 13px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
[data-theme="dark"] .site-footer, body.dark-mode .site-footer {
  --footer-bg: #161b24;
  --footer-text: #aab2c0;
  --footer-strong: #e8ebf0;
  --footer-line: #2b3340;
  --footer-accent: #2dd4bf;
}
.site-footer, .site-footer * { box-sizing: border-box; }
.site-footer-inner { max-width: 1180px; margin: 0 auto; padding: 20px 24px 36px; display: flex; align-items: center; justify-content: space-between; gap: 20px 32px; }
.site-footer-note { display: flex; flex-direction: column; gap: 2px; margin: 0; max-width: none; font: inherit; color: inherit; }
.site-footer a { color: var(--footer-text); font: inherit; text-decoration: none; text-underline-offset: 4px; }
.site-footer .site-footer-brand { color: var(--footer-strong); font-weight: 700; align-self: flex-start; }
.site-footer-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 18px; }
.site-footer-links a { display: inline-flex; align-items: center; min-height: 36px; font-weight: 600; }
.site-footer a:hover { color: var(--footer-accent); text-decoration: underline; }
.site-footer a:focus-visible { outline: 2px solid var(--footer-accent); outline-offset: 4px; border-radius: 2px; }
@media(max-width:760px) {
  .site-footer-inner { padding: 18px 20px 38px; flex-direction: column; align-items: flex-start; gap: 12px; }
  .site-footer-links { justify-content: flex-start; gap: 4px 18px; }
  /* Keep the common footer above the player's fixed mobile answer controls. */
  body.exam-runtime-page[data-site-footer] { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
}
