/* The authenticated Radar's daylight skin. Keep all rules behind the theme gate. */
html body[data-theme="day"] {
  --obs-bg:#edf4ff; --obs-panel:#ffffff; --obs-chart:#f5f9ff;
  --obs-line:#b8cce3; --obs-text:#132743; --obs-muted:#425b77;
  --obs-mint:#006f62; --obs-cyan:#344db5; --obs-amber:#81500a; --obs-coral:#ac3155;
  --ri-surface:#f7fbff; --ri-glass:#eff6ff; --ri-frame:#a8c3e0;
  --ri-ambient-a:#00bdb4; --ri-ambient-b:#7865e8; --ri-ambient-c:#ffb352;
  --sr-mobile-bg:#edf5ff; --sr-mobile-panel:#fff; --sr-mobile-panel-soft:#f2f7ff;
  --sr-mobile-line:#b8cce3; --sr-mobile-text:#132743; --sr-mobile-muted:#425b77;
  --sr-mobile-accent:#007e78; --sr-mobile-accent-2:#594cc0;
  color-scheme:light;
}
html[data-signal-visual] body[data-theme="day"] {
  color:var(--obs-text)!important;
  background:radial-gradient(ellipse at 5% 0,#c7f2f1 0,transparent 35%),radial-gradient(ellipse at 95% 12%,#e1d9ff 0,transparent 39%),linear-gradient(145deg,#f6fbff,#edf3ff 62%,#f9f2ff)!important;
}
html[data-signal-visual] body[data-theme="day"] header {
  background:linear-gradient(100deg,#faffff,#f1f5ff 68%,#faf5ff)!important;
  border-bottom:1px solid #b8cce3!important;
  box-shadow:0 8px 28px #24466816,0 1px #fff inset!important;
}
html[data-signal-visual] body[data-theme="day"] :is(#insights-panel,#signal-ticker,.sr-observatory,#filters-panel) {
  border-color:#a8c7de!important;
  background:linear-gradient(110deg,#f8fdff,#edf8fa 42%,#f4f0ff)!important;
  box-shadow:0 8px 24px #2b467016,inset 0 1px #fff!important;
}
html[data-signal-visual] body[data-theme="day"] #insights-panel .insight-card { border-color:#bbd1e5!important; }
html[data-signal-visual] body[data-theme="day"] #insights-panel :is(strong,small,.label),
html[data-signal-visual] body[data-theme="day"] .sr-observatory :is(p,span),
html[data-signal-visual] body[data-theme="day"] #signal-ticker :is(span,button) { text-shadow:none!important; }
html[data-signal-visual] body[data-theme="day"] #insights-panel strong { color:#172a49!important; }
html[data-signal-visual] body[data-theme="day"] :is(#insights-panel small,#insights-panel .label,.sr-observatory p,.sr-observatory__event) { color:#405a76!important; }
html[data-signal-visual] body[data-theme="day"] #signal-ticker .signal-ticker__empty { color:#405a76!important; }
html[data-signal-visual] body[data-theme="day"] #toolbar .risk-mode-control__auto { color:#075d56!important;text-shadow:none!important; }
html[data-signal-visual] body[data-theme="day"] .sr-observatory__core {
  border:1px solid #52708b!important;border-radius:16px;
  background:radial-gradient(ellipse at 50% 50%,#163252,#07182c 76%)!important;
  box-shadow:inset 0 1px #94e9e52e,0 8px 24px #284b7330;
  overflow:hidden;
}
html[data-signal-visual] body[data-theme="day"] :is(#toolbar button,#toolbar input,#toolbar .tf-trigger,#toolbar .switcher,#toolbar .workspace-value,#signal-ticker button,.focus-mode button,#filters-toggle,.workspace-tools>summary,.workspace-account>summary) {
  color:#193553!important;border-color:#a8c5df!important;
  background:linear-gradient(135deg,#fff,#eaf4ff)!important;
  text-shadow:none!important;
}
html[data-signal-visual] body[data-theme="day"] #toolbar #toggle-recognition {
  color:#fff!important;border-color:#006b68!important;
  background:linear-gradient(110deg,#007e78,#305bba)!important;
  box-shadow:0 7px 20px #047e913b!important;
}
html[data-signal-visual] body[data-theme="day"] .focus-mode button[data-active="1"] {
  color:#173b79!important;border-color:#6786d2!important;background:#dfe8ff!important;
}
html[data-signal-visual] body[data-theme="day"] :is(.tf-menu,.workspace-tools__panel,.account-actions,#filters-content) {
  color:#193553!important;border-color:#adcae5!important;background:#f8fcff!important;
}
html[data-signal-visual] body[data-theme="day"] :is(#symbol-chips,#pattern-chips) :is(.chip,button) {
  color:#294668!important;border-color:#aec8df!important;background:#f8fbff!important;
}
html[data-signal-visual] body[data-theme="day"] #symbol-chips .chip.active { color:#075b56!important;border-color:#64b7a9!important;background:#d7f4ee!important; }
html[data-signal-visual] body[data-theme="day"] #pattern-chips .chip.active { color:#3e3f98!important;border-color:#9ca7de!important;background:#e9e9ff!important; }
html[data-signal-visual] body[data-theme="day"] #filters-content input { color:#193553!important;border-color:#afc7df!important;background:#fff!important; }
html[data-signal-visual] body[data-theme="day"] #filters-content input::placeholder { color:#536c84!important; }

/* Readable cards while scanning: the charts retain their own canvas palette. */
html[data-signal-visual] body[data-theme="day"] #grid.grid .card:not(.detached) {
  border-color:color-mix(in srgb,var(--ri-stage-accent,#657bd7) 38%,#bdd0e5)!important;
  background:radial-gradient(circle at 94% 0,#e4ddff80,transparent 36%),linear-gradient(145deg,#fff,#f3fbff 62%,#f3f0ff)!important;
  box-shadow:0 10px 30px #2449661c,inset 0 1px #fff!important;
}
html[data-signal-visual] body[data-theme="day"] #grid.grid .card[data-ambient-stage="candidate"] { --ri-stage-accent:#9b6109; }
html[data-signal-visual] body[data-theme="day"] #grid.grid .card[data-ambient-stage="checking"] { --ri-stage-accent:#6850ae; }
html[data-signal-visual] body[data-theme="day"] #grid.grid .card[data-ambient-stage="confirmed"] { --ri-stage-accent:#08765e; }
html[data-signal-visual] body[data-theme="day"] #grid.grid .card[data-ambient-stage="confirmed"][data-ambient-direction="short"] { --ri-stage-accent:#ad3154; }
html[data-signal-visual] body[data-theme="day"] #grid.grid .card :is(h2,.live-price,.detail-metric b,.indicator-chip strong) { color:#142b48!important;text-shadow:none!important; }
html[data-signal-visual] body[data-theme="day"] #grid.grid .card .live-price[data-trend="up"] { color:#006f62!important; }
html[data-signal-visual] body[data-theme="day"] #grid.grid .card .live-price[data-trend="down"] { color:#ac3155!important; }
html[data-signal-visual] body[data-theme="day"] #grid.grid .card :is(.sr-asset-name,.indicator-chip,.detail-metric strong) { color:#425b77!important; }
html[data-signal-visual] body[data-theme="day"] #grid.grid .card :is(.sr-coin,.tf-pill,.indicator-hud,.progress,.details) {
  color:#193553!important;border-color:#b6cde2!important;background:#eef6ff!important;
}
html[data-signal-visual] body[data-theme="day"] #grid.grid .card .pattern-pill { color:var(--ri-stage-accent,#344db5)!important;background:#e9f3ff!important; }
html[data-signal-visual] body[data-theme="day"] #grid.grid .card :is(.chart-shell,.chart-wrapper) { border-color:#819fc5!important;background:#0b1a30!important; }
html[data-signal-visual] body[data-theme="day"] #grid.grid .card .sr-live-tick-badge { color:#254466!important;border-color:#b2cde2!important;background:#f8fcffef!important; }
html[data-signal-visual] body[data-theme="day"] #grid.grid .card .progress-bar { background:#d4e4f3!important; }
html[data-signal-visual] body[data-theme="day"] #grid.grid .card :is(.card-tools button,[data-radar-3d]) {
  color:#214265!important;border-color:#a9c7e4!important;background:linear-gradient(120deg,#e9f7ff,#eae9ff)!important;
}
html[data-signal-visual] body[data-theme="day"] #grid.grid .card .card-tools .analysis-btn { color:#fff!important;border-color:#4b58ae!important;background:linear-gradient(110deg,#4a64bd,#7761c6)!important; }
html[data-signal-visual] body[data-theme="day"] #grid.grid .card .card-tools button:hover { border-color:#375db9!important;filter:saturate(1.15); }

/* Mobile navigation and account sheets share the same daylight materials. */
@media(max-width:900px) {
  html[data-signal-visual] body[data-theme="day"] #sr-mobile-app #sr-mobile-top,
  html[data-signal-visual] body[data-theme="day"] #sr-mobile-dock[data-mobile-command-v9="true"].sr-mobile-dock-v15 {
    color:#172c4a!important;border-color:#aac7e1!important;
    background:linear-gradient(130deg,#faffffed,#edf4ffef 64%,#f2ecffed)!important;
    box-shadow:0 10px 32px #2b4b6e25!important;
  }
  html[data-signal-visual] body[data-theme="day"] #sr-mobile-top :is(strong,small,.sr-mobile-brand strong),
  html[data-signal-visual] body[data-theme="day"] #sr-mobile-dock button { color:#193553!important; }
  html[data-signal-visual] body[data-theme="day"] #sr-mobile-top .sr-mobile-plan { border-color:#8ba8d6!important;background:#e8eeff!important; }
  html[data-signal-visual] body[data-theme="day"] #sr-mobile-top .sr-mobile-plan :is(strong,small) { color:#324684!important; }
  html[data-signal-visual] body[data-theme="day"] #sr-mobile-dock button.is-active { color:#3046a0!important;background:#dce9ff!important; }
  html[data-signal-visual] body[data-theme="day"] :is(.sr-mobile-sheet__panel,.sr-mobile-control-section,.sr-mobile-action-grid>button,.sr-mobile-choice-row button,.sr-mobile-overview-hero) {
    color:#193553!important;border-color:#b1cce4!important;background:linear-gradient(145deg,#fff,#eff7ff)!important;
  }
  html[data-signal-visual] body[data-theme="day"] .sr-mobile-sheet__panel :is(h2,h3,strong,button,label,small) { text-shadow:none!important; }
}

/* Statistics, inbox, dialogs and the detached card. */
body[data-theme="day"] :is(#stats-modal>.stats-premium-modal,.modal-backdrop>.modal,.sr-mobile-sheet__panel,.signal-inbox,.detached-frame) {
  color:#172c4a!important;border-color:#adc9e2!important;
  background:radial-gradient(circle at 88% -10%,#e3dcff,transparent 36%),linear-gradient(155deg,#fff,#f0f8ff 75%)!important;
}
body[data-theme="day"] #stats-modal>.stats-premium-modal {
  --stats-ink:#172c4a;--stats-muted:#425b77;--stats-line:#b8cce3;--stats-panel:#f8fcff;
  --stats-cyan:#007c83;--stats-blue:#245db0;--stats-violet:#5948ae;
  --stats-magenta:#8c399a;--stats-rose:#aa3155;--stats-amber:#865209;--stats-emerald:#08765e;
}
body[data-theme="day"] #stats-modal :is(.stats-event,.stats-button,.stats-range,.stats-search,.stats-sort button,.stats-segmented button) {
  color:#193553!important;border-color:#b0cbe3!important;background:#f8fcff!important;
}
body[data-theme="day"] #stats-modal :is(.stats-event strong,.stats-premium-head h2,.stats-premium-head h3) { color:#172c4a!important; }
body[data-theme="day"] #stats-modal :is(.stats-button--export span,.stats-mini-bars p strong,.stats-source-chip span) { color:#193553!important; }
body[data-theme="day"] #stats-modal :is(.stats-button--export small,.stats-metric>small,.stats-insights small,.stats-history-notice small,.stats-premium-content article>small,.stats-trend-panel__foot,.stats-pattern-card__signal,.stats-mini-bars>small) { color:#425b77!important; }
body[data-theme="day"] #stats-modal :is(.stats-mini-bars p em,.stats-pattern-card__metrics span,.stats-event__time) { color:#425b77!important; }
body[data-theme="day"] #stats-modal .stats-signal-core__value :is(b,span,small) { color:#f1fbff!important; }
body[data-theme="day"] #stats-modal .stats-signal-core__value em { color:#70e4d4!important; }
body[data-theme="day"] #stats-modal .stats-source-chip,
body[data-theme="day"] #stats-modal .stats-live-chip { color:#075d56!important; }
body[data-theme="day"] #stats-modal .stats-pattern-card__top :is(strong,span) { color:#193553; }
body[data-theme="day"] #stats-modal .stats-metric>strong { text-shadow:none!important; }
body[data-theme="day"] :is(.modal-backdrop>.modal,.signal-inbox,.detached-frame) :is(input,select,textarea) {
  color:#172c4a!important;background:#fff!important;border-color:#abc8df!important;
}
body[data-theme="day"] :is(.modal-backdrop>.modal,.signal-inbox,.detached-frame) :is(input,textarea)::placeholder { color:#526b84!important; }

/* Fullscreen market canvas is a dark inset for legible plotted signals; chrome is daylight. */
body[data-theme="day"] #radar-immersive {
  --ri-text:#172c4a;--ri-muted:#425b77;--ri-accent-1:#007c83;--ri-accent-2:#584db1;--ri-accent-3:#9b6109;
  color-scheme:light;color:#172c4a;background:#edf5ff;
}
body[data-theme="day"] #radar-immersive :is(.ri-shell,.ri-header,.ri-metrics,.ri-tabs,.ri-footer,.ri-detail,.ri-options,.ri-tool-panel,.ri-timeline,.ri-history-note) {
  color:#193553;border-color:#b1cbe4;background:#f6faff;
}
body[data-theme="day"] #radar-immersive :is(h2,.ri-metrics b,.ri-signal h3) { color:#172c4a; }
body[data-theme="day"] #radar-immersive :is(button,select,input:not([type="range"])) { color:#1b3a5c;border-color:#adc9e2;background:#fff; }
body[data-theme="day"] #radar-immersive button[aria-pressed="true"] { color:#293f9b;border-color:#8a9ed6;background:#e7edff; }
body[data-theme="day"] #radar-immersive :is(.ri-visual,#ri-canvas) { background:#0d1930; }
body[data-theme="day"] #radar-immersive .ri-visual { box-shadow:inset 0 0 0 1px #40547b; }
body[data-theme="day"] #radar-immersive .ri-options {
  color:#193553!important;border:1px solid #abc8e1!important;
  background:linear-gradient(155deg,#fff,#eff7ff)!important;
}
body[data-theme="day"] #radar-immersive .ri-options :is(label,p,output,h3,h4,dt,dd),
body[data-theme="day"] #radar-immersive .ri-detail :is(span,small,p,dt,dd) { color:#425b77!important; }
body[data-theme="day"] #radar-immersive .ri-detail :is(h3,h4,strong,b) { color:#172c4a!important; }
body[data-theme="day"] #radar-immersive .ri-options :is(select,button) { color:#193553!important; }

/* The detached card moves outside #grid; its inherited night styles need
   their own daylight boundary. Candles use the chart library's light canvas. */
body[data-theme="day"] #detached .card.detached {
  color:#193553!important;border-color:#adc9e2!important;
  background:linear-gradient(145deg,#faffff,#edf5ff 70%,#f3efff)!important;
}
body[data-theme="day"] #detached .card.detached :is(.card-head,h2,.sr-asset-name,.live-price,.holo-status,.pattern-pill) {
  color:#193553!important;text-shadow:none!important;
}
body[data-theme="day"] #detached .card.detached :is(.chart-shell,.chart-wrapper) { border-color:#9db9d5!important;background:#0b1a30!important; }
body[data-theme="day"] #detached .card.detached .indicator-hud { background:#eaf4ff!important; }
body[data-theme="day"] #detached .card.detached .indicator-chip {
  color:#294767!important;border-color:#b3cee4!important;background:#e7f3ffed!important;
  text-shadow:none!important;
}
body[data-theme="day"] #detached .card.detached .indicator-chip strong { color:#173553!important; }
body[data-theme="day"] #detached .card.detached .sr-live-tick-badge { color:#075d56!important;background:#faffffed!important; }

/* Referral modal keeps its dark financial panels inside the light window. */
body[data-theme="day"] #referral-modal .referral-hero :is(h4,p),
body[data-theme="day"] #referral-modal .advertiser-referral-panel .ad-ref-head p,
body[data-theme="day"] #referral-modal .advertiser-referral-panel .ad-ref-note,
body[data-theme="day"] #referral-modal .referral-level-group summary strong {
  color:#f0faff!important;text-shadow:none!important;
}
body[data-theme="day"] #referral-modal .advertiser-referral-panel {
  border-color:#4a7183!important;background:linear-gradient(145deg,#15383c,#102438 72%)!important;
}
body[data-theme="day"] #referral-modal .advertiser-referral-panel .ad-ref-note {
  border-color:#497581!important;background:#204650!important;
}
body[data-theme="day"] #referral-modal .referral-level-group summary {
  border-color:#486479!important;background:linear-gradient(110deg,#203e50,#232e4b)!important;
}
body[data-theme="day"] #referral-modal .referral-level-group summary small { color:#c1d8e9!important; }

