Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

feat(web): dark theme revamp — surface elevation, text hierarchy, semantic status colors (#14873)

Trang Nguyenafdaf720c4c1
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 25ae5ba5ab..803f4a69bc 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -447,7 +447,6 @@ The background color of the following component will be `hsl(var(--primary))` an
| --destructive-foreground | Destructive action color for text | |
| --ring | Focus ring color | MultiSelect |
| --primary-accent | Primary accent color used for branding | Layout |
-| --hover-primary-accent | Primary accent color used for hover effects for links | SignIn and AuthCloudRegionSwitch |
| --muted-green | Muted green for Event label | ObservationTree |
| --muted-magenta | Muted magenta for Generation label | ObservationTree |
| --muted-blue | Muted blue for Span label | ObservationTree |
diff --git a/web/src/components/design-system/ComponentGallery.stories.tsx b/web/src/components/design-system/ComponentGallery.stories.tsx
new file mode 100644
index 0000000000..aa837a457c
--- /dev/null
+++ b/web/src/components/design-system/ComponentGallery.stories.tsx
@@ -0,0 +1,375 @@
+import React from "react";
+import { AlertCircle, Info, Plus } from "lucide-react";
+import preview from "../../../.storybook/preview";
+
+import { Button, type ButtonProps } from "@/src/components/ui/button";
+import { Badge, type BadgeProps } from "@/src/components/ui/badge";
+import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";
+import { Callout } from "@/src/components/ui/callout";
+import { Input } from "@/src/components/ui/input";
+import { Textarea } from "@/src/components/ui/textarea";
+import {
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+} from "@/src/components/ui/select";
+import { Checkbox } from "@/src/components/ui/checkbox";
+import { Switch } from "@/src/components/design-system/Switch/Switch";
+import {
+ Card,
+ CardContent,
+ CardDescription,
+ CardFooter,
+ CardHeader,
+ CardTitle,
+} from "@/src/components/ui/card";
+import {
+ Tabs,
+ TabsContent,
+ TabsList,
+ TabsTrigger,
+} from "@/src/components/ui/tabs";
+import {
+ Tooltip,
+ TooltipContent,
+ TooltipTrigger,
+} from "@/src/components/ui/tooltip";
+import { ItemBadge, type LangfuseItemType } from "@/src/components/ItemBadge";
+import { EXPERIMENT_COLOR_STYLES } from "@/src/features/experiments/components/table/types";
+
+/**
+ * Design-system gallery: the key primitives rendered in all their variants on
+ * one scannable page, so light/dark rendering can be audited with the global
+ * Theme toolbar toggle. Everything is the real component, imported from the
+ * app — no copies.
+ *
+ * Deliberately skipped (need heavy context or fight the gallery layout):
+ * - DataTable and any component needing tRPC/router/session context.
+ * - Recharts charts — heavy; the chart palette is covered as swatches in
+ * "Design System/Theme Tokens" (a dedicated chart story can come later).
+ * - Dialog / DropdownMenu / Popover / Sheet — transient overlays; stacking is
+ * documented in "Design System/Overlay Layers". Tooltip is included
+ * statically open since it stays anchored to its trigger.
+ *
+ * Known/expected: ItemBadge observation-type icon colors (text-purple-600
+ * etc.) have no dark: variants — flagged by the dark-theme audit, rendered
+ * here as-is on purpose. Same for the experiments "text-dark-gray" baseline
+ * class, which has no backing token.
+ */
+
+const BUTTON_VARIANTS: ButtonProps["variant"][] = [
+ "default",
+ "destructive",
+ "destructive-secondary",
+ "outline",
+ "outline-solid",
+ "secondary",
+ "tertiary",
+ "ghost",
+ "link",
+ "errorNotification",
+];
+
+const BUTTON_TEXT_SIZES: ButtonProps["size"][] = ["xs", "sm", "default", "lg"];
+const BUTTON_ICON_SIZES: ButtonProps["size"][] = ["icon-xs", "icon-sm", "icon"];
+
+const BADGE_VARIANTS: BadgeProps["variant"][] = [
+ "default",
+ "secondary",
+ "destructive",
+ "outline",
+ "outline-solid",
+ "tertiary",
+ "success",
+ "error",
+ "warning",
+];
+
+const ITEM_BADGE_TYPES: LangfuseItemType[] = [
+ "TRACE",
+ "GENERATION",
+ "EVENT",
+ "SPAN",
+ "AGENT",
+ "TOOL",
+ "CHAIN",
+ "RETRIEVER",
+ "EMBEDDING",
+ "GUARDRAIL",
+ "SESSION",
+ "USER",
+ "QUEUE_ITEM",
+ "DATASET",
+ "DATASET_RUN",
+ "DATASET_ITEM",
+ "ANNOTATION_QUEUE",
+ "PROMPT",
+ "EVALUATOR",
+ "RUNNING_EVALUATOR",
+ "EXPERIMENT",
+];
+
+const EXPERIMENT_STYLE_LABELS = [
+ "Baseline",
+ "Comparison 1",
+ "Comparison 2",
+ "Comparison 3",
+ "Comparison 4",
+];
+
+function Section({
+ title,
+ note,
+ children,
+}: {
+ title: string;
+ note?: string;
+ children: React.ReactNode;
+}) {
+ return (
+ <section className="mt-8">
+ <h2 className="text-foreground text-lg font-semibold">{title}</h2>
+ {note && <p className="text-muted-foreground mt-1 text-xs">{note}</p>}
+ <div className="mt-3">{children}</div>
+ </section>
+ );
+}
+
+function Row({
+ label,
+ children,
+}: {
+ label?: string;
+ children: React.ReactNode;
+}) {
+ return (
+ <div className="mb-3 flex flex-wrap items-center gap-3">
+ {label && (
+ <span className="text-muted-foreground w-24 shrink-0 font-mono text-[11px]">
+ {label}
+ </span>
+ )}
+ {children}
+ </div>
+ );
+}
+
+function ComponentGalleryDoc() {
+ return (
+ <div className="text-foreground mx-auto max-w-5xl p-8 text-sm leading-relaxed">
+ <h1 className="text-2xl font-bold">Component gallery</h1>
+ <p className="text-muted-foreground mt-1">
+ Key primitives in all their variants — flip the Theme toolbar toggle to
+ audit light and dark rendering.
+ </p>
+
+ <Section title="Button" note="All variants at default size, then sizes.">
+ <Row label="variants">
+ {BUTTON_VARIANTS.map((variant) => (
+ <Button key={variant} variant={variant}>
+ {variant}
+ </Button>
+ ))}
+ </Row>
+ <Row label="sizes">
+ {BUTTON_TEXT_SIZES.map((size) => (
+ <Button key={size} size={size}>
+ {size}
+ </Button>
+ ))}
+ {BUTTON_ICON_SIZES.map((size) => (
+ <Button key={size} size={size} aria-label={`icon button ${size}`}>
+ <Plus className="h-4 w-4" />
+ </Button>
+ ))}
+ </Row>
+ <Row label="states">
+ <Button disabled>disabled</Button>
+ <Button loading>loading</Button>
+ </Row>
+ </Section>
+
+ <Section title="Badge">
+ <Row label="default">
+ {BADGE_VARIANTS.map((variant) => (
+ <Badge key={variant} variant={variant}>
+ {variant}
+ </Badge>
+ ))}
+ </Row>
+ <Row label="sm">
+ {BADGE_VARIANTS.map((variant) => (
+ <Badge key={variant} variant={variant} size="sm">
+ {variant}
+ </Badge>
+ ))}
+ </Row>
+ </Section>
+
+ <Section
+ title="ItemBadge"
+ note="One badge per entity type. The observation-type icon colors (AGENT…GUARDRAIL) intentionally have no dark: variants yet — audit finding, rendered as-is."
+ >
+ <div className="flex flex-wrap gap-2">
+ {ITEM_BADGE_TYPES.map((type) => (
+ <ItemBadge key={type} type={type} showLabel />
+ ))}
+ </div>
+ </Section>
+
+ <Section title="Alert & Callout">
+ <div className="flex max-w-2xl flex-col gap-3">
+ <Alert>
+ <Info className="h-4 w-4" />
+ <AlertTitle>Default alert</AlertTitle>
+ <AlertDescription>
+ Neutral information on the page surface.
+ </AlertDescription>
+ </Alert>
+ <Alert variant="destructive">
+ <AlertCircle className="h-4 w-4" />
+ <AlertTitle>Destructive alert</AlertTitle>
+ <AlertDescription>Something went wrong.</AlertDescription>
+ </Alert>
+ <Alert variant="info">
+ <Info className="h-4 w-4" />
+ <AlertTitle>Info alert</AlertTitle>
+ <AlertDescription>Blue informational surface.</AlertDescription>
+ </Alert>
+ {/* Callout persists dismissal in localStorage (30d TTL) — if one is
+ missing here, clear the "storybook-gallery-*" keys. */}
+ <Callout id="storybook-gallery-info" variant="info">
+ Info callout — dismissible, light-blue surface.
+ </Callout>
+ <Callout id="storybook-gallery-warning" variant="warning">
+ Warning callout — dismissible, light-yellow surface.
+ </Callout>
+ </div>
+ </Section>
+
+ <Section title="Form controls">
+ <div className="grid max-w-2xl grid-cols-2 gap-4">
+ <Input placeholder="Input placeholder" aria-label="Example input" />
+ <Input
+ defaultValue="Disabled input"
+ disabled
+ aria-label="Disabled input"
+ />
+ <Textarea
+ placeholder="Textarea placeholder"
+ aria-label="Example textarea"
+ />
+ <Select>
+ <SelectTrigger aria-label="Example select">
+ <SelectValue placeholder="Select an option" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="one">Option one</SelectItem>
+ <SelectItem value="two">Option two</SelectItem>
+ <SelectItem value="three">Option three</SelectItem>
+ </SelectContent>
+ </Select>
+ </div>
+ <Row label="checkbox">
+ <Checkbox aria-label="Unchecked" />
+ <Checkbox defaultChecked aria-label="Checked" />
+ <Checkbox disabled aria-label="Disabled" />
+ <Checkbox defaultChecked disabled aria-label="Checked disabled" />
+ </Row>
+ <Row label="switch">
+ <Switch aria-label="Off" />
+ <Switch defaultChecked aria-label="On" />
+ <Switch disabled aria-label="Disabled" />
+ <Switch defaultChecked disabled aria-label="On disabled" />
+ </Row>
+ </Section>
+
+ <Section title="Card">
+ <Card className="max-w-md">
+ <CardHeader>
+ <CardTitle>Card title</CardTitle>
+ <CardDescription>Card description in muted text.</CardDescription>
+ </CardHeader>
+ <CardContent>
+ Card content on the card surface — check the border and background
+ separation against the page in both themes.
+ </CardContent>
+ <CardFooter className="gap-2">
+ <Button size="sm">Confirm</Button>
+ <Button size="sm" variant="ghost">
+ Cancel
+ </Button>
+ </CardFooter>
+ </Card>
+ </Section>
+
+ <Section title="Tabs">
+ <Tabs defaultValue="first" className="max-w-md">
+ <TabsList>
+ <TabsTrigger value="first">First</TabsTrigger>
+ <TabsTrigger value="second">Second</TabsTrigger>
+ <TabsTrigger value="third" disabled>
+ Disabled
+ </TabsTrigger>
+ </TabsList>
+ <TabsContent value="first">
+ Content of the first tab — active trigger vs. inactive contrast.
+ </TabsContent>
+ <TabsContent value="second">Content of the second tab.</TabsContent>
+ </Tabs>
+ </Section>
+
+ <Section
+ title="Tooltip"
+ note="Statically open so the popover surface is scannable without hovering."
+ >
+ <div className="flex h-20 items-end">
+ <Tooltip open>
+ <TooltipTrigger asChild>
+ <Button variant="outline">Tooltip anchor</Button>
+ </TooltipTrigger>
+ <TooltipContent>Tooltip surface (bg-popover)</TooltipContent>
+ </Tooltip>
+ </div>
+ </Section>
+
+ <Section
+ title="Experiment colors"
+ note="EXPERIMENT_COLOR_STYLES from the experiments table — badge, marker, and text class per slot."
+ >
+ <div className="flex flex-col gap-2">
+ {EXPERIMENT_COLOR_STYLES.map((style, i) => (
+ <div key={i} className="flex items-center gap-3">
+ <span
+ className={`inline-block h-3 w-3 rounded-full ${style.markerClass}`}
+ />
+ <span
+ className={`rounded-md border px-2 py-0.5 text-xs font-medium ${style.badgeClass}`}
+ >
+ {EXPERIMENT_STYLE_LABELS[i]}
+ </span>
+ <span className={`text-xs ${style.textClass}`}>
+ {style.textClass}
+ </span>
+ </div>
+ ))}
+ </div>
+ </Section>
+
+ <p className="text-muted-foreground mt-10 border-t pt-4 text-xs">
+ Part of the design system. Companion pages: &ldquo;Theme Tokens&rdquo;
+ (raw palette) and &ldquo;Overlay Layers&rdquo; (stacking).
+ </p>
+ </div>
+ );
+}
+
+const meta = preview.meta({
+ title: "Design System/Component Gallery",
+ component: ComponentGalleryDoc,
+ parameters: { layout: "fullscreen" },
+});
+
+export const Overview = meta.story({});
diff --git a/web/src/components/design-system/Switch/Switch.tsx b/web/src/components/design-system/Switch/Switch.tsx
index 5ebec97bdc..ea26a39f7c 100644
--- a/web/src/components/design-system/Switch/Switch.tsx
+++ b/web/src/components/design-system/Switch/Switch.tsx
@@ -7,7 +7,7 @@ import { cva, type VariantProps } from "class-variance-authority";
import { cn } from "@/src/utils/tailwind";
const switchVariants = cva(
- "peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-muted-foreground",
+ "peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=unchecked]:bg-control-track",
{
variants: {
size: {
@@ -15,7 +15,7 @@ const switchVariants = cva(
sm: "h-4 w-7",
},
color: {
- default: "data-[state=checked]:bg-primary",
+ default: "data-[state=checked]:bg-control-fill",
green: "data-[state=checked]:bg-dark-green",
},
},
@@ -27,7 +27,7 @@ const switchVariants = cva(
);
const switchThumbVariants = cva(
- "pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=unchecked]:translate-x-0",
+ "pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=unchecked]:translate-x-0 dark:data-[state=unchecked]:bg-muted-foreground",
{
variants: {
size: {
diff --git a/web/src/components/design-system/ThemeTokens.stories.tsx b/web/src/components/design-system/ThemeTokens.stories.tsx
new file mode 100644
index 0000000000..c61de8528e
--- /dev/null
+++ b/web/src/components/design-system/ThemeTokens.stories.tsx
@@ -0,0 +1,247 @@
+import React from "react";
+import preview from "../../../.storybook/preview";
+
+/**
+ * Design-system documentation: every color token declared in
+ * `src/styles/globals.css` (`:root` + `.dark`), rendered live so the palette
+ * can be scanned in both themes with the global Theme toolbar toggle.
+ *
+ * Swatches read the CSS variables at render time — `hsl(var(--token))` for the
+ * HSL triplet tokens, `var(--color-N)` for the oklch heatmap scale — so they
+ * resolve exactly like the app (the Storybook preview imports the same
+ * globals.css and flips the `dark` class on <html>).
+ */
+
+/** A single color token rendered as a bordered block + its variable name. */
+function Swatch({ token, css }: { token: string; css?: string }) {
+ return (
+ <div className="flex w-36 flex-col gap-1">
+ <div
+ className="border-border h-12 w-full rounded-md border"
+ style={{ backgroundColor: css ?? `hsl(var(--${token}))` }}
+ />
+ <code className="text-muted-foreground font-mono text-[11px] leading-tight">
+ --{token}
+ </code>
+ </div>
+ );
+}
+
+/**
+ * A background/foreground token pair rendered as a filled chip with text, so
+ * the contrast of the pair is visible at a glance.
+ */
+function PairChip({
+ bg,
+ fg,
+ label,
+}: {
+ bg: string;
+ fg: string;
+ label?: string;
+}) {
+ return (
+ <div className="flex w-52 flex-col gap-1">
+ <div
+ className="border-border flex h-12 items-center justify-center rounded-md border px-2 text-sm font-medium"
+ style={{
+ backgroundColor: `hsl(var(--${bg}))`,
+ color: `hsl(var(--${fg}))`,
+ }}
+ >
+ {label ?? "Aa — sample text"}
+ </div>
+ <code className="text-muted-foreground font-mono text-[11px] leading-tight">
+ --{bg} / --{fg}
+ </code>
+ </div>
+ );
+}
+
+function Section({
+ title,
+ note,
+ children,
+}: {
+ title: string;
+ note?: string;
+ children: React.ReactNode;
+}) {
+ return (
+ <section className="mt-8">
+ <h2 className="text-foreground text-lg font-semibold">{title}</h2>
+ {note && <p className="text-muted-foreground mt-1 text-xs">{note}</p>}
+ <div className="mt-3 flex flex-wrap gap-3">{children}</div>
+ </section>
+ );
+}
+
+const SEMANTIC_PAIRS = [
+ "primary",
+ "secondary",
+ "tertiary",
+ "accent",
+ "destructive",
+] as const;
+
+const STATUS_PAIRS: { bg: string; fg: string }[] = [
+ { bg: "light-red", fg: "dark-red" },
+ { bg: "light-yellow", fg: "dark-yellow" },
+ { bg: "light-green", fg: "dark-green" },
+ { bg: "light-blue", fg: "dark-blue" },
+ { bg: "accent-light-green", fg: "accent-dark-green" },
+ { bg: "accent-light-blue", fg: "accent-dark-blue" },
+];
+
+const QLANG_TOKENS = [
+ "qlang-field",
+ "qlang-value",
+ "qlang-number",
+ "qlang-keyword",
+] as const;
+
+function ThemeTokensDoc() {
+ return (
+ <div className="text-foreground mx-auto max-w-5xl p-8 text-sm leading-relaxed">
+ <h1 className="text-2xl font-bold">Theme tokens</h1>
+ <p className="text-muted-foreground mt-1">
+ All color tokens from <code>globals.css</code>, resolved live. Flip the
+ Theme toolbar toggle to compare light and dark.
+ </p>
+
+ <Section
+ title="Surfaces"
+ note="App surfaces and their foregrounds, plus the structural border/input/ring tokens."
+ >
+ <PairChip bg="background" fg="foreground" />
+ <PairChip bg="card" fg="card-foreground" />
+ <PairChip bg="popover" fg="popover-foreground" />
+ <PairChip bg="header" fg="header-foreground" />
+ <PairChip bg="muted" fg="muted-foreground" />
+ <PairChip bg="background" fg="foreground-tertiary" label="faint text" />
+ <Swatch token="border" />
+ <Swatch token="border-contrast" />
+ <Swatch token="input" />
+ <Swatch token="ring" />
+ <Swatch token="surface-code" />
+ </Section>
+
+ <Section
+ title="Semantic"
+ note="shadcn action colors — each pair rendered as a filled chip so contrast is scannable."
+ >
+ {SEMANTIC_PAIRS.map((name) => (
+ <PairChip
+ key={name}
+ bg={name}
+ fg={`${name}-foreground`}
+ label={name}
+ />
+ ))}
+ </Section>
+
+ <Section
+ title="Langfuse accents"
+ note="Brand accent + the muted categorical set used across entity icons and charts."
+ >
+ <Swatch token="primary-accent" />
+ <Swatch token="link" />
+ <Swatch token="link-hover" />
+ <Swatch token="control-fill" />
+ <Swatch token="control-track" />
+ <Swatch token="muted-blue" />
+ <Swatch token="muted-green" />
+ <Swatch token="muted-magenta" />
+ <Swatch token="muted-gray" />
+ </Section>
+
+ <Section
+ title="Status / accent pairs"
+ note="light-* backgrounds with their dark-* foregrounds — the Badge success/error/warning recipe."
+ >
+ {STATUS_PAIRS.map(({ bg, fg }) => (
+ <PairChip key={bg} bg={bg} fg={fg} label={bg.replace("light-", "")} />
+ ))}
+ </Section>
+
+ <Section
+ title="Search grammar (qlang)"
+ note="Editor-style syntax theme for the search-bar filter grammar — deliberately its own palette."
+ >
+ {QLANG_TOKENS.map((token) => (
+ <Swatch key={token} token={token} />
+ ))}
+ <div className="border-border bg-background flex h-12 items-center rounded-md border px-3 font-mono text-sm">
+ <span style={{ color: "hsl(var(--qlang-field))" }}>level</span>
+ <span className="text-muted-foreground">=</span>
+ <span style={{ color: "hsl(var(--qlang-value))" }}>
+ &quot;ERROR&quot;
+ </span>
+ <span style={{ color: "hsl(var(--qlang-keyword))" }}>
+ &nbsp;and&nbsp;
+ </span>
+ <span style={{ color: "hsl(var(--qlang-field))" }}>latency</span>
+ <span className="text-muted-foreground">&gt;</span>
+ <span style={{ color: "hsl(var(--qlang-number))" }}>2</span>
+ </div>
+ </Section>
+
+ <Section title="Sidebar">
+ <PairChip bg="sidebar-background" fg="sidebar-foreground" />
+ <PairChip bg="sidebar-primary" fg="sidebar-primary-foreground" />
+ <PairChip bg="sidebar-accent" fg="sidebar-accent-foreground" />
+ <Swatch token="sidebar-border" />
+ <Swatch token="sidebar-ring" />
+ </Section>
+
+ <Section
+ title="Find match"
+ note="In-page text search highlights (all matches vs. the selected match)."
+ >
+ <PairChip bg="find-match-background" fg="foreground" label="match" />
+ <PairChip
+ bg="find-match-selected-background"
+ fg="find-match-selected-foreground"
+ label="selected match"
+ />
+ </Section>
+
+ <Section
+ title="Charts"
+ note="Categorical chart series 1–8 plus the grid line color."
+ >
+ {Array.from({ length: 8 }, (_, i) => (
+ <Swatch key={i} token={`chart-${i + 1}`} />
+ ))}
+ <Swatch token="chart-grid" />
+ </Section>
+
+ <Section
+ title="Heatmap (oklch)"
+ note="color-1..5 are full oklch values, read via var(--color-N) directly."
+ >
+ {Array.from({ length: 5 }, (_, i) => (
+ <Swatch
+ key={i}
+ token={`color-${i + 1}`}
+ css={`var(--color-${i + 1})`}
+ />
+ ))}
+ </Section>
+
+ <p className="text-muted-foreground mt-10 border-t pt-4 text-xs">
+ Part of the design system. Tokens live in{" "}
+ <code>src/styles/globals.css</code>; this page reads them live, so it
+ can never drift from the app.
+ </p>
+ </div>
+ );
+}
+
+const meta = preview.meta({
+ title: "Design System/Theme Tokens",
+ component: ThemeTokensDoc,
+ parameters: { layout: "fullscreen" },
+});
+
+export const Overview = meta.story({});
diff --git a/web/src/components/layouts/page-header.tsx b/web/src/components/layouts/page-header.tsx
index e27d728df5..8cec5d9b67 100644
--- a/web/src/components/layouts/page-header.tsx
+++ b/web/src/components/layouts/page-header.tsx
@@ -207,9 +207,9 @@ const PageHeader = ({
>
{tabsProps.tabs.map((tab) => {
const tabClassName = cn(
- "hover:bg-muted/50 focus-visible:ring-ring inline-flex h-full items-center justify-center rounded-none border-b-4 border-transparent px-2 py-0.5 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden",
+ "hover:bg-muted/50 focus-visible:ring-ring text-muted-foreground inline-flex h-full items-center justify-center rounded-none border-b-4 border-transparent px-2 py-0.5 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden",
tab.value === tabsProps.activeTab
- ? "border-primary-accent bg-transparent shadow-none"
+ ? "border-primary-accent text-foreground bg-transparent shadow-none"
: "",
tab.disabled && "pointer-events-none opacity-50",
tab.className,
diff --git a/web/src/components/level-colors.tsx b/web/src/components/level-colors.tsx
index 94ca11e235..4541a7d5ed 100644
--- a/web/src/components/level-colors.tsx
+++ b/web/src/components/level-colors.tsx
@@ -2,7 +2,7 @@ import { type ObservationLevelType } from "@langfuse/shared";
export const LevelColors = {
DEFAULT: { text: "", bg: "" },
- DEBUG: { text: "text-muted-foreground", bg: "bg-primary-foreground" },
+ DEBUG: { text: "text-muted-foreground", bg: "bg-tertiary" },
WARNING: { text: "text-dark-yellow", bg: "bg-light-yellow" },
ERROR: { text: "text-dark-red", bg: "bg-light-red" },
};
diff --git a/web/src/components/table/table-link.tsx b/web/src/components/table/table-link.tsx
index 0f1ff8e0d7..e9ddfc5681 100644
--- a/web/src/components/table/table-link.tsx
+++ b/web/src/components/table/table-link.tsx
@@ -28,7 +28,7 @@ export default function TableLink({
return (
<Link
className={cn(
- "text-accent-dark-blue hover:text-primary-accent/60 inline-block max-w-full text-xs leading-normal font-semibold",
+ "text-link hover:text-link-hover inline-block max-w-full text-xs leading-normal font-semibold",
className,
)}
href={path}
diff --git a/web/src/components/trace/components/IOPreview/components/ChatMessage.tsx b/web/src/components/trace/components/IOPreview/components/ChatMessage.tsx
index 8db51ce0e5..a974ea1c1a 100644
--- a/web/src/components/trace/components/IOPreview/components/ChatMessage.tsx
+++ b/web/src/components/trace/components/IOPreview/components/ChatMessage.tsx
@@ -84,7 +84,7 @@ export function ChatMessage({
<MarkdownJsonView
title="Placeholder"
content={message.name || "Unnamed placeholder"}
- customCodeHeaderClassName="bg-primary-foreground"
+ customCodeHeaderClassName="bg-card"
/>
</div>
<div style={{ display: shouldRenderMarkdown ? "none" : "block" }}>
@@ -184,7 +184,7 @@ export function ChatMessage({
content={message.content || ""}
customCodeHeaderClassName={cn(
message.role === "assistant" && "bg-secondary",
- message.role === "system" && "bg-primary-foreground",
+ message.role === "system" && "bg-card",
)}
audio={message.audio}
controlButtons={passthroughToggleButton}
diff --git a/web/src/components/trace/components/SpanContent.tsx b/web/src/components/trace/components/SpanContent.tsx
index 0618a1573e..2ae879a62d 100644
--- a/web/src/components/trace/components/SpanContent.tsx
+++ b/web/src/components/trace/components/SpanContent.tsx
@@ -174,7 +174,7 @@ export function SpanContent({
: "Own span duration"
}
className={cn(
- "text-muted-foreground text-xs",
+ "text-foreground-tertiary text-xs",
parentTotalDuration &&
colorCodeMetrics &&
heatMapTextColor({
@@ -194,7 +194,7 @@ export function SpanContent({
{shouldRenderSubtreeDuration ? (
<span
title="Subtree wall-clock duration (first start → last end)"
- className="text-muted-foreground text-xs"
+ className="text-foreground-tertiary text-xs"
>
{"∑ "}
{formatIntervalSeconds(subtreeWallClockOverflowMs / 1000)}
@@ -204,7 +204,7 @@ export function SpanContent({
{/* Token counts */}
{shouldRenderCostTokens &&
(node.inputUsage || node.outputUsage || node.totalUsage) ? (
- <span className="text-muted-foreground text-xs">
+ <span className="text-foreground-tertiary text-xs">
{formatTokenCounts(
node.inputUsage,
node.outputUsage,
@@ -222,7 +222,7 @@ export function SpanContent({
: undefined
}
className={cn(
- "text-muted-foreground text-xs",
+ "text-foreground-tertiary text-xs",
parentTotalCost &&
colorCodeMetrics &&
heatMapTextColor({
diff --git a/web/src/components/trace/components/TraceLogView/LogViewTreeIndent.tsx b/web/src/components/trace/components/TraceLogView/LogViewTreeIndent.tsx
index 5ed6f6a703..eac3b4876b 100644
--- a/web/src/components/trace/components/TraceLogView/LogViewTreeIndent.tsx
+++ b/web/src/components/trace/components/TraceLogView/LogViewTreeIndent.tsx
@@ -32,7 +32,7 @@ export const LogViewTreeIndent = memo(function LogViewTreeIndent({
{treeLines.map((hasLine, index) => (
<div key={index} className="relative w-3">
{hasLine && (
- <div className="bg-border absolute top-0 bottom-0 left-1.5 w-px" />
+ <div className="bg-border-contrast absolute top-0 bottom-0 left-1.5 w-px" />
)}
</div>
))}
@@ -40,11 +40,11 @@ export const LogViewTreeIndent = memo(function LogViewTreeIndent({
<div className="relative w-3">
<div
className={cn(
- "bg-border absolute top-0 left-1.5 w-px",
+ "bg-border-contrast absolute top-0 left-1.5 w-px",
isLastSibling ? "h-1/2" : "h-full",
)}
/>
- <div className="bg-border absolute top-1/2 left-1.5 h-px w-1.5" />
+ <div className="bg-border-contrast absolute top-1/2 left-1.5 h-px w-1.5" />
</div>
</div>
);
diff --git a/web/src/components/trace/components/TraceTimeline/TimelineGutterRow.tsx b/web/src/components/trace/components/TraceTimeline/TimelineGutterRow.tsx
index 7b241338ed..5546a7cc8a 100644
--- a/web/src/components/trace/components/TraceTimeline/TimelineGutterRow.tsx
+++ b/web/src/components/trace/components/TraceTimeline/TimelineGutterRow.tsx
@@ -62,7 +62,7 @@ export function TimelineGutterRow({
continues ? (
<div
key={level}
- className="bg-border absolute inset-y-0 w-px"
+ className="bg-border-contrast absolute inset-y-0 w-px"
style={{ left: `${level * INDENT + RAIL}px` }}
/>
) : null,
@@ -73,14 +73,14 @@ export function TimelineGutterRow({
{/* This node's vertical off the parent rail: top→center (last) or full. */}
<div
className={cn(
- "bg-border absolute top-0 w-px",
+ "bg-border-contrast absolute top-0 w-px",
isLastSibling ? "h-1/2" : "bottom-0",
)}
style={{ left: `${parentRailX}px` }}
/>
{/* Elbow: parent rail → icon, at the row's vertical center. */}
<div
- className="bg-border absolute top-1/2 h-px"
+ className="bg-border-contrast absolute top-1/2 h-px"
style={{
left: `${parentRailX}px`,
width: `${INDENT + ICON_GAP}px`,
@@ -92,7 +92,7 @@ export function TimelineGutterRow({
{/* Downward stub to this node's children, on its own rail (left of the icon). */}
{showsChildSpine && (
<div
- className="bg-border absolute top-1/2 bottom-0 w-px"
+ className="bg-border-contrast absolute top-1/2 bottom-0 w-px"
style={{ left: `${ownRailX}px` }}
/>
)}
@@ -109,7 +109,10 @@ export function TimelineGutterRow({
<ItemBadge type={node.type} isSmall />
</div>
<span
- className="text-primary min-w-0 flex-1 truncate text-xs font-medium"
+ className={cn(
+ "min-w-0 flex-1 truncate text-xs font-medium",
+ isSelected ? "text-foreground" : "dark:text-muted-foreground",
+ )}
title={node.name}
>
{node.name || `Unnamed ${node.type.toLowerCase()}`}
diff --git a/web/src/components/trace/components/TraceTimeline/TimelineScale.tsx b/web/src/components/trace/components/TraceTimeline/TimelineScale.tsx
index 2aac7383d3..a2eaa76a96 100644
--- a/web/src/components/trace/components/TraceTimeline/TimelineScale.tsx
+++ b/web/src/components/trace/components/TraceTimeline/TimelineScale.tsx
@@ -44,7 +44,7 @@ export function TimelineScale({
return (
<div
key={index}
- className="absolute h-full border-l text-xs"
+ className="border-border-contrast absolute h-full border-l text-xs"
style={{ left: `${tickLeft(timeValue)}px` }}
>
<span
diff --git a/web/src/components/trace/components/TraceTimeline/index.tsx b/web/src/components/trace/components/TraceTimeline/index.tsx
index 9133dde677..251b2d8147 100644
--- a/web/src/components/trace/components/TraceTimeline/index.tsx
+++ b/web/src/components/trace/components/TraceTimeline/index.tsx
@@ -529,7 +529,7 @@ export function TraceTimeline() {
Name
</span>
</div>
- <div className="bg-border/60 w-px shrink-0" />
+ <div className="bg-border-contrast/60 w-px shrink-0" />
<div
ref={scaleOuterRef}
onPointerDown={handleScalePointerDown}
@@ -627,7 +627,7 @@ export function TraceTimeline() {
</div>
{/* Resizer: structural 1px divider with a wider invisible drag grip. */}
- <div className="bg-border/60 relative w-px shrink-0">
+ <div className="bg-border-contrast/60 relative w-px shrink-0">
<div
role="separator"
aria-orientation="vertical"
diff --git a/web/src/components/trace/components/_shared/VirtualizedTreeNodeWrapper.tsx b/web/src/components/trace/components/_shared/VirtualizedTreeNodeWrapper.tsx
index 930f975ed7..ffe80e0793 100644
--- a/web/src/components/trace/components/_shared/VirtualizedTreeNodeWrapper.tsx
+++ b/web/src/components/trace/components/_shared/VirtualizedTreeNodeWrapper.tsx
@@ -61,7 +61,11 @@ export function VirtualizedTreeNodeWrapper({
<div
className={cn(
"relative flex w-full cursor-pointer px-0",
- isSelected ? "bg-muted" : "hover:bg-muted/50",
+ // Dim unselected rows in dark only — in light the gray read as washed
+ // out, an accepted light/dark inconsistency.
+ isSelected
+ ? "bg-muted text-foreground"
+ : "hover:bg-muted/50 dark:text-muted-foreground",
className,
)}
style={{
@@ -83,7 +87,7 @@ export function VirtualizedTreeNodeWrapper({
{Array.from({ length: Math.max(0, depth - 1) }, (_, i) => (
<div key={i} className="relative w-5">
{treeLines[i] && (
- <div className="bg-border absolute top-0 bottom-0 left-3 w-px" />
+ <div className="bg-border-contrast absolute top-0 bottom-0 left-3 w-px" />
)}
</div>
))}
@@ -97,16 +101,16 @@ export function VirtualizedTreeNodeWrapper({
{/* Vertical bar connecting upwards */}
<div
className={cn(
- "bg-border absolute top-0 left-3 w-px",
+ "bg-border-contrast absolute top-0 left-3 w-px",
isLastSibling ? "h-3" : "bottom-3",
)}
/>
{/* Vertical bar connecting downwards if not last sibling */}
{!isLastSibling && (
- <div className="bg-border absolute top-3 bottom-0 left-3 w-px" />
+ <div className="bg-border-contrast absolute top-3 bottom-0 left-3 w-px" />
)}
{/* Horizontal bar connecting to icon */}
- <div className="bg-border absolute top-3 left-3 h-px w-2" />
+ <div className="bg-border-contrast absolute top-3 left-3 h-px w-2" />
</>
</div>
)}
@@ -118,11 +122,11 @@ export function VirtualizedTreeNodeWrapper({
</div>
{/* Vertical bar downwards if there are expanded children */}
{hasChildren && !isCollapsed && (
- <div className="bg-border absolute top-3 bottom-0 left-1/2 w-px" />
+ <div className="bg-border-contrast absolute top-3 bottom-0 left-1/2 w-px" />
)}
{/* Root node downward connector */}
{depth === 0 && hasChildren && !isCollapsed && (
- <div className="bg-border absolute top-3 bottom-0 left-1/2 w-px" />
+ <div className="bg-border-contrast absolute top-3 bottom-0 left-1/2 w-px" />
)}
</div>
diff --git a/web/src/components/ui/CodeJsonViewer.tsx b/web/src/components/ui/CodeJsonViewer.tsx
index a1a62f9859..589084fce1 100644
--- a/web/src/components/ui/CodeJsonViewer.tsx
+++ b/web/src/components/ui/CodeJsonViewer.tsx
@@ -103,11 +103,9 @@ export function JSONView(props: {
"io-message-content flex max-w-full min-w-0 gap-2 text-xs wrap-break-word whitespace-pre-wrap",
props.borderless ? "" : "p-2",
props.title === "assistant" || props.title === "Output"
- ? "bg-accent-light-green dark:border-accent-dark-green"
- : "",
- props.title === "system" || props.title === "Input"
- ? "bg-primary-foreground"
+ ? "bg-accent-light-green dark:border-accent-dark-green/30"
: "",
+ props.title === "system" || props.title === "Input" ? "bg-card" : "",
props.scrollable || props.borderless ? "" : "rounded-sm border",
props.codeClassName,
)}
diff --git a/web/src/components/ui/Codeblock.tsx b/web/src/components/ui/Codeblock.tsx
index e574d08970..5f3d72cb68 100644
--- a/web/src/components/ui/Codeblock.tsx
+++ b/web/src/components/ui/Codeblock.tsx
@@ -55,7 +55,7 @@ const CodeBlock: FC<Props> = memo(({ language, value, theme, className }) => {
};
return (
- <div className="codeblock relative w-full overflow-hidden rounded border font-sans dark:bg-zinc-950">
+ <div className="codeblock dark:bg-surface-code relative w-full overflow-hidden rounded border font-sans">
<div
className={cn(
"bg-secondary flex w-full items-center justify-between px-2",
diff --git a/web/src/components/ui/MarkdownViewer.tsx b/web/src/components/ui/MarkdownViewer.tsx
index e7aad7acf8..ae0785f26d 100644
--- a/web/src/components/ui/MarkdownViewer.tsx
+++ b/web/src/components/ui/MarkdownViewer.tsx
@@ -525,9 +525,7 @@ export function MarkdownView({
title === "assistant" || title === "Output" || title === "Model"
? "bg-accent-light-green"
: "",
- title === "system" || title === "Input"
- ? "bg-primary-foreground"
- : "",
+ title === "system" || title === "Input" ? "bg-card" : "",
className,
)}
>
diff --git a/web/src/components/ui/PrettyJsonView.tsx b/web/src/components/ui/PrettyJsonView.tsx
index 773b3b5231..8ae11f794c 100644
--- a/web/src/components/ui/PrettyJsonView.tsx
+++ b/web/src/components/ui/PrettyJsonView.tsx
@@ -138,9 +138,9 @@ function getContainerClasses(
return cn(
baseClasses,
ASSISTANT_TITLES.includes(title || "")
- ? "bg-accent-light-green dark:border-accent-dark-green"
+ ? "bg-accent-light-green dark:border-accent-dark-green/30"
: "",
- SYSTEM_TITLES.includes(title || "") ? "bg-primary-foreground" : "",
+ SYSTEM_TITLES.includes(title || "") ? "bg-card" : "",
scrollable ? "" : "rounded-sm border",
codeClassName,
);
@@ -1221,7 +1221,7 @@ export function PrettyJsonView(props: {
ASSISTANT_TITLES.includes(props.title || "")
? "bg-accent-light-green"
: "",
- SYSTEM_TITLES.includes(props.title || "") ? "bg-primary-foreground" : "",
+ SYSTEM_TITLES.includes(props.title || "") ? "bg-card" : "",
);
const body = (
diff --git a/web/src/components/ui/checkbox.tsx b/web/src/components/ui/checkbox.tsx
index 9fe28d426a..a516c950a7 100644
--- a/web/src/components/ui/checkbox.tsx
+++ b/web/src/components/ui/checkbox.tsx
@@ -13,7 +13,7 @@ const Checkbox = React.forwardRef<
<CheckboxPrimitive.Root
ref={ref}
className={cn(
- "border-primary ring-offset-background focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground peer h-4 w-4 shrink-0 rounded-sm border focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
+ "border-control-border ring-offset-background focus-visible:ring-ring data-[state=checked]:bg-control-fill data-[state=checked]:border-control-fill data-[state=checked]:text-primary-foreground peer h-4 w-4 shrink-0 rounded-sm border focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
className,
)}
{...props}
diff --git a/web/src/components/ui/command.tsx b/web/src/components/ui/command.tsx
index 1596071f75..d4292711ef 100644
--- a/web/src/components/ui/command.tsx
+++ b/web/src/components/ui/command.tsx
@@ -17,7 +17,7 @@ import {
DialogHeader,
} from "@/src/components/ui/dialog";
-const commandDialogSurfaceClass = "bg-background dark:bg-[rgb(15_23_42)]";
+const commandDialogSurfaceClass = "bg-popover";
const Command = React.forwardRef<
React.ComponentRef<typeof CommandPrimitive>,
@@ -87,7 +87,7 @@ const CommandInput = React.forwardRef<
<CommandPrimitive.Input
ref={ref}
className={cn(
- "placeholder:text-muted-foreground flex h-8 w-full rounded-md bg-transparent py-3 pr-6 pl-6 text-sm outline-hidden focus:ring-0 focus:outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
+ "placeholder:text-foreground-tertiary flex h-8 w-full rounded-md bg-transparent py-3 pr-6 pl-6 text-sm outline-hidden focus:ring-0 focus:outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
className,
)}
{...props}
diff --git a/web/src/components/ui/input.tsx b/web/src/components/ui/input.tsx
index 81ee6deca7..d1e5d964e1 100644
--- a/web/src/components/ui/input.tsx
+++ b/web/src/components/ui/input.tsx
@@ -13,7 +13,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
{...(!allowPasswordManager && { "data-1p-ignore": true })}
type={type}
className={cn(
- "border-input bg-background placeholder:text-muted-foreground disabled:bg-muted/50 flex h-8 w-full min-w-14 rounded-md border px-2 py-1 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium focus:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",
+ "border-input bg-background placeholder:text-foreground-tertiary disabled:bg-muted/50 flex h-8 w-full min-w-14 rounded-md border px-2 py-1 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium focus:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",
className,
)}
ref={ref}
diff --git a/web/src/components/ui/multi-select-combobox.tsx b/web/src/components/ui/multi-select-combobox.tsx
index 145b8cb86d..0a18f729ac 100644
--- a/web/src/components/ui/multi-select-combobox.tsx
+++ b/web/src/components/ui/multi-select-combobox.tsx
@@ -164,7 +164,7 @@ export function MultiSelectCombobox<T>({
onFocus={handleInputFocus}
onBlur={handleInputBlur}
disabled={disabled}
- className="placeholder:text-muted-foreground min-w-24 flex-1 border-none bg-transparent text-xs outline-hidden"
+ className="placeholder:text-foreground-tertiary min-w-24 flex-1 border-none bg-transparent text-xs outline-hidden"
/>
</div>
{searchQuery && (
diff --git a/web/src/components/ui/password-input.tsx b/web/src/components/ui/password-input.tsx
index 5aa38b058c..5ed1fd4e20 100644
--- a/web/src/components/ui/password-input.tsx
+++ b/web/src/components/ui/password-input.tsx
@@ -13,7 +13,7 @@ const PasswordInput = React.forwardRef<HTMLInputElement, PasswordInputProps>(
<input
type={showPassword ? "text" : "password"}
className={cn(
- "border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex h-8 w-full rounded-md border px-3 py-2 pr-10 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
+ "border-input bg-background ring-offset-background placeholder:text-foreground-tertiary focus-visible:ring-ring flex h-8 w-full rounded-md border px-3 py-2 pr-10 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
className,
)}
ref={ref}
diff --git a/web/src/components/ui/radio-group.tsx b/web/src/components/ui/radio-group.tsx
index e57d8f0d74..cb3f83adba 100644
--- a/web/src/components/ui/radio-group.tsx
+++ b/web/src/components/ui/radio-group.tsx
@@ -26,13 +26,13 @@ const RadioGroupItem = React.forwardRef<
<RadioGroupPrimitive.Item
ref={ref}
className={cn(
- "border-primary text-primary focus-visible:ring-ring aspect-square h-4 w-4 rounded-full border shadow-sm focus:outline-hidden focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50",
+ "border-control-border focus-visible:ring-ring data-[state=checked]:border-control-fill aspect-square h-4 w-4 rounded-full border shadow-sm focus:outline-hidden focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50",
className,
)}
{...props}
>
<RadioGroupPrimitive.Indicator className="flex items-center justify-center">
- <div className="bg-primary h-2 w-2 rounded-full" />
+ <div className="bg-control-fill h-2 w-2 rounded-full" />
</RadioGroupPrimitive.Indicator>
</RadioGroupPrimitive.Item>
);
diff --git a/web/src/components/ui/select.tsx b/web/src/components/ui/select.tsx
index 1f4f653a8d..29b5f1664d 100644
--- a/web/src/components/ui/select.tsx
+++ b/web/src/components/ui/select.tsx
@@ -22,7 +22,7 @@ const SelectTrigger = React.forwardRef<
<SelectPrimitive.Trigger
ref={ref}
className={cn(
- "border-input bg-background ring-offset-background placeholder:text-muted-foreground focus:ring-ring disabled:bg-muted/50 flex h-8 w-full items-center justify-between gap-1 rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
+ "border-input bg-background ring-offset-background placeholder:text-foreground-tertiary focus:ring-ring disabled:bg-muted/50 flex h-8 w-full items-center justify-between gap-1 rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
className,
)}
{...props}
diff --git a/web/src/components/ui/tabs-bar.tsx b/web/src/components/ui/tabs-bar.tsx
index 2f91971c47..82661542fa 100644
--- a/web/src/components/ui/tabs-bar.tsx
+++ b/web/src/components/ui/tabs-bar.tsx
@@ -39,7 +39,7 @@ const TabsBarTrigger = React.forwardRef<
<TabsPrimitive.Trigger
ref={ref}
className={cn(
- "focus-visible:ring-ring data-[state=active]:border-primary-accent inline-flex h-full items-center justify-center rounded-none border-b-4 border-transparent px-2 py-0.5 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-transparent data-[state=active]:shadow-none",
+ "focus-visible:ring-ring text-muted-foreground data-[state=active]:border-primary-accent data-[state=active]:text-foreground inline-flex h-full items-center justify-center rounded-none border-b-4 border-transparent px-2 py-0.5 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-transparent data-[state=active]:shadow-none",
className,
)}
{...props}
diff --git a/web/src/components/ui/textarea.tsx b/web/src/components/ui/textarea.tsx
index 4c2d608779..5e35828789 100644
--- a/web/src/components/ui/textarea.tsx
+++ b/web/src/components/ui/textarea.tsx
@@ -9,7 +9,7 @@ const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
return (
<textarea
className={cn(
- "border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring disabled:bg-muted/50 flex min-h-[80px] w-full rounded-md border px-3 py-2 text-sm focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
+ "border-input bg-background ring-offset-background placeholder:text-foreground-tertiary focus-visible:ring-ring disabled:bg-muted/50 flex min-h-[80px] w-full rounded-md border px-3 py-2 text-sm focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
className,
)}
ref={ref}
diff --git a/web/src/components/ui/timeline.tsx b/web/src/components/ui/timeline.tsx
index 464436de09..fef7c84d5c 100644
--- a/web/src/components/ui/timeline.tsx
+++ b/web/src/components/ui/timeline.tsx
@@ -9,7 +9,7 @@ export function Timeline({ children, className }: TimelineProps) {
return (
<div className={cn("relative w-full", className)}>
{/* Timeline line */}
- <div className="bg-border absolute left-2 mt-4 h-[calc(100%-16px)] w-px" />
+ <div className="bg-border-contrast absolute left-2 mt-4 h-[calc(100%-16px)] w-px" />
{/* Timeline items container */}
<div className="pl-4">{children}</div>
@@ -41,7 +41,7 @@ export function TimelineItem({
ref={ref}
className={cn(
"group relative mb-2 flex w-full cursor-pointer flex-col gap-1 rounded-sm p-2",
- isActive ? "bg-muted" : "hover:bg-primary-foreground",
+ isActive ? "bg-muted" : "hover:bg-muted/50",
className,
)}
onClick={onClick}
@@ -51,7 +51,7 @@ export function TimelineItem({
{/* Timeline dot */}
<div
className={cn(
- "fill bg-border absolute top-3 -left-[11.5px] h-2 w-2 rounded-full",
+ "fill bg-border-contrast absolute top-3 -left-[11.5px] h-2 w-2 rounded-full",
isActive ? "border-primary" : "border-muted-foreground",
)}
/>
diff --git a/web/src/ee/features/in-app-agent/components/InAppAgentMessage.tsx b/web/src/ee/features/in-app-agent/components/InAppAgentMessage.tsx
index 92565f3598..a99489953f 100644
--- a/web/src/ee/features/in-app-agent/components/InAppAgentMessage.tsx
+++ b/web/src/ee/features/in-app-agent/components/InAppAgentMessage.tsx
@@ -455,7 +455,7 @@ function MessageFeedbackControls({
rows={3}
maxLength={500}
className={cn(
- "border-input bg-background text-foreground placeholder:text-muted-foreground w-full resize-none rounded-md border px-2 py-1",
+ "border-input bg-background text-foreground placeholder:text-foreground-tertiary w-full resize-none rounded-md border px-2 py-1",
isCompact ? "text-xs" : "text-sm",
)}
/>
diff --git a/web/src/ee/features/in-app-agent/components/InAppAgentWindow.tsx b/web/src/ee/features/in-app-agent/components/InAppAgentWindow.tsx
index bccc18232c..17a48939f5 100644
--- a/web/src/ee/features/in-app-agent/components/InAppAgentWindow.tsx
+++ b/web/src/ee/features/in-app-agent/components/InAppAgentWindow.tsx
@@ -619,7 +619,7 @@ export function InAppAgentWindow(props: InAppAgentWindowProps) {
placeholder="Ask the assistant a question..."
rows={1}
className={cn(
- "bg-background placeholder:text-muted-foreground w-full flex-1 resize-none overflow-y-auto rounded-md text-sm leading-5 disabled:cursor-not-allowed disabled:opacity-60",
+ "bg-background placeholder:text-foreground-tertiary w-full flex-1 resize-none overflow-y-auto rounded-md text-sm leading-5 disabled:cursor-not-allowed disabled:opacity-60",
isExpanded
? "max-h-40 min-h-14 border-none ring-0"
: "border-input max-h-40 min-h-8 px-3 py-1",
diff --git a/web/src/features/auth/components/AuthCloudRegionSwitch.tsx b/web/src/features/auth/components/AuthCloudRegionSwitch.tsx
index a6811052e1..c3acd692a9 100644
--- a/web/src/features/auth/components/AuthCloudRegionSwitch.tsx
+++ b/web/src/features/auth/components/AuthCloudRegionSwitch.tsx
@@ -100,7 +100,7 @@ export function CloudRegionSwitch({
href="https://langfuse.com/security/hipaa"
target="_blank"
rel="noopener noreferrer"
- className="text-primary-accent hover:text-hover-primary-accent underline"
+ className="text-link hover:text-link-hover underline"
>
Learn more about HIPAA compliance →
</a>
@@ -117,7 +117,7 @@ const DataRegionInfo = () => (
<DialogTrigger asChild>
<a
href="#"
- className="text-primary-accent hover:text-hover-primary-accent ml-1 text-xs"
+ className="text-link hover:text-link-hover ml-1 text-xs"
title="What is this?"
tabIndex={-1}
>
@@ -155,7 +155,7 @@ const DataRegionInfo = () => (
href="https://langfuse.com/security/data-regions"
target="_blank"
rel="noopener noreferrer"
- className="text-primary-accent underline"
+ className="text-link hover:text-link-hover underline"
>
data regions
</a>{" "}
@@ -164,7 +164,7 @@ const DataRegionInfo = () => (
href="https://langfuse.com/docs/data-security-privacy"
target="_blank"
rel="noopener noreferrer"
- className="text-primary-accent underline"
+ className="text-link hover:text-link-hover underline"
>
data security & privacy
</a>
diff --git a/web/src/features/dashboard/components/TabsComponent.tsx b/web/src/features/dashboard/components/TabsComponent.tsx
index 3e13ad7219..5120c97e64 100644
--- a/web/src/features/dashboard/components/TabsComponent.tsx
+++ b/web/src/features/dashboard/components/TabsComponent.tsx
@@ -41,8 +41,8 @@ export const TabComponent = ({ tabs }: TabComponentProps) => {
key={tab.tabTitle}
className={cn(
index === selectedIndex
- ? "border-primary-accent text-primary-accent"
- : "text-muted-foreground hover:border-border hover:text-primary border-transparent",
+ ? "border-primary-accent text-foreground"
+ : "text-muted-foreground hover:border-border hover:text-foreground border-transparent",
"cursor-pointer border-b-2 px-1 py-2 text-sm font-medium whitespace-nowrap",
)}
aria-current={index === selectedIndex ? "page" : undefined}
diff --git a/web/src/features/dashboard/components/cards/DashboardTable.tsx b/web/src/features/dashboard/components/cards/DashboardTable.tsx
index afbf79c6ac..c59c20f48b 100644
--- a/web/src/features/dashboard/components/cards/DashboardTable.tsx
+++ b/web/src/features/dashboard/components/cards/DashboardTable.tsx
@@ -50,7 +50,7 @@ export const DashboardTable = ({
</tr>
</thead>
- <tbody className="divide-accent bg-background divide-y">
+ <tbody className="divide-accent divide-y">
{rows
.slice(
0,
diff --git a/web/src/features/filters/components/multi-select.tsx b/web/src/features/filters/components/multi-select.tsx
index 3a09e58e4b..5d1262911d 100644
--- a/web/src/features/filters/components/multi-select.tsx
+++ b/web/src/features/filters/components/multi-select.tsx
@@ -140,7 +140,7 @@ export function MultiSelect({
<Button
variant="outline"
className={cn(
- "border-input ring-offset-background placeholder:text-muted-foreground focus:ring-ring flex h-8 w-full items-center justify-between gap-x-2 rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
+ "border-input ring-offset-background placeholder:text-foreground-tertiary focus:ring-ring flex h-8 w-full items-center justify-between gap-x-2 rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
className,
)}
disabled={disabled}
@@ -202,9 +202,9 @@ export function MultiSelect({
<InputCommandItem key="select-all" onSelect={handleSelectAll}>
<div
className={cn(
- "border-primary mr-2 flex h-4 w-4 items-center justify-center rounded-sm border",
+ "border-control-border mr-2 flex h-4 w-4 items-center justify-center rounded-sm border",
allSelectedState
- ? "bg-primary text-primary-foreground"
+ ? "bg-control-fill border-control-fill text-primary-foreground"
: "opacity-50 [&_svg]:invisible",
)}
>
@@ -242,9 +242,9 @@ export function MultiSelect({
>
<div
className={cn(
- "border-primary mr-2 flex h-4 w-4 items-center justify-center rounded-sm border",
+ "border-control-border mr-2 flex h-4 w-4 items-center justify-center rounded-sm border",
isSelected
- ? "bg-primary text-primary-foreground"
+ ? "bg-control-fill border-control-fill text-primary-foreground"
: "opacity-50 [&_svg]:invisible",
)}
>
@@ -304,7 +304,7 @@ export function MultiSelect({
>
<div
className={cn(
- "border-primary mr-2 flex h-4 w-4 items-center justify-center rounded-sm border",
+ "border-control-border mr-2 flex h-4 w-4 items-center justify-center rounded-sm border",
getFreeTextInput(
isCustomSelectEnabled,
values,
@@ -312,7 +312,7 @@ export function MultiSelect({
) ||
(optionValues.has(freeText) &&
selectedValues.has(freeText))
- ? "bg-primary text-primary-foreground"
+ ? "bg-control-fill border-control-fill text-primary-foreground"
: "opacity-50 [&_svg]:invisible",
)}
>
diff --git a/web/src/features/scores/components/multi-select-key-values.tsx b/web/src/features/scores/components/multi-select-key-values.tsx
index 722cd041ef..4d6c93ac08 100644
--- a/web/src/features/scores/components/multi-select-key-values.tsx
+++ b/web/src/features/scores/components/multi-select-key-values.tsx
@@ -175,7 +175,7 @@ export function MultiSelectKeyValues<
<Button
variant={variant}
className={cn(
- "ring-offset-background placeholder:text-muted-foreground focus:ring-ring flex h-8 w-full items-center justify-between rounded-md px-3 py-1 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
+ "ring-offset-background placeholder:text-foreground-tertiary focus:ring-ring flex h-8 w-full items-center justify-between rounded-md px-3 py-1 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
className,
)}
disabled={disabled}
diff --git a/web/src/features/search-bar/components/SearchBarAiPrompt.tsx b/web/src/features/search-bar/components/SearchBarAiPrompt.tsx
index 536e1150e2..3dd410ddbf 100644
--- a/web/src/features/search-bar/components/SearchBarAiPrompt.tsx
+++ b/web/src/features/search-bar/components/SearchBarAiPrompt.tsx
@@ -180,7 +180,7 @@ export function SearchBarAiPrompt({
// ring box-shadow (the "blue box"). border-0 + focus:ring-0 drop both
// (it's `:focus`, not `:focus-visible`), so the only focus indicator
// is the container's subtle focus-within ring, matching the grammar bar.
- className="placeholder:text-muted-foreground min-w-0 flex-1 border-0 bg-transparent text-xs leading-6 outline-none focus:ring-0 focus:outline-none disabled:opacity-60"
+ className="placeholder:text-foreground-tertiary min-w-0 flex-1 border-0 bg-transparent text-xs leading-6 outline-none focus:ring-0 focus:outline-none disabled:opacity-60"
onChange={(event) => {
setValue(event.target.value);
if (error) setError(null);
diff --git a/web/src/features/table/components/TableSelectionManager.tsx b/web/src/features/table/components/TableSelectionManager.tsx
index 1191c55547..c0d4342cac 100644
--- a/web/src/features/table/components/TableSelectionManager.tsx
+++ b/web/src/features/table/components/TableSelectionManager.tsx
@@ -82,7 +82,6 @@ function SelectionHeaderCheckbox<TData>({
}
}}
aria-label="Select all"
- className="opacity-60"
/>
</div>
);
@@ -185,7 +184,6 @@ function SelectionRowCheckbox<TData>({
if (!value) setSelectAll(false);
}}
aria-label="Select row"
- className="opacity-60"
/>
</div>
);
diff --git a/web/src/features/v4/components/V4MigrationProjectCards.tsx b/web/src/features/v4/components/V4MigrationProjectCards.tsx
index 00e0e1da9e..19f29c505c 100644
--- a/web/src/features/v4/components/V4MigrationProjectCards.tsx
+++ b/web/src/features/v4/components/V4MigrationProjectCards.tsx
@@ -440,7 +440,7 @@ const InlineLink = ({
children: ReactNode;
}) => {
const className =
- "text-accent-dark-blue hover:text-primary-accent/60 inline-flex items-center gap-1 text-sm font-semibold whitespace-nowrap";
+ "text-link hover:text-link-hover inline-flex items-center gap-1 text-sm font-semibold whitespace-nowrap";
return external ? (
<a
diff --git a/web/src/pages/_document.tsx b/web/src/pages/_document.tsx
index 6390f29461..a8019e5dee 100644
--- a/web/src/pages/_document.tsx
+++ b/web/src/pages/_document.tsx
@@ -13,7 +13,9 @@ export default function Document() {
// lang is set explicitly (not left to the i18n config, which is being
// phased out in App Router) so screen readers always get the document
// language — WCAG 2.1 SC 3.1.1.
- <Html lang="en">
+ // next-themes mutates class/style on <html> before hydration; suppress the
+ // expected mismatch one level deep (React 19 logs it and can re-render).
+ <Html lang="en" suppressHydrationWarning>
<Head />
<body>
<Main />
diff --git a/web/src/pages/auth/enterprise-sso-required.tsx b/web/src/pages/auth/enterprise-sso-required.tsx
index 4ff1dfcfa1..b13cb072fe 100644
--- a/web/src/pages/auth/enterprise-sso-required.tsx
+++ b/web/src/pages/auth/enterprise-sso-required.tsx
@@ -194,7 +194,7 @@ export default function EnterpriseSsoRequiredPage() {
Contact{" "}
<a
href="mailto:[email protected]"
- className="text-primary-accent hover:text-hover-primary-accent"
+ className="text-link hover:text-link-hover"
>
</a>{" "}
@@ -204,7 +204,7 @@ export default function EnterpriseSsoRequiredPage() {
<div className="text-muted-foreground mt-6 text-center text-sm">
<Link
href="/auth/sign-in"
- className="text-primary-accent hover:text-hover-primary-accent"
+ className="text-link hover:text-link-hover"
>
Back to other sign-in options
</Link>
@@ -215,7 +215,7 @@ export default function EnterpriseSsoRequiredPage() {
Need help? Contact{" "}
<a
href="mailto:[email protected]"
- className="text-primary-accent hover:text-hover-primary-accent"
+ className="text-link hover:text-link-hover"
>
</a>
diff --git a/web/src/pages/auth/sign-in.tsx b/web/src/pages/auth/sign-in.tsx
index 05c9c6a1c8..1b7ed1cd2a 100644
--- a/web/src/pages/auth/sign-in.tsx
+++ b/web/src/pages/auth/sign-in.tsx
@@ -740,7 +740,7 @@ export default function SignIn({
page (CMD + SHIFT + R) or clear your browser cache.{" "}
<a
href="mailto:[email protected]"
- className="text-primary-accent hover:text-hover-primary-accent cursor-pointer text-xs font-medium whitespace-nowrap"
+ className="text-link hover:text-link-hover cursor-pointer text-xs font-medium whitespace-nowrap"
>
(contact us)
</a>
@@ -797,7 +797,7 @@ export default function SignIn({
Password{" "}
<Link
href="/auth/reset-password"
- className="text-primary-accent hover:text-hover-primary-accent ml-1 text-xs"
+ className="text-link hover:text-link-hover ml-1 text-xs"
tabIndex={-1}
title="What is this?"
>
@@ -869,7 +869,7 @@ export default function SignIn({
No account yet?{" "}
<Link
href={`/auth/sign-up${router.asPath.includes("?") ? router.asPath.substring(router.asPath.indexOf("?")) : ""}`}
- className="text-primary-accent hover:text-hover-primary-accent leading-6 font-semibold"
+ className="text-link hover:text-link-hover leading-6 font-semibold"
>
Sign up
</Link>
diff --git a/web/src/pages/auth/sign-up.tsx b/web/src/pages/auth/sign-up.tsx
index 8f8d45d7de..054754bfaf 100644
--- a/web/src/pages/auth/sign-up.tsx
+++ b/web/src/pages/auth/sign-up.tsx
@@ -457,7 +457,7 @@ function VerifiedSignupFlow({
The code is valid for 3 minutes.{" "}
<button
type="button"
- className="text-primary-accent hover:text-hover-primary-accent font-medium"
+ className="text-link hover:text-link-hover font-medium"
onClick={() => {
setPhase("form");
setOtpCode("");
@@ -585,7 +585,7 @@ function SignupFooter() {
Already have an account?{" "}
<Link
href={`/auth/sign-in${router.asPath.includes("?") ? router.asPath.substring(router.asPath.indexOf("?")) : ""}`}
- className="text-primary-accent hover:text-hover-primary-accent leading-6 font-semibold"
+ className="text-link hover:text-link-hover leading-6 font-semibold"
>
Sign in
</Link>
diff --git a/web/src/pages/project/[projectId]/datasets/[datasetId]/runs/[runId].tsx b/web/src/pages/project/[projectId]/datasets/[datasetId]/runs/[runId].tsx
index 4803ca3b3a..a4695741b1 100644
--- a/web/src/pages/project/[projectId]/datasets/[datasetId]/runs/[runId].tsx
+++ b/web/src/pages/project/[projectId]/datasets/[datasetId]/runs/[runId].tsx
@@ -122,7 +122,7 @@ export default function Dataset() {
<span className="text-sm font-medium">Dataset Version</span>
<Link
href={`/project/${projectId}/datasets/${datasetId}/items?version=${run.data.datasetVersion.toISOString()}`}
- className="text-accent-dark-blue hover:text-primary-accent/60 text-sm"
+ className="text-link hover:text-link-hover text-sm"
>
<LocalIsoDate date={run.data.datasetVersion} />
</Link>
diff --git a/web/src/pages/project/[projectId]/users/[userId].tsx b/web/src/pages/project/[projectId]/users/[userId].tsx
index 67d9d8aa1e..a274334b6a 100644
--- a/web/src/pages/project/[projectId]/users/[userId].tsx
+++ b/web/src/pages/project/[projectId]/users/[userId].tsx
@@ -150,8 +150,8 @@ export default function UserPage() {
key={tab}
className={cn(
tab === currentTab
- ? "border-primary-accent text-primary-accent"
- : "text-muted-foreground hover:border-border hover:text-primary border-transparent",
+ ? "border-primary-accent text-foreground"
+ : "text-muted-foreground hover:border-border hover:text-foreground border-transparent",
"border-b-2 px-4 py-3 text-sm font-medium whitespace-nowrap",
)}
aria-current={tab === currentTab ? "page" : undefined}
diff --git a/web/src/styles/globals.css b/web/src/styles/globals.css
index 5f2b143354..a1f8e4d583 100644
--- a/web/src/styles/globals.css
+++ b/web/src/styles/globals.css
@@ -14,7 +14,13 @@
--spacing-screen-with-banner: calc(100svh - var(--banner-offset));
--color-primary-accent: hsl(var(--primary-accent));
- --color-hover-primary-accent: hsl(var(--hover-primary-accent));
+ --color-link: hsl(var(--link));
+ --color-link-hover: hsl(var(--link-hover));
+ --color-control-fill: hsl(var(--control-fill));
+ --color-control-track: hsl(var(--control-track));
+ --color-control-border: hsl(var(--control-border));
+ --color-foreground-tertiary: hsl(var(--foreground-tertiary));
+ --color-surface-code: hsl(var(--surface-code));
--color-muted-magenta: hsl(var(--muted-magenta));
--color-muted-blue: hsl(var(--muted-blue));
--color-muted-green: hsl(var(--muted-green));
@@ -40,6 +46,7 @@
--color-qlang-keyword: hsl(var(--qlang-keyword));
--color-border: hsl(var(--border));
+ --color-border-contrast: hsl(var(--border-contrast));
--color-input: hsl(var(--input));
--color-ring: hsl(var(--ring));
--color-background: hsl(var(--background));
@@ -144,6 +151,10 @@
If we ever want to remove these styles, we need to add an explicit border
color utility to any element that depends on these defaults.
+
+ Uses the theme-aware --border token: the `* { @apply border-border }` reset
+ below already wins for real elements, so this only governs pseudo-elements —
+ which previously got a light-only gray-200 in both themes.
*/
@layer base {
*,
@@ -151,7 +162,7 @@
::before,
::backdrop,
::file-selector-button {
- border-color: var(--color-gray-200, currentcolor);
+ border-color: hsl(var(--border));
}
}
@@ -162,6 +173,13 @@
--muted: 210 40% 96.1%;
--muted-foreground: 215.4 16.3% 46.9%;
+ /* Faintest text tier: placeholders, disabled, hints — one step below
+ muted-foreground (langfuse.com/docs has the same 4th step). NOTE: ~2.8:1
+ on white — flagged in review, kept per design preference for now. */
+ --foreground-tertiary: 215 12% 62%;
+ /* Code blocks sit a step BELOW their surrounding surface ("code is a
+ well"), matching the docs site's --surface-code convention. */
+ --surface-code: 0 0% 98%;
--popover: 0 0% 100%;
--popover-foreground: 222.2 84% 4.9%;
@@ -173,6 +191,9 @@
--header-foreground: var(--foreground);
--border: 214.3 31.8% 91.4%;
+ /* Structural/viz lines (tree connectors, timeline grid + bar outlines):
+ one clear step stronger than the hairline --border. */
+ --border-contrast: 214.3 20% 80%;
--input: 214.3 31.8% 91.4%;
--primary: 222.2 47.4% 11.2%;
@@ -193,7 +214,21 @@
--ring: 215 20.2% 65.1%;
--primary-accent: 243 75.4% 58.6%;
- --hover-primary-accent: 239 83.5% 66.7%;
+ /* Hyperlinks get their own pair (tabs/selection stay on primary-accent):
+ same lavender family as dark, but muted — links shouldn't be the
+ loudest thing on a light page — with a clearly darker hover step. */
+ --link: 246 40% 50%;
+ --link-hover: 246 55% 36%;
+ /* Checked selection controls (checkbox/switch): monochrome in BOTH
+ modes — dark fill + light glyph in light, muted-white fill + dark
+ glyph in dark. Deliberately dimmer than --primary in dark so checked
+ controls don't outshine content (fills read louder than text).
+ --control-track is the switch's off-state track. */
+ --control-fill: 222.2 47.4% 11.2%;
+ --control-track: 214.3 31.8% 91.4%;
+ /* Unchecked control boundary — quieter than the near-black fill in light,
+ a touch above --input in dark so the box still reads on the canvas. */
+ --control-border: 215 12% 60%;
--muted-green: 84 81% 44%;
--muted-magenta: 330 90% 70%;
@@ -267,66 +302,94 @@
}
.dark {
- --background: 222.2 84% 4.9%;
- --foreground: 210 40% 83%;
-
- --muted: 217.2 32.6% 17.5%;
- --muted-foreground: 215 20.2% 65.1%;
-
- --popover: 222.2 84% 4.9%;
- --popover-foreground: 210 40% 88%;
-
- --card: 222.2 84% 4.9%;
- --card-foreground: 210 40% 88%;
-
- --header: 217.2 32.6% 15%;
+ /* Linear-style surface ladder: elevation is carried by lightness steps
+ (background < header/sidebar < card < popover) plus hairline borders —
+ not shadows. Values from linear.app's [data-theme=dark] tokens. */
+ /* Neutral (zero-saturation) surface ladder — lightness steps carry the
+ elevation (Linear's structure, de-tinted per Trang's call after a
+ cool/neutral/warm A-B). Text hierarchy comes from the WIDE GAP between
+ tiers: emphasis 91% > body 88% > meta 54% > faint 40%, with sidebar nav
+ dimmer than content until active. Bright tiers cap near 91% (the docs
+ site caps at 90%) — never near-white. Don't compress the ramp — the
+ gap is the hierarchy. */
+ --background: 0 0% 3.5%;
+ --foreground: 0 0% 88%;
+
+ --muted: 0 0% 11.6%;
+ --muted-foreground: 0 0% 54%;
+ --foreground-tertiary: 0 0% 40%;
+ --surface-code: 0 0% 2.3%;
+
+ --popover: 0 0% 10.2%;
+ --popover-foreground: 0 0% 88%;
+
+ --card: 0 0% 8.2%;
+ --card-foreground: 0 0% 88%;
+
+ --header: 0 0% 6.3%;
--header-foreground: var(--foreground);
- --border: 217.2 32.6% 27.5%;
- --input: 217.2 32.6% 27.5%;
+ --border: 0 0% 10.5%;
+ --border-contrast: 0 0% 26%;
+ --input: 0 0% 18%;
- --primary: 210 40% 83%;
- --primary-foreground: 222.2 47.4% 11.2%;
+ --primary: 0 0% 90%;
+ --primary-foreground: 0 0% 3.5%;
- --secondary: 217.2 32.6% 17.5%;
- --secondary-foreground: 210 40% 88%;
+ --secondary: 0 0% 11.6%;
+ --secondary-foreground: 0 0% 88%;
- --tertiary: 217.2 32.6% 30%;
- --tertiary-foreground: 210 40% 88%;
+ --tertiary: 0 0% 16.5%;
+ --tertiary-foreground: 0 0% 88%;
- --accent: 217.2 32.6% 17.5%;
- --accent-foreground: 210 20% 98%;
+ /* One clear step above --popover (10.2%) — focus:bg-accent is the only
+ focus cue in menus/selects/⌘K, and 14.3% was a near-invisible ~1.13:1. */
+ --accent: 0 0% 18%;
+ --accent-foreground: 0 0% 91%;
- --destructive: 0 62.8% 30.6%;
- --destructive-foreground: 0 85.7% 97.3%;
+ --destructive: 0 78.7% 63.1%;
+ --destructive-foreground: 0 0% 100%;
- --ring: 217.2 32.6% 17.5%;
+ --ring: 246 55% 70%;
--primary-accent: 246 55% 70%;
- --muted-primary-accent: 239 83.5% 66.7%;
+ --link: 246 55% 70%;
+ --link-hover: 246 95% 85%;
+ --control-fill: 0 0% 78%;
+ --control-track: 0 0% 24%;
+ /* Matches --border-contrast: unchecked checkboxes/radios read by their
+ border alone; 20% was ~1.58:1 on the canvas. */
+ --control-border: 0 0% 26%;
--muted-blue: 215 95% 73.1%;
--muted-green: 142 76.7% 73.1%;
--muted-magenta: 330 76.7% 73.1%;
- --muted-gray: 210 50% 25%;
+ /* Keeps ~4pp above --card so chart grids (--chart-grid) and disabled
+ badge fills stay discernible on elevated surfaces, without the harshness
+ of --border-contrast (26%). */
+ --muted-gray: 0 0% 16%;
- --light-red: 0 62.8% 30.6%;
- --dark-red: 0 90.6% 70.8%;
+ /* Status pairs on Linear's hues: light-* are dark tinted backgrounds,
+ dark-* the readable text/icon color on them. */
+ --light-red: 0 35% 14%;
+ --dark-red: 0 78.7% 63.1%;
- --light-yellow: 32 81% 28.8%;
- --dark-yellow: 53 98.3% 76.9%;
+ --light-yellow: 48 45% 13%;
+ --dark-yellow: 48 100% 47.1%;
- --light-green: 144 61.2% 20.2%;
- --dark-green: 142 76.7% 73.1%;
+ --light-green: 134 35% 13%;
+ --dark-green: 134 62% 40.2%;
- --light-blue: 224 64.3% 32.9%;
- --dark-blue: 212 96.4% 78.4%;
+ --light-blue: 209 45% 15%;
+ --dark-blue: 209 96.7% 64.7%;
- --accent-light-green: 192 21% 9%;
- --accent-dark-green: 124 21.8% 30.6%;
+ /* accent-light-green doubles as a full-height output/diff surface
+ (PrettyJsonView), so it stays a whisper above --card, not chip-strength. */
+ --accent-light-green: 134 15% 9%;
+ --accent-dark-green: 134 50% 55%;
- --accent-light-blue: 263 60% 50.4%;
- --accent-dark-blue: 224 50% 90%;
+ --accent-light-blue: 240 32.4% 13.9%;
+ --accent-dark-blue: 246 70% 76%;
/* Search-bar query syntax highlighting (dark). Brighter than light so the
key/value read against the dark surface. See :root for the contract. */
@@ -337,14 +400,14 @@
--radius: 0.5rem;
- --sidebar-background: 222.2 84% 4.9%;
- --sidebar-foreground: 210 40% 83%;
- --sidebar-primary: 210 40% 81%;
- --sidebar-primary-foreground: 222.2 47.4% 10.2%;
- --sidebar-accent: 217.2 32.6% 16.5%;
- --sidebar-accent-foreground: 210 40% 86%;
- --sidebar-border: 217.2 32.6% 26.5%;
- --sidebar-ring: 224.3 76.3% 46%;
+ --sidebar-background: 0 0% 6.3%;
+ --sidebar-foreground: 0 0% 60%;
+ --sidebar-primary: 0 0% 90%;
+ --sidebar-primary-foreground: 0 0% 3.5%;
+ --sidebar-accent: 0 0% 11.6%;
+ --sidebar-accent-foreground: 0 0% 91%;
+ --sidebar-border: 0 0% 10.5%;
+ --sidebar-ring: 246 55% 70%;
--find-match-background: 60 100% 20%;
--find-match-selected-background: 60 100% 50%;