/* HCP C08/C10/C11/C16/C54. Shared layout rules, both desktop themes. */
@media(min-width:1100px){
 .sidebar{width:262px}.workspace{margin-left:262px}main{padding-left:24px;padding-right:24px}
 .hcp-page-title{margin-left:-24px;margin-right:-24px;padding-left:24px;padding-right:24px}
 .hcp-job-layout{max-width:1380px;grid-template-columns:minmax(230px,23fr) minmax(0,77fr);gap:30px}
 .hcp-record-heading.record-heading,.estimate-record-meta{max-width:1380px}
 .hcp-record-heading.record-heading h1{font-size:37.5px!important;font-weight:400!important;line-height:1.25!important}
}
.record-heading-actions,.section-head>.actions,.scope-category>.actions{gap:8px 12px;flex-wrap:wrap}
.hcp-job-layout .section-head>h2{font-size:16.875px!important;font-weight:600!important;line-height:1.5!important}
.hcp-job-layout .estimate-item-name,.hcp-job-layout .scope-description{min-width:0;align-items:flex-start}
.hcp-job-layout .estimate-item-name small,.hcp-job-layout .scope-description small{white-space:normal;overflow-wrap:anywhere;line-height:1.6}
.hcp-job-layout .table-wrap td:first-child{min-width:250px;width:55%}
.estimate-line-actions{display:flex;flex-wrap:wrap;gap:6px;max-width:160px}
.estimate-line-actions button{min-height:32px;white-space:normal}
.record-heading-copy h1{word-break:normal;overflow-wrap:anywhere}
.hcp-record-heading.record-heading h1{flex-wrap:nowrap;align-items:flex-start}.record-heading-title{flex:1;min-width:0}.record-heading h1>.job-options-button{position:static;float:none;flex:0 0 36px;align-self:flex-start;margin:6px 0 0;min-height:36px;padding:4px}
.segment-switcher .segment-tabs{border-bottom:0;margin-bottom:0;padding-bottom:0}
.hcp-job-layout .job-readiness{padding:12px 16px!important}
.job-readiness .readiness-heading{align-items:center;gap:10px}.job-readiness .readiness-heading h2{font-size:16.875px!important;font-weight:600!important;line-height:1.5}
.job-readiness .readiness-heading p{font-size:12px;margin:4px 0}.job-readiness .material-stages{margin:10px 0 6px}.job-readiness .material-stages button{min-height:36px}.job-readiness .readiness-actions small{font-size:11px}
.customer-summary-card .property-home-preview{min-height:132px;height:132px;overflow:hidden;border-bottom:1px solid var(--divider)}
.customer-summary-card .property-home-preview:not(.has-location-preview) [data-home-canvas]{display:none}
.customer-summary-card .property-home-preview:not(.has-location-preview) [data-home-status]{position:static;display:flex;align-items:center;justify-content:center;min-height:100%;padding:16px;margin:0;box-sizing:border-box;font-size:12px;color:var(--secondary)}
.customer-paper h1,.customer-paper h2,.customer-paper h3,.customer-paper h4,.customer-paper dt,.customer-paper dd,.customer-paper strong,.customer-paper b{color:#20272d!important}
.customer-paper a{color:#9b420e!important}.customer-paper .customer-totals{color:#20272d!important}
.customer-document-dialog{width:calc(100vw - 32px)!important;max-width:1880px!important;height:calc(100vh - 32px);max-height:calc(100vh - 32px);padding:0!important;background:var(--canvas);color:var(--ink)}
.customer-document-dialog .dialog-head{padding:18px 24px;margin:0;border-bottom:1px solid var(--edge);background:var(--surface)}
.customer-document-dialog #modalBody{padding:0}
.document-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:12px 24px;background:var(--surface);border-bottom:1px solid var(--edge)}
.document-toolbar .actions{margin:0;display:flex;gap:8px;flex-wrap:wrap}
.document-review{display:grid;grid-template-columns:minmax(280px,30%) minmax(0,1fr);gap:24px;max-width:1500px;margin:auto;padding:24px}
.document-controls{min-width:0}.document-controls details{background:var(--surface);border:1px solid var(--edge);border-radius:7px;margin:0 0 16px;padding:16px}
.document-controls summary{font-size:20px;font-weight:500;cursor:pointer;margin:0 0 12px}.document-controls label{display:block;font-size:13px}.document-controls input:not([type=checkbox]),.document-controls select,.document-controls textarea{width:100%;box-sizing:border-box}
.document-controls small{display:block;color:var(--secondary);line-height:1.6}.document-controls .document-check{display:flex;align-items:flex-start;gap:9px;margin:10px 0;overflow-wrap:anywhere}
.document-check input,.document-file-choice input{width:18px;height:18px;min-height:18px;flex:none;margin:2px 0}
.document-option-choice{display:flex;align-items:center;gap:6px}.document-option-choice label{flex:1;min-width:0}.document-option-choice button{padding:4px 8px;min-height:32px}
.document-canvas{background:var(--soft);padding:16px;border-radius:12px;min-width:0}.customer-paper{background:#fff;color:#20272d;border-radius:8px;padding:32px;overflow-wrap:anywhere;box-shadow:0 1px 8px #0000000a}.customer-paper h1{font-size:25px!important;line-height:1.4}.customer-paper h2{font-size:20px!important;line-height:1.4}.customer-paper h3{font-size:15px!important}.customer-paper p{font-size:13px;line-height:1.6;color:#424b53}.document-business{display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px;border-bottom:1px solid #dfe3e5;padding-bottom:20px;margin-bottom:24px;font-size:13px}
.customer-option{border:1px solid #dfe3e5;border-radius:6px;padding:20px;margin:24px 0}.document-table-wrap{overflow:auto;max-width:100%}.customer-paper table{border-collapse:collapse;width:100%;table-layout:auto;font-size:12px}.customer-paper th,.customer-paper td{padding:12px 8px!important;border-bottom:1px solid #e1e4e6!important;text-align:left;vertical-align:top;background:#fff!important;color:#20272d!important;line-height:1.6}.customer-paper td:not(:first-child),.customer-paper th:not(:first-child){white-space:nowrap;text-align:right}.customer-paper td:first-child{min-width:160px}.customer-paper td p{margin:6px 0;font-size:12px}.customer-totals{max-width:340px;margin:20px 0 0 auto;font-size:13px}.customer-totals>div{display:flex;justify-content:space-between;gap:20px;padding:6px 0}.customer-totals dd{margin:0}.customer-total{font-size:18px;font-weight:600;border-top:1px solid #dfe3e5}.customer-attachments figure{margin:16px 0;break-inside:avoid}.customer-attachments img{display:block;max-width:100%;max-height:400px;object-fit:contain;margin:auto}.customer-attachments figcaption{font-size:12px;color:#424b53;margin-top:10px}.document-footer{border-top:1px solid #dfe3e5;padding-top:16px}.document-layout-side-by-side{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.document-layout-stack .customer-option{break-after:page}.document-presenting .document-controls{display:none}.document-presenting .document-review{display:block;max-width:1100px}.document-source-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}.document-source-tabs button[aria-selected=true]{background:var(--selected);color:var(--accent)}.document-file-choice{display:flex!important;gap:12px;border-bottom:1px solid var(--edge);padding:14px 0;overflow-wrap:anywhere}.document-file-choice[hidden]{display:none!important}#documentError{color:var(--danger-text);padding:0 24px}
@media(max-width:1000px){.document-review{grid-template-columns:260px minmax(0,1fr);gap:14px;padding:16px}.customer-paper{padding:20px}.document-layout-side-by-side{display:block}}
.document-files-mode{width:900px!important;max-width:calc(100vw - 48px)!important;height:760px;max-height:calc(100vh - 48px);padding:24px!important;color:var(--ink);background:var(--surface)}
.document-attachment-tabs{display:flex;gap:70px;border-bottom:1px solid var(--edge);padding:10px 0 18px;color:var(--secondary)}.document-attachment-tabs b{color:var(--ink);font-weight:500}
.document-files-mode .document-source-tabs{background:var(--soft);border-radius:20px;padding:3px;width:max-content;max-width:100%;gap:2px}.document-source-tabs button{border:0;border-radius:18px;background:transparent;padding:7px 16px;min-height:32px}.document-source-tabs button[aria-selected=true]{background:var(--surface);box-shadow:0 1px 3px #0001}
.document-file-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;padding-bottom:72px}.document-file-grid .document-file-choice{border:0;align-items:flex-start}.document-file-choice>span{min-width:0}.document-file-choice b{display:block;font-size:13px;line-height:1.5}.document-file-choice small{display:block;font-size:11px;color:var(--secondary);line-height:1.6}.document-file-choice img{display:block;width:160px;max-width:100%;height:140px;object-fit:contain;border:1px solid var(--edge);margin-bottom:12px;background:white}.document-file-footer{position:sticky;bottom:0;display:flex;justify-content:flex-end;gap:8px;padding:14px 0;background:var(--surface);border-top:1px solid var(--edge)}
.notification-review{border:1px solid var(--edge);border-radius:6px;margin:18px 0;padding:16px;min-width:0}.notification-review legend{font-weight:600;font-size:15px}.notification-review .estimate-check{display:flex;gap:10px;align-items:center}.notification-review input[type=checkbox]{width:18px;min-height:18px}
.document-discard-confirm{position:fixed;inset:25% auto auto 50%;transform:translateX(-50%);width:440px;max-width:calc(100vw - 80px);padding:28px;background:var(--surface);color:var(--ink);border:1px solid var(--edge);border-radius:8px;box-shadow:0 0 0 100vmax #0008;z-index:20}.document-discard-confirm h2{font-size:22px}.document-discard-confirm .actions{display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap}
@media print{body:has(.customer-document-dialog[open])>.sidebar,body:has(.customer-document-dialog[open])>.workspace{display:none!important}.customer-document-dialog{position:static!important;display:block!important;width:100%!important;max-width:none!important;height:auto!important;max-height:none!important;overflow:visible!important;border:0!important}.customer-document-dialog .dialog-head,.customer-document-dialog .document-toolbar,.customer-document-dialog .document-controls,#documentError{display:none!important}.document-review,.document-canvas{display:block;padding:0;background:#fff}.customer-paper{box-shadow:none;padding:0}.document-layout-side-by-side{display:block}.customer-document-dialog::backdrop{background:#fff}}

/* Measured record geometry: HCP C08/C16/C58/C74, 1920px reference.
   JCL notes/files, material readiness and segment actions remain available. */
@media(min-width:1100px){
 .hcp-job-layout{max-width:1226px;grid-template-columns:290px minmax(0,1fr);gap:24px}
 .hcp-record-heading.record-heading,.estimate-record-meta{max-width:none;margin-left:0;margin-right:0}
}
.hcp-job-layout{--edge:var(--divider)}
.hcp-job-layout .card{border:1px solid var(--divider);border-radius:6px;box-shadow:0 2px 7px #15202b0d}
.hcp-job-layout .hcp-section{margin-bottom:18px}
.hcp-job-layout .hcp-section>.section-head,.hcp-job-layout .hcp-section>h2,.hcp-job-layout .customer-summary-card h2{background:var(--surface);border-bottom:1px solid var(--divider);padding:12px 16px;min-height:48px;box-sizing:border-box}
.hcp-job-layout .customer-summary-card h2{font-size:15px;font-weight:500}
.hcp-job-layout .hcp-section>.section-head>h2,.hcp-job-layout .hcp-section>h2{font-size:22px!important;font-weight:400!important;line-height:1.4!important}
.hcp-job-layout .hcp-summary .section-head>h2{font-size:16px!important;font-weight:600!important}
.hcp-job-layout .hcp-workflow{min-height:140px;padding:24px 0 20px;gap:10px;box-sizing:border-box}
.hcp-job-layout .hcp-circle{width:42px;height:42px;min-height:42px;padding:8px;border-radius:50%}
.hcp-job-layout .hcp-step{font-size:11px;gap:8px}
.hcp-job-layout .hcp-step small{font-size:11px!important;line-height:1.4}
.hcp-job-layout .hcp-summary p{padding:0 16px;margin:12px 0 16px;font-size:14px;line-height:1.5}
.hcp-job-layout .customer-card-content{padding:14px 16px}
.hcp-job-layout .customer-name-row{flex-wrap:wrap;gap:8px}
.hcp-job-layout .customer-name-row .btn{font-size:12px;min-height:32px;padding:5px 10px}
.hcp-job-layout .segment-switcher{margin:18px 0 8px;gap:8px}
.hcp-job-layout .segment-tabs{gap:0;padding:0}
.hcp-job-layout .segment-tab-wrap{flex-basis:180px;border-radius:0;border-color:var(--divider)}
.hcp-job-layout .segment-tab-wrap [role=tab]{min-height:54px;padding:8px 12px;font-size:13px}
.hcp-job-layout .segment-tab-wrap small{margin-top:3px;font-size:11px!important}
.hcp-job-layout .segment-switcher>.segment-add{min-height:36px;font-size:12px;padding:7px 10px}
.hcp-job-layout .job-readiness{padding:12px 16px!important;margin-bottom:18px}
.hcp-job-layout .job-readiness .readiness-heading h2{font-size:16px!important}
.hcp-job-layout .job-readiness .readiness-heading p{font-size:12px!important;margin:4px 0}
.hcp-job-layout .job-readiness .material-stages{display:flex;flex-wrap:wrap;margin:8px 0;gap:8px}
.hcp-job-layout .job-readiness button{min-height:32px;font-size:12px;padding:5px 10px}
.hcp-job-layout .job-readiness .readiness-actions small{font-size:11px!important;flex-basis:100%;margin-left:0}
.hcp-job-layout .table-wrap th,.hcp-job-layout .table-wrap td{border-bottom:1px solid var(--divider);padding:12px 16px}
.hcp-job-layout .hcp-section .money-strip{border-top:1px solid var(--divider);padding:12px 16px 16px}
@media(min-width:1100px) and (max-width:1500px){.hcp-job-layout{grid-template-columns:260px minmax(0,1fr);gap:24px}}

@media(min-width:1100px){
 body:has(.hcp-record-heading) main{padding-top:16px}
 body:has(.hcp-record-heading) .breadcrumb{margin-bottom:4px}
 .hcp-record-heading.record-heading{margin-bottom:24px}
 .hcp-job-layout .job-readiness{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 16px;align-items:center}
 .job-readiness .material-stages{margin:0!important;justify-content:flex-end}
 .job-readiness .readiness-details,.job-readiness .warranty-banner,.job-readiness .warranty-summary{grid-column:1/-1}
}
.hcp-job-layout .job-readiness .readiness-heading>.outline-pill{font-size:11px!important;min-height:28px;padding:3px 6px}
.hcp-job-layout .job-readiness .readiness-heading{gap:4px}
.readiness-details>summary{cursor:pointer;font-size:12px;color:var(--accent);padding:4px 0;min-height:28px;box-sizing:border-box}
.readiness-details[open] .readiness-actions{padding-top:8px}
.hcp-job-layout .segment-switcher{padding-bottom:0;border-bottom:0}
.hcp-job-layout .segment-tab-wrap{flex-basis:230px}
.hcp-job-layout .segment-tab-wrap [role=tab],.hcp-job-layout .segment-tab-wrap b{font-size:12px!important;font-weight:500;line-height:1.4}
.hcp-job-layout .customer-summary-card h2{padding:8px 16px}
.hcp-job-layout .customer-summary-card h2 button{min-height:30px;padding:4px 8px;font-size:12px!important}
.hcp-job-body>.hcp-section:first-of-type .section-head>h2{font-size:16px!important;font-weight:600!important}
.hcp-job-layout .section-head{padding:8px 16px!important}

.hcp-job-layout .estimate-proposal-workspace>.section-head{background:var(--surface);border-bottom:1px solid var(--divider);min-height:48px;padding:8px 16px}
.hcp-job-layout .estimate-proposal-workspace>.section-head>h2{font-size:22px!important;font-weight:400!important}
.hcp-job-layout .estimate-options{background:var(--soft);border-bottom:1px solid var(--divider)}
.hcp-job-layout .estimate-options button{padding:10px 16px;min-height:64px;font-size:12px!important}
.hcp-job-layout .estimate-options b{font-size:12px;font-weight:500;line-height:1.4}
.hcp-job-layout .estimate-options small{font-size:11px!important;margin-top:4px}
.hcp-job-layout .estimate-option-heading{padding:14px 16px;border-bottom:1px solid var(--divider);gap:12px}
.hcp-job-layout .estimate-option-heading h2{font-size:18px;font-weight:500}
.hcp-job-layout .scope-category{background:var(--surface);border-bottom:1px solid var(--divider);padding:10px 16px}
.hcp-job-layout .scope-category h3{font-size:14px;font-weight:500}


/* C02: Create is anchored to its navigation entry, with native Escape/light-dismiss. */
#hcpCreatePopover{position:fixed;inset:auto;margin:0;width:240px;max-width:calc(100vw - 16px);padding:6px 0;border:1px solid var(--divider);border-radius:6px;box-shadow:0 5px 18px #0003;background:var(--surface);color:var(--ink)}
#hcpCreatePopover::backdrop{background:transparent}
#hcpCreatePopover .hcp-create-menu{gap:0}
#hcpCreatePopover button{min-height:44px;border-radius:0;padding:10px 16px;background:var(--surface);color:var(--ink);font-size:14px!important}
#hcpCreatePopover button:hover{background:var(--control-hover)}

/* Material disclosure remains inside the card, clear of its border. */
.hcp-job-layout .material-activity{margin:12px 18px 18px;border-top:1px solid var(--divider);padding-top:4px}
.hcp-job-layout .material-activity>summary{padding:12px 0;min-height:20px;line-height:20px;cursor:pointer;list-style-position:inside}
.hcp-job-layout .material-activity>p{margin:8px 0 12px}
.hcp-job-layout .line-form-card{background:var(--surface);border-color:var(--divider)}
.hcp-job-layout .line-form-card p,.hcp-job-layout .item-metrics{color:var(--secondary)}
.hcp-job-layout .item-metrics b{color:var(--ink)}

.hcp-job-layout .material-activity p small{display:block;margin-top:6px;color:var(--secondary)}

/* Checkpoint27: record hierarchy and consistent support rail spacing. */
@media(min-width:1100px){
 .hcp-record-heading.record-heading{align-items:flex-start;gap:20px;margin-bottom:18px}
 .hcp-record-heading.record-heading h1{font-size:32px!important;line-height:1.25!important}
 .record-heading-copy{min-width:0;flex:1}
 .record-heading-actions{flex-shrink:0;max-width:46%;justify-content:flex-end}
 .hcp-job-layout{grid-template-columns:288px minmax(0,1fr);gap:24px}
 .hcp-job-body{min-width:0}
 .estimate-record-meta{gap:12px 28px;flex-wrap:wrap;margin-bottom:20px;line-height:1.6}
}
.hcp-job-layout .customer-summary-card{overflow:hidden}
.hcp-job-layout .customer-summary-card p{margin:8px 0;line-height:1.5;overflow-wrap:anywhere}
.hcp-job-layout .customer-summary-card h2{min-height:44px;box-sizing:border-box;padding:10px 16px}
.hcp-job-layout .customer-summary-card .property-home-preview:not(.has-location-preview){height:88px;min-height:88px}
.hcp-job-layout .customer-summary-card .property-home-preview:not(.has-location-preview) [data-home-status]{height:88px!important;min-height:0!important;max-height:88px!important;padding:12px 16px!important;position:static!important;box-sizing:border-box;display:flex;align-items:center;justify-content:center;text-align:center}
.hcp-job-layout .customer-summary-card .property-home-preview.has-location-preview{height:144px;min-height:144px}
.hcp-job-layout .customer-summary-card small{line-height:1.5}
.estimate-left-rail{min-width:0;display:flex;flex-direction:column;gap:16px}
.estimate-left-rail>.card{margin:0}
.estimate-left-rail .hcp-customer-side{display:flex;flex-direction:column;gap:16px}
.estimate-left-rail .hcp-customer-side>.card{margin:0}
.estimate-approval-panel .section-head{display:flex;flex-direction:column;align-items:stretch;gap:8px}
.estimate-approval-panel .section-head h2{font-size:15px!important}
.estimate-approval-panel>p,.estimate-approval-panel>.estimate-deposit-history{margin:12px 16px;line-height:1.5;font-size:13px;overflow-wrap:anywhere}
.estimate-approval-panel>button{margin:0 16px 12px;max-width:calc(100% - 32px);white-space:normal}
.estimate-approval-panel .estimate-deposit-history{border-top:1px solid var(--divider);padding-top:12px}
.estimate-approval-panel .estimate-deposit-history p{margin:6px 0}
.estimate-approval-panel .estimate-deposit-history small{display:block;margin-top:4px}
.approval-evidence{margin:12px 16px;font-size:12px;color:var(--secondary)}
.approval-evidence summary{cursor:pointer;min-height:28px;display:flex;align-items:center}
.approval-evidence p{overflow-wrap:anywhere;line-height:1.5}
.hcp-job-body>.hcp-section{margin-top:0;margin-bottom:18px}
.hcp-job-layout .estimate-proposal-workspace{margin-top:0}
.profile-overdue{border-top:1px solid var(--divider);padding:14px 16px}
.profile-overdue summary{cursor:pointer;min-height:28px;color:var(--secondary)}
.profile-overdue p{margin:12px 0;line-height:1.5}.profile-overdue small{display:block;color:var(--secondary)}
.customer-directory .table-scroll{max-height:calc(100vh - 365px);overflow:auto;scrollbar-gutter:stable}
.customer-directory table{table-layout:fixed;min-width:1150px;width:100%}
.customer-directory th,.customer-directory td{padding:12px 10px;vertical-align:top;line-height:1.5}
.customer-directory th:first-child,.customer-directory td:first-child{width:34px}
.customer-directory th{background:var(--soft);position:sticky;top:0;z-index:1}
.customer-directory [data-column=name]{font-weight:500}.customer-directory [data-column=address]{width:200px}
.directory-cell{overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.directory-view-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 0;color:var(--secondary)}
.directory-view-bar button{min-height:32px;font-size:12px;padding:4px 10px}
.directory-check{display:flex;gap:12px;align-items:center;padding:8px}.directory-check input{width:18px;height:18px}
.directory-error{color:var(--danger)}.saved-work-type{margin:12px 16px;font-weight:600;line-height:1.5}
.install-summary-card>p{padding:0 16px;margin:14px 0}.install-summary-card>button{margin:0 16px 16px;max-width:calc(100% - 32px);white-space:normal}
.customer-directory .record-tools [data-hcp=filters]{display:inline-flex!important}
.customer-directory .record-tools [data-hcp=directory-columns]{width:auto;min-width:70px;padding:0 10px}
.customer-balance-banner{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:12px 16px;background:var(--selected);border:1px solid var(--divider);border-radius:5px;margin:18px 0 8px;line-height:1.5}
.customer-balance-banner button{flex-shrink:0}.customer-task-group{padding:12px 16px;border-bottom:1px solid var(--divider)}
.customer-task-group summary{cursor:pointer;min-height:28px;font-weight:600}.customer-task-group .customer-task{padding:12px 0}
.customer-task-group p{margin:8px 0;line-height:1.5}
#modal:has([data-directory-form=columns]){position:fixed;inset:0 0 0 auto;margin:0;height:100dvh;max-height:100dvh;width:420px;max-width:calc(100vw - 24px);border-radius:0}
#modal:has([data-directory-form=columns]) #modalBody{overflow:auto;max-height:calc(100dvh - 86px);box-sizing:border-box}
