/* print — linked with media="print": chrome leaves, ink goes black, prose links show their targets */

/* ink on paper: overrides the dark theme's tokens */
*,
*::before,
*::after {
  background: transparent !important;
  color: #000 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
body {
  background: #fff !important;
}

/* chrome and controls leave the page: ghost_head's frames, the comments frame, the post pager, the text-size tools */
.b-navigation-section,
.b-breadcrumbs,
.b-footer,
.b-filter-bar,
.b-to-top,
.b-progress,
.b-cta,
.b-toc-nav,
.b-toc-inline,
.b-text-size,
.b-post-siblings,
.pagination,
button,
body > iframe,
iframe[title="comments-frame"] {
  display: none !important;
}

/* prose links name their target; external hrefs only */
.editor-content a {
  text-decoration: underline;
}
.editor-content a[href^="http"]::after {
  content: " (" attr(href) ")";
  font-size: 0.875em;
  overflow-wrap: anywhere;
}

/* code blocks unroll and lose their frame */
pre,
pre code,
code {
  white-space: pre-wrap !important;
  overflow: visible !important;
  max-block-size: none !important;
  border: none !important;
  padding: 0 !important;
}

/* syntax keeps a fixed print-safe palette; outranks the ink rule on specificity */
pre code .token.comment,
pre code .token.prolog,
pre code .token.cdata {
  color: #6a737d !important;
}
pre code .token.punctuation,
pre code .token.operator {
  color: #495057 !important;
}
pre code .token.keyword,
pre code .token.atrule,
pre code .token.rule,
pre code .token.important {
  color: #6f42c1 !important;
}
pre code .token.selector,
pre code .token.tag {
  color: #c2255c !important;
}
pre code .token.property,
pre code .token.attr-name,
pre code .token.variable {
  color: #364fc7 !important;
}
pre code .token.string,
pre code .token.char,
pre code .token.attr-value,
pre code .token.url {
  color: #0b7285 !important;
}
pre code .token.number,
pre code .token.boolean {
  color: #d9480f !important;
}
pre code .token.function,
pre code .token.class-name {
  color: #1864ab !important;
}

/* page flow: no orphaned headings, no split figures */
h1,
h2,
h3,
h4 {
  break-after: avoid;
}
img,
figure,
pre,
blockquote,
table {
  break-inside: avoid;
}
p {
  orphans: 3;
  widows: 3;
}
img {
  max-inline-size: 100% !important;
}

/* card grids print as a single-column list */
.b-solutions > div {
  display: block !important;
}
.b-card {
  max-inline-size: none !important;
  min-inline-size: 0 !important;
  margin-block-end: 1.25rem;
  break-inside: avoid;
}
/* cover art and the title-row icon door stay on screen */
.b-card .card-thumb,
.b-card .card-title-row > a {
  display: none !important;
}
/* truncated card titles run in full on paper */
.b-card h3 {
  white-space: normal !important;
  overflow: visible !important;
}
@page {
  margin: 2cm;
}
