/* Shared page-footer system. Zero-touch per tool beyond one <link> + one
   <script> tag: page numbering uses a pure CSS counter (no JS needs to
   know which sheet index it's on), and the copyright line is driven by
   a CSS custom property set once by page-footer.js from localStorage.
   Both render on screen, in print, and in PDF export (html2canvas
   renders CSS counters and ::after content correctly, same as the
   answer-key banner). */

.sheet-wrap {
  counter-reset: sheetpage;
}

.sheet {
  counter-increment: sheetpage;
  position: relative;
  padding-bottom: 46px;
}

body.footer-pagenum .sheet::after {
  content: "Page " counter(sheetpage);
  position: absolute;
  bottom: 14px;
  right: 24px;
  font-size: 10px;
  color: var(--muted, #6b7280);
}

body.footer-copyright .sheet::before {
  content: var(--footer-copyright-text, "");
  position: absolute;
  bottom: 14px;
  left: 24px;
  font-size: 10px;
  color: var(--muted, #6b7280);
}
