/*
 * An essay set for paper (PDFs: layouts/print). Every rule hangs off .print,
 * which only the print layout has, so it leaves the screen alone.
 */

@page {
  size: Letter;
  margin: 2.2cm 2.4cm 2.6cm;
}

.print {
  --ink: #2a2824;
  --ink-soft: #5d5950;
  --ink-faint: #9b958a;
  --rule: #ddd5c4;
  --red: #c23b2b;
  --book: "Iowan Old Style", "Palatino Linotype", Palatino, Charter, Georgia, "DejaVu Serif", serif;

  margin: 0;
  color: var(--ink);
  background: white;
  font-family: var(--book);
  font-size: 11.5pt;
  line-height: 1.55;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.print .print-page__header {
  margin-bottom: 2.2em;
  text-align: center;
}

.print .print-page__title {
  margin: 0 0 0.4em;
  font-size: 22pt;
  font-weight: 400;
  line-height: 1.2;
  text-wrap: balance;
}

.print .print-page__byline {
  margin: 0;
  color: var(--ink-soft);
}

.print .print-page__body {
  text-wrap: pretty;
  hyphens: auto;

  :where(p, ul, ol) {
    margin: 0 0 0.9em;
    orphans: 3;
    widows: 3;
  }

  :where(h1, h2, h3, h4, h5, h6) {
    margin: 1.8em 0 0.5em;
    font-weight: 600;
    line-height: 1.3;
    break-after: avoid;
  }

  h1 { font-size: 1.45em; }
  h2 { font-size: 1.25em; }
  :where(h3, h4, h5, h6) { font-size: 1.08em; }

  :where(ul, ol) {
    padding-left: 1.3em;
  }

  /* Where code can't run, it's shown as it was typed. */
  pre {
    font-family: "Courier Prime", "Courier New", monospace;
    font-size: 0.85em;
    white-space: pre-wrap;
  }

  .figure {
    margin: 1.4em 0;
  }
}
