Skip to content

AI media harness for planning, generating, and editing locally

TypeScript

Define light and dark token palettes and route every owned stylesheet through them

Bitti09dce1de643f
diff --git a/src/styles/base.css b/src/styles/base.css
index d114de6..a146cd1 100644
--- a/src/styles/base.css
+++ b/src/styles/base.css
@@ -86,10 +86,10 @@ select {
/* The dropdown list a <select> opens is painted by the platform, not by this
stylesheet, and it takes its colours from the select itself. A select with a
transparent background got a white menu with grey text on Windows. Both
- sides are now stated outright, and color-scheme tells the platform which
- scrollbars and highlight to use inside it. */
+ sides are now stated outright; `color-scheme` is NOT restated here because
+ tokens.css sets it per theme on :root and it inherits — pinning it to `dark`
+ again would give a light-theme user a dark platform menu. */
select {
- color-scheme: dark;
background-color: var(--panel-2);
}
@@ -133,8 +133,11 @@ a:focus-visible,
.spinner {
width: 16px;
height: 16px;
- border: 2px solid rgba(255, 255, 255, 0.35);
- border-top-color: #fff;
+ /* The spinner only ever appears inside a primary (blue) button, which is
+ blue in both themes, so it wears the on-accent pair rather than a
+ theme-dependent grey. */
+ border: 2px solid var(--on-accent-dim);
+ border-top-color: var(--on-accent);
border-radius: 50%;
animation: spin 0.7s linear infinite;
}
diff --git a/src/styles/controls.css b/src/styles/controls.css
index e9e2962..8b7a1a9 100644
--- a/src/styles/controls.css
+++ b/src/styles/controls.css
@@ -25,12 +25,12 @@
min-height: var(--control-lg);
padding: 0 var(--space-5);
font-size: var(--text-base);
- border: 1px solid #5578ed;
- color: #fff;
- background: linear-gradient(180deg, #5279f4, #3159d4);
+ border: 1px solid var(--button-primary-border);
+ color: var(--on-accent);
+ background: var(--button-primary-bg);
box-shadow:
- 0 5px 18px rgba(31, 70, 196, 0.26),
- inset 0 1px rgba(255, 255, 255, 0.15);
+ var(--button-primary-shadow),
+ inset 0 1px var(--sheen);
}
.primary-button:hover:not(:disabled) {
@@ -41,13 +41,13 @@
.secondary-button {
border: 1px solid var(--line-strong);
color: var(--text-secondary);
- background: rgba(255, 255, 255, 0.025);
+ background: var(--wash-1);
}
.secondary-button:hover:not(:disabled) {
- border-color: rgba(255, 255, 255, 0.25);
+ border-color: var(--line-hover);
color: var(--text-primary);
- background: rgba(255, 255, 255, 0.05);
+ background: var(--wash-2);
}
.primary-button:disabled,
@@ -64,17 +64,17 @@
justify-content: center;
gap: var(--space-2);
padding: 0 var(--space-4);
- border: 1px solid #65363e;
+ border: 1px solid var(--danger-line-strong);
border-radius: var(--radius-md);
color: var(--danger);
- background: #26171b;
+ background: var(--danger-soft);
font-size: var(--text-sm);
font-weight: var(--weight-semibold);
}
.danger-button:hover:not(:disabled) {
- border-color: #7d434c;
- background: #2e1b20;
+ border-color: var(--danger);
+ background: var(--danger-soft-strong);
}
/* --- Icon buttons ---------------------------------------------------------- */
@@ -94,12 +94,12 @@
.icon-button:hover {
color: var(--text-secondary);
- background: rgba(255, 255, 255, 0.045);
+ background: var(--wash-2);
}
.icon-button--active {
- color: #c7d2ff;
- border-color: rgba(88, 119, 218, 0.25);
+ color: var(--accent-on-soft);
+ border-color: var(--accent-line);
background: var(--accent-soft);
}
@@ -118,7 +118,7 @@
gap: var(--space-2);
padding: 0 var(--space-3);
color: var(--text-muted);
- background: #0e1117;
+ background: var(--field-bg);
border: 1px solid var(--line);
border-radius: var(--radius-md);
}
@@ -127,7 +127,7 @@
has to land somewhere obvious. The input's own ring is suppressed just below
so the two never stack. */
.search-field:focus-within {
- border-color: rgba(92, 127, 236, 0.6);
+ border-color: var(--accent-line-strong);
outline: var(--focus-ring-width) solid var(--focus-ring-color);
outline-offset: 2px;
}
@@ -162,7 +162,7 @@
align-items: center;
gap: var(--space-2);
margin: 0;
- color: #8fa0d8;
+ color: var(--eyebrow);
font-size: var(--text-2xs);
font-weight: var(--weight-bold);
line-height: var(--leading-snug);
@@ -188,7 +188,7 @@
.back-link:hover {
color: var(--text-secondary);
- background: rgba(255, 255, 255, 0.03);
+ background: var(--wash-1);
}
/* --- Panel chrome (shared header strip inside editor panels) ---------------- */
@@ -228,7 +228,7 @@
.panel-chrome button:hover {
color: var(--text-secondary);
- background: rgba(255, 255, 255, 0.04);
+ background: var(--wash-2);
}
.live-dot {
@@ -245,15 +245,15 @@
height: 6px;
margin: var(--space-3) 0;
border-radius: var(--radius-xs);
- background: #20252e;
+ background: var(--track);
}
.progress-track i {
display: block;
height: 100%;
border-radius: var(--radius-xs);
- background: linear-gradient(90deg, #4468db, #7d9aff);
- box-shadow: 0 0 8px rgba(91, 126, 224, 0.53);
+ background: var(--progress-fill);
+ box-shadow: 0 0 8px var(--progress-glow);
}
.mini-progress {
@@ -261,14 +261,14 @@
height: 4px;
margin-top: var(--space-2);
border-radius: var(--radius-xs);
- background: #242a35;
+ background: var(--track);
}
.mini-progress em {
display: block;
height: 100%;
border-radius: var(--radius-xs);
- background: #637fe0;
+ background: var(--accent);
}
/* --- Toast ----------------------------------------------------------------- */
@@ -280,9 +280,9 @@
bottom: var(--space-5);
width: 380px;
padding: var(--space-4);
- border: 1px solid rgba(244, 104, 104, 0.25);
+ border: 1px solid var(--danger-line);
border-radius: var(--radius-lg);
- background: #171116;
+ background: var(--danger-soft);
box-shadow: var(--shadow);
display: grid;
grid-template-columns: 1fr auto;
@@ -301,7 +301,7 @@
max-height: 40vh;
overflow-y: auto;
overflow-wrap: anywhere;
- color: #c0a4ab;
+ color: var(--danger-text-soft);
font-size: var(--text-sm);
line-height: var(--leading-normal);
}
@@ -314,13 +314,13 @@
border: 0;
border-radius: var(--radius-sm);
background: none;
- color: #e1939f;
+ color: var(--danger);
font-size: var(--text-sm);
font-weight: var(--weight-semibold);
}
.toast button:hover {
- background: rgba(255, 255, 255, 0.06);
+ background: var(--wash-3);
}
@media (max-width: 650px) {
diff --git a/src/styles/library.css b/src/styles/library.css
index 729c829..1ceaa30 100644
--- a/src/styles/library.css
+++ b/src/styles/library.css
@@ -21,7 +21,7 @@
gap: var(--space-3);
padding: 0 var(--space-6);
border-bottom: 1px solid var(--line);
- background: rgba(8, 10, 15, 0.74);
+ background: var(--topbar-glass);
backdrop-filter: blur(16px);
}
@@ -52,15 +52,10 @@
.composer-shell {
position: relative;
overflow: hidden;
- border: 1px solid rgba(91, 121, 211, 0.2);
+ border: 1px solid var(--accent-line);
border-radius: var(--radius-xl);
padding: var(--space-6);
- background: linear-gradient(
- 135deg,
- rgba(21, 29, 53, 0.76),
- rgba(13, 16, 23, 0.95) 55%,
- #0d1016
- );
+ background: var(--composer-bg);
box-shadow: var(--shadow);
}
@@ -71,7 +66,7 @@
right: -80px;
top: -120px;
border-radius: 50%;
- background: rgba(51, 89, 217, 0.13);
+ background: var(--glow-accent);
filter: blur(50px);
pointer-events: none;
}
@@ -124,19 +119,19 @@
.composer {
position: relative;
- border: 1px solid rgba(114, 139, 218, 0.27);
+ border: 1px solid var(--accent-line);
border-radius: var(--radius-lg);
- background: rgba(7, 9, 14, 0.72);
+ background: var(--field-bg);
box-shadow:
- inset 0 1px rgba(255, 255, 255, 0.025),
- 0 10px 25px rgba(0, 0, 0, 0.2);
+ inset 0 1px var(--hairline-hi),
+ var(--shadow-sm);
}
.composer:focus-within {
- border-color: rgba(103, 138, 245, 0.55);
+ border-color: var(--accent-line-strong);
box-shadow:
- 0 0 0 3px rgba(52, 89, 203, 0.08),
- 0 12px 30px rgba(0, 0, 0, 0.25);
+ 0 0 0 3px var(--accent-ring),
+ var(--shadow-sm);
}
/* The textarea fills the box, so a ring on it alone would float inside the
@@ -198,10 +193,10 @@
align-items: center;
gap: var(--space-2);
padding: 0 var(--space-1) 0 var(--space-3);
- border: 1px solid rgba(91, 121, 211, 0.26);
+ border: 1px solid var(--accent-line);
border-radius: var(--radius-sm);
color: var(--accent-bright);
- background: rgba(45, 67, 130, 0.15);
+ background: var(--accent-soft);
}
.composer__reference b {
@@ -229,7 +224,7 @@
.composer__reference button:hover {
color: var(--text-primary);
- background: rgba(255, 255, 255, 0.06);
+ background: var(--wash-3);
}
/* --- Optional settings (collapsed by default — the defaults are good) ------- */
@@ -332,7 +327,7 @@
}
.composer__options-grid select:hover {
- border-color: rgba(112, 139, 226, 0.4);
+ border-color: var(--accent-line-strong);
}
/* --- Composer action bar --------------------------------------------------- */
@@ -361,8 +356,8 @@
.composer__attach:hover:not(:disabled) {
color: var(--text-primary);
- border-color: rgba(112, 139, 226, 0.4);
- background: rgba(73, 99, 174, 0.12);
+ border-color: var(--accent-line-strong);
+ background: var(--accent-soft);
}
.composer__attach:disabled {
@@ -375,7 +370,7 @@
min-width: var(--space-5);
padding: var(--space-1) var(--space-2);
border-radius: var(--radius-pill);
- color: var(--text-primary);
+ color: var(--on-accent);
background: var(--accent-dark);
font: var(--weight-medium) var(--text-2xs) / 1 var(--font-mono);
text-align: center;
@@ -424,14 +419,14 @@
border: 1px solid var(--line-strong);
border-radius: var(--radius-pill);
color: var(--text-secondary);
- background: rgba(255, 255, 255, 0.025);
+ background: var(--wash-1);
font-size: var(--text-sm);
transition: 0.16s ease;
}
.idea-row button:hover {
color: var(--text-primary);
- border-color: rgba(112, 139, 226, 0.45);
+ border-color: var(--accent-line-strong);
background: var(--accent-soft);
}
@@ -516,8 +511,8 @@
.project-card:hover,
.project-card:focus-within {
transform: translateY(-2px);
- border-color: rgba(117, 137, 198, 0.28);
- box-shadow: 0 15px 35px rgba(0, 0, 0, 0.28);
+ border-color: var(--accent-line);
+ box-shadow: var(--shadow-sm);
}
.project-card__art-button {
@@ -550,7 +545,14 @@
position: absolute;
}
-/* Generated cover artwork — decorative, sizes intentionally unchanged. */
+/* Generated cover artwork — decorative, sizes intentionally unchanged.
+
+ THEME-INDEPENDENT ON PURPOSE. Everything from here to .project-card__body is
+ a picture, not a surface: four generated cover illustrations and the badges,
+ play button and caption that sit ON TOP of one. A cover does not become a
+ light-theme cover any more than a photograph does, and the chrome over it is
+ white-on-dark because the artwork underneath is dark in every theme. Running
+ these through --text-* would put dark ink on a dark picture. */
.project-card__art--aurora {
background: linear-gradient(155deg, #101c38, #172d55 45%, #6e6d4d);
}
@@ -759,7 +761,7 @@
.project-card__menu button:hover {
color: var(--text-primary);
- background: rgba(255, 255, 255, 0.06);
+ background: var(--wash-3);
}
.project-card__path {
diff --git a/src/styles/references.css b/src/styles/references.css
index dad3131..face184 100644
--- a/src/styles/references.css
+++ b/src/styles/references.css
@@ -11,7 +11,7 @@
overflow-y: auto;
padding: var(--space-6) var(--space-7) var(--space-7);
background:
- radial-gradient(circle at 20% -20%, rgba(47, 69, 107, 0.13), transparent 35%),
+ radial-gradient(circle at 20% -20%, var(--glow-accent), transparent 35%),
var(--bg);
}
@@ -149,7 +149,7 @@
background-color: var(--panel-3);
background-image: repeating-linear-gradient(
135deg,
- rgba(255, 255, 255, 0.03) 0 6px,
+ var(--hatch) 0 6px,
transparent 6px 12px
);
}
@@ -313,10 +313,10 @@
gap: var(--space-3);
margin: var(--space-2) var(--space-4) 0;
padding: var(--space-4);
- border: 1px solid rgba(83, 111, 199, 0.22);
+ border: 1px solid var(--accent-line);
border-radius: var(--radius-md);
color: var(--accent-bright);
- background: rgba(40, 61, 124, 0.1);
+ background: var(--accent-soft);
}
.reference-explainer b {
@@ -356,7 +356,7 @@
background-color: var(--panel-3);
background-image: repeating-linear-gradient(
135deg,
- rgba(255, 255, 255, 0.03) 0 8px,
+ var(--hatch) 0 8px,
transparent 8px 16px
);
}
@@ -420,7 +420,7 @@
border: 1px solid var(--line);
border-radius: var(--radius-sm);
color: var(--text-primary);
- background: var(--bg);
+ background: var(--field-bg);
font-family: var(--font-sans);
font-size: var(--text-base);
}
@@ -625,7 +625,7 @@
inset: 0;
display: grid;
place-items: center;
- background: rgba(5, 7, 10, 0.72);
+ background: var(--scrim);
backdrop-filter: blur(5px);
}
@@ -675,7 +675,7 @@
border: 1px solid var(--line);
border-radius: var(--radius-sm);
color: var(--text-primary);
- background: var(--bg);
+ background: var(--field-bg);
font-family: var(--font-sans);
font-size: var(--text-base);
}
diff --git a/src/styles/shell.css b/src/styles/shell.css
index 720dd6f..6a9b2a9 100644
--- a/src/styles/shell.css
+++ b/src/styles/shell.css
@@ -7,7 +7,7 @@
grid-template-columns: minmax(0, 1fr);
min-height: 100vh;
background:
- radial-gradient(circle at 72% -20%, rgba(49, 76, 153, 0.11), transparent 37%),
+ radial-gradient(circle at 72% -20%, var(--glow-accent), transparent 37%),
var(--bg);
}
@@ -162,7 +162,7 @@
border: 1px solid var(--line-strong);
border-radius: 50%;
color: var(--text-muted);
- background: rgba(13, 16, 22, 0.92);
+ background: var(--glass);
backdrop-filter: blur(12px);
box-shadow: var(--shadow-sm);
transition: 0.16s ease;
@@ -170,8 +170,8 @@
.settings-launcher:hover {
color: var(--text-primary);
- border-color: rgba(107, 141, 255, 0.4);
- background: rgba(20, 26, 40, 0.96);
+ border-color: var(--accent-line-strong);
+ background: var(--glass-hover);
}
/* --- Settings ---------------------------------------------------------------
@@ -184,7 +184,7 @@
inset: 0;
overflow-y: auto;
padding: var(--space-7) var(--space-5);
- background: rgba(4, 6, 10, 0.72);
+ background: var(--scrim);
backdrop-filter: blur(10px);
}
@@ -225,7 +225,7 @@
padding: var(--space-4);
border: 1px solid var(--line);
border-radius: var(--radius-lg);
- background: rgba(255, 255, 255, 0.02);
+ background: var(--wash-1);
}
.settings-status span {
@@ -254,8 +254,8 @@
}
.settings-status--ready {
- border-color: rgba(110, 207, 149, 0.3);
- background: rgba(110, 207, 149, 0.07);
+ border-color: var(--success-line);
+ background: var(--success-soft);
}
.settings-status--ready i {
@@ -337,7 +337,7 @@
border: 1px solid var(--line-strong);
border-radius: var(--radius-sm);
color: var(--text-primary);
- background: rgba(7, 9, 14, 0.72);
+ background: var(--field-bg);
font: var(--weight-regular) var(--text-sm) / 1 var(--font-mono);
}
@@ -364,7 +364,7 @@
}
.settings-path--missing .settings-path__row input {
- border-color: rgba(236, 125, 134, 0.45);
+ border-color: var(--danger-line-strong);
}
.settings-view__foot {
diff --git a/src/styles/tokens.css b/src/styles/tokens.css
index 9345e17..80283e9 100644
--- a/src/styles/tokens.css
+++ b/src/styles/tokens.css
@@ -18,7 +18,32 @@
6. Prose uses line-height 1.5 (--leading-normal). Tight UI labels may use
--leading-snug (1.35); only display type uses --leading-tight.
7. The dimmest text allowed anywhere is --text-faint, which clears 4.5:1 on
- --panel / --panel-3. Never hand-write a grey below it.
+ --panel / --panel-3 IN BOTH THEMES. Never hand-write a grey below it.
+
+ THEMING
+ ----------------------------------------------------------------------------
+ Three states, one attribute:
+
+ system (default) no data-theme attribute; the media query below decides
+ light <html data-theme="light">
+ dark <html data-theme="dark">
+
+ The COMPLETE palette is defined once, on a bare `:root`, in DARK. Light only
+ ever REDEFINES those same names — it never introduces a colour of its own, so
+ a token can never be missing in one theme and paint one theme's ink on the
+ other theme's ground. Light appears twice, and the two blocks must stay
+ identical:
+
+ @media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) }
+ the OS asked for light and the user has not overridden it
+ :root[data-theme="light"]
+ the user asked for light, whatever the OS says
+
+ The `:not([data-theme="dark"])` guard is what makes an explicit choice beat
+ the OS in BOTH directions: without it, "dark" chosen on a light computer
+ would still get the light block (same specificity, later in the file wins).
+
+ src/lib/theme.ts owns the attribute; index.html sets it before first paint.
========================================================================== */
:root {
@@ -86,34 +111,111 @@
--topbar-height: 72px;
--content-max: 1180px;
+ /* ==========================================================================
+ COLOUR — dark (the base palette; light redefines every name below)
+ ====================================================================== */
+
/* --- Surfaces ----------------------------------------------------------- */
- --bg: #080a0f;
- --panel: #0d1016;
- --panel-2: #12151d;
- --panel-3: #171b24;
+ --bg: #080a0f; /* the app's ground */
+ --panel: #0d1016; /* cards, dialogs, the topbar */
+ --panel-2: #12151d; /* a surface sitting on a panel */
+ --panel-3: #171b24; /* chips, menus, skeletons, placeholders */
+ --field-bg: #0b0e14; /* recessed: text inputs, search field */
+
+ /* --- Lines --------------------------------------------------------------
+ --line / --line-strong are translucent so they work over any surface.
+ --line-solid is the opaque equivalent for a border between two known
+ surfaces (topbar bottom, dock top) where a wash would double up. */
--line: rgba(255, 255, 255, 0.085);
--line-strong: rgba(255, 255, 255, 0.14);
+ --line-hover: rgba(255, 255, 255, 0.25);
+ --line-solid: #232630;
+
+ /* --- Neutral washes ------------------------------------------------------
+ Hover / rest / pressed tints laid over whatever surface is underneath.
+ White in dark, BLACK in light — this is the single most common reason a
+ converted stylesheet looks broken in the other theme. */
+ --wash-1: rgba(255, 255, 255, 0.025); /* resting fill on a segmented control */
+ --wash-2: rgba(255, 255, 255, 0.045); /* hover */
+ --wash-3: rgba(255, 255, 255, 0.06); /* hover on an already-tinted row */
+ --hairline-hi: rgba(255, 255, 255, 0.025); /* 1px top sheen on raised chrome */
+ --hatch: rgba(255, 255, 255, 0.03); /* diagonal placeholder hatching */
+
+ /* --- Translucent chrome (always paired with backdrop-filter) ------------ */
+ --glass: rgba(13, 16, 22, 0.92); /* floating control / overlay panel */
+ --glass-hover: rgba(20, 26, 40, 0.96);
+ --topbar-glass: rgba(8, 10, 15, 0.74);
+ --scrim: rgba(4, 6, 10, 0.72); /* behind a modal */
/* --- Text (contrast-checked against --panel / --panel-3) ---------------- */
- --text-primary: #eff1f7;
- --text-secondary: #c5cbd7;
- --text-muted: #9aa2b1; /* replaces every #86..#9x grey */
- --text-faint: #838b9a; /* DIMMEST text allowed — ~5:1 on --panel */
+ --text-primary: #eff1f7; /* 16.9:1 on --panel */
+ --text-secondary: #c5cbd7; /* 11.7:1 */
+ --text-muted: #9aa2b1; /* 7.4:1 — replaces every #86..#9x grey */
+ --text-faint: #838b9a; /* DIMMEST text allowed — 5.6:1 on --panel */
- /* --- Accent ------------------------------------------------------------- */
+ /* --- Accent --------------------------------------------------------------
+ --accent is 4.2:1 on --panel: BORDERS, dots and fills only, never text.
+ --accent-bright is the accent AT READING CONTRAST (6.2:1) and is the one
+ that may carry a label or a focus ring. */
--accent: #3d6df2;
--accent-bright: #6b8dff;
- --accent-dark: #173ca6;
+ --accent-dark: #173ca6; /* solid accent chip, always wears --on-accent */
--accent-soft: rgba(60, 105, 239, 0.15);
+ --accent-soft-strong: rgba(60, 105, 239, 0.22);
+ --accent-on-soft: #c7d2ff; /* label sitting on --accent-soft */
+ --accent-line: rgba(107, 141, 255, 0.28);
+ --accent-line-strong: rgba(103, 138, 245, 0.55);
+ --accent-ring: rgba(63, 94, 198, 0.1); /* 3px halo on a focused composite */
+ --glow-accent: rgba(49, 76, 153, 0.11); /* blurred page-corner light */
+ --eyebrow: #8fa0d8; /* uppercase accent-tinted section label */
+
+ /* --- On-accent -----------------------------------------------------------
+ The primary button and the send button stay blue in BOTH themes, so what
+ sits on them is white in both. Deliberately theme-independent. */
+ --on-accent: #ffffff;
+ --on-accent-dim: rgba(255, 255, 255, 0.35);
+ --sheen: rgba(255, 255, 255, 0.15);
+
+ /* --- Primary button ----------------------------------------------------- */
+ --button-primary-bg: linear-gradient(180deg, #5279f4, #3159d4);
+ --button-primary-border: #5578ed;
+ --button-primary-shadow: 0 5px 18px rgba(31, 70, 196, 0.26);
- /* --- Status ------------------------------------------------------------- */
+ /* --- Progress ----------------------------------------------------------- */
+ --track: #20252e;
+ --progress-fill: linear-gradient(90deg, #4468db, #7d9aff);
+ --progress-glow: rgba(91, 126, 224, 0.53);
+
+ /* --- Status --------------------------------------------------------------
+ Each hue has a text/dot value, a border tint and a surface tint. */
--success: #6ecf95;
+ --success-line: rgba(110, 207, 149, 0.3);
+ --success-soft: rgba(110, 207, 149, 0.07);
+ --success-glow: rgba(110, 207, 149, 0.55);
+
--warning: #e3a862;
+ --warning-line: rgba(227, 168, 98, 0.32);
+
--danger: #ec7d86;
+ --danger-line: rgba(236, 125, 134, 0.3);
+ --danger-line-strong: rgba(236, 125, 134, 0.5);
+ --danger-soft: #26171b; /* opaque: destructive button, error toast */
+ --danger-soft-strong: #2e1b20;
+ --danger-text-soft: #c0a4ab; /* body copy inside a danger surface */
+
+ /* --- Composer / dock surfaces ------------------------------------------- */
+ --composer-bg: linear-gradient(
+ 135deg,
+ rgba(21, 29, 53, 0.76),
+ rgba(13, 16, 23, 0.95) 55%,
+ #0d1016
+ );
+ --dock-bg: linear-gradient(90deg, #121827, #11151f);
/* --- Elevation ---------------------------------------------------------- */
--shadow: 0 22px 65px rgba(0, 0, 0, 0.34);
--shadow-sm: 0 8px 22px rgba(0, 0, 0, 0.28);
+ --shadow-up: 0 -12px 30px rgba(0, 0, 0, 0.2);
/* --- Focus --------------------------------------------------------------
One ring for the whole app. base.css applies it to focusable elements;
@@ -123,3 +225,168 @@
--focus-ring-width: 2px;
--focus-ring-color: var(--accent-bright);
}
+
+/* ============================================================================
+ LIGHT — the OS asked for it and the user has not overridden it.
+
+ Designed, not inverted. The ground is a cool grey (#eef1f6) and panels are
+ WHITE, so a card still reads as raised; a straight inversion would have put
+ white paper behind everything and left the cards invisible. The neutral
+ washes flip from white-over-dark to black-over-light. The accent darkens
+ rather than brightens, because "more contrast" points the other way here.
+ Every ratio in the comments is computed, not estimated (see the report in
+ the commit that introduced this block).
+ ========================================================================== */
+
+@media (prefers-color-scheme: light) {
+ :root:not([data-theme="dark"]) {
+ color-scheme: light;
+
+ --bg: #eef1f6;
+ --panel: #ffffff;
+ --panel-2: #f5f7fa;
+ --panel-3: #e9ecf3;
+ --field-bg: #ffffff;
+
+ --line: rgba(15, 23, 42, 0.1);
+ --line-strong: rgba(15, 23, 42, 0.18);
+ --line-hover: rgba(15, 23, 42, 0.32);
+ --line-solid: #dde1ea;
+
+ --wash-1: rgba(15, 23, 42, 0.035);
+ --wash-2: rgba(15, 23, 42, 0.055);
+ --wash-3: rgba(15, 23, 42, 0.075);
+ --hairline-hi: rgba(255, 255, 255, 0.9);
+ --hatch: rgba(15, 23, 42, 0.045);
+
+ --glass: rgba(255, 255, 255, 0.92);
+ --glass-hover: rgba(245, 248, 255, 0.97);
+ --topbar-glass: rgba(246, 248, 252, 0.78);
+ --scrim: rgba(20, 25, 36, 0.45); /* still DARKENS: a white panel needs it */
+
+ --text-primary: #101420; /* 18.4:1 on --panel */
+ --text-secondary: #333c4e; /* 11.1:1 */
+ --text-muted: #4a5365; /* 7.7:1 */
+ --text-faint: #5a6377; /* 6.0:1 on --panel, 5.1:1 on --panel-3 */
+
+ --accent: #2d5bd7;
+ --accent-bright: #1e4fd0; /* 6.8:1 — the readable accent */
+ --accent-dark: #1e40af;
+ --accent-soft: rgba(45, 91, 215, 0.1);
+ --accent-soft-strong: rgba(45, 91, 215, 0.16);
+ --accent-on-soft: #1e40af;
+ --accent-line: rgba(45, 91, 215, 0.3);
+ --accent-line-strong: rgba(30, 79, 208, 0.6);
+ --accent-ring: rgba(45, 91, 215, 0.14);
+ --glow-accent: rgba(45, 91, 215, 0.07);
+ --eyebrow: #47549a; /* 6.6:1 on --panel */
+
+ --track: #dfe3ec;
+ --progress-glow: rgba(45, 91, 215, 0.35);
+
+ --success: #0f7a45; /* 5.4:1 */
+ --success-line: rgba(15, 122, 69, 0.35);
+ --success-soft: rgba(15, 122, 69, 0.08);
+ --success-glow: rgba(15, 122, 69, 0.4);
+
+ --warning: #8a5a09; /* 5.9:1 */
+ --warning-line: rgba(138, 90, 9, 0.35);
+
+ --danger: #c02c3a; /* 5.7:1 */
+ --danger-line: rgba(192, 44, 58, 0.3);
+ --danger-line-strong: rgba(192, 44, 58, 0.55);
+ --danger-soft: #fdf1f2;
+ --danger-soft-strong: #fbe4e6;
+ --danger-text-soft: #7a4a52; /* 6.3:1 on --danger-soft */
+
+ --composer-bg: linear-gradient(
+ 135deg,
+ rgba(226, 234, 253, 0.9),
+ rgba(248, 250, 253, 0.96) 55%,
+ #ffffff
+ );
+ --dock-bg: linear-gradient(90deg, #eef3fd, #f8f9fc);
+
+ --shadow: 0 22px 65px rgba(15, 23, 42, 0.14);
+ --shadow-sm: 0 8px 22px rgba(15, 23, 42, 0.1);
+ --shadow-up: 0 -12px 30px rgba(15, 23, 42, 0.06);
+ }
+}
+
+/* ============================================================================
+ LIGHT — the user chose it explicitly, whatever the OS says.
+ Must stay byte-identical to the block above apart from the selector.
+ ========================================================================== */
+
+:root[data-theme="light"] {
+ color-scheme: light;
+
+ --bg: #eef1f6;
+ --panel: #ffffff;
+ --panel-2: #f5f7fa;
+ --panel-3: #e9ecf3;
+ --field-bg: #ffffff;
+
+ --line: rgba(15, 23, 42, 0.1);
+ --line-strong: rgba(15, 23, 42, 0.18);
+ --line-hover: rgba(15, 23, 42, 0.32);
+ --line-solid: #dde1ea;
+
+ --wash-1: rgba(15, 23, 42, 0.035);
+ --wash-2: rgba(15, 23, 42, 0.055);
+ --wash-3: rgba(15, 23, 42, 0.075);
+ --hairline-hi: rgba(255, 255, 255, 0.9);
+ --hatch: rgba(15, 23, 42, 0.045);
+
+ --glass: rgba(255, 255, 255, 0.92);
+ --glass-hover: rgba(245, 248, 255, 0.97);
+ --topbar-glass: rgba(246, 248, 252, 0.78);
+ --scrim: rgba(20, 25, 36, 0.45);
+
+ --text-primary: #101420;
+ --text-secondary: #333c4e;
+ --text-muted: #4a5365;
+ --text-faint: #5a6377;
+
+ --accent: #2d5bd7;
+ --accent-bright: #1e4fd0;
+ --accent-dark: #1e40af;
+ --accent-soft: rgba(45, 91, 215, 0.1);
+ --accent-soft-strong: rgba(45, 91, 215, 0.16);
+ --accent-on-soft: #1e40af;
+ --accent-line: rgba(45, 91, 215, 0.3);
+ --accent-line-strong: rgba(30, 79, 208, 0.6);
+ --accent-ring: rgba(45, 91, 215, 0.14);
+ --glow-accent: rgba(45, 91, 215, 0.07);
+ --eyebrow: #47549a;
+
+ --track: #dfe3ec;
+ --progress-glow: rgba(45, 91, 215, 0.35);
+
+ --success: #0f7a45;
+ --success-line: rgba(15, 122, 69, 0.35);
+ --success-soft: rgba(15, 122, 69, 0.08);
+ --success-glow: rgba(15, 122, 69, 0.4);
+
+ --warning: #8a5a09;
+ --warning-line: rgba(138, 90, 9, 0.35);
+
+ --danger: #c02c3a;
+ --danger-line: rgba(192, 44, 58, 0.3);
+ --danger-line-strong: rgba(192, 44, 58, 0.55);
+ --danger-soft: #fdf1f2;
+ --danger-soft-strong: #fbe4e6;
+ --danger-text-soft: #7a4a52;
+
+ --composer-bg: linear-gradient(
+ 135deg,
+ rgba(226, 234, 253, 0.9),
+ rgba(248, 250, 253, 0.96) 55%,
+ #ffffff
+ );
+ --dock-bg: linear-gradient(90deg, #eef3fd, #f8f9fc);
+
+ --shadow: 0 22px 65px rgba(15, 23, 42, 0.14);
+ --shadow-sm: 0 8px 22px rgba(15, 23, 42, 0.1);
+ --shadow-up: 0 -12px 30px rgba(15, 23, 42, 0.06);
+}
diff --git a/src/styles/workspace.css b/src/styles/workspace.css
index 10b14c5..8976f38 100644
--- a/src/styles/workspace.css
+++ b/src/styles/workspace.css
@@ -17,7 +17,7 @@
grid-template-columns: minmax(0, 1fr);
grid-template-rows: var(--topbar-height) minmax(0, 1fr) 80px;
color: var(--text-secondary);
- background: #080a0e;
+ background: var(--bg);
}
/* --- Topbar ---------------------------------------------------------------- */
@@ -33,7 +33,7 @@
align-items: center;
gap: var(--space-3);
padding: 0 var(--space-4);
- border-bottom: 1px solid #232630;
+ border-bottom: 1px solid var(--line-solid);
background: var(--panel);
}
@@ -106,7 +106,7 @@
padding: var(--space-1);
border: 1px solid var(--line);
border-radius: var(--radius-lg);
- background: rgba(255, 255, 255, 0.025);
+ background: var(--wash-1);
}
.project-nav button {
@@ -135,13 +135,13 @@
.project-nav button:hover {
color: var(--text-secondary);
- background: rgba(255, 255, 255, 0.04);
+ background: var(--wash-2);
}
.project-nav button.active {
color: var(--text-primary);
- background: rgba(60, 105, 239, 0.22);
- box-shadow: inset 0 0 0 1px rgba(107, 141, 255, 0.28);
+ background: var(--accent-soft-strong);
+ box-shadow: inset 0 0 0 1px var(--accent-line);
}
/* Running-generation count. */
@@ -149,10 +149,10 @@
flex: 0 0 auto;
min-width: 22px;
padding: 2px var(--space-2);
- border: 1px solid rgba(104, 134, 231, 0.26);
+ border: 1px solid var(--accent-line);
border-radius: var(--radius-pill);
color: var(--accent-bright);
- background: rgba(70, 99, 194, 0.15);
+ background: var(--accent-soft);
font: var(--weight-medium) var(--text-2xs) / 1.4 var(--font-mono);
}
@@ -177,9 +177,9 @@
align-items: center;
justify-content: center;
padding: var(--space-4) var(--space-5);
- border-top: 1px solid #252934;
- background: #0b0e13;
- box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.2);
+ border-top: 1px solid var(--line-solid);
+ background: var(--panel);
+ box-shadow: var(--shadow-up);
}
/* The settings launcher is fixed over the bottom-left corner, which is this
@@ -198,17 +198,17 @@
align-items: center;
gap: var(--space-3);
padding: 0 var(--space-2) 0 var(--space-3);
- border: 1px solid rgba(99, 127, 219, 0.34);
+ border: 1px solid var(--accent-line);
border-radius: var(--radius-lg);
- background: linear-gradient(90deg, #121827, #11151f);
+ background: var(--dock-bg);
box-shadow:
- 0 5px 20px rgba(0, 0, 0, 0.3),
- inset 0 1px rgba(255, 255, 255, 0.025);
+ var(--shadow-sm),
+ inset 0 1px var(--hairline-hi);
}
.agent-dock:focus-within {
- border-color: #627fe0;
- box-shadow: 0 0 0 3px rgba(63, 94, 198, 0.1);
+ border-color: var(--accent);
+ box-shadow: 0 0 0 3px var(--accent-ring);
}
.agent-dock__identity {
@@ -268,27 +268,27 @@
display: grid;
place-items: center;
padding: 0;
- border: 1px solid #5f7fe8;
+ border: 1px solid var(--button-primary-border);
border-radius: var(--radius-sm);
- color: #fff;
- background: #3f64d9;
+ color: var(--on-accent);
+ background: var(--accent);
}
.agent-dock button:disabled {
color: var(--text-faint);
- border-color: #292e39;
- background: #1a1e26;
+ border-color: var(--line-solid);
+ background: var(--panel-3);
}
.agent-dock .agent-cancel {
- border-color: #6b3941;
+ border-color: var(--danger-line-strong);
color: var(--danger);
- background: #29171b;
+ background: var(--danger-soft);
}
.agent-busy {
flex: 0 0 auto;
- color: #7994e9;
+ color: var(--accent-bright);
animation: spin 1.2s linear infinite;
}
@@ -311,9 +311,9 @@
align-items: center;
gap: var(--space-2);
padding: 0 var(--space-2);
- border: 1px solid #292f3a;
+ border: 1px solid var(--line-solid);
border-radius: var(--radius-sm);
- background: #0d1119;
+ background: var(--field-bg);
}
.agent-provider i {
@@ -327,7 +327,7 @@
/* Provider state is real information — every state gets a truthful colour. */
.agent-provider--ready i {
background: var(--success);
- box-shadow: 0 0 8px rgba(110, 207, 149, 0.55);
+ box-shadow: 0 0 8px var(--success-glow);
}
.agent-provider--authRequired i,
@@ -346,11 +346,11 @@
.agent-provider--authRequired,
.agent-provider--notInstalled {
- border-color: rgba(227, 168, 98, 0.32);
+ border-color: var(--warning-line);
}
.agent-provider--unavailable {
- border-color: rgba(236, 125, 134, 0.3);
+ border-color: var(--danger-line);
}
.agent-provider select {
@@ -373,10 +373,10 @@
max-height: 280px;
overflow: auto;
padding: var(--space-2);
- border: 1px solid #303749;
+ border: 1px solid var(--line-solid);
border-radius: var(--radius-md);
- background: rgba(16, 21, 31, 0.86);
- box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
+ background: var(--glass);
+ box-shadow: var(--shadow);
backdrop-filter: blur(12px);
}
@@ -392,7 +392,7 @@
}
.agent-conversation p + p {
- border-top: 1px solid #242a34;
+ border-top: 1px solid var(--line);
}
.agent-conversation b {