/* A page workspace: constraints above, conversation and verified outcome side by side. */
.lsa-workspace { width: 100%; min-width: 0; color: #243a31; font: 15px/1.6 var(--font-main, "Pretendard", sans-serif); }
.lsa-workspace *, .lsa-workspace *::before, .lsa-workspace *::after { box-sizing: border-box; }
.lsa-workspace [hidden] { display: none !important; }
.lsa-workspace h2, .lsa-workspace h3, .lsa-workspace h4, .lsa-workspace p, .lsa-workspace legend { margin: 0; text-align: left; }
.lsa-workspace button, .lsa-workspace input, .lsa-workspace textarea { font: inherit; }
.lsa-workspace button { cursor: pointer; }
.lsa-workspace button:disabled { opacity: .45; cursor: not-allowed; }
.lsa-workspace :is(button, input, textarea, summary):focus-visible { outline: 2px solid #197548; outline-offset: 3px; }
.lsa-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.lsa-header h2 { font-size: 22px; font-weight: 750; }
.lsa-header-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
#lsa-description { color: #5a6e63; margin-top: 3px; font-size: 15px; }
.lsa-primary, .lsa-secondary { min-height: 40px; padding: 8px 15px; border-radius: 5px; border: 1px solid #197548; font-size: 15px !important; font-weight: 650; }
.lsa-primary { background: #197548; color: #fff; }
.lsa-secondary { background: #fff; color: #315d46; border-color: #bdcfc4; }
.lsa-text-button { padding: 5px 0; border: 0; background: transparent; color: #246545; font-size: 14px !important; font-weight: 650; }
.lsa-text-button:hover:enabled { text-decoration: underline; }
.lsa-primary:hover:enabled { background: #115c38; }
.lsa-secondary:hover:enabled, .lsa-examples button:hover:enabled { background: #edf5f0; }
.lsa-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 12px 16px; background: #f3f7f4; }
.lsa-funds { flex: 1; min-width: min(320px, 100%); margin: 0; border: 0; padding: 0; }
.lsa-funds legend, .lsa-buffer { font-size: 14px; color: #365445; font-weight: 650; }
.lsa-funds > div { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 5px; }
.lsa-funds label { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; font-size: 14px; }
.lsa-workspace input[type="checkbox"] { flex: 0 0 16px; width: 16px; height: 16px; min-height: 0; margin: 0; accent-color: #197548; }
.lsa-buffer { flex: 0 0 208px; }
.lsa-buffer span { color: #627769; font-weight: 400; margin-left: 5px; }
.lsa-buffer input { display: block; width: 100%; height: 38px; padding: 5px 10px; margin-top: 5px; border: 1px solid #b4cdbd; border-radius: 4px; background: #fff; text-align: right; color: #243a31; font-size: 16px; }
#lsa-buffer-help { font-size: 13px; color: #587060; }
.lsa-context-line { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin: 8px 0 20px; }
#lsa-context { color: #63786b; font-size: 13px; }
.lsa-notice { margin: 10px 0 16px; padding: 10px 12px; border-left: 3px solid #b7762b; background: #fff6e9; color: #82511f; }
.lsa-notice[data-kind="info"] { border-color: #669b7b; background: #f0f7f2; color: #346d4e; }
.lsa-planning-grid { display: grid; grid-template-columns: minmax(330px, .85fr) minmax(0, 1.25fr); gap: 28px; align-items: start; }
.lsa-conversation, .lsa-review { min-width: 0; }
.lsa-conversation { padding-right: 26px; border-right: 1px solid #dae5dd; }
.lsa-section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.lsa-section-heading h3 { color: #294d3b; font-size: 17px; font-weight: 750; }
.lsa-section-heading > span { color: #65796d; font-size: 13px; }
.lsa-welcome { padding: 18px 0 12px; }
.lsa-welcome strong { font-size: 19px; }
.lsa-welcome p { margin-top: 6px; color: #587060; }
.lsa-messages { max-height: clamp(240px, 38dvh, 440px); overflow: auto; overscroll-behavior: contain; padding-right: 6px; }
.lsa-message { margin-bottom: 16px; padding: 8px 0; }
.lsa-message strong { color: #5a7363; font-size: 13px; }
.lsa-message p { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 4px; font-size: 15px; line-height: 1.7; }
.lsa-message-user { border-left: 2px solid #afcdbb; padding-left: 12px; }
.lsa-examples { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 0 14px; }
.lsa-examples button { border: 1px solid #d1dfd6; border-radius: 16px; background: #fff; color: #3c624c; padding: 5px 10px; font-size: 14px; }
.lsa-composer { margin: 0; }
.lsa-composer textarea { width: 100%; display: block; resize: vertical; min-height: 106px; max-height: 220px; padding: 12px; border: 1px solid #91b7a0; border-radius: 6px; background: #fff; color: #243a31; font-size: 15px; line-height: 1.6; }
.lsa-composer textarea::placeholder { color: #677e6e; }
.lsa-composer > div { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; }
.lsa-composer > div > span { color: #687c70; font-size: 13px; }
.lsa-job-status { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
#lsa-progress { color: #607566; font-size: 13px; }
.lsa-empty-review { padding: 18px 0 12px; }
.lsa-empty-review h4 { font-size: 19px; font-weight: 650; }
.lsa-empty-review p { margin-top: 12px; color: #587060; }
.lsa-next-step { margin: 10px 0 16px; }
#lsa-next-description { margin-bottom: 10px; color: #617868; font-size: 14px; }
.lsa-decision { padding: 12px 0 0; border-top: 3px solid #96a69c; }
.lsa-decision > strong { font-size: 22px; }
.lsa-decision > p { margin-top: 5px; color: #5b7163; }
.lsa-decision[data-tone="success"] { border-color: #298455; }
.lsa-decision[data-tone="success"] > strong, [data-tone="success"]#lsa-review-state { color: #197548; }
.lsa-decision[data-tone="warning"] { border-color: #be8036; }
.lsa-decision[data-tone="warning"] > strong, #lsa-sale-pnl[data-tone="warning"] { color: #a15922; }
.lsa-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0; padding-bottom: 16px; border-bottom: 1px solid #dae5dd; }
.lsa-metrics dt { font-size: 14px; color: #5b7263; }
.lsa-metrics dd { margin: 5px 0 0; font-size: clamp(20px, 1.6vw, 28px); font-weight: 750; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.lsa-trial-review { margin: 20px 0; }
.lsa-plan { margin-top: 16px; }
.lsa-plan-summary { margin: 8px 0; color: #5a7162; font-size: 14px; }
.lsa-table-scroll { overflow: auto; overscroll-behavior: contain; border-top: 1px solid #d4dfd7; border-bottom: 1px solid #d4dfd7; }
.lsa-candidate-scroll { max-height: 350px; }
.lsa-plan-scroll { max-height: 380px; }
.lsa-workspace table { width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.lsa-workspace caption { text-align: left; color: #506d5b; font-size: 14px; padding: 8px 0; }
.lsa-workspace th { position: sticky; top: 0; z-index: 1; padding: 9px 10px; background: #f3f6f4; color: #4e6958; font-size: 13px; font-weight: 650; white-space: nowrap; text-align: left; border-bottom: 1px solid #dce5df; }
.lsa-workspace td { padding: 10px; text-align: left; border-bottom: 1px solid #e8eee9; vertical-align: middle; }
.lsa-workspace tr:last-child td { border-bottom: 0; }
.lsa-workspace td strong { display: block; font-weight: 600; min-width: 82px; overflow-wrap: anywhere; }
.lsa-workspace td small { display: block; color: #667b6d; font-size: 13px; margin-top: 2px; }
.lsa-workspace .lsa-number { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lsa-workspace .lsa-empty { padding: 18px 10px; color: #667b6d; }
.lsa-disclosure { margin-top: 12px; border-bottom: 1px solid #e0e8e2; padding-bottom: 8px; }
.lsa-disclosure > summary { padding: 8px 0; cursor: pointer; color: #385b45; font-size: 15px; font-weight: 600; }
.lsa-disclosure > summary span { margin-left: 8px; color: #687d6e; font-size: 13px; font-weight: 400; }
.lsa-criteria, .lsa-helper { margin: 8px 0 !important; color: #5c7364; font-size: 14px; }
.lsa-candidate-tools { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 10px 0; font-size: 13px; color: #687d6e; }
.lsa-candidate-tools label { display: flex; align-items: center; gap: 5px; font-size: 14px; color: #42644d; }
.lsa-gaps { padding: 12px 0; color: #915c2a; }
.lsa-gaps ul { max-height: 180px; overflow: auto; }
.lsa-agent-review { padding-bottom: 20px; }
.lsa-agent-current { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; padding: 12px 14px; background: #eef5f0; border-left: 3px solid #197548; }
.lsa-agent-current strong { font-size: 15px; }
.lsa-agent-current > span { color: #65776c; font-size: 13px; font-variant-numeric: tabular-nums; }
.lsa-agent-timeline { list-style: none; margin: 16px 0 0; padding: 0; }
.lsa-agent-step { margin: 0 0 12px; padding: 14px 16px; border: 1px solid #dce6df; border-left: 3px solid #a5bbad; border-radius: 6px; overflow-wrap: anywhere; }
.lsa-agent-step[data-status="running"] { border-left-color: #197548; background: #f5faf7; }
.lsa-agent-step[data-status="error"] { border-left-color: #b57632; background: #fffaf3; }
.lsa-agent-step-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin-bottom: 6px; }
.lsa-agent-step-heading strong { font-size: 15px; color: #2c4939; }
.lsa-agent-badge { font-size: 12px; padding: 1px 7px; border-radius: 4px; background: #edf2ee; color: #52705c; }
.lsa-agent-step[data-status="running"] .lsa-agent-badge { background: #dcefe2; color: #17613d; }
.lsa-agent-step[data-status="error"] .lsa-agent-badge { background: #f8e8d2; color: #84531d; }
.lsa-agent-duration { margin-left: auto; color: #748378; font-size: 13px; }
.lsa-agent-step p, .lsa-agent-facts { color: #5c7063; font-size: 14px; }
.lsa-agent-step .lsa-agent-purpose { color: #304e3b; margin-bottom: 5px; }
.lsa-agent-facts { margin: 8px 0; padding-left: 20px; }
.lsa-agent-evidence { margin-top: 8px; min-width: 0; }
.lsa-agent-evidence summary { color: #326149; cursor: pointer; font-size: 14px; }
.lsa-agent-evidence .lsa-table-scroll { margin-top: 8px; }
.lsa-warnings { color: #657769; font-size: 13px; margin: 8px 0; padding-left: 20px; }
.lsa-footer { margin-top: 14px; padding: 14px 0; border-top: 1px solid #d4dfd7; }
#lsa-apply-help { color: #5c7364; font-size: 14px; margin-bottom: 10px; }
.lsa-footer > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.lsa-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.lsa-plan, #liquidity-preview-section { scroll-margin-top: 160px; }
#tab2 #subtab-liquidity { height: auto; min-height: 0; overflow: visible; }
#tab2 #liquidity-preview-section { margin-top: 28px; padding: 18px 0 0; border: 0; border-top: 1px solid #cfded4; border-radius: 0; box-shadow: none; background: transparent; }
#tab2 #liquidity-preview-section h3 { font-size: 18px; }
#tab2 #liquidity-preview-section :is(.scenario-preview-fund, .premium-radio-chip, .scenario-liquidity-status, .scenario-liquidity-warning p) { font-size: 15px; }
@media (max-width: 1050px) {
    .lsa-planning-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .lsa-conversation { padding: 0 0 20px; border-right: 0; border-bottom: 1px solid #dae5dd; }
    .lsa-messages { max-height: 320px; }
    .lsa-header { flex-wrap: wrap; }
    #lsa-buffer-help { flex: 1; }
}
@media (max-width: 500px) {
    .lsa-controls { padding: 12px; gap: 10px; }
    .lsa-funds, .lsa-buffer { flex: 1 1 100%; }
    .lsa-metrics { gap: 8px; }
    .lsa-metrics dt { font-size: 13px; }
    .lsa-metrics dd { font-size: 20px; }
    .lsa-workspace th, .lsa-workspace td { padding: 8px 6px; }
}

#liquidity-preview-empty { padding: 20px 0; color: #62776a; font-size: 15px; }
#tab2 #liquidity-preview-section .scenario-liquidity-chart:has(#liquidity-preview-empty:not([hidden])) { height: auto; min-height: 80px; }
