Light and dark themes as token sets (Marty 2026-11-01: LinkSpin got light and dark for vision-impaired readers and people who struggle with bright or dark screens, and InstantAdPay gets the same treatment)

site.css keeps its near-black mint look as the dark set and gains :root[data-theme="light"]: light mint-grey ground (#E8F0EC), white panels, dark ink (#0B1A14), muted #50665C, the mint family darkened to a teal that reads as text on white (#0A6B56, hover #075744), white ink on mint buttons, cyan/violet/amber/gold/ok/warn/bad retuned so every text-on-fill pair clears WCAG AA 4.5:1 (qa/theme-contrast.mjs: 8,169 pairs, 0 fails, worst 4.76:1). New tokens, same names as LinkSpin where the role matches: mint-deep/pale/faint/soft-2/line/line-2, ok/ok-ink/ok-soft, warn, bad-soft, gold/gold-2/gold-ink/gold-soft/gold-faint/gold-line, amber-soft/line/ink, cyan-soft/line, violet-soft/line, muted-soft/line, ink-faint, line-soft, ground-soft, field-bg, nav-bg, side-bg, pill-bg, panel-grad, panel-grad-deep, plate-grad, sh-lg, plus color-scheme. A .seg segmented control (pill, mint when on) for the theme switch.

Audit of stray literals: every raw hex/rgba that encoded a surface, text, border or soft fill in site.css now reads a token (nav and sidebar backings, menu hover/on fills, chips, badges, split strip, spend banner, pager, pipeline columns, tank/line chips, toolkit tiers, chat bubbles, the genViz diagram strokes, the Shorts report link that was white at 45 percent on black). Scripts that draw UI read tokens: my.js charts take their colours from getComputedStyle at draw time (CH proxy), the wallet check, tank badges, ledger deltas, Game Pass badges (gold with gold-ink), Friday bank dots and promo errors use var(--ok)/(--warn)/(--gold)/(--bad); admin.js ticket thread fills, welcome.js pop-up card, support.js ticket styles, engine-room.js lamps, admin-kits.js preview border and blog-page.js bar likewise.

Left as literals on purpose: button glows and drop shadows, the modal and ad-viewer backdrops, the ticker mask, iframe/video/QR backings that must stay white or black, the hero arc and isometric art, the welcome pop-up's brand mint button gradient (dark text on a fixed mint fill passes in both themes), the game return bars and ribbons (game-brand colours), canvas-drawn share images, var() fallbacks, print styles, the sticky-note yellow (#fde68a/#7c2d12, 8.5:1 in both themes), and the refuel rail / Spooky Doors / Gem Kingdom shop pages that carry their own palettes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-01 11:54:47 -06:00
parent ce33d71427
commit fdc95b5ed6
8 changed files with 194 additions and 145 deletions
+11 -11
View File
@@ -45,32 +45,32 @@
'-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);';
var card = document.createElement('div');
card.style.cssText = 'position:relative;width:100%;max-width:470px;background:#0b1512;color:#eef7f3;' +
'border:1px solid rgba(67,232,195,.28);border-radius:18px;padding:26px 24px 22px;' +
card.style.cssText = 'position:relative;width:100%;max-width:470px;background:var(--panel-solid);color:var(--ink);' +
'border:1px solid var(--mint-line);border-radius:18px;padding:26px 24px 22px;' +
'box-shadow:0 26px 70px rgba(0,0,0,.6);font-size:15px;line-height:1.55;';
var html =
'<button type="button" class="iap-w-x" aria-label="Close" style="position:absolute;top:10px;right:12px;' +
'background:none;border:0;color:#8ba69c;font-size:26px;line-height:1;cursor:pointer;padding:4px 8px;">&times;</button>' +
'<div style="letter-spacing:2px;text-transform:uppercase;font-size:11px;font-weight:700;color:#43e8c3;">InstantAdPay</div>' +
'<h2 style="margin:8px 0 12px;font-size:25px;line-height:1.25;color:#fff;">The ad spend in your line pays you, in the same transaction.</h2>' +
'<p style="margin:0 0 14px;color:#c8d6e2;">You buy advertising you were going to buy anyway. When someone in your line buys a package, the contract splits it and your share lands in your wallet before the page reloads. No back office, no payday to wait for.</p>' +
'<ul style="margin:0 0 16px;padding-left:18px;color:#c8d6e2;">' +
'background:none;border:0;color:var(--muted);font-size:26px;line-height:1;cursor:pointer;padding:4px 8px;">&times;</button>' +
'<div style="letter-spacing:2px;text-transform:uppercase;font-size:11px;font-weight:700;color:var(--mint);">InstantAdPay</div>' +
'<h2 style="margin:8px 0 12px;font-size:25px;line-height:1.25;color:var(--ink);">The ad spend in your line pays you, in the same transaction.</h2>' +
'<p style="margin:0 0 14px;color:var(--ink);">You buy advertising you were going to buy anyway. When someone in your line buys a package, the contract splits it and your share lands in your wallet before the page reloads. No back office, no payday to wait for.</p>' +
'<ul style="margin:0 0 16px;padding-left:18px;color:var(--ink);">' +
'<li style="margin-bottom:5px;">Every payout is on the public ledger, and you can read it yourself.</li>' +
'<li style="margin-bottom:5px;">Free members earn ad credits by viewing ads, videos and visits.</li>' +
'<li>Credits buy your own advertising. They are delivery, not a balance to hoard.</li>' +
'</ul>';
if (fri) {
html += '<div style="margin:0 0 16px;padding:12px 14px;border:1px solid rgba(255,178,56,.38);' +
'background:rgba(255,178,56,.08);border-radius:12px;color:#eef7f3;">' +
'<div style="font-weight:800;color:#ffb238;font-size:12px;letter-spacing:1.4px;text-transform:uppercase;margin-bottom:4px;">' + fri.tag + '</div>' +
html += '<div style="margin:0 0 16px;padding:12px 14px;border:1px solid var(--amber-line);' +
'background:var(--amber-soft);border-radius:12px;color:var(--ink);">' +
'<div style="font-weight:800;color:var(--amber);font-size:12px;letter-spacing:1.4px;text-transform:uppercase;margin-bottom:4px;">' + fri.tag + '</div>' +
'<div>' + fri.text + '</div></div>';
}
html += '<div style="display:flex;gap:9px;flex-wrap:wrap;">' +
'<a class="iap-w-go" href="/my#buy" style="flex:1 1 auto;text-align:center;text-decoration:none;background:linear-gradient(180deg,#5ff0cf,#43e8c3);color:#04120e;font-weight:800;padding:12px 16px;border-radius:11px;">See the packages</a>' +
'<a class="iap-w-go" href="/ledger" style="flex:0 1 auto;text-align:center;text-decoration:none;border:1px solid rgba(67,232,195,.4);color:#43e8c3;font-weight:700;padding:12px 16px;border-radius:11px;">Live ledger</a>' +
'<a class="iap-w-go" href="/ledger" style="flex:0 1 auto;text-align:center;text-decoration:none;border:1px solid var(--mint-line-2);color:var(--mint);font-weight:700;padding:12px 16px;border-radius:11px;">Live ledger</a>' +
'</div>';
card.innerHTML = html;