/* Public page shell. Component typography and spacing remain in the captured CSS. */
:root {
  --site-surface: #f2f6ff;
  --site-footer-surface: #242424;
}

html:has(body[data-site-layout]) {
  background: var(--site-footer-surface);
}

body[data-site-layout] {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--site-surface);
}

/* The shell must never compress content or decoration to fit a short window. */
body[data-site-layout] > * {
  flex-shrink: 0;
}

body[data-site-layout] > section {
  width: 100%;
}

/* Grow the coloured footer itself; no empty margin above or below it. */
body[data-site-layout] > footer.site-footer {
  flex: 1 0 auto;
  width: 100%;
  margin: 0;
  background: var(--site-footer-surface);
}

/*
 * The exported stylesheet shrinks every image to 98% below 768px. That is a
 * document-wide rule, so it also shrinks structural artwork and the handbook
 * illustrations. Keep the intended container sizing for those two patterns.
 */
@media (max-width: 767px) {
  body[data-site-layout] .home-images > * > img,
  body[data-site-layout] .pdd-rule-section img {
    max-width: 100%;
  }
}
