/*
 * Print: the research and its tables on paper. Navigation, controls and anything interactive are
 * hidden; colours are the light theme (tokens.css switches back to light in print). Linked with
 * media="print", so none of this applies on screen.
 */
@page { margin: 16mm 14mm; }
:root { font-size: 11pt; }
body { background: var(--surface); }

/* Navigation and controls, old and new. */
.skip-link, .sidebar, .lv-sidebar, .lv-app__scrim, .lv-header, .page-actions, .controls-bar, .lv-chart__tools,
.lv-toast-region, #toast, dialog, .lv-command, .lv-reading__pages, .lv-reading__aside, .lv-popover, .lv-tooltip,
.notebook-contents, .page-footer, .lv-button, .lv-icon-button, .lv-chips,
button:not(.lv-table__sort, .lv-table__group-toggle, .lv-chart__key, .chart-legend button) { display: none !important; }
/* Kept buttons are labels on paper (column headings, group names, legend keys), not controls. */
.lv-table__sort::after, .lv-table__group-toggle::before { content: none !important; }

/* The page takes the full sheet width with no app chrome around it. */
.main-shell, .lv-app, .lv-app__main { display: block !important; margin: 0 !important; border: 0 !important; box-shadow: none !important; }
#main-content, .lv-app__content { padding: 0 !important; max-width: none !important; }
.lv-reading { display: block !important; }

/* Panels become plain sections; keep each one, and each table row, from splitting across pages where possible. */
.panel, .lv-panel { box-shadow: none !important; border-color: var(--border) !important; break-inside: avoid; }
tr, .lv-chart, .lv-verdict, .lv-stat { break-inside: avoid; }
h1, h2, h3, .lv-panel__header { break-after: avoid; }

/* Scrolling boxes would clip on paper: let tables and wide blocks show in full. */
.table-scroll, .lv-table-wrap { overflow: visible !important; max-height: none !important; }
.lv-table thead th, .lv-table :is(tbody, tfoot) > tr > :first-child { position: static !important; }

/* Closed disclosures print open, so nothing the reader could have expanded is lost. */
details > :not(summary) { display: block !important; }
/* Newer browsers hide a closed <details> body through this pseudo-element; older ones ignore the rule. */
details::details-content { content-visibility: visible !important; }
.lv-table__group[data-collapsed] > tr { display: table-row !important; }

/* Show where a link goes, since paper cannot be clicked. */
.lv-prose a[href^="http"]::after, .prose a[href^="http"]::after { content: ' (' attr(href) ')'; font-size: .85em; color: var(--text-muted); word-break: break-all; }
