Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

give content cards a real surface elevation in every day and night theme

[._.]/ Adam Eivye2a24ffb7848
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 8a77121a02..8c9a414efb 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -28,6 +28,8 @@
- **The burn-job preset picker snapped back to "Choose a preset…" the moment you picked one.** Applying a preset copies its text into the step's work prompt 60 lines further down the row, so with the control blank the click read as a no-op and people picked again. It now shows the preset whose prompt the step still matches verbatim — derived from the text rather than stored, since nothing on disk records a preset id, so it reverts to the placeholder as soon as the prompt is edited into something else and never claims a step is an audit it no longer is. Re-picking the preset a row already matches no longer raises the "replace your text?" confirm; the text *is* that preset's.
+- **Content cards were nearly invisible against the page in every theme, and dissolved completely at reduced opacity.** Card and page colors were separated by as little as 1.04:1 (Classic Noon, Black ICE Terminal) — and the common `bg-port-card/40` spelling then faded even that toward the page, leaving a themed border floating around nothing. Cards now render against a per-theme fill floor (`--port-card-min-alpha`), every theme's card/page pair clears a 1.12:1 separation, and the card elevation rule covers all fill opacities instead of only `bg-port-card/50`, so two cards on one page can't sit at different elevations for no visible reason. Hover and active variants are deliberately left unfloored — a hover landing on the resting fill is not feedback — and translucent themes set their own lower floor so glass stays glass. `portosThemes.test.js` asserts the separation, the floor ordering, and that body and muted text still clear WCAG AA on the resulting fill, for every theme; `docs/themes/README.md` documents the three-level page/card/well scale.
+
- **The `ignore-scripts` supply-chain guard was silently inactive for every workspace install, including CI.** The repo-root `.npmrc` has pinned `ignore-scripts=true` for a while, but npm resolves the project `.npmrc` from the *local prefix* and never walks up the directory tree — so it never applied to `cd client && npm install`, `cd server && npm install`, or `npm ci --prefix server` / `--prefix client`, which is exactly what CI runs and what the documented per-workspace test workflow uses. In those paths every dependency kept an install-time code-execution slot: the same slot the August 2026 keyv/cacheable (Shai-Hulud) worm used, via a `preinstall` hook, to harvest credentials before any application code ran. `client/`, `server/`, `autofixer/`, and `browser/` now each carry their own `.npmrc`, so the guard holds in every workspace install path — whether entered by `cd`ing in or via `--prefix`.
Closing the hole made the trusted-rebuild allowlist load-bearing for the first time, and it had drifted across its five copies (the root `setup` script, `scripts/ensure-deps.js`, `update.sh`, `update.ps1`, `setup.ps1`): the `esbuild` entries were dead — vite 8 dropped that dependency — while `onnxruntime-node` and `protobufjs` were missing entirely, so CI ran install hooks that the local setup skipped. All five now read one allowlist from `scripts/trusted-rebuilds.js`, and CI rebuilds it explicitly after installing server dependencies so `node-pty`'s native binding is still present for the smoke-boot. `scripts/trusted-rebuilds.test.js` fails if any workspace `.npmrc` loses the setting, or if a dependency shows up with an install hook nobody has decided about — the second case being how a missing native build otherwise surfaces much later as a confusing runtime crash.
diff --git a/client/src/components/quotaBurn/JobRow.jsx b/client/src/components/quotaBurn/JobRow.jsx
index e7dd633c21..716da2044e 100644
--- a/client/src/components/quotaBurn/JobRow.jsx
+++ b/client/src/components/quotaBurn/JobRow.jsx
@@ -59,7 +59,11 @@ export default function JobRow({
})[descriptor.kind];
return (
- <div className="rounded border border-port-border/70 bg-port-bg/40 p-3 space-y-3">
+ // `bg-port-bg`, not `bg-port-bg/40`: a step sits INSIDE the family card, so
+ // it reads as a sunken well only if it carries the page color at full
+ // strength. At 40% it composited most of the way back to the card fill and
+ // eight steps ran together as one undifferentiated block.
+ <div className="rounded border border-port-border/70 bg-port-bg p-3 space-y-3">
<div className="flex flex-wrap items-center gap-2">
<input
id={`${idPrefix}-enabled`}
diff --git a/client/src/index.css b/client/src/index.css
index 9952822145..a4c0c44472 100644
--- a/client/src/index.css
+++ b/client/src/index.css
@@ -61,6 +61,16 @@
--wr-reading-ink: #1a1a1a;
--port-bg-alpha: 1;
--port-card-alpha: 1;
+ /* Floor for a CONTENT-CARD fill (see the `bg-port-card/NN` block below).
+ A card written as `bg-port-card/40` used to render at 40% of the card
+ color over the page background — on themes whose card and page colors are
+ close by design (every day theme; Phosphor Paper is 251/246/232 on
+ 243/237/220), that dissolved the card into the page and left a border
+ floating around nothing. The floor keeps a card reading as a raised
+ surface; translucent themes set their own lower value so glass stays
+ glass. State variants (hover/active) are deliberately NOT floored — they
+ need the full alpha range to register as feedback. */
+ --port-card-min-alpha: 1;
--port-border-alpha: 1;
--port-sidebar-alpha: 1;
--port-overlay-alpha: 0.72;
@@ -275,22 +285,33 @@ html[data-port-theme] [class~="hover:bg-port-bg/80"]:hover { background-color: r
html[data-port-theme] [class~="bg-port-bg/90"],
html[data-port-theme] [class~="hover:bg-port-bg/90"]:hover { background-color: rgb(var(--port-bg) / calc(var(--port-bg-alpha) * 0.9)) !important; }
-html[data-port-theme] [class~="bg-port-card/30"],
+/*
+ * Card fills carry a per-theme floor (`--port-card-min-alpha`), so a card
+ * written at any opacity still reads as a surface raised off the page instead
+ * of dissolving into it. `max()` means a theme that WANTS translucency (Lumen
+ * Glass) simply sets a lower floor — the modifier's intent is preserved, its
+ * ability to vanish is not.
+ *
+ * State variants are split into their own rules and left unfloored: a hover
+ * that lands on the same color as the resting fill is not feedback.
+ */
+html[data-port-theme] [class~="bg-port-card/30"] { background-color: rgb(var(--port-card) / max(var(--port-card-min-alpha), calc(var(--port-card-alpha) * 0.3))) !important; }
+html[data-port-theme] [class~="bg-port-card/40"] { background-color: rgb(var(--port-card) / max(var(--port-card-min-alpha), calc(var(--port-card-alpha) * 0.4))) !important; }
+html[data-port-theme] [class~="bg-port-card/50"] { background-color: rgb(var(--port-card) / max(var(--port-card-min-alpha), calc(var(--port-card-alpha) * 0.5))) !important; }
+html[data-port-theme] [class~="bg-port-card/60"] { background-color: rgb(var(--port-card) / max(var(--port-card-min-alpha), calc(var(--port-card-alpha) * 0.6))) !important; }
+html[data-port-theme] [class~="bg-port-card/70"] { background-color: rgb(var(--port-card) / max(var(--port-card-min-alpha), calc(var(--port-card-alpha) * 0.7))) !important; }
+html[data-port-theme] [class~="bg-port-card/80"] { background-color: rgb(var(--port-card) / max(var(--port-card-min-alpha), calc(var(--port-card-alpha) * 0.8))) !important; }
+html[data-port-theme] [class~="bg-port-card/90"] { background-color: rgb(var(--port-card) / max(var(--port-card-min-alpha), calc(var(--port-card-alpha) * 0.9))) !important; }
+html[data-port-theme] [class~="bg-port-card/95"] { background-color: rgb(var(--port-card) / max(var(--port-card-min-alpha), calc(var(--port-card-alpha) * 0.95))) !important; }
+
html[data-port-theme] [class~="hover:bg-port-card/30"]:hover { background-color: rgb(var(--port-card) / calc(var(--port-card-alpha) * 0.3)) !important; }
-html[data-port-theme] [class~="bg-port-card/40"],
html[data-port-theme] [class~="hover:bg-port-card/40"]:hover { background-color: rgb(var(--port-card) / calc(var(--port-card-alpha) * 0.4)) !important; }
-html[data-port-theme] [class~="bg-port-card/50"],
html[data-port-theme] [class~="hover:bg-port-card/50"]:hover,
html[data-port-theme] [class~="active:bg-port-card/50"]:active { background-color: rgb(var(--port-card) / calc(var(--port-card-alpha) * 0.5)) !important; }
-html[data-port-theme] [class~="bg-port-card/60"],
html[data-port-theme] [class~="hover:bg-port-card/60"]:hover { background-color: rgb(var(--port-card) / calc(var(--port-card-alpha) * 0.6)) !important; }
-html[data-port-theme] [class~="bg-port-card/70"],
html[data-port-theme] [class~="hover:bg-port-card/70"]:hover { background-color: rgb(var(--port-card) / calc(var(--port-card-alpha) * 0.7)) !important; }
-html[data-port-theme] [class~="bg-port-card/80"],
html[data-port-theme] [class~="hover:bg-port-card/80"]:hover { background-color: rgb(var(--port-card) / calc(var(--port-card-alpha) * 0.8)) !important; }
-html[data-port-theme] [class~="bg-port-card/90"],
html[data-port-theme] [class~="hover:bg-port-card/90"]:hover { background-color: rgb(var(--port-card) / calc(var(--port-card-alpha) * 0.9)) !important; }
-html[data-port-theme] [class~="bg-port-card/95"],
html[data-port-theme] [class~="hover:bg-port-card/95"]:hover { background-color: rgb(var(--port-card) / calc(var(--port-card-alpha) * 0.95)) !important; }
html[data-port-theme] .border-port-border,
@@ -348,7 +369,22 @@ html[data-port-theme] [role="button"] {
opacity var(--port-motion-fast) ease;
}
-html[data-port-theme] :is(.bg-port-card, [class~="bg-port-card/50"]):is(.border, .rounded, .rounded-lg, .rounded-xl, .rounded-2xl) {
+/* Every rounded/bordered CONTENT CARD gets the theme's card elevation, at any
+ fill opacity. Listing only `/50` meant a card written `bg-port-card/40` — the
+ other common spelling — silently lost both its shadow and its glass blur, so
+ two adjacent cards on one page could sit at different elevations for no
+ reason a reader could see. */
+html[data-port-theme] :is(
+ .bg-port-card,
+ [class~="bg-port-card/30"],
+ [class~="bg-port-card/40"],
+ [class~="bg-port-card/50"],
+ [class~="bg-port-card/60"],
+ [class~="bg-port-card/70"],
+ [class~="bg-port-card/80"],
+ [class~="bg-port-card/90"],
+ [class~="bg-port-card/95"]
+):is(.border, .rounded, .rounded-lg, .rounded-xl, .rounded-2xl) {
backdrop-filter: var(--port-backdrop-filter);
box-shadow: var(--port-shadow-card);
}
@@ -889,7 +925,19 @@ html[data-port-theme] .cybercity-themed [class~="hover:bg-cyan-500/10"]:hover {
html[data-port-theme] .cybercity-themed [class~="hover:bg-cyan-500/5"]:hover { background-color: rgb(var(--port-accent) / 0.08) !important; }
/* === Lumen Glass Day === */
-html[data-port-theme="lumen-glass-day"] :is(.bg-port-card, [class~="bg-port-card/50"]):is(.border, .rounded, .rounded-lg, .rounded-xl, .rounded-2xl) {
+/* Same card set as the base elevation rule above — every fill opacity, not just
+ `/50` — so this theme's softened border lands on all of its cards. */
+html[data-port-theme="lumen-glass-day"] :is(
+ .bg-port-card,
+ [class~="bg-port-card/30"],
+ [class~="bg-port-card/40"],
+ [class~="bg-port-card/50"],
+ [class~="bg-port-card/60"],
+ [class~="bg-port-card/70"],
+ [class~="bg-port-card/80"],
+ [class~="bg-port-card/90"],
+ [class~="bg-port-card/95"]
+):is(.border, .rounded, .rounded-lg, .rounded-xl, .rounded-2xl) {
border-color: rgb(var(--port-border) / 0.22) !important;
box-shadow: var(--port-shadow-card);
}
diff --git a/client/src/themes/portosThemes.js b/client/src/themes/portosThemes.js
index 96dc3ab9ca..43384bf071 100644
--- a/client/src/themes/portosThemes.js
+++ b/client/src/themes/portosThemes.js
@@ -48,10 +48,10 @@ export const THEMES = {
doc: '/docs/themes/classic-midnight.md',
colorScheme: 'dark',
density: 'comfortable',
- swatches: ['#0f0f0f', '#1a1a1a', '#3b82f6', '#22c55e'],
+ swatches: ['#0f0f0f', '#1e1e1e', '#3b82f6', '#22c55e'],
colors: {
'--port-bg': '15 15 15',
- '--port-card': '26 26 26',
+ '--port-card': '30 30 30',
'--port-border': '42 42 42',
'--port-accent': '59 130 246',
'--port-text': '229 229 229',
@@ -67,6 +67,7 @@ export const THEMES = {
...baseMotionTokens,
'--port-bg-alpha': '1',
'--port-card-alpha': '1',
+ '--port-card-min-alpha': '1',
'--port-border-alpha': '1',
'--port-sidebar-alpha': '1',
'--port-overlay-alpha': '0.72',
@@ -111,9 +112,9 @@ export const THEMES = {
accent: '#3b82f6',
colorScheme: 'light',
density: 'comfortable',
- swatches: ['#fafafa', '#ffffff', '#3b82f6', '#16a34a'],
+ swatches: ['#f0f0f0', '#ffffff', '#3b82f6', '#16a34a'],
colors: {
- '--port-bg': '250 250 250',
+ '--port-bg': '240 240 240',
'--port-card': '255 255 255',
'--port-border': '212 212 216',
'--port-accent': '37 99 235',
@@ -140,6 +141,7 @@ export const THEMES = {
...baseMotionTokens,
'--port-bg-alpha': '1',
'--port-card-alpha': '1',
+ '--port-card-min-alpha': '1',
'--port-border-alpha': '1',
'--port-sidebar-alpha': '1',
'--port-overlay-alpha': '0.72',
@@ -185,10 +187,10 @@ export const THEMES = {
doc: '/docs/themes/lumen-glass.md',
colorScheme: 'dark',
density: 'spacious',
- swatches: ['#071016', '#12242d', '#67e8f9', '#fb7185'],
+ swatches: ['#071016', '#1c2e37', '#67e8f9', '#fb7185'],
colors: {
'--port-bg': '7 16 22',
- '--port-card': '18 36 45',
+ '--port-card': '28 46 55',
'--port-border': '129 229 255',
'--port-accent': '103 232 249',
'--port-success': '74 222 128',
@@ -216,6 +218,7 @@ export const THEMES = {
'--port-radius-pill': '9999px',
'--port-bg-alpha': '0.92',
'--port-card-alpha': '0.58',
+ '--port-card-min-alpha': '0.5',
'--port-border-alpha': '0.24',
'--port-sidebar-alpha': '0.72',
'--port-overlay-alpha': '0.68',
@@ -260,9 +263,9 @@ export const THEMES = {
accent: '#0891b2',
colorScheme: 'light',
density: 'spacious',
- swatches: ['#f5efe6', '#ffffff', '#0891b2', '#fb7185'],
+ swatches: ['#eae4db', '#ffffff', '#0891b2', '#fb7185'],
colors: {
- '--port-bg': '245 239 230',
+ '--port-bg': '234 228 219',
'--port-card': '255 255 255',
'--port-border': '8 145 178',
'--port-accent': '8 145 178',
@@ -291,6 +294,7 @@ export const THEMES = {
'--port-radius-pill': '9999px',
'--port-bg-alpha': '1',
'--port-card-alpha': '0.6',
+ '--port-card-min-alpha': '0.52',
'--port-border-alpha': '0.2',
'--port-sidebar-alpha': '0.72',
'--port-overlay-alpha': '0.6',
@@ -336,10 +340,10 @@ export const THEMES = {
doc: '/docs/themes/black-ice-terminal.md',
colorScheme: 'dark',
density: 'compact',
- swatches: ['#020403', '#07120d', '#00f5a0', '#ff2bd6'],
+ swatches: ['#020403', '#151c19', '#00f5a0', '#ff2bd6'],
colors: {
'--port-bg': '2 4 3',
- '--port-card': '6 13 10',
+ '--port-card': '21 28 25',
'--port-border': '0 245 160',
'--port-accent': '0 245 160',
'--port-success': '45 255 136',
@@ -369,6 +373,7 @@ export const THEMES = {
'--port-radius-pill': '0.25rem',
'--port-bg-alpha': '1',
'--port-card-alpha': '0.9',
+ '--port-card-min-alpha': '0.8',
'--port-border-alpha': '0.42',
'--port-sidebar-alpha': '0.98',
'--port-overlay-alpha': '0.82',
@@ -413,9 +418,9 @@ export const THEMES = {
accent: '#0a7a4a',
colorScheme: 'light',
density: 'compact',
- swatches: ['#f3eddc', '#fbf6e8', '#0a7a4a', '#b91d6a'],
+ swatches: ['#ece6d5', '#fbf6e8', '#0a7a4a', '#b91d6a'],
colors: {
- '--port-bg': '243 237 220',
+ '--port-bg': '236 230 213',
'--port-card': '251 246 232',
'--port-border': '10 122 74',
'--port-accent': '10 122 74',
@@ -446,6 +451,7 @@ export const THEMES = {
'--port-radius-pill': '0.25rem',
'--port-bg-alpha': '1',
'--port-card-alpha': '0.94',
+ '--port-card-min-alpha': '0.86',
'--port-border-alpha': '0.38',
'--port-sidebar-alpha': '0.96',
'--port-overlay-alpha': '0.7',
@@ -491,10 +497,10 @@ export const THEMES = {
doc: '/docs/themes/blueprint-ops.md',
colorScheme: 'dark',
density: 'compact',
- swatches: ['#0b1020', '#111827', '#60a5fa', '#f59e0b'],
+ swatches: ['#0b1020', '#1b2231', '#60a5fa', '#f59e0b'],
colors: {
'--port-bg': '11 16 32',
- '--port-card': '17 24 39',
+ '--port-card': '27 34 49',
'--port-border': '148 163 184',
'--port-accent': '96 165 250',
'--port-success': '52 211 153',
@@ -521,6 +527,7 @@ export const THEMES = {
'--port-radius-pill': '0.375rem',
'--port-bg-alpha': '1',
'--port-card-alpha': '0.86',
+ '--port-card-min-alpha': '0.76',
'--port-border-alpha': '0.28',
'--port-sidebar-alpha': '0.94',
'--port-overlay-alpha': '0.78',
@@ -565,9 +572,9 @@ export const THEMES = {
accent: '#1d4ed8',
colorScheme: 'light',
density: 'compact',
- swatches: ['#f0f4f8', '#ffffff', '#1d4ed8', '#d97706'],
+ swatches: ['#eaeef2', '#ffffff', '#1d4ed8', '#d97706'],
colors: {
- '--port-bg': '240 244 248',
+ '--port-bg': '234 238 242',
'--port-card': '255 255 255',
'--port-border': '37 99 235',
'--port-accent': '29 78 216',
@@ -595,6 +602,7 @@ export const THEMES = {
'--port-radius-pill': '0.375rem',
'--port-bg-alpha': '1',
'--port-card-alpha': '0.92',
+ '--port-card-min-alpha': '0.84',
'--port-border-alpha': '0.18',
'--port-sidebar-alpha': '0.94',
'--port-overlay-alpha': '0.72',
diff --git a/client/src/themes/portosThemes.test.js b/client/src/themes/portosThemes.test.js
index dffc726e3f..c132a9a5f7 100644
--- a/client/src/themes/portosThemes.test.js
+++ b/client/src/themes/portosThemes.test.js
@@ -40,6 +40,68 @@ describe('portosThemes warning token contrast', () => {
);
});
+describe('content cards read as raised surfaces in every theme', () => {
+ const entries = Object.values(THEMES);
+
+ // A content card's fill has to differ from the page behind it by enough to be
+ // SEEN, in both day and night themes. Several themes shipped card/bg pairs
+ // separated by ~1.04:1 — indistinguishable — and the common `bg-port-card/40`
+ // spelling then faded even that toward the page, leaving a bordered outline
+ // around nothing (the Quota Burn family cards were the report).
+ //
+ // 1.12:1 is not a WCAG threshold (WCAG has nothing to say about surface
+ // separation); it is the empirical floor at which a filled panel reads as
+ // raised on this app's palettes without turning into a hard edge.
+ const SURFACE_SEPARATION = 1.12;
+
+ it('has both day and night themes (guards the loops below from vacuously passing)', () => {
+ expect(entries.some((theme) => theme.mode === 'day')).toBe(true);
+ expect(entries.some((theme) => theme.mode === 'night')).toBe(true);
+ });
+
+ it.each(entries.map((theme) => [theme.id, theme]))(
+ '%s: defines a card fill floor no higher than its own card alpha',
+ (_id, theme) => {
+ const alpha = Number(theme.tokens['--port-card-alpha']);
+ const floor = Number(theme.tokens['--port-card-min-alpha']);
+ expect(Number.isFinite(floor)).toBe(true);
+ expect(floor).toBeGreaterThan(0);
+ // A floor ABOVE the theme's own card alpha would make `bg-port-card/40`
+ // render more opaque than plain `bg-port-card` — the elevation scale
+ // inverted.
+ expect(floor).toBeLessThanOrEqual(alpha);
+ },
+ );
+
+ it.each(entries.map((theme) => [theme.id, theme]))(
+ '%s: a card at its minimum fill still separates from the page background',
+ (_id, theme) => {
+ const bg = parseRgb(theme.colors['--port-bg']);
+ const card = parseRgb(theme.colors['--port-card']);
+ const floor = Number(theme.tokens['--port-card-min-alpha']);
+ // The worst case a card can render at: the floor alpha composited over
+ // the page background.
+ const composited = card.map((channel, index) => floor * channel + (1 - floor) * bg[index]);
+ expect(contrastRatio(bg, composited)).toBeGreaterThanOrEqual(SURFACE_SEPARATION);
+ },
+ );
+
+ it.each(entries.map((theme) => [theme.id, theme]))(
+ '%s: body text still clears AA on that minimum card fill',
+ (_id, theme) => {
+ // Separating the card from the page must not be paid for out of text
+ // legibility — lifting a night theme's card toward its text color would
+ // trade one problem for a worse one.
+ const bg = parseRgb(theme.colors['--port-bg']);
+ const card = parseRgb(theme.colors['--port-card']);
+ const floor = Number(theme.tokens['--port-card-min-alpha']);
+ const composited = card.map((channel, index) => floor * channel + (1 - floor) * bg[index]);
+ expect(contrastRatio(parseRgb(theme.colors['--port-text']), composited)).toBeGreaterThanOrEqual(AA_SMALL_TEXT);
+ expect(contrastRatio(parseRgb(theme.colors['--port-text-muted']), composited)).toBeGreaterThanOrEqual(AA_SMALL_TEXT);
+ },
+ );
+});
+
describe('DEFAULT_AVATAR_COLOR', () => {
it('is a literal #rrggbb hex — a native <input type="color"> rejects anything else', () => {
expect(DEFAULT_AVATAR_COLOR).toMatch(/^#[0-9a-f]{6}$/);
diff --git a/docs/themes/README.md b/docs/themes/README.md
index 240f5e5e07..237a08baa0 100644
--- a/docs/themes/README.md
+++ b/docs/themes/README.md
@@ -23,6 +23,23 @@ New UI should use semantic PortOS tokens wherever possible:
Avoid hard-coded background colors for major containers. Hard-coded state colors are acceptable only when they are data colors and still pass contrast in all themes.
+## Surface Elevation
+
+Three levels, and every theme must render all three distinguishably in both day and night mode:
+
+| Level | Class | What it is |
+| --- | --- | --- |
+| Page | `bg-port-bg` | The backdrop everything sits on. |
+| Card | `bg-port-card` (any opacity) | A content panel raised off the page. |
+| Well | `bg-port-bg` **inside a card** | An inset row, list item, or control — sunken back to the page color. |
+
+Two rules keep this readable across the palettes:
+
+- **`--port-card-min-alpha`** (per theme, in `portosThemes.js`) floors the fill of a card written at reduced opacity. `bg-port-card/40` used to render at 40% of the card color composited over the page — on themes whose card and page differ by design (every day theme), that dissolved the card into the page and left a border floating around nothing. State variants (`hover:bg-port-card/60`) are deliberately **not** floored: a hover that lands on the resting fill is not feedback. Translucent themes set a lower floor so glass stays glass.
+- **Card / page separation ≥ 1.12:1**, measured on that floored fill. Not a WCAG number (WCAG says nothing about surface separation) — it is the empirical floor at which a filled panel reads as raised on these palettes. `portosThemes.test.js` asserts it for every theme, along with body/muted text still clearing AA on the resulting fill, so a new theme cannot ship invisible cards.
+
+For a nested panel, prefer `bg-port-bg` at full strength over `bg-port-bg/40`: at 40% it composites most of the way back to the card fill, and a stack of them runs together as one block.
+
## Theme Runtime
`useTheme` applies the active theme to `<html>`: