# Viola UI screens in code

This project builds screens from the Viola UI Figma kit in React and Tailwind.

## Colours
- Every colour is a Viola variable. Figma `bg/surface` is the CSS variable `--bg-surface` and the Tailwind class `bg-bg-surface`. The full list is in `src/tokens.css`.
- Never write a hex value, `rgb()` or a Tailwind palette colour such as `slate-500` in a component.
- Dark mode comes from the `.dark` class on `<html>`, which swaps the variables. Never add `dark:` variants or a second palette.
- Green (`positive`) and red (`negative`) are only for gains and losses. Buttons and links use `accent`.

## Type and spacing
- Font is Geist. Use the text styles in `tailwind.config.js` (`text-caption`, `text-label`, `text-number`, `text-body`, `text-title`, `text-heading`, `text-display`), not pixel sizes.
- Spacing uses Tailwind's 4px scale, which matches Viola's `space/*` tokens. Radius uses `rounded-xs` to `rounded-xl`.

## Numbers
- Every number uses `tabular-nums`. Amounts and changes are right-aligned in tables.
- Negative values use the minus sign (−), not a hyphen.
- Every change has a sign: +0.37%, −0.52%.
- Copy figures exactly from the frame. Never round, recalculate or invent a number. If a figure looks wrong, list it in your summary instead of changing it.

## Assets
- Icons are SVGs in `src/icons.js` and use `currentColor`, so their colour comes from a text class.
- Chart lines and sparklines are SVGs from the frame, with their colours replaced by variables.

## When something doesn't fit
- If a value in the frame has no matching variable, don't invent one. Say which layer it is and what value it has, and leave it out.
