/* print.css – paper sheets (true millimetres), stage chrome (guides, baseline grid) and the @media print rules. */

.pg-wrap { position: relative; margin: 0 auto; }
.pg-sheet {
  position: absolute; left: 0; top: 0; display: flex; transform-origin: 0 0; background: var(--type-bg-color, #fff); color: var(--type-text-color, #111);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .12), 0 10px 34px rgba(0, 0, 0, .22);
}
.pg-page { position: relative; flex: none; overflow: hidden; }
.pg-area { position: absolute; overflow: hidden; }
.pg-flow { position: absolute; top: 0; column-fill: auto; column-gap: var(--pg-gap); }
.pg-sheet.is-hyphens .pg-flow { hyphens: auto; -webkit-hyphens: auto; }
.pg-run { position: absolute; color: var(--tp-mute); text-transform: uppercase; letter-spacing: .08em; font-size: 8pt !important; }
.pg-num { position: absolute; color: var(--tp-mute); font-variant-numeric: tabular-nums; }

:is(.tp-scope, .tp-print-scope, .tp-pgscope) .pg-sheet .pg-p { margin: 0 0 var(--pg-para); text-indent: var(--pg-indent); max-width: none; }
:is(.tp-scope, .tp-print-scope, .tp-pgscope) .pg-sheet .pg-p:first-child, :is(.tp-scope, .tp-print-scope, .tp-pgscope) .pg-sheet .pg-sub + .pg-p, :is(.tp-scope, .tp-print-scope, .tp-pgscope) .pg-sheet .pg-head + .pg-p { text-indent: 0; }
:is(.tp-scope, .tp-print-scope, .tp-pgscope) .pg-sheet .pg-head { margin: 0 0 1.1em; break-inside: avoid; }
:is(.tp-scope, .tp-print-scope, .tp-pgscope) .pg-sheet .pg-head.is-span { column-span: all; }
:is(.tp-scope, .tp-print-scope, .tp-pgscope) .pg-sheet .pg-head > * { margin: 0; max-width: none; }
:is(.tp-scope, .tp-print-scope, .tp-pgscope) .pg-sheet .pg-head > * + * { margin-top: .5em; }
:is(.tp-scope, .tp-print-scope, .tp-pgscope) .pg-sheet .pg-kicker { color: var(--tp-mute); }
:is(.tp-scope, .tp-print-scope, .tp-pgscope) .pg-sheet .pg-lead { font-size: calc(var(--type-body-size) * 1.2); }
:is(.tp-scope, .tp-print-scope, .tp-pgscope) .pg-sheet .pg-sub { font-size: calc(var(--type-heading-size) * .6); margin: .9em 0 .35em; break-after: avoid; max-width: none; }
:is(.tp-scope, .tp-print-scope, .tp-pgscope) .pg-sheet .pg-figcap { margin: .4em 0 var(--pg-para, 1em); color: var(--tp-mute); max-width: none; }
:is(.tp-scope, .tp-print-scope, .tp-pgscope) .pg-sheet h2, :is(.tp-scope, .tp-print-scope, .tp-pgscope) .pg-sheet h3, :is(.tp-scope, .tp-print-scope, .tp-pgscope) .pg-sheet p { margin-top: 0; }
:is(.tp-scope, .tp-print-scope, .tp-pgscope) .pg-sheet .pg-title { font-size: var(--type-heading-size); }

/* flyer · poster · card */
.pg-art { height: 100%; display: flex; flex-direction: column; gap: 4mm; }
:is(.tp-scope, .tp-print-scope, .tp-pgscope) .pg-sheet .pg-art p, :is(.tp-scope, .tp-print-scope, .tp-pgscope) .pg-sheet .pg-art h2 { margin: 0; max-width: none; }
.pg-band { background: var(--type-text-color); color: var(--type-bg-color); padding: 6mm; margin: 0 0 2mm; min-height: 34%; display: flex; align-items: flex-end; }
:is(.tp-scope, .tp-print-scope, .tp-pgscope) .pg-sheet .pg-band .pg-fly-title { color: var(--type-bg-color); font-size: calc(var(--type-heading-size) * 1.9); line-height: 1.02; }
:is(.tp-scope, .tp-print-scope, .tp-pgscope) .pg-sheet .pg-fly-sub { color: var(--tp-mute); }
.pg-flyer .pg-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 3mm; }
:is(.tp-scope, .tp-print-scope, .tp-pgscope) .pg-sheet .pg-cta { align-self: flex-start; padding: 2.5mm 5mm; border: 1.5px solid var(--type-text-color); border-radius: 1mm; }
.pg-poster { position: relative; justify-content: flex-end; }
.pg-poster-art { position: absolute; inset: 0; pointer-events: none; }
.pg-circle { position: absolute; right: -6%; top: 2%; width: 64%; aspect-ratio: 1; border-radius: 50%; background: var(--type-text-color); }
.pg-bar { position: absolute; left: 0; top: 56%; width: 36%; height: 3%; background: var(--type-text-color); }
:is(.tp-scope, .tp-print-scope, .tp-pgscope) .pg-sheet .pg-poster-title { position: relative; font-size: calc(var(--type-heading-size) * 4.2); line-height: .95; overflow-wrap: anywhere; }
:is(.tp-scope, .tp-print-scope, .tp-pgscope) .pg-sheet .pg-poster-sub { position: relative; font-size: calc(var(--type-label-size) * 2.2); }
:is(.tp-scope, .tp-print-scope, .tp-pgscope) .pg-sheet .pg-poster-info { position: relative; font-size: calc(var(--type-caption-size) * 1.6); color: var(--tp-mute); margin-top: 6mm; }
.pg-card { justify-content: space-between; position: relative; }
.pg-card-main { display: flex; flex-direction: column; gap: 1mm; }
:is(.tp-scope, .tp-print-scope, .tp-pgscope) .pg-sheet .pg-card-name { font-size: calc(var(--type-heading-size) * .55); line-height: 1.1; }
.pg-card-foot { display: flex; flex-direction: column; gap: .6mm; }
.pg-card-mark { position: absolute; right: 0; top: 0; width: 11mm; height: 11mm; background: var(--type-text-color); border-radius: 0 0 0 5mm; }

