/* v394 - Automated operational letters, resilient pagination and evidence handling */
.letter394-shell{display:grid;grid-template-columns:minmax(390px,500px) minmax(690px,1fr);gap:16px;align-items:start}.letter394-controls{position:sticky;top:10px;max-height:calc(100vh - 24px);overflow:auto;padding:12px;border:1px solid #dbe3ee;border-radius:17px;background:#f8fafc}.letter394-panel{background:#fff;border:1px solid #dce4ed;border-radius:14px;padding:11px;margin-bottom:10px;box-shadow:0 3px 12px rgba(15,23,42,.035)}.letter394-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:9px}.letter394-panel-head>div{display:flex;align-items:center;gap:7px}.letter394-panel-head strong{font-size:13px;color:#172235}.letter394-panel-head small{max-width:220px;text-align:right;color:#64748b;font-size:10px;line-height:1.3}.letter394-step{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#8A2A2B;color:#fff;font-size:10px;font-weight:900}.letter394-grid2{display:grid;grid-template-columns:1fr 1fr;gap:8px}.letter394-controls label{display:grid;gap:4px;font-size:9px;font-weight:850;color:#475569;text-transform:uppercase;letter-spacing:.035em}.letter394-controls input,.letter394-controls select,.letter394-controls textarea{width:100%;box-sizing:border-box;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#111827;padding:8px 9px;font:600 12px/1.35 inherit}.letter394-controls textarea{resize:vertical;text-transform:none;font-weight:500}.letter394-full-label{margin-top:9px}.letter394-recommendation{display:grid;grid-template-columns:1fr auto;align-items:center;gap:9px;padding:10px 11px;margin-bottom:10px;border:1px solid #e4b8b9;border-left:5px solid #8A2A2B;border-radius:12px;background:#fff5f5;color:#552124}.letter394-recommendation-copy{display:grid;gap:2px}.letter394-kicker{font-size:8px;font-weight:900;letter-spacing:.08em}.letter394-recommendation strong{font-size:12px}.letter394-recommendation small{font-size:10px;line-height:1.35}.letter394-recommendation button,.letter394-inline-actions button,.letter394-evidence-actions button,.letter394-upload-btn{border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#172235;padding:7px 9px;font-size:10px;font-weight:850;cursor:pointer}.letter394-recommendation button{background:#8A2A2B;color:#fff;border-color:#8A2A2B}.letter394-detected{display:grid;gap:5px;margin-bottom:8px;padding:8px;border-radius:9px;background:#f8fafc;border:1px solid #e2e8f0}.letter394-detected-title{display:flex;align-items:center;justify-content:space-between;gap:8px}.letter394-detected-title strong{font-size:10px}.letter394-detected-title span{font-size:9px;color:#64748b}.letter394-detected-item{display:grid;grid-template-columns:16px 1fr;gap:6px;align-items:start;padding:5px 6px;border-radius:7px;background:#fff;border:1px solid #e2e8f0;font-size:10px;line-height:1.3}.letter394-detected-item.is-high{border-color:#e0a6a8;background:#fff8f8}.letter394-detected-item input{width:auto;margin-top:1px}.letter394-preset-groups{display:grid;gap:7px;margin-top:8px}.letter394-preset-group{border:1px solid #e2e8f0;border-radius:9px;overflow:hidden}.letter394-preset-group>button{width:100%;display:flex;justify-content:space-between;align-items:center;border:0;background:#f8fafc;padding:7px 8px;font-size:10px;font-weight:900;color:#334155;cursor:pointer;text-align:left}.letter394-preset-list{display:grid;grid-template-columns:1fr 1fr;gap:5px;padding:6px}.letter394-preset{display:flex!important;align-items:flex-start!important;gap:5px!important;padding:6px;border:1px solid #e2e8f0;border-radius:7px;background:#fff;text-transform:none!important;font-size:10px!important;font-weight:700!important;cursor:pointer}.letter394-preset input{width:auto!important;margin-top:1px}.letter394-inline-actions,.letter394-evidence-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}.letter394-evidence-actions{margin-top:0;margin-bottom:7px}.letter394-upload-btn{display:inline-flex!important;align-items:center!important;text-transform:none!important}.letter394-upload-btn input{display:none}.letter394-available-photos{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;max-height:170px;overflow:auto}.letter394-available-card{position:relative;border:1px solid #dbe3ee;border-radius:8px;overflow:hidden;background:#fff;cursor:pointer}.letter394-available-card img{width:100%;height:74px;display:block;object-fit:cover;background:#f1f5f9}.letter394-available-card span{display:block;padding:4px;font-size:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.letter394-available-card.is-highlighted:after{content:'REPORT HIGHLIGHT';position:absolute;left:3px;top:3px;padding:2px 4px;border-radius:4px;background:#8A2A2B;color:#fff;font-size:6px;font-weight:900}.letter394-available-card.is-selected{outline:3px solid #8A2A2B;outline-offset:-3px}.letter394-selected-head{display:flex;justify-content:space-between;gap:8px;margin-top:9px;font-size:10px}.letter394-photo-strip{display:grid;gap:6px;margin-top:6px}.letter394-photo-thumb{display:grid;grid-template-columns:72px minmax(0,1fr) 28px;gap:6px;align-items:center;border:1px solid #dbe3ee;border-radius:9px;background:#fff;padding:5px}.letter394-photo-thumb img{width:72px;height:54px;object-fit:cover;border-radius:6px;background:#f1f5f9}.letter394-photo-thumb input{font-size:10px!important;padding:6px!important}.letter394-photo-thumb button{width:26px;height:26px;border:0;border-radius:50%;background:#8A2A2B;color:#fff;font-weight:900;cursor:pointer}.letter394-bottom-actions{display:flex;gap:7px;align-items:center}.letter394-save-state{font-size:10px;color:#64748b;margin-left:auto}.letter394-preview-wrap{overflow:auto;padding:8px 0 26px;background:#e9edf1;border-radius:16px}.letter394-pages{display:grid;gap:12px}.letter394-page{width:210mm;height:297mm;margin:0 auto;background:#fff;box-shadow:0 10px 28px rgba(15,23,42,.16);box-sizing:border-box;padding:11mm 13mm 8mm;display:flex;flex-direction:column;color:#111;font-family:Arial,sans-serif;font-size:10.3pt;line-height:1.34;overflow:hidden}.letter394-page-content{flex:1;min-height:0;overflow:hidden}.letter394-page-footer{flex:0 0 18mm;position:relative;display:grid;grid-template-columns:1fr auto;align-items:end;border-top:0 solid #eee;padding-top:2mm;color:#8A2A2B;font-size:8pt;font-weight:700}.letter394-page-footer .letter394-terms{position:absolute;left:30mm;right:30mm;bottom:0;text-align:center;color:#222;font-size:6.8pt;font-weight:500}.letter394-page-footer img{width:18mm;height:18mm;object-fit:contain}.letter394-page-number{position:absolute;right:21mm;bottom:1mm;color:#555;font-size:6.5pt;font-weight:600}.letter394-head{display:grid;grid-template-columns:1fr 54mm;align-items:start;margin-bottom:5mm}.letter394-head img{width:61mm;max-height:25mm;object-fit:contain;object-position:left top}.letter394-branch{text-align:left;color:#7f292c;font-weight:700;font-size:10pt;padding-top:2mm}.letter394-branch small{display:block;margin-top:2mm;color:#222;font-weight:700}.letter394-meta{display:grid;grid-template-columns:47mm 1fr;gap:1.4mm 4mm;margin:3mm 7mm 5mm}.letter394-meta b{font-size:9.3pt}.letter394-meta span{font-size:9.7pt}.letter394-to{margin:4mm 7mm;font-size:10pt}.letter394-title{background:#8A2A2B;color:#fff;text-align:center;font-weight:900;font-size:11.5pt;padding:1.9mm;margin:5mm 0 4mm;letter-spacing:.03em}.letter394-paragraph{margin:0 0 3.5mm}.letter394-occurrence{font-weight:800}.letter394-photo-pair{display:grid;grid-template-columns:1fr 1fr;gap:4mm;margin:2mm 0 4mm;break-inside:avoid}.letter394-photo-pair.is-single{grid-template-columns:minmax(0,1fr)}.letter394-photo-pair figure{margin:0;border:1px solid #d6d6d6;background:#fafafa;break-inside:avoid}.letter394-photo-pair img{display:block;width:100%;height:66mm;object-fit:contain;background:#f6f7f8}.letter394-photo-pair figcaption{text-align:center;padding:1.3mm 2mm;font-size:7.5pt;color:#444;min-height:6mm}.letter394-sign{margin-top:4mm;break-inside:avoid}.letter394-sign-line{display:flex;justify-content:space-between;border-bottom:1px solid #111;padding-bottom:1mm;margin:9mm 7mm 2mm}.letter394-sign-role{margin-left:7mm}.letter394-continuation-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:4mm;padding-bottom:2mm;border-bottom:1px solid #ddd;color:#7f292c;font-weight:800;font-size:8.5pt}.letter394-continuation-head span:last-child{color:#555;font-weight:600}.letter394-overflow-warning{margin:10mm;padding:5mm;border:1px solid #ef4444;color:#991b1b;background:#fff1f2}.letter394-offspec-banner{display:inline-block;padding:1mm 2mm;margin-bottom:3mm;border:1px solid #c98b8d;background:#fff5f5;color:#7f292c;font-size:8pt;font-weight:900}
@media(max-width:1200px){.letter394-shell{grid-template-columns:1fr}.letter394-controls{position:static;max-height:none}.letter394-preview-wrap{overflow:auto}}@media(max-width:700px){.letter394-grid2,.letter394-preset-list{grid-template-columns:1fr}.letter394-available-photos{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Preserve highlighted-photo metadata in fertilizer without changing report PDF layout. */
.fert-letter-launch-v394.is-saving{opacity:.65;pointer-events:none}


/* v394.3 typography and footer refinements */
.letter394-page{font-family:Arial,Helvetica,sans-serif;font-size:9.55pt;line-height:1.28;padding:11mm 13mm 9mm}
.letter394-page-content{padding-bottom:1mm}
.letter394-page-footer{flex:0 0 23mm;display:grid;grid-template-columns:52mm 1fr 18mm;gap:5mm;align-items:end;padding-top:2.5mm;color:#8A2A2B;font-size:7.4pt;font-weight:700;position:relative}
.letter394-footer-left{display:flex;flex-direction:column;gap:.7mm;align-self:end;min-width:0}
.letter394-footer-left strong{font-size:7.45pt;line-height:1.15;letter-spacing:.02em;color:#8A2A2B}
.letter394-footer-left span{font-size:6.75pt;line-height:1.2;color:#8A2A2B}
.letter394-footer-center{align-self:end;text-align:center;color:#333;font-size:6.1pt;line-height:1.22;font-weight:500;padding:0 3mm 1mm;min-width:0}
.letter394-footer-right{display:flex;justify-content:flex-end;align-items:end}
.letter394-page-footer img{width:14mm;height:14mm;object-fit:contain}
.letter394-page-footer .letter394-terms{display:none!important}
.letter394-page-number{position:absolute;right:0;bottom:-.3mm;color:#555;font-size:6.1pt;font-weight:600}
.letter394-head{display:grid;grid-template-columns:1fr 54mm;align-items:start;margin-bottom:4.2mm}
.letter394-head img{width:58mm;max-height:24mm}
.letter394-branch{font-size:9.55pt;padding-top:2mm}
.letter394-branch small{margin-top:1.4mm;font-size:8.15pt;font-weight:700}
.letter394-meta{grid-template-columns:48mm 1fr;gap:1.2mm 4mm;margin:2.5mm 7mm 4.2mm}
.letter394-meta b{font-size:9.05pt;line-height:1.2}
.letter394-meta span{font-size:9.3pt;line-height:1.2}
.letter394-to{margin:3.5mm 7mm;font-size:9.55pt;line-height:1.28}
.letter394-title{font-size:11.1pt;padding:1.75mm;margin:4.4mm 0 3.6mm;letter-spacing:.02em}
.letter394-paragraph{margin:0 0 3mm;font-size:9.4pt;line-height:1.31}
.letter394-occurrence{font-weight:800}
.letter394-photo-pair{gap:4mm;margin:2.5mm 0 4.2mm}
.letter394-photo-pair img{height:64mm}
.letter394-photo-pair figcaption{padding:1.2mm 2mm;font-size:7.2pt;line-height:1.2;min-height:6mm}
.letter394-sign{margin-top:4.5mm;break-inside:avoid}
.letter394-sign-line{display:flex;justify-content:space-between;gap:8mm;border-bottom:1px solid #111;padding-bottom:1mm;margin:8.2mm 7mm 2mm;font-size:9.4pt;line-height:1.22}
.letter394-sign-role{margin-left:7mm;font-size:9.15pt;line-height:1.2}

/* v395 - real-time occurrence workflow, safer letter typography and communications */
.letter395-auto-badge{align-self:center;border:1px solid #d7e4da;background:#f2fbf4;color:#26633a;border-radius:999px;padding:5px 8px;font-size:8px;font-weight:900;white-space:nowrap}
.letter395-auto-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:8px 0}
.letter395-switch{display:flex!important;align-items:center!important;gap:7px!important;text-transform:none!important;font-size:10px!important;color:#334155!important;cursor:pointer}.letter395-switch input{position:absolute;opacity:0;pointer-events:none}.letter395-switch span{width:32px;height:18px;border-radius:999px;background:#cbd5e1;position:relative;transition:.18s}.letter395-switch span:after{content:'';position:absolute;width:14px;height:14px;left:2px;top:2px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:.18s}.letter395-switch input:checked+span{background:#8A2A2B}.letter395-switch input:checked+span:after{transform:translateX(14px)}
.letter395-link-button{border:0;background:transparent;color:#8A2A2B;font-size:9px;font-weight:850;text-decoration:underline;cursor:pointer;padding:4px}
.letter395-workflow-note{margin-top:8px;border-left:3px solid #8A2A2B;background:#f8fafc;padding:8px 9px;font-size:9px;line-height:1.35;color:#475569;border-radius:0 8px 8px 0}
.letter395-empty-evidence{grid-column:1/-1;font-size:10px;color:#64748b;padding:7px}
.letter395-preview-toolbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 auto 10px;width:min(210mm,calc(100% - 16px));padding:7px;background:rgba(255,255,255,.97);border:1px solid #dbe3ee;border-radius:11px;box-shadow:0 5px 16px rgba(15,23,42,.08);backdrop-filter:blur(7px)}
.letter395-output-tabs{display:flex;gap:5px;flex-wrap:wrap}.letter395-output-tabs button,.letter395-output-actions button{border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#334155;padding:7px 9px;font-size:9px;font-weight:850;cursor:pointer}.letter395-output-tabs button.is-active{background:#8A2A2B;border-color:#8A2A2B;color:#fff}.letter395-output-actions{display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end}.letter395-output-actions button{background:#f8fafc}.letter395-output-panel{display:none}.letter395-output-panel.is-active{display:block}
.letter395-message-card{width:min(210mm,calc(100% - 16px));margin:0 auto 28px;background:#fff;box-shadow:0 10px 28px rgba(15,23,42,.14);border:1px solid #dbe3ee;font-family:Arial,Helvetica,sans-serif;color:#111}.letter395-message-card>header{padding:15px 18px 12px;border-bottom:1px solid #e2e8f0;display:grid;gap:5px}.letter395-message-card>header span{font-size:9px;letter-spacing:.07em;font-weight:900;color:#8A2A2B}.letter395-message-card>header strong{font-size:13px;line-height:1.35;font-weight:600}.letter395-message-body{padding:18px 20px 24px;font-size:12.5px;line-height:1.5}.letter395-message-body p{margin:0 0 13px;white-space:normal}.letter395-email-photos{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:15px}.letter395-email-photos figure{margin:0;border:1px solid #d7dce2;background:#fafafa}.letter395-email-photos img{display:block;width:100%;height:220px;object-fit:contain;background:#f3f4f6}.letter395-email-photos figcaption{text-align:center;font-size:9px;color:#555;padding:5px 7px}
.letter395-message-card.whatsapp{max-width:720px;border-radius:14px;background:#efeae2;padding:18px}.letter395-message-card.whatsapp>header{background:transparent;border:0;padding:0 0 8px}.letter395-message-card.whatsapp>header strong{display:none}.letter395-message-card.whatsapp .letter395-message-body{background:#d9fdd3;border-radius:9px;padding:14px 16px;font-size:12px;box-shadow:0 1px 2px rgba(0,0,0,.12)}.letter395-message-card.whatsapp .letter395-email-photos{grid-template-columns:repeat(2,minmax(0,1fr))}.letter395-message-card.whatsapp .letter395-email-photos img{height:180px}
/* The footer is a reserved flex row, never an absolute overlay. */
.letter394-page{font-family:Arial,Helvetica,sans-serif;font-size:9.25pt;line-height:1.29;padding:10.5mm 13mm 8.5mm}
.letter394-page-content{flex:1 1 auto;min-height:0;overflow:hidden;padding-bottom:1mm}
.letter394-page-footer{flex:0 0 25mm;min-height:25mm;position:relative;display:grid;grid-template-columns:48mm minmax(0,1fr) 16mm;gap:4mm;align-items:end;padding:2.6mm 0 1.6mm;margin:0;color:#8A2A2B;border-top:0;overflow:hidden}
.letter394-footer-left{min-width:0;align-self:end;display:flex;flex-direction:column;gap:.6mm;white-space:normal;overflow-wrap:anywhere}.letter394-footer-left strong{font-size:7.1pt;line-height:1.15}.letter394-footer-left span{font-size:6.35pt;line-height:1.18}.letter394-footer-center{min-width:0;align-self:end;text-align:center;color:#333;font-size:5.75pt;line-height:1.2;font-weight:500;padding:0 1.5mm 1mm;overflow-wrap:anywhere}.letter394-footer-right{align-self:end;display:flex;justify-content:flex-end}.letter394-page-footer img{width:13mm;height:13mm}.letter394-page-number{right:16mm;bottom:.2mm;font-size:5.8pt}.letter394-meta{grid-template-columns:45mm 1fr;gap:1.05mm 4mm;margin:2.5mm 7mm 4mm}.letter394-meta b{font-size:8.8pt}.letter394-meta span{font-size:9.05pt}.letter394-to{font-size:9.2pt}.letter394-title{font-size:10.8pt}.letter394-paragraph{font-size:9.15pt;line-height:1.3;margin-bottom:2.8mm}.letter394-photo-pair img{height:62mm}.letter394-sign-line,.letter394-sign-role{font-size:9.05pt}
@media(max-width:900px){.letter395-preview-toolbar{align-items:flex-start;flex-direction:column}.letter395-output-actions{justify-content:flex-start}.letter395-email-photos{grid-template-columns:1fr}.letter395-message-card{width:calc(100% - 12px)}}
@media print{.letter395-preview-toolbar,.letter395-output-panel:not([data-output-panel="letter"]){display:none!important}}


/* v397 - evidence-aware communications and simplified smart workflow */
.letter397-smartbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 12px;margin-bottom:10px;border:1px solid #e5c6c7;border-radius:12px;background:linear-gradient(135deg,#fff 0%,#fff8f8 100%);box-shadow:0 4px 14px rgba(127,41,44,.06)}
.letter397-smartbar>div{display:grid;gap:2px}.letter397-smartbar>div>span{font-size:8px;font-weight:950;letter-spacing:.1em;color:#8A2A2B}.letter397-smartbar strong{font-size:12px;color:#111827}.letter397-smartbar small{font-size:9px;color:#64748b}.letter397-smart-switch{flex:0 0 auto}
.letter397-occurrence-search{width:100%;border:1px solid #cbd5e1;border-radius:9px;padding:9px 10px;margin:8px 0 9px;font-size:10px;background:#fff;outline:none}.letter397-occurrence-search:focus{border-color:#8A2A2B;box-shadow:0 0 0 3px rgba(138,42,43,.09)}
.letter394-preset{border-radius:8px;transition:.15s}.letter394-preset:has(input:checked){background:#fff2f2;border-color:#b55b5e;box-shadow:inset 3px 0 0 #8A2A2B}.letter394-preset input:checked+span{font-weight:850;color:#7f292c}
.letter397-attachment-row{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-top:9px;padding:8px;border:1px dashed #cbd5e1;border-radius:9px;background:#f8fafc}.letter397-attachment-btn{display:inline-flex!important;align-items:center!important;justify-content:center;border:1px solid #8A2A2B!important;border-radius:7px!important;padding:7px 9px!important;background:#fff!important;color:#8A2A2B!important;font-size:9px!important;font-weight:900!important;cursor:pointer!important}.letter397-attachment-btn input{display:none}.letter397-attachment-row span{font-size:9px;color:#64748b}
.letter397-primary-action{background:#8A2A2B!important;border-color:#8A2A2B!important;color:#fff!important}.letter397-primary-action:hover{background:#702124!important}.letter397-primary-action:disabled{opacity:.55;cursor:wait}
.letter397-email-status{align-self:center;font-size:8px;color:#64748b;white-space:nowrap;padding:0 3px}.letter395-output-actions{align-items:center}
.letter395-email-photos figure{break-inside:avoid}.letter395-email-photos img{object-fit:contain}
@media(max-width:900px){.letter397-smartbar{align-items:flex-start}.letter397-email-status{white-space:normal;width:100%}}

/* v398 — stable Outlook layout support and compact off-spec integration */
.letter398-offspec-panel{margin:12px 0 14px;border:1px solid #d5b6b8;border-radius:10px;background:#fff;overflow:hidden}
.letter398-offspec-panel[hidden]{display:none!important}
.letter398-offspec-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;background:#fbf4f4;border-bottom:1px solid #ead7d8}
.letter398-offspec-panel-head>div{display:flex;flex-direction:column;gap:2px}
.letter398-offspec-panel-head strong{font-size:12px;color:#7d1f23}
.letter398-offspec-panel-head small{font-size:10px;color:#667085}
.letter398-offspec-panel-head>span{flex:none;font-size:9px;font-weight:800;letter-spacing:.03em;color:#fff;background:#972b2f;padding:5px 8px;border-radius:999px}
.letter398-offspec-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:9px}
.letter398-offspec-table th{background:#eceff2;color:#111;font-weight:800;padding:5px 4px;border:1px solid #aeb4bb;text-align:center}
.letter398-offspec-table td{padding:5px 4px;border:1px solid #aeb4bb;text-align:center;vertical-align:middle;overflow-wrap:anywhere}
.letter398-offspec-table td:first-child,.letter398-offspec-table td:nth-child(2){text-align:center}
.letter398-offspec-table .is-offspec{font-weight:800;color:#972b2f;background:#fff5f5}
.letter398-offspec-block{margin:3mm 0 4mm;break-inside:avoid}
.letter398-offspec-title{background:#972b2f;color:#fff;font:700 9pt Arial,Helvetica,sans-serif;padding:5px 7px}
.letter394-page .letter398-offspec-table{font-size:7.6pt}
.letter394-page .letter398-offspec-table th,.letter394-page .letter398-offspec-table td{padding:3.2px 3px}
.letter394-photo-thumb input[data-photo-caption-index]:focus{outline:2px solid rgba(151,43,47,.22);border-color:#972b2f;background:#fff}


/* v399 — official AmSpec communication typography */
.letter394-page,.letter394-page *{font-family:Calibri,Arial,sans-serif!important}
.letter394-page{font-size:10pt!important;line-height:1.3!important;color:#111!important}
.letter394-body{font-size:10pt!important;line-height:1.32!important}
.letter394-body p{margin:0 0 9pt 0!important}
.letter394-meta,.letter394-addresses{font-size:10pt!important;line-height:1.3!important}
.letter394-title{font-size:11pt!important;font-weight:700!important;letter-spacing:0!important}
.letter394-evidence-caption{font-size:9pt!important;font-weight:400!important;padding:4px 6px!important}
.letter394-footer{font-family:Calibri,Arial,sans-serif!important;font-size:8.5pt!important;line-height:1.2!important}
.letter394-signature{font-size:10pt!important;line-height:1.25!important}
.letter398-offspec-table,.letter398-offspec-table *{font-family:Calibri,Arial,sans-serif!important;font-size:9pt!important}
.letter394-email-preview,.letter394-email-preview *{font-family:Calibri,Arial,sans-serif!important}
.letter394-email-preview{font-size:10pt!important;line-height:1.35!important}
.letter394-email-preview p{margin:0 0 9pt 0!important}

/* v408 — optional off-spec workflow and consistent analytical alignment */
.letter408-offspec-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:10px 12px;border-bottom:1px solid #ead7d8;background:#fff}
.letter408-offspec-options label{display:flex;align-items:flex-start;gap:8px;margin:0;padding:9px;border:1px solid #d8dee7;border-radius:9px;background:#f8fafc;cursor:pointer}
.letter408-offspec-options input{margin-top:2px;accent-color:#8A2A2B}
.letter408-offspec-options span{display:grid;gap:2px}.letter408-offspec-options b{font-size:10px;color:#1f2937}.letter408-offspec-options small{font-size:9px;line-height:1.3;color:#64748b}
.letter408-detected-table{padding:10px 12px;transition:opacity .15s ease}.letter398-offspec-panel.is-excluded .letter408-detected-table{opacity:.55}.letter398-offspec-panel.is-excluded .letter398-offspec-panel-head>span{background:#7b8491}
.letter398-offspec-table th,.letter398-offspec-table td{text-align:center!important;vertical-align:middle!important}
@media(max-width:900px){.letter408-offspec-options{grid-template-columns:1fr}}

.letter394-page { position: relative; }
.letter-signature-controls { display: grid; gap: 6px; margin-top: 12px; }
.letter-signature-controls small { color: #455461; }
#letterSignatureControls { display: grid; gap: 8px; }
#letterSignatureControls[hidden] { display: none; }
#letterSignatureRemove { justify-self: start; }
.letter-signature-png {
  position: absolute;
  display: block;
  height: auto;
  z-index: 2;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.letter-signature-png:active { cursor: grabbing; }
.letter-signature-png:focus-visible { outline: 2px solid #8a2a2b; outline-offset: 2px; }
@media print {
  .letter-signature-png { outline: none !important; }
}
