/* Final Deal shell overrides. Loaded after deal-app.css so these rules win the cascade. */
/* Empty-intake deletion pass: remove duplicated orientation/help while preserving the working form and all account/data boundaries. */
body[data-product-mode="deal"] .sidebar-label,
body[data-product-mode="deal"] .sidebar-bottom p,
body[data-product-mode="deal"] .sidebar-bottom>small,
body[data-product-mode="deal"] .app-breadcrumb,
body[data-product-mode="deal"] .app-nav .job,
body[data-product-mode="deal"] .intake-card-heading,
body[data-product-mode="deal"] .intake-context,
body[data-product-mode="deal"] .intake-submit .form-rule,
body[data-product-mode="deal"] .app-footer,
body[data-product-mode="deal"] #workspaceOpen{display:none}
body[data-product-mode="deal"] .app-sidebar .brand{padding-bottom:0;margin-bottom:24px}
body[data-product-mode="deal"] .sidebar-bottom{padding-top:18px}
body[data-product-mode="deal"] .pilot-tag{font-size:8px;letter-spacing:1.2px;opacity:.78}
body[data-product-mode="deal"] .intake-layout{grid-template-columns:minmax(0,1fr);max-width:900px}
body[data-product-mode="deal"] #flowTitle>p{display:none}
body[data-product-mode="deal"] .intake-start{margin:0 0 15px;font-size:12px;line-height:1.6}
.deal-shell-nav{align-items:flex-start}
.deal-shell-more>summary{min-height:44px}
body[data-product-mode="deal"] .pilot-local-choice{display:grid;grid-template-columns:18px minmax(0,1fr);align-items:start;gap:10px;margin:0 0 16px;font-size:13px;font-weight:400;line-height:1.55;color:var(--ink)}
.pilot-local-choice #originalRetentionLabel{min-width:0}
.pilot-local-choice #originalRetentionLabel small{display:block;margin-top:3px;font-size:12px;line-height:1.5;font-weight:400;color:var(--muted)}
header.app-topbar:not(:has(.account-controls)):not(:has(.workspace-actions)){display:none}
/* Saved deals is a chooser, not a second workspace. Keep title + summary + primary open action visible; move technical navigation out of the scan path. */
body[data-product-mode="deal"] .workspace-panel .workspace-panel-head small,
body[data-product-mode="deal"] .workspace-panel article>small:first-of-type,
body[data-product-mode="deal"] .workspace-panel .deal-section-nav{display:none}
body[data-product-mode="deal"] .workspace-panel article [data-open]{background:#171717;color:#fff;border-color:#171717;font-weight:700}
body[data-product-mode="deal"] .workspace-panel article [data-backup],
body[data-product-mode="deal"] .workspace-panel article [data-delete]{background:transparent;border-color:transparent;color:#67635c;padding-inline:6px}
/* Shared control sizing and text flow across intake, saved projects and reports. */
body[data-product-mode="deal"]{font-size:14px;line-height:1.55}
.workspace button,.workspace-actions button,.workspace-panel button,.guide-panel button{max-width:100%;height:auto;min-height:44px;font-size:13px;line-height:1.45;white-space:normal;overflow-wrap:anywhere}
.workspace-actions #continueProject{max-width:240px;white-space:normal;overflow:visible;text-overflow:clip}
.workspace label{font-size:13px;line-height:1.5}
.workspace input:not([type=checkbox]):not([type=radio]),.workspace select,.workspace textarea{min-width:0;max-width:100%;font-size:14px;line-height:1.5}
.workspace input[type=checkbox],.workspace input[type=radio]{width:18px;height:18px;min-height:18px;flex-shrink:0}
.workspace :is(.fields,.detail-grid,.analysis-choice-grid)>*{min-width:0}
body[data-product-mode="deal"] .intake-start{font-size:14px;line-height:1.65;margin-bottom:18px}
#guidedForm{border-radius:12px}
.intake-help>summary{padding:12px 0;font-size:13px;line-height:1.5}
.audit-review-settings details>summary{min-height:44px;padding-block:12px;font-size:13px;line-height:1.5}
.audit-upload-flow{gap:20px}
.audit-dropzone{gap:6px;min-height:180px;border-radius:10px}
.audit-dropzone strong{font-size:17px;line-height:1.4}
.audit-dropzone>span:not(.upload-symbol){font-size:14px;line-height:1.5}
.audit-dropzone small{max-width:42ch;font-size:12px;line-height:1.6;text-wrap:balance}
.file-status,.intake-address>small{font-size:12px;line-height:1.6}
.optional{font-size:12px;line-height:1.5}
.intake-submit{flex-wrap:wrap;gap:12px}
.intake-submit .primary{min-height:46px;padding:12px 20px;font-size:14px}
.deal-shell-nav button b,.deal-shell-more>summary b{white-space:normal;overflow:visible;text-overflow:clip;line-height:1.45}
.deal-shell-more>summary{min-height:44px;border-radius:6px;font-size:13px}
.deal-shell-more>summary small{display:none}
.deal-shell-more-menu{max-width:min(340px,calc(100vw - 48px))}
.deal-shell-more-menu button{white-space:normal}
.deal-shell-status{line-height:1.5}
.document-file-cards b,.document-file-cards small{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;line-height:1.5}
.workspace-panel,.guide-panel{padding:20px}
.workspace-panel-head,.guide-head{gap:16px;align-items:start}
.workspace-panel-head b,.guide-head b{font-size:20px;line-height:1.4;overflow-wrap:anywhere}
.workspace-panel article>b{font-size:15px;line-height:1.5;overflow-wrap:anywhere}
.workspace-panel article p,.workspace-empty p,.guide-answer,.guide-boundary{font-size:13px;line-height:1.65}
.workspace-panel article button,.guide-panel button{font-size:13px}
.deal-export-actions button{min-height:44px;font-size:13px;line-height:1.5;white-space:normal}
.deal-export-actions small{font-size:12px;line-height:1.6}
.audit-progressive-disclosure>summary{display:block;font-size:14px;line-height:1.55}
.audit-progressive-disclosure>summary b{font-size:14px}
.audit-progressive-disclosure>summary span{display:block;margin-top:4px;font-size:12px;line-height:1.6}
.audit-row{line-height:1.6}
.audit-row small{font-size:12px;line-height:1.55}
.nav-icon svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:760px){
  body[data-product-mode="deal"] .app-sidebar{display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 16px;padding:12px 16px}
  body[data-product-mode="deal"] .app-sidebar .brand{margin:0;padding:0;font-size:21px;line-height:1.2;gap:9px}
  body[data-product-mode="deal"] .app-sidebar .brand-caption{display:none}
  body[data-product-mode="deal"] .app-sidebar .brand img{width:30px;height:30px}
  body[data-product-mode="deal"] .app-nav{margin:0;gap:4px;flex-wrap:wrap}
  body[data-product-mode="deal"] .app-nav .sidebar-button{display:inline-flex;align-items:center;gap:7px;min-height:44px;padding:10px 8px;font-size:13px;line-height:1.4;white-space:normal}
  .workspace-actions button,.workspace-panel button,.guide-panel button,.deal-shell-nav button,.deal-export-actions button{min-height:44px}
  .workspace-actions button{font-size:13px;padding:10px 14px}
  main.deal-app-main{padding:24px 16px 0}
  .workspace h1{font-size:28px;line-height:1.2;letter-spacing:-.7px}
  #flowTitle{margin-bottom:20px}
  #guidedForm{padding:20px 16px}
  .workspace input:not([type=checkbox]):not([type=radio]),.workspace select,.workspace textarea{font-size:16px;min-height:46px}
  .workspace label{font-size:14px}
  .audit-dropzone{min-height:170px;padding:22px 14px}
  .audit-dropzone small{max-width:34ch}
  .deal-shell-nav{flex-wrap:wrap;gap:0 4px;overflow:visible;align-items:stretch}
  .deal-shell-nav>button{flex:1 1 auto;min-width:0;padding:11px 10px}
  .deal-shell-nav button b{font-size:12px}
  .deal-shell-more,.deal-shell-more[open]{flex:0 1 auto}
  .deal-shell-more>summary{min-width:0;padding:11px 10px}
  .deal-shell-more-menu{min-width:180px;margin:4px 0 8px}
  .document-pipeline-steps{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .document-pipeline-steps span{font-size:11px;line-height:1.5;padding:8px 10px 8px 23px}
  .document-pipeline-steps i{left:9px}
  .document-file-cards b{font-size:12px}
  .document-file-cards small{font-size:11px}
  .workflow-result,.underwriting-compare{padding:20px 16px;border-radius:10px}
  .result-top p,.verification-work li,.result-next{font-size:14px;line-height:1.65}
  .result-top .eyebrow{font-size:11px}
  .workspace-panel,.guide-panel{top:12px;right:12px;width:calc(100% - 24px);max-height:calc(100dvh - 24px);padding:18px}
  .workspace-panel-head,.guide-head{position:sticky;top:-18px;z-index:2;background:#fff;margin-top:-18px;padding:18px 0 12px}
}
@media(max-width:560px){#pilotCaseDownload,#pilotCaseRemoveOriginals{display:block;width:100%;max-width:100%;margin-top:8px;white-space:normal}}
@media(max-width:420px){.intake-submit{align-items:stretch;flex-direction:column;gap:8px}.intake-submit .primary{width:100%}}

/* Persistent workspace masthead: scope remains visible when the sidebar collapses. */
body[data-product-mode="deal"] .app-sidebar .workspace-scope{display:block;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:0;color:#e8f1e2;margin:0 0 18px}
.workspace-scope>span{display:block}
@media(max-width:760px){
  body[data-product-mode="deal"] .app-sidebar .workspace-scope{order:3;flex-basis:100%;margin:0}
  .workspace-scope>span{display:inline}
  .workspace-scope>span+span::before{content:" · "}
}
@media(max-width:360px){
  body[data-product-mode="deal"] .app-sidebar{column-gap:8px}
  body[data-product-mode="deal"] .app-sidebar .brand{font-size:19px;gap:6px}
  body[data-product-mode="deal"] .app-nav .sidebar-button{padding-inline:4px}
  body[data-product-mode="deal"] .app-nav .nav-icon{display:none!important}
}

/* Documents stay primary; this separate optional tool has an explicit entry action. */
.audit-builder-entry{padding:20px;border:1px solid #adc2b5;border-left:4px solid #426555;border-radius:10px;background:#f3f8f4}
.audit-builder-intro{display:flex;align-items:center;gap:12px}
.audit-builder-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:8px;background:#dce9df;color:#254b39;font-size:28px;flex:none}
.audit-builder-intro small{display:block;font-size:10px;font-weight:700;letter-spacing:1.3px;color:#526e5d}
.audit-builder-intro h3{margin:3px 0 0;font-size:24px;color:var(--ink)}
.audit-builder-entry p{font-size:13px;line-height:1.6;color:var(--muted)}
.audit-model-options{padding:0;border:0;background:transparent}
.audit-model-options>summary{display:inline-block;padding:11px 16px;border:1px solid #426555;border-radius:6px;background:#254b39;cursor:pointer;min-height:48px;color:#fff;font-size:15px;font-weight:700;list-style:none}
.audit-model-options>summary::-webkit-details-marker{display:none}
.audit-model-options[open]>summary{margin-bottom:8px}
.audit-builder-panel{border-top:1px solid var(--line);margin-top:12px;padding-top:12px}
.audit-builder-panel>h3{margin:6px 0;font-size:17px;scroll-margin-top:20px}
.audit-builder-models{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.audit-builder-models button{text-align:left;white-space:normal;padding:14px;min-height:66px;background:#fff;border:1px solid #adc2b5;border-radius:7px;font:inherit;color:var(--ink);cursor:pointer}
.audit-builder-models button:hover{border-color:#426555;background:#eaf2ec}
.audit-builder-models button:focus-visible{outline:var(--focus-ring);outline-offset:2px}
.audit-builder-panel>[data-builder-close]{padding:11px 16px;border:1px solid #adc2b5;border-radius:6px;background:#fff;font:inherit;cursor:pointer}
.audit-builder-models b,.audit-builder-models span{display:block}
.audit-builder-models b{font-size:13px}
.audit-builder-models span{margin-top:5px;font-size:11px;color:var(--muted);font-weight:400;line-height:1.5}
.audit-builder-how{padding:12px;background:#fff;border-radius:6px}
.audit-builder-retention{margin-bottom:0}
.audit-model-options .audit-review-settings{margin:16px 0}
.audit-analysis-goal>h3{scroll-margin-top:20px}
.audit-analysis-goal>p{font-size:13px;line-height:1.6;color:var(--muted)}
.audit-analysis-goal>.analysis-mode-help{margin-top:14px}
.audit-analysis-goal>.analysis-mode-help>summary{padding:12px 0;min-height:44px;font-size:13px;cursor:pointer}
.audit-model-options>summary:focus-visible,.audit-builder-panel h3:focus-visible{outline:var(--focus-ring);outline-offset:3px}
@media(max-width:560px){.audit-builder-entry{padding:16px}.audit-builder-models{grid-template-columns:1fr}.audit-model-options>summary{width:100%;text-align:center}}
