#tab2 .simulation-workflow { grid-template-columns:repeat(2,minmax(0,1fr)); }
#tab2 .simulation-workspace-description, #tab2 .simulation-stage-arrow { display:none; }
#tab2 .simulation-workspace-header { margin-bottom:14px; }
.sx-launch { display:flex; justify-content:flex-end; margin-bottom:18px; }
#tab2 .sx-launch #btn-run-simulation { width:auto; background:#176b48; min-width:180px; height:38px; padding:0 20px; font-size:13px; line-height:20px; display:inline-flex; align-items:center; justify-content:center; }
#simulation-explorer-host { color:#263f32; min-width:0; }
.sx-toolbar,.sx-heading,.sx-pages,.sx-detail-controls { display:flex; align-items:end; gap:12px; flex-wrap:wrap; }
.sx-toolbar { margin-bottom:16px; }
.sx-toolbar>div:first-child { min-width:230px; }
.sx-toolbar label,.sx-heading label,.sx-detail-controls label { display:block; font-size:12px; line-height:18px; color:#63796b; }
.sx-toolbar select,.sx-heading select,.sx-heading input,.sx-detail-controls input,.sx-detail-controls select { display:block; border:1px solid #cad8cf; background:white; color:#284b38; border-radius:5px; box-sizing:border-box; height:38px; min-height:38px; margin-top:6px; padding:0 12px; font:inherit; font-size:13px; line-height:20px; max-width:100%; }
.sx-button { border:1px solid #c9d9cf; border-radius:5px; background:#fff; color:#305a42; box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; height:38px; padding:0 14px; font:inherit; font-size:13px; line-height:20px; cursor:pointer; white-space:nowrap; }
.sx-button:hover { background:#edf5ef; }.sx-button:disabled { opacity:.45;cursor:default; }
.sx-link { border:0; background:none; color:#1d6849; font:inherit; font-weight:600; text-align:left; padding:0; cursor:pointer; text-decoration:underline; text-underline-offset:3px; }
#simulation-explorer-host button:focus-visible,.sx-dialog button:focus-visible { outline:2px solid #24865e; outline-offset:3px; }
#sx-context { margin-left:auto; font-size:12px; color:#76897c; align-self:flex-end; min-height:38px; display:flex; align-items:center; }
#sx-message,#sx-holdings-message,#sx-detail-status { font-size:13px; line-height:1.6; margin:10px 0; color:#657b6c; }
#sx-message:empty,#sx-holdings-message:empty { display:none; }
.sx-error { color:#b2462f !important; }.sx-notice { background:#fff7e9; border-left:3px solid #bd862c; padding:12px;font-size:13px; }
.sx-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:14px 0 18px; }
.sx-metric { background:white; border:1px solid #d4e1d9; border-radius:7px; padding:16px 18px; }
.sx-metric span { display:block;font-size:12px;color:#637b6b;margin-bottom:8px; }.sx-metric strong{font-size:25px;font-weight:650;font-variant-numeric:tabular-nums;}.sx-metric small{font-size:12px;margin-left:7px;color:#7c8b80;}
.sx-card { background:#fff; border:1px solid #d4e1d9; border-radius:8px; padding:20px; margin-bottom:18px; min-width:0; }
.sx-heading { align-items:flex-end;margin-bottom:16px; }.sx-heading>div:first-child{margin-right:auto;align-self:center;}.sx-heading h3{font-size:16px;margin:0 0 5px;}.sx-heading p{font-size:12px;color:#6c7f71;margin:0;}.sx-search{min-width:220px;}
.sx-chart { height:280px;position:relative;overflow:hidden;margin:10px 0 20px; }
.sx-table-scroll { overflow:auto; max-height:520px; border:1px solid #e0e8e2; border-radius:5px; }
.sx-month-scroll{max-height:330px;}
.sx-table-scroll table { border-collapse:separate; border-spacing:0; width:100%; font-size:12px; font-variant-numeric:tabular-nums; }
.sx-table-scroll th { background:#eff5f1;position:sticky;top:0;z-index:2;color:#526c5b;text-align:right;white-space:nowrap;padding:11px 13px;border-bottom:1px solid #d5e2d8;font-weight:600; }
.sx-table-scroll td { padding:10px 13px;border-bottom:1px solid #e7ede9;text-align:right;white-space:nowrap; }
.sx-table-scroll th:first-child,.sx-table-scroll td:first-child {text-align:left;position:sticky;left:0;background:#fff;z-index:1;max-width:330px;}
.sx-table-scroll th:first-child{background:#eff5f1;z-index:3;}.sx-table-scroll small{display:block;font-size:10px;color:#839086;margin-top:4px;}
.sx-table-scroll tr:hover td{background:#f6faf7;}.sx-table-scroll tr.sx-selected td{background:#eaf4ee;}.sx-table-scroll .sx-link{white-space:normal;max-width:300px;overflow-wrap:anywhere;}
.sx-footnote {font-size:11px;line-height:1.6;color:#718777;margin:10px 0 0;}
.sx-pages {justify-content:flex-end;align-items:center;font-size:12px;color:#718777;margin-top:12px;}.sx-pages>span:first-child{margin-right:auto;}
.sx-dialog {box-sizing:border-box;margin:auto;width:min(1500px,96vw);max-width:96vw;height:92vh;max-height:92vh;border:1px solid #c8d9ce;border-radius:10px;padding:0;color:#263f32;background:#f6f9f7;}
.sx-dialog::backdrop{background:#17372777;}.sx-dialog[open]{display:flex;flex-direction:column;}.sx-detail-header{display:flex;justify-content:space-between;align-items:center;gap:20px;background:white;padding:20px 24px;border-bottom:1px solid #dbe5de;}.sx-detail-header h3{margin:0 0 5px;font-size:19px;overflow-wrap:anywhere;}.sx-detail-header p{margin:0;color:#748578;font-size:12px;overflow-wrap:anywhere;}.sx-detail-body{overflow:auto;padding:0 24px 24px;min-height:0;}.sx-detail-chart{height:250px;background:white;border-radius:6px;}.sx-daily-scroll{max-height:440px;}
.sx-events{background:white;border:1px solid #dbe5de;border-radius:6px;padding:12px 16px;margin:14px 0;}.sx-events summary{cursor:pointer;font-size:13px;font-weight:600;}.sx-events>div{max-height:180px;overflow:auto;margin-top:12px;}.sx-event{display:flex;gap:16px;padding:7px 0;border-bottom:1px solid #edf1ee;font-size:12px;line-height:1.5;}.sx-event time{flex-shrink:0;color:#63836d;}.sx-event span{overflow-wrap:anywhere;}
#simulation-explorer-host [hidden],.sx-dialog [hidden]{display:none!important;}
@media(max-width:900px){.sx-metrics{grid-template-columns:repeat(2,minmax(0,1fr));}.sx-heading>div:first-child{width:100%;}.sx-card{padding:14px;}#sx-context{width:100%;margin-left:0;}}
@media(max-width:540px){.sx-detail-body{padding:0 12px 12px;}.sx-detail-header{padding:14px;}.sx-toolbar>div{width:100%;}.sx-toolbar select{width:100%;}.sx-metric{padding:12px;}.sx-metric strong{font-size:19px;}.sx-card{padding:10px;}.sx-detail-controls{gap:8px;}.sx-chart{height:230px;}.sx-event{flex-direction:column;gap:3px;}}

#sx-differences{overflow:auto;max-height:240px;}#sx-differences table{font-size:12px;width:100%;border-collapse:collapse;}#sx-differences td,#sx-differences th{padding:6px 10px;text-align:right;white-space:nowrap;}

.sx-chart canvas{max-width:100%;}
.sx-result-identity { display:flex; flex-direction:column; gap:5px; max-width:100%; }
.sx-result-identity>span,.sx-result-identity>small { font-size:12px; color:#63796b; }
.sx-result-identity>strong { font-size:15px; color:#244833; overflow-wrap:anywhere; }
#simulation-report-host [hidden] { display:none!important; }
.sh-dialog { width:min(780px,94vw); height:auto; max-height:85vh; }
.sh-search { display:flex; align-items:end; gap:10px; flex-wrap:wrap; margin:18px 0; }
.sh-search label { width:100%; font-size:12px; color:#63796b; }
.sh-search input { flex:1; min-width:120px; border:1px solid #cad8cf; border-radius:5px; padding:9px; font:inherit; }
#sh-message { font-size:13px; line-height:1.6; color:#63796b; }
.sh-item { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:15px 0; border-bottom:1px solid #dbe5de; }
.sh-item>div { min-width:0; }.sh-item strong { font-size:14px; overflow-wrap:anywhere; }
.sh-item p { font-size:12px; color:#63796b; margin:7px 0 0; }
@media(max-width:540px){.sh-item { align-items:start; flex-direction:column; }.sh-search input { width:100%; flex-basis:100%; }}

/* Keep labeled fields and actions on a shared control baseline. */
#simulation-explorer-host #btn-save-result { height:38px; min-width:112px; padding:0 14px; }
#simulation-explorer-host .result-save-actions { gap:12px; flex-wrap:wrap; }
#simulation-explorer-host .result-save-panel { gap:16px; }
#sx-fund { min-width:180px; }
#sx-chart-mode { min-width:200px; }
.sx-heading>label, .sx-detail-controls>label { min-width:140px; }
.sx-heading>label select, .sx-heading>label input { width:100%; }
@media(max-width:900px) {
    #simulation-explorer-host .result-save-panel { flex-wrap:wrap; }
    #sx-context { min-height:0; }
}
@media(max-width:540px) {
    #tab2 .sx-launch #btn-run-simulation { width:100%; }
    .sx-toolbar>.sx-button { flex:1 1 auto; }
    .sx-heading>label, .sx-detail-controls>label { flex:1 1 140px; min-width:0; }
    .sx-heading>.sx-search { flex-basis:100%; }
    #sx-fund, #sx-chart-mode { min-width:0; }
    #simulation-explorer-host .result-save-actions { width:100%; }
    #simulation-explorer-host .result-save-actions>.sx-button { flex:1 1 auto; }
    #simulation-explorer-host #result-save-status { flex-basis:100%; width:fit-content; }
}

.sx-history-toggle { display:flex; align-items:center; gap:8px; margin:16px 0 8px; font-size:13px; color:#365b44; }
.sx-history-toggle input { width:16px; height:16px; accent-color:#24674b; }

.sx-chart-toggles { display:flex; flex-wrap:wrap; column-gap:24px; row-gap:0; }
