@media print {
  /* #lang-toggle-root isn't a .btn (it's a custom-styled pair of plain
     buttons, not the shared button component), so it wasn't caught by the
     generic .btn hide rule below and leaked into every export. #tab-vault
     is excluded from the blanket ".tab { display: block }" rule a few lines
     down — Vault is document storage, not investment-report content, and
     has no place in a PDF meant to summarize the numbers. Both are ID
     selectors so they win the specificity fight against the class-based
     rules regardless of source order. */
  nav.tabnav, .pd-toolbar .btn, .btn, .wizard-nav, .menu-wrap, #lang-toggle-root, #tab-vault { display: none !important; }
  header { padding: 20px 32px; }
  main { padding: 24px 32px; }
  .tab { display: block !important; }
  .tab + .tab { page-break-before: always; }
  body { background: white; }
  .kpi-grid { gap: 1px; }
  .kpi, .cf-panel, .cost-item, .chart-card, .table-wrapper { break-inside: avoid; }
  .pd-address { border: none; background: none; }

  /* The legal disclaimer must always appear in an export — previously the
     whole footer (which only ever contains this line) was hidden, so it
     never printed at all. Simplified from the on-screen footer styling
     since the flex/background chrome there is a UI affordance, not
     something a printed page needs. */
  footer {
    display: block !important; background: none; border-top: 1px solid var(--border);
    padding: 12px 32px; margin-top: 24px;
  }
  footer .footer-link { display: none; }

  /* White-label PDF branding (js/views/propertyDetail.js's exportPDF injects
     .print-brand-header/.print-brand-contact and toggles body.print-branded
     only when a signed-in user has branding configured — guests and users
     without branding never trigger any of this, so their export is
     byte-for-byte the same as before). */
  .print-brand-header { display: flex !important; align-items: center; gap: 12px; padding: 20px 32px 0; }
  .print-brand-header img { max-height: 44px; max-width: 180px; object-fit: contain; }
  .print-brand-header .print-brand-name { font-family: 'DM Serif Display', serif; font-size: 20px; color: var(--text); }
  .print-brand-contact { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--muted); margin-bottom: 4px; }

  /* runPrint() forces every .disclosure open before printing, so the folded
     sections do appear — but the expand/collapse chevron is a screen
     affordance with no meaning on paper. */
  .disclosure > summary::after { display: none !important; }

  body.print-branded header .brand { display: none !important; }
  body.print-branded .section-label { border-bottom-color: var(--brand-accent, var(--border)); }
  body.print-branded .chart-card .chart-title { color: var(--brand-accent, var(--text)); }
  body.print-branded .pd-address { border-bottom: 2px solid var(--brand-accent, var(--text)); }
}
