/*
 * Print layout. Loaded by every page with media="print" so the result screen
 * prints as well as the dedicated report does.
 *
 * The wide audit tables are what set the page orientation.
 */

@page {
    size: A4 landscape;
    margin: 12mm;
}

/*
 * Paper is always light, whatever the screen shows: every colour token is a
 * light-dark() pair, so pinning the scheme here resolves all of them at once.
 * `:root[data-theme]` matches the specificity of the screen's dark pick, and
 * this sheet loads after app.css.
 */
:root,
:root[data-theme] { color-scheme: light; }

body,
body.printable {
    background: #fff;
    color: #000;
    font-size: 9.5pt;
    line-height: 1.35;
}

.container,
.container--wide {
    max-width: none;
    padding: 0;
}

main,
main.container { padding: 0; }

h1 { font-size: 16pt; }
h2 { font-size: 12pt; margin-top: 6mm; }
h3 { font-size: 10.5pt; }

.section { margin-top: 6mm; }

/* Interactive chrome has no meaning on paper. */
.site-header,
.site-footer,
.skip-link,
.progress,
.no-print,
.tech-toggle__label,
.action-bar,
.download-actions,
.download-note { display: none !important; }

/*
 * A collapsed disclosure must not hide content from the printout. JavaScript
 * opens every <details> on beforeprint; these rules are the fallback.
 */
details > summary { list-style: none; }
details::details-content { content-visibility: visible !important; }
details:not([open]) > *:not(summary) { display: block !important; }

.disclosure,
.disclosure--card {
    border: 0;
    box-shadow: none;
    padding: 0;
    background: none;
    page-break-inside: auto;
}

.disclosure > summary {
    min-height: 0;
    padding: 0;
    font-size: 11pt;
    font-weight: 600;
}

.disclosure > summary::after,
.message-group > summary::after { display: none; }

.disclosure__body {
    max-width: none;
    padding: 1mm 0 4mm;
    color: #000;
    font-size: 9.5pt;
}

.message-group,
.message-group__body {
    box-shadow: none;
    background: none;
    padding: 0;
}

/* Figures and totals */

.verdict,
.figure,
.review-bar {
    border: 1px solid #000;
    box-shadow: none;
    background: none;
    padding: 3mm 4mm;
    page-break-inside: avoid;
}

.verdict { margin-bottom: 4mm; }
.verdict__amount { font-size: 18pt; }
.verdict__pair > div + div { border-left: 0; padding-left: 0; }

.figures-grid { gap: 2mm; margin-bottom: 4mm; }
.figure__value { font-size: 12pt; }
.figure--negative .figure__value { color: #000; }

/* Tables */

.table-wrapper {
    overflow: visible;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

.table { page-break-inside: auto; font-size: 8.5pt; }
.table tr { page-break-inside: avoid; page-break-after: auto; }
.table thead { display: table-header-group; }
.table th, .table td { border-top: 1px solid #999; padding: 1mm 2mm; }
.table thead th { color: #000; }

.cell--tech { display: table-cell !important; }

.message,
.disclaimer {
    border: 1px solid #000;
    background: none;
    color: #000;
}

a { color: #000; text-decoration: none; }
