/* Iteration 03: retain the SVODRA type, palette and controls; give mobile tasks room. */
#modal .field .input-wrap{border-radius:12px}
#modal .field input:not([type=checkbox]):not([type=radio]),#modal .field select{min-width:0;max-width:100%;font-size:16px}
#modal .field input:focus-visible,#modal .field select:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:12px}
#modal .field>.input-wrap:has(>span:not(:empty))>input:focus-visible{outline:0}
.lab-project-edit .flow-step>legend{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.lab-project-edit .flow-hint{display:none}
#modal.lab-project-edit .flow-status{font-size:12px;color:var(--muted);margin:8px 0 18px}
#modal:is(.lab-project-edit,.document-compose) .flow-progress{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;overflow:visible;max-width:100%}
#modal:is(.lab-project-edit,.document-compose) .flow-progress:not(:has(>button:nth-child(3))){grid-template-columns:repeat(2,minmax(0,1fr))}
#modal:is(.lab-project-edit,.document-compose) .flow-progress>button{display:flex;align-items:center;justify-content:flex-start;gap:7px;min-width:0;min-height:44px;padding:8px;font-size:13px;white-space:normal;line-height:1.3}
#modal:is(.lab-project-edit,.document-compose) .flow-progress>button>b{flex:none;width:22px;height:22px}
#modal:is(.lab-project-edit,.document-compose) .flow-progress>button>span{min-width:0;overflow-wrap:normal}

/* Native inputs retain keyboard and form semantics; the entire label is a target. */
#modal .work-picks{padding:4px 12px 8px;border-radius:12px}
#modal .work-picks>label{align-items:center;gap:12px;min-height:48px;padding:10px 0;cursor:pointer}
#modal .work-picks>label+label{border-top:1px solid var(--line)}
#modal .work-picks input[type=checkbox]{width:22px;height:22px;flex:0 0 22px;margin:0;accent-color:var(--accent)}
#modal .work-picks>label:has(input:focus-visible){outline:2px solid var(--accent);outline-offset:2px;border-radius:6px}
.lab-membership-hint{margin:8px 0 16px;line-height:1.5}

/* Disclosures use the same end chevron, without a second triangle at the start. */
.live-estimate>.warning>summary,.estimate-view-options>summary,.estimate-line-tools>summary,.lab-documents>.ux-details>summary,#modal .form-section>summary,.lab-purchase-empty~details>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;list-style:none;cursor:pointer}
.live-estimate>.warning>summary::-webkit-details-marker,.estimate-view-options>summary::-webkit-details-marker,.estimate-line-tools>summary::-webkit-details-marker,.lab-documents>.ux-details>summary::-webkit-details-marker,#modal .form-section>summary::-webkit-details-marker,.lab-purchase-empty~details>summary::-webkit-details-marker{display:none}
.live-estimate>.warning>summary:after,.estimate-view-options>summary:after,.estimate-line-tools>summary:after,.lab-documents>.ux-details>summary:after,#modal .form-section>summary:after,.lab-purchase-empty~details>summary:after{content:'';width:7px;height:7px;flex:0 0 7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);margin:0 4px 4px 0}
.live-estimate>.warning[open]>summary:after,.estimate-view-options[open]>summary:after,.estimate-line-tools[open]>summary:after,.lab-documents>.ux-details[open]>summary:after,#modal .form-section[open]>summary:after,.lab-purchase-empty~details[open]>summary:after{transform:rotate(225deg);margin-bottom:-2px}
.estimate-view-options>summary{font-size:14px;padding:10px 0}.estimate-view-options>summary small{display:block;font-size:12px;color:var(--muted);margin-top:4px}
.live-estimate>.warning{padding:0 12px;border-radius:12px}.live-estimate>.warning>summary{font-size:14px;padding:8px 0;line-height:1.4}
.live-estimate>.warning>p{font-size:13px;line-height:1.5;margin:0 0 12px}

/* Keep name, scope, quantity and amount together, with one full-width details row. */
.live-estimate .ux-estimate-line{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,35%);grid-template-areas:'copy values' 'tools tools';align-items:start;gap:12px 24px;padding:16px}
.live-estimate .ux-estimate-line>.estimate-line-copy{grid-area:copy;min-width:0;overflow-wrap:break-word}
.live-estimate .estimate-line-copy>strong{display:block;font-size:16px;font-weight:600;line-height:1.4}
.live-estimate .estimate-line-copy>small{font-size:13px;line-height:1.45;margin-top:5px}
.live-estimate .line-type{display:inline-flex;align-items:center;background:transparent;padding:0;margin-top:6px;border:0;color:var(--muted);font-size:12px}
.live-estimate .line-type>span{display:none}
.live-estimate .ux-estimate-line>.estimate-line-values{grid-area:values;display:flex;align-items:baseline;justify-content:space-between;gap:12px;min-width:0}
.live-estimate .estimate-line-values>.estimate-quantity{font-size:14px;line-height:1.4;color:var(--muted);min-width:0;flex:1}
.live-estimate .estimate-line-values>.estimate-line-amount{font-size:16px;line-height:1.4;font-variant-numeric:tabular-nums;text-align:right;white-space:normal;max-width:65%;overflow-wrap:normal}
.live-estimate .ux-estimate-line>.estimate-line-tools{grid-area:tools;margin:0;border-top:1px solid var(--line);padding:0}
.live-estimate .estimate-line-tools>summary{font-size:13px;min-height:44px;padding:8px 0;color:var(--muted);font-weight:500}
.live-estimate .estimate-line-tools>summary:before{display:none}
.live-estimate .estimate-line-tools>div{display:flex;gap:8px;flex-wrap:wrap;padding:4px 0 8px}
.live-estimate .estimate-line-tools .btn{min-height:44px;font-size:14px;margin:0;padding:8px 12px;border:1px solid var(--line);border-radius:10px}
.live-estimate .live-estimate-heading{display:block;margin:0 0 16px}.live-estimate .live-document-action{margin:0}
.live-estimate .live-document-action>.btn{width:100%;min-height:48px}
.live-estimate .live-estimate-channels{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;background:var(--kit-soft,var(--bg));border-radius:12px;width:min(100%,360px)}
.live-estimate .live-estimate-channels>.btn{border:0;min-height:44px;margin:0}

