/* Global readability floor. Loaded last so legacy 6-9px labels stay legible. */
body{font-size:13px;line-height:1.5}
small{font-size:10px!important;line-height:1.45}
.rail-item{font-size:11px}.wordmark span,.account-button small,.market-pulse small{font-size:10px}.wordmark strong{font-size:16px}.account-button b,.market-pulse b{font-size:12px}
.mode-badge{font-size:10px}.top-role-badge,.top-vip-badge,.membership-vip-badge,.user-role-mark{font-size:9px;line-height:18px}.top-role-badge[hidden]{display:none}
.page-head h1{font-size:27px}.page-head p:last-child{font-size:12px;line-height:1.55}.eyebrow{font-size:10px}.panel-head{min-height:60px}.panel-head h2{font-size:15px}.panel-head p{font-size:11px;line-height:1.5}
.button{min-height:40px;font-size:12px}.button.small{min-height:34px;font-size:11px}.link-button{font-size:11px}.icon-button{font-size:12px}
.field{gap:7px}.field label{font-size:11px}.input-wrap{height:42px}.input-wrap input,.input-wrap select{font-size:12px}.input-wrap span,.range-value{font-size:10px}
.tabs button{min-height:48px;font-size:12px}.segmented button,.chart-controls button{font-size:11px}
.data-table th{font-size:11px}.data-table td{font-size:12px;line-height:1.45}.side-pill,.status-pill,.admin-status,.platform-deposit-status,.live-provider-status{font-size:10px}
.empty b{font-size:14px}.empty p{font-size:11px;line-height:1.6}.stat span{font-size:11px}.stat small{font-size:10px!important}.ticker-tile b{font-size:12px}.ticker-tile small{font-size:10px!important}
.modal h2{font-size:19px}.modal p{font-size:12px;line-height:1.7}.modal .field label{font-size:11px}.modal-actions .button{font-size:12px}
.toast-stack{right:24px;bottom:24px;gap:10px}.toast{min-width:300px;max-width:460px;padding:15px 17px;font-size:13px;line-height:1.65;border-left-width:4px}

