/* RMSP Global Light Theme Contrast R1
   Light-theme readability/contrast repair only.
   No layout, API, feed, route, risk, broker or execution behavior.
*/

/* Stronger global light tokens */
html[data-theme="light"]{
  --text:#172230;
  --soft:#31465b;
  --muted:#52677c;
  --line:#c4d2df;
  --line2:#9fb7cc;
  --gold:#955800;
  --gold2:#a76700;
  --green:#08734f;
  --red:#c92849;
  --orange:#b85a13;
}

html[data-theme="light"][data-money-mode="dummy"]{
  --text:#321018;
  --soft:#61333e;
  --muted:#7a4d58;
  --line:rgba(137,18,47,.22);
  --line2:rgba(137,18,47,.38);
  --gold:#8b5600;
  --gold2:#9d6500;
  --green:#08734f;
  --red:#b91f40;
  --orange:#a64e12;
}

/* Native form/control readability */
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea{
  color:var(--text)!important;
}
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder{
  color:var(--muted)!important;
  opacity:1!important;
}

/* Global shell/navigation */
html[data-theme="light"] .brand-text span,
html[data-theme="light"] .topnav-item:not(.active),
html[data-theme="light"] .profile-btn,
html[data-theme="light"] .side-item:not(.active),
html[data-theme="light"] .side-footer span,
html[data-theme="light"] .news-track span,
html[data-theme="light"] .system-ok{
  color:var(--soft)!important;
}
html[data-theme="light"] .topnav-item:hover,
html[data-theme="light"] .side-item:hover,
html[data-theme="light"] .profile-btn:hover{
  color:var(--text)!important;
}
html[data-theme="light"] .search input{color:var(--text)!important}
html[data-theme="light"] .icon-btn,
html[data-theme="light"] .theme-toggle{
  color:var(--text)!important;
}
html[data-theme="light"] .avatar{
  color:var(--purple)!important;
}
html[data-theme="light"] .notif{
  color:#fff!important;
}

/* Dashboard secondary copy */
html[data-theme="light"] .hero-copy p,
html[data-theme="light"] .markets-copy,
html[data-theme="light"] .hero-right>span,
html[data-theme="light"] .hero-mode,
html[data-theme="light"] .ticker-card .name,
html[data-theme="light"] .panel-head small,
html[data-theme="light"] .health-row span,
html[data-theme="light"] .ai-insight p,
html[data-theme="light"] .radar-label span,
html[data-theme="light"] .anomaly-list span,
html[data-theme="light"] .event-log span,
html[data-theme="light"] .intel-table th,
html[data-theme="light"] .option-table th,
html[data-theme="light"] .positions-table th,
html[data-theme="light"] .capital-content li,
html[data-theme="light"] .donut small,
html[data-theme="light"] .risk-card dt,
html[data-theme="light"] .view-all{
  color:var(--soft)!important;
}
html[data-theme="light"] .hero-right q{
  color:#8d5b00!important;
}
html[data-theme="light"] .hero-right b,
html[data-theme="light"] .watch-btn,
html[data-theme="light"] .positions-table td button{
  color:#8b5700!important;
}
html[data-theme="light"] .badge.buy{
  color:#08734f!important;
  background:#e8f7f0!important;
  border-color:#9bd9c1!important;
}
html[data-theme="light"] .badge.neutral{
  color:#47586b!important;
  background:#f1f5f9!important;
}
html[data-theme="light"] .risk-card h4,
html[data-theme="light"] .capital-card h4{
  color:#5d3bb8!important;
}

/* Light dashboard tab/control active states need solid enough backgrounds for white text */
html[data-theme="light"] .chart-controls button.active,
html[data-theme="light"] .tf-tabs button.active,
html[data-theme="light"] .expiry-tabs button.active,
html[data-theme="light"] .mini-tabs button.active,
html[data-theme="light"] .pill-tabs button.active,
html[data-theme="light"] .session-truth-actions button.active:not(.demo){
  background:#6547d8!important;
  border-color:#5b3bcb!important;
  color:#fff!important;
  text-shadow:none!important;
}
html[data-theme="light"] .session-truth-actions button.demo.active{
  background:#fff3d6!important;
  color:#795000!important;
  border-color:#c4912d!important;
}

