/* In the Gesture: print sheet.
   Link after the screen sheet on both essay.html and essay-dol.html:
     <link rel="stylesheet" href="../css/print.css" media="print">
   Fonts come from whichever screen sheet the page loads. */

@page {
  size: letter;
  margin: 0.9in 0.85in 1in;
}

/* Black on white regardless of which palette the page uses */
*, *::before, *::after {
  background: transparent !important;
  color: #000 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

html, body {
  background: #fff !important;
}

body {
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
  font-size: 10.5pt;
  line-height: 1.5;
  orphans: 3;
  widows: 3;
}

/* Site nav, pager, and time-based media mean nothing on paper */
nav,
nav.pager,
video,
audio {
  display: none !important;
}

h1 { font-size: 20pt; margin: 0 0 18pt; }
h2 { font-size: 14pt; margin: 22pt 0 8pt; }
h3 { font-size: 11.5pt; margin: 14pt 0 6pt; }

h1, h2, h3 {
  break-after: avoid;
  break-inside: avoid;
}

p { margin: 0 0 8pt; }

a { text-decoration: none; }

/* Grey rules in place of the gold ones */
#abstract {
  border: 0.75pt solid #888 !important;
  padding: 12pt 18pt;
  break-inside: avoid;
}

blockquote,
figure.quote {
  border-left: 1pt solid #888 !important;
  padding-left: 12pt;
  margin: 10pt 0 10pt 12pt;
}

figure.quote blockquote {
  border-left: none !important;
  padding-left: 0;
  margin: 0;
}

/* Keep a short quote together with its attribution */
figure.quote,
blockquote p {
  break-inside: avoid;
}

figure.quote figcaption {
  break-before: avoid;
  margin-top: 4pt;
}

code {
  font-size: 9pt;
  padding: 0;
}

/* Colour swatches would vanish when backgrounds are stripped; print as text */
.fg-color, .fg-bright, .fg-dim {
  padding: 0;
}

figure { margin: 12pt 0; break-inside: avoid; }

figure img, .work-entry img, img.home {
  max-width: 100% !important;
  max-height: 7in !important;
}

figcaption, .tombstone, .place, .toward {
  font-size: 9pt;
}

/* Show the destination of external links in running text, but not where
   the link text already is the URL (the References entries) */
p a[href^="http"]::after,
li a[href^="http"]::after {
  content: " <" attr(href) ">";
  font-size: 8.5pt;
  overflow-wrap: anywhere;
}

#references ~ p a::after,
#references a::after,
#colophon ~ * a::after,
#colophon a::after {
  content: none !important;
}

#references ~ p,
#references p {
  font-size: 9pt;
  overflow-wrap: anywhere;
  break-inside: avoid;
}
