/* The free printables page (/printables), loaded after style.css and tools.css: a card for each sheet, with its
   first page shown as paper lying on a desk. Colours are the site's tokens only, so the cards follow the page
   into Dusk in dark mode; the previews are pictures of white paper and stay white. The sheets themselves are
   made by scripts/build_printables.mjs. */
.pr-sheets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; list-style: none; }
.doc .pr-sheets { margin-top: 28px; padding-left: 0; }
.doc .pr-sheets li + li { margin-top: 0; }
.pr-sheets li { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius); overflow: hidden; }
.pr-sheets li:hover { border-color: var(--ink); }

/* The desk: an upright sheet and a sideways one are given the same room on it. */
.pr-desk { display: grid; place-items: center; aspect-ratio: 1 / 1; background: var(--bg-2); border-bottom: 1px solid var(--card-line); }
.pr-desk img { width: 66%; border: 1px solid var(--card-line); box-shadow: var(--phone-shadow); }
.pr-desk.wide img { width: 84%; }

.pr-text { flex: 1; display: flex; flex-direction: column; padding: 18px 20px 8px; }
.doc .pr-text h2 { font-size: 1.35rem; margin-top: 0; padding-top: 0; }
.doc .pr-text p { margin-top: 8px; color: var(--muted); font-size: 0.97rem; line-height: 1.5; }
/* Page count and paper, then the link, kept at the card's foot so two cards in a row end alike. */
.doc .pr-text .pr-facts { margin-top: auto; padding-top: 14px; color: var(--quiet); font: 500 0.84rem/1.3 var(--sans); }
/* The link covers its whole card, so the picture opens the PDF too. On a narrow card its words may take two lines. */
.pr-text .go { align-self: flex-start; padding: 10px 0; line-height: 1.35; }
.pr-text .go::before { content: ""; position: absolute; inset: 0; }

/* One card across on a phone, on a shorter desk. */
@media (max-width: 640px) {
  .pr-sheets { grid-template-columns: minmax(0, 1fr); }
  .pr-desk { aspect-ratio: 4 / 3; }
  .pr-desk img { width: 50%; }
  .pr-desk.wide img { width: 76%; }
  .pr-text { padding: 16px 16px 6px; }
}
