Dark mode: red text and the market's heat tags read on the dark panels (#80)

Red warning text used var(--bad), 3.8 to 4.8:1 on the dark cards and tints.
Every text use now takes var(--tx-red,var(--bad)): light mode keeps --bad,
dark gets #FF8E9B (5.65:1 or better on paper, soft and every tint). --bad
stays the fill under white letters (buttons, counters, bars).

Lambda Bazaar's Hot and Cool tags kept their light pastel chips at night.
They now use the dark tints (--tint-o, --tint-b) with --tx-amber and a new
--tx-blue, keeping the same colours by day.

The dark-mode test checks the tags, the text tokens on every dark card, that
no tag keeps a bare pastel fill, and that no red text in --bad is left in the
styles or the game's markup.
This commit is contained in:
jvanvik 2026-11-09 22:48:09 +01:00
parent 8068a45abd
commit 27ffa33d7c
27 changed files with 93 additions and 49 deletions

View file

@ -129,7 +129,7 @@ function clPanel(){const C=S.cl||{mo:[]},mo=C.mo.slice(-12);const soon=S.biz.fil
const sum=k=>mo.reduce((a,e)=>a+(k==='lost'?Object.values(e.lost).reduce((x,y)=>x+y,0):e[k]||0),0),why={};for(const e of mo)for(const k in e.lost)why[k]=(why[k]||0)+e.lost[k];
let h=`<div class="panel2" id="churnSec" style="margin-top:12px"><h3>${tr('lifecycle.won_and_lost')}</h3><p class="note" style="margin-top:0">${tr('lifecycle.won_and_lost_note')}</p>
<div class="dgrid" style="margin:0 0 8px"><div class="tile"><div class="lbl">${tr('lifecycle.won')}</div><div class="val">${sum('won')}</div><div class="sub">${tr('lifecycle.last_12_months')}</div></div>
<div class="tile"><div class="lbl">${tr('lifecycle.lost')}</div><div class="val" style="color:${sum('lost')>sum('won')?'var(--bad)':'inherit'}">${sum('lost')}</div><div class="sub">${trn('lifecycle.n_grew',sum('grew'))}</div></div>
<div class="tile"><div class="lbl">${tr('lifecycle.lost')}</div><div class="val" style="color:${sum('lost')>sum('won')?'var(--tx-red,var(--bad))':'inherit'}">${sum('lost')}</div><div class="sub">${trn('lifecycle.n_grew',sum('grew'))}</div></div>
<div class="tile"><div class="lbl">${tr('lifecycle.renewals_soon')}</div><div class="val">${soon}</div><div class="sub">${tr('lifecycle.next_30_days')}</div></div>
<div class="tile"><div class="lbl">${tr('lifecycle.bandwidth_market')}</div><div class="val">${Math.round(mkt()*100)}</div><div class="sub">${mktTxt()}</div></div></div>`;
if(mo.length){const max=Math.max(1,...mo.map(e=>Math.max(e.won,Object.values(e.lost).reduce((x,y)=>x+y,0)))),W=600,H=120,mid=H/2,bw=W/12;