/* A sign-off letter of the platform portal on an A4 sheet (LetterSheet.razor): on screen as the preview, and as the printout. */
.axf-letter {
    --axf-brand: #460640;
    --axf-brand-dark: #440141;
    --axf-accent: #167834;
    --axf-brand-tint: #f7eef6;
    --axf-accent-tint: #edf6ef;
    --axf-ink: #1f1a1e;
    --axf-muted: #6b6470;
    --axf-rule: #ddd3dc;
    box-sizing: border-box;
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    background: #fff;
    color: var(--axf-ink);
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 10pt;
    line-height: 1.45;
    display: flex;
    flex-direction: column;
    box-shadow: 0 6px 24px rgba(40, 10, 38, .18), 0 1px 3px rgba(0, 0, 0, .12);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}
.axf-letter *, .axf-letter *::before, .axf-letter *::after { box-sizing: border-box; }

.axf-letterhead { display: flex; align-items: center; justify-content: space-between; padding: 8mm 16mm 3mm; }
.axf-logo { height: 20mm; width: auto; }
.axf-sender { text-align: right; }
.axf-sender-name { font-size: 20pt; font-weight: 700; color: var(--axf-brand); letter-spacing: .01em; line-height: 1.1; }
.axf-sender-tagline { font-size: 7.5pt; font-weight: 700; letter-spacing: .18em; color: var(--axf-accent); margin-top: 2px; }
.axf-sender-web { font-size: 8pt; color: var(--axf-muted); margin-top: 3px; }
.axf-band { height: 7px; background: var(--axf-brand); border-bottom: 3px solid var(--axf-accent); }

.axf-content { flex: 1; padding: 5mm 16mm 5mm; }
.axf-title-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.axf-title { font-size: 13pt; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--axf-brand); }
.axf-title-rule { width: 48px; height: 3px; background: var(--axf-accent); margin-top: 4px; border-radius: 2px; }
.axf-meta { min-width: 70mm; background: var(--axf-brand-tint); border-radius: 6px; padding: 8px 11px; }
.axf-meta > div { display: flex; justify-content: space-between; gap: 10px; font-size: 9pt; }
.axf-meta span { color: var(--axf-muted); font-size: 8pt; }
.axf-meta b { color: var(--axf-brand-dark); }
.axf-meta .axf-signed { justify-content: flex-end; color: var(--axf-accent); font-weight: 700; font-size: 7.5pt; letter-spacing: .15em; margin-top: 2px; }

.axf-to { margin-top: 5mm; border-left: 3px solid var(--axf-brand); padding-left: 12px; }
.axf-label { font-size: 8pt; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--axf-muted); }
.axf-to-name { font-size: 12pt; font-weight: 700; color: var(--axf-brand-dark); }
.axf-to-line { font-size: 9pt; color: var(--axf-muted); }
.axf-attn { font-size: 9pt; margin-top: 4px; }

.axf-subject { margin-top: 5mm; background: var(--axf-brand-tint); border-left: 4px solid var(--axf-accent); padding: 7px 12px; font-weight: 700; border-radius: 0 4px 4px 0; }
.axf-subject b { color: var(--axf-brand); }

.axf-p { margin: 3.2mm 0 0; text-align: justify; white-space: pre-line; }
.axf-callout { margin-top: 3.2mm; background: var(--axf-accent-tint); border-left: 4px solid var(--axf-accent); border-radius: 4px; padding: 9px 12px; }
.axf-callout .axf-p { margin-top: 2px; }
.axf-callout-label { font-size: 7.5pt; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--axf-accent); }

.axf-section { margin-top: 5mm; font-size: 10.5pt; font-weight: 700; color: var(--axf-brand); }
.axf-points { width: 100%; border-collapse: collapse; margin-top: 2mm; font-size: 8.5pt; }
.axf-points th { background: var(--axf-brand); color: #fff; text-align: left; padding: 4px 6px; font-weight: 700; }
.axf-points td { height: 6.2mm; border-bottom: 1px solid var(--axf-rule); padding: 0 6px; color: var(--axf-muted); }
.axf-points tbody tr:nth-child(even) td { background: var(--axf-brand-tint); }

.axf-closing { margin-top: 5mm; }
.axf-signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 8mm; margin-top: 3mm; break-inside: avoid; page-break-inside: avoid; }
.axf-sign { border: 1px solid var(--axf-rule); border-radius: 6px; overflow: hidden; }
.axf-sign-head { background: var(--axf-brand-tint); color: var(--axf-brand); font-weight: 700; font-size: 9pt; padding: 5px 10px; }
.axf-sign-body { padding: 10px; }
.axf-sign-line { margin-top: 9mm; border-top: 1px solid var(--axf-muted); }
.axf-sign-caption { font-size: 7.5pt; color: var(--axf-muted); margin: 3px 0 4px; }
.axf-field { display: flex; align-items: flex-end; font-size: 8.5pt; margin-top: 5px; }
.axf-field span { width: 70px; flex: none; color: var(--axf-muted); }
.axf-field i { flex: 1; border-bottom: 1px solid var(--axf-rule); height: 12px; }

.axf-footer { display: flex; justify-content: space-between; gap: 10px; background: var(--axf-brand); border-top: 3px solid var(--axf-accent); color: #fff; font-size: 7.5pt; padding: 7px 16mm; }

/* The preview's desk: the sheet on a grey table, scrolled sideways on a narrow screen. */
.axf-desk { background: #e9e4ea; border-radius: 8px; padding: 18px; overflow: auto; max-height: 80vh; }
.axf-desk-small { zoom: .6; }

@media print {
    @page { size: A4; margin: 0; }
    html, body { margin: 0; padding: 0; background: #fff; }
    .axf-letter { box-shadow: none; margin: 0; width: 210mm; min-height: 296mm; }
}
