/* ==========================================================================
   Unternehmensgruppe Maier – Unternehmensentwicklung · Print / PDF (A4)
   Same page, printed: full-bleed cover and chapter openers, one page per
   company profile, one per chart set, running footer. Used by the browser
   print dialog and by tools/build_pdf.py.
   ========================================================================== */

@page {
  size: A4 portrait;
  margin: 16mm 16mm 18mm 16mm;
  @bottom-left { content: "ImmoAgentur · Unternehmensgruppe Maier · Unternehmensentwicklung · Entwurf zur Abstimmung"; font: 500 6.5pt "Inter Tight", sans-serif; letter-spacing: .12em; color: #74857B; }
  @bottom-right { content: counter(page); font: 300 9pt "Inter Tight", sans-serif; color: #3F9C68; }
}
@page bleed { margin: 0; @bottom-left { content: ""; } @bottom-right { content: ""; } }

html { scroll-behavior: auto; }
body { background: #fff; font-size: 9.4pt; line-height: 1.5; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.frame { padding: 0; }
.inner { max-width: none; }

/* interactive-only UI */
.rail, .mbar, .pill, .tbtn, .hero__links, .final__ctas, .sr-only, .pm, .dtable { display: none !important; }

/* resolve motion */
.rv, .fade-num, .hero__year .d { opacity: 1 !important; transform: none !important; transition: none !important; }
.pic.rv-img::after { display: none !important; }
.pic img, .js-par { transform: none !important; transition: none !important; }

/* type scale for paper */
.t-xxl { font-size: 40pt; }
.t-xl { font-size: 28pt; }
.t-l { font-size: 21pt; }
.lbl { font-size: 7pt; }
.caps { font-size: 7.5pt; }
.body { font-size: 9.4pt; }
.note { font-size: 7pt; }
.tag { font-size: 6pt; padding: 3px 5px 2px; }
.sec { padding-block: 0 !important; }
.sec-head { grid-template-columns: 1.3fr 1fr; gap: 10mm; margin-bottom: 6mm; align-items: end; }
.sec-head .lbl { margin-bottom: 3mm; }
.sec--tint { background: none; }
.bleed-r, .bleed-l { margin: 0 !important; }
.pic figcaption { font-size: 6pt; left: 2.5mm; bottom: 2mm; text-shadow: none !important; }
figure, .kf, .card, .grp-list li, .src-list li, .note-list li, .img-list li, .facts > div, .gtable tr { break-inside: avoid; }
h2, h3, .lbl { break-after: avoid; }

/* ---- full-bleed pages: cover, openers, final ---------------------------- */
.hero, .opener, .final { page: bleed; break-before: page; break-after: page; height: 297mm; min-height: 0; max-height: none; width: 210mm; }
.hero { break-before: auto; }
.hero__img, .opener > img, .final > img { inset: 0 !important; height: 100% !important; }
.hero > .frame, .opener .frame, .final .frame { padding: 14mm 16mm 18mm !important; }
.opener .frame { bottom: 0; }
.hero__logo { width: 50mm; }
.hero__kicker { font-size: 24pt; }
.hero__year { font-size: 150pt; }
.hero__claim { font-size: 11pt; max-width: 125mm; }
.hero__main { grid-template-columns: 1fr; }
.hero__brands { gap: 6mm 10mm; margin-top: 8mm; padding-top: 6mm; max-width: 150mm; }
.hero__brands img { height: 8mm; } .hero__brands li:first-child img { height: 10mm; }
.hero__cap, .opener .cap { font-size: 6pt; right: 16mm; bottom: 8mm; }
.opener h2 { font-size: 62pt; }
.opener__no { font-size: 7.5pt; }
.opener img.opener__logo { height: 14mm; margin-bottom: 7mm; }
.opener img.opener__logo--bymaier { height: 19mm; }
.final__line { font-size: 48pt; }
.final__logo { width: 52mm; margin-bottom: 10mm; }
.final__addr { font-size: 7pt; margin-top: 12mm; }

/* ---- die Gruppe --------------------------------------------------------- */
.grp-top { grid-template-columns: 1fr 1fr; gap: 8mm; align-items: start; }
.grp-top .pic { aspect-ratio: auto; height: 78mm; }
.grp-list { grid-template-columns: repeat(4, 1fr); margin-top: 12mm; }
.grp-list li { border-bottom: 0; border-right: 1px solid #D3E1D8; }
.grp-list li:last-child { border-right: 0; }
.grp-list a { padding: 5mm 4mm 6mm 0; gap: 2mm; }
.grp-list li + li a { padding-left: 4mm; }
.grp-list a::before { display: none; }
.grp__no { font-size: 7pt; }
.grp__logo { height: 14mm; margin: 2mm 0; }
.grp__logo img { max-height: 11mm; max-width: 38mm; }
.grp__name { font-size: 9pt; }
.grp__field { font-size: 6.5pt; }
.grp__bs { font-size: 20pt; padding-top: 4mm; }
.grp__bs small { font-size: 6pt; margin-bottom: 1.5mm; }

/* ---- company profile: one page ----------------------------------------- */
.co-top { grid-template-columns: 1.1fr 1fr; gap: 8mm; align-items: start; }
.co-top .pic { aspect-ratio: auto; height: 74mm; }
.co-top .body { font-size: 8.8pt; }
.co-top .body[style] { margin-top: 5mm !important; }
.facts--co { grid-template-columns: repeat(3, 1fr); gap: 3.5mm 6mm; margin-top: 7mm; padding-top: 4mm; }
.facts dt { font-size: 6.3pt; margin-bottom: 1mm; }
.facts--co dd { font-size: 8.3pt; }
.kf-lead { margin-top: 12mm; }
.kf-lead__num { font-size: 96pt; }
.kf-lead .kf__delta { margin-top: 3mm; }
.kf-grid { grid-template-columns: repeat(3, 1fr); gap: 9mm 7mm; }
.kf-grid--wide { margin-top: 12mm; }
.kf__num { font-size: 33pt; margin-top: 1mm; }
.kf .caps { font-size: 6.5pt; margin-top: 1.5mm; }
.kf__delta { font-size: 6.8pt; margin-top: 1.5mm; gap: 4px; }
.kf__delta svg { width: 7px; height: 7px; }
.co-sec .note[style] { margin-top: 6mm !important; }

/* ---- chart pages ---------------------------------------------------------- */
.co-charts { break-before: page; }
.cards { grid-template-columns: 1fr 1fr; gap: 5mm; }
.card { padding: 5mm; border-color: #D3E1D8 !important; }
.card h3 { font-size: 11.5pt; }
.card .caps { font-size: 6.5pt; margin-top: 1mm; }
.card__foot { padding-top: 2mm; }
.chart, .card .chart { height: 66mm !important; margin-top: 3mm; }
.card--wide .chart { height: 80mm !important; }

/* ---- group view ----------------------------------------------------------- */
#gesamt { break-before: page; }
.gsum__cols { grid-template-columns: 1.4fr 1fr; gap: 10mm; margin-top: 6mm; }
.gsum__logos { gap: 5mm 8mm; }
.gsum__logos img { max-height: 9mm; }
#gesamt .note[style] { margin-top: 8mm !important; }
#gesamt + .sec { break-before: page; }
#gesamt + .sec .card--wide:nth-child(4) { break-before: page; }
.gtable-wrap { overflow: visible; margin-top: 3mm; }
.gtable { min-width: 0; font-size: 7.6pt; }
.gtable th, .gtable td { padding: 2.2mm 1.5mm; }
.gtable thead th { font-size: 6pt; }
.gtable tbody th i { width: 2.4mm; height: 2.4mm; margin-right: 2mm; }
.next-year { margin-top: 5mm; }

/* ---- sources -------------------------------------------------------------- */
#k5 { break-before: page; }
.sources summary { padding: 0 0 5mm; border-top: 0; }
.sources summary .display { font-size: 30pt; }
.src-body { grid-template-columns: 1.2fr 1fr; gap: 8mm; padding: 5mm 0 0; }
.src-list li, .note-list li { font-size: 7.3pt; padding: 1.4mm 0; line-height: 1.35; }
.note-list li { padding-left: 4mm; }
.note-list li::before { top: 2.6mm; width: 1.8mm; height: 1.8mm; }
.src-list a { text-decoration: none; }
.src-list a::after { content: " — " attr(href); font-size: 6.5pt; color: #74857B; overflow-wrap: anywhere; }
.img-list li { font-size: 7pt; padding: 1.1mm 0; line-height: 1.3; }
.img-list li span { font-size: 6.5pt; }

/* ---- no gradients / shadows / transparency in the PDF --------------------
   Some PDF viewers render CSS gradient overlays with a pink/magenta cast.
   Overlays are baked into assets/img/print-*.jpg instead (swapped in by
   finalize()); everything below is flat colour. */
.hero::after, .opener::after, .final::after { display: none !important; }
.caption, .hero__cap, .opener .cap { text-shadow: none !important; }
.pill { background: none !important; }
.card, .tt { box-shadow: none !important; }
.hero__brands { border-top-color: #A9B5AE; }
