/* ==========================================================================
   print.css: what a client receives when a page is printed or saved as PDF.

   Added 2026-10-01 for client decks. Screen controls (navigation, filter
   pills, collapse buttons, the assistant, the section switcher, operator-only
   links) are dropped; every section the page has data for is printed, one
   after another, each starting cleanly; tables and cards are not split across
   a page break where that can be avoided. Loaded with media="print", so
   nothing here touches the screen.
   ========================================================================== */

@page { size: letter; margin: 0.6in 0.5in; }

html, body { background: #fff !important; }
body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

/* Screen-only chrome */
.app-header nav,
.admin-only,
.section-rail,
#viv-asst-bubble,
#viv-asst-panel,
.module-filter-row,
.filter-pill,
.pill-popover,
.collapse-btn,
[data-collapse-target],
.help-tooltip,
.viv-print-hide,
#detailPanel,
.btn,
button { display: none !important; }

/* The section switcher shows one section on screen and hides the rest with
   the `hidden` attribute. A printout carries every section the page has data
   for; a section gated by its page (a display:none wrapper) stays out. */
[data-section][hidden] { display: block !important; }
body.has-section-rail main,
body.has-section-rail .dash-main { margin-left: 0 !important; padding-left: 0 !important; }

/* Collapsed tables print open: a printout cannot be clicked. */
[data-collapse-content].is-collapsed { display: block !important; }

/* Page flow */
.dash-section { break-before: page; margin: 0 !important; }
.dash-section:first-of-type { break-before: auto; }
.chart-card, .card, table, tr, .vv-row, .funnel-stages, .kpi-card { break-inside: avoid; }
h1, h2, h3, .chart-title, .dash-section-header { break-after: avoid; }
.chart-card { box-shadow: none !important; border: 1px solid #D4D4CC !important; }
canvas { max-width: 100% !important; height: auto !important; }

/* Links read as text; the URL is not appended (a screenshot-style page, not
   a bibliography). */
a { color: inherit !important; text-decoration: none !important; }

/* Long URLs wrap instead of running off the page. */
td, .citation-url, .vv-row .text { overflow-wrap: anywhere; white-space: normal !important; text-overflow: clip !important; }
