Files
Andrew S Erwin 0dc48a137f
release gate / check (push) Failing after 6m31s
Dark-mode readability pass: soften the palette, bump the root type scale
A user reported dark mode (white-on-black) is harder to read than light
mode. Root cause is halation, not size alone: the dark tokens ran 98%
foreground on a 3.9%-lightness background (~19:1 contrast), and bright
text on near-black visually bleeds — worst for astigmatic readers, and
light-on-dark renders perceptually thinner at the same size.

Palette (web/app/globals.css .dark tokens): background 3.9% -> 10%,
foreground 98% -> 92% (body contrast ~13:1, still ~2x WCAG AAA),
card/popover 6% -> 13%, sidebar 5.5% -> 8% (stays darker than content),
secondary/muted/border/input 15.9% -> 19% so surface steps survive the
lighter base; muted-foreground unchanged at ~7.4:1 (AAA).

Type scale: html root 106.25% (16 -> 17px) — a global bump, so every
rem-based text AND spacing scales proportionally in both themes.
Deliberately not per-theme: a dark-only font size would reflow layouts on
every theme toggle. Font-smoothing left untouched (the antialiased-off
trick is a pre-Mojave artifact and risks blur).

STYLE_GUIDE.md records both decisions, including a dark-theme readability
rule (keep body copy ~11:1-14:1; never reintroduce pure white on <5%
backgrounds) so future token work cannot silently undo this.

Web lint/SSR-eslint/build clean. CI browser regressions are the gate to
watch for the 6.25% global scale-up.
2026-10-28 21:54:16 -05:00

112 lines
3.9 KiB
CSS

@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
:root {
--background: 0 0% 100%;
--foreground: 240 10% 3.9%;
--card: 0 0% 100%;
--card-foreground: 240 10% 3.9%;
--popover: 0 0% 100%;
--popover-foreground: 240 10% 3.9%;
--primary: 245 58% 51%;
--primary-foreground: 0 0% 100%;
--secondary: 240 4.8% 95.9%;
--secondary-foreground: 240 5.9% 10%;
--muted: 240 4.8% 95.9%;
--muted-foreground: 240 3.8% 44.1%;
--accent: 245 58% 95%;
--accent-foreground: 245 58% 51%;
--destructive: 0 84.2% 60.2%;
--destructive-foreground: 0 0% 10%;
--border: 240 5.9% 90%;
--input: 240 5.9% 90%;
--ring: 245 58% 51%;
--radius: 0.625rem;
--radius-sm: calc(0.625rem - 4px);
--radius-lg: calc(0.625rem + 4px);
--radius-full: 9999px;
--spacing-xs: 4px;
--spacing-sm: 8px;
--spacing-md: 16px;
--spacing-lg: 24px;
--spacing-xl: 32px;
--spacing-2xl: 48px;
--spacing-3xl: 64px;
--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.03), 0 1px 3px 0 rgb(0 0 0 / 0.06);
--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.07), 0 4px 6px -4px rgb(0 0 0 / 0.05);
--duration-fast: 150ms;
--duration-normal: 250ms;
--duration-slow: 350ms;
--chart-1: 245 58% 51%;
--chart-2: 173 58% 39%;
--chart-3: 12 76% 61%;
--chart-4: 197 37% 24%;
--chart-5: 43 74% 66%;
--sidebar: 245 30% 97%;
--sidebar-foreground: 240 10% 20%;
}
.dark {
/* Readability pass (2026-10-29): the previous near-black bg (3.9%) with
near-white text (98%) hit ~19:1 contrast — halation made body text
bleed for a meaningful share of readers (esp. astigmatism). These
values land body copy at ~13:1, still far above WCAG AAA (7:1). */
--background: 240 6% 10%;
--foreground: 0 0% 92%;
--card: 240 5% 13%;
--card-foreground: 0 0% 92%;
--popover: 240 5% 13%;
--popover-foreground: 0 0% 92%;
--primary: 245 60% 60%;
--primary-foreground: 0 0% 100%;
--secondary: 240 4% 19%;
--secondary-foreground: 0 0% 92%;
--muted: 240 4% 19%;
--muted-foreground: 240 5% 64.9%;
--accent: 245 30% 20%;
--accent-foreground: 245 60% 75%;
--destructive: 0 62.8% 30.6%;
--destructive-foreground: 0 0% 98%;
--border: 240 4% 19%;
--input: 240 4% 19%;
--ring: 245 60% 60%;
--shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.15), 0 1px 2px -1px rgb(0 0 0 / 0.15);
--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.2), 0 2px 4px -2px rgb(0 0 0 / 0.15);
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.25), 0 4px 6px -4px rgb(0 0 0 / 0.15);
--chart-1: 245 60% 60%;
--chart-2: 160 60% 45%;
--chart-3: 30 80% 55%;
--chart-4: 280 65% 60%;
--chart-5: 340 75% 55%;
--sidebar: 240 6% 8%;
--sidebar-foreground: 0 0% 85%;
}
}
@layer base {
/* 17px root (106.25%): a modest global type bump — every rem-based size
and spacing scales proportionally in BOTH themes. Deliberately not
dark-mode-only: a per-theme font size would reflow layouts on every
theme toggle. */
html { scroll-behavior: smooth; font-size: 106.25%; }
* { border-color: hsl(var(--border)); }
body {
background-color: hsl(var(--background));
color: hsl(var(--foreground));
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
::selection { background-color: hsl(var(--primary) / 0.2); color: hsl(var(--primary)); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background-color: transparent; }
::-webkit-scrollbar-thumb { background-color: hsl(var(--border)); border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background-color: hsl(var(--muted-foreground) / 0.5); }
}
@layer utilities {
.scrollbar-none::-webkit-scrollbar { display: none; }
.scrollbar-none { -ms-overflow-style: none; scrollbar-width: none; }
}