/* Session truth */
html[data-theme="light"] .session-truth-bar,
html[data-theme="light"] .session-source-pill,
html[data-theme="light"] .session-truth-note,
html[data-theme="light"] .session-market-card p,
html[data-theme="light"] .session-market-meta span,
html[data-theme="light"] .session-gated-overlay{
  color:var(--soft)!important;
}
html[data-theme="light"] .session-source-pill strong,
html[data-theme="light"] .session-market-card h4,
html[data-theme="light"] .session-market-meta b,
html[data-theme="light"] .session-gated-overlay b{
  color:var(--text)!important;
}

/* Generic RMSP workspace */
html[data-theme="light"] .r3-page-head p,
html[data-theme="light"] .r3-card-head>span,
html[data-theme="light"] .r3-row>span,
html[data-theme="light"] .r3-kpi span,
html[data-theme="light"] .r3-kpi small,
html[data-theme="light"] .r3-table th,
html[data-theme="light"] .r3-field label,
html[data-theme="light"] .r3-note,
html[data-theme="light"] .r3-empty,
html[data-theme="light"] .r3-profile-menu a,
html[data-theme="light"] .r3-profile-menu button{
  color:var(--soft)!important;
}
html[data-theme="light"] .r3-page-head h1,
html[data-theme="light"] .r3-card-head h3,
html[data-theme="light"] .r3-row>span b,
html[data-theme="light"] .r3-kpi b,
html[data-theme="light"] .r3-table td,
html[data-theme="light"] .r3-empty b{
  color:var(--text)!important;
}
html[data-theme="light"] .r3-page-head small{
  color:#0d7894!important;
}
html[data-theme="light"] .r3-card-head>div>small{
  color:#6840bd!important;
}
html[data-theme="light"] .r3-terminal{
  color:#d7e6ee!important;
}

/* Unified visual layer */
html[data-theme="light"] #r3Workspace[data-r3-unified="2"]{
  --ux-a:#6444c7;
  --ux-b:#087f9f;
}
html[data-theme="light"] #r3Workspace[data-r3-unified="2"] .r3-ux-brand-copy p,
html[data-theme="light"] #r3Workspace[data-r3-unified="2"] .r3-ux-signal span,
html[data-theme="light"] #r3Workspace[data-r3-unified="2"] .r3-ux-kpi .cap,
html[data-theme="light"] #r3Workspace[data-r3-unified="2"] .r3-ux-kpi small,
html[data-theme="light"] #r3Workspace[data-r3-unified="2"] .r3-ux-visual-caption{
  color:var(--soft)!important;
}
html[data-theme="light"] #r3Workspace[data-r3-unified="2"] .r3-ux-brand-copy h2,
html[data-theme="light"] #r3Workspace[data-r3-unified="2"] .r3-ux-signal b,
html[data-theme="light"] #r3Workspace[data-r3-unified="2"] .r3-ux-topstatus,
html[data-theme="light"] #r3Workspace[data-r3-unified="2"] .r3-ux-kpi b{
  color:var(--text)!important;
}

/* Live Markets bespoke page */
html[data-theme="light"] .mkx-page{
  --mkx-a:#6544c6!important;
  --mkx-b:#0a7897!important;
}
html[data-theme="light"][data-money-mode="dummy"] .mkx-page{
  --mkx-a:#9a1534!important;
  --mkx-b:#a91a3a!important;
}
html[data-theme="light"] .mkx-brand p,
html[data-theme="light"] .mkx-status,
html[data-theme="light"] .mkx-hero-copy p,
html[data-theme="light"] .mkx-tags span,
html[data-theme="light"] .mkx-orbit span,
html[data-theme="light"] .mkx-summary-card span,
html[data-theme="light"] .mkx-summary-card small,
html[data-theme="light"] .mkx-head>span,
html[data-theme="light"] .mkx-line span,
html[data-theme="light"] .mkx-ex-top small,
html[data-theme="light"] .mkx-micro-kpi span,
html[data-theme="light"] .mkx-micro-kpi small,
html[data-theme="light"] .mkx-micro-foot span{
  color:var(--soft)!important;
}
html[data-theme="light"] .mkx-brand h2,
html[data-theme="light"] .mkx-summary-card b,
html[data-theme="light"] .mkx-head h3,
html[data-theme="light"] .mkx-line b,
html[data-theme="light"] .mkx-ex-top b,
html[data-theme="light"] .mkx-micro-kpi b,
html[data-theme="light"] .mkx-micro-foot b{
  color:var(--text)!important;
}

