.worksheet-intro {
  padding-block: 32px 20px;
}

.worksheet-intro h1 {
  margin-block: 8px 24px;
  font-size: 2.5rem;
}

.worksheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.worksheet-actions .button {
  min-height: 48px;
  white-space: normal;
  text-align: center;
}

.worksheet-actions button[hidden] {
  display: none;
}

.worksheet-help {
  max-width: 52ch;
  margin-top: 16px;
}

.worksheet-paper {
  max-width: 700px;
  margin: 0 auto 32px;
}

.worksheet-paper img {
  display: block;
  width: 100%;
  height: auto;
  background: white;
}

@media (max-width: 480px) {
  .worksheet-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
}

@media print {
  @page {
    size: letter portrait;
    margin: 0.35in;
  }

  body.worksheet-page {
    background: white;
    margin: 0;
    padding: 0;
  }

  .worksheet-page > :not(main),
  .worksheet-page .worksheet-intro {
    display: none !important;
  }

  .worksheet-page main,
  .worksheet-page .worksheet-paper {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .worksheet-paper img {
    max-height: 10.25in;
    object-fit: contain;
    break-inside: avoid;
  }
}
