/* 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: 16px 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: 16px 24px 32px; display: grid; grid-template-columns: minmax(200px,1fr) minmax(0,600px); align-items: start; gap: 24px; }
.site-footer-note { display: flex; flex-direction: column; gap: 2px; margin: 0; max-width: 260px; 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-size: 14px; font-weight: 700; align-self: flex-start; }
.site-footer-links { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 24px; min-width: 0; }
.site-footer-group { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 16px; align-items: start; min-width: 0; }
.site-footer-links a { display: inline-flex; align-items: center; min-height: 28px; max-width: 100%; font-weight: 400; line-height: 1.5; }
.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: 16px 20px 40px; grid-template-columns: minmax(0,1fr); gap: 10px; }
  .site-footer-links { width: 100%; gap: 0 16px; }
  .site-footer-group { display: contents; }
  /* 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)); }
}