/* stage-only chrome */
.pg-sheet.has-guides .pg-area { outline: 1px dashed rgba(26, 86, 219, .7); outline-offset: 0; }
.pg-sheet.has-chrome .pg-area.has-grid {
  background-image: repeating-linear-gradient(to bottom, rgba(0, 140, 255, .38) 0, rgba(0, 140, 255, .38) .35pt, transparent .35pt, transparent var(--pg-grid));
  background-position: 0 calc(var(--type-body-size, 16px) * .22);
}
.pg-sheet.has-chrome .pg-page { background-image: linear-gradient(rgba(200, 40, 40, .0), rgba(200, 40, 40, .0)); }
.pg-spine { position: absolute; left: 50%; top: 0; bottom: 0; width: 0; border-left: 1px dashed rgba(180, 35, 24, .45); pointer-events: none; }
.pg-preview { padding: 16px; background: var(--surface-3); border-radius: var(--radius); overflow: auto; max-height: 64vh; }

/* print root (filled by JS right before printing) */
.print-root { display: none; }
.print-root .pg-sheet { position: static; transform: none !important; box-shadow: none; }

@media print {
  html.is-printing, html.is-printing body { background: #fff !important; margin: 0 !important; padding: 0 !important; overflow: visible !important; height: auto !important; min-height: 0 !important; }
  html.is-printing body > *:not(#print-root):not(style):not(script) { display: none !important; }
  html.is-printing .print-root { display: block !important; position: static !important; }
  html.is-printing .print-root .pg-sheet { break-after: page; break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  html.is-printing .print-root .pg-wrap { width: auto !important; height: auto !important; }
  html.is-printing * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
