.scanner-portfolio-builder{--sp-line:rgba(148,163,184,.18);--sp-accent:var(--accent,#2962ff);color:var(--text,#e2e8f0);font:12px/1.55 system-ui,sans-serif;padding:16px 14px;min-width:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}.scanner-portfolio-builder[hidden]{display:none!important}.scanner-portfolio-active .ai-chat-thread,.scanner-portfolio-active [data-ai-session-context]{display:none!important}.scanner-portfolio-active .ai-chat-composer>:not(.ai-request-strategy-menu){display:none!important}.scanner-portfolio-active .ai-chat-workspace{overflow:auto!important;display:block!important}.sp-header{padding-bottom:16px;border-bottom:1px solid var(--sp-line)}.sp-eyebrow{font-size:9px;font-weight:750;letter-spacing:.15em;color:var(--sp-accent)}.sp-header h2{font-size:23px;line-height:1.2;letter-spacing:-.04em;margin:8px 0}.sp-header p,.sp-caption{color:#94a3b8;margin:7px 0}.sp-form{padding:16px 0;border-bottom:1px solid var(--sp-line)}.sp-form label{display:flex;flex-direction:column;gap:5px;font-size:11px;color:#cbd5e1}.sp-field-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}.scanner-portfolio-builder input:not([type=checkbox]),.scanner-portfolio-builder select{box-sizing:border-box;width:100%;min-width:0;height:37px;padding:6px 9px;border:1px solid #334155;border-radius:7px;color:#e2e8f0;background:#101b2d;font:inherit}.scanner-portfolio-builder button{font:inherit;min-height:36px;padding:7px 11px;border:1px solid #334155;border-radius:7px;color:#e2e8f0;background:#18263b;cursor:pointer}.scanner-portfolio-builder button:hover:not(:disabled){border-color:var(--sp-accent)}.scanner-portfolio-builder :is(button,input,select,summary):focus-visible{outline:2px solid var(--sp-accent);outline-offset:3px}.scanner-portfolio-builder button:disabled{opacity:.45;cursor:not-allowed}.scanner-portfolio-builder .sp-primary{width:100%;margin-top:10px;background:var(--sp-accent);color:#fff;border:0;font-weight:750;min-height:42px}.sp-links{display:flex;gap:8px;margin:12px 0}.sp-links button{font-size:11px;flex:1}.sp-message:empty{display:none}.sp-message,.sp-warning{color:#fbbf24}.sp-message{padding:12px 0}.sp-empty{margin:22px 0;padding:18px;border:1px dashed #334155;border-radius:10px;color:#94a3b8}.sp-empty strong{color:#e2e8f0}.sp-section-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:18px}.sp-section-heading h3{font-size:16px;margin:0}.sp-badge{font-size:9px;border:1px solid #334155;border-radius:20px;padding:3px 7px}.sp-summary{font-size:12px;color:#cbd5e1}.sp-metrics{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:14px 0 8px}.sp-metrics>div{padding:10px;background:rgba(41,98,255,.06);border:1px solid var(--sp-line);border-radius:8px}.sp-metrics span{display:block;color:#94a3b8;font-size:9px}.sp-metrics strong{display:block;font-variant-numeric:tabular-nums;font-size:15px;overflow-wrap:anywhere}.sp-table-wrap{overflow:auto;border:1px solid var(--sp-line);border-radius:8px;margin:14px 0}.sp-table-wrap table{border-collapse:collapse;width:100%;font-size:11px;white-space:nowrap;font-variant-numeric:tabular-nums}.sp-table-wrap th,.sp-table-wrap td{padding:9px 7px;border-bottom:1px solid var(--sp-line);text-align:right}.sp-table-wrap th:first-child{text-align:left}.sp-table-wrap thead{color:#94a3b8;font-size:9px}.sp-table-wrap tbody tr:last-child{background:rgba(41,98,255,.08)}.sp-plan details{padding:12px 0;border-bottom:1px solid var(--sp-line)}.sp-plan summary{cursor:pointer;font-weight:650}.sp-plan details p{color:#94a3b8}.sp-plan dl{display:grid;grid-template-columns:1fr auto;gap:8px;font-size:10px}.sp-plan dd{margin:0;text-align:right}.sp-plan h4{font-size:13px;margin:17px 0 8px}.sp-order{border:1px solid var(--sp-line);border-radius:8px;padding:11px;margin:8px 0}.sp-order>div{display:flex;justify-content:space-between;gap:8px}.sp-order strong{font-size:13px}.sp-order p{font-size:10px;margin:6px 0}.sp-order small{font-size:9px;color:#94a3b8}.sp-confirm{display:flex;gap:10px;align-items:flex-start;margin:14px 0;font-size:11px}.sp-confirm input{width:17px;height:17px;flex-shrink:0;accent-color:var(--sp-accent);margin:2px 0}.sp-danger{padding:10px;border:1px solid #f87171;color:#fca5a5;border-radius:7px}.sp-expiry{font-size:10px;color:#94a3b8;margin:15px 0 4px}.sp-plan ul{padding-left:16px;overflow-wrap:anywhere}@media(max-width:480px){.scanner-portfolio-builder{padding:14px 10px}.sp-header h2{font-size:21px}.sp-field-grid{gap:9px}.sp-table-wrap th,.sp-table-wrap td{padding:8px 5px}}

/* Portfolio mode owns the chat panel; keep the term picker outside its scroll area. */
body.scanner-portfolio-active .side-terminal-panel[data-side-terminal-panel="ai"] .ai-chat-panel .ai-chat-section:not([hidden]):not(.is-feature-locked){
  display:flex!important;flex-direction:column!important;gap:0!important;min-height:0!important;overflow:hidden!important;
}
body.scanner-portfolio-active .side-terminal-panel[data-side-terminal-panel="ai"] .ai-chat-panel .ai-chat-section:not([hidden]):not(.is-feature-locked) > .ai-chat-composer{
  display:block!important;order:-1;flex:0 0 auto!important;align-self:stretch!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important;padding:12px 14px!important;border:0;border-bottom:1px solid #334155;background:#131722;box-shadow:none!important;
}
body.scanner-portfolio-active .side-terminal-panel[data-side-terminal-panel="ai"] .ai-chat-panel .ai-chat-section:not([hidden]):not(.is-feature-locked) > .ai-chat-composer > :not(.ai-request-strategy-menu),
body.scanner-portfolio-active .side-terminal-panel[data-side-terminal-panel="ai"] .ai-chat-panel .ai-chat-section:not([hidden]):not(.is-feature-locked) > .ai-panel-context-shortcuts,
body.scanner-portfolio-active .side-terminal-panel[data-side-terminal-panel="ai"] .ai-chat-panel .ai-chat-section:not([hidden]):not(.is-feature-locked) .ai-chat-workspace > :not(.scanner-portfolio-builder){
  display:none!important;
}
body.scanner-portfolio-active .side-terminal-panel[data-side-terminal-panel="ai"] .ai-chat-panel .ai-chat-section:not([hidden]):not(.is-feature-locked) > .ai-chat-workspace{
  display:block!important;position:relative!important;flex:1 1 0!important;min-height:0!important;height:auto!important;max-height:none!important;width:100%!important;overflow:hidden!important;background:#131722;
}
body.scanner-portfolio-active .scanner-portfolio-builder:not([hidden]){
  position:absolute;inset:0;box-sizing:border-box;width:100%;height:100%;min-height:0;max-height:none;overflow-x:hidden;overflow-y:auto;scrollbar-gutter:stable;scroll-padding:16px;background:#131722;font-size:14px;line-height:1.6;padding:18px 16px;
}
.scanner-portfolio-builder .sp-form label{font-size:13px;line-height:1.5;color:#dbe3ef}
.scanner-portfolio-builder :is(input:not([type=checkbox]),select){height:44px;font-size:14px;background:#1b2535;border-color:#506078}
.scanner-portfolio-builder button{min-height:44px;font-size:13px}
.scanner-portfolio-builder .sp-primary{min-height:46px}
.scanner-portfolio-builder .sp-links{flex-wrap:wrap}
.scanner-portfolio-builder .sp-links button{font-size:12px}
.scanner-portfolio-builder .sp-header p,.scanner-portfolio-builder .sp-caption{color:#b9c5d7}
@media(max-width:760px){
  .scanner-portfolio-builder :is(input:not([type=checkbox]),select){font-size:16px}
  body.scanner-portfolio-active .scanner-portfolio-builder:not([hidden]){padding:16px 12px}
}
@media(max-width:360px){.scanner-portfolio-builder .sp-field-grid{grid-template-columns:minmax(0,1fr)}}

/* Keep portfolio actions in the terminal's blue, charcoal and border palette. */
.scanner-portfolio-builder button{background:#1e2635;border-color:#3c4960;border-radius:8px;transition:background .15s,border-color .15s}
.scanner-portfolio-builder button:hover:not(:disabled){background:#25334c;border-color:#6385de}
.scanner-portfolio-builder .sp-primary{background:var(--sp-accent);color:#fff;border:1px solid transparent}
.scanner-portfolio-builder .sp-primary:hover:not(:disabled){background:#2559e5}
.scanner-portfolio-builder .sp-settings{border-bottom:1px solid var(--sp-line);padding:14px 0}
.scanner-portfolio-builder .sp-settings>summary{cursor:pointer;font-weight:650;color:#dbe3ef;font-size:14px;min-height:32px}
.scanner-portfolio-builder .sp-form{border:0;padding-bottom:0}
.scanner-portfolio-builder .sp-summary{font-size:14px;color:#dbe3ef;white-space:pre-wrap;overflow-wrap:anywhere}
.scanner-portfolio-builder .sp-plan:focus{outline:0}
.scanner-portfolio-builder .sp-deployment{padding:8px 0 14px;border-bottom:1px solid var(--sp-line)}
.scanner-portfolio-builder .sp-deployment p{font-size:12px;color:#b9c5d7}
.scanner-portfolio-builder .sp-stages{list-style:none;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:14px 0}
.scanner-portfolio-builder .sp-stages li{padding:10px;border:1px solid var(--sp-line);border-radius:8px;min-width:0;background:#1a2130}
.scanner-portfolio-builder .sp-stages .is-current{border-color:#527adf;background:rgba(41,98,255,.1)}
.scanner-portfolio-builder .sp-stages strong,.scanner-portfolio-builder .sp-stages span,.scanner-portfolio-builder .sp-stages time{display:block;overflow-wrap:anywhere}
.scanner-portfolio-builder .sp-stages strong{font-size:13px;color:#e2e8f0}
.scanner-portfolio-builder .sp-stages span,.scanner-portfolio-builder .sp-stages time{font-size:11px;color:#b9c5d7}
.scanner-portfolio-builder .sp-followup{margin-top:22px;padding:16px 0;border-top:1px solid var(--sp-line)}
.scanner-portfolio-builder .sp-followup h3{font-size:16px;margin:14px 0}
.scanner-portfolio-builder .sp-followup label{display:block;font-size:13px;margin:12px 0 6px}
.scanner-portfolio-builder textarea{box-sizing:border-box;width:100%;min-height:104px;max-height:260px;resize:vertical;background:#1b2535;border:1px solid #506078;border-radius:8px;color:#e2e8f0;padding:12px;font-family:inherit;font-size:14px;line-height:1.6}
.scanner-portfolio-builder textarea:focus-visible{outline:2px solid var(--sp-accent);outline-offset:2px}
.scanner-portfolio-builder .sp-user-question{background:#243146;border-radius:8px;padding:12px;white-space:pre-wrap;overflow-wrap:anywhere}
.scanner-portfolio-builder .sp-conversation article{border-bottom:1px solid var(--sp-line);padding:10px 0}
@media(max-width:760px){.scanner-portfolio-builder textarea{font-size:16px}}
@media(prefers-reduced-motion:reduce){.scanner-portfolio-builder button{transition:none}}
.scanner-portfolio-builder .sp-ai-settings{margin-top:10px;width:100%}
.scanner-portfolio-builder .sp-plan>h4{font-size:15px}
.scanner-portfolio-builder .sp-plan>details{font-size:13px}

/* Portfolio plans: prices first; supporting reasoning stays expandable. */
.sp-report{--sp-line:var(--kriptom-border,#303846);--sp-text:var(--kriptom-text,#d1d4dc);--sp-muted:var(--kriptom-muted,#a4acbb);--sp-bg:var(--kriptom-control,#131722);color:var(--sp-text);font:14px/1.55 system-ui,sans-serif;min-width:0;overflow-wrap:anywhere}
.sp-report .sp-report-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap;margin:16px 0 12px}
.sp-report .sp-report-head h3{font-size:24px;line-height:1.3;margin:6px 0;color:var(--kriptom-heading,#f0f3fa);font-variant-numeric:tabular-nums}
.sp-report .sp-report-head h3 small{font-size:13px;font-weight:500;color:var(--sp-muted)}
.sp-report .sp-lead{font-size:14px;line-height:1.65;color:var(--sp-text);margin:12px 0}
.sp-report .sp-caption{font-size:12px;line-height:1.5;color:var(--sp-muted);margin:6px 0}
.sp-report .sp-report-tags{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}
.sp-report .sp-report-tags>span{font-size:11px;padding:5px 8px;background:var(--kriptom-hover,#1e2330);border:1px solid var(--sp-line);border-radius:5px}
.sp-report button,.sp-history button,.sp-report-dialog button{min-height:40px;font:600 12px/1.5 system-ui,sans-serif;color:var(--kriptom-text,#d1d4dc);background:var(--kriptom-control,#131722);border:1px solid var(--kriptom-border,#303846);border-radius:7px;padding:8px 12px;cursor:pointer}
.sp-report button:hover,.sp-history button:hover,.sp-report-dialog button:hover{border-color:#6385de;background:var(--kriptom-hover,#1e2330)}
.sp-report button:focus-visible,.sp-report summary:focus-visible,.sp-history button:focus-visible,.sp-report-dialog button:focus-visible{outline:2px solid #8eafff;outline-offset:2px}
.sp-report .sp-chart-button{display:block;width:100%;text-align:left;padding:16px;margin:12px 0;background:var(--sp-bg)}
.sp-chart-button>small{display:block;margin-top:12px;font-size:11px;color:var(--sp-muted)}
.sp-allocation-chart{display:grid;gap:8px;min-width:0}
.sp-allocation-chart>div{display:grid;grid-template-columns:minmax(40px,72px) minmax(0,1fr) 54px;align-items:center;gap:12px;font-size:12px}
.sp-allocation-chart span{overflow:hidden;text-overflow:ellipsis;font-weight:650}.sp-allocation-chart strong{text-align:right;font-variant-numeric:tabular-nums}
.sp-allocation-chart i{height:6px;border-radius:3px;background:var(--kriptom-border,#303846);overflow:hidden}.sp-allocation-chart b{display:block;height:100%;background:#6385de;border-radius:3px}.sp-allocation-chart b.is-cash{background:#8993a7}
.sp-report>h4{font-size:16px;margin:24px 0 6px}.sp-report .sp-asset-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:12px;margin:14px 0 20px}
.sp-report .sp-asset-card{min-width:0;padding:15px;background:var(--sp-bg);border:1px solid var(--sp-line);border-radius:9px}
.sp-asset-card>header{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.sp-asset-card>header strong{font-size:17px;color:var(--kriptom-heading,#f0f3fa)}.sp-asset-card>header b{font-size:15px;font-variant-numeric:tabular-nums;color:#a6bdff}.sp-asset-card>header small{display:block;font-size:10px;color:var(--sp-muted);margin-top:3px}.sp-asset-card .sp-ai-badge{margin-left:8px;border:1px solid #43567e;border-radius:4px;padding:1px 5px;font-size:10px;color:#b2c8ff;vertical-align:middle}
.sp-report .sp-asset-card dl{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px 12px;margin:18px 0}.sp-asset-card dl>div{min-width:0}.sp-report .sp-asset-card dt{font-size:11px;color:var(--sp-muted);margin-bottom:4px}.sp-report .sp-asset-card dd{margin:0;text-align:left;font-size:16px;line-height:1.35;font-weight:650;font-variant-numeric:tabular-nums;color:var(--kriptom-heading,#f0f3fa);overflow-wrap:anywhere}.sp-asset-card dd small{font-size:10px;font-weight:400;color:var(--sp-muted)}.sp-report .sp-stop dd{color:#ff929f}.sp-report .sp-target dd{color:#6cdbc3}
.sp-asset-card footer{display:flex;gap:8px;flex-wrap:wrap;justify-content:space-between;padding-top:12px;border-top:1px solid var(--sp-line);font-size:11px;color:var(--sp-muted);font-variant-numeric:tabular-nums}
.sp-report .sp-detail{border-top:1px solid var(--sp-line);border-bottom:0;padding:13px 0;font-size:13px}.sp-detail summary{cursor:pointer;font-weight:600;color:var(--sp-text);line-height:1.6}.sp-detail p{white-space:pre-wrap;color:var(--sp-muted);line-height:1.65}.sp-report .sp-purchase-list{list-style:none;padding:0;margin:12px 0;display:grid;gap:9px}.sp-purchase-list li{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:12px}.sp-report .sp-model-metrics{display:grid;grid-template-columns:1fr auto;gap:10px;font-size:12px}.sp-report .sp-model-metrics dd{margin:0}.sp-report .sp-warning{font-size:12px;color:#edc77c}.sp-report .sp-ask{width:100%;margin:12px 0 0}
.sp-history{box-sizing:border-box;padding:14px 0;margin-bottom:18px;border-bottom:1px solid var(--kriptom-border,#303846);color:var(--kriptom-text,#d1d4dc);font:13px/1.5 system-ui,sans-serif}.sp-history[hidden]{display:none}.sp-history>header{display:flex;align-items:center;justify-content:space-between;gap:12px}.sp-history h3{font-size:15px;margin:0}.sp-history .sp-caption{font-size:12px;color:var(--kriptom-muted,#a4acbb)}.sp-history-list{display:grid;gap:8px}.sp-history-list>button{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 10px;min-width:0;width:100%;padding:12px;text-align:left}.sp-history-list>button>span:first-child{display:grid;gap:5px;min-width:0}.sp-history-list small{font-weight:400;color:var(--kriptom-muted,#a4acbb);font-size:11px}.sp-history-symbols{grid-column:1;font-size:11px;color:#a6bdff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sp-history-list>button>b{grid-column:2;grid-row:1 / 3;align-self:center;font-size:17px}
.sp-report-dialog{box-sizing:border-box;position:fixed;inset:0;margin:auto;padding:0;width:min(980px,calc(100vw - 32px));height:min(920px,calc(100dvh - 40px));max-width:none;max-height:none;background:var(--kriptom-panel,#0e1119);border:1px solid var(--kriptom-border,#303846);border-radius:12px;color:var(--kriptom-text,#d1d4dc);overflow:hidden}
.sp-report-dialog[open]{display:flex;flex-direction:column}.sp-report-dialog::backdrop{background:rgba(0,0,0,.72);backdrop-filter:blur(5px)}.sp-dialog-toolbar{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;padding:14px 18px;border-bottom:1px solid var(--kriptom-border,#303846);font:600 13px/1.4 system-ui,sans-serif}.sp-dialog-toolbar>div{display:flex;gap:8px}.sp-dialog-toolbar [data-sp-pdf]{background:#2962ff;border-color:#2962ff;color:white}.sp-dialog-toolbar [data-sp-close]{font-size:20px;min-width:40px}.sp-report-scroll{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;padding:4px 24px 24px}.sp-pdf-status{flex:0 0 auto;margin:0;padding:0 18px;color:#a6bdff;font:12px/1.6 system-ui,sans-serif}.sp-pdf-status:not(:empty){padding:10px 18px}.sp-saved-conversation article{padding:12px 0;border-bottom:1px solid var(--kriptom-border,#303846)}.sp-saved-conversation h5{font-size:14px;white-space:pre-wrap}.sp-saved-conversation p{white-space:pre-wrap;font-size:13px;color:var(--kriptom-muted,#a4acbb)}
@media(max-width:600px){.sp-report-dialog{width:calc(100vw - 12px);height:calc(100dvh - 16px);border-radius:9px}.sp-dialog-toolbar{padding:10px 12px}.sp-report-scroll{padding:0 12px 20px}.sp-report .sp-report-head h3{font-size:22px}.sp-report .sp-asset-card{padding:13px}.sp-report .sp-asset-card dd{font-size:15px}}

/* Keep portfolio and chat history in the existing third grid row. */
.sp-history-scroll{height:100%;min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;padding:0 8px;box-sizing:border-box}
.side-terminal-panel[data-side-terminal-panel="ai"] .ai-history-section .sp-history-scroll>.ai-history-list{height:auto!important;min-height:0!important;overflow:visible!important}

.scanner-portfolio-builder .sp-billing-link{display:block;width:fit-content;max-width:100%;box-sizing:border-box;margin-top:12px;padding:10px 14px;border:1px solid var(--kriptom-border,#303846);border-radius:7px;background:var(--kriptom-control,#131722);color:var(--kriptom-text,#d1d4dc);font:600 12px/1.5 system-ui,sans-serif;text-decoration:none;overflow-wrap:anywhere}
.scanner-portfolio-builder .sp-billing-link:hover{border-color:#6385de;background:var(--kriptom-hover,#1e2330)}
.scanner-portfolio-builder .sp-billing-link:focus-visible{outline:2px solid #8eafff;outline-offset:2px}

/* The order review stays inside the portfolio overlay on every screen size. */
.scanner-portfolio-builder .sp-entry{margin:24px 0;padding:18px;border:1px solid var(--sp-line);border-radius:10px;background:var(--kriptom-control,#131722);min-width:0;overflow-wrap:anywhere}
.sp-entry h3{margin:6px 0 12px;font-size:18px;line-height:1.4}.sp-entry>label{display:grid;gap:8px;margin:16px 0;font-size:13px}.sp-entry select{width:100%;min-width:0;box-sizing:border-box}.sp-entry .sp-links{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.sp-entry-status{font-size:13px;color:var(--sp-text);white-space:pre-wrap}.sp-entry-status:empty{display:none}.sp-entry-totals{display:grid;gap:8px;padding:16px 0;border-block:1px solid var(--sp-line);font-size:13px;font-variant-numeric:tabular-nums}.sp-entry-totals strong{font-size:17px}.sp-entry-totals small{color:var(--sp-muted)}
.sp-entry-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));gap:10px;margin:16px 0}.sp-entry-grid article{padding:14px;border:1px solid var(--sp-line);border-radius:8px;min-width:0;background:var(--kriptom-panel,#0e1119)}.sp-entry-grid dl{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px 10px;margin:14px 0 0}.sp-entry-grid dt{font-size:11px;color:var(--sp-muted)}.sp-entry-grid dd{font-size:14px;margin:4px 0 0;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.sp-entry-grid .sp-stop dd{color:#ff929f}.sp-entry-grid .sp-target dd{color:#6cdbc3}.sp-entry-grid p{font-size:11px;border-top:1px solid var(--sp-line);padding-top:10px;margin-bottom:0}.sp-entry-warning{color:#edc77c;font-size:12px;line-height:1.6}.sp-entry-warning ul{padding-left:18px}
.scanner-portfolio-builder .sp-entry-consent{display:flex;align-items:flex-start;gap:10px;line-height:1.5}.scanner-portfolio-builder .sp-entry-consent input{width:18px;height:18px;min-height:18px;flex:0 0 18px;margin:3px 0 0;padding:0;accent-color:#6385de}.sp-entry>button.sp-primary{width:100%;min-height:44px}.sp-entry button:disabled{cursor:not-allowed;opacity:.55}
@media(max-width:600px){.scanner-portfolio-builder .sp-entry{padding:13px}.sp-entry .sp-links>button{flex:1 1 130px}.sp-entry select{font-size:16px}}
/* Portfolio exchange review uses the native top layer to stay above chat/chart overlays. */
.sp-entry-dialog{color:var(--text-primary,#d1d4dc);background:var(--bg-primary,#131722);border:1px solid var(--border-color,#303540);border-radius:14px;width:min(760px,calc(100vw - 32px));max-height:calc(100dvh - 40px);padding:0;box-shadow:0 24px 80px #0009;font:inherit;overflow:auto;overscroll-behavior:contain}
.sp-entry-dialog::backdrop{background:#04070ccd;backdrop-filter:blur(4px)}
.sp-entry-dialog-head{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 24px;border-bottom:1px solid #ffffff16;background:#131722}
.sp-entry-dialog-head h3{margin:6px 0 0;font-size:20px;line-height:1.3}.sp-entry-dialog-head h3:focus{outline:0}.sp-entry-dialog .sp-entry-close{min-width:40px;min-height:40px;font-size:25px;padding:0}
.sp-entry-dialog-body{padding:20px 24px;display:grid;gap:16px}.sp-entry-dialog-body p{margin:0}.sp-entry-settings{display:grid;grid-template-columns:1fr 1fr;gap:16px}.sp-entry-dialog label{display:grid;gap:8px;font-size:13px}.sp-entry-dialog select{width:100%;min-width:0;height:44px;padding:0 10px;border-radius:8px;background:#1d2430;border:1px solid #454b56;color:inherit;font:inherit}.sp-entry-dialog input{accent-color:#4266f5}
.sp-entry-dialog button{min-height:44px;padding:10px 16px;border:1px solid #3d4350;background:#202733;color:inherit;border-radius:8px;font:inherit;cursor:pointer}.sp-entry-dialog button:hover:not(:disabled){border-color:#707a8e;background:#2a3343}.sp-entry-dialog button:focus-visible,.sp-entry-dialog select:focus-visible,.sp-entry-dialog input:focus-visible{outline:2px solid #7293ff;outline-offset:3px}.sp-entry-dialog button:disabled{opacity:.45;cursor:default}.sp-entry-dialog .sp-primary{background:#365fe0;color:#fff;font-weight:650;border-color:#557bef}.sp-entry-dialog .sp-primary:hover:not(:disabled){background:#4169e8}
.sp-entry-dialog .sp-entry-consent{display:flex;gap:10px;align-items:flex-start;line-height:1.6}.sp-entry-dialog .sp-entry-consent input{width:18px;height:18px;flex-shrink:0;margin-top:2px}.sp-entry-dialog .sp-caption{color:#aab1c0;font-size:12px;line-height:1.6}.sp-entry-dialog .sp-entry-warning{background:#cf982812;border:1px solid #cf982835;border-radius:8px;padding:12px;color:#e8c98b;font-size:12px;line-height:1.65}
.sp-entry-balance{display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px;border:1px solid #454c60;border-radius:10px;padding:16px;background:#1b2230}.sp-entry-balance strong{font-size:20px}.sp-entry-balance b{grid-column:1/-1;font-size:13px}.sp-entry-balance span{color:#adb5c5;font-size:12px}.sp-entry-dialog .sp-stop{color:#f0a0a7}.sp-entry-dialog .sp-target{color:#8ed2b6}
.sp-entry-dialog .sp-entry-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.sp-entry-dialog article{min-width:0;padding:16px;border:1px solid #ffffff1a;background:#0e131c;border-radius:10px}.sp-entry-dialog article>strong{display:block;margin-bottom:12px}.sp-entry-dialog dl{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:0}.sp-entry-dialog dt{font-size:11px;color:#aab1c0;margin-bottom:5px}.sp-entry-dialog dd{margin:0;font-size:13px;overflow-wrap:anywhere}.sp-entry-dialog article p{font-size:12px;margin-top:12px;line-height:1.6}.sp-entry-positions{display:grid;gap:12px}.sp-entry-positions article>span{display:block;margin-bottom:12px;font-size:12px;color:#aab1c0}.sp-entry-dialog .sp-entry-status:empty{display:none}.sp-entry-dialog .sp-entry-status{font-size:14px;font-weight:600;color:#91b9ff}.sp-entry-dialog .sp-entry-totals{display:grid;gap:8px;padding-top:16px;border-top:1px solid #ffffff16}
@media(max-width:600px){.sp-entry-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:12px}.sp-entry-dialog-head{padding:16px}.sp-entry-dialog-head h3{font-size:18px}.sp-entry-dialog-body{padding:16px;gap:14px}.sp-entry-settings,.sp-entry-dialog .sp-entry-grid{grid-template-columns:1fr}.sp-entry-dialog .sp-links{display:grid;grid-template-columns:1fr}.sp-entry-balance{grid-template-columns:1fr}.sp-entry-dialog .sp-entry-consent{font-size:12px}}

.sp-entry-dialog{scrollbar-width:thin;scrollbar-color:#4b5363 #131722}.sp-entry-dialog::-webkit-scrollbar{width:8px}.sp-entry-dialog::-webkit-scrollbar-thumb{background:#4b5363;border-radius:8px}.sp-entry-dialog::-webkit-scrollbar-track{background:#131722}

.sp-entry-dialog{max-width:none;box-sizing:border-box}body:has(.sp-entry-dialog[open]){overflow:hidden}
