/* v0.9.72: a view-only, independently scrollable comparison surface. */
.lpc{min-width:0}.lpc [hidden]{display:none!important}.lpc-card{padding:20px;margin-bottom:16px;min-width:0}.lpc-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;flex-wrap:wrap}.lpc-heading h2{font-size:21px;margin:4px 0 8px}.lpc-heading p,.lpc-note{font-size:12px;line-height:1.6;color:#647384}.lpc-source{margin:15px 0;padding:12px 14px;border:1px solid #d8e1e5;background:#f6f8fa;font-size:13px;line-height:1.5;overflow-wrap:anywhere}.lpc-settings{border:1px solid #e0e5eb}.lpc-settings>summary{padding:13px 14px;font-weight:700;cursor:pointer;background:#f9fafb}.lpc-settings>div,.lpc-settings>p,.lpc-settings>label{margin:12px 14px}.lpc-config{display:grid;grid-template-columns:1fr 1fr;gap:16px}.lpc-config label{display:grid;gap:7px;font-size:12px}.lpc-config select,.lpc-config input{width:100%;min-height:38px;padding:7px 10px;border:1px solid #d5dce3;border-radius:5px}.lpc-config small{font-size:11px;color:#6c7987;line-height:1.5}.lpc-disclosure{font-size:12px;line-height:1.65;background:#f5f7f9;padding:10px}.lpc-confirm{display:flex;gap:10px;align-items:flex-start;padding:12px;background:#fff5dc;border:1px solid #ebd095;font-size:12px;line-height:1.6}.lpc input[type=checkbox]{width:16px;height:16px;accent-color:#b47c12;flex:0 0 16px}.lpc-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.lpc-choice{display:flex;gap:9px;align-items:flex-start;padding:11px;border:1px solid #dde4ea;border-radius:5px;cursor:pointer;font-size:12px;min-width:0}.lpc-choice b{display:block;margin-bottom:5px}.lpc-choice small{font-size:11px;color:#6d7a88;line-height:1.5;display:block}.lpc-toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:15px 0 8px}.lpc-toolbar label{display:flex;gap:10px;align-items:center;font-size:12px}.lpc-toolbar select{padding:6px 9px;min-height:33px;border:1px solid #d6dce3}.lpc-status{padding:12px 14px;background:#eef6f3;border:1px solid #cee4dc;color:#275c4e;font-size:12px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}.lpc-status.warn{background:#fff5df;border-color:#e8c987;color:#7e5816}.lpc-status.error{background:#fff0ed;border-color:#e3b5ae;color:#982e26}.lpc-reference{padding:12px 0;font-size:12px;line-height:1.7}.lpc-table-scroll{overflow:auto;max-height:650px;border:1px solid #dce3e9;max-width:100%;isolation:isolate}.lpc-table{border-collapse:separate;border-spacing:0;font-size:12px;min-width:1200px;width:100%;font-variant-numeric:tabular-nums}.lpc-table th,.lpc-table td{padding:12px;border-right:1px solid #e4e9ed;border-bottom:1px solid #e4e9ed;vertical-align:top;text-align:right;min-width:135px;max-width:190px;overflow-wrap:anywhere}.lpc-table th{position:sticky;top:0;background:#f2f4f6;color:#485968;z-index:2;text-align:right;line-height:1.45;font-weight:650}.lpc-table th:first-child,.lpc-table td:first-child{position:sticky;left:0;text-align:left;width:250px;min-width:250px;max-width:250px;background:#fff;z-index:1}.lpc-table th:first-child{z-index:3;background:#f2f4f6}.lpc-table tr.base td{background:#edf3f8}.lpc-table td.better{background:#eaf6f0;color:#166449}.lpc-table td.worse{background:#fff0eb;color:#963d26}.lpc-table b{white-space:nowrap}.lpc-table small{display:block;margin-top:5px;font-size:10px;line-height:1.45;color:#667585}.lpc-row-button{padding:0;border:0;background:transparent;color:#80590f;text-align:left;font-size:12px;line-height:1.5;font-weight:700;cursor:pointer;text-decoration:underline;text-underline-offset:3px}.lpc-table .pending{color:#6f7e8b;background:#f9fafb}.lpc-tag{display:inline-block;font-size:10px;line-height:1.4;background:#e7efe9;color:#277159;padding:3px 5px;margin-top:6px}.lpc-tag.bad{background:#ffeae2;color:#984b22}.lpc-stale .lpc-table{opacity:.65}.lpc-dialog{width:min(1140px,calc(100vw - 32px));max-width:1140px;max-height:calc(100vh - 40px);padding:0;border:1px solid #cfd8df;border-radius:10px;box-shadow:0 20px 65px #14233850;overflow:hidden}.lpc-dialog::backdrop{background:#24314170;backdrop-filter:blur(2px)}.lpc-dialog header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px;border-bottom:1px solid #dce2e7}.lpc-dialog header h2{font-size:20px;margin:0}.lpc-dialog-body{padding:18px;overflow:auto;max-height:calc(100vh - 150px);font-size:13px;line-height:1.6}.lpc-dialog-body .lpc-table{min-width:640px}.lpc-dialog-body details{margin-top:14px}.lpc-dialog-body summary{cursor:pointer;font-weight:650;padding:9px;background:#f5f7f9}.lpc-dialog-body .lpc-table th:first-child,.lpc-dialog-body .lpc-table td:first-child{width:auto;min-width:115px}.lpc-dialog-body .lpc-table-scroll{max-height:480px}.lpc-invalid{padding:12px;background:#fff2dc;border:1px solid #e7c899;white-space:pre-wrap}.lpc-button-slim{padding:4px;border:0;background:transparent;text-decoration:underline;cursor:pointer}.lpc-reference strong{color:#314555}#lpcProgress{font-size:12px;color:#647688;line-height:1.5;max-width:420px}#lpcResultsCard h2{font-size:19px}@media(max-width:1050px){.lpc-choices{grid-template-columns:1fr}.lpc-config{grid-template-columns:1fr}.lpc-card{padding:14px}.lpc-table th:first-child,.lpc-table td:first-child{min-width:210px;width:210px;max-width:210px}}@media(max-width:600px){.lpc-toolbar label{align-items:flex-start;flex-direction:column;gap:4px}.lpc-dialog{width:calc(100vw - 12px)}.lpc-dialog header{padding:12px}.lpc-dialog-body{padding:10px}.lpc-heading h2{font-size:18px}}@media print{.lpc-settings,.lpc-toolbar,.lpc-heading>a,#lpcExport{display:none}.lpc-table-scroll{overflow:visible;max-height:none}.lpc-table th{position:static}.lpc-table{font-size:8px;min-width:0}.lpc-table th,.lpc-table td{min-width:0;padding:4px}.lpc-table th:first-child,.lpc-table td:first-child{position:static;min-width:110px;width:110px}}

/* Keep the wide matrix INSIDE a shrinkable panel, not a third page width. */
#scenarioLandPaymentPanel,#lpcResultsCard{width:100%;max-width:100%;min-width:0;box-sizing:border-box}
.lpc-config{grid-template-columns:repeat(2,minmax(0,1fr))}
.lpc-config label,.lpc-config input,.lpc-config select,.lpc-heading>div{min-width:0;max-width:100%}
#scenarioLandPaymentPanel{overflow:clip}
#lpcMatrix{width:100%;min-width:0;max-width:100%;contain:inline-size}
.lpc-advance-setting{padding:14px;margin:12px 0;background:#fff8e9;border:1px solid #e7cb8b;display:grid;grid-template-columns:minmax(180px,auto) 130px;gap:8px 16px;align-items:center}
.lpc-advance-setting input{background:#fff5d2;border:1px solid #d7aa55;border-radius:5px;font-size:17px;padding:9px 11px;min-width:0;width:100%;box-sizing:border-box}
.lpc-advance-setting input:invalid{border-color:#bf3939}
.lpc-advance-setting .lpc-note{grid-column:1/-1;margin:0}
.lpc-ratio-help{background:#f5f7fa;padding:11px 13px}
@media(max-width:1050px){.lpc-config{grid-template-columns:minmax(0,1fr)}}
@media(max-width:600px){.lpc-advance-setting{grid-template-columns:minmax(0,1fr)}.lpc-advance-setting input{max-width:160px}}
/* Existing shell enforces 1120px. Only the new matrix route opts into 780px. */
body:has(#tab-scenario.active #scenarioLandPaymentPanel:not(.hidden)){min-width:780px}

/* v0.9.73: settings and explicit copy action stay local to the matrix. */
.lpc-run-config{padding:14px 0}.lpc-mode-tag{display:block;width:max-content;max-width:100%;background:#fff3d8;color:#765315}
.lpc-save-footer{padding:14px 18px;border-top:1px solid #dce2e7;background:#fbfcfd;max-height:42vh;overflow:auto}
.lpc-save-footer label{display:grid;gap:5px;font-size:12px}.lpc-save-footer input,.lpc-save-footer textarea{box-sizing:border-box;width:100%;padding:8px;border:1px solid #d5dce3;border-radius:4px}
#lpcSaveForm{display:grid;grid-template-columns:1fr 1fr;gap:8px 14px}#lpcSaveForm p{grid-column:1/-1;margin:0}#lpcSaveStatus{font-size:12px;line-height:1.5;overflow-wrap:anywhere}
.lpc-dialog:has(#lpcSaveFooter:not([hidden])) .lpc-dialog-body{max-height:45vh}.lpc-dialog [hidden]{display:none!important}
@media(max-width:780px){#lpcSaveForm{grid-template-columns:1fr}.lpc-save-footer{padding:10px}.lpc-dialog:has(#lpcSaveFooter:not([hidden])) .lpc-dialog-body{max-height:38vh}}

/* v0.9.74: table navigation is available without reaching its bottom. */
.lpc-scroll-nav{position:sticky;top:0;z-index:9;background:#fff;border:1px solid #dbe1e7;padding:8px;margin:6px 0 0;min-width:0}
.lpc-scroll-buttons{display:flex;gap:7px;flex-wrap:wrap;align-items:center}.lpc-scroll-buttons button:last-child{margin-left:auto}
#lpcTopScroll{height:21px;overflow-x:auto;overflow-y:hidden;width:100%;margin-top:5px}#lpcTopScrollWidth{height:1px}
#lpcResultsCard.lpc-fullscreen{position:fixed!important;inset:10px!important;z-index:1900;width:auto!important;height:calc(100dvh - 20px);max-width:none!important;margin:0!important;box-sizing:border-box;display:flex;flex-direction:column;background:#fff;overflow:hidden;box-shadow:0 0 0 20px #36455277}
.lpc-fullscreen #lpcReference,.lpc-fullscreen .lpc-ratio-help{display:none}.lpc-fullscreen>.lpc-heading{flex-shrink:0}.lpc-fullscreen>.lpc-toolbar{flex-shrink:0;margin:5px 0}
.lpc-fullscreen #lpcMatrix{flex:1 1 auto;min-height:120px;max-height:none!important;overflow:auto}.lpc-fullscreen #lpcScrollNav{flex-shrink:0}
.lpc-fullscreen>p.lpc-note{margin:5px 0 0;font-size:11px;flex-shrink:0}.lpc-fullscreen .lpc-heading p{display:none}
@media print{.lpc-scroll-nav{display:none!important}#lpcResultsCard.lpc-fullscreen{position:static!important;height:auto;box-shadow:none}}
/* Keep the top track visible even on overlay-scrollbar platforms. */
#lpcTopScroll{scrollbar-width:auto;scrollbar-color:#ad843c #edf0f3}
#lpcTopScroll::-webkit-scrollbar{height:14px}
#lpcTopScroll::-webkit-scrollbar-track{background:#edf0f3;border-radius:3px}
#lpcTopScroll::-webkit-scrollbar-thumb{background:#ad843c;border:2px solid #edf0f3;border-radius:6px;min-width:32px}
#lpcTopScroll::-webkit-scrollbar-thumb:hover{background:#8b641e}
