.chat-controls{display:flex;justify-content:space-between;align-items:center;margin-top:8px}
.chat-controls button{background:none;border:0;font-size:11px;padding:2px;color:#94b9af}
.chat-controls small{font-size:10px;color:#91a8bb}
.real-snapshot{grid-template-columns:1fr 1fr 1fr}
.real-snapshot>div:first-child{grid-column:1/-1}
.member-note{padding:9px 12px;border-bottom:1px solid #263e52;font-size:10px;color:#8ca7bc}
.member-note strong{color:#c6dcea;display:block;font-size:11px;margin-bottom:5px}
.member-metrics{display:flex;gap:12px;flex-wrap:wrap}
.member-metrics span{font-size:10px}
.member-metrics b{color:#bddece;margin-left:4px}
.curve-label{fill:#86a2b7;font:10px Arial}
.library-heading{display:flex;justify-content:space-between;align-items:start;gap:20px}
.library-heading p{font-size:12px;color:#8fa9be}
.library-heading button{font-size:11px}
.library-toolbar{display:flex;justify-content:space-between;align-items:center;gap:15px;margin:20px 0}
.library-tools{display:flex;gap:10px}
.library-tools input,.library-tools select{background:#102130;color:#c7dce7;border:1px solid #345065;padding:8px;border-radius:5px;font-size:12px}
.real-library{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}
.real-card{min-width:0;border:1px solid #2c455c;border-radius:6px;background:#0d1b28;padding:19px}
.card-top{display:flex;gap:6px;justify-content:space-between;align-items:center}
.card-tags{display:flex;gap:5px;flex-wrap:wrap}
.card-tag{font-size:10px;border:1px solid #375674;padding:3px 7px;border-radius:4px;color:#9ec7e5}
.real-card h3{font-size:17px;min-height:48px;overflow-wrap:anywhere;margin:14px 0 5px}
.card-quota{font-size:10px;color:#7f9ab0}
.card-return{display:flex;align-items:end;justify-content:space-between;margin:20px 0 17px;gap:10px}
.card-return small{font-size:10px;color:#94acbd;display:block}
.card-return strong{font-size:28px;font-weight:500;color:#78e4b3;display:block}
.card-spark{width:42%;height:65px}
.card-spark svg{width:100%;height:100%}
.card-metrics{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px}
.card-metrics small{display:block;font-size:10px;color:#93acbe}
.card-metrics strong{font-size:16px;color:#d2e5ee}
.card-return strong.negative,.card-metrics strong.negative{color:#f68d9c}
.card-bottom{display:flex;justify-content:space-between;gap:6px;align-items:center;margin-top:17px;padding-top:10px;border-top:1px solid #263c50;font-size:10px;color:#7894a9}
.card-bottom button{font-size:10px;padding:5px 8px}
.detail-table-wrap{overflow-x:auto}
.detail-table{font-size:11px;min-width:500px;margin:15px 0}
.detail-table th,.detail-table td{text-align:right;padding:9px}
.detail-table th:first-child,.detail-table td:first-child{text-align:left}
.detail-note{font-size:12px;color:#91adbf;white-space:pre-line;line-height:1.8}
.detail-curve{height:220px}
.detail-curve svg{width:100%;height:100%}
.interview{border:1px solid #31584e;background:#102b28;padding:13px;border-radius:6px;margin:15px 0}
.interview-summary{font-size:12px;margin:0 0 5px;color:#c0dfd3}
.interview-progress{font-size:10px;color:#87b5a5}
.interview fieldset{border:0;margin:16px 0;padding:0}
.interview legend{font-size:12px;margin-bottom:7px}
.choice-options{display:grid;gap:6px}
.choice-options label{display:flex;align-items:start;gap:8px;padding:9px;border:1px solid #36574f;border-radius:5px;font-size:12px;cursor:pointer}
.choice-options label:has(input:checked){background:#204f3e;border-color:#7ac7a0}
.choice-options input{accent-color:#77e6bd;margin:3px 0 0;flex:0 0 auto}
.option-letter{color:#8cdbb6;font-weight:bold}
.interview button{font-size:11px}
.question-hint,.interview-notice{font-size:10px;line-height:1.7;color:#88b0a4}
.recommended-questions{display:grid;gap:6px;margin:12px 0}
.recommended-questions button{text-align:left;font-size:11px;line-height:1.6;padding:9px}
.interview-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.rank-row{display:flex;justify-content:space-between;gap:8px;align-items:center;width:100%;text-align:left;padding:10px;margin:6px 0;font-size:11px}
.rank-row span{overflow-wrap:anywhere}
.rank-row b{color:#84e3b8;white-space:nowrap}
.dialog-form{display:block;border:0;background:none;padding:0}
.dialog-form textarea,.dialog-form input[type=password]{box-sizing:border-box;width:100%;background:#0c1b26;color:#d1e9ec;border:1px solid #386252;border-radius:6px;padding:12px;margin:12px 0;font-size:13px}
.dialog-form textarea{min-height:150px;resize:vertical}
.dialog-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
.dialog-notice{font-size:11px;color:#91b6a7;line-height:1.8}
.saved-card{border:1px solid #315264;padding:18px;margin:15px 0;border-radius:7px}
.saved-card small{color:#8baabf}
.saved-card p{font-size:12px}
.saved-card button{font-size:11px}
#libraryStatus{font-size:12px;color:#d9bd86;white-space:pre-line}
#messages h3{font-size:13px}
.dialog-inner{padding:20px}
.dialog-inner .dialog-form{display:block}
.dialog-inner .choice-options{margin:12px 0}
.capacity-panel{min-width:0}
.capacity-budget{display:flex;justify-content:space-between;align-items:center;font-size:10px;color:#8daac2;margin:11px 0 8px}
.capacity-budget b{color:#a1e6cd;font-size:14px;font-weight:500}
.capacity-rows{display:grid;gap:11px}
.capacity-empty{font-size:11px;color:#8daac2;min-height:87px;display:flex;align-items:center;justify-content:center;text-align:center;line-height:1.8}
.capacity-heading{display:flex;justify-content:space-between;align-items:center;gap:7px;font-size:10px;margin-bottom:5px}
.capacity-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#c1d9e8;font-weight:500}
.capacity-usage{color:#82dfb7;font-weight:500;white-space:nowrap}
.capacity-track{height:5px;background:#253b50;border-radius:1px;overflow:hidden}
.capacity-fill{height:100%;background:#83b8e9;min-width:1px}
.capacity-meta{display:flex;justify-content:space-between;flex-wrap:wrap;gap:3px 7px;margin-top:4px;color:#8fa9bf;font-size:9px;line-height:1.6}
.capacity-note{color:#7e9db6;font-size:9px;line-height:1.7;margin:10px 0 0;overflow-wrap:anywhere}
.capacity-exceeded .capacity-usage{color:#ff8799}
.capacity-exceeded .capacity-fill{background:#ff718e}
.capacity-unknown .capacity-track{background:none;border:1px dashed #476179;height:4px}
.capacity-unknown .capacity-usage{color:#e6c28b}
.overview>.capacity-panel{min-height:230px}
.portfolio .member-note{padding:8px 11px}
.portfolio .member-note>strong{margin-bottom:4px}
.portfolio .member-note{padding:6px 11px}
.portfolio .member-note>strong{font-size:10px;line-height:14px;margin-bottom:2px}
.portfolio .member-metrics{line-height:14px;gap:10px}
.live-analytics .detail-table{min-width:0;table-layout:fixed;width:100%;font-size:10px}
.live-analytics .detail-table th,.live-analytics .detail-table td{padding:9px 5px;overflow-wrap:anywhere}
@media (max-width:700px){.live-analytics .detail-table{font-size:9px}
.live-analytics .detail-table th,.live-analytics .detail-table td{padding:7px 3px}
.curve-label{font-size:10px}}
.saved-heading,.saved-member-title{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.saved-heading h3{margin:0;color:#c4ead7;font-size:17px;overflow-wrap:anywhere}
.saved-actions{display:flex;gap:8px}
.saved-actions .saved-delete{color:#efa6ac;border-color:#6b4651}
.saved-time{display:block;margin-top:10px}
.saved-period{color:#96b7bd;font-size:11px}
.saved-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:10px;margin:13px 0}
.saved-metrics small{display:block;font-size:10px;color:#93aeae}
.saved-metrics strong{display:block;font-size:16px;color:#bce7d6;margin-top:5px}
.saved-members{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));gap:12px}
.saved-member{padding:14px;border:1px solid #304c51;border-radius:6px;min-width:0;background:#0d2427}
.saved-member-name{overflow-wrap:anywhere;color:#d0e9e2}
.saved-member-weight{color:#83e7ba;white-space:nowrap}
.saved-member-category,.saved-metric-source{display:block;font-size:10px;color:#89acaa;margin-top:7px;line-height:1.8}
.saved-notice{font-size:10px!important;color:#8ca8a6;line-height:1.8}
.saved-card h4{font-size:13px;color:#bbdbd0;margin:18px 0 12px}
.matching-audit{padding:10px;border:1px solid #355a50;border-radius:6px;margin:12px 0;font-size:11px;line-height:1.8}
.matching-audit summary{cursor:pointer;color:#93debc}
.matching-audit details{margin:8px 0}
.matching-audit .detail-table{min-width:380px;font-size:10px}
.rank-row{flex-wrap:wrap}
.rank-row small{flex-basis:100%;font-size:9px;color:#9ab6ab}
.chat-portfolio-validation{font-size:11px;color:#b7dcbd;line-height:1.8;overflow-wrap:anywhere}
.chat-preference-editor{position:relative;box-sizing:border-box;min-width:0;width:100%;padding:13px;margin:15px 0;border:1px solid #5fba98;border-radius:7px;background:#102b27;color:#c7e5d8}
.chat-editor-heading{display:flex;justify-content:space-between;align-items:start;gap:10px;margin-bottom:12px}
.chat-editor-heading h3{margin:0;font-size:13px;color:#b9eed4;line-height:1.7;overflow-wrap:anywhere}
.chat-editor-heading>button{flex:0 0 auto;background:transparent;border:1px solid #426b5d;border-radius:4px;font-size:10px;padding:4px 7px;color:#a8cbb9}
.chat-editor-body .dialog-form{display:block;margin:0;min-width:0}
.chat-editor-body .choice-options{margin:10px 0}
.chat-editor-body .dialog-form textarea{margin:0 0 10px;min-height:120px;max-height:220px;font-size:12px}
.chat-editor-body .dialog-notice{font-size:10px;line-height:1.7;margin:10px 0}
.chat-editor-body .dialog-actions{gap:7px;margin-top:10px}
.chat-editor-body .dialog-actions button{font-size:11px;white-space:normal;line-height:1.6;padding:8px 10px}
.chat-editor-body .choice-options label{min-width:0;overflow-wrap:anywhere}
.chat-portfolio{margin:18px 0;padding:13px;border:1px solid #3c7260;border-radius:7px;background:#102721;color:#bddbce}
.chat-portfolio-heading,.chat-member-heading{display:flex;justify-content:space-between;align-items:start;gap:10px}
.chat-portfolio-heading h3{margin:0;color:#9eebc4}
.chat-portfolio-heading>span{font-size:10px;white-space:nowrap;color:#93bba8}
.chat-portfolio-analysis{font-size:11px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}
.chat-portfolio-member{padding:12px 0;border-bottom:1px solid #2c5043}
.chat-portfolio-name{border:0;background:none;padding:0;color:#d7ecdf;text-align:left;font-size:12px;font-weight:700;line-height:1.6;overflow-wrap:anywhere}
.chat-member-weight{font-size:16px;color:#77e6bd;white-space:nowrap}
.chat-member-category{font-size:10px;color:#8fb5a2}
.chat-portfolio-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:9px}
.chat-portfolio-metrics small{display:block;font-size:9px;color:#94b4a4;line-height:1.6}
.chat-portfolio-metrics b{display:block;font-size:12px;color:#c7e8d8;overflow-wrap:anywhere}
.chat-member-reason{font-size:11px;color:#a7c5b4;line-height:1.7;margin:8px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}
.chat-portfolio-history{margin:12px 0;padding:10px;background:#0a1f19;border-radius:5px}
.chat-portfolio-history>b{font-size:12px}
.chat-portfolio-history>p{font-size:10px;line-height:1.7;color:#9fbead}
.chat-portfolio-history .chat-portfolio-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
.chat-portfolio-notice{display:block;font-size:10px;line-height:1.7;color:#84a996}
@media (min-width:1700px){.real-library{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media (max-width:1250px){.real-library{grid-template-columns:repeat(2,minmax(0,1fr))}
.library-toolbar{align-items:start;flex-direction:column}}
@media (max-width:700px){.real-library{grid-template-columns:1fr}
.library-heading{flex-direction:column}
.library-tools{width:100%}
.library-tools input{width:55%;min-width:0}
.card-return strong{font-size:28px}}
/* Business controls only. Native v2.6.2 layout, heights, fonts, gradients and animation rules are untouched. */
#native-compat,[hidden]{display:none!important}
/* Keep panel titles/geometry, but never paint sample results before a real basket exists. */
html:not([data-portfolio-state=ready]) .portfolio>:not(.panel-title){visibility:hidden;pointer-events:none}
html:not([data-history-state=ready]) .overview .mini canvas,
html:not([data-history-state=ready]) .overview .mini .micro-note,
html:not([data-history-state=ready]) .analytics .analysis-content{visibility:hidden;pointer-events:none}
.layout-stage .chat #messages{height:0;flex:1 1 0}
#messages>*,#messages .message{flex-shrink:0}
#messages .message p,#messages .interview,#messages .matching-audit,#messages .chat-portfolio{overflow-wrap:anywhere}
#messages .chat-intro-example{display:block;margin-top:8px;font-size:11px;line-height:1.7;color:#8ba8bd}
#messages .detail-table-wrap{overflow:auto;max-width:100%}
#messages fieldset{border:0;padding:0;margin:10px 0}
#messages legend{font-size:12px;line-height:1.8}
#messages .choice-options label{display:flex;gap:7px;padding:8px;border:1px solid #293e51;border-radius:4px;margin:7px 0;align-items:center}
#messages .choice-options input{width:auto;min-width:12px;flex:none}
#messages .recommended-questions{display:grid;gap:7px;margin:10px 0}
#messages .interview-actions,#messages .dialog-actions{display:flex;gap:7px;flex-wrap:wrap}
#messages .interview-progress,#messages .interview-notice{font-size:10px;color:#8198ae}
#messages .chat-preference-editor{background:#10202c;border-color:#4a6d6a}
#messages .chat-portfolio{background:#10202c;border-color:#294a51}
#messages .rank-row{display:flex;width:100%;gap:7px;align-items:center;text-align:left;margin:8px 0}
#messages .rank-row>span{flex:1;min-width:0}
#messages .exposure-badge{display:block;font-size:9px;color:#92c9b3;flex-basis:100%}
.chat-controls{display:flex;justify-content:space-between;align-items:center;margin-top:4px}
.chat-controls button{font-size:10px;border:0;background:none;padding:2px}
.chat-controls small{font-size:9px;color:#7892ac}
#libraryCount{font-size:9px;margin-left:4px;color:#7ce8b5}
#library .library-toolbar{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px}
#library .library-tools{display:flex;gap:6px;flex-wrap:wrap;min-width:0}
#library .library-tools input{min-width:0;max-width:200px}
#library .real-library{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
#library .real-card{background:#101b29;border-color:#26394b}
#library .real-card .card-return strong{font-size:25px}
#library .card-spark svg{width:100%;height:auto}
#dialog .detail-curve svg{width:100%;height:auto}
#dialog .detail-table-wrap{overflow:auto;max-width:100%}
#dialog .detail-table{min-width:520px}
#dialog .detail-note{white-space:pre-line;font-size:12px;line-height:1.9}
#dialog .curve-label{fill:#8198ae}
#mine .saved-card{background:#101b29}
.portfolio .rationale{font-size:10px;max-height:45px;overflow:auto}
.portfolio td small{font-size:9px;line-height:1.5}
.portfolio td{padding:7px 6px}
.portfolio .portfolio-actions{margin:6px 10px}.portfolio .workflow{margin:5px 6px}.portfolio #permission-note{margin:4px 6px}
@media(min-width:1201px){.layout-stage .portfolio{height:537px;overflow-y:auto}}
.portfolio input[type=range]{display:block;width:88px;max-width:100%;height:13px;margin:5px 0;accent-color:#77e6bd;cursor:pointer}
.portfolio .draft-weight-control{display:flex;align-items:center;gap:4px;max-width:126px;margin:4px 0}
.portfolio .draft-weight-control input[type=range]{flex:1;width:64px;min-width:30px;margin:0}
.portfolio .draft-weight-step{display:inline-flex;align-items:center;justify-content:center;flex:0 0 22px;width:22px;height:24px;min-width:0;padding:0;border:1px solid #35566b;border-radius:4px;background:#102333;color:#a6f3dc;font:600 16px/1 sans-serif;cursor:pointer;touch-action:manipulation}
.portfolio .draft-weight-step:hover{background:#204337;border-color:#77e6bd}
.portfolio .draft-weight-step:focus-visible{outline:2px solid #77e6bd;outline-offset:2px}
.portfolio #liquid-cash-row{background:#0c202b}.portfolio #liquid-cash-row input{accent-color:#8ba8bd}
.portfolio td:last-child{white-space:normal;min-width:110px}
.portfolio #allocation-error{font-size:10px;line-height:1.5;color:#a6becb}
.allocation-pending .overview,.allocation-pending~.analytics{opacity:.55;pointer-events:none}
/* Reclaim the removed replay row for the canvas, keeping the desktop grid stable. */
@media(min-width:1201px){.layout-stage .engine{display:flex;flex-direction:column;height:537px;min-height:537px}.layout-stage .engine .brain-wrap{flex:1;min-height:345px}}
#messages .compact-portfolio .chat-portfolio-member{padding:9px;margin:8px 0}
#messages .compact-portfolio .compact-summary{font-size:11px;line-height:1.6;margin:6px 0}
#messages .compact-validation,#messages .compact-risk-note{display:block;font-size:10px;line-height:1.6;margin:7px 0;color:#8ba8bd}
#messages .compact-evidence{font-size:10px;margin-top:8px;line-height:1.6}
#messages .compact-evidence>summary{cursor:pointer;color:#7ce8b5}
#messages .compact-evidence-body{padding:7px 0;overflow-wrap:anywhere}
#messages .compact-evidence-body p{font-size:10px;line-height:1.6;margin:6px 0}
#messages .compact-member-evidence{margin:8px 0}
#tab-returns[data-unavailable=true] .chart-layout:before{content:'真实历史暂不可计算；未用模拟收益替代。';padding:20px;color:#e3739d}
@media(max-width:1100px){#library .real-library{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){#library .real-library{grid-template-columns:minmax(0,1fr)}#messages .chat-portfolio-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Flat one-question-at-a-time prompt, only inside the AI conversation. */
#messages .interview.required-interview{background:transparent;border:0;border-radius:0;box-shadow:none;padding:12px 0;margin:8px 0;overflow-wrap:anywhere}
#messages .required-question-header{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#8ca3b5;font-size:11px;margin-bottom:10px}
#messages .required-question-navigation{display:flex;align-items:center;gap:6px}
#messages .required-question-counter{font-variant-numeric:tabular-nums;white-space:nowrap;min-width:34px;text-align:center}
#messages .required-question-nav{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;min-width:0;padding:0;border:0;background:transparent;color:#afc3d1;font:20px/1 sans-serif;border-radius:5px}
#messages .required-question-nav:disabled{opacity:.3;cursor:default}
#messages .required-question-title{font-size:13px;line-height:1.7;font-weight:600;margin:0 0 9px;color:#d6e4ec;outline:0}
#messages .required-answer-list{display:flex;flex-direction:column;gap:2px}
#messages .required-answer-row{display:flex;align-items:center;gap:9px;width:100%;min-height:39px;padding:8px;border:0;border-radius:6px;box-shadow:none;background:transparent;color:#c5d3dd;text-align:left;font-family:inherit;font-size:12px;line-height:1.6;white-space:normal;cursor:pointer}
#messages .required-answer-row:hover,#messages .required-answer-row[aria-checked=true]{background:rgba(154,185,201,.09)}
#messages .required-answer-row:focus-visible,#messages .required-question-nav:focus-visible,#messages .required-question-next:focus-visible{outline:2px solid #7ce8b5;outline-offset:2px}
#messages .required-answer-key{display:inline-flex;align-items:center;justify-content:center;flex:0 0 20px;min-height:20px;border:1px solid #3a4c58;border-radius:4px;color:#a8bac6;font-size:10px}
#messages .required-answer-label{flex:1;min-width:0}
#messages .required-answer-mark{color:#7ce8b5;visibility:hidden}
#messages .required-answer-row[aria-checked=true] .required-answer-mark{visibility:visible}
#messages .required-question-hint{font-size:11px;color:#8ca3b5;line-height:1.6;margin:7px 0}
#messages .required-question-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px}
#messages .required-answer-status,#messages .required-finished{font-size:10px;color:#8ca3b5}
#messages .required-question-next{border:1px solid #486259;border-radius:16px;background:#17372c;color:#a8edce;font-size:11px;padding:5px 12px;min-height:31px;white-space:nowrap}
#messages .required-question-next:disabled{opacity:.4;cursor:default}
#messages .required-interview.required-completed{padding:3px 0;margin:4px 0}
@media(max-width:650px){#messages .required-answer-row{min-height:43px;font-size:13px}#messages .required-question-title{font-size:13px}}

#library .library-advanced-filters{display:grid;grid-template-columns:repeat(4,minmax(115px,1fr));gap:10px;padding:14px 0;margin-bottom:12px;border-bottom:1px solid #29424e}
#library .library-filter-field{display:flex;flex-direction:column;gap:5px;min-width:0;font-size:11px;color:#9cb8c9}
#library .library-filter-field input,#library .library-filter-field select{width:100%;min-width:0;box-sizing:border-box;padding:8px;border:1px solid #294958;border-radius:4px;background:#0c1b28;color:#d1e6ef;font-size:12px}
#library .library-filter-actions{display:flex;align-items:center;justify-content:space-between;gap:10px}
#library .library-filter-count{font-size:11px;color:#93b7ca}
#library .library-filter-warning{grid-column:1/-1;margin:0;color:#e7b16e;font-size:11px}
#dialog .strategy-review{font-size:13px;line-height:1.8;margin-bottom:18px}
#dialog .strategy-review h3{font-size:14px;margin:12px 0 6px;color:#a4e9ce}
#dialog .strategy-review ul{padding-left:19px;margin:5px 0 12px}
#dialog .strategy-review small{font-size:11px;color:#95adbc}
#messages .research-evidence{margin:7px 0;font-size:11px;line-height:1.7;color:#9bb5c5}
#messages .research-evidence>summary{cursor:pointer;color:#7ce8b5}
#messages .research-evidence>b{display:block;margin-top:8px}
#messages .research-evidence p{margin:4px 0}
#messages .portfolio-explanation{font-size:11px;line-height:1.7;margin:10px 0;color:#b4cedb}
#messages .portfolio-explanation>b,#messages .portfolio-revision>b{color:#9ae8c7}
#messages .portfolio-explanation p{font-size:11px;line-height:1.7;margin:5px 0}
#messages .portfolio-revision{border-top:1px solid #36515c;margin-top:8px;padding-top:8px}
#messages .portfolio-revision small{font-size:10px;color:#92a9b9}
@media(max-width:900px){#library .library-advanced-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:420px){#library .library-advanced-filters{gap:8px}#library .library-filter-actions{grid-column:1/-1}}

/* Optional follow-ups live directly in the left conversation, not a card. */
#messages .interview.supplement-interview{border:0;background:transparent;box-shadow:none;border-radius:0;padding:4px 0;margin:14px 0 10px;max-width:100%;align-self:flex-start;box-sizing:border-box}
#messages .supplement-interview .suggestion-label{display:block;color:var(--muted,#8daac2);font-size:11px;line-height:1.6;margin-bottom:9px}
#messages .supplement-interview .recommended-questions{display:flex;flex-direction:column;align-items:flex-start;gap:8px;margin:0;min-width:0}
#messages .supplement-interview .suggested-question{display:block;max-width:100%;width:auto;text-align:left;white-space:normal;overflow-wrap:anywhere;font-size:12px;font-weight:400;line-height:1.6;padding:7px 11px;border:1px solid #2a4353;border-radius:12px;background:transparent;color:inherit;box-shadow:none}
#messages .supplement-interview .suggested-question:hover{background:#122b38;border-color:#64c7b0}
#messages .supplement-interview button:focus-visible{outline:2px solid #77e6bd;outline-offset:3px}
#messages .supplement-interview .interview-actions{margin-top:12px;display:flex;justify-content:flex-start}
#messages .supplement-interview .interview-actions button{font-size:12px;padding:9px 15px}
#messages .chat-preference-editor.optional-question-editor{background:transparent;border:0;border-radius:0;box-shadow:none;padding:4px 0;margin:12px 0}

/* Filter disclosure must override the grid display while hidden. */
#library .library-advanced-filters[hidden]{display:none}
#library .library-filter-toggle{white-space:nowrap}
#library .library-filter-toggle[aria-expanded="true"]{border-color:#77e6bd;color:#9aefd3}

/* Generated portfolio metrics: return and drawdown only, no empty Sharpe slot. */
#messages .chat-portfolio .chat-portfolio-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}

/* Strategy library detail controls and holdings only. */
#dialog .strategy-detail-chart{margin:22px 0}
#dialog .strategy-chart-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:10px}
#dialog .strategy-chart-toolbar h3,#dialog .strategy-holdings h3{margin:0;color:#a4e9ce;font-size:14px}
#dialog .strategy-chart-periods{display:flex;gap:5px;margin-left:auto;flex-wrap:wrap}
#dialog .strategy-chart-periods button{padding:6px 11px;border:1px solid #345065;border-radius:6px;background:#102130;color:#9fbacb;font-size:12px;cursor:pointer}
#dialog .strategy-chart-periods button.active{background:#173c3b;border-color:#7ce8b5;color:#a4f4d1}
#dialog .strategy-chart-periods button:focus-visible{outline:2px solid #7ce8b5;outline-offset:2px}
#dialog .strategy-detail-chart .detail-curve{height:auto;min-height:160px}
#dialog .strategy-detail-chart .curve-axis-title{fill:#91b6c8;font-size:12px}
#dialog .strategy-chart-note{margin:8px 0 0}
#dialog .strategy-holdings{margin:22px 0;padding-top:16px;border-top:1px solid #294155}
#dialog .strategy-holdings .detail-table{width:100%;min-width:400px}
@media(max-width:600px){#dialog .strategy-chart-periods button{padding:6px 9px}#dialog .strategy-holdings .detail-table{min-width:340px}}

/* Strategy holdings normalized composition and account exposure. */
#dialog .strategy-holdings .holdings-exposure-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:14px 0 18px}
#dialog .strategy-holdings .holdings-exposure-metric{padding:12px;background:#102130;border:1px solid #294155;border-radius:6px;min-width:0}
#dialog .strategy-holdings .holdings-exposure-metric small{display:block;color:#91b6c8;font-size:11px;margin-bottom:7px}
#dialog .strategy-holdings .holdings-exposure-metric strong{display:block;color:#a4e9ce;font-size:15px;overflow-wrap:anywhere}
#dialog .strategy-holdings .detail-table{min-width:600px}
@media(max-width:600px){#dialog .strategy-holdings .holdings-exposure-summary{grid-template-columns:1fr}#dialog .strategy-holdings .holdings-exposure-metric{padding:10px 12px}}

#dialog .strategy-holdings .holdings-exposure-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:600px){#dialog .strategy-holdings .holdings-exposure-summary{grid-template-columns:1fr}}

#dialog .strategy-holdings .holdings-exposure-summary{grid-template-columns:minmax(0,1fr);max-width:300px}

/* Strategy library navigation and grouped filters. */
#library .library-titlebar{display:flex;align-items:baseline;gap:16px;margin:0 0 22px}
#library .library-titlebar h2{margin:0;font-size:24px;letter-spacing:.02em}
#library .library-titlebar>small{font-size:12px;color:#8098ab;font-weight:400}
#library .library-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0 0 18px;flex-direction:row}
#library .category-filters{display:flex;align-items:center;gap:3px;padding:4px;border:1px solid #243a4b;background:#0b1824;border-radius:10px;flex-wrap:wrap}
#library .category-filters button{margin:0;padding:8px 14px;border:1px solid transparent;border-radius:7px;background:transparent;color:#8da6b9;font-size:12px;line-height:20px;white-space:nowrap;box-shadow:none}
#library .category-filters button:hover{background:#152b38;color:#d2e4ec}
#library .category-filters button.active{background:#173c38;border-color:#2d6658;color:#a4efd1}
#library .library-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
#library .library-search{position:relative;display:block;flex:1 1 190px;min-width:160px;max-width:250px}
#library .library-search::before{content:"";position:absolute;left:13px;top:13px;width:9px;height:9px;border:1.5px solid #819bae;border-radius:50%;pointer-events:none}
#library .library-search::after{content:"";position:absolute;left:23px;top:23px;width:5px;height:1.5px;background:#819bae;transform:rotate(45deg);pointer-events:none}
#library .library-tools #search{box-sizing:border-box;width:100%;max-width:none;padding-left:34px}
#library .library-tools input,#library .library-tools select,#library .library-tools button{height:40px;box-sizing:border-box;margin:0;border:1px solid #2a4254;border-radius:8px;background:#0c1b28;color:#c8dce7;font-size:12px}
#library .library-tools #sort{width:148px;padding:0 28px 0 12px}
#library .library-tools button{padding:0 13px;white-space:nowrap}
#library .library-filter-toggle[aria-expanded="true"]{background:#17342f;border-color:#397360;color:#a4efd1}
#library button:focus:not(:focus-visible){outline:none;box-shadow:none}
#library button:focus-visible,#library input:focus-visible,#library select:focus-visible{outline:2px solid #7ce8b5;outline-offset:3px}
#library #libraryStatus:empty{display:none}
#library .library-advanced-filters{display:block;box-sizing:border-box;padding:18px 20px;margin:0 0 16px;background:#0b1925;border:1px solid #253c4c;border-radius:12px}
#library .library-filter-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 16px}
#library .library-filter-heading h3{margin:0;color:#bdd5e1;font-size:13px;font-weight:600}
#library .library-filter-heading button{padding:3px 0;margin:0;border:0;background:transparent;box-shadow:none;color:#89a8ba;font-size:12px;line-height:20px}
#library .library-filter-heading button:hover{color:#a4efd1}
#library .library-filter-grid{display:grid;grid-template-columns:minmax(130px,1fr) minmax(210px,1.55fr) minmax(200px,1.4fr) minmax(135px,1fr) minmax(145px,1fr);gap:18px;align-items:end}
#library .library-filter-field{gap:8px;color:#8faabc;font-size:11px;line-height:17px}
#library .library-filter-range{min-width:0;margin:0;padding:0;border:0}
#library .library-filter-range legend{display:block;margin:0 0 8px;padding:0;font-size:11px;color:#8faabc;line-height:17px}
#library .library-range-inputs{display:grid;grid-template-columns:minmax(0,1fr) 12px minmax(0,1fr);gap:6px;align-items:center}
#library .library-range-inputs .library-filter-field>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#library .library-range-separator{text-align:center;font-size:12px;color:#557287}
#library .library-filter-field input,#library .library-filter-field select{height:38px;padding:0 10px;border:1px solid #294354;border-radius:7px;background:#091620;font-size:12px;color:#c6dce8;line-height:normal}
#library .library-filter-field input::placeholder,#library #search::placeholder{color:#526e82}
#library .library-filter-field input[type=number]{appearance:textfield;-moz-appearance:textfield}
#library .library-filter-field input::-webkit-inner-spin-button,#library .library-filter-field input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
#library .library-filter-warning:empty{display:none}
#library .library-filter-warning:not(:empty){margin-top:12px;line-height:1.6}
#library .library-results{display:flex;align-items:center;margin:2px 0 15px}
#library .library-filter-count{color:#89a7ba;font-size:12px;line-height:20px}
@media(max-width:1250px){#library .library-toolbar{align-items:stretch;flex-direction:column;gap:12px}#library .category-filters{align-self:flex-start}#library .library-tools{width:100%}#library .library-search{max-width:none}#library .library-filter-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:16px}#library .library-filter-grid>*{grid-column:span 2}#library .library-filter-grid>:nth-last-child(-n+2){grid-column:span 3}}
@media(max-width:650px){#library .library-titlebar{display:block;margin-bottom:16px}#library .library-titlebar>small{display:block;margin-top:7px}#library .library-tools{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px}#library .library-search{grid-column:1/-1;min-width:0;max-width:none}#library .library-tools #sort{width:100%;min-width:0}#library .category-filters{max-width:100%;box-sizing:border-box;gap:2px}#library .category-filters button{padding:7px 10px;font-size:11px}#library .library-advanced-filters{padding:16px}#library .library-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 12px}#library .library-filter-grid>*{grid-column:span 2}#library .library-filter-grid>:nth-last-child(-n+2){grid-column:span 1}}

#library input,#library select,#library button,#library input::placeholder{font-family:inherit}

#library .library-tools{flex:0 0 auto;width:auto;flex-wrap:nowrap}
#library .library-search{flex:0 1 220px;width:220px}
@media(max-width:1250px){#library .library-tools{width:100%}#library .library-search{flex:1 1 auto;width:auto}}

/* Strategy-library current snapshot only. */
.live-update-banner{padding:12px 14px;margin:12px 0;border:1px solid #254f52;border-radius:9px;background:#0b2931;color:#80e5bf;font-size:13px}.live-update-banner strong{font-size:13px}.live-update-banner p{margin:6px 0 0;color:#acd2df;line-height:1.6;font-size:12px}

.library-live-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0;padding:12px 14px;border:1px solid #265054;border-radius:9px;background:#0c2730;color:#9de8ce;font-size:13px}.library-live-summary button{white-space:nowrap}@media(max-width:700px){.library-live-summary{align-items:flex-start;flex-direction:column}}

/* BTC regime indicator, strategy library only */
.library-titlebar{flex-wrap:wrap}.btc-regime-status{margin-left:auto;display:flex;align-items:center;gap:12px;padding:9px 14px;border:1px solid #294355;border-radius:10px;background:#0b1d2a}.btc-regime-caption{font-size:13px;color:#8db0c8}.btc-regime-status strong{font-size:17px;color:#b4a0ef}.btc-regime-status[data-regime=上涨] strong{color:#7ce8b5}.btc-regime-status[data-regime=下跌] strong{color:#e3739d}.btc-regime-status small{font-size:12px;color:#8db0c8}@media(max-width:700px){.btc-regime-status{margin-left:0;flex-wrap:wrap;gap:8px;width:100%;box-sizing:border-box}}

/* Same layout for normal and expanded conversations. */
#messages .message{display:flex;align-items:flex-start;gap:10px;max-width:92%;margin-right:auto;margin-left:0;flex-wrap:wrap;}
#messages .message.user{margin-left:auto;margin-right:0;flex-direction:row-reverse;}
#messages .message>p{flex:1;min-width:0;margin:0;overflow-wrap:anywhere;}
#messages .message>.avatar{flex:none;}
#messages .message>button,#messages .message>.recommended-questions{max-width:100%;}
@media(max-width:700px){#messages .message{max-width:96%;gap:7px;}}

/* Customer conversation: one bubble, compact choices and collapsed evidence. */
#messages .assistant-question .question-bubble{flex:1;min-width:0;background:#152d3d;border:1px solid #284b60;border-radius:6px;padding:12px;}
#messages .question-bubble>p{margin:0 0 10px;}
#messages .question-bubble .recommended-questions{display:flex;flex-direction:column;gap:7px;width:100%;margin:0;}
#messages .question-bubble .suggested-question{width:100%;text-align:left;white-space:normal;padding:9px 12px;margin:0;}
#messages .recommendation-evidence,#messages .matching-details,#messages .optional-preferences{margin:10px 0;font-size:12px;color:#91adbd;}
#messages .recommendation-evidence>summary,#messages .matching-details>summary,#messages .optional-preferences>summary{cursor:pointer;padding:7px 0;}
#messages .required-interview{padding:14px!important;margin:10px 0!important;border:1px solid #284b60;border-radius:8px;background:#112331;}
#messages .required-interview .required-question-title{font-size:16px;margin:0 0 12px!important;}
#messages .required-interview .required-answer-list{display:flex!important;flex-wrap:wrap;gap:8px;margin:0!important;}
#messages .required-interview .required-answer-row{width:auto!important;flex:1 0 100px;min-height:38px!important;padding:8px 10px!important;border:1px solid #325365;border-radius:6px;background:#122d3d;}
#messages .required-interview .required-answer-key,#messages .required-interview .required-answer-mark{display:none!important;}
#messages .required-interview .required-answer-label{font-size:14px;}
#messages .required-interview .required-question-footer{margin-top:12px!important;padding-top:0!important;}
#messages .required-interview .required-question-next{padding:8px 16px!important;min-height:34px!important;}
#messages .required-interview .required-answer-list{flex-direction:row!important;align-items:stretch;}
#messages .required-interview .required-answer-row{display:flex!important;flex-direction:row!important;align-items:center;justify-content:center;flex:1 1 100px!important;height:auto!important;}
#messages .assistant-question{width:92%;max-width:480px!important;}
#messages .question-bubble>p{padding:0!important;border:0!important;background:transparent!important;line-height:1.6;}

/* Deliberate, compact condition editing; never opens during ordinary conversation. */
.condition-editor-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}
.condition-editor-field{display:flex;flex-direction:column;gap:6px;font-size:12px;min-width:0}
.condition-editor-field input[type=number],.condition-editor-field select{box-sizing:border-box;width:100%;min-width:0;padding:9px;border:1px solid #315465;border-radius:6px;background:#0b1b27;color:#d8e9ee;font:inherit}
.condition-editor-unlimited{display:flex;align-items:center;gap:5px;font-size:11px;color:#92acb9}
.condition-editor-more{margin-top:14px}.condition-editor-more>summary{cursor:pointer;margin-bottom:12px;color:#a9cbd7;font-size:12px}
.edit-preferences{white-space:nowrap}

.required-custom-number label{display:flex;align-items:center;gap:12px;font-size:12px;color:#b7cdd7;margin:12px 0 4px}.required-custom-number input{max-width:150px;min-width:0;padding:9px;border:1px solid #315465;border-radius:6px;background:#0b1b27;color:#d8e9ee}.required-custom-note{display:block;color:#91b5be;font-size:11px;margin-bottom:12px}
.chat .chat-editor-body form.condition-editor-form{display:block;grid-template-columns:none;box-sizing:border-box;min-width:0;height:auto;min-height:0;padding:0;margin:0;border:0;background:transparent}
.chat form.condition-editor-form .dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin:12px 0 0}
.chat form.condition-editor-form .dialog-actions button{width:auto;min-width:0;height:auto;min-height:0;align-self:auto;padding:9px 14px;border-radius:6px;font-size:12px;font-weight:600;line-height:1.6;white-space:normal;color:#082523}
.chat form.condition-editor-form .dialog-notice{font-size:12px;line-height:1.6;min-height:0;margin:8px 0;color:#a8c7d2}
.chat:has(.condition-editor-form) #messages{min-height:min(48vh,380px)}

.recommendation-followup{margin:14px 0 5px;padding:10px 0;border-top:1px solid #29414f}.recommendation-followup>p{font-size:12px;color:#b5d1dd;margin:0 0 9px}.recommendation-followup-actions{display:flex;flex-wrap:wrap;gap:7px}.recommendation-followup-actions button{font-size:12px;padding:7px 10px}.condition-preview{font-size:12px;line-height:1.8;color:#bed6df}

/* Restore all business content; responsive changes only alter presentation. */
.customer-experience #messages .message>p{font-size:14px;line-height:1.8}
.customer-experience #messages .chat-portfolio{font-size:14px;line-height:1.7}
.customer-experience #messages .chat-portfolio-name{font-size:14px;overflow-wrap:anywhere}
.customer-empty-plan{padding:18px;line-height:1.8;font-size:14px}
.customer-empty-plan[hidden]{display:none}
html.customer-experience:not([data-portfolio-state=ready]) .portfolio>.customer-empty-plan{visibility:visible;pointer-events:auto}
.mobile-workspace-nav{display:none}
@media(max-width:700px){
 .customer-experience .page{padding:0 12px}
 .customer-experience .layout-stage{display:flex;flex-direction:column;gap:16px}
 .customer-experience .layout-stage>.overview{display:grid;grid-template-columns:1fr;gap:12px;width:100%}
 .customer-experience .layout-stage .chat{width:100%;height:650px;min-height:480px;max-height:none;margin:0}
 .customer-experience .layout-stage .engine,.customer-experience .layout-stage .portfolio{width:100%;margin:0;height:auto;min-height:0}
 .customer-experience .chat #messages{min-height:0;max-height:none;padding:14px 12px;flex:1}
 .customer-experience #messages .message{max-width:100%;gap:7px}
 .customer-experience #conversation textarea{font-size:16px;min-height:48px}
 .customer-experience #conversation>button{min-width:44px;min-height:44px}
 .customer-experience .mobile-workspace-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin:12px 0}
 .customer-experience .mobile-workspace-nav button{min-height:44px;font-size:13px;padding:7px 3px;white-space:nowrap}
 .customer-experience .hero h1{font-size:24px;line-height:1.5}
 .customer-experience .hero p{font-size:14px;line-height:1.7}
 .customer-experience .telemetry{flex-wrap:wrap;height:auto;min-height:40px;gap:8px;padding:10px}
 .customer-experience .analytics .tabs{display:flex;flex-wrap:wrap;gap:4px}
 .customer-experience .analytics .tabs button{min-height:44px;font-size:13px;padding:8px}
 .customer-experience .recommendation-followup-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
 .customer-experience .recommendation-followup-actions button{min-height:44px;width:100%;font-size:13px;margin:0}
 .customer-experience #messages .condition-editor-fields{grid-template-columns:1fr}
 .customer-experience #messages input,.customer-experience #messages select{font-size:16px;min-height:44px}
}
/* Small screens: edit one strategy at a time without squeezing four columns. */
@media(max-width:700px){
 html.customer-experience .portfolio .table-wrap{overflow:visible;padding:0 12px}
 html.customer-experience .portfolio table,html.customer-experience .portfolio tbody{display:block;width:100%;min-width:0}
 html.customer-experience .portfolio thead{display:none}
 html.customer-experience .portfolio #allocations>tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;padding:16px 0;border-bottom:1px solid #294050}
 html.customer-experience .portfolio #allocations>tr>td{display:block;width:auto;min-width:0;padding:0;border:0;font-size:14px;text-align:left;overflow-wrap:anywhere}
 html.customer-experience .portfolio #allocations>tr>td:nth-child(1),html.customer-experience .portfolio #allocations>tr>td:nth-child(2){grid-column:1/-1}
 html.customer-experience .portfolio #allocations>tr>td:first-child b{font-size:16px;line-height:1.5;word-break:normal}
 html.customer-experience .portfolio #allocations small{font-size:12px;line-height:1.6;display:block}
 html.customer-experience .portfolio #allocations .draft-weight-control{display:flex;align-items:center;gap:12px;width:100%;max-width:none;margin:6px 0}
 html.customer-experience .portfolio #allocations .draft-weight-control input{flex:1;min-width:0;width:auto;height:44px}
 html.customer-experience .portfolio #allocations .draft-weight-step{width:44px;height:44px;flex:none;font-size:20px}
 html.customer-experience .portfolio .constraints{display:flex;flex-wrap:wrap;gap:8px}
 html.customer-experience .portfolio .constraints>span{flex:1 1 100px;font-size:12px}
 html.customer-experience .analytics #chart{height:240px!important}
}

/* Review is additive: original overview, engine, details and draft remain visible. */
.requirement-review{min-width:0}.review-choice{min-width:0;border:1px solid #304559;border-radius:8px;padding:10px;margin:12px 0}.review-choice legend{padding:0 5px}.review-options{display:flex;flex-wrap:wrap;gap:8px}.review-options button{padding:9px 12px;min-height:42px;white-space:normal}.review-options button.active{border-color:#51d6ad;background:#183e39}.review-guidance{line-height:1.7}.requirement-review .interview-actions{display:flex;flex-wrap:wrap;gap:8px}.requirement-review p{overflow-wrap:anywhere}@media(max-width:600px){.requirement-review .interview-actions button{width:100%;min-height:44px}.review-options button{flex:1 1 40%}}

.review-answer-preview{display:block;box-sizing:border-box;width:100%;min-height:90px;max-height:220px;resize:vertical;padding:10px;border:1px solid #365468;border-radius:8px;background:#0e2130;color:#d5f2ec;font:inherit;line-height:1.6}.review-questionnaire{margin:18px 0;padding-top:12px;border-top:1px solid #304559}.review-questionnaire h4{margin:0 0 8px}.review-clear{margin-top:8px;font-size:12px}.review-preview-label{display:block;margin:14px 0 8px}.review-next-questions{min-height:42px}.review-scoring-choice .review-options button{flex:1 1 auto}@media(max-width:600px){.review-scoring-choice{padding:10px 8px}.review-scoring-choice .review-options{gap:6px}.review-scoring-choice .review-options button{flex:1 1 25%;padding:8px 5px}.review-next-questions{width:100%}}

.review-questionnaire>summary{cursor:pointer;min-height:42px;box-sizing:border-box;padding:10px 0;color:#ccece9;font-weight:600}.review-question-invitation{font-size:13px;line-height:1.6;color:#a6c7d6}.review-question-pages{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:12px}.review-question-pages button{min-height:42px}.review-page-label{white-space:nowrap;font-size:12px;color:#b6d4e1}.review-question-pages button:disabled{opacity:.45;cursor:default}@media(max-width:600px){.review-question-pages .review-next-questions,.review-question-pages .review-previous-questions{width:auto;flex:1;min-width:0;padding:8px 6px}.review-question-pages{gap:6px}}
/* AI conversation only. Other dashboard panels retain their existing typography. */
.chat.chat-refined{--chat-copy:14px;--chat-small:12px;--chat-line:1.75;--chat-stroke:#2b4052;background:#0d1926;font-family:ConceptChinese,ConceptArabic,Arial,'Microsoft YaHei','PingFang SC',sans-serif}
.chat.chat-refined>.panel-title{padding:14px 16px;border-bottom:1px solid var(--chat-stroke);background:#101e2d;gap:12px}
.chat.chat-refined>.panel-title h2{font:600 16px/1.5 ConceptChinese,ConceptArabic,Arial,'Microsoft YaHei',sans-serif;letter-spacing:0}
.chat.chat-refined>.panel-title button{font-size:var(--chat-small);min-height:34px;padding:6px 10px;border-radius:8px}
.chat.chat-refined #messages{padding:18px 16px;scrollbar-width:thin;scrollbar-color:#355166 transparent}
.chat.chat-refined #messages .message{display:flex;align-items:flex-start;gap:9px;max-width:100%;margin:0 0 18px;font-size:var(--chat-copy);line-height:var(--chat-line)}
.chat.chat-refined #messages .message>.avatar{display:flex;align-items:center;justify-content:center;flex:0 0 24px;width:24px;height:24px;margin:4px 0 0;border:1px solid #365361;border-radius:8px;background:#152c36;color:#9ee4d1;font:600 10px/1 Arial,sans-serif}
.chat.chat-refined #messages .message>p,.chat.chat-refined #messages .question-bubble{box-sizing:border-box;min-width:0;max-width:calc(100% - 33px);margin:0;padding:11px 13px;border:1px solid #294253;border-radius:3px 13px 13px;background:#142735;color:#dbe6ed;font:400 var(--chat-copy)/var(--chat-line) ConceptChinese,ConceptArabic,Arial,'Microsoft YaHei','PingFang SC',sans-serif;letter-spacing:0;white-space:pre-wrap;overflow-wrap:anywhere;text-shadow:none}
.chat.chat-refined #messages .message.user{flex-direction:row-reverse;margin-left:auto}
.chat.chat-refined #messages .message.user>p{max-width:88%;border-color:#2f655e;border-radius:13px 3px 13px 13px;background:#173a36;color:#e0f6ee}
.chat.chat-refined #messages .message.user>.avatar{display:none}
.chat.chat-refined #messages h3,.chat.chat-refined #messages h4{font-size:15px;line-height:1.6;font-weight:600;margin:0 0 10px;letter-spacing:0}
.chat.chat-refined #messages p,.chat.chat-refined #messages legend,.chat.chat-refined #messages label,.chat.chat-refined #messages .chat-portfolio-name{font-size:var(--chat-copy);line-height:var(--chat-line);font-weight:400}
.chat.chat-refined #messages .detail-note,.chat.chat-refined #messages small,.chat.chat-refined #messages .interview-notice,.chat.chat-refined #messages .chat-intro-example{font-size:var(--chat-small);line-height:1.65;color:#9eb5c4;font-weight:400}
.chat.chat-refined #messages button{font-family:inherit;font-size:13px;line-height:1.5;min-height:36px;padding:8px 11px;border-radius:8px;letter-spacing:0;font-weight:500}
.chat.chat-refined #messages .interview,.chat.chat-refined #messages .chat-portfolio{box-sizing:border-box;max-width:100%;padding:14px;border:1px solid var(--chat-stroke);border-radius:12px;background:#10212d;font-size:var(--chat-copy);line-height:var(--chat-line)}
.chat.chat-refined #messages .requirement-review{background:#10272a;border-color:#2b5754}
.chat.chat-refined #messages .review-choice legend{font-size:var(--chat-copy);font-weight:500;padding:0 4px}
.chat.chat-refined #messages .review-choice{padding:10px 0;margin:10px 0;border:0;border-bottom:1px solid #294146;border-radius:0}
.chat.chat-refined #messages .review-questionnaire{margin-top:12px;padding-top:8px}
.chat.chat-refined #messages .review-answer-preview{font-family:inherit;font-size:13px;line-height:1.7;background:#0c2029}
.chat.chat-refined #messages .review-operation{padding:10px;border-left:2px solid #72d9bd;border-radius:3px;background:#183632}
.chat.chat-refined #messages .recommendation-evidence,.chat.chat-refined #messages .matching-details{margin:12px 0 18px;border:1px solid var(--chat-stroke);border-radius:10px;background:#101f2c;overflow:hidden}
.chat.chat-refined #messages .recommendation-evidence>summary,.chat.chat-refined #messages .matching-details>summary{padding:11px 13px;font-size:13px;line-height:1.6;color:#b8d2df;cursor:pointer;background:transparent;outline:none}
.chat.chat-refined #messages .recommendation-evidence>p,.chat.chat-refined #messages .recommendation-evidence>.detail-table-wrap{margin:10px 13px;font-size:13px}
.chat.chat-refined #messages details>summary:focus-visible,.chat.chat-refined button:focus-visible{outline:2px solid #72d9bd;outline-offset:2px}
.chat.chat-refined #messages .detail-table{font-size:12px;line-height:1.6}
.chat.chat-refined #messages .chat-portfolio-metrics b{font-size:17px;line-height:1.5;font-weight:600}
.chat.chat-refined #messages .recommendation-outcome{margin:4px 0 14px;padding:12px 13px;border:1px solid #345666;border-radius:10px;background:#112b35}
.chat.chat-refined #messages .recommendation-outcome>strong{display:block;font-size:13px;line-height:1.6;font-weight:600;color:#b9e2e7}
.chat.chat-refined #messages .recommendation-outcome>p{margin:5px 0 0;font-size:12px;color:#aec7d3;line-height:1.65}
.chat.chat-refined #messages .recommendation-outcome>button{margin-top:10px}
.chat.chat-refined #messages .outcome-published{background:#103029;border-color:#2f6355}
.chat.chat-refined #messages .outcome-published>strong{color:#a4e8cb}
.chat.chat-refined .chat-bottom{padding:12px 14px 14px;border-top:1px solid var(--chat-stroke);background:#101e2b}
.chat.chat-refined .chat-bottom .chips{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 10px}
.chat.chat-refined .chat-bottom .chips button{padding:6px 9px;min-height:32px;border:1px solid #304a5a;border-radius:16px;background:#142a38;font-size:12px;font-weight:400;line-height:1.5}
.chat.chat-refined .chat-bottom form{padding:8px;border:1px solid #3c5969;border-radius:13px;background:#0d1c29;gap:8px;align-items:end;box-shadow:none}
.chat.chat-refined #input{font-family:inherit;font-size:14px;line-height:1.7;background:transparent;border:0;border-radius:7px;min-height:64px;padding:7px 6px;color:#e2edf3;font-weight:400;box-shadow:none}
.chat.chat-refined #input::placeholder{font-size:14px;line-height:1.7;color:#839fae;font-weight:400}
.chat.chat-refined #input:focus{outline:none}
.chat.chat-refined .chat-bottom form:focus-within{border-color:#73d6b7;box-shadow:0 0 0 2px #73d6b714}
.chat.chat-refined #send{width:38px;height:38px;min-width:38px;padding:0;border:0;border-radius:11px;background:#78ddbd;color:#0c322b;font-size:17px;align-self:end}
.chat.chat-refined .chat-bottom .input-meta,.chat.chat-refined .chat-bottom .micro-note,.chat.chat-refined #charCount{font-size:11px;line-height:1.6;color:#8ca9b9}
.chat.chat-refined #messages [data-task-progress]>p{color:#a9c8d4;background:#102330}
@media(max-width:700px){.chat.chat-refined #messages{padding:16px 12px}.chat.chat-refined #messages .message{gap:7px;margin-bottom:16px}.chat.chat-refined #messages .message>p{max-width:calc(100% - 31px);padding:10px 11px}.chat.chat-refined #input{font-size:16px}.chat.chat-refined #input::placeholder{font-size:14px}.chat.chat-refined #messages button{min-height:40px}.chat.chat-refined .chat-bottom{padding:11px 12px 13px}}

/* Concise chat disclosures; evidence stays accessible without repeating it. */
.chat.chat-refined #messages :is(.review-interpretation,.review-answered,.review-selected-answers){margin:8px 0;border-top:1px solid #294146;padding-top:8px}
.chat.chat-refined #messages :is(.review-interpretation,.review-answered,.review-selected-answers)>summary{cursor:pointer;font-size:12px;color:#9eb8c8}
.chat.chat-refined #messages .recommendation-outcome{padding:8px 10px;margin:4px 0}
.chat.chat-refined #messages .recommendation-outcome strong{font-size:12px;font-weight:500}
.chat.chat-refined #messages .review-action-feedback{font-size:12px;margin:6px 0}
.retry-allocation-history{margin-left:8px;font-size:12px}

.chat.chat-refined .candidate-options{display:grid;gap:8px;padding:8px 0}.chat.chat-refined .candidate-options h4{font-size:13px;margin:0}.chat.chat-refined .candidate-choice{border:1px solid #2b5754;border-radius:10px;padding:10px;background:#10272a}.chat.chat-refined .candidate-choice strong{font-size:13px;font-weight:500;overflow-wrap:anywhere}.chat.chat-refined .candidate-facts{font-size:12px;line-height:1.6;margin:6px 0;color:#b5ccd4}.chat.chat-refined .candidate-tradeoff{display:block;font-size:12px;line-height:1.6;color:#d8c69d;margin-bottom:6px}.chat.chat-refined .candidate-choose{margin-top:6px;min-height:36px}.chat.chat-refined .candidate-edit{font-size:12px;justify-self:start}

/* Compact current H3 signals; independent BTC daily and NASDAQ close schedules. */
.current-regimes{margin-left:auto;display:flex;align-items:center;gap:12px;flex-wrap:wrap}.current-regimes .btc-regime-status{margin-left:0;gap:10px}.current-regimes .btc-regime-status strong{white-space:nowrap}@media(max-width:700px){.current-regimes{margin-left:0;width:100%;gap:8px}.current-regimes .btc-regime-status{width:auto;flex:1;min-width:130px;flex-wrap:nowrap}}

/* Guided v0.2: scoped exclusively to the AI message area. */
#messages .guided-v02-questions,#messages .guided-v02-evidence{font-size:14px;line-height:1.6;margin:12px 0;padding:12px;border:1px solid #294654;border-radius:10px;background:#10232d;max-width:100%;box-sizing:border-box;}
#messages .guided-v02-questions summary,#messages .guided-v02-evidence summary{cursor:pointer;font-weight:600;}
#messages .guided-v02-questions fieldset{min-width:0;margin:12px 0;padding:10px;}
#messages .guided-v02-questions .review-options{display:flex;flex-wrap:wrap;gap:8px;}
#messages .guided-v02-questions button{font-size:inherit;min-height:40px;padding:8px 12px;white-space:normal;}
#messages .guided-v02-evidence table{width:100%;font-size:12px;table-layout:fixed;overflow-wrap:anywhere;}
#messages .guided-v02-evidence td,#messages .guided-v02-evidence th{padding:6px;text-align:left;}

#messages .dynamic-quick-replies{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 18px 28px}#messages .dynamic-quick-replies button{font-size:13px;line-height:1.5;padding:8px 12px;border-radius:16px;white-space:normal;text-align:left}#messages .dynamic-quick-replies .detail-note{width:100%;margin:0;font-size:12px}#messages .guided-v02-evidence{overflow:auto}

/* Guided conversation v0.3.1: confined to the AI chat panel. */
.chat.chat-guided{--chat-copy:14px;--chat-line:1.75;color:#202124;background:#fafafa;border-color:#dde1e5}
.chat.chat-guided .panel-heading,.chat.chat-guided .chat-header,.chat.chat-guided .chat-bottom{background:#fafafa;color:#202124;border-color:#e2e5e9}
.chat.chat-guided #messages{background:#fafafa;color:#202124;padding:20px 16px;scrollbar-color:#b6bec7 transparent}
.chat.chat-guided #messages .message{width:100%;max-width:780px;margin:0 auto 16px;gap:0;flex-wrap:nowrap}
.chat.chat-guided #messages .message>.avatar{display:none}
.chat.chat-guided #messages .message>p{flex:0 1 auto;width:fit-content;max-width:100%;min-width:0;padding:2px 0;border:0;border-radius:0;background:none;color:#25292e;font-size:14px;line-height:1.8;overflow-wrap:anywhere}
.chat.chat-guided #messages .message.user{width:100%;max-width:780px;flex-direction:row;justify-content:flex-end}
.chat.chat-guided #messages .message.user>p{flex:0 1 auto;width:fit-content;max-width:85%;padding:10px 15px;background:#e9ecef;border:0;border-radius:17px;color:#25292e;white-space:pre-wrap;word-break:normal;overflow-wrap:break-word}
.chat.chat-guided #messages .ai-guide-card{box-sizing:border-box;display:block;width:100%;max-width:780px;margin:0 auto 18px;padding:18px;border:1px solid #dfe2e6;border-radius:18px;background:#fff;color:#202124;box-shadow:none;gap:0}
.chat.chat-guided #messages .ai-guide-card h3{margin:0 0 12px;font-size:16px;font-weight:600;line-height:1.5;color:#17191c}
.chat.chat-guided #messages .ai-guide-card .guide-description{margin:0 0 12px;font-size:14px;line-height:1.7;color:#41464d}
.chat.chat-guided #messages .ai-guide-card .guide-question{margin:0 0 12px;font-size:14px;font-weight:500;line-height:1.7;color:#202124;white-space:normal}
.chat.chat-guided #messages .guide-choices{display:grid;gap:7px;margin:0 0 14px}
.chat.chat-guided #messages .guide-option{display:flex;align-items:flex-start;gap:10px;box-sizing:border-box;min-height:44px;margin:0;padding:10px 11px;border:1px solid #e3e5e8;border-radius:11px;background:#fff;cursor:pointer;color:#30343b;font-size:14px;line-height:1.6}
.chat.chat-guided #messages .guide-option:hover{background:#f7f8fa;border-color:#c7cdd4}
.chat.chat-guided #messages .guide-option.selected{border-color:#9aa1a9;background:#f3f4f6}
.chat.chat-guided #messages .guide-option input{appearance:auto;flex:0 0 17px;width:17px;height:17px;margin:3px 0 0;padding:0;accent-color:#202124}
.chat.chat-guided #messages .guide-input-label{display:block;font-size:12px;font-weight:400;line-height:1.7;color:#6a7078;margin:0 0 12px}
.chat.chat-guided #messages .guide-free-text{box-sizing:border-box;display:block;resize:vertical;width:100%;min-height:70px;margin:7px 0 0;padding:10px 12px;background:#fff;color:#202124;border:1px solid #d5d9de;border-radius:10px;font-family:inherit;font-weight:400;font-size:14px;line-height:1.7;outline:none}
.chat.chat-guided #messages .guide-free-text:focus{border-color:#7e8792;box-shadow:0 0 0 2px #2222220a}
.chat.chat-guided #messages .guide-free-text::placeholder{color:#8b9097}
.chat.chat-guided #messages .guide-submit{display:block;box-sizing:border-box;width:100%;min-height:42px;padding:9px 15px;border:1px solid #17191c;border-radius:24px;background:#17191c;color:#fff;font-size:14px;font-weight:500;cursor:pointer;line-height:1.5}
.chat.chat-guided #messages .guide-submit:disabled{background:#dfe2e6;border-color:#dfe2e6;color:#81868e;cursor:default;opacity:1}
.chat.chat-guided #messages .dynamic-quick-replies{display:block;margin:0 auto 16px}
.chat.chat-guided #messages :is(.guided-v02-questions,.guided-v02-evidence,.matching-details,.research-evidence){width:100%;max-width:780px;box-sizing:border-box;margin:0 auto 8px;padding:10px 4px;border:0;border-top:1px solid #e2e5e9;border-radius:0;background:none;color:#41464d;font-size:13px;line-height:1.7}
.chat.chat-guided #messages details>summary{font-size:13px;font-weight:400;color:#636a74;cursor:pointer;line-height:1.7}
.chat.chat-guided #messages details p,.chat.chat-guided #messages .detail-note{color:#65707c;font-size:12px;line-height:1.7}
.chat.chat-guided #messages .guided-v02-questions fieldset{padding:0;margin:12px 0}
.chat.chat-guided #messages .guided-v02-questions button,.chat.chat-guided #messages .candidate-choice button{border:1px solid #d9dde2;border-radius:10px;background:#fff;color:#333942;font-size:13px;line-height:1.6;min-height:38px}
.chat.chat-guided #messages .guided-v02-questions button.active{border-color:#6c7681;background:#eceff2;color:#17191c}
.chat.chat-guided #messages :is(td,th){border-color:#e1e5e9;color:#424b57;background:transparent;font-size:12px}
.chat.chat-guided #messages .matching-audit{border:0;background:none;padding:6px 0;color:#525c69}
.chat.chat-guided #messages .candidate-choice{border-color:#dce1e6;background:#fff;color:#333}
.chat.chat-guided #messages :is(.candidate-facts,.candidate-choice strong){color:#424b57}
.chat.chat-guided #messages .candidate-tradeoff{color:#846022}
.chat.chat-guided #messages .recommendation-outcome{border-color:#d7e3db;background:#f0f6f2;color:#31533e}
.chat.chat-guided #messages .recommendation-outcome>strong{color:#31533e}
.chat.chat-guided .chat-bottom{border-top:1px solid #e2e5e9;padding:12px 16px;background:#fafafa}
.chat.chat-guided .chat-bottom .chips{display:none}
.chat.chat-guided .chat-bottom form{background:#fff;border-color:#d3d9df;border-radius:20px;box-shadow:none;padding:6px 9px}
.chat.chat-guided #input{color:#202124;background:transparent;font-size:14px;line-height:1.7;min-height:48px}
.chat.chat-guided #input::placeholder{color:#9298a0}
.chat.chat-guided #send{background:#202124;color:#fff;border-radius:50%}
.chat.chat-guided .chat-bottom .input-meta,.chat.chat-guided .chat-bottom .micro-note,.chat.chat-guided #charCount{color:#858d97}
.chat.chat-guided .recommendation-followup{display:none}
@media(max-width:700px){.chat.chat-guided #messages{padding:14px 12px}.chat.chat-guided #messages .ai-guide-card{padding:14px;border-radius:15px}.chat.chat-guided #messages .guide-free-text{font-size:16px}.chat.chat-guided #messages .message.user>p{max-width:90%}.chat.chat-guided #input{font-size:16px}}
.chat.chat-guided>.panel-title{background:#fafafa;border-color:#e2e5e9;color:#202124}
.chat.chat-guided>.panel-title h2{color:#202124}
.chat.chat-guided>.panel-title button{background:#fff;color:#626a74;border:1px solid #dce1e6;border-radius:9px}
.chat.chat-guided #messages :is(.requirement-review,.interview,.dialog-form,.chat-preference-editor,.chat-portfolio){background:#fff;color:#333;border-color:#dfe3e8;border-radius:14px;box-shadow:none}
.chat.chat-guided #messages :is(.requirement-review,.interview,.dialog-form,.chat-preference-editor,.chat-portfolio) :is(h3,h4,p,legend,label,strong,b){color:#333}
.chat.chat-guided #messages button:not(.guide-submit){background:#fff;color:#424b57;border:1px solid #dce1e6;border-radius:10px;font-size:13px;line-height:1.6}
.chat.chat-guided #messages button:not(.guide-submit):hover{background:#f1f3f5}
.chat.chat-guided #messages button[data-review-confirm]{background:#202124;color:#fff;border-color:#202124}
.chat.chat-guided #messages .guide-submit{border-radius:24px}
.chat.chat-guided #messages .guide-option input{appearance:none;-webkit-appearance:none;border:1.5px solid #c7cdd4;border-radius:50%;background:#fff;box-shadow:none}
.chat.chat-guided #messages .guide-option input:checked{border:5px solid #202124;background:#fff}
.chat.chat-guided #reset,.chat.chat-guided #editPreferences{color:#5d6773}

/* One composer. Contextual choices extend upward from it, outside the transcript. */
.chat.chat-guided .composer-guidance{display:flex;flex-direction:column;gap:8px;margin:0 0 9px;max-height:38vh;overflow:auto;overscroll-behavior:contain}
.chat.chat-guided .composer-guidance:empty{display:none}
.chat.chat-guided .composer-guidance .ai-guide-card{margin:0;padding:0;background:none;border:0;border-radius:0;box-shadow:none}
.chat.chat-guided .composer-guidance .guide-question{font-size:13px;line-height:1.65;color:#414a55;margin:0 0 7px;font-weight:500}
.chat.chat-guided .composer-guidance .guide-description{font-size:12px;line-height:1.6;color:#737b86;margin:0 0 7px}
.chat.chat-guided .composer-guidance .guide-choices{display:flex;flex-wrap:wrap;gap:6px}
.chat.chat-guided .composer-guidance .guide-option{display:flex;align-items:center;gap:7px;font-size:13px;line-height:1.6;min-height:35px;padding:6px 10px;border:1px solid #e0e4e8;border-radius:12px;background:#f0f2f4;color:#343d47;cursor:pointer;box-sizing:border-box}
.chat.chat-guided .composer-guidance .guide-option.selected{border-color:#66717e;background:#e4e8ec;color:#202124}
.chat.chat-guided .composer-guidance .guide-option input{appearance:none;-webkit-appearance:none;flex:0 0 15px;width:15px;height:15px;margin:0;border:1.5px solid #bcc4cd;border-radius:50%;background:#fff;box-shadow:none}
.chat.chat-guided .composer-guidance .guide-option input:checked{border:4px solid #202124;background:#fff}
.chat.chat-guided .composer-guidance .guide-selection-note{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:6px;font-size:11px;line-height:1.6;color:#8b929c}
.chat.chat-guided .composer-guidance .guide-selection-note button{border:0;background:none;padding:2px 0;font-size:11px;color:#65717f;cursor:pointer}
.chat.chat-guided .composer-suggestions{display:flex;flex-direction:column;align-items:flex-start;gap:6px}
.chat.chat-guided .composer-suggestions .suggested-question{max-width:100%;padding:7px 12px;border:0;border-radius:13px;background:#eef0f2;color:#4d5661;font-size:12px;font-weight:400;line-height:1.6;text-align:left;cursor:pointer;white-space:normal}
.chat.chat-guided .composer-suggestions .suggested-question:hover{background:#e2e6ea;color:#202124}
.chat.chat-guided .composer-guidance .guided-v02-questions{margin:0;padding:5px 0;border:0;border-top:1px solid #e0e4e8;background:none;color:#4d5661;font-size:12px;line-height:1.6}
.chat.chat-guided .composer-guidance .guided-v02-questions summary{cursor:pointer;color:#677281;font-size:12px}
.chat.chat-guided .composer-guidance fieldset{border:0;padding:0;margin:10px 0;min-width:0}
.chat.chat-guided .composer-guidance legend{font-size:13px;color:#45505e;margin:0 0 6px}
.chat.chat-guided .composer-guidance .review-options{display:flex;flex-wrap:wrap;gap:6px}
.chat.chat-guided .composer-guidance .review-options button{background:#fff;color:#586371;border:1px solid #dce1e6;border-radius:9px;padding:5px 9px;font-size:12px;line-height:1.6;cursor:pointer}
.chat.chat-guided .composer-guidance .review-options button.active{border-color:#768392;background:#e6ebef;color:#202124}
.chat.chat-guided .composer-guidance .detail-note{font-size:11px;line-height:1.6;color:#7e8895;margin:6px 0}
.chat.chat-guided .composer-guidance .review-options button:disabled,.chat.chat-guided .composer-suggestions button:disabled{opacity:.5;cursor:default}
@media(max-width:700px){.chat.chat-guided .composer-guidance{max-height:32vh}.chat.chat-guided .composer-guidance .guide-option{font-size:12px}.chat.chat-guided .composer-suggestions .suggested-question{font-size:12px}.chat.chat-guided .composer-guidance .guide-selection-note{font-size:10px}}
/* Transcript length must never determine the workspace or page height. */
.layout-stage .chat.chat-guided{display:flex;flex-direction:column;align-self:start;min-height:320px;height:720px;max-height:calc(100dvh - 100px);overflow:hidden;contain:layout}
.layout-stage .chat.chat-guided>.panel-title{flex:0 0 auto;min-height:44px}
.layout-stage .chat.chat-guided #messages{height:0;min-height:0;max-height:none;flex:1 1 0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}
.layout-stage .chat.chat-guided .chat-bottom{flex:0 0 auto;min-height:0;max-height:62%;overflow:hidden;display:flex;flex-direction:column}
.layout-stage .chat.chat-guided .composer-guidance{flex:0 1 auto;min-height:0;overflow:auto}
.layout-stage .chat.chat-guided .chat-bottom #conversation{flex:0 0 auto}
.layout-stage .chat.chat-guided.expanded{position:fixed;inset:16px;width:auto;height:calc(100dvh - 32px);max-height:calc(100dvh - 32px);min-height:0;z-index:1000}
body:has(.chat.chat-guided.expanded){overflow:hidden}
@media(max-width:700px){.layout-stage .chat.chat-guided{height:620px;max-height:85dvh;min-height:300px}.layout-stage .chat.chat-guided.expanded{inset:8px;height:calc(100dvh - 16px);max-height:calc(100dvh - 16px);min-height:0}}
/* Retain the platform's existing dark palette. */
.chat.chat-guided{color:#dbe6ed;background:#0d1926;border-color:#294253}
.chat.chat-guided>.panel-title{background:#101e2d;border-color:#2b4052;color:#dbe6ed}
.chat.chat-guided>.panel-title h2{color:#dbe6ed}
.chat.chat-guided>.panel-title button{background:transparent;color:#9cb6c7;border-color:#315363}
.chat.chat-guided #messages{background:#0d1926;color:#dbe6ed;scrollbar-color:#355166 transparent}
.chat.chat-guided #messages .message>p{color:#dbe6ed}
.chat.chat-guided #messages .message.user>p{background:#173a36;color:#e0f6ee}
.chat.chat-guided .chat-bottom{background:#101e2b;border-color:#2b4052;color:#b6ccdb}
.chat.chat-guided .chat-bottom #conversation{background:#0d1c29;border-color:#3c5969}
.chat.chat-guided #input{color:#e2edf3;background:transparent}
.chat.chat-guided #input::placeholder{color:#839fae}
.chat.chat-guided #send{background:#78ddbd;color:#0c322b}
.chat.chat-guided #reset,.chat.chat-guided #editPreferences{color:#9cb6c7}
.chat.chat-guided .composer-guidance .guide-question{color:#bed5e0}
.chat.chat-guided .composer-guidance .guide-description,.chat.chat-guided .composer-guidance .detail-note{color:#8ca9b9}
.chat.chat-guided .composer-guidance .guide-option{background:#142a38;color:#bcd5e2;border-color:#304a5a}
.chat.chat-guided .composer-guidance .guide-option.selected{background:#173a36;color:#d9f3e9;border-color:#70c7ad}
.chat.chat-guided .composer-guidance .guide-option input{border-color:#526f80;background:#0d1c29}
.chat.chat-guided .composer-guidance .guide-option input:checked{border-color:#78ddbd;background:#0d1c29}
.chat.chat-guided .composer-guidance .guide-selection-note,.chat.chat-guided .composer-guidance .guide-selection-note button{color:#88a4b6}
.chat.chat-guided .composer-suggestions .suggested-question{background:#142a38;color:#b0cbdc}
.chat.chat-guided .composer-suggestions .suggested-question:hover{background:#1c3b4c;color:#dcf0f5}
.chat.chat-guided .composer-guidance .guided-v02-questions{background:none;border-color:#2b4052;color:#b0cbdc}
.chat.chat-guided .composer-guidance .guided-v02-questions summary{color:#9cb6c7}
.chat.chat-guided .composer-guidance legend{color:#c0d6e2}
.chat.chat-guided .composer-guidance .review-options button{background:#102b3b;color:#bdd9e5;border-color:#315363}
.chat.chat-guided .composer-guidance .review-options button.active{background:#173a36;color:#dbf3e8;border-color:#70c7ad}
.chat.chat-guided #messages :is(.requirement-review,.interview,.dialog-form,.chat-preference-editor,.chat-portfolio){background:#10202c;color:#bed5e2;border-color:#294253}
.chat.chat-guided #messages :is(.requirement-review,.interview,.dialog-form,.chat-preference-editor,.chat-portfolio) :is(h3,h4,p,legend,label,strong,b){color:#bed5e2}
.chat.chat-guided #messages button:not(.guide-submit){background:#102b3b;color:#bdd9e5;border-color:#315363}
.chat.chat-guided #messages button:not(.guide-submit):hover{background:#1c3b4c}
.chat.chat-guided #messages details,.chat.chat-guided #messages details>summary{color:#9eb8c8;border-color:#2b4052}
.chat.chat-guided #messages details p,.chat.chat-guided #messages .detail-note{color:#8ca9b9}
.chat.chat-guided #messages :is(td,th){color:#bdd2df;border-color:#294253}
.chat.chat-guided #messages .recommendation-outcome{background:#103029;border-color:#2f6355;color:#b9e2ce}
.chat.chat-guided #messages .recommendation-outcome>strong{color:#a4e8cb}

/* A continuous chat surface; auxiliary footer navigation is no longer shown. */
.chat.chat-guided .chat-bottom>.ux-view,.chat.chat-guided .chat-bottom>#demo-note{display:none!important}
.layout-stage .chat.chat-guided .chat-bottom{position:relative;background:#0d1926;border-top:0;padding-top:14px}
.chat.chat-guided .composer-guidance{margin-bottom:10px;padding-top:2px}
.chat.chat-guided .composer-suggestions{gap:7px}
.chat.chat-guided .composer-suggestions .suggested-question{background:#132735;color:#adc8d6}
.chat.chat-guided .chat-bottom #conversation{background:#10212f;border-color:#36505e}
.chat.chat-guided #messages hr{border:0;border-top:1px solid #273c4a;margin:12px 0}
.chat.chat-guided #messages :is(.matching-details,.guided-v02-evidence){border-color:#273c4a}
/* Keep expanded conversations readable and restore distinct assistant bubbles. */
.layout-stage .chat.chat-guided.expanded{inset:24px;max-width:1120px;width:calc(100% - 48px);height:calc(100dvh - 48px);max-height:calc(100dvh - 48px);margin-inline:auto;border-radius:14px;box-shadow:0 16px 64px #0008}
.chat.chat-guided #messages>*{box-sizing:border-box;width:100%;max-width:820px;margin-left:auto;margin-right:auto}
.chat.chat-guided #messages .message,.chat.chat-guided #messages .message.user{max-width:820px;gap:0;margin:0 auto 16px}
.chat.chat-guided #messages .message:not(.user)>p{padding:11px 14px;border:1px solid #294253;border-radius:4px 14px 14px;background:#142735;color:#dbe6ed;max-width:100%;line-height:1.8}
.chat.chat-guided #messages .message.user>p{max-width:85%;padding:10px 14px;border-radius:14px 4px 14px 14px}
.layout-stage .chat.chat-guided .chat-bottom{box-sizing:border-box;width:100%;max-width:852px;align-self:center;margin-inline:auto;padding:12px 16px}
.chat.chat-guided #messages .chat-portfolio{margin-bottom:16px}
@media(max-width:700px){.layout-stage .chat.chat-guided.expanded{inset:8px;width:calc(100% - 16px);max-width:none;height:calc(100dvh - 16px);max-height:calc(100dvh - 16px);border-radius:10px}.layout-stage .chat.chat-guided .chat-bottom{padding:10px 12px}.chat.chat-guided #messages .message:not(.user)>p{padding:10px 12px}}
/* Consistent member rows and metric columns at narrow and expanded widths. */
.chat.chat-guided #messages .chat-portfolio-heading{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;margin-bottom:12px}
.chat.chat-guided #messages .chat-portfolio-heading h3{flex:1 1 150px;margin:0}
.chat.chat-guided #messages .chat-portfolio-heading>span{font-size:11px;line-height:1.6}
.chat.chat-guided #messages .chat-portfolio-member{box-sizing:border-box;min-width:0;padding:12px;margin:12px 0;border:1px solid #294253;border-radius:10px;background:#102531}
.chat.chat-guided #messages .chat-member-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:5px 12px}
.chat.chat-guided #messages .chat-member-heading .chat-portfolio-name{grid-column:1/-1;justify-self:start;box-sizing:border-box;min-width:0;max-width:100%;width:auto;min-height:0;border:0;background:transparent;border-radius:0;padding:0;text-align:left;font-size:15px;font-weight:600;line-height:1.6;white-space:normal;word-break:normal;overflow-wrap:anywhere}
.chat.chat-guided #messages .chat-member-heading .chat-portfolio-name:hover{background:transparent;color:#9aefd3;text-decoration:underline}
.chat.chat-guided #messages .chat-member-weight{justify-self:start;font-size:17px;line-height:1.6;color:#91e4c8}
.chat.chat-guided #messages .chat-member-heading .exposure-badge{justify-self:end;margin:0;white-space:nowrap;font-size:11px;line-height:1.6}
.chat.chat-guided #messages .chat-member-category{display:block;margin-top:6px;font-size:11px;line-height:1.7;overflow-wrap:anywhere}
.chat.chat-guided #messages .chat-portfolio-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px;align-items:start}
.chat.chat-guided #messages .chat-portfolio-metrics>div{min-width:0}
.chat.chat-guided #messages .chat-portfolio-metrics small{font-size:11px;line-height:1.6;min-height:36px;display:flex;align-items:flex-end}
.chat.chat-guided #messages .chat-portfolio-metrics b{margin-top:4px;font-size:18px;line-height:1.4;white-space:nowrap;font-variant-numeric:tabular-nums;letter-spacing:0}
.chat.chat-guided #messages .chat-portfolio-history{box-sizing:border-box;margin:12px 0;padding:12px;border:1px solid #244439;border-radius:10px;background:#0a211b}
.chat.chat-guided #messages .chat-portfolio-history>p{font-size:12px;line-height:1.7;margin:8px 0;overflow-wrap:normal}
.chat.chat-guided #messages .compact-evidence{margin:12px 0 0;border-top:1px solid #294253;padding-top:4px}
.chat.chat-guided #messages .compact-evidence>summary{padding:8px 0;font-size:12px;line-height:1.6}

.layout-stage .chat.chat-guided #messages{display:block}
.layout-stage .chat.chat-guided #messages>:not(.message){box-sizing:border-box;width:100%;max-width:820px;margin-left:auto;margin-right:auto}
/* Keep the expandable evidence row and its focus ring inside the same edges. */
.chat.chat-guided #messages .compact-evidence{border-top:0;padding-top:0}
.chat.chat-guided #messages .compact-evidence>summary{box-sizing:border-box;width:100%;padding:10px 12px;border:1px solid #294253;border-radius:10px;background:#102531;list-style-position:inside}
.chat.chat-guided #messages .compact-evidence>summary:focus-visible{outline:2px solid #72d9bd;outline-offset:-2px}
.chat.chat-guided #messages .review-clarification{padding:14px}
.chat.chat-guided #messages .review-clarification h3{margin:0 0 8px}
.chat.chat-guided #messages .review-clarification .review-question{margin:0;line-height:1.75}
.chat.chat-guided #messages .concise-recommendation .chat-portfolio-member{margin:8px 0}
.chat.chat-guided #messages .concise-recommendation .chat-portfolio-history{border:0;background:transparent;padding:0;margin:8px 0 0}
.chat.chat-guided #messages .concise-recommendation .history-window{margin:0;color:#8ca9b9;font-size:11px;line-height:1.7}
.chat.chat-guided #messages .concise-recommendation .chat-portfolio-metrics small{min-height:0}

/* Candidate cards share the dark recommendation surface in every view. */
.chat.chat-guided #messages .candidate-choice{box-sizing:border-box;min-width:0;border:1px solid #294253;border-radius:10px;padding:12px;background:#102531;color:#bed5e2}
.chat.chat-guided #messages .candidate-choice strong{color:#bed5e2;overflow-wrap:anywhere}
.chat.chat-guided #messages .candidate-choice .candidate-facts{color:#9eb8c8;line-height:1.75;overflow-wrap:anywhere}
.chat.chat-guided #messages .candidate-choice .candidate-tradeoff{color:#d8c69d;line-height:1.75;overflow-wrap:anywhere}
.chat.chat-guided #messages .candidate-choice .candidate-choose{background:#102b3b;color:#bdd9e5;border-color:#315363}
.chat.chat-guided #messages .candidate-choice .candidate-choose:hover{background:#1c3b4c}
.chat.chat-guided #messages .candidate-choice .candidate-choose:focus-visible{outline:2px solid #72d9bd;outline-offset:2px}
.chat.chat-guided #messages .guided-v02-evidence td:first-child{overflow-wrap:anywhere;word-break:normal}