/* Money mode / Practice Wallet */
html[data-theme="light"] .money-mode-switch button:not(.active),
html[data-theme="light"] .money-mode-stat,
html[data-theme="light"] .money-drawer-head small,
html[data-theme="light"] .money-card span,
html[data-theme="light"] .money-card small,
html[data-theme="light"] .money-section-head span,
html[data-theme="light"] .money-ticket label,
html[data-theme="light"] .money-table th,
html[data-theme="light"] .money-empty,
html[data-theme="light"] .money-real-lock{
  color:var(--soft)!important;
}
html[data-theme="light"] .money-mode-wallet-btn,
html[data-theme="light"] .money-mode-stat b,
html[data-theme="light"] .money-drawer-head h2,
html[data-theme="light"] .money-card b,
html[data-theme="light"] .money-section-head b,
html[data-theme="light"] .money-table td{
  color:var(--text)!important;
}
html[data-theme="light"] .money-mode-badge.real{
  color:#4c35a8!important;
  background:#eeeafd!important;
  border-color:#aa9be4!important;
}
html[data-theme="light"] .money-mode-badge.dummy{
  color:#9c1835!important;
  background:#fff0f3!important;
  border-color:#d999a8!important;
}
html[data-theme="light"] .money-mode-banner .trade-now{
  color:#9f1835!important;
  background:#fff3f5!important;
}
html[data-theme="light"] .money-side .buy,
html[data-theme="light"] .money-positive{
  color:#08734f!important;
}
html[data-theme="light"] .money-side .sell,
html[data-theme="light"] .money-negative{
  color:#b91f40!important;
}

/* DUMMY + LIGHT has several dark-theme pink text declarations that otherwise become too pale */
html[data-theme="light"][data-money-mode="dummy"] .avatar{
  color:#9c1734!important;
  border-color:#ba3150!important;
}
html[data-theme="light"][data-money-mode="dummy"] .eyebrow,
html[data-theme="light"][data-money-mode="dummy"] .hero-copy p em,
html[data-theme="light"][data-money-mode="dummy"] .panel-icon{
  color:#a51939!important;
}
html[data-theme="light"][data-money-mode="dummy"] .watch-btn.r3-watched{
  color:#991a35!important;
  background:#fff0f3!important;
}
html[data-theme="light"][data-money-mode="dummy"] .capital-card h4,
html[data-theme="light"][data-money-mode="dummy"] .risk-card h4{
  color:#9d1836!important;
}
html[data-theme="light"][data-money-mode="dummy"] .r3-note{
  color:#62323d!important;
  background:#fff2f4!important;
}
html[data-theme="light"][data-money-mode="dummy"] .roadmap-list .active i{
  color:#a7193a!important;
}

