.report-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: end;
    margin: 24px 0 12px
}

.report-toolbar>.field {
    flex: 1 1 260px
}

.report-file {
    position: relative;
    cursor: pointer
}

.report-file input {
    position: absolute;
    inset: 0;
    opacity: 0;
    width: 100%;
    cursor: pointer
}

.report-file:focus-within {
    outline: 3px solid var(--blue-bright);
    outline-offset: 3px
}

.report-hint {
    color: var(--muted);
    font-size: .88rem;
    line-height: 1.6
}

.report-section {
    min-width: 0;
    margin: 24px 0;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface)
}

.report-section legend {
    font-weight: 700;
    padding: 0 8px;
    color: var(--blue)
}

.report-field-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px
}

.report-wide {
    grid-column: 1/-1
}

.report-input-row {
    display: flex;
    gap: 8px;
    align-items: start
}

.report-input-row .control {
    flex: 1;
    min-width: 0
}

.report-na {
    padding: 10px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    color: var(--ink);
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap
}

.report-na[aria-pressed=true] {
    background: var(--blue);
    color: var(--surface)
}

.report-section textarea {
    min-height: 105px
}

.report-table-row,
.report-nc {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    margin: 12px 0;
    background: var(--surface-soft)
}

.report-table-row .report-field-grid {
    gap: 12px
}

.report-table-row .button,
.report-nc>.button {
    margin-top: 12px
}

.report-errors {
    border: 2px solid #b03b39;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    background: var(--surface)
}

#roi-fields {
    margin-top: 20px
}

#roi-fields .field {
    margin-bottom: 16px
}

.report-document {
    background: #fff;
    color: #111;
    padding: 40px;
    border: 1px solid var(--line);
    font: 11pt/1.5 Arial, sans-serif
}

.report-document header {
    text-align: center;
    border-bottom: 2px solid #222;
    padding-bottom: 18px
}

.report-document h1 {
    font-size: 19pt
}

.report-document h2 {
    font-size: 13pt;
    background: #eee;
    color: #111;
    padding: 8px;
    margin-top: 24px
}

.report-document h3 {
    font-size: 11pt;
    margin-bottom: 4px
}

.report-document .value {
    white-space: pre-wrap;
    overflow-wrap: anywhere
}

.report-document table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    font-size: 9pt
}

.report-document td,
.report-document th {
    border: 1px solid #999;
    padding: 7px;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
    text-align: left
}

.report-document .signature {
    margin: 30px 0
}

.report-document footer {
    font-size: 9pt;
    margin-top: 28px;
    color: #444
}

.report-document section {
    padding: 0
}

.report-document p {
    margin: 4px 0 12px
}

@media(max-width:650px) {
    .report-field-grid {
        grid-template-columns: 1fr
    }

    .report-section {
        padding: 16px
    }

    .report-document {
        padding: 16px
    }

    .report-toolbar .button {
        width: 100%
    }
}

@page {
    size: A4;
    margin: 16mm
}

.report-logo-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin: 20px 0
}

.report-logo-controls>.field {
    flex: 1 1 260px
}

.report-logo-controls img,
.report-logo {
    max-width: 180px;
    max-height: 90px;
    object-fit: contain
}

@media print {
    body {
        background: white !important;
        color: black !important
    }

    .site-header,
    .site-footer,
    .skip-link,
    .report-editor {
        display: none !important
    }

    main,
    #report-preview-section,
    #report-preview-section>.container {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: none !important
    }

    .report-document {
        padding: 0 !important;
        border: 0 !important
    }

    .report-document h2,
    .report-document h3 {
        break-after: avoid
    }

    .report-document tr {
        break-inside: avoid
    }

    .report-document thead {
        display: table-header-group
    }

    .report-document footer {
        display: block !important
    }
}
