Skip to content

Design Tokens

DoCurious uses a comprehensive design token system built on CSS custom properties. Tokens are defined in TypeScript (src/theme/defaults.ts), compiled to CSS variables via applyTheme.ts, and consumed throughout the app. Every token is available as a --variable on :root.

Source files:

  • src/theme/defaults.ts -- default token values
  • src/theme/types.ts -- TypeScript interfaces
  • src/theme/applyTheme.ts -- CSS variable injection

Brand Colors

The DoCurious palette draws from outdoor exploration: forest greens, warm golds, and natural earth tones.

Core Palette

TokenCSS VariableDefault ValueNameUsage
primary--primary#3D5A3CScout GreenButtons, active states, sidebar bg
primaryHover--primary-hover#4A6B49--Primary hover state
primaryActive--primary-active#2E4A2D--Primary pressed state
----primary-foreground#ffffff--Text on primary backgrounds
accent--accent#D4A84BHoney / Brass GoldXP, rewards, highlights, badges
accentHover--accent-hover#C89A3E--Accent hover state
secondary--secondary#5B8FA8SkyScience, audio, secondary info
secondaryHover--secondary-hover#4E7F96--Secondary hover state

Background Colors

TokenCSS VariableDefault ValueNameUsage
background--background#FAF8F3CreamPage backgrounds (not pure white)
backgroundSecondary--background-secondary#F3EFE6--Card backgrounds, alt sections

Text Colors

TokenCSS VariableDefault ValueNameUsage
text--foreground#1A1A1AInkPrimary body text (not pure black)
textMuted--foreground-muted#6B6B6BStoneSecondary text
border--border#E2DDD4--Warm light borders

Status Colors

TokenCSS VariableDefault ValueUsage
error--error#D93025Form errors, destructive actions
success--success#2E7D32Success states
warning--warning#E07B5AWarnings (Coral)
TokenCSS VariableDefault ValueUsage
sidebarBackground--sidebar-bg#3D5A3CScout Green background
sidebarText--sidebar-text#FAF8F3Cream text
sidebarTextMuted--sidebar-text-muted#B8C9B7Light green-tinted muted
sidebarActiveBackground--sidebar-active-bg#4A6B49Active nav item
sidebarActiveBorder--sidebar-active-border#D4A84BHoney accent border

Audience Accents

Each audience segment has a dedicated accent color for targeted UI elements.

TokenCSS VariableDefault ValueNameAudience
accentB2C--accent-b2c#E07B5ACoralParents & Kids
accentSchools--accent-schools#D4A84BHoneySchools & Educators
accentProviders--accent-providers#5B8FA8SkyActivity Providers

Typography

TokenCSS VariableDefault ValueUsage
fontFamily--font-body"Inter", -apple-system, ...Body text, UI elements
fontFamilyHeading--font-heading"Lexend", -apple-system, ...All headings (h1--h6)
fontFamilyMono--font-monoSFMono-Regular, Menlo, ...Code blocks, data

Heading Style Tokens

These tokens control heading appearance and vary per theme preset.

CSS VariableDefault ValueDescription
--theme-heading-weight600Font weight for headings
--theme-heading-letter-spacing-0.01emLetter spacing for headings
--theme-heading-text-transformnoneText transform (none, uppercase, capitalize)
--theme-heading-border-bottomnoneDecorative heading underline

Button Style Tokens

CSS VariableDefault ValueDescription
--theme-button-radius0.5remButton border radius
--theme-button-weight500Button font weight

Spacing Scale

Spacing is density-aware. The density setting (compact, comfortable, spacious) selects a spacing multiplier set. Default is comfortable.

Density: compact

CSS VariableValue
--theme-space-xs0.2rem
--theme-space-sm0.35rem
--theme-space-md0.5rem
--theme-space-lg0.65rem
--theme-space-xl0.85rem
--theme-space-2xl1rem
--theme-section-gap0.75rem
--theme-card-padding0.75rem
--theme-page-padding1rem

Density: comfortable (default)

CSS VariableValue
--theme-space-xs0.25rem
--theme-space-sm0.5rem
--theme-space-md0.75rem
--theme-space-lg1rem
--theme-space-xl1.25rem
--theme-space-2xl1.5rem
--theme-section-gap1rem
--theme-card-padding1rem
--theme-page-padding1.5rem

Density: spacious

CSS VariableValue
--theme-space-xs0.375rem
--theme-space-sm0.625rem
--theme-space-md1rem
--theme-space-lg1.25rem
--theme-space-xl1.75rem
--theme-space-2xl2rem
--theme-section-gap1.5rem
--theme-card-padding1.25rem
--theme-page-padding2rem

Surface & Shadow Tokens

Cards and surfaces use layered shadows that vary per theme (flat, neumorphic, glassmorphic, neubrutalist, etc.).

