/* print-only styles — loaded via media="print" */

/* hide interactive/decorative elements */
header.site-header,
.toc,
.tag-list,
.badge-prod,
.badge-dev,
audio,
footer.site-footer,
.badge-version {
  display: none !important;
}

/* kill the british bg pattern */
body.lang-gb::after {
  display: none !important;
}
body.lang-gb {
  border-top: none !important;
}

/* base typography — palatino is what ACM actually use, zapf designed it for
   exactly this: high-quality reproduction at small sizes in columns */
body {
  margin: 0;
  padding: 0;
  max-width: none;
  font-size: 9pt;
  line-height: 1.4;
  color: #000;
  background: #fff;
  font-family: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

/* article title and date sit above the columns naturally */
article header {
  text-align: center;
  margin-bottom: 0.75rem;
}
article header h1 {
  font-size: 16pt;
  margin: 0 0 0.3rem;
}

/* article metadata — size and style distinguish it, not washed-out grey */
.article-meta {
  color: #000;
  font-size: 8pt;
  font-style: italic;
}
.article-meta a {
  color: #000;
}

/* hide structural hr separators between header/content/footer */
body > hr {
  display: none;
}

/* links: no colour, no underline — references handle attribution */
a {
  color: #000;
  text-decoration: none;
}

/* two-column layout on .prose — the actual article body */
.prose {
  max-width: none;
  column-count: 2;
  column-gap: 1.5em;
  column-rule: 0.5pt solid #000;
  text-align: justify;
  hyphens: auto;
  orphans: 2;
  widows: 2;
}

/* tighter vertical rhythm for column density */
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre, .prose table, .prose details {
  margin: 0.5rem 0;
}
.prose h2 {
  font-size: 11pt;
  margin: 1rem 0 0.4rem;
}
.prose h3 {
  font-size: 10pt;
  margin: 0.75rem 0 0.3rem;
}
.prose h4 {
  font-size: 9pt;
  margin: 0.6rem 0 0.3rem;
}

/* images */
img {
  max-width: 100%;
  page-break-inside: avoid;
}

/* page break / column break control */
h1, h2, h3, h4 {
  break-after: avoid;
}
blockquote, pre, table, img, figure {
  break-inside: avoid;
}

/* code blocks */
pre {
  font-size: 7.5pt;
  white-space: pre-wrap;
  word-wrap: break-word;
  border: 0.5pt solid #000;
  padding: 0.4rem;
  background: #fff !important;
}
pre code {
  background: none !important;
  color: #000 !important;
}
code {
  font-size: 0.9em;
  background: none;
  color: #000;
}

/* tables */
table {
  border-collapse: collapse;
  font-size: 8pt;
}
th, td {
  border: 0.5pt solid #000;
  padding: 0.2rem 0.4rem;
}
th {
  background: none !important;
  font-weight: 700;
}

/* blockquotes — indentation and italics, not a coloured sidebar */
blockquote {
  border-left: none;
  margin-left: 1.5em;
  margin-right: 1.5em;
  padding-left: 0;
  font-style: italic;
  color: #000;
}

/* hr within prose */
hr {
  background: none !important;
  border: none;
  border-top: 0.5pt solid #000;
  height: 0;
}

@page {
  margin: 1.5cm;
}

/* print reference markers — injected by JS */
.print-ref {
  font-size: 0.7em;
  vertical-align: super;
  line-height: 0;
  font-weight: 600;
  color: #000;
}

/* references section — sits after the column container */
.print-refs {
  margin-top: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid #000;
  font-size: 7.5pt;
}
.print-refs h2 {
  font-size: 9pt;
  margin: 0 0 0.3rem;
}
.print-refs ol {
  padding-left: 1.5rem;
  margin: 0;
  column-count: 2;
  column-gap: 1.5em;
}
.print-refs li {
  padding: 0.1rem 0;
  word-break: break-all;
}
