.estimate-paper{background:#fff;color:#20272d;padding:32px;overflow-wrap:anywhere;font:13px/1.6 Arial,sans-serif;border-radius:8px}
.estimate-paper h1,.estimate-paper h2,.estimate-paper h3,.estimate-paper b,.estimate-paper p,.estimate-paper dt,.estimate-paper dd{color:#20272d!important}
.estimate-paper h1{font-size:25px!important;font-weight:500;line-height:1.35;margin:8px 0 26px}.estimate-paper h2{font-size:20px!important;font-weight:600;line-height:1.4;margin:0}.estimate-paper h3{font-size:14px!important;font-weight:500;margin:24px 0 8px}
.estimate-letterhead{display:flex;justify-content:flex-start;align-items:center;gap:16px;margin-bottom:38px;min-height:84px}.estimate-letterhead .estimate-business-contact{min-width:0}.estimate-letterhead p{margin:0;font-size:12px}.estimate-letterhead b{font-size:13px}.estimate-company-logo{width:150px;height:84px;object-fit:contain;flex:none}.estimate-brand-mark{width:100px;height:60px;display:flex;align-items:center;justify-content:center;border:3px solid #ad5018;border-radius:50%;background:#202020;color:#ff8c2b!important;font:bold 30px Arial;flex:none}
.estimate-paper .estimate-reference{font-size:12px;color:#59616b!important;margin:0}.estimate-address-expiry{display:grid;grid-template-columns:minmax(0,1fr) minmax(160px,.8fr);gap:28px;margin:26px 0}.estimate-address-expiry p{margin:0;font-size:13px}.estimate-summary{margin:30px 0}.estimate-choice-note{font-size:12px}.estimate-document-option-heading{margin-bottom:24px}.estimate-document-option-heading p{font-weight:600;margin:0;font-size:13px}
.estimate-paper .customer-option{border:1px solid #dfe3e5;border-radius:7px;padding:24px;margin:24px 0;min-width:0}.estimate-paper .document-layout-side-by-side{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.estimate-paper .document-layout-side-by-side .customer-option{padding:18px;margin:16px 0}.estimate-paper .document-layout-side-by-side .estimate-document-option-heading h2{font-size:18px!important}.estimate-paper .document-layout-stack .customer-option{break-after:page}.estimate-paper .document-layout-stack .customer-option:last-child{break-after:auto}
.estimate-paper .document-table-wrap{overflow:auto;max-width:100%}.estimate-paper table{width:100%;border-collapse:collapse;table-layout:auto;font-size:12px}.estimate-paper th,.estimate-paper td{padding:10px 8px!important;border-bottom:1px solid #dfe3e5!important;vertical-align:top;text-align:left;background:#fff!important;color:#20272d!important;line-height:1.6}.estimate-paper td:first-child{min-width:140px}.estimate-paper td:not(:first-child),.estimate-paper th:not(:first-child){white-space:nowrap;text-align:right}.estimate-paper td p{font-size:12px;margin:5px 0}.estimate-paper .customer-totals{max-width:340px;margin:20px 0 0 auto;font-size:13px}.estimate-paper .customer-totals>div{display:flex;justify-content:space-between;gap:16px;padding:6px 0}.estimate-paper dd{margin:0;text-align:right}.estimate-paper .customer-total{font-size:18px;font-weight:600;border-top:1px solid #dfe3e5}.estimate-paper .customer-attachments img{max-width:100%;max-height:400px;object-fit:contain}.estimate-paper .customer-attachments figure{margin:18px 0}.estimate-paper .customer-attachments figcaption{font-size:12px}.estimate-paper .pre-line{white-space:pre-line}.estimate-paper .document-footer{border-top:1px solid #dfe3e5;padding-top:16px}
@media(max-width:1000px){.estimate-paper .document-layout-side-by-side{display:block}}
@media(max-width:600px){.estimate-paper{padding:18px}.estimate-letterhead{gap:14px}.estimate-company-logo{width:100px;height:70px}.estimate-address-expiry{grid-template-columns:1fr;gap:10px}.estimate-paper .customer-option{padding:14px}}
@media print{.estimate-paper{padding:0;box-shadow:none}.estimate-paper .document-table-wrap{overflow:visible}.estimate-paper .customer-option{break-inside:auto}.estimate-paper tr,.estimate-paper .customer-totals,.estimate-paper figure{break-inside:avoid}.estimate-paper thead{display:table-header-group}.estimate-paper .document-layout-side-by-side{display:block}.estimate-paper .document-footer{display:none}}
.estimate-paper .estimate-option-card{min-height:160px;display:flex;flex-direction:column;gap:16px}.estimate-option-card p{margin:0}.estimate-paper .estimate-card-price{font-size:24px;font-weight:600;margin-top:auto}.estimate-paper .estimate-option-detail>summary{cursor:pointer;list-style:none;border:1px solid #a94c16;border-radius:5px;color:#8e3e10;padding:10px 14px;margin-top:22px;text-align:center;font-size:14px;font-weight:600}.estimate-option-detail>summary::-webkit-details-marker{display:none}.estimate-option-detail>summary:focus-visible{outline:3px solid #de762b;outline-offset:3px}.estimate-detail-open{display:none}.estimate-option-detail[open] .estimate-detail-closed{display:none}.estimate-option-detail[open] .estimate-detail-open{display:inline}.estimate-option-detail[open]>summary{text-align:left;margin:0 0 24px}.estimate-paper .document-layout-side-by-side:has(.estimate-option-detail[open]){display:block}.estimate-paper .document-layout-side-by-side:has(.estimate-option-detail[open])>.customer-option:not(:has(.estimate-option-detail[open])){display:none}.estimate-paper .customer-option:has(.estimate-option-detail[open])>.estimate-option-card{display:none}.estimate-paper .estimate-category-subtotal{display:flex;justify-content:flex-end;gap:30px;font-size:13px}.estimate-visibility-group{margin:10px 0}.estimate-visibility-group>summary{font-weight:600}
@media print{.estimate-paper .document-layout-side-by-side>.customer-option{display:block!important}.estimate-paper .estimate-option-card,.estimate-paper .estimate-option-detail>summary{display:none!important}.estimate-paper .estimate-option-detail::details-content{content-visibility:visible;display:block}.estimate-paper .estimate-option-detail>.estimate-option-content{display:block!important}.estimate-paper .document-terms::details-content{content-visibility:visible}.estimate-paper .document-terms>*{display:block!important}}
.estimate-paper .estimate-card-price{font-size:24px!important}.estimate-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
@media screen and (min-width:800px){
 .customer-document-dialog[open]:has(.document-review){display:flex;flex-direction:column;overflow:hidden}
 .customer-document-dialog:has(.document-review)>.dialog-head{flex:none}
 .customer-document-dialog:has(.document-review) #modalBody{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}
 .customer-document-dialog .document-toolbar{flex:none}
 .customer-document-dialog .document-review{flex:1;min-height:0;width:100%;box-sizing:border-box;overflow:hidden;margin:0 auto}
 .customer-document-dialog .document-controls,.customer-document-dialog .document-canvas{min-height:0;overflow:auto;overscroll-behavior:contain}
 .customer-document-dialog #documentError{flex:none}.customer-document-dialog #documentError:empty{display:none}
}
@media print{.customer-document-dialog #modalBody,.customer-document-dialog .document-review,.customer-document-dialog .document-canvas{display:block!important;overflow:visible!important;height:auto!important;max-height:none!important}.customer-document-dialog .document-review{width:100%;margin:0}}

.document-layout-picker{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;border:0;padding:0;margin:12px 0}.document-layout-picker legend{margin-bottom:10px}.document-layout-picker label{position:relative;display:flex!important;flex-direction:column;align-items:center;gap:6px;padding:10px 3px;border:1px solid var(--border,#87929b);border-radius:5px;cursor:pointer;font-size:12px!important}.document-layout-picker input{position:absolute;opacity:0;width:1px;height:1px}.document-layout-picker label:has(:checked){border:2px solid var(--accent,#b4561d);padding:9px 2px;background:var(--panel2,transparent)}.document-layout-picker label:focus-within{outline:2px solid var(--accent,#b4561d);outline-offset:2px}.layout-icon{display:flex;gap:3px;width:26px;height:24px}.layout-icon i{border:1px solid currentColor;flex:1}.layout-icon-simple i:last-child{display:none}.layout-icon-stack{flex-direction:column}.document-image-option{min-width:0;margin:12px 0;padding:10px;border:1px solid var(--border,#87929b);border-radius:5px}.document-image-option legend{font-weight:600}.document-image-option select{max-width:100%;width:100%}.estimate-paper .estimate-option-image{display:block;width:100%;height:180px;object-fit:contain;margin:0 0 18px;background:#f7f8fa;border-radius:4px}.estimate-paper .estimate-line-image{display:block;width:100px;height:75px;object-fit:contain;margin-bottom:8px}.estimate-option-content>.estimate-option-image,.document-layout-stack>.customer-option>.estimate-option-image{height:240px}.estimate-option-card:has(.estimate-option-image){min-height:0}

/* Corresponding live HCP Simple preview: full workspace, one header, fixed control rail. */
@media screen{
 body:has(.customer-document-dialog[open]){overflow:hidden}
 #modal.customer-document-dialog:has(.document-review){width:100vw!important;max-width:100vw!important;height:100dvh;max-height:100dvh;margin:0;inset:0;border:0;border-radius:0;box-sizing:border-box;overflow:hidden}
 .customer-document-dialog:has(.document-review)>.dialog-head{position:absolute;inset:0 0 auto;height:64px;padding:0!important;border:0;pointer-events:none;background:transparent;z-index:2}
 .customer-document-dialog:has(.document-review) .dialog-head h2{position:absolute;left:56px;top:12px;margin:0;font:600 26px/38px "Open Sans","Segoe UI",Tahoma,sans-serif;pointer-events:auto}
 .customer-document-dialog:has(.document-review) .dialog-head [data-close]{position:absolute;left:12px;right:auto;top:12px;width:32px;min-width:32px;height:40px;min-height:0;padding:0;font-size:26px!important;background:transparent;border:0;pointer-events:auto}
 .customer-document-dialog .document-toolbar{min-height:64px;height:64px;box-sizing:border-box;padding:10px 24px 10px 460px;display:flex;justify-content:flex-end;gap:20px;flex:none}
 .customer-document-dialog .document-toolbar>span{font-size:12px;color:var(--secondary);margin-right:auto;white-space:nowrap}
 .customer-document-dialog .document-toolbar .actions{flex-wrap:nowrap;gap:10px}.customer-document-dialog .document-toolbar button{border-radius:20px;min-height:36px;padding:7px 16px;font-size:13px;white-space:nowrap}
 .customer-document-dialog #modalBody{height:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden;scrollbar-gutter:stable}
 .customer-document-dialog .document-review{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);gap:0;max-width:1440px;padding:16px 0 0;flex:1;width:calc(100% - 32px);min-height:0;box-sizing:border-box;overflow:hidden}
 .customer-document-dialog .document-controls,.customer-document-dialog .document-canvas{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:auto}
 .customer-document-dialog .document-controls{padding:8px}.customer-document-dialog .document-canvas{margin:8px;padding:16px;background:var(--soft);border-radius:12px}
 .customer-document-dialog .document-controls #documentSettings>details{padding:0;border:1px solid var(--divider,#dfe3e5);margin:0 0 16px;border-radius:8px;overflow:clip}
 .customer-document-dialog .document-controls #documentSettings>details>summary{font-size:22px;font-weight:600;line-height:30px;list-style:none;margin:0;padding:17px 16px;display:flex;justify-content:space-between;align-items:center}
 .customer-document-dialog .document-controls #documentSettings>details>summary::-webkit-details-marker{display:none}
 .customer-document-dialog .document-controls #documentSettings>details>summary::after{content:'⌄';font-size:19px;color:var(--secondary)}
 .customer-document-dialog .document-controls #documentSettings>details[open]>summary{border-bottom:1px solid var(--edge);margin-bottom:16px}
 .customer-document-dialog .document-controls #documentSettings>details[open]>summary::after{content:'⌃'}
 .customer-document-dialog .document-controls #documentSettings>details>:not(summary){margin-left:16px;margin-right:16px}.customer-document-dialog .document-controls #documentSettings>details>:last-child:not(summary){margin-bottom:24px}
 .customer-document-dialog .document-layout-picker{display:flex;gap:0;width:max-content;margin-top:0;margin-bottom:12px}.customer-document-dialog .document-layout-picker legend{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .customer-document-dialog .document-layout-picker label{width:47px;height:40px;padding:10px!important;box-sizing:border-box;border:1px solid var(--accent);border-radius:0;gap:0;color:var(--accent);margin:0}.customer-document-dialog .document-layout-picker label:first-of-type{border-radius:7px 0 0 7px}.customer-document-dialog .document-layout-picker label:last-of-type{border-radius:0 7px 7px 0}.customer-document-dialog .document-layout-picker label+label{border-left:0}.customer-document-dialog .document-layout-picker label:has(:checked){background:var(--accent);color:#fff}
 .customer-document-dialog .layout-icon{width:19px;height:20px}.customer-document-dialog .document-option-choice{background:var(--soft);padding:8px 12px;border-radius:7px;margin-top:6px;min-height:56px;box-sizing:border-box;gap:8px}.customer-document-dialog .document-option-choice .document-check{font-size:15px;font-weight:400;margin:0;flex:1}.customer-document-dialog .document-option-choice button{border:0;background:transparent;min-width:24px;width:24px;padding:0;min-height:32px}
 .estimate-review-facts{margin-top:0}.estimate-review-facts>div{margin-bottom:18px}.estimate-review-facts>div:last-child{margin-bottom:0}.estimate-review-facts dt{font-size:12px;color:var(--secondary);margin-bottom:4px}.estimate-review-facts dd{font-size:15px;line-height:22px;margin:0}
 .customer-document-dialog.document-presenting .document-review{display:block;max-width:1100px;margin:0 auto}.customer-document-dialog.document-presenting .document-canvas{height:100%;box-sizing:border-box}
 .estimate-paper{font:13px/1.6 "Open Sans","Segoe UI",Tahoma,sans-serif;padding:24px;background:#fafafa;box-shadow:none;min-height:100%;box-sizing:border-box}
 .estimate-paper h1{font-family:inherit;font-size:26px!important;font-weight:600;line-height:1.45;margin:4px 0 32px}.estimate-paper h2{font-family:inherit;font-size:21px!important;font-weight:600}.estimate-paper h3{font-family:inherit}
 .estimate-letterhead{align-items:center;min-height:88px;margin-bottom:30px}.estimate-letterhead .estimate-business-contact{font-size:11px;line-height:17px}.estimate-letterhead b,.estimate-letterhead p{font-size:11px;line-height:17px;font-weight:400}.estimate-letterhead b{font-weight:600}.estimate-business-address{margin-left:8px;white-space:pre-line}.estimate-company-logo{width:120px;height:88px}.estimate-paper .estimate-reference{margin:0;font-size:13px}
 .estimate-paper .estimate-customer-name{font-size:13px;margin:-18px 0 18px}.estimate-address-expiry{margin:30px 0 36px;grid-template-columns:1fr 1fr;gap:32px}.estimate-address-expiry b{font-weight:600}.estimate-paper .estimate-summary{font-size:15px;line-height:1.5;color:#62676c!important;margin:36px 0 32px}
 .estimate-paper .customer-option{background:#fff;border:1px solid #dcdfe2;border-radius:8px;padding:24px;margin:32px 0}.estimate-document-option-heading{margin-bottom:24px}.estimate-paper .estimate-document-option-heading p{font-size:15px;font-weight:600}
 .estimate-paper .document-table-wrap{margin-top:12px}.estimate-paper th,.estimate-paper td{font-family:inherit;padding:12px 8px!important}.estimate-paper th{font-size:15px;font-weight:600;color:#62676c!important}.estimate-paper th:first-child,.estimate-paper td:first-child{padding-left:0!important}.estimate-paper th:last-child,.estimate-paper td:last-child{padding-right:0!important}.estimate-paper th:not(:first-child),.estimate-paper td:not(:first-child){width:14%;font-size:13px}.estimate-paper th:not(:first-child){font-size:15px}.estimate-paper .estimate-line-content{display:flex;align-items:flex-start;gap:16px}.estimate-line-description{min-width:0;flex:1}.estimate-paper .estimate-line-description b{font-weight:400;font-size:13px}.estimate-paper .estimate-line-description p{font-size:13px;line-height:1.6;margin:3px 0}.estimate-paper .estimate-line-description small{font-size:11px}
 .estimate-paper .estimate-line-image,.estimate-paper .estimate-line-photo{flex:none;width:84px;height:56px;object-fit:contain;margin:0;border:1px solid #ddd;border-radius:7px;background:#f5f5f5;box-sizing:border-box}.estimate-paper .estimate-line-photo{font-size:26px;line-height:40px;color:#60676b;padding:0;cursor:pointer}
 .estimate-paper .customer-totals{max-width:none;margin:0;font-size:15px}.estimate-paper .customer-totals>div{padding:16px 0;border-bottom:1px solid #ddd}.estimate-paper .customer-total{font-size:21px;border-top:0;border-bottom:0!important}
}
@media screen{.estimate-paper table th{font-size:15px!important}.estimate-paper .estimate-line-photo{font-size:26px!important}.estimate-paper .estimate-line-photo span{font-size:26px!important}.customer-document-dialog .document-controls #documentSettings>details[open]>summary{border-color:var(--divider,#dfe3e5)}}
@media screen{.estimate-paper h1{font-weight:600!important}.estimate-paper .estimate-summary{font-size:15px!important}.estimate-paper .estimate-document-option-heading p{font-size:15px!important}}
@media screen{.estimate-paper small{color:#59616b!important}.estimate-paper .estimate-line-photo svg{width:24px;height:24px;vertical-align:middle}[data-theme=dark] .customer-document-dialog .document-layout-picker label:has(:checked){color:#20272d}}
@media screen and (max-width:1100px){.customer-document-dialog .document-review{grid-template-columns:290px minmax(0,1fr);padding:18px;gap:12px}.customer-document-dialog .document-toolbar>span{display:none}.customer-document-dialog .document-toolbar{padding-left:390px}.customer-document-dialog:has(.document-review) .dialog-head h2{font-size:22px}.estimate-paper .estimate-line-content{gap:10px}.estimate-paper .estimate-line-photo,.estimate-paper .estimate-line-image{width:60px;height:48px}}
@media screen and (max-width:799px){.customer-document-dialog .document-review{display:block;overflow:auto}.customer-document-dialog .document-controls,.customer-document-dialog .document-canvas{overflow:visible}.customer-document-dialog .document-controls{padding:0}.customer-document-dialog:has(.document-review) .dialog-head h2{font-size:18px;left:48px;top:8px}.customer-document-dialog .document-toolbar{height:108px;padding:57px 12px 8px;justify-content:flex-start}.customer-document-dialog .document-toolbar .actions{flex-wrap:wrap}.customer-document-dialog .document-toolbar button{font-size:12px;padding:6px 12px}.estimate-paper{padding:18px}.estimate-paper .estimate-line-content{display:block}.estimate-paper .estimate-line-image,.estimate-paper .estimate-line-photo{margin-bottom:8px}}

.customer-paper .document-contact-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.customer-paper .document-contact-actions:empty{display:none}
.customer-paper .document-contact-actions a{display:inline-flex;align-items:center;justify-content:center;min-height:28px;padding:3px 12px;border:1px solid #b9c0c5;border-radius:18px;background:#fff;color:#26313a!important;font:600 11px/1.2 Arial,sans-serif;text-decoration:none;box-sizing:border-box}
.customer-paper .document-contact-actions a:hover,.customer-paper .document-contact-actions a:focus-visible{border-color:#a64d16;color:#8a3d10!important;outline-offset:2px}
@media print{.customer-paper .document-contact-actions{display:none}}

/* Keep focus/history navigation inside the two review panes; the shell must not scroll. */
@media screen and (min-width:800px){#modal.customer-document-dialog:has(.document-review),#modal.customer-document-dialog:has(.document-review) #modalBody,#modal.customer-document-dialog .document-review{overflow:clip}}
