@layer moonshot-pages {
  body { margin: 0; color: var(--book-ink); background: var(--book-sand); }
  .sample-end a { color: inherit; text-underline-offset: .22em; }
  main { max-width: 68rem; margin: auto; padding: clamp(2rem, 5vw, 5rem) 6vw; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); }
  .sample-intro { align-self: start; position: sticky; top: 2rem; }
  h1 { margin: 0; font: 600 clamp(2.4rem, 4.5vw, 4rem)/1.03 var(--title); letter-spacing: -.035em; text-wrap: balance; }
  p { max-width: 34ch; line-height: 1.55; margin: 1rem 0 1.5rem; }
  figure { margin: 0 0 2rem; }
  figure img { display: block; width: 100%; height: auto; background: white; }
  figcaption { color: var(--book-ink); text-align: center; margin-top: .6rem; font-size: 1rem; font-weight: 600; }
  .sample-end { display: grid; justify-items: center; gap: .5rem; text-align: center; }
  .sample-end a:not(.ui-button) { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
  /* On a wide screen each sheet fits the window, so the whole page is seen at once. */
  @media (min-width: 701px) {
    .sample-sheets figure { width: min(100%, calc((100svh - 13rem) * 1103 / 1426)); margin-inline: auto; }
  }
  @media (max-width: 700px) {
    main { display: block; padding-inline: 5vw; }
    .sample-intro { position: static; margin-bottom: 2rem; }
  }
}
@page { size: auto; margin: 0; }
@media print {
  html, body { background: white; margin: 0; padding: 0; }
  .sample-intro, .sample-end, figcaption { display: none; }
  main, .sample-sheets { display: block; margin: 0; padding: 0; max-width: none; }
  figure { display: grid; place-items: center; margin: 0; height: 99vh; break-inside: avoid; }
  figure .ui-paper { display: contents; }
  figure .ui-paper::before { content: none; }
  figure + figure { break-before: page; }
  figure img { display: block; width: 100%; height: 100%; max-height: 99vh; object-fit: contain; box-shadow: none; }
}