CSS VariableDefault ValueDescription
--theme-shadow-sm0 1px 2px rgba(0,0,0,0.05)Small surface shadow
--theme-shadow-md0 2px 8px rgba(0,0,0,0.08)Medium surface shadow
--theme-shadow-lg0 4px 16px rgba(0,0,0,0.10)Large surface shadow
--theme-card-shadow0 1px 3px rgba(0,0,0,0.08)Card-specific shadow
--theme-card-border-width1pxCard border thickness
--theme-card-radius0.75remCard border radius
--theme-card-bgvar(--background)Card background (rgba for glass)
--theme-card-backdrop-blur0Backdrop blur for glassmorphism
--theme-card-accent-bordernoneTop accent stripe on cards
--theme-card-padding1remCard internal padding
--theme-card-gap1remGap between cards in grids

Layout Tokens

CSS VariableDefault ValueDescription
--theme-sidebar-width200pxSidebar width
--theme-sidebar-inset0pxGap between sidebar and edges (0 = flush)
--theme-sidebar-radius0Sidebar border radius (0 = sharp)
--theme-nav-item-radius0Nav item border radius
--theme-nav-item-border-width3pxActive nav item border
--theme-topnav-height64pxTop navigation bar height
--theme-content-max-width1400pxMain content area max width

Border & Divider Tokens

CSS VariableDefault ValueDescription
--theme-border-width1pxDefault border width
--theme-divider-stylesolidDivider line style (solid, dashed, dotted)
--theme-input-radius0.5remForm input border radius
--theme-input-border-width1pxForm input border width
--theme-badge-radius9999pxBadge/tag border radius

Motion Tokens

CSS VariableDefault ValueDescription
--theme-transition0.2sDefault transition duration

Background Texture

CSS VariableDefault ValueDescription
--theme-bg-texturenoneBackground image/gradient for page texture

Themes use this for distinctive visual effects -- topo-map contour lines (Expedition), paper grain (Field Journal), aurora gradients (Stardust), etc.


Planned / Undefined Tokens

The following tokens have been identified as needed but do not yet have finalized values:

  • Badge rarity colors: Common (Bronze), Uncommon (Silver), Rare (Gold), Epic (Purple), Legendary (Prismatic)
  • Challenge difficulty: Beginner (Green), Intermediate (Yellow), Advanced (Orange)
  • Journey Map region states: Unexplored, Discovered, Explored, Advanced, Mastered
  • Category colors: Per-category colors for Journey Map regions
  • Streak indicator: Flame colors by streak level (0/2/4/12+ weeks)
  • Dark mode: Architecturally supported but no dark palette defined yet

Accessibility Notes

  • textMuted achieves 5.1:1 contrast ratio on white backgrounds, meeting WCAG AA
  • All status colors are paired with icons/text, never color-only indicators
  • Badge rarity is distinguishable without color (border style, label, or icon)
  • Celebration animations respect prefers-reduced-motion

CSS Variable Reference (Complete)

For quick lookup, here is the full list of CSS variables injected by applyThemeVars():

css
/* Colors */
--primary, --primary-hover, --primary-active, --primary-foreground
--accent, --accent-hover
--secondary, --secondary-hover
--background, --background-secondary
--foreground, --foreground-muted
--border
--error, --success, --warning
--sidebar-bg, --sidebar-text, --sidebar-text-muted
--sidebar-active-bg, --sidebar-active-border
--accent-b2c, --accent-schools, --accent-providers

/* Typography */
--font-body, --font-heading, --font-mono

/* Card */
--theme-card-shadow, --theme-card-border-width, --theme-card-radius
--theme-card-bg, --theme-card-backdrop-blur, --theme-card-accent-border
--theme-card-padding, --theme-card-gap

/* Headings */
--theme-heading-weight, --theme-heading-letter-spacing
--theme-heading-text-transform, --theme-heading-border-bottom

/* Buttons */
--theme-button-radius, --theme-button-weight

/* Sidebar / Nav */
--theme-sidebar-width, --theme-sidebar-inset, --theme-sidebar-radius
--theme-nav-item-radius, --theme-nav-item-border-width

/* Shadows */
--theme-shadow-sm, --theme-shadow-md, --theme-shadow-lg

/* Borders */
--theme-border-width, --theme-divider-style
--theme-input-radius, --theme-input-border-width
--theme-badge-radius

/* Spacing (density-aware) */
--theme-space-xs, --theme-space-sm, --theme-space-md
--theme-space-lg, --theme-space-xl, --theme-space-2xl
--theme-section-gap, --theme-card-padding, --theme-page-padding

/* Layout */
--theme-content-max-width, --theme-topnav-height

/* Motion */
--theme-transition

/* Texture */
--theme-bg-texture

DoCurious Platform Documentation