/* Print: a clean sheet of paper from a page, loaded only for print.

   The rules remove the bar, the buttons, the animation and the field, and
   put the address after each link to another site. */

@page {
  margin: 18mm 16mm;
}

/* Black on white, in each theme. A printer must not put ink on the full
   page. */
:root,
:root:not([data-theme="light"]),
:root[data-theme="light"],
:root[data-theme="dark"] {
  --paper: #ffffff;
  --surface: #ffffff;
  --ink: #000000;
  --muted: #333333;
  --line: #999999;
  --line-strong: #666666;
  --accent: #000000;
  --accent-strong: #000000;
  --accent-fill: #000000;
  --accent-fill-ink: #ffffff;
  --hairline: #bbbbbb;
}

body {
  background: #ffffff;
  color: #000000;
  font-size: 10.5pt;
}

/* The parts that only a screen can use. */
.site-nav,
.skip-link,
.theme-toggle,
.nav-toggle,
.filter-chips,
.copy-btn,
.abstract-toggle,
.cross-nav,
.head-links,
.paper-nav,
.field-note,
.field-pause,
.cite-tabs,
.lab-controls,
.pub-export,
#flowfield,
#paper-field {
  display: none !important;
}

/* A script cuts each abstract on the screen. Paper has no button, so it
   prints the full text. */
.js .pub-abstract.is-clamped p {
  display: block;
  -webkit-line-clamp: none;
  line-clamp: none;
  overflow: visible;
}

/* No animation, and each element is visible from the start. */
.reveal, .reveal.in {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* A link to another site gets its address. A link inside the site and a
   mail link do not. */
a[href^="http"]::after {
  content: " (" attr(href) ")";
  font-family: var(--font-mono);
  font-size: 8pt;
  word-break: break-all;
}

/* A link in a sentence keeps no address, because it makes the sentence hard
   to read. */
p a[href^="http"]::after { content: none; }

/* A pill is a button on the screen, and only a name and an address on
   paper. */
.pill, .pill.primary {
  border: 0;
  background: none;
  color: #000000;
  padding: 0;
  margin: 0 1.4rem 0 0;
}

/* The mark that shows a link does nothing on paper. */
.related-go { display: none; }

/* Keep a block on one sheet if the sheet has the room. */
.pub, .timeline-item, .topic, .fact {
  break-inside: avoid;
}

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

/* No field on paper, so the hero does not need the height of a screen. */
.hero { min-height: 0; }

/* Two columns of facts, because a printed line is narrower than a screen. */
.snapshot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
