/* Print stylesheet: strip chrome, expand content to the full page width, and make links useful
   on paper by spelling out their target URL. Loaded with media="print" so it never affects screen
   rendering. */

header,
footer,
aside,
nav.toc,
.toc-col,
.page-nav,
.page-actions,
.page-actions-result,
.copy-btn,
.banner,
.site-notice,
#sidebar-toggle,
.signout-form,
.skip-link,
.heading-anchor {
  display: none !important;
}

* {
  background: #fff !important;
  color: #000 !important;
}

body {
  margin: 0;
}

.layout {
  display: block;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* ".rd main" has to be named explicitly. This file loads after site.css, but specificity beats source
   order: site.css's ".rd main" is (0,1,1) and a bare "main" here is (0,0,1), so without the first
   selector every printed reader page would keep the 64px gutters and the 700px measure. margin:0 for
   the same reason -- the screen rule sets one. */
.rd main,
main {
  max-width: none;
  margin: 0;
  padding: 0;
}

a {
  color: #000 !important;
  text-decoration: underline;
}

a[href^="http"]::after {
  content: " (" attr(href) ")";
  font-size: 0.85em;
  color: #333 !important;
}

pre,
table {
  break-inside: avoid;
}

pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  border: 1px solid #999;
}

table,
th,
td {
  border: 1px solid #999;
}

/* A collapsed :::details block would otherwise print as a title with nothing under it, silently
   dropping content from the paper copy. There is no CSS that sets the open attribute, so both
   mechanisms browsers use to hide the body are overridden: the older one hides the children, the
   newer one hides ::details-content. A browser that supports neither selector is unaffected by
   the rule it does not understand, so having both costs nothing. */
details > *:not(summary) {
  display: block !important;
}

details::details-content {
  content-visibility: visible !important;
}

/* The marker claims the block can be opened, which is meaningless once it is on paper. */
details > summary {
  list-style: none;
}