.lab-documents{display:flex;flex-direction:column;gap:16px}
.lab-documents>.section-head{margin:0}.lab-documents .section-head p{line-height:1.5}
.lab-documents>.ux-document-list{order:1}.lab-documents>.lab-document-routes{order:2}.lab-documents>.ux-details{order:3}
.lab-documents .ux-empty{padding:16px 4px 24px}.lab-documents .ux-empty>.ux-art{height:90px}.lab-documents .ux-empty h2{font-size:21px}
.lab-documents .ux-empty>.btn{width:100%;max-width:360px;min-height:48px}
.lab-documents .lab-document-routes{display:grid;gap:0;border-block:1px solid var(--line);margin:0}
.lab-documents .lab-document-routes>.btn{min-height:56px;width:100%;border:0;border-radius:0;box-shadow:none;justify-content:flex-start;background:transparent;padding:12px 0;text-align:left;font-size:14px;gap:12px}
.lab-document-routes>.btn+.btn{border-top:1px solid var(--line)}
.lab-document-routes>.btn:after{content:'›';margin-left:auto;font-size:22px;color:var(--muted)}
.lab-document-routes>.btn>.icon{flex:none}

.ops-work-overview .execution-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;overflow:visible;padding:8px 0}
.ops-work-overview .execution-filters>.btn{width:100%;min-width:0;min-height:48px;white-space:normal;line-height:1.35;font-size:13px;padding:8px}
.ops-work-overview .ops-toolbar{align-items:stretch;gap:8px}
.ops-work-overview .ops-toolbar>.primary{flex:1;min-height:48px}
.ops-work-overview .execution-progress p{line-height:1.45}
.lab-stage-work>p{line-height:1.45;margin:8px 0;font-size:13px}
.lab-stage-work .btn{width:100%;min-height:44px}
.finance-section .finance-notice{font-size:13px;line-height:1.5;border-radius:10px;padding:12px}
.lab-forecast-help{margin:12px 0}.lab-forecast-help p{font-size:13px;line-height:1.5}
.finance-section[data-finance-forecast]>.btn{width:100%;min-height:48px}
.finance-section[data-finance-forecast]>.ux-details{margin-top:12px}

.purchase-page .lab-purchase-heading{align-items:flex-start;padding-bottom:16px;border-bottom:1px solid var(--line)}
.purchase-page .lab-purchase-heading>h2{font-size:20px;line-height:1.4;margin:0;flex:1;min-width:0}
.purchase-page .lab-purchase-heading>.btn{font-size:13px;min-height:44px;padding:8px 0;justify-content:flex-start}
.purchase-page .purchase-actions:empty{display:none}
.purchase-page .lab-purchase-empty{padding:28px 0;text-align:left}
.lab-purchase-empty>h3{font-size:20px;margin:0 0 10px}.lab-purchase-empty>p{font-size:14px;line-height:1.5;color:var(--muted);margin:0 0 20px}
.lab-purchase-empty>.btn{width:100%;min-height:48px}
.account-shell:has(.purchase-page) .account-top [data-navigation-back]{display:none}
.account-shell:has(.purchase-page) .account-top>.row{min-width:0}.account-shell:has(.purchase-page) .account-return{min-height:44px}
.account-shell:has(.purchase-page) #local-form-drafts{margin-top:16px}