/* Options Planner: strengthen its independent palette in light modes */
html[data-theme="light"] .opx-page{
  --opx-blue:#246ea8!important;
  --opx-blue2:#176f9b!important;
  --opx-indigo:#5638b4!important;
  --opx-violet:#6b3fb8!important;
  --opx-cyan:#087d98!important;
  --opx-cyan2:#0b718e!important;
  --opx-green:#08734f!important;
  --opx-mint:#08734f!important;
  --opx-red:#bd2948!important;
  --opx-text:var(--text)!important;
  --opx-muted:var(--muted)!important;
}
html[data-theme="light"][data-money-mode="dummy"] .opx-page{
  --opx-blue:#a91b3c!important;
  --opx-blue2:#a11737!important;
  --opx-indigo:#8e2944!important;
  --opx-violet:#9d1a3a!important;
  --opx-cyan:#aa1a3b!important;
  --opx-cyan2:#941a35!important;
  --opx-green:#08734f!important;
  --opx-mint:#08734f!important;
  --opx-red:#b91f40!important;
  --opx-text:#321018!important;
  --opx-muted:#724b55!important;
}
html[data-theme="light"] .opx-hero .sub,
html[data-theme="light"] .opx-quick,
html[data-theme="light"] .opx-omtag,
html[data-theme="light"] .opx-sectionTitle span,
html[data-theme="light"] .opx-metric .name,
html[data-theme="light"] .opx-kpi .cap,
html[data-theme="light"] .opx-kpi small,
html[data-theme="light"] .opx-page label,
html[data-theme="light"] .opx-strategy small,
html[data-theme="light"] .opx-chartLegend,
html[data-theme="light"] .opx-chartStat small,
html[data-theme="light"] .opx-greek span,
html[data-theme="light"] .opx-ringText span,
html[data-theme="light"] .opx-probText,
html[data-theme="light"] .opx-insight p,
html[data-theme="light"] .opx-chainTable th,
html[data-theme="light"] .opx-gate span,
html[data-theme="light"] .opx-footer{
  color:var(--opx-muted)!important;
}
html[data-theme="light"] .opx-strategy b,
html[data-theme="light"] .opx-chartStat strong,
html[data-theme="light"] .opx-insight b,
html[data-theme="light"] .opx-chainTable td,
html[data-theme="light"] .opx-gate b{
  color:var(--opx-text)!important;
}
html[data-theme="light"] .opx-seg button:not(.active){
  color:#52677c!important;
}
html[data-theme="light"] .opx-strike{
  color:#0b6688!important;
}
html[data-theme="light"] .opx-ivhot{
  color:#315f9b!important;
}
html[data-theme="light"] .opx-leg .x{
  color:#52677c!important;
}
html[data-theme="light"] .opx-addLeg{
  color:#0a6d85!important;
}
html[data-theme="light"] .opx-insight .ico{
  color:#315f9b!important;
}
html[data-theme="light"][data-money-mode="dummy"] .opx-seg button:not(.active),
html[data-theme="light"][data-money-mode="dummy"] .opx-leg .x,
html[data-theme="light"][data-money-mode="dummy"] .opx-footer{
  color:#724b55!important;
}
html[data-theme="light"][data-money-mode="dummy"] .opx-addLeg,
html[data-theme="light"][data-money-mode="dummy"] .opx-insight .ico,
html[data-theme="light"][data-money-mode="dummy"] .opx-strike,
html[data-theme="light"][data-money-mode="dummy"] .opx-ivhot,
html[data-theme="light"][data-money-mode="dummy"] .opx-orbBadge{
  color:#9b1836!important;
}

/* Modal / drawer light contrast */
html[data-theme="light"] .rmsp-modal-shell{
  --modal-accent:#5d3bb8;
  --modal-accent-2:#0c7896;
}
html[data-theme="light"][data-money-mode="dummy"] .rmsp-modal-shell{
  --modal-accent:#9f1837;
  --modal-accent-2:#7f2940;
}
html[data-theme="light"] .rmsp-modal-message,
html[data-theme="light"] .rmsp-modal-details,
html[data-theme="light"] .rmsp-modal-pill{
  color:var(--soft)!important;
}
html[data-theme="light"] .rmsp-modal-title{
  color:var(--text)!important;
}

/* semantic states stay semantic but use light-safe darker tones */
html[data-theme="light"] .r3-ok,
html[data-theme="light"] .up,
html[data-theme="light"] .money-positive{
  color:#08734f!important;
}
html[data-theme="light"] .r3-wait{
  color:#8b5600!important;
}
html[data-theme="light"] .r3-lock,
html[data-theme="light"] .down,
html[data-theme="light"] .money-negative{
  color:#b91f40!important;
}