/* Strategy editor and function library. */
.editor-panel .panel-head{min-height:64px}.editor-toolbar{gap:9px}.editor-toolbar .input-wrap{height:36px;width:142px}.editor-view-tabs{min-height:54px;padding:7px 18px;gap:8px}.editor-view-tabs button{height:38px;padding:0 14px;font-size:12px}.editor-view-tabs button i{font-size:12px}.editor-view-tabs button small{min-width:36px;padding:3px 6px;font-size:10px!important}
.condition-area,.backtest-settings{padding:19px}.syntax-strip{min-height:42px;gap:8px;margin-bottom:14px}.syntax-strip code{padding:6px 9px;font-size:11px;line-height:1.45}.syntax-strip span{font-size:11px}.editor-field>span{padding:11px 13px;font-size:12px}.editor-field small{padding:9px 12px;font-size:10px!important;line-height:1.55}.code-editor{padding:13px;font-size:12px;line-height:1.75}.code-editor.unified{height:390px;min-height:280px;font-size:13px;line-height:1.8}
.editor-library{margin-bottom:15px}.library-head{height:46px;padding:0 13px}.library-head b{font-size:13px}.library-head button{width:32px;height:32px;font-size:13px}.library-controls{padding:12px 12px 10px}.library-search{height:42px;grid-template-columns:38px minmax(0,1fr) 36px}.library-search input{height:40px;font-size:12px}.library-search>i{font-size:11px}.library-result-count{font-size:10px}.library-categories{padding:0 12px 11px;gap:7px}.library-category-button{height:34px;padding:0 12px;font-size:11px}.library-grid{gap:9px;padding:12px;max-height:520px}.library-grid button{min-height:78px;padding:12px}.library-grid span{margin-bottom:7px;font-size:12px}.library-grid code{font-size:11px;line-height:1.55}.library-grid small{right:9px;top:9px;font-size:10px!important}.library-empty-state{font-size:11px}
.strategy-autocomplete button{min-height:46px;padding:8px 10px}.strategy-autocomplete code{font-size:12px}.strategy-autocomplete span{font-size:11px}.strategy-autocomplete small{font-size:10px!important}
.backtest-settings h3{font-size:14px}.backtest-mode-checks label{min-height:42px;font-size:11px}.backtest-settings .field small,.editor-backtest-running small{font-size:10px!important}.backtest-earliest-button{font-size:11px}
.editor-layout{grid-template-columns:minmax(0,1.15fr) minmax(460px,.85fr)}
.backtest-settings{padding:22px}
.backtest-settings>.field-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.backtest-settings .field,.backtest-settings .input-wrap{min-width:0;width:100%}
.backtest-setting-note{margin:-2px 0 14px;color:var(--muted);font-size:10px;line-height:1.6}
.backtest-setting-note.risk{padding:10px 11px;border-left:3px solid var(--amber);background:rgba(234,184,77,.06)}
.backtest-setting-note.risk i,.strategy-backtest-risk-note i{margin-right:7px;color:var(--amber)}
.strategy-backtest-settings{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.strategy-backtest-settings .field,.strategy-backtest-settings .input-wrap{min-width:0;width:100%}
.strategy-backtest-risk-note{grid-column:1/-1;margin:0;padding:10px 12px;border-left:3px solid var(--amber);background:rgba(234,184,77,.06);color:var(--muted);font-size:10px;line-height:1.6}
.strategy-backtest-settings>.button{grid-column:4;width:100%}
@media(max-width:1180px){.editor-layout{grid-template-columns:1fr}.condition-area{border-right:0;border-bottom:1px solid var(--line)}}
@media(max-width:900px){.strategy-backtest-settings{grid-template-columns:repeat(2,minmax(0,1fr))}.strategy-backtest-settings>.button{grid-column:2}}
@media(max-width:560px){.strategy-backtest-settings{grid-template-columns:1fr}.strategy-backtest-settings>.button{grid-column:1}.backtest-settings{padding:16px}}
.filter-toggle{height:46px}.filter-toggle>span:first-child,.filter-title-row>span{font-size:11px}.filter-toggle>span:nth-child(2),.filter-title-row small{font-size:10px!important}.filter-matrix-head,.filter-matrix footer{font-size:10px}.filter-row{font-size:11px}.filter-option{min-height:42px}.filter-option span{font-size:11px}.filter-option small{font-size:10px!important}.selected-filters>span,.selected-filter-chip{font-size:10px}.selected-filter-chip{height:30px}.selected-filter-details header b{font-size:11px}.selected-filter-details header span,.selected-filter-details p,.selected-filter-details dt,.selected-filter-details dd{font-size:10px}
.editor-result-head small,.editor-metrics span,.equity-chart-summary span,.equity-crosshair-tooltip time,.equity-crosshair-tooltip span{font-size:10px!important}.editor-metrics b{font-size:14px}.equity-crosshair-tooltip{width:185px;padding:10px 11px}.equity-crosshair-tooltip b{font-size:12px}.editor-trade-pagination>span{font-size:11px}
.editor-equity canvas,.strategy-backtest-equity canvas{cursor:grab}.editor-equity canvas.is-dragging,.strategy-backtest-equity canvas.is-dragging{cursor:grabbing}

/* Help, explanations, system panels and account details. */
.help-welcome p,.help-search input{font-size:12px}.help-navigation button{min-height:54px;font-size:11px}.help-section-title small,.help-category-head small{font-size:10px!important}.help-section-title>span{font-size:10px}.help-category-head{min-height:88px}.help-category-head p{font-size:11px}.help-category summary{padding:16px 5px;font-size:13px}.help-detail-body{font-size:12px;line-height:1.85}.help-detail-body code:not(.help-code code){font-size:11px}.help-code code{font-size:12px}.help-callout b{font-size:13px}.help-callout p{font-size:11px}.help-indicator-table span,.help-indicator-table b,.help-platform-table span,.help-platform-table b{padding:12px 14px;font-size:11px}.help-no-results b{font-size:13px}.help-no-results span{font-size:11px}
.strategy-access-banner{min-height:62px;padding:12px 14px}.strategy-access-banner b{font-size:12px}.strategy-access-banner small{font-size:10px!important;white-space:normal}.membership-identity>div>span,.membership-normal-badge,.membership-status span,.membership-status small,.membership-plan-option small,.membership-plan-option>strong em{font-size:10px!important}.membership-status b{font-size:12px}
.platform-wallet-summary>div>span,.platform-wallet-summary strong em,.platform-wallet-summary small,.platform-wallet-actions button{font-size:11px}.platform-wallet-actions button{min-width:94px;height:64px}.platform-deposit-payment-head p,.platform-deposit-amount>span,.platform-deposit-info dt,.platform-deposit-info dd,.platform-deposit-countdown span,.platform-withdrawal-balance span{font-size:11px}.platform-deposit-message,.platform-record-summary,.admin-credit-warning,.admin-affiliate-note{font-size:10px;line-height:1.6}.platform-record-summary b,.platform-record-section h3{font-size:12px}
.admin-search-select>input{font-size:12px}.admin-search-menu span{font-size:12px}.admin-search-menu small{font-size:10px!important}.admin-user-identity b{font-size:13px}.admin-user-identity small,.admin-stats span,.admin-stats small,.admin-wallet-metrics span,.admin-wallet-metrics small,.admin-user-metrics span,.admin-strategy-meta small,.admin-affiliate-metrics span,.admin-affiliate-metrics small,.admin-system-panel dt,.admin-system-panel dd{font-size:10px!important}.admin-code-preview{font-size:12px;line-height:1.7}
.partner-role-banner b,.partner-share-metrics b{font-size:12px}.partner-role-banner small,.partner-stats span,.partner-stats small,.partner-sync-control small,.partner-recipient-list small,.partner-public-note{font-size:10px!important}.partner-share-state,.partner-share-card code,.partner-share-metrics span,.partner-recipient-list summary{font-size:10px}.partner-sync-control b,.partner-recipient-list b{font-size:11px}
.live-security-note b,.risk-latched b{font-size:12px}.live-security-note small,.live-provider-row header p,.live-provider-fields label,.live-provider-row>footer small,.risk-latched small,.live-risk-settings .field>small{font-size:10px!important}.live-provider-fields input{font-size:12px}

/* AI status, chat bubbles and model settings. */
.ai-safety{height:40px;font-size:11px}.ai-skill b{font-size:12px}.ai-skill small,.ai-chat-head small,.ai-execution-status small,.ai-welcome p,.ai-message header,.ai-message header em,.ai-ensemble summary,.ai-ensemble-members section>p,.ai-ensemble-members section>p strong,.ai-context-row label,.ai-agent-mode,.ai-compose-actions small,.ai-network-note small,.ai-provider-state,.ai-provider-fields>label,.ai-provider-fields>label>small,.ai-tool-row small,.ai-audit-row small{font-size:10px!important}.ai-chat-head b,.ai-execution-status b,.ai-network-note b,.ai-provider-toggle b{font-size:12px}.ai-execution-status{min-height:50px}.ai-execution-status time{font-size:10px}.ai-message-content{padding:14px 15px;font-size:13px;line-height:1.75}.ai-message-content code{font-size:11px}.ai-composer textarea,.ai-config-form textarea{font-size:12px;line-height:1.65}.ai-context-row label{height:34px}.ai-context-row select{font-size:11px}.ai-compose-actions .button{height:38px}.ai-config-head-actions .button{height:34px;font-size:10px}.ai-provider-fields input:not([type=checkbox]){height:38px;font-size:11px}.ai-tool-row b,.ai-audit-row b{font-size:11px}

/* Chart DOM controls. Canvas geometry and pointer coordinates are untouched. */
.chart-tool,.chart-action,.chart-indicator-picker select,.chart-indicator-picker select option,.chart-indicator-picker select optgroup,.chart-indicator-picker>input,.chart-tool-menu header b,.chart-tool-option,.chart-tool-status,.chart-object-manager-title b,.chart-object-item b,.chart-object-item small,.chart-tool-level-head small,.chart-tool-level-visible{font-size:11px}.chart-drawing-legend-row,.chart-drawing-legend-row b{font-size:12px}.market-chart-metrics small{font-size:10px!important}.market-chart-metrics b{font-size:12px}

@media(min-width:1600px){body{font-size:14px}small{font-size:11px!important}.panel-head h2{font-size:16px}.panel-head p,.page-head p:last-child{font-size:12px}.button{font-size:13px}.button.small{font-size:12px}.data-table th{font-size:12px}.data-table td{font-size:13px}.toast{font-size:14px}.library-grid span,.code-editor{font-size:13px}.library-grid code{font-size:12px}.library-grid small{font-size:11px!important}.code-editor.unified{font-size:14px}.help-detail-body{font-size:13px}.ai-message-content{font-size:14px}}
@media(min-width:2560px){body{font-size:15px}small{font-size:12px!important}.panel-head h2{font-size:18px}.panel-head p,.page-head p:last-child{font-size:14px}.button{font-size:14px}.button.small{font-size:13px}.data-table th{font-size:13px}.data-table td{font-size:14px}.toast{font-size:15px}.library-grid span,.code-editor{font-size:14px}.library-grid code{font-size:13px}.library-grid small{font-size:12px!important}.code-editor.unified{font-size:15px}.help-detail-body{font-size:14px}.ai-message-content{font-size:15px}}

@media(max-width:820px){.page-head h1{font-size:23px}.panel-head{min-height:56px}.button{min-height:38px}.toast-stack{left:12px;right:12px;bottom:76px}.toast{min-width:0;max-width:none;width:100%;font-size:12px}.library-grid{max-height:470px}.library-grid button{min-height:74px}.help-category summary{font-size:12px}}
@media(max-width:480px){small{font-size:10px!important}.library-grid{grid-template-columns:1fr}.editor-view-tabs button{font-size:11px}.code-editor.unified{height:340px}.data-table th{font-size:10px}.data-table td{font-size:11px}}
