/* Print styles, loaded with media="print" on every page (views/partials/head.ejs).
   Every page: no site chrome or shop links, black text, plain links.
   Movement pages: a one-page bench card with the first photo, specs, notes, guide names,
   models, part codes and a QR code back to the page (routes/lib/qr.js).
   Bump ?timestamp= in head.ejs after editing: static files are cached for 7 days. */

@page { margin: 12mm; }

html, body { background: #fff; color: #000; font-size: 10pt; line-height: 1.35; height: auto; }
main { margin: 0; padding: 0; max-width: none; color: #000; }
header, footer, .breadcrumbs, hr, iframe, .print-hide, .battery-link, a[href*="ebay."] { display: none !important; }
a { color: inherit; text-decoration: none; }
.help { border-bottom: 0; }
.help::after, a.link-pdf::after { display: none !important; }
h1, h2 { color: #000; break-after: avoid; }
tr, li, figure { break-inside: avoid; }

/* Movement pages */
.movement #images, .movement #images ~ figure, .movement .gallery,
.movement > div:has(> h2.icon-youtube-play),
.movement > div:has(> h2.icon-doc-text),
.movement > div:has(> a[href="#"]) { display: none !important; }

.movement h1 { font-size: 18pt; font-weight: 600; margin: 0 0 2mm; }
.movement h2 { font-size: 12pt; font-weight: 600; margin: 4mm 0 1mm; padding: 0; }
.movement > p { margin: 0 0 2mm; }

.print-qr[hidden] { display: block; float: right; width: 24mm; margin: 0 0 2mm 4mm; text-align: center; font-size: 8pt; line-height: 1.2; }
.print-qr svg { display: block; width: 24mm; height: 24mm; margin-bottom: 1mm; }
.movement table.primary { clear: both; }
/* First photo, the same size as the on-screen thumbnail, beside the QR code. */
.movement img.thumbnail { float: right; height: 24mm; max-height: none; width: auto; margin: -11mm 0 2mm 4mm; border: 0.2mm solid #000; border-radius: 2mm; }

.movement table { width: 100%; }
.movement td { padding: 0.8mm 2mm 0.8mm 0; vertical-align: top; border-bottom: 0.2mm solid #bbb; }
.movement td:first-child { width: 36mm; }
.movement table.primary td strong { white-space: normal; }

/* Short spec rows in 2 columns; notes, guides and links full width. */
.movement table.primary tbody { display: grid; grid-template-columns: 1fr 1fr; column-gap: 6mm; }
.movement table.primary tr { display: grid; grid-template-columns: 36mm 1fr; }
.movement table.primary td { width: auto; }
.movement table.primary tr:has(#movement-notes),
.movement table.primary tr:has(.link-pdf),
.movement table.primary tr:has(a[href*="/movements/"]),
.movement table.primary tr:has(a[href*="/subbrands/"]) { grid-column: 1 / -1; }

.movement #models + ul { columns: 2; column-gap: 6mm; margin: 0; padding-left: 4mm; }
