/*
 * The research notebook on pages of its own: /notebook, where the panes
 * (components/notebook-panes.css) fill the window under the masthead; the
 * export form without JavaScript (notebook/exports/new); and the PDF export
 * (notebook/exports/show), a page made to be printed or saved as a PDF.
 */
@layer pages {
  .notebook-page {
    display: flex;
    flex-direction: column;
    block-size: calc(100vh - 12rem);
    min-block-size: 30rem;
    border-block-start: var(--rule-heavy);
    background-color: var(--color-surface-raised);
  }

  .notebook-export-page {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    max-inline-size: 44rem;
  }

  .notebook-print {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    max-inline-size: var(--measure);
  }

  .notebook-print__head {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    align-items: flex-start;
  }

  .notebook-print__meta {
    margin: 0;
    color: var(--color-ink-subtle);
    font-size: var(--text-meta);
  }

  .notebook-print__book {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    padding-block-start: var(--space-sm);
    border-block-start: var(--rule-heavy);
  }

  .notebook-print__page {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    break-inside: avoid-page;

    & + & {
      padding-block-start: var(--space-md);
      border-block-start: var(--rule-hairline);
    }
  }

  .notebook-print__body img {
    max-inline-size: 100%;
    block-size: auto;
  }
}
