/* =========================================================================
   print.css — A4-friendly output for "Export PDF" (browser print to PDF)
   ========================================================================= */

@page {
    size: A4;
    margin: 14mm;
}

@media print {
    :root,
    [data-theme="dark"] {
        --background: #ffffff;
        --surface: #ffffff;
        --surface-raised: #ffffff;
        --text: #000000;
        --muted: #444444;
        --border: #bbbbbb;
        --accent: #000000;
        --accent-soft: #ffffff;
    }

    html,
    body {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 11pt;
    }

    /* Interactive-only chrome */
    .app-header,
    .lang-button,
    .hero__note,
    .no-print,
    .actions,
    .skip-link,
    .icon-button,
    .empty-hint,
    .app-footer,
    .card__chevron,
    .breakdown > summary {
        display: none !important;
    }

    /* Selection UI is replaced by the printed summary. */
    #topics,
    #results > .section-title,
    #forecastSection > .section-title,
    #summarySection > .section-title {
        display: none !important;
    }

    .print-header {
        display: flex !important;
        justify-content: space-between;
        border-bottom: 1pt solid #000000;
        padding-bottom: 6pt;
        margin-bottom: 12pt;
        font-size: 10pt;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .wrap {
        max-width: none;
        padding: 0;
    }

    .hero {
        display: none;
    }

    .print-header__title {
        font-weight: 500;
    }

    /* The brand accent is part of the identity, so it prints in colour. */
    .brand__accent {
        color: #d92d20 !important;
        font-weight: 700;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* The printed document always shows the full estimate. */
    .stage[hidden] {
        display: block !important;
    }

    .breakdown {
        border: 0;
    }

    .breakdown[open] #breakdown,
    .breakdown #breakdown {
        display: block !important;
    }

    section {
        margin-bottom: 14pt;
    }

    .estimate,
    .summary,
    .forecast__item,
    .card,
    .note {
        border: 1pt solid #bbbbbb !important;
        background: #ffffff !important;
        box-shadow: none !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .estimate__value {
        font-size: 22pt;
    }

    .estimate__value--secondary {
        font-size: 16pt;
    }

    .estimate__value--tertiary {
        font-size: 13pt;
    }

    /* The picker is interactive; the deposit itself stays in the breakdown. */
    .credit {
        display: none !important;
    }

    .forecast {
        grid-template-columns: 1fr 1fr;
    }

    .contact,
    .disclaimer {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .contact__qr {
        width: 34mm;
        max-width: 34mm;
        border: 0;
    }

    a {
        color: #000000 !important;
        text-decoration: none;
    }

    .disclaimer__reference a::after {
        content: " (" attr(href) ")";
        font-size: 8pt;
        word-break: break-all;
    }
}
