Design system
Fanalyx visual language
Two tiers: fa-* CSS for calculator/workflow pages, React components for interactive islands. Tokens live in @financial-analysis/tokens.
App spine buttons (fa-*)
Used in Astro pages and client-script HTML output.
Callouts (fa-*)
Info
Use for neutral guidance and tips.
Success
Use after a successful save or run.
Error
Validation failed — check required fields.
Heroes
Marketing pages use PageHero (fa-page-hero). Calculators and journey steps use WorkflowHero (via WorkflowPageIntro /JourneyStepHero).
Marketing
PageHero sample
Catalog and product pages — Fraunces display, not a workflow card.
Workflow
WorkflowHero sample
Calculator / journey stage title lives inside a card with optional progress.
The Answer + assumptions + compare
Signature craft (#410–#415): one hero metric with tabular lining figures, assumption chips, and optional A/B compare. Helpers:answer-html.ts, assumption-chip-html.ts, compare-html.ts.
$1,234,567.89
Scenario A
Keep loan
$2,147 / mo
Scenario B
Refinance
$1,892 / mo
Data table (fa-*)
Use fa-data-table + header/cell classes. Wrap wide tables in a focusable scroll region (role="region" / React ScrollableRegion).
| Month | Payment | Balance |
|---|---|---|
| 1 | $1,842 | $348,158 |
| 2 | $1,842 | $346,310 |
Theme preview
Typography
Display hero
Display section
Body large — intro paragraphs and hero subcopy.
Body copy — standard page prose.
Panel title — card and section headings.
$1,842.17 $12,450.00 6.50%
Chips (fa-*)
Form fields
App spine (fa-input-surface)
Helper text via fa-help-copy.
Required field — use fa-field-error + aria-invalid.
React Input
Enter a positive number
React buttons
Badges
Callouts
Info
Success
Warning
Error
Cards
Default card
Astro fa-card
App spine card class for static pages.
The Answer
Monthly payment
$1,842.17
What you pay each month on a $350,000 loan at 6.5% for 30 years.
Compare A/B
Scenario A
Buy
$84,200
Scenario B
Rent
$61,400
Metric cards
Monthly Payment
$1,842
Total Interest
$245,120
Hero metric
$1,842
Chart palette
Signature motion
Journey progress
40% completeRail card
Workflow rail section
Structured sidebar content in calculator pages.
Token files
@financial-analysis/tokens(packages/tokens/tokens.css) — semantic CSS variables + Tailwind @themepackages/ui/src/lib/classNames.ts— React class strings (uses token shadows / status)apps/web/src/styles/components.css— fa-* component classesapps/web/src/styles/chat-theme.css— chat third-tier VS Code sub-themeapps/web/src/styles/a11y-forced-colors.css— forced-colors / prefers-contrast
Styling exceptions
ChatPanel.astro loads chat-theme.css (VS Code–inspired third tier). It is separate from the Fanalyx brand spine documented here.