.pas-document {
    box-sizing: border-box;
    max-width: 210mm;
    margin: 1.5rem auto;
    padding: 16mm;
    background: #fff;
    color: #111;
    font: 11pt/1.6 Arial, Helvetica, sans-serif;
    box-shadow: 0 4px 24px #122b4520
}

.pas-document * {
    box-sizing: border-box
}

.pas-document .pas-letterhead {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    border-bottom: 2px solid #333;
    padding-bottom: 16px;
    margin-bottom: 22px;
    text-align: center;
    break-inside: avoid
}

.pas-document .pas-crest {
    max-width: 95px;
    max-height: 95px;
    object-fit: contain
}

.pas-document .pas-letterhead p {
    margin: 2px 0;
    line-height: 1.4;
    white-space: pre-wrap
}

.pas-document h1 {
    font: 700 14pt/1.4 Arial, sans-serif;
    text-align: center;
    text-transform: uppercase;
    margin: 18px 0
}

.pas-document h2 {
    font: 700 11pt/1.5 Arial, sans-serif;
    margin: 22px 0 10px;
    break-after: avoid
}

.pas-document p {
    margin: 10px 0;
    line-height: 1.65;
    text-align: justify
}

.pas-document .pas-value {
    white-space: pre-wrap;
    overflow-wrap: anywhere
}

.pas-document .pas-doc-meta {
    text-align: right
}

.pas-document .pas-handline {
    display: inline-block;
    min-width: 95px;
    min-height: 1.2em;
    border-bottom: 1px solid #333;
    vertical-align: baseline;
    margin: 0 3px
}

.pas-document table {
    border-collapse: collapse;
    width: 100%;
    margin: 14px 0;
    table-layout: auto
}

.pas-document th,
.pas-document td {
    border: 1px solid #555;
    padding: 8px;
    text-align: left;
    vertical-align: top;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none
}

.pas-document th {
    font-weight: 700;
    background: #f5f5f5
}

.pas-document td .pas-value {
    white-space: pre-wrap;
    overflow-wrap: anywhere !important
}

.pas-document thead {
    display: table-header-group
}

.pas-document tr {
    break-inside: avoid
}

.pas-document .pas-identification th {
    width: 34%
}

.pas-document .pas-signatures {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin: 30px 0;
    break-inside: avoid
}

.pas-document .pas-signature {
    padding-top: 25px;
    text-align: center;
    border-top: 1px solid #333
}

.pas-document .pas-signature p {
    text-align: center;
    margin: 4px 0
}

.pas-document .pas-receipt {
    border: 1px solid #555;
    padding: 15px;
    margin-top: 22px;
    break-inside: avoid
}

.pas-document .pas-receipt p {
    text-align: left
}

.pas-document .pas-receipt .pas-handline {
    min-width: 60%;
    margin-top: 14px
}

.pas-document .pas-receipt .pas-date-line {
    min-width: 135px
}

.pas-document .pas-doc-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 12px 0
}

.pas-document .pas-doc-options p {
    text-align: left;
    margin: 0
}

.pas-document .pas-doc-source {
    font-size: 9pt;
    border-top: 1px solid #999;
    padding-top: 12px;
    margin-top: 28px
}

.pas-preview-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin: 1rem 0
}

.pas-document-preview {
    scroll-margin-top: 100px
}

.pas-document-preview[hidden] {
    display: none !important
}

@media(max-width:650px) {
    .pas-document {
        padding: 20px 14px;
        max-width: 100%;
        font-size: 10pt
    }

    .pas-document .pas-letterhead {
        flex-direction: column
    }

    .pas-document .pas-signatures {
        grid-template-columns: 1fr
    }

    .pas-document table {
        font-size: 9pt
    }

    .pas-document th,
    .pas-document td {
        padding: 5px
    }

    .pas-document .pas-doc-options {
        grid-template-columns: 1fr
    }
}

@page {
    size: A4;
    margin: 16mm
}

@media print {
    .pas-document {
        width: auto;
        max-width: none;
        margin: 0;
        padding: 0;
        box-shadow: none;
        font-size: 11pt;
        background: #fff !important;
        color: #111 !important
    }

    .pas-document,
    .pas-document * {
        color: #111 !important;
        box-shadow: none !important;
        text-shadow: none !important
    }

    .pas-document .pas-letterhead {
        flex-direction: row
    }

    .pas-document .pas-signatures {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }

    .pas-preview-toolbar {
        display: none !important
    }

    body.pas-printing>header,
    body.pas-printing>footer,
    body.pas-printing>.skip-link,
    body.pas-printing .site-scope,
    body.pas-printing .pas-layout>:not(.pas-document-preview),
    body.pas-printing main>:not(.pas-layout) {
        display: none !important
    }

    body.pas-printing,
    body.pas-printing main,
    body.pas-printing .pas-layout,
    body.pas-printing .pas-document-preview {
        display: block !important;
        background: white !important;
        color: #111 !important;
        max-width: none;
        margin: 0;
        padding: 0
    }

    body.pas-printing .pas-document-preview>h2,
    body.pas-printing .pas-document-preview>p {
        display: none !important
    }

    body.pas-printing .pas-document a {
        color: #111 !important
    }
}

.pas-document :is(p, h1, h2, th, td, span, div, section) {
    color: #111
}

.pas-document-preview [data-pas-document] {
    overflow-x: auto
}

.pas-logo-preview {
    display: block;
    max-width: 130px;
    max-height: 100px;
    object-fit: contain;
    margin: 1rem 0
}