/* The Theater is a projection stage; its surrounding controls follow daylight. */
body[data-theme="day"] .holo-theater-v5.active {
  --st-cyan:#007e88;--st-green:#08765e;--st-violet:#604bb5;
  --st-amber:#9b6109;--st-red:#ac3155;--st-muted:#425b77;
  background:radial-gradient(circle at 20% 0,#c8f1f0,transparent 36%),linear-gradient(140deg,#f7fcff,#e9efff)!important;
}
body[data-theme="day"] .holo-theater-v5 .holo-theater__chrome {
  color:#172c4a;border-color:#abc8e1;
  background:linear-gradient(110deg,#fff,#eff8ff 70%,#f0eaff);
  box-shadow:0 10px 30px #294d6d24;
}
body[data-theme="day"] .holo-theater-v5 .holo-theater__title strong {
  background-image:linear-gradient(90deg,#15395c,#007e88,#604bb5,#15395c);
}
body[data-theme="day"] .holo-theater-v5 .holo-theater__title span,
body[data-theme="day"] .holo-theater-v5 .holo-theater__runtime { color:#425b77!important; }
body[data-theme="day"] .holo-theater-v5 .holo-theater__close {
  color:#173553!important;border-color:#abc8e1!important;background:#f8fcff!important;
}
body[data-theme="day"] .holo-theater-v5 :is(.holo-stage-card,.holo-dna,.holo-evidence) {
  color:#f1fbff!important;border-color:#476985!important;
  background:linear-gradient(145deg,#12283e,#0a192d)!important;
}
body[data-theme="day"] .holo-theater-v5 :is(.holo-metrics article,.holo-signal-grid article,.holo-dna article,.holo-evidence article,.holo-live-block) {
  color:#f1fbff!important;border-color:#42627f!important;
  background:linear-gradient(145deg,#233e56,#11283f)!important;
}
body[data-theme="day"] .holo-theater-v5 :is(.holo-metrics span,.holo-signal-grid span,.holo-signal-grid small,.holo-dna article span,.holo-evidence article small,.holo-live-block span) {
  color:#c1d8e9!important;
}
body[data-theme="day"] .holo-theater-v5 :is(.holo-metrics strong,.holo-signal-grid strong,.holo-evidence article strong,.holo-live-block b) {
  color:#f1fbff!important;
}
body[data-theme="day"] .holo-theater-v5 .holo-projection { background:#0a192d!important; }

/* Motion uses composited transforms and avoids a permanent bright haze. */
@media(prefers-reduced-motion:no-preference) {
  html[data-signal-visual] body[data-theme="day"] #insights-panel { background-size:200% 100%!important;animation:srDaySheen 16s ease-in-out infinite alternate; }
  html[data-signal-visual] body[data-theme="day"] #grid.grid .card[data-ambient-stage="confirmed"] { animation:srDayArrival .7s cubic-bezier(.2,.8,.2,1) both; }
}
@keyframes srDaySheen { from { background-position:0 0; } to { background-position:100% 0; } }
@keyframes srDayArrival { from { opacity:.75;transform:translateY(7px); } to { opacity:1;transform:translateY(0); } }