@media(max-width:700px){
 .project-head:not(.lab-object-head) .tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:4px;padding:4px;margin:14px 0 0;border:0;background:var(--kit-soft);overflow:visible}
 .project-head:not(.lab-object-head) .tab{font-size:14px;min-height:44px;white-space:normal;padding:10px 8px}
 .work-space .work-space-tools{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;margin:16px 0}
 .work-space .work-space-tools>.btn{width:100%;max-width:none;min-width:0;min-height:48px;padding:12px 16px;font-size:15px;line-height:1.35;white-space:normal;overflow-wrap:normal;gap:12px;justify-content:flex-start;text-align:left}
 .work-space .work-space-tools>.btn>.icon{width:22px;height:22px;flex:none}
 .work-space .work-space-tools>.btn.primary{background:var(--action);border-color:transparent}
 .live-estimate>.section-head{display:grid;grid-template-columns:1fr;gap:14px}.live-estimate>.section-head>.btn{width:100%;font-size:15px;min-height:48px}
 .live-estimate .ux-estimate-line{grid-template-columns:minmax(0,1fr);grid-template-areas:'copy' 'values' 'tools';gap:12px;padding:16px}
 .live-estimate .ux-estimate-line>.estimate-line-copy{grid-area:copy}.live-estimate .ux-estimate-line>.estimate-line-values{grid-area:values}.live-estimate .ux-estimate-line>.estimate-line-tools{grid-area:tools}
 #modal .finance-head{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;align-items:start}#modal .finance-head h3{margin:0}
 #modal .finance-head>.btn{width:100%;margin:0;min-height:48px;font-size:14px;gap:10px}
 #modal .finance-head>.btn>.icon{flex:none}
 #modal .finance-facts{display:grid;grid-template-columns:minmax(0,1fr);gap:0;font-size:14px}
 #modal .finance-facts>dt{margin:0;padding:12px 0 4px;line-height:1.4;border-top:1px solid var(--line)}
 #modal .finance-facts>dd{margin:0;padding:0 0 12px;text-align:left;font-size:16px;font-weight:600}
 #modal .ops-work-overview .ops-toolbar{display:grid;grid-template-columns:minmax(0,1fr)}
 #modal .ops-work-overview .ops-more>summary{min-height:44px}
 .lab-object-data .lab-data-edit{margin:0;min-height:44px}.lab-object-data .ux-data{margin-top:0}
 .lab-object-data>.ux-inline-actions{margin-top:6px;gap:0}.lab-object-data>.ux-inline-actions>.btn{padding-block:8px;min-height:44px}
 .purchase-page .lab-purchase-heading{display:block}.purchase-page .lab-purchase-heading>.btn{margin-top:6px}
}
@media(max-width:420px){
 #modal:is(.lab-project-edit,.document-compose) .flow-progress:has(>button:nth-child(3)){grid-template-columns:repeat(2,minmax(0,1fr))}
 #modal.lab-project-edit .two-cols{grid-template-columns:minmax(0,1fr);gap:0}
}


/* Routine persistence is silent; exception content stays compact and readable. */
.workspace-feedback { gap:12px; align-items:center; }
.workspace-feedback strong { display:block; font-size:14px; }
.workspace-feedback p { margin:4px 0 0; font-size:12px; line-height:1.4; }
.workspace-feedback > div { min-width:0; flex:1; }
.workspace-editor-issue { flex:0 0 98px; width:98px; height:44px; }
.workspace .focus-header .workspace-editor-issue>.btn { width:100%; height:44px; min-height:44px; padding:4px 6px; margin:0; font-size:12px; line-height:1.25; white-space:normal; color:#71421e; background:#faf0e8; border:0; }
.recovery-comparison > section { padding:12px 0; border-bottom:1px solid var(--line,#d8ddd4); }
.recovery-comparison h3 { font-size:14px; overflow-wrap:anywhere; }
.recovery-comparison-pair { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.recovery-comparison-pair > div { min-width:0; }
.recovery-comparison pre { font-family:inherit; font-size:13px; line-height:1.5; white-space:pre-wrap; overflow-wrap:anywhere; }
@media(max-width:600px){.recovery-comparison-pair{grid-template-columns:1fr;}.workspace-feedback{flex-wrap:wrap;}}

/* Bounded project pages retain the existing row composition. */
.project-pagination{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:20px 0;flex-wrap:wrap}.project-pagination .btn{min-height:44px}.project-pagination span{white-space:nowrap}
