Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

design(tokens): clear the 73 hardcoded token-hexes and name the ink that sits on a fill

nirholase40cff1e8924
diff --git a/DESIGN-TOKENS.md b/DESIGN-TOKENS.md
index e8052b025..60f778997 100644
--- a/DESIGN-TOKENS.md
+++ b/DESIGN-TOKENS.md
@@ -73,6 +73,20 @@ Pair scrims with `--on-scrim*`, never with `--ink*` (which flips to near-black
on light and would vanish). These four values replaced a cluster of 400+
hand-typed `rgba(0, 0, 0, …)` overlays that had drifted across ~12 alphas.
+### Colour: ink on a fill (QB-07)
+Two names for the text that sits *on* a filled control, so nobody hand-types
+`#0a0a0a` again:
+
+| Token | Use |
+|-------|-----|
+| `--on-accent` | ink on `var(--accent)` (primary CTA, accent chip). **Flips**: near-black on dark, white on light, because `--accent` itself is white on dark and blue on light. |
+| `--on-bright` | ink on a fill that is bright in *both* themes (a white dock button, a vivid gradient CTA, a light backdrop swatch). **Theme-invariant**, like the scrim family. |
+
+Picking the wrong one is a light-theme bug, not a nit: `--on-accent` on a
+permanently white pill renders white-on-white, and a hardcoded `#0a0a0a` on
+`var(--accent)` renders black-on-blue at 2.2:1. If the fill flips, so does the
+ink: `--on-accent`. If the fill never flips, neither does the ink: `--on-bright`.
+
### Spacing (φ = 1.618 scale)
`--space-3xs` `--space-2xs` `--space-xs` `--space-sm` `--space-md` (16px base)
`--space-lg` `--space-xl` `--space-2xl`. Use for padding, gap, margin.
@@ -198,15 +212,59 @@ hardcoded values to tokens is tracked under **B08**.
### Enforcement: the token-drift ratchet (B13)
`npm run audit:tokens` (part of `npm run gate`) runs
-[scripts/audit-token-drift.mjs](scripts/audit-token-drift.mjs): it counts
-hardcoded hexes that literally equal a canonical token value (`#4ade80` =
-`--success`, `#f87171` = `--danger`, `#fbbf24` = `--warn`) inside `<style>`
-blocks of `pages/` files that load the token vocabulary. The count may only go
-**down** — the baseline (`scripts/audit-token-drift.baseline.json`, currently
-**0**) fails the build if a new hardcoded status hex lands. Pages that
-deliberately re-theme a status token (they define their own `--success` etc.)
-are exempt for that token; JS/canvas literals are out of scope. When you
-eliminate drift, lock it in with `node scripts/audit-token-drift.mjs --update`.
+[scripts/audit-token-drift.mjs](scripts/audit-token-drift.mjs) and enforces two
+things.
+
+**1. The drift ratchet.** It counts hardcoded hexes that literally equal a
+canonical token value (the three status hexes `#4ade80` / `#f87171` / `#fbbf24`,
+and the base palette `#0a0a0a` / `#1a1a1a` / `#e8e8e8` / `#888888`) in three
+places: `<style>` blocks of `pages/` files that load the token vocabulary, and
+every stylesheet under `src/` and `public/`. The count may only go **down**: the
+baseline (`scripts/audit-token-drift.baseline.json`, currently **0**) fails the
+build if a new hardcoded token-hex lands. A file that deliberately re-themes a
+token (it defines its own `--success`, `--bg-0`, … locally) is exempt for that
+token, and a hex inside a `var(--token, #hex)` fallback is not drift because the
+var resolves first. JS/canvas literals are out of scope. When you eliminate
+drift, lock it in with `node scripts/audit-token-drift.mjs --update`.
+
+**2. Vocabulary integrity.** Every bare `var(--x)` naming a canonical token
+family must actually resolve, either from `public/tokens.css` or locally in the
+same file. A bare `var()` that resolves to nothing drops the whole declaration at
+computed-value time and the element silently inherits, which is how a page can
+reference a token a refactor removed. This half has no baseline: it is always
+zero.
+
+### Dark-only surfaces declare themselves (QB-07)
+
+Several standalone surfaces (`/cz`, `/studio`, `/demo/avatar-os`, the dashboard
+sub-shells, the print insert, agent detail, the character creator) are built dark
+and have no theme switcher. They used to express that by forking a parallel
+`--panel` / `--border` / `--text` / `--muted` palette out of raw hexes, which is
+the fork B02 removed everywhere else. The sanctioned shape is a **declared theme
+layer**: import the token sheet, pin the primitives you rely on to their dark
+values, then alias the local names to them.
+
+```css
+@import url('/tokens.css');
+
+:root,
+/* Doubled :root is a deliberate specificity bump (0,3,0): the token sheet's own
+ [data-theme='light'] block would otherwise win on document order. */
+:root:root[data-theme='light'] {
+ color-scheme: dark;
+ --bg-0: #0a0a0a;
+ --ink-dim: #888888;
+
+ --panel: var(--bg-0);
+ --muted: var(--ink-dim);
+}
+```
+
+Pinning both selectors is what stops a globally-chosen light theme from
+*half*-flipping the surface: the tokens would go light while the sheet's
+remaining literals stayed dark, which is worse than either theme. Importing the
+sheet is also how these pages get the platform floors (focus ring, disabled
+affordance, reduced motion) for the first time.
## Brand themes
diff --git a/public/app-next.css b/public/app-next.css
index 416859528..0f2673994 100644
--- a/public/app-next.css
+++ b/public/app-next.css
@@ -701,7 +701,7 @@ body.app-next-body {
}
.nxt-backdrop-swatch.is-light .nxt-backdrop-swatch__label {
- color: #1a1a1a;
+ color: var(--on-bright);
background: linear-gradient(to top, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0));
}
diff --git a/public/auth.css b/public/auth.css
index 4acebf6ec..f6624847a 100644
--- a/public/auth.css
+++ b/public/auth.css
@@ -184,7 +184,7 @@ body {
gap: 8px;
margin-top: 14px;
font-size: 13px;
- color: #888;
+ color: var(--ink-dim);
user-select: none;
}
.remember-row label {
@@ -193,7 +193,7 @@ body {
gap: 8px;
margin: 0;
font-size: 13px;
- color: #888;
+ color: var(--ink-dim);
text-transform: none;
letter-spacing: normal;
font-weight: 400;
diff --git a/public/buttons.css b/public/buttons.css
index 8a9af7c7a..5c2bf3023 100644
--- a/public/buttons.css
+++ b/public/buttons.css
@@ -28,7 +28,7 @@
:root {
/* Primary — white fill, dark ink (the main CTA per surface) */
--btn-primary-bg: var(--accent, #ffffff);
- --btn-primary-fg: #0a0a0a;
+ --btn-primary-fg: var(--on-accent, #0a0a0a);
--btn-primary-border: transparent;
--btn-primary-bg-hover: rgba(255, 255, 255, 0.88);
--btn-primary-bg-active: rgba(255, 255, 255, 0.76);
diff --git a/public/cz/cz.css b/public/cz/cz.css
index 8da820e8e..446c4b2e7 100644
--- a/public/cz/cz.css
+++ b/public/cz/cz.css
@@ -1,16 +1,37 @@
+@import url('/tokens.css');
+
+/* A standalone surface: it loads no nav and no /style.css, so before this import
+ it resolved none of the platform vocabulary and had forked its own
+ --panel/--text palette. Importing the token sheet also brings the platform
+ floors (focus ring, disabled affordance, reduced motion) to this page. */
+
[hidden] {
display: none !important;
}
-:root {
+/* Dark-only theme layer. This page has no theme switcher, so it pins the
+ canonical primitives to their dark values (the [data-theme='light'] half of
+ the selector keeps a globally-chosen light theme from half-flipping a surface
+ whose remaining literals are dark) and then aliases its local names to them,
+ rather than forking a second palette (B02). */
+:root,
+/* Doubled :root is a deliberate specificity bump (0,3,0): the token sheet's own
+ [data-theme='light'] block would otherwise win on document order and half-flip
+ this dark-only surface. */
+:root:root[data-theme='light'] {
color-scheme: dark;
--accent: #ffffff;
- --border: #1a1a1a;
+ --bg-0: #0a0a0a;
+ --bg-1: #1a1a1a;
+ --ink: #e8e8e8;
+ --ink-dim: #888888;
+
+ --border: var(--bg-1);
--bg: #000000;
- --panel: #0a0a0a;
- --text: #e8e8e8;
+ --panel: var(--bg-0);
+ --text: var(--ink);
--text-dim: #555555;
- --radius: 12px;
+ --radius: var(--radius-lg);
}
* {
diff --git a/public/dashboard-next/tokens.css b/public/dashboard-next/tokens.css
index 2973896fe..6b5446bb3 100644
--- a/public/dashboard-next/tokens.css
+++ b/public/dashboard-next/tokens.css
@@ -12,11 +12,14 @@
:root {
/* Background ramp — dashboard runs a darker, pure-black base than the
- site-wide --bg-0/--bg-1 (which start at #0a0a0a). Kept explicit on purpose. */
+ site-wide --bg-0/--bg-1. The two rungs that ARE the canonical values now
+ say so with var() instead of a copy, per this sheet's own rule (alias when
+ identical, explicit when deliberately different); the pure-black floor and
+ the #111 mid rung have no canonical equivalent and stay explicit. */
--nxt-bg-0: #000000;
- --nxt-bg-1: #0a0a0a; /* == canonical --bg-0 */
+ --nxt-bg-1: var(--bg-0);
--nxt-bg-2: #111111;
- --nxt-bg-3: #1a1a1a; /* == canonical --bg-1 */
+ --nxt-bg-3: var(--bg-1);
/* Ink / accent / stroke / state — aliased to canonical (identical values) */
--nxt-ink: var(--ink); /* #e8e8e8 */
diff --git a/public/dashboard/_dash-shell.css b/public/dashboard/_dash-shell.css
index eb2d8fbe4..89ae64fa6 100644
--- a/public/dashboard/_dash-shell.css
+++ b/public/dashboard/_dash-shell.css
@@ -1,9 +1,24 @@
/* Shared shell styling for /dashboard sub-pages. Dark theme to match dashboard. */
-:root {
+@import url('/tokens.css');
+
+/* Dark-only theme layer (QB-07): the sub-pages pin the canonical primitives to
+ their dark values and alias the local names to them, rather than forking a
+ second palette (B02). The [data-theme='light'] half keeps a globally-chosen
+ light theme from half-flipping a surface whose remaining literals are dark. */
+:root,
+/* Doubled :root is a deliberate specificity bump (0,3,0): the token sheet's own
+ [data-theme='light'] block would otherwise win on document order and half-flip
+ this dark-only surface. */
+:root:root[data-theme='light'] {
color-scheme: dark;
+ --bg-0: #0a0a0a;
+ --bg-1: #1a1a1a;
+ --ink: #e8e8e8;
+ --ink-dim: #888888;
+
--accent: #ffffff;
--accent2: #ffffff;
- --border: #1a1a1a;
+ --border: var(--bg-1);
--bg: #000000;
--panel: #111111;
}
diff --git a/public/demo/avatar-os/shared.css b/public/demo/avatar-os/shared.css
index 757d93839..fcb98407e 100644
--- a/public/demo/avatar-os/shared.css
+++ b/public/demo/avatar-os/shared.css
@@ -1,16 +1,37 @@
/* Shared chrome for the OSS avatar pipeline demos. */
-:root {
+@import url('/tokens.css');
+
+/* Dark-only theme layer (QB-07). These demo pages load no nav and no
+ /style.css, so before this import they resolved none of the platform
+ vocabulary (var(--success) below was resolving to nothing) and had forked
+ their own --panel/--text palette. The sheet pins the canonical primitives to
+ their dark values, then aliases the local names to them. The
+ [data-theme='light'] half keeps a globally-chosen light theme from
+ half-flipping a surface whose remaining literals are dark. */
+:root,
+/* Doubled :root is a deliberate specificity bump (0,3,0): the token sheet's own
+ [data-theme='light'] block would otherwise win on document order and half-flip
+ this dark-only surface. */
+:root:root[data-theme='light'] {
+ color-scheme: dark;
+ --bg-0: #0a0a0a;
+ --bg-1: #1a1a1a;
+ --ink: #e8e8e8;
+ --ink-dim: #888888;
+ --success: #4ade80;
+ --danger: #f87171;
+ --warn: #fbbf24;
+
--bg: #000000;
- --panel: #0a0a0a;
+ --panel: var(--bg-0);
--panel-2: #111111;
- --border: #1a1a1a;
+ --border: var(--bg-1);
--border-2: #2a2a2a;
- --text: #e8e8e8;
- --text-2: #888888;
+ --text: var(--ink);
+ --text-2: var(--ink-dim);
--text-3: #555555;
--accent: #ffffff;
--accent-2: #ffffff;
- --danger: #f87171;
--ok: var(--success);
}
diff --git a/public/discover/detail.css b/public/discover/detail.css
index 186e744ab..a107636ec 100644
--- a/public/discover/detail.css
+++ b/public/discover/detail.css
@@ -99,7 +99,7 @@ body.detail-page {
border-radius: 14px;
overflow: hidden;
aspect-ratio: 1 / 1;
- background: linear-gradient(135deg, #111 0%, #1a1a1a 100%);
+ background: linear-gradient(135deg, var(--stage-lift) 0%, var(--stage-glow) 100%);
border: 1px solid rgba(255, 255, 255, 0.07);
display: flex;
align-items: center;
diff --git a/public/home.css b/public/home.css
index cf3d75052..fa56e13a8 100644
--- a/public/home.css
+++ b/public/home.css
@@ -201,7 +201,7 @@
flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px;
padding: 10px 16px; border-radius: 9px; cursor: pointer;
font-family: var(--font-display); font-weight: 600; font-size: 14px; letter-spacing: -0.01em;
- color: #0a0a0a; border: 0;
+ color: var(--on-bright); border: 0;
background: linear-gradient(120deg, #ffb454, #ff6ad5 40%, #8b5cf6 66%, #4fc3ff);
background-size: 160% 160%; background-position: 0% 50%;
transition: background-position .5s ease, box-shadow .25s ease, transform .12s ease, opacity .2s ease;
diff --git a/public/marketplace.css b/public/marketplace.css
index 42ba95dae..4ffb1843a 100644
--- a/public/marketplace.css
+++ b/public/marketplace.css
@@ -306,7 +306,7 @@ body.market-page > header {
background:
radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.12), transparent 65%),
radial-gradient(circle at 50% 95%, rgba(255, 255, 255, 0.08), transparent 70%),
- linear-gradient(180deg, #0a0a0a, #050505) center/cover no-repeat;
+ linear-gradient(180deg, var(--stage), var(--stage-deep)) center/cover no-repeat;
border-bottom: 1px solid var(--card-border);
border-top-left-radius: var(--card-radius);
border-top-right-radius: var(--card-radius);
@@ -325,7 +325,7 @@ body.market-page > header {
background:
radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.1), transparent 65%),
radial-gradient(circle at 50% 95%, rgba(255, 255, 255, 0.06), transparent 70%),
- linear-gradient(180deg, #0a0a0a, #050505);
+ linear-gradient(180deg, var(--stage), var(--stage-deep));
}
.market-card-agent .thumb .mv-placeholder-initial {
font-family: var(--font-display);
@@ -534,7 +534,7 @@ body.market-page > header {
}
.market-avatar-detail-stage {
position: relative;
- background: linear-gradient(180deg, #0a0a0a 0%, #0d0d0d 100%);
+ background: linear-gradient(180deg, var(--stage) 0%, var(--stage-lift) 100%);
border: 1px solid var(--stroke);
border-radius: var(--radius-lg);
overflow: hidden;
@@ -1077,7 +1077,7 @@ body.market-page > header {
/* Onchain agent detail */
.onchain-detail-stage {
position: relative;
- background: linear-gradient(180deg, #0a0a0a 0%, #0d0d0d 100%);
+ background: linear-gradient(180deg, var(--stage) 0%, var(--stage-lift) 100%);
border: 1px solid var(--stroke);
border-radius: var(--radius-lg);
min-height: 380px;
@@ -3691,7 +3691,7 @@ body.market-page > header {
width: 100%;
height: 100%;
background: transparent;
- --poster-color: #0a0a0a;
+ --poster-color: var(--stage);
opacity: 0;
transition: opacity 0.4s ease;
z-index: 0;
@@ -4053,7 +4053,7 @@ body.market-page > header {
justify-content: center;
background:
radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.08), transparent 65%),
- linear-gradient(180deg, #0a0a0a, #050505);
+ linear-gradient(180deg, var(--stage), var(--stage-deep));
}
.market-card-agent .card-img-fallback::after {
content: '◎';
@@ -5029,7 +5029,7 @@ body.market-page > header {
aspect-ratio: 4 / 3;
background:
radial-gradient(circle at 50% 55%, rgba(255, 255, 255, 0.06), transparent 70%),
- linear-gradient(180deg, #0a0a0a, #060606);
+ linear-gradient(180deg, var(--stage), var(--stage-deep));
}
.anim-listing-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.anim-listing-thumb-empty {
@@ -5113,7 +5113,7 @@ body.market-page > header {
position: relative;
background:
radial-gradient(circle at 50% 55%, rgba(255, 255, 255, 0.06), transparent 70%),
- linear-gradient(180deg, #0a0a0a, #050505);
+ linear-gradient(180deg, var(--stage), var(--stage-deep));
border-radius: 20px 0 0 20px;
min-height: 320px;
}
diff --git a/public/my-agents/my-agents.css b/public/my-agents/my-agents.css
index c4d988346..7abb40c57 100644
--- a/public/my-agents/my-agents.css
+++ b/public/my-agents/my-agents.css
@@ -4,12 +4,26 @@
display: none !important;
}
-/* ── Design tokens (mirrored from dashboard) ─────────────────────────── */
-:root {
+/* ── Design tokens ───────────────────────────────────────────────────────
+ Dark-only theme layer (QB-07). The --d-* names were a hand-copied mirror of
+ the dashboard palette; they are now aliases of the canonical primitives,
+ which this sheet pins to their dark values because the page has no theme
+ switcher. The [data-theme='light'] half keeps a globally-chosen light theme
+ from half-flipping a surface whose remaining literals are dark. */
+:root,
+/* Doubled :root is a deliberate specificity bump (0,3,0): the token sheet's own
+ [data-theme='light'] block would otherwise win on document order and half-flip
+ this dark-only surface. */
+:root:root[data-theme='light'] {
color-scheme: dark;
+ --bg-0: #0a0a0a;
+ --bg-1: #1a1a1a;
+ --ink: #e8e8e8;
+ --ink-dim: #888888;
+
--d-accent: #ffffff;
--d-accent2: #ffffff;
- --d-border: #1a1a1a;
+ --d-border: var(--bg-1);
--d-bg: #000000;
--d-panel: #111111;
}
diff --git a/public/nav.css b/public/nav.css
index f7a56621d..d113bc7f2 100644
--- a/public/nav.css
+++ b/public/nav.css
@@ -721,7 +721,7 @@
}
.nav-drawer .btn:hover { border-color: var(--nv-text); background: rgba(255,255,255,0.04); }
.nav-drawer .btn.primary { background: var(--nv-text); color: var(--nv-bg); border-color: var(--nv-text); }
-.nav-drawer .btn.primary:hover { background: #fff; color: #0a0a0a; }
+.nav-drawer .btn.primary:hover { background: var(--ink-bright); color: var(--on-accent); }
@media (max-width: 880px) {
.nav-toggle { display: flex; }
.nav-end { display: none; }
diff --git a/public/studio/studio.css b/public/studio/studio.css
index 1148224b1..2eaf004f2 100644
--- a/public/studio/studio.css
+++ b/public/studio/studio.css
@@ -1,20 +1,38 @@
/* Widget Studio — three-column layout. */
-:root {
+@import url('/tokens.css');
+
+/* Dark-only theme layer (QB-07). Widget Studio loads no nav and no /style.css,
+ so before this import it resolved none of the platform vocabulary and had
+ forked its own --panel/--text palette (its --radius-* trio was a hand-typed
+ copy of the canonical scale). It pins the canonical primitives to their dark
+ values, then aliases the local names to them. The [data-theme='light'] half
+ keeps a globally-chosen light theme from half-flipping a surface whose
+ remaining literals are dark. */
+:root,
+/* Doubled :root is a deliberate specificity bump (0,3,0): the token sheet's own
+ [data-theme='light'] block would otherwise win on document order and half-flip
+ this dark-only surface. */
+:root:root[data-theme='light'] {
+ color-scheme: dark;
+ --bg-0: #0a0a0a;
+ --bg-1: #1a1a1a;
+ --ink: #e8e8e8;
+ --ink-dim: #888888;
+ --success: #4ade80;
+ --danger: #f87171;
+ --warn: #fbbf24;
+
--accent: #ffffff;
- --accent-strong: #e8e8e8;
+ --accent-strong: var(--ink);
--border: #2a2a2a;
--border-soft: rgba(255, 255, 255, 0.08);
--bg: #000000;
--panel: #111111;
- --panel-soft: #1a1a1a;
- --muted: #888888;
- --text: #e8e8e8;
- --danger: #f87171;
+ --panel-soft: var(--bg-1);
+ --muted: var(--ink-dim);
+ --text: var(--ink);
--header-h: 60px;
- --radius-sm: 6px;
- --radius-md: 10px;
- --radius-lg: 14px;
--neutral-tint: rgba(255, 255, 255, 0.06);
--neutral-tint-strong: rgba(255, 255, 255, 0.1);
--neutral-icon-bg: rgba(255, 255, 255, 0.07);
@@ -1408,7 +1426,7 @@ a:hover {
.bonding-curve-fill {
height: 100%;
- background: linear-gradient(90deg, #555, #888);
+ background: linear-gradient(90deg, #555, var(--ink-dim));
transition: width 0.25s ease;
border-radius: 999px;
}
diff --git a/public/style.css b/public/style.css
index d4e95ded3..0ea3ccc1e 100644
--- a/public/style.css
+++ b/public/style.css
@@ -69,7 +69,7 @@
/* Primary — white fill, dark ink (use for the main CTA per surface) */
--btn-primary-bg: var(--accent);
- --btn-primary-fg: #0a0a0a;
+ --btn-primary-fg: var(--on-accent);
--btn-primary-border: transparent;
--btn-primary-bg-hover: rgba(255, 255, 255, 0.88);
--btn-primary-bg-active: rgba(255, 255, 255, 0.76);
@@ -1291,7 +1291,7 @@ footer:not([class*="h-footer"]) .separator {
font-size: 1.05rem;
margin: var(--space-md) 0 var(--space-xs);
padding-left: var(--space-md);
- border-left: 4px solid #888;
+ border-left: 4px solid var(--ink-dim);
}
.report-count {
@@ -4995,7 +4995,7 @@ body.deploy-page {
.save-to-account-btn svg { color: var(--ink-dim); }
.make-widget-btn svg { color: #5eead4; } /* teal */
.view-public-profile-btn svg { color: #fcd34d; } /* gold */
-.deploy-onchain-btn svg { color: #888888; } /* indigo */
+.deploy-onchain-btn svg { color: var(--ink-dim); } /* neutral */
/* Deploy on-chain — primary CTA, slightly stronger to pull the eye */
.deploy-onchain-btn {
@@ -6461,7 +6461,7 @@ body[data-viewer-mode='explore'] #layout-switch {
.scene-node__expander {
display: inline-block;
width: 12px;
- color: #888;
+ color: var(--ink-dim);
text-align: center;
font-size: 10px;
flex-shrink: 0;
@@ -6480,7 +6480,7 @@ body[data-viewer-mode='explore'] #layout-switch {
.scene-node__visibility {
background: none;
border: none;
- color: #888;
+ color: var(--ink-dim);
font-size: 10px;
cursor: pointer;
padding: 0 4px;
@@ -6518,7 +6518,7 @@ body[data-viewer-mode='explore'] #layout-switch {
font-size: 10px;
text-transform: uppercase;
letter-spacing: 0.08em;
- color: #888;
+ color: var(--ink-dim);
border-bottom: 1px solid #232323;
padding-bottom: 2px;
}
@@ -6531,7 +6531,7 @@ body[data-viewer-mode='explore'] #layout-switch {
font-size: 11px;
}
.inspector__label {
- color: #888;
+ color: var(--ink-dim);
flex-shrink: 0;
min-width: 40px;
}
@@ -6673,7 +6673,7 @@ body[data-viewer-mode='explore'] #layout-switch {
}
.texture-card__meta {
font-size: 10px;
- color: #888;
+ color: var(--ink-dim);
font-family: monospace;
}
.texture-card__mats {
@@ -6718,7 +6718,7 @@ body[data-viewer-mode='explore'] #layout-switch {
.texture-lightbox__dim {
font-family: monospace;
font-size: 10px;
- color: #888;
+ color: var(--ink-dim);
}
.texture-lightbox__channels {
display: flex;
@@ -6808,7 +6808,7 @@ body[data-viewer-mode='explore'] #layout-switch {
padding: var(--space-xs) var(--space-md);
background: #0c0c0c;
border-top: 1px solid #2b2b2b;
- color: #888;
+ color: var(--ink-dim);
font-size: 11px;
font-family: monospace;
}
@@ -7141,14 +7141,14 @@ body[data-viewer-mode='main'][data-authed='false'] .auth-gate {
.auth-gate__btn--primary {
background: linear-gradient(180deg, #fff, #e8e8ef);
- color: #0a0a0a;
+ color: var(--on-bright);
border-color: rgba(255, 255, 255, 0.9);
font-weight: 600;
}
.auth-gate__btn--primary:hover {
background: #fff;
- color: #0a0a0a;
+ color: var(--on-bright);
border-color: #fff;
}
@@ -7340,7 +7340,7 @@ body[data-viewer-mode='main'][data-authed='false'] .auth-gate {
margin: 0 var(--space-md) var(--space-md);
}
.note a {
- color: #888888;
+ color: var(--ink-dim);
}
@@ -8408,7 +8408,7 @@ textarea.erc8004-code {
position: relative;
display: block;
aspect-ratio: 1 / 1;
- background: linear-gradient(135deg, #111 0%, #1a1a1a 100%);
+ background: linear-gradient(135deg, var(--stage-lift) 0%, var(--stage-glow) 100%);
overflow: hidden;
text-decoration: none;
}
@@ -9834,7 +9834,7 @@ body[data-layout='next'] .next-drawer__body .dg.main {
align-items: center;
justify-content: center;
background: rgba(255, 255, 255, 0.95);
- color: #0a0a0a;
+ color: var(--on-bright);
border: 0;
border-radius: 50%;
cursor: pointer;
@@ -11031,7 +11031,7 @@ a.pill--devnet:hover {
border-radius: var(--radius-sm);
border: 1px solid rgba(255, 255, 255, 0.22);
background: rgba(255, 255, 255, 0.06);
- color: #888888;
+ color: var(--ink-dim);
font-size: 12px;
font-weight: 600;
cursor: pointer;
@@ -11066,7 +11066,7 @@ a.pill--devnet:hover {
border-radius: var(--radius-sm);
border: 1px solid rgba(255, 255, 255, 0.25);
background: rgba(255, 255, 255, 0.07);
- color: #888888;
+ color: var(--ink-dim);
font-size: 13px;
font-weight: 600;
cursor: pointer;
diff --git a/public/tokens.css b/public/tokens.css
index 5f43685af..963ac2926 100644
--- a/public/tokens.css
+++ b/public/tokens.css
@@ -277,6 +277,19 @@
--stage-lift: #0d0d0d;
--stage-glow: #242424;
+ /* Ink ON the accent fill (QB-07). A primary CTA paints var(--accent) and needs
+ the opposite ink; every surface that wanted one hand-typed #0a0a0a, which
+ stayed black when the light theme remaps --accent to a real blue, giving
+ black-on-blue at 2.2:1. The value is always the page ground, so it flips
+ with the theme and one name serves buttons, chips, badges and pills. */
+ --on-accent: #0a0a0a;
+
+ /* Ink on a permanently BRIGHT fill (QB-07). The mirror of the --on-scrim
+ family, and theme-invariant for the same reason: a white dock button or a
+ vivid gradient CTA stays bright in both themes, so its ink must stay dark.
+ Distinct from --on-accent, which sits on var(--accent) and DOES flip. */
+ --on-bright: #0a0a0a;
+
/* Motion (B01) — one duration ladder + named easings. Compose as
`transition: <prop> var(--duration-fast) var(--ease-standard);`
Respect prefers-reduced-motion at the component level. */
@@ -481,6 +494,7 @@
/* Accent — white is invisible on light, so light gets a real accent. */
--accent: #2563eb;
--accent-soft: rgba(37, 99, 235, 0.10);
+ --on-accent: #ffffff;
/* Elevation — softer, cooler shadows on a light canvas */
--shadow-1: 0 1px 3px rgba(15, 18, 28, 0.08);
diff --git a/src/agent-detail-v2.css b/src/agent-detail-v2.css
index c60d56751..af599aa68 100644
--- a/src/agent-detail-v2.css
+++ b/src/agent-detail-v2.css
@@ -571,7 +571,7 @@
background: #ff4545;
}
.ad-trade-outcome.flat {
- background: #888;
+ background: var(--ink-dim);
}
.ad-trade-outcome.open {
background: #fbbe00;
diff --git a/src/agent-detail.css b/src/agent-detail.css
index 850243d99..6774c2e9d 100644
--- a/src/agent-detail.css
+++ b/src/agent-detail.css
@@ -1,4 +1,20 @@
-:root {
+/* Dark-only theme layer (QB-07). The page loads /nav.css, so the canonical
+ vocabulary resolves here; the --ad-* names are aliases of it, not a second
+ palette. The card radius, elevation and skeleton values below used to be
+ hand-copied literals of the canonical tokens, which meant a change to
+ public/tokens.css never reached this page. The [data-theme='light'] half of
+ the selector keeps a globally-chosen light theme from half-flipping a surface
+ whose remaining literals are dark. */
+:root,
+/* Doubled :root is a deliberate specificity bump (0,3,0): the token sheet's own
+ [data-theme='light'] block would otherwise win on document order and half-flip
+ this dark-only surface. */
+:root:root[data-theme='light'] {
+ color-scheme: dark;
+ --bg-1: #1a1a1a;
+ --ink-dim: #888888;
+ --accent-violet: #c4b5fd;
+
--ad-bg: #0d0d0d;
--ad-bg-2: #141414;
--ad-card: #181818;
@@ -7,19 +23,15 @@
--ad-text: #e7e9ee;
--ad-muted: rgba(231, 233, 238, 0.55);
--ad-dim: rgba(231, 233, 238, 0.35);
- --ad-violet: #888888;
+ /* Named violet, painted grey: the platform violet is a token now, so this
+ alias carries the identity hue the name always promised (and lifts inline
+ links off 4.6:1 grey). */
+ --ad-violet: var(--accent-violet);
--ad-green: var(--success);
--ad-amber: #f5a524;
--ad-cyan: #57c7ff;
- /* Shared B04 surface vocabulary — this page is standalone (no style.css),
- so mirror the canonical card radius / elevation / skeleton tokens here
- to keep cards and loading states consistent with the rest of the site. */
- --radius-card: 14px;
- --shadow-1: 0 1px 3px rgba(0, 0, 0, 0.3);
- --shadow-2: 0 4px 24px rgba(0, 0, 0, 0.4), 0 1px 4px rgba(0, 0, 0, 0.2);
- --skeleton-base: rgba(255, 255, 255, 0.04);
- --skeleton-sheen: rgba(255, 255, 255, 0.08);
+ --radius-card: var(--radius-lg);
--skeleton-radius: 5px;
}
@@ -142,7 +154,7 @@ a {
}
.ad-banner {
- background: linear-gradient(90deg, #1a1a1a, #222222);
+ background: linear-gradient(90deg, var(--bg-1), #222222);
color: var(--ad-text);
font-size: 12px;
text-align: center;
diff --git a/src/character-creator.css b/src/character-creator.css
index 85839b983..ed1829109 100644
--- a/src/character-creator.css
+++ b/src/character-creator.css
@@ -3,18 +3,37 @@
responsive down to a single column on phones. Mirrors the monochrome surface
tokens the rest of the platform uses. */
-:root {
+@import url('/tokens.css');
+
+/* Dark-only theme layer (QB-07). The studio pins the canonical primitives to
+ their dark values, then aliases its local names to them instead of forking a
+ second palette (B02). The [data-theme='light'] half of the selector keeps a
+ globally-chosen light theme from half-flipping a surface whose remaining
+ literals are dark. Importing the token sheet also brings the platform floors
+ (focus ring, disabled affordance, reduced motion) to this page. */
+:root,
+/* Doubled :root is a deliberate specificity bump (0,3,0): the token sheet's own
+ [data-theme='light'] block would otherwise win on document order and half-flip
+ this dark-only surface. */
+:root:root[data-theme='light'] {
color-scheme: dark;
+ --bg-0: #0a0a0a;
+ --bg-1: #1a1a1a;
+ --ink: #e8e8e8;
+ --ink-dim: #888888;
+ --success: #4ade80;
+ --danger: #f87171;
+ --warn: #fbbf24;
+
--bg: #000000;
- --panel: #0a0a0a;
+ --panel: var(--bg-0);
--panel-elev: #111114;
- --border: #1a1a1a;
+ --border: var(--bg-1);
--border-strong: #2a2a2a;
- --text: #e8e8e8;
- --muted: #888888;
+ --text: var(--ink);
+ --muted: var(--ink-dim);
--accent: #ffffff;
- --accent-ink: #000000;
- --danger: #f87171;
+ --accent-ink: var(--on-accent);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
diff --git a/src/coin-pages.css b/src/coin-pages.css
index 7f7d07711..3562a15ff 100644
--- a/src/coin-pages.css
+++ b/src/coin-pages.css
@@ -91,7 +91,7 @@ html:not([data-theme='light']) {
--cv-accent: #60a5fa;
--cv-accent-hover: #93bbfc;
--cv-accent-solid: #60a5fa;
- --cv-on-accent: #0a0a0a;
+ --cv-on-accent: var(--on-accent);
--cv-green-text: var(--success);
--cv-red-text: var(--danger);
--cv-surface: #09090b;
diff --git a/src/erc8004/deploy-button.css b/src/erc8004/deploy-button.css
index e847c1941..681747bab 100644
--- a/src/erc8004/deploy-button.css
+++ b/src/erc8004/deploy-button.css
@@ -72,7 +72,7 @@
}
.deploy-chain-select optgroup {
- color: #888;
+ color: var(--ink-dim);
font-style: italic;
}
@@ -123,7 +123,7 @@
opacity: 0.45;
cursor: not-allowed;
border-color: rgba(255, 255, 255, 0.1);
- color: #888;
+ color: var(--ink-dim);
}
/* ── Success chip ────────────────────────────────────────────────────────── */
@@ -260,7 +260,7 @@
.deploy-tooltip {
margin-left: 0.5em;
font-size: 0.75rem;
- color: #888;
+ color: var(--ink-dim);
font-style: italic;
}
diff --git a/src/first-meet.css b/src/first-meet.css
index 862182b81..3ede8989e 100644
--- a/src/first-meet.css
+++ b/src/first-meet.css
@@ -242,7 +242,7 @@
.fm-tour-primary {
background: #ffffff;
- color: #0a0a0a;
+ color: var(--on-bright);
border: none;
border-radius: 8px;
padding: 6px 14px;
diff --git a/src/portal/portal.css b/src/portal/portal.css
index b705942ba..27e575fba 100644
--- a/src/portal/portal.css
+++ b/src/portal/portal.css
@@ -104,7 +104,7 @@
.pt-btn:active { transform: translateY(1px); }
.pt-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pt-btn[disabled] { opacity: 0.5; cursor: not-allowed; }
-.pt-btn--primary { background: var(--accent); color: #0a0a0a; border-color: transparent; }
+.pt-btn--primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.pt-btn--primary:hover { background: rgba(255, 255, 255, 0.88); }
/* ── address bar ─────────────────────────────────────────────────────────── */
diff --git a/src/print-insert.css b/src/print-insert.css
index 7b321bbf2..eee9df2dc 100644
--- a/src/print-insert.css
+++ b/src/print-insert.css
@@ -4,13 +4,27 @@
nothing here uses a screen-only trick (dark surfaces, backdrop filters) that
a printer renders as a slab of toner.
- The palette is local rather than pulled from public/tokens.css on purpose:
- this page loads no nav and no footer (it is a print target, not a site page),
- so a token reference here would silently fall back to its light-on-light
- default and hide the toolbar. */
+ The palette is local because this page loads no nav and no footer (it is a
+ print target, not a site page). It now imports the token sheet directly, so a
+ canonical reference resolves here instead of falling back to a light-on-light
+ default, and the platform floors (focus ring, disabled affordance, reduced
+ motion) reach the on-screen toolbar. */
-:root {
- --pi-bg: #0a0a0a;
+@import url('/tokens.css');
+
+/* Dark-only on screen: the sheet pins the canonical primitives to their dark
+ values so a globally-chosen light theme cannot half-flip a surface whose
+ remaining literals are dark. The @media print block below overrides all of
+ this for paper. */
+:root,
+/* Doubled :root is a deliberate specificity bump (0,3,0): the token sheet's own
+ [data-theme='light'] block would otherwise win on document order and half-flip
+ this dark-only surface. */
+:root:root[data-theme='light'] {
+ color-scheme: dark;
+ --bg-0: #0a0a0a;
+
+ --pi-bg: var(--bg-0);
--pi-ink: #f4f4f5;
--pi-dim: #a1a1aa;
--pi-line: rgba(255, 255, 255, 0.16);
diff --git a/src/share-panel.css b/src/share-panel.css
index 1a40a36cc..6199c6409 100644
--- a/src/share-panel.css
+++ b/src/share-panel.css
@@ -39,7 +39,7 @@
.share-panel-close {
background: none;
border: none;
- color: #888;
+ color: var(--ink-dim);
font-size: 22px;
line-height: 1;
cursor: pointer;
@@ -61,7 +61,7 @@
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.07em;
- color: #888;
+ color: var(--ink-dim);
margin-bottom: 6px;
}
@@ -166,7 +166,7 @@
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.06em;
- color: #888;
+ color: var(--ink-dim);
padding: 0 4px;
}
diff --git a/src/swarms.css b/src/swarms.css
index 9ec68e157..e9647aae8 100644
--- a/src/swarms.css
+++ b/src/swarms.css
@@ -70,7 +70,7 @@ body {
.sw-btn:hover { background: var(--surface-3); transform: translateY(-1px); }
.sw-btn:active { transform: translateY(0); }
.sw-btn:focus-visible { outline: 2px solid var(--wallet-accent); outline-offset: 2px; }
-.sw-btn--primary { background: var(--ink-bright); color: #0a0a0a; border-color: transparent; }
+.sw-btn--primary { background: var(--ink-bright); color: var(--on-accent); border-color: transparent; }
.sw-btn--primary:hover { background: #fff; }
.sw-btn--danger { background: rgba(248, 113, 113, 0.12); border-color: rgba(248, 113, 113, 0.4); color: var(--danger); }
.sw-btn--danger:hover { background: rgba(248, 113, 113, 0.2); }