/* A single deal shell; legacy review screens retain their existing services. */
.deal-breadcrumbs{display:flex;flex-wrap:wrap;gap:8px;font-size:13px;margin:0 0 12px}.deal-return{margin:0 0 14px}.fact-list{margin:0}.fact-row{display:grid;grid-template-columns:190px minmax(0,1fr) 120px;gap:12px;padding:14px 0;border-bottom:1px solid #e5eaf0;align-items:start}.fact-row dt{font-weight:600;color:#42586c}.fact-row dd{margin:0;overflow-wrap:anywhere}.fact-row strong{font-weight:600}.fact-action{text-align:right;font-size:13px}.fact-status{font-size:12px;color:#147365;margin-left:8px}.fact-warning{display:block;color:#92530c;font-size:13px;margin-top:4px}.fact-muted{color:#627589;font-size:13px}.owner-facts{padding:10px 0 22px;border-bottom:1px solid #dfe7ed}.source-comparison{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:14px;margin:20px 0}.source-option{border:1px solid #d8e2ec;background:#f8fafc;border-radius:9px;padding:16px;margin:12px 0;overflow-wrap:anywhere}.source-option h3{margin-top:0}.source-option dd{margin:0 0 8px}.scope-banner{display:flex;flex-wrap:wrap;gap:20px;background:#edf5fb;padding:16px;border-radius:10px;margin-bottom:18px}.work-sections{display:grid;grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:16px}.work-sections .panel{margin:0}.work-sections h2{font-size:18px}#deal-work-dialog{width:min(1100px,calc(100vw - 24px));max-height:93vh;border:1px solid #cbd5e1;border-radius:16px;padding:22px;box-shadow:0 16px 70px #13263f40}#deal-work-dialog::backdrop{background:#0f213c80}#deal-work-content{min-width:0}#deal-work-content .panel{box-shadow:none}#deal-work-content .source-comparison{grid-template-columns:repeat(auto-fit,minmax(230px,1fr))}.compact-history summary{cursor:pointer;font-weight:600}.source-register{margin-top:20px}
@media(max-width:760px){.fact-row{grid-template-columns:1fr;gap:5px}.fact-action{text-align:left}.scope-banner{gap:10px}.work-sections{grid-template-columns:1fr}#deal-work-dialog{padding:12px}#deal-work-dialog .quick-dialog-header{align-items:flex-start}#deal-work-dialog .quick-dialog-header>div{display:flex;gap:6px;flex-wrap:wrap}.source-comparison{grid-template-columns:1fr!important}}
.submission-workspace {display:block!important}.workspace-content{min-width:0}.deal-nav{position:static!important;width:auto!important;margin-bottom:0}.deal-nav .context-nav__links{display:flex;flex-wrap:wrap;gap:4px}.deal-nav .context-nav__links a{white-space:normal;padding:10px 12px}.deal-quick-actions{position:sticky;top:0;z-index:12;display:flex;flex-wrap:wrap;gap:8px;align-items:center;background:#f8fafc;border:1px solid #d8e2ec;border-radius:0 0 12px 12px;padding:10px 14px;margin-bottom:22px}.deal-quick-actions .button{font-size:13px;padding:8px 11px}.quick-more{position:relative;margin-left:auto}.quick-more summary{cursor:pointer}.quick-more>div{position:absolute;right:0;min-width:215px;display:grid;gap:12px;background:white;padding:16px;border:1px solid #d8e2ec;border-radius:8px;box-shadow:0 8px 24px #13263f20}.deal-summary-grid{display:grid;grid-template-columns:1.2fr 1fr;gap:18px}.deal-summary-grid .panel{margin:0 0 4px}.data-list dd small{display:block;color:#596a7c;font-size:12px;margin-top:4px}.summary-unavailable{font-size:22px;font-weight:650;line-height:1.3;color:#203c59}.workflow-task{display:grid;grid-template-columns:minmax(0,1fr) minmax(170px,240px);gap:24px;padding:20px 0;border-bottom:1px solid #e1e8ef}.workflow-task:last-child{border-bottom:0}.workflow-task h3{margin:8px 0}.workflow-task p{margin:6px 0 12px}.workflow-task-actions{display:flex;flex-direction:column;gap:12px;align-items:flex-start;justify-content:center}.workspace-section-links{display:flex;flex-wrap:wrap;gap:12px}.quick-panel{max-width:650px;margin:0 auto}.quick-panel .field ul{list-style:none;padding-left:0}.quick-panel .field input[type=checkbox]{width:auto}.quick-panel textarea{min-height:90px}#deal-quick-dialog{width:min(720px,calc(100vw - 24px));max-height:90vh;border:1px solid #cbd5e1;border-radius:16px;padding:22px;box-shadow:0 16px 70px #13263f40}#deal-quick-dialog::backdrop{background:#0f213c80}.quick-dialog-header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:20px;border-bottom:1px solid #d8e2ec;padding-bottom:14px}
@media(max-width:760px){.deal-summary-grid{grid-template-columns:1fr}.workflow-task{grid-template-columns:1fr;gap:8px}.deal-quick-actions{position:static}.deal-nav .context-nav__links a{font-size:12px;padding:8px}.quick-more{margin-left:0}.quick-more>div{right:auto;left:0}.deal-quick-actions .button{font-size:12px}.quick-dialog-header strong{font-size:12px}}

.financial-work-nav{padding:12px 14px;border:1px solid #d8e2ec;border-radius:8px;margin-bottom:18px;background:#fff}.financial-work-nav a{font-size:13px}
.table-scroll{max-width:100%;overflow-x:auto}.table-scroll table{table-layout:auto}.table-scroll td{overflow-wrap:anywhere;min-width:100px}.preserve-whitespace{white-space:pre-wrap;overflow-wrap:anywhere}

#deal-work-dialog [hidden],#deal-quick-dialog [hidden]{display:none!important}

.document-register td small,.field-source-panel td small{display:block;margin-top:.25rem;color:var(--muted,#63758a)}
.document-register td small+a{display:inline-block;margin-top:.35rem}

.save-notice{white-space:normal;max-width:100%;font-weight:600}.quick-dialog-header:has(.save-notice){flex-wrap:wrap}.quick-dialog-header>.save-notice{flex-basis:100%;margin:.5rem 0}.save-pending::before{content:"";display:inline-block;width:1em;height:1em;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;margin-right:.6em;vertical-align:middle;animation:save-spin 1s linear infinite}@keyframes save-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.save-pending::before{animation:none}}[aria-invalid=true]{outline:2px solid #a22}
.application-cure-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(280px,1fr);gap:24px}.application-cure-layout>section{min-width:0}.application-original p{overflow-wrap:anywhere;font-size:13px}.application-preview-controls{display:flex;gap:12px;flex-wrap:wrap}.application-preview-controls label{flex:1;min-width:110px}.application-preview-scroll{overflow:auto;max-height:65vh;background:#edf1f5;border:1px solid #d8e2ec;border-radius:8px}.application-preview-scroll img{display:block;width:100%;max-width:none;height:auto}.application-recognized{display:grid;grid-template-columns:1fr;gap:5px}.application-recognized dt{font-weight:600;margin-top:8px}.application-recognized dd{margin:0;overflow-wrap:anywhere}.application-recognized small{display:block;color:#627589}.application-correction{padding:12px;background:#f8fafc;border:1px solid #d8e2ec;border-radius:8px;display:grid;gap:10px}.application-cure h2{font-size:17px}.application-cure [data-preview-status]{font-size:12px;color:#42586c}
@media(max-width:760px){.application-cure-layout{grid-template-columns:1fr;gap:18px}.application-preview-scroll{max-height:45vh}}.profile-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:14px 0}.profile-grid .field{min-width:0}.profile-grid input,.profile-grid select{min-width:0;width:100%}.profile-full{grid-column:1/-1}.profile-sources{margin-top:16px}.profile-source-picker{margin-top:20px}.profile-source-status{display:flex;gap:12px;flex-wrap:wrap;font-size:13px;color:#526878}.profile-save,.profile-owner-picker,.profile-flags,.profile-identity-actions{display:flex;align-items:center;gap:16px;flex-wrap:wrap}.profile-save{justify-content:space-between;margin-bottom:20px}.profile-owner-picker{margin-bottom:16px;align-items:end}.profile-owner-picker label{flex:1;min-width:180px}.profile-flags{margin-top:15px}.profile-identity-actions{font-size:13px;margin:14px 0}.profile-identity-actions details label{display:block}.profile-grid .input{font-size:14px}[role=tabpanel][hidden]{display:none!important}
@media(max-width:950px){.profile-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:540px){.profile-grid{grid-template-columns:1fr}.profile-grid .input{font-size:16px}.profile-owner-picker{align-items:stretch}.profile-owner-picker label{min-width:0;width:100%;flex-basis:100%}}

/* One compact in-deal next action; shares the Workflow projection. */
.deal-next-action { display:flex; justify-content:space-between; align-items:center; gap:1rem; margin:.75rem 0; padding:.85rem 1rem; border:1px solid var(--border, #d5dee8); border-radius:.5rem; background:var(--surface, #fff); }
.deal-next-action > div:first-child { min-width:0; overflow-wrap:anywhere; }
.deal-next-action strong, .deal-next-action span { display:block; }
.deal-next-action span { font-size:.85rem; margin-top:.25rem; }
.deal-next-action__links { display:flex; gap:1rem; align-items:center; flex-shrink:0; }
.deal-summary-grid > .panel { min-width:0; }
.work-sections > .panel { min-width:0; }
.score-progress-summary, .score-progress-summary details { min-width:0; overflow-wrap:anywhere; }
.score-progress-summary .table-wrap { max-width:100%; }
@media (max-width:700px) { .deal-next-action { align-items:flex-start; flex-direction:column; } .deal-next-action__links { flex-wrap:wrap; } }

/* Flat read views share the native profile forms and source-history writers. */
.profile-row-panel{border:0;border-top:2px solid #203c59;border-bottom:1px solid #d8e2ec;border-radius:0;padding:0 12px 12px;box-shadow:none}
.profile-row-panel>.panel-heading{padding:12px 0 8px;margin:0}
.profile-display-table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:14px;min-width:0}
.profile-display-table col:nth-child(1){width:26%}.profile-display-table col:nth-child(2){width:47%}.profile-display-table col:nth-child(3){width:27%}
.profile-display-table th,.profile-display-table td{padding:5px 8px;border-bottom:1px solid #d8e2ec;text-align:left;vertical-align:top;overflow-wrap:anywhere;white-space:normal;font-weight:400;line-height:1.4}
.profile-display-table thead th{background:#f7f9fc;color:#52667b;border-top:1px solid #d8e2ec;font-size:12px;font-weight:600}
.profile-display-table tbody th{color:#52667b;font-size:13px}.profile-display-table .profile-display-group th{padding:11px 8px 6px;background:#f7f9fc;color:#203c59;font-weight:600}
.profile-value-status{display:inline;margin-left:7px;color:#627589;font-size:12px}.profile-field-source small{display:inline;margin-left:7px;color:#627589;font-size:12px}.profile-field-source{font-size:12px}.profile-field-source a{text-underline-offset:3px}
.profile-editor{margin:0 0 10px}.profile-editor>summary{width:fit-content;margin-left:auto;border:1px solid #b8c8d8;border-radius:4px;padding:6px 12px;font-size:13px;cursor:pointer;color:#203c59;background:#fff}
.profile-editor[open]~.profile-display-table{display:none}.profile-editor[open]~.profile-sources{display:none}.profile-editor>form>.panel{border:0;box-shadow:none;padding:12px 0;margin-bottom:12px}
.profile-row-panel>.profile-sources{margin-top:12px}.profile-row-panel>.profile-sources>summary{font-size:13px;cursor:pointer}
@media(max-width:700px){.profile-display-table col:nth-child(1){width:28%}.profile-display-table col:nth-child(2){width:43%}.profile-display-table col:nth-child(3){width:29%}}
@media(max-width:460px){.profile-display-table,.profile-display-table tbody{display:block}.profile-display-table colgroup{display:none}.profile-display-table thead{display:block}.profile-display-table thead tr{display:grid;grid-template-columns:36% 64%}.profile-display-table thead th:nth-child(3){display:none}.profile-display-table tbody tr{display:grid;grid-template-columns:36% 64%;border-bottom:1px solid #d8e2ec}.profile-display-table tbody th{grid-row:span 2}.profile-display-table tbody td,.profile-display-table tbody th{border:0;padding:5px 6px}.profile-display-table .profile-field-source{grid-column:2;padding-top:0}.profile-display-table .profile-field-source:before{content:'Source: ';color:#627589}.profile-display-table .profile-display-group th{grid-column:1/-1}.profile-row-panel{padding-left:8px;padding-right:8px}}
@media(pointer:coarse){.profile-editor>summary{min-height:44px;padding:10px 12px}}

/* Optional source comparisons use the document register's compact rows. */
.discrepancy-heading{margin-bottom:16px}.discrepancy-heading p{font-size:13px}
.discrepancy-register{padding:12px 14px}.discrepancy-register table,.discrepancy-source-table{table-layout:fixed;font-size:13px}
.discrepancy-register th,.discrepancy-register td,.discrepancy-source-table th,.discrepancy-source-table td{padding:8px;vertical-align:top;overflow-wrap:anywhere;white-space:normal}
.discrepancy-register thead th{width:24%}.discrepancy-register thead th:nth-child(3){width:34%}.discrepancy-register thead th:last-child{width:18%}
.discrepancy-register tbody th{font-weight:500}.discrepancy-register small,.discrepancy-source-table small{display:block;margin-top:3px;font-size:12px;color:#627589;font-weight:400}
.discrepancy-source-value+.discrepancy-source-value{margin-top:9px}.discrepancy-register h2{font-size:16px}.discrepancy-history>summary,.discrepancy-explanation>summary{cursor:pointer;font-size:13px}.discrepancy-history .table-wrap{margin-top:12px}
.discrepancy-current{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px 16px;margin-bottom:14px;font-size:13px}.discrepancy-current>span,.discrepancy-current>small{color:#627589}.discrepancy-current>strong{font-weight:500;overflow-wrap:anywhere}
.discrepancy-source-panel{padding:16px}.discrepancy-source-table th:first-child{width:35%}.discrepancy-source-table th:nth-child(2){width:45%}.discrepancy-source-table th:last-child{width:20%}
.discrepancy-selection-form{display:grid;gap:14px;margin-top:18px;max-width:740px}.discrepancy-selection-form label{display:grid;gap:6px;font-size:13px}.discrepancy-selection-form .input{width:100%;min-width:0}.discrepancy-explanation[open]>label{margin-top:12px}.discrepancy-selection-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px 14px}.discrepancy-selection-actions small,.discrepancy-history-note{font-size:12px;color:#627589}.discrepancy-return{font-size:13px}
.discrepancy-workflow-summary{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;padding:12px 16px;font-size:13px}.discrepancy-workflow-summary>span{color:#627589}
@media(max-width:600px){.discrepancy-register{padding:8px}.discrepancy-register th,.discrepancy-register td,.discrepancy-source-table th,.discrepancy-source-table td{padding:7px 5px;font-size:12px}.discrepancy-register small,.discrepancy-source-table small{font-size:11px}.discrepancy-source-panel{padding:12px}.discrepancy-current{align-items:flex-start}.discrepancy-selection-actions{align-items:flex-start;flex-direction:column}}

/* Field-specific saved values and their authenticated originals share one view. */
[data-extracted-source-picker]{display:grid;grid-template-columns:minmax(230px,.9fr) minmax(0,1.5fr);gap:20px;align-items:start;min-width:0;margin:14px 0}
[data-extracted-source-picker]>*,[data-source-choice],[data-source-preview-pane]{min-width:0;max-width:100%;overflow-wrap:anywhere}
[data-extracted-source-picker] [hidden]{display:none!important}
[data-extracted-source-picker] label{display:grid;gap:6px;font-size:13px}
[data-extracted-source-picker] select{width:100%;min-width:0;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
[data-source-selected-label]{margin:0;font-size:13px;line-height:1.45;overflow-wrap:anywhere;white-space:normal}
[data-extracted-source-picker] [data-source-apply]{margin-top:12px}
[data-source-preview-pane]{padding:12px;border:1px solid #d8e2ec;border-radius:8px;background:#f8fafc}
[data-extracted-source-picker] .source-preview-toolbar,[data-extracted-source-picker] .source-preview-navigation{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px}
[data-extracted-source-picker] .source-preview-toolbar{justify-content:space-between}
[data-extracted-source-picker] .source-preview-toolbar strong{font-size:15px}
[data-extracted-source-picker] .source-preview-viewport{max-height:60vh;max-width:100%;overflow:auto;overscroll-behavior:contain}
[data-source-choice] form{display:grid;gap:10px}
[data-source-choice] form>small{font-size:12px;color:#627589}
[data-source-preview-pane] h2,[data-source-preview-pane] h3{margin:0 0 10px;font-size:15px}
[data-source-preview-pane] [data-source-preview]{display:block;width:100%;max-width:100%;height:auto;border:1px solid #d8e2ec;background:#fff}
[data-source-preview-pane] [data-source-preview-text]{max-height:55vh;max-width:100%;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;padding:12px;border:1px solid #d8e2ec;background:#fff;font:13px/1.5 ui-monospace,monospace}
[data-source-preview-status]{margin:8px 0;font-size:13px;color:#42586c}
[data-source-preview-page],[data-source-value-page]{font-size:12px;color:#627589}
[data-source-preview-back],[data-source-preview-next],[data-source-preview-retry]{margin:6px 6px 6px 0}
[data-source-original]{display:inline-block;margin:8px 0;font-size:13px;text-underline-offset:3px}
@media(max-width:760px){[data-extracted-source-picker]{grid-template-columns:minmax(0,1fr);gap:14px}[data-source-preview-pane]{padding:10px}[data-extracted-source-picker] .source-preview-viewport,[data-source-preview-pane] [data-source-preview-text]{max-height:45vh}}
@media(pointer:coarse){[data-extracted-source-picker] select,[data-source-preview-back],[data-source-preview-next],[data-source-preview-retry]{min-height:44px}}

/* Compact profile choices reuse the field picker and load previews on demand. */
.profile-display-table .profile-inline-source{display:block;margin:0;min-width:0}
.profile-inline-source [data-source-choice] form{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:5px;margin:0}
.profile-inline-source [data-source-choice] label{min-width:0;gap:0}
.profile-inline-source form>[role=alert],.profile-inline-source form>.save-pending{grid-column:1/-1;margin:4px 0}
.profile-inline-source select{font-size:12px;line-height:1.4;padding:4px 5px;min-height:29px}
.profile-inline-source [data-source-apply]{margin:0!important;padding:4px 7px;min-width:0;min-height:29px;font-size:12px;line-height:1.4}
.profile-source-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.profile-source-preview{margin-top:4px;font-size:12px}
.profile-source-preview>summary{width:fit-content;cursor:pointer;color:#203c59;text-decoration:underline;text-underline-offset:3px}
.profile-source-preview [data-source-preview-pane]{margin-top:7px;padding:8px}
.profile-source-preview .source-preview-toolbar strong{font-size:13px}
.profile-source-preview .source-preview-navigation{gap:4px}
.profile-source-preview [data-source-selected-label],.profile-source-preview [data-source-value-page],.profile-source-preview [data-source-preview-status]{font-size:12px}
.profile-inline-source .source-address-scope{grid-column:1/-1;font-size:12px}
.profile-source-history{margin-top:4px;font-size:12px}
.profile-source-history a{display:inline-block;margin:4px 7px 0 0}
.profile-source-history small{display:block;margin:3px 0}
.profile-field-source.has-inline-source:before{content:none}
@media(pointer:coarse){.profile-inline-source select,.profile-inline-source [data-source-apply],.profile-source-preview>summary,.profile-source-history>a{min-height:44px}.profile-source-preview>summary,.profile-source-history>a{padding:10px 0}}
