/* Cashiers du Cinemart: print.css
   Load with: <link rel="stylesheet" href="/print.css" media="print">
   Class names are the contract with the templates. Rename here and there together. */

@page {
  size: auto;               /* use the reader's paper (Letter or A4) */
  margin: 0.9in 0.85in 1in;
  @bottom-left   { content: "cashiersducinemart.com"; font: 8.5pt "DM Sans", Arial, sans-serif; color: #444; }
  @bottom-right  { content: "Page " counter(page) " of " counter(pages); font: 8.5pt "DM Sans", Arial, sans-serif; color: #444; }
}
@page :first { margin-top: 0.7in; }

/* 1. Reset the screen design: paper, ink, no theme */
:root { color-scheme: light; }
html, body {
  background: #fff !important;
  color: #000 !important;
  font: 11pt/1.5 "Source Serif 4", Georgia, "Times New Roman", serif;
  -webkit-print-color-adjust: economy; print-color-adjust: economy;
  orphans: 3; widows: 3;
}
* { box-shadow: none !important; text-shadow: none !important; }
body, main, article, .page, .content, .reading-surface { background: #fff !important; max-width: none !important; width: auto !important; margin: 0 !important; padding: 0 !important; }

/* 2. Remove everything that only works on screen */
.skip-link, .site-nav, .site-header-search, .site-footer-nav, .search-form, .search-dropdown,
.progress, .resume-banner, .reader-tools, .article-actions, .reading-settings, .scan-toggle,
.outline, .prev-next, .related, .share-quote, .save-button, .request-button, .copy-button,
.issue-filters, .search-filters, .skeleton, .cover-preview, .book-card, .buy-card, .print-issues-link, .now-reading-badge,
nav, button, [role="search"], [aria-hidden="true"]:not(.print-keep) { display: none !important; }

/* 3. Masthead and citation block (present in the HTML, hidden on screen with .print-only { display:none }) */
.print-only { display: block !important; }
.print-masthead { display: flex !important; justify-content: space-between; align-items: baseline;
  border-bottom: 2pt solid #000; padding-bottom: 6pt; margin-bottom: 18pt; }
.print-masthead .wordmark { font: 400 17pt/1 "Special Elite", "Courier New", monospace; }
.print-masthead .tagline  { font: 8.5pt "DM Sans", Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.print-citation { margin-top: 22pt; padding-top: 8pt; border-top: 0.75pt solid #000;
  font: 9pt/1.45 "DM Sans", Arial, sans-serif; color: #222; break-inside: avoid; }

/* 4. Type */
h1 { font: 400 26pt/1.1 "Special Elite", "Courier New", monospace; margin: 0 0 6pt; break-after: avoid; }
h2 { font: 400 15pt/1.2 "Special Elite", "Courier New", monospace; margin: 20pt 0 6pt; break-after: avoid; }
h3, h4 { font: 600 11pt/1.3 "DM Sans", Arial, sans-serif; margin: 14pt 0 4pt; break-after: avoid; }
.subtitle { font: italic 13pt/1.4 "Source Serif 4", Georgia, serif; margin: 0 0 8pt; }
.byline, .meta, .breadcrumb { font: 9.5pt/1.4 "DM Sans", Arial, sans-serif; color: #333; }
.breadcrumb { margin-bottom: 8pt; }
.breadcrumb a { text-decoration: none; }
p { margin: 0 0 9pt; text-align: left; hyphens: manual; }
.article-body { max-width: 6.2in; }          /* about 70 characters per line */
.article-body p:first-of-type::first-line { font-variant: small-caps; letter-spacing: .02em; }
blockquote { margin: 10pt 0 10pt 18pt; padding: 0 0 0 10pt; border-left: 1.5pt solid #000; break-inside: avoid; }
hr { border: 0; border-top: 0.75pt solid #000; margin: 14pt 0; }

/* 5. Links: readable on paper, show the destination */
a { color: #000 !important; text-decoration: underline; text-decoration-thickness: 0.5pt; text-underline-offset: 1.5pt; }
.article-body a[href^="http"]::after { content: " (" attr(href) ")"; font: 8.5pt "DM Sans", Arial, sans-serif; color: #444; word-break: break-all; }
a[href^="#"]::after, a[href^="/"]::after, a[href^="mailto:"]::after, .no-url::after { content: none !important; }

/* 6. Images and covers */
img, figure, .cover { max-width: 100% !important; break-inside: avoid; }
img { height: auto !important; }
figcaption { font: 9pt/1.4 "DM Sans", Arial, sans-serif; color: #333; margin-top: 3pt; }
.cover { width: 1.4in !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; border: 0.5pt solid #000; }
.scan-image { width: 100% !important; }

/* 7. Issue contents page */
.issue-header { display: grid; grid-template-columns: 1.4in 1fr; gap: 18pt; align-items: start; margin-bottom: 14pt; }
.issue-section-title { font: 600 9pt "DM Sans", Arial, sans-serif; letter-spacing: .14em; text-transform: uppercase;
  margin: 16pt 0 4pt; padding-bottom: 3pt; border-bottom: 0.75pt solid #000; break-after: avoid; }
.contents-row { display: flex; justify-content: space-between; gap: 12pt; padding: 4pt 0; border-bottom: 0.25pt solid #999; break-inside: avoid; }
.contents-row .title  { font: 500 11pt/1.3 "DM Sans", Arial, sans-serif; }
.contents-row .author { font: 9.5pt "DM Sans", Arial, sans-serif; color: #333; }
.status-tag { display: inline !important; font: 600 8pt "DM Sans", Arial, sans-serif; text-transform: uppercase; letter-spacing: .08em;
  border: 0.5pt solid #000; padding: 0 4pt; background: none !important; color: #000 !important; white-space: nowrap; }
.contents-row.unavailable .title { color: #444; }

/* 8. Archive and search results */
.results { columns: 1; }
.result { padding: 7pt 0; border-bottom: 0.25pt solid #999; break-inside: avoid; }
.result .title { font: 500 11pt/1.3 "DM Sans", Arial, sans-serif; }
.result .snippet { font-size: 10pt; }
mark { background: none !important; color: #000 !important; font-weight: 700; text-decoration: underline; }
.result-count { font: 9.5pt "DM Sans", Arial, sans-serif; margin-bottom: 8pt; }

/* 9. Books, About, Contact */
.book { display: grid; grid-template-columns: 2in 1fr; gap: 20pt; break-inside: avoid; }
.buy-links a::after { content: " (" attr(href) ")" !important; font: 8.5pt "DM Sans", Arial, sans-serif; }

/* 10. Tables repeat their header and never split a row */
table { border-collapse: collapse; width: 100%; }
thead { display: table-header-group; }
tr, td, th { break-inside: avoid; }
th, td { border-bottom: 0.25pt solid #999; padding: 3pt 4pt; text-align: left; }

/* 11. Keep headings with the paragraph that follows, avoid single-line stranding */
h1, h2, h3, h4, .issue-section-title, figcaption { break-after: avoid; }
p, li { orphans: 3; widows: 3; }
pre, code { font: 9pt/1.4 "IBM Plex Mono", Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
