refactor(web): prune design tokens and consolidate CSS components

Tailwind v4 emits every @theme var to :root, so unused tokens ship for
nothing. Remove ~16 dead ones (accent, panel, slate, the *-muted washes,
radius-xl/2xl, brand-obsidian/jet/ash) after confirming zero references.

- Fold badge sizes into a single .badge; delete badge-md/lg @utilities and
  the unused success/warning/slate recipes. Fix badge/mono-chip vertical
  centering with leading-none (text-box silently no-ops on flex items).
- Add theme primitives: .firebreak-rule (a cut divider — ember segment,
  gap, hairline), .link-fuse (share-link lifetime), .status-line
  (containment grammar), .badge-ember, .btn-danger-quiet.
- Give .btn-disabled a real border so disabled buttons match their
  bordered siblings in the Actions column; unify uppercase-label tracking
  to 0.12em; route .form-input through the token border + ember focus
  ring; drop the one-off .btn-xs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
ZTatman 2026-07-04 14:17:52 -04:00
parent 4bb8f1229d
commit 97ded2d287

View file

@ -4,67 +4,68 @@
--font-sans: "Geist", ui-sans-serif, system-ui, sans-serif;
--font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
--color-brand-obsidian: #17191c;
--color-brand-jet: #000000;
--color-brand-cream: #f7f2e8;
--color-brand-ash: #bdb8ad;
--color-brand-red: #c62030;
--color-brand-flame: #f04a36;
--color-background: oklch(0.175 0.008 260);
--color-foreground: oklch(0.985 0.003 270);
--color-card: oklch(0.22 0.012 258);
--color-card-foreground: oklch(0.985 0.003 270);
--color-muted: oklch(0.26 0.014 258);
--color-muted-foreground: var(--color-brand-ash);
--color-elevated: oklch(0.24 0.012 258);
--color-elevated-foreground: oklch(0.985 0.003 270);
--color-accent: oklch(0.25 0.015 255);
--color-accent-foreground: oklch(0.985 0.003 270);
--color-primary: #2a2d31;
/* Ash & Ember (light): the page is cleared ground — warm ash-paper
surfaces and charcoal ink. Fire is rationed to a single contained
ember accent; flame red stays alarm-only. */
--color-background: oklch(0.959 0.01 86);
--color-foreground: oklch(0.3 0.013 75);
--color-card: oklch(0.985 0.006 88);
--color-card-foreground: var(--color-foreground);
--color-muted: oklch(0.929 0.014 86);
--color-muted-foreground: oklch(0.51 0.028 80);
--color-elevated: oklch(0.94 0.013 84);
--color-primary: oklch(0.52 0.15 40);
--color-primary-foreground: var(--color-brand-cream);
--color-primary-hover: var(--color-brand-obsidian);
--color-primary-muted: rgb(247 242 232 / 14%);
--color-secondary: oklch(0.26 0.014 258);
--color-secondary-foreground: oklch(0.985 0.003 270);
--color-border: oklch(0.3 0.016 256);
--color-border-subtle: oklch(0.24 0.01 258);
--color-input: oklch(0.2 0.01 258);
--color-ring: oklch(0.65 0.12 55);
--color-ring-muted: oklch(0.4 0.07 50 / 0.35);
--color-header: var(--color-brand-jet);
--color-header-foreground: oklch(0.985 0.003 270);
--color-panel: oklch(0.22 0.012 258);
--color-panel-foreground: oklch(0.985 0.003 270);
--color-primary-hover: oklch(0.45 0.135 38);
--color-secondary: oklch(0.93 0.013 84);
--color-secondary-hover: oklch(0.9 0.015 84);
--color-secondary-foreground: var(--color-foreground);
--color-border: oklch(0.881 0.02 84);
--color-border-subtle: oklch(0.915 0.014 84);
--color-input: oklch(0.98 0.006 88);
/* Ember: the interactive/alive warm tier (contained). Flame red is alarm-only. */
--color-ember: oklch(0.52 0.15 40);
--color-ring: var(--color-ember);
--color-ring-muted: oklch(0.52 0.13 40 / 0.35);
--color-header: oklch(0.985 0.006 88);
--color-header-foreground: var(--color-foreground);
/* Overlay stays dark — it vignettes the dark hero video for legibility. */
--color-overlay: oklch(0.14 0.006 260);
--color-hero-ember: oklch(0.58 0.2 34 / 0.22);
--color-hero-burn: var(--color-brand-flame);
--color-slate: oklch(0.55 0.04 250);
--color-slate-foreground: oklch(0.985 0.003 270);
--color-slate-muted: oklch(0.26 0.035 245);
--color-success: oklch(75% 0.12 150);
--color-success-foreground: oklch(82% 0.12 150);
--color-success-muted: oklch(32% 0.07 150);
--color-warning: oklch(82% 0.13 75);
--color-warning-foreground: oklch(86% 0.13 75);
--color-warning-muted: oklch(35% 0.075 75);
--color-danger: var(--color-brand-flame);
--color-danger-foreground: #ff7a66;
--color-danger-hover: var(--color-brand-red);
--color-danger-hover-foreground: var(--color-brand-cream);
--color-danger-muted: rgb(240 74 54 / 18%);
--color-expired: var(--color-brand-ash);
--color-expired-foreground: #d6d0c4;
--color-expired-muted: #282b30;
--color-success: oklch(0.521 0.057 135);
--color-success-foreground: oklch(0.46 0.065 140);
--color-warning: oklch(0.618 0.121 74);
--color-warning-foreground: oklch(0.5 0.11 70);
/* Danger: solid brand-red fill for destructive actions (rest state),
darkening on hover. danger-foreground is the on-light text used by
error messages and badge text. */
--color-danger: var(--color-brand-red);
--color-danger-hover: color-mix(
in oklab,
var(--color-brand-red) 78%,
black
);
--color-danger-foreground: oklch(0.5 0.172 30);
--color-danger-muted: color-mix(
in oklab,
var(--color-danger) 18%,
transparent
);
--color-expired: oklch(0.6 0.01 80);
--color-expired-foreground: oklch(0.4 0.01 80);
--radius-sm: 0.125rem;
--radius-md: 0.25rem;
--radius-lg: 0.375rem;
--radius-xl: 0.5rem;
--radius-2xl: 0.75rem;
--shadow-card: 0 1px 3px rgb(0 0 0 / 30%), 0 1px 2px rgb(0 0 0 / 18%);
--shadow-elevated: 0 4px 12px rgb(0 0 0 / 35%), 0 1px 3px rgb(0 0 0 / 20%);
--shadow-card: 0 1px 2px rgb(60 40 20 / 6%), 0 1px 3px rgb(60 40 20 / 7%);
--shadow-elevated:
0 10px 28px rgb(50 35 20 / 12%), 0 2px 6px rgb(50 35 20 / 8%);
--shadow-hero-logo: 0 14px 34px rgb(0 0 0 / 28%);
--shadow-hero-text: 0 4px 18px rgb(0 0 0 / 40%);
--shadow-hero-copy: 0 4px 18px rgb(0 0 0 / 62%);
@ -78,13 +79,22 @@
html {
@apply bg-background text-foreground;
color-scheme: dark;
color-scheme: light;
font-family: var(--font-sans);
}
body {
@apply antialiased bg-background text-foreground;
letter-spacing: 0;
/* "The fire is off-screen": a faint warm haze at the top edge so
interior pages share the hero's light without its motion. */
background-image: radial-gradient(
60rem 32rem at 50% -14rem,
oklch(0.7 0.15 45 / 0.07),
transparent 65%
);
background-repeat: no-repeat;
background-attachment: fixed;
}
code {
@ -96,6 +106,11 @@
h3 {
@apply text-foreground;
}
/* Alpine utility, dont show elements until alpine.js is fetched & loaded in browser*/
[x-cloak] {
display: none !important;
}
}
@layer components {
@ -103,24 +118,28 @@
@apply inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md px-4 py-2.5 text-sm font-medium transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50;
}
.btn-xs {
@apply px-2 py-1 text-xs;
}
.btn-sm {
@apply px-3 py-2 text-sm;
}
.btn-primary {
@apply border border-foreground/12 bg-primary text-primary-foreground hover:border-brand-flame/45 hover:bg-primary-hover hover:text-primary-foreground;
@apply border border-foreground/12 bg-primary text-primary-foreground hover:border-ember/45 hover:bg-primary-hover hover:text-primary-foreground;
}
/* Buttons are solid fills that darken a step on hover (the hero button's
behavior), never sheer washes with colored borders. */
.btn-secondary {
@apply border border-foreground/12 bg-card text-secondary-foreground hover:border-foreground/22 hover:bg-accent hover:text-accent-foreground;
@apply border border-foreground/12 bg-secondary text-secondary-foreground hover:bg-secondary-hover;
}
.btn-danger {
@apply border border-danger-muted bg-danger-muted text-danger-foreground hover:border-danger-hover hover:bg-danger-hover hover:text-danger-hover-foreground;
@apply border border-transparent bg-danger text-brand-cream hover:bg-danger-hover;
}
/* Destructive action at rest — quiet outline; solid red is reserved for
the moment of confirmation. Flame red never burns idle on a page. */
.btn-danger-quiet {
@apply border border-danger/45 bg-transparent text-danger-foreground hover:border-danger hover:bg-danger-muted;
}
.btn-link {
@ -133,7 +152,7 @@
inset-inline: 0;
bottom: 0.125rem;
height: 1px;
background: var(--color-brand-flame);
background: var(--color-ember);
transform: scaleX(0);
transform-origin: left center;
transition: transform 160ms ease;
@ -144,196 +163,53 @@
transform: scaleX(1);
}
/* Current-page nav link keeps its ember underline lit. */
.btn-link[aria-current="page"]::after {
transform: scaleX(1);
}
.btn-disabled {
@apply pointer-events-none border-foreground/8 bg-foreground/6 text-foreground/35;
}
.app-header {
position: sticky;
top: 0;
z-index: 50;
background: var(--color-header);
border-bottom: 1px solid oklch(0.2 0.012 260 / 0.5);
}
.app-header a,
.app-header button,
.app-header nav svg {
color: var(--color-header-foreground);
stroke: var(--color-header-foreground);
}
.app-header .brand-link svg {
stroke: none;
}
.app-header .btn-secondary {
background: color-mix(
in oklab,
var(--color-header-foreground) 8%,
transparent
);
border-color: color-mix(
in oklab,
var(--color-header-foreground) 18%,
transparent
);
color: var(--color-header-foreground);
}
.app-header .btn-secondary:hover {
background: color-mix(
in oklab,
var(--color-header-foreground) 14%,
transparent
);
border-color: color-mix(
in oklab,
var(--color-header-foreground) 28%,
transparent
);
color: var(--color-header-foreground);
}
.landing-page .app-header {
display: none;
}
.landing-page {
background: var(--color-background);
}
.hero-video {
@apply absolute inset-0 h-full w-full object-cover;
}
.hero-vignette {
@apply absolute inset-0 pointer-events-none;
background:
radial-gradient(
circle at center,
transparent 0,
transparent 30%,
color-mix(in oklab, var(--color-overlay) 38%, transparent)
62%,
color-mix(in oklab, var(--color-overlay) 90%, transparent)
100%
),
linear-gradient(
180deg,
color-mix(in oklab, var(--color-overlay) 64%, transparent) 0,
transparent 28%,
color-mix(in oklab, var(--color-overlay) 70%, transparent) 100%
),
radial-gradient(
ellipse at center,
color-mix(in oklab, var(--color-overlay) 10%, transparent) 0,
color-mix(in oklab, var(--color-overlay) 26%, transparent)
36%,
transparent 58%
);
}
.hero-ember {
@apply absolute pointer-events-none;
inset: 12% 18% 18%;
background: radial-gradient(
circle at center,
var(--color-hero-ember) 0%,
color-mix(in oklab, var(--color-hero-ember) 35%, transparent) 35%,
transparent 70%
);
mix-blend-mode: screen;
}
.hero-logo {
@apply h-auto w-full max-w-24 sm:max-w-32 lg:max-w-40;
filter:
drop-shadow(var(--shadow-hero-logo))
drop-shadow(var(--glow-hero));
}
.hero-wordmark {
@apply h-auto w-full max-w-40 sm:max-w-48 lg:max-w-56;
filter: drop-shadow(var(--shadow-hero-text));
}
.hero-statement {
@apply relative isolate flex max-w-lg flex-col items-center text-balance px-4 py-2 text-foreground sm:max-w-xl;
filter: drop-shadow(var(--shadow-hero-copy));
}
.hero-statement::before {
content: "";
position: absolute;
z-index: -1;
inset: -1.5rem -3rem;
background: radial-gradient(
ellipse at center,
color-mix(in oklab, var(--color-overlay) 72%, transparent) 0,
color-mix(in oklab, var(--color-overlay) 44%, transparent) 42%,
transparent 72%
);
filter: blur(10px);
pointer-events: none;
}
.hero-burn-line {
@apply my-4 h-px w-16 rounded-full sm:my-5;
background: linear-gradient(
90deg,
transparent,
color-mix(in oklab, var(--color-brand-red) 85%, transparent) 18%,
var(--color-hero-burn) 50%,
color-mix(in oklab, var(--color-brand-red) 85%, transparent) 82%,
transparent
);
box-shadow:
0 0 14px
color-mix(in oklab, var(--color-brand-flame) 45%, transparent),
0 0 1px var(--color-brand-cream);
}
.hero-meta {
@apply absolute inset-x-4 z-10 flex flex-wrap items-center justify-center gap-x-3 gap-y-2 text-[0.6875rem] font-semibold uppercase tracking-[0.12em] text-foreground/56 sm:text-xs;
bottom: clamp(1.5rem, 5dvh, 4rem);
filter: drop-shadow(var(--shadow-hero-text));
}
.hero-meta-separator {
@apply size-1 rounded-full;
background: var(--color-brand-flame);
box-shadow: 0 0 10px
color-mix(in oklab, var(--color-brand-flame) 55%, transparent);
}
.page-header {
@apply relative flex flex-col justify-between gap-6 pb-8 sm:flex-row sm:items-end;
}
.page-header::after {
content: "";
position: absolute;
inset-inline: 0;
bottom: 0;
height: 1px;
background: linear-gradient(
90deg,
color-mix(in oklab, var(--color-brand-flame) 46%, transparent),
color-mix(in oklab, var(--color-border) 80%, transparent) 28%,
transparent 100%
);
/* border (not just border-color) keeps disabled buttons the same
height as their bordered siblings in the Actions column. */
@apply pointer-events-none border border-foreground/8 bg-foreground/6 text-foreground/35;
}
.notice-rail {
@apply border-l-2 border-warning px-5 py-1.5;
background: var(--color-card);
}
/* The cut rule: an ember segment, a gap, then the hairline. The gap is
the point — the break the fire cannot cross. Ember sits 2px proud of
the 1px hairline so the burning side reads heavier than the ground. */
.firebreak-rule {
height: 2px;
background:
linear-gradient(var(--color-ember), var(--color-ember)) 0 0 /
2.5rem 2px no-repeat,
linear-gradient(var(--color-border), var(--color-border)) 3.25rem
50% / calc(100% - 3.25rem) 1px no-repeat;
}
/* Share-link lifetime as a fuse: ember = remaining, ash = burned.
The server sets --fuse to the remaining-lifetime percentage
(style="--fuse: 62%"); omitted = a fresh, fully-lit fuse. */
.link-fuse {
height: 2px;
background: linear-gradient(
90deg,
color-mix(in oklab, var(--color-warning-muted) 42%, transparent),
transparent 72%
var(--color-ember) var(--fuse, 100%),
var(--color-border-subtle) var(--fuse, 100%)
);
}
/* Containment status grammar — the operator voice for state reports
(STATUS · CONTAINED — 0 EXPOSED). Write copy in sentence case and
let the CSS shout; color comes from the call site. */
.status-line {
@apply font-mono text-[0.6875rem] font-medium uppercase tracking-[0.12em];
}
.table-panel {
@apply overflow-hidden rounded-lg border border-border bg-card;
box-shadow: var(--shadow-card);
@ -344,7 +220,10 @@
}
.data-table {
@apply w-full min-w-[720px] text-left text-sm;
/* Narrower floor on small screens — secondary columns are hidden
there, so less width needs to scroll. Tabular numerals keep
counts and dates aligned as they tick. */
@apply w-full min-w-[34rem] text-left text-sm tabular-nums md:min-w-[45rem];
}
.data-table thead {
@ -370,7 +249,12 @@
}
.data-table tbody tr:not(.table-empty) {
@apply transition-colors hover:bg-muted/30;
@apply transition-colors;
}
/* Row hover is a pass of warm light, not a gray lift. */
.data-table tbody tr:not(.table-empty):hover {
background: color-mix(in oklab, var(--color-ember) 6%, transparent);
}
.data-table td {
@ -381,34 +265,33 @@
@apply text-center text-muted-foreground;
}
.setup-shell {
@apply flex min-h-dvh items-center justify-center px-6 py-20;
/* Loading/error/empty states inside a table panel share one fixed-feel
height so the htmx swap to the real table doesn't shift layout (CLS). */
.table-placeholder {
@apply flex min-h-40 items-center justify-center gap-2.5 px-5 py-8 text-center text-sm text-muted-foreground;
}
.setup-logo {
@apply mx-auto h-auto w-full max-w-24;
filter: drop-shadow(var(--shadow-hero-logo));
.status-icon {
@apply size-4 shrink-0;
}
/* Loading-skeleton bar for table rows ("instrument warming up"). */
.skeleton-bar {
@apply inline-block h-3.5 rounded bg-muted/80 motion-safe:animate-pulse;
}
/* Inline technical strings (branch names, SHAs) — brighter than
muted-foreground so mono text reads as data, not chrome. */
.mono-chip {
@apply inline-block rounded bg-muted px-1 py-0.5 font-mono text-xs leading-none text-foreground/85;
}
.form-label {
@apply mb-1.5 block text-xs font-semibold uppercase tracking-[0.05em] text-foreground/50;
@apply mb-1.5 block text-xs font-semibold uppercase tracking-[0.12em] text-muted-foreground;
}
.form-input {
@apply block w-full rounded-md border border-foreground/14 bg-input px-3 py-2.5 text-sm text-foreground placeholder:text-foreground/30 focus:border-foreground/30 focus:outline-none focus:ring-2 focus:ring-foreground/10;
}
.error-backdrop-logo {
@apply absolute left-1/2 -translate-x-1/2 opacity-50 inset-bs-8;
width: 100%;
height: 100%;
max-width: 800px;
}
.error-backdrop-logo img {
display: block;
width: 100%;
height: auto;
@apply block w-full rounded-md border border-border bg-input px-3 py-2.5 text-sm text-foreground transition placeholder:text-muted-foreground focus:border-ring focus:outline-none focus:ring-2 focus:ring-ring-muted;
}
@keyframes creep-in {
@ -601,51 +484,34 @@
}
}
.brand-link svg {
@apply shrink-0;
stroke: none;
/* One badge, one size — sizes fold back in here if a real second size
ever ships. leading-none: without it, 10px caps float in the
inherited line box and the slack lands below the text. */
.badge {
@apply inline-block whitespace-nowrap rounded-full px-1.5 py-0.5 text-[10px] font-medium uppercase leading-none tracking-[0.06em];
}
.brand-link svg:last-child {
width: 5.25rem;
height: auto;
}
.badge-warning {
@apply rounded-full px-2.5 py-1 text-xs font-medium;
background: color-mix(in oklab, var(--color-warning) 30%, transparent);
border: 1px solid color-mix(in oklab, var(--color-warning) 42%, transparent);
color: var(--color-warning-foreground);
/* Live ember — heat that's already outside the break (public repos:
potential fire starters). Soft wash, not alarm red; same recipe as
the sibling badges so it sits flush beside them. */
.badge-ember {
background: color-mix(in oklab, var(--color-ember) 42%, transparent);
border: 1px solid
color-mix(in oklab, var(--color-ember) 60%, transparent);
color: oklch(0.4 0.13 38);
}
.badge-danger {
@apply rounded-full px-2.5 py-1 text-xs font-medium;
background: color-mix(in oklab, var(--color-danger) 30%, transparent);
border: 1px solid color-mix(in oklab, var(--color-danger) 42%, transparent);
background: color-mix(in oklab, var(--color-danger) 42%, transparent);
border: 1px solid
color-mix(in oklab, var(--color-danger) 60%, transparent);
color: var(--color-danger-foreground);
}
.badge-expired {
@apply rounded-full px-2.5 py-1 text-xs font-medium;
background: color-mix(in oklab, var(--color-expired) 26%, transparent);
border: 1px solid color-mix(in oklab, var(--color-expired) 38%, transparent);
background: color-mix(in oklab, var(--color-expired) 38%, transparent);
border: 1px solid
color-mix(in oklab, var(--color-expired) 55%, transparent);
color: var(--color-expired-foreground);
}
.badge-slate {
@apply rounded-full px-2.5 py-1 text-xs font-medium;
background: color-mix(in oklab, var(--color-slate) 32%, transparent);
border: 1px solid color-mix(in oklab, var(--color-slate) 44%, transparent);
color: oklch(0.82 0.04 250);
}
.card {
@apply border rounded-lg border-border bg-card text-card-foreground;
box-shadow: var(--shadow-card);
}
.input-mono {
@apply rounded-md border border-border bg-input px-3 py-2 font-mono text-[13px] leading-5 text-foreground transition placeholder:text-muted-foreground focus:border-ring focus:outline-none focus:ring-2 focus:ring-ring-muted;
}
}