Design Guide
Visual Design and CSS Execution Guide
Visual Design & CSS Execution Guide
The visual language of this application merges the high-density, mathematical rigor of a Linear-inspired SaaS interface with a "Liquid Glass" physical aesthetic. It relies on a strictly constrained monochrome foundation (Midnight/Obsidian), highly intentional accent colours, and depth created through translucency, backdrop blurs, and multi-layered shadows.
1. Colour Architecture: The OKLCH System
All colours must be defined and manipulated using the OKLCH colour space to ensure perceptual uniformity and accessible contrast scaling. Hexadecimal, RGB, and HSL are strictly forbidden. To allow for dynamic alpha transparency injection in CSS and Tailwind v4, colours are defined by their structural components within the @theme directive.
The Midnight / Obsidian Palette
This dark-mode default minimises ambient chrome, relying on absolute darks and stark contrasts.
| Element | CSS Variable Definition | OKLCH Value | Application Context |
|---|---|---|---|
| Canvas | --color-bg-primary | 0.15 0.01 285 | The absolute lowest z-index layer. |
| Surface | --color-bg-secondary | 0.18 0.01 285 | Bento box cards, sidebars, elevated containers. |
| Primary Text | --color-text-primary | 0.95 0.01 285 | Headings, active tabs, high-emphasis body text. |
| Muted Text | --color-text-secondary | 0.45 0.02 285 | Metadata, timestamps, inactive UI labels. |
| Accent | --color-accent | 0.70 0.14 260 | Primary buttons, active states, focus rings. |
| Success | --color-success | 0.70 0.10 140 | Soft Sage Green for positive feedback. |
| Error | --color-error | 0.60 0.12 20 | Muted Rose for sophisticated error states. |
Dynamic Opacity Injection
To use these variables with opacity in Tailwind v4, leverage the native CSS from syntax:
2. Typographic Scaling (Geist)
Typography utilises the Geist font stack. It must maintain microscopic legibility for data density while offering geometric elegance for large marketing surfaces. All sizing is executed in rem units to respect browser accessibility baselines (1rem = 16px).
Tracking (letter-spacing) is mathematically tied to size: as size increases, tracking decreases to maintain optical tightness.
| Typographic Level | Size (rem / px) | Weight | Line Height | Tracking | Use Case |
|---|---|---|---|---|---|
| Display Header | 3.5rem (56px) | 600 | 1.0 | -0.025em | Hero sections, main view titles. |
| Section Header | 2.0rem (32px) | 600 | 1.2 | -0.025em | Modal headers, bento card titles. |
| Body Primary | 1.0rem (16px) | 400 | 1.5 | -0.011em | Standard paragraphs, descriptions. |
| UI Control | 0.875rem (14px) | 500 | 1.2 | -0.011em | Buttons, navigation links, tabs. |
| Micro Data | 0.6875rem (11px) | 500 | 1.2 | 0.05em | Metadata, badges (always uppercase). |
3. Spatial Architecture: The 8-Point Grid
All margins, paddings, gap spacings, and layout dimensions adhere to an 8-point base grid. This prevents sub-pixel rendering blur on high-density displays.
| Scale Step | Pixel Equivalent | REM Equivalent | CSS Variable Token |
|---|---|---|---|
| Sub-Grid | 4px | 0.25rem | --space-1 |
| Base Step | 8px | 0.5rem | --space-2 |
| Step 1.5 | 12px | 0.75rem | --space-3 |
| 1x Spacing | 16px | 1.0rem | --space-4 |
| 1.5x Spacing | 24px | 1.5rem | --space-6 |
| 2x Spacing | 32px | 2.0rem | --space-8 |
4. Layout Paradigm: The Bento Box Grid
The structural arrangement of components relies heavily on heavily compartmentalised cards that adhere to a foundational 12-column CSS Grid. Visual hierarchy is established by the surface area a card occupies.
5. Surface Dynamics: Borders, Radii, and Elevation
Because the colour palette is heavily constrained, the UI relies on optical illusions of depth to separate cards from the background canvas.
The 1px Subtle Border Illusion
In dark mode environments, standard borders appear harsh. Define edges using heavily transparent white strokes to simulate a microscopic physical bevel.
Concentric Corner Radii
Excessive rounding feels consumer-centric; tighter rounding conveys engineering precision.
- Outer cards use
8px(0.5rem/--space-2) radii. - Internal nested elements scale down to
4px(0.25rem/--space-1). - Mathematical Rule: Inner Radius = Outer Radius - Padding.
Multi-Layered Drop Shadows & Inset Lighting
Single-layer shadows fail to mimic real-world lighting. Use a 4-layer stack simulating ambient occlusion to diffuse scatter, paired with an inset rim light on the top edge.
6. Ambient Lighting & Mesh Textures
To break the starkness of large bento cards, employ "Ambient Mesh Textures." These are subtle washes of colour that draw the eye without overwhelming the monochrome palette.
- No Hard Edges: Gradients must fade to
transparentusing percentages (50%to70%) to prevent visual banding. - Low Chroma: Injected colours must maintain a low saturation in the OKLCH space.
- Layering: The base surface colour (
--color-bg-secondary) must always be declared last as the solid fallback layer.
7. Glassmorphism & Neon Glow Effects
For global chrome elements (like the Command Palette or sticky headers) and active state highlights.
8. Implementation & Class Usage Hierarchy
The application relies on specific utility classes defined in globals.css. Understanding when and where to apply these classes ensures optical consistency and preserves the Z-index hierarchy.
Core Surfaces (The Z-Index Hierarchy)
You have two distinct levels of "glass." Do not mix them arbitrarily.
.glass-surface: The architectural workhorse.- When to use: Use this for standard bento box cards, sidebars, or any static container resting directly on the main canvas (
bg-background). - Visuals: It features a tighter blur and a shallower ambient shadow stack.
- When to use: Use this for standard bento box cards, sidebars, or any static container resting directly on the main canvas (
.glass-elevated: The overlay.- When to use: Reserve this strictly for floating elements that detach from the primary layout. This includes the Command Palette, dropdown menus, tooltips, and modal dialogs.
- Visuals: It features a heavy 20px blur and a deeper, more diffuse shadow stack to physically "lift" it closer to the user.
Ambient Texture Application (The "Glow" Cards)
These classes override the standard .glass-surface to inject radial gradients. They should be used sparingly to create visual anchors and guide the user's eye.
.card-insight(The Hero Glow)- When to use: Apply this only to the primary "Hero" card of a view (e.g., the "Daily Insight" or main overview brief).
- Visuals: Injects a dual-tone purple and magenta ambient glow to create a premium, atmospheric anchor.
.card-accent-glow(The Action Glow)- When to use: Use this for cards that require immediate primary user action, or to highlight a singular, highly important metric.
- Visuals: Projects a subtle wash of the Cobalt accent colour from the top-center.
.card-success-glow(The Positive State)- When to use: Apply dynamically when a bento card achieves a "completed" state (e.g., inbox zero, all tasks done).
- Visuals: Projects a soft, organic Sage Green wash to calm the interface and signal positive feedback without relying on harsh alerts.