---
name: strict-theme-ledger
description: "Build UI in the Ledger theme from strictthemes.com. A sober, exact theme for money and reports. Cream paper, pine green, a serif for the big numbers. Use it when the project's DESIGN.md is Ledger, or when the user asks for the Ledger theme. It installs the theme into a shadcn project, gives its layout rules and its page briefs (account overview, statement, invoice, payment form and yearly report), and checks the result with Strict Check."
---

# Ledger

A sober, exact theme for money and reports. Cream paper, pine green, a serif for the big numbers.

This skill is for building UI in the Ledger theme: a page, a section or a component. `DESIGN.md` decides the tokens: colors, type, spacing steps and corners. The notes below say how the theme lays a page out and which token goes where.

## Before you start

1. **Check the theme is installed.** The project should have `DESIGN.md` in its root and the Ledger variables in its global CSS. If not, run `npx shadcn@latest add https://strictthemes.com/r/ledger.json` and save https://strictthemes.com/themes/ledger/DESIGN.md as `DESIGN.md` in the project root. In a project without shadcn, use https://strictthemes.com/themes/ledger/tailwind.css instead. If the global CSS still imports a font the theme does not use (a new shadcn project imports Geist), remove that import, and uninstall its package if nothing else uses it. Keep every font import the theme's install added, also one for a style no page uses yet.
2. **Read `DESIGN.md` from start to finish.** It is the source of truth for every visual decision.
3. **Look at the project before writing code.** Use its framework, router and file layout. For controls (buttons, inputs, tabs, menus, dialogs, accordions, data tables) use the components in `components/ui`, and add a missing one with `npx shadcn@latest add <name>` rather than writing your own, unless the page brief names a plain element. Layout is plain elements with theme classes: sections, panels, figures and lists need no component.
4. **Teach `cn()` the theme's type classes.** shadcn's class merger does not know `text-display` or `text-h1`. It takes them for colors, so `cn("text-label text-muted-foreground")` silently drops one of the two, and a type class passed to a stock component does not replace its size. In a new shadcn project, `lib/utils.ts` only passes `cn` on from the `cn` package. Unless the file already holds the lines below, change it to:

   ```ts
   import { createCn } from "cn/config"

   // The theme's type classes are font sizes, not colors.
   export const cn = createCn({
     extend: {
       classGroups: {
         "font-size": [{ text: ["display", "h1", "h2", "body", "label"] }],
       },
     },
   })
   ```

   Then make every file in `components/ui` use it: where one has `import { cn } from "cn"`, change that line to import `cn` from the project's utils file (`@/lib/utils` in a default setup). Do the same for each component you add later. If the project uses `tailwind-merge` instead of the `cn` package, its components already import from the utils file: pass the same object to `extendTailwindMerge` and keep `clsx`.

## The theme in short

- **Fonts:** Instrument Serif for headings, Instrument Sans for body text, Spline Sans Mono for labels and code.
- **Type scale** (size/weight; each class also sets line height and tracking): `text-display` 64px/400, `text-h1` 42px/400, `text-h2` 28px/400, `text-body` 15px/400, `text-label` 12px/500.
- **Font per size:** a type class does not set the font family. Headings (`<h1>` to `<h6>`) get the heading font on their own; on any other element add the font class: `font-heading` with `text-display`, `text-h1`, `text-h2`; `font-mono` with `text-label`.
- **Spacing scale**, with the Tailwind step in brackets: 4px (`1`), 8px (`2`), 12px (`3`), 16px (`4`), 24px (`6`), 48px (`12`).
- **Corners:** `rounded-sm` 2px, `rounded-md` 3px, `rounded-xl` 6px (the `lg` corner in `DESIGN.md`). `rounded-lg` is 3px as well: it is shadcn's name for the base corner, the one its stock buttons and inputs use.
- **Colors (light mode):** primary #0E5A40, on-primary #FFFFFF, secondary #14211B, on-secondary #FFFFFF, tertiary #B98A2F, on-tertiary #14211B, neutral #5A6860, background #F6F4EC, surface #FFFFFF, foreground #14211B, border #D9D6C8, error #B42318.

The layout notes below are written around a sample organisation and its pages. If the user gave you their own product, its name, pages and content replace the sample's, and the layout, the colors and the classes stay as the notes give them.

### How Ledger pages are laid out

- **Page:** cream paper: the outermost element is a `<div>` with `flex min-h-svh flex-col bg-background text-body text-foreground`, holding `<header>`, `<main>` (`flex-1`) and `<footer>`.
- **Container:** the header's row, the content of `<main>` and the footer's line each sit in a centered container `<div>`, `mx-auto w-full max-w-[1200px] px-4 md:px-6`. This width is the one arbitrary value allowed. The `<main>` element itself has `py-6 md:py-12`; the container inside it carries the rhythm below.
- **Today:** the sample's today is Friday 27 November 2026, a fixed date in code, never the device clock. A limit given as a date includes that day.
- **Dates:** a date that stands on its own (a value, a small figure, a list row) is `27 Nov 2026`, in a `<time>` with `dateTime="2026-11-27"`; in a table's Date column it drops the year, `27 Nov`, still a `<time>` with the full `dateTime`. Inside a sentence a date is written out, `27 November 2026` (or `30 November` in a sentence about this month), and is a `<time>` only where the page brief says. A date range in a label or a cell ("2–8 Nov") is plain text, unless the page brief asks for two `<time>` elements.
- **Money:** pounds with two decimals and a thousands comma: `£1,240.50`. Money out has a real minus sign, U+2212 (`−£84.20`), never a hyphen. Money in has a plus sign (`+£1,240.50`) where it stands beside money out; a balance has no sign. A sum of exactly zero is `£0.00` with no sign and no color; its word stays ("In £0.00"). A brief that rounds to whole pounds says so.
- **Links:** the product's name links to `/`. The nav links, in this order, are Overview (`/`), Transactions (`/transactions`), Invoices (`/invoice`), Payments (`/payment`) and Reports (`/report`), the same in both navs; the page brief says which is current, and that link keeps its own path. Any other link without a named destination is `#`. Every link you write, nav links included, gets `transition-colors duration-150`. A text link is `text-primary underline underline-offset-4 hover:text-foreground`, and inherits its size. A link in a sheet's heading row is a label in `text-primary` with the same underline and hover.
- **Vertical rhythm:** every vertical distance between siblings comes from a `gap-*` on their parent, a `flex flex-col` or a grid. Never use `space-y-*`. Rows and cells use padding. The only margins are the Confirmations note's. The container inside `<main>` is `flex flex-col gap-6`: the page header, then each row of sheets, and each sheet the page brief puts in the container directly, full width; on a page the page brief divides into sections it is `gap-12`. The other steps: `gap-1` between a label and the value under it; `gap-2` between a field and its helper text and error, and between buttons in a row; `gap-3` between a label and its field or button group (`DESIGN.md`'s 12px), and between a sheet's heading row and its content; `gap-4` between the fields of a form and between paragraphs; `gap-6` between sheets in a column and between groups inside a sheet.
- **Grid:** where the page brief puts sheets side by side, they are items of a 12-column grid, `grid grid-cols-1 gap-6 lg:grid-cols-12`, single column below `lg`. A column of several sheets is `flex flex-col gap-6`, and its last sheet has `flex-1`, so the columns of a row end level.
- **Header:** a full-width `<header>` with `border-b border-border` and no fill. Its container is the row, `flex items-center gap-6 py-4`: the product's name in `font-heading text-h2 text-foreground`, no underline; then a `<nav>` with the `aria-label` "Main" and `hidden md:block`, holding a `<ul>` with `flex gap-6` of the nav links; then, at the right end (`ml-auto`), the business's short name, without "Ltd", as a small figure in a `<p>`, `hidden md:block`; and the "Menu" button of the note on menus below, which also has `ml-auto`: only one of the two is shown at a width. A nav link is a label: the current page's link is `text-foreground` with `aria-current="page"` and `underline underline-offset-4`, the others `text-muted-foreground hover:text-foreground`.
- **Footer:** a `<footer>` with a 1px top border across the full width. Its container has `py-6` and holds one small figure: "Fairhold · A demo. No money moves. · 2026".
- **Page header:** a row that is not a sheet: `flex flex-wrap items-end justify-between gap-4`. On the left a stack with `gap-1`: the label or small figure the page brief gives, if any, then the `<h1>` in `text-h1`. On the right the page's actions, `flex flex-wrap gap-2`.
- **Headings:** a serif `<h2>`, where the page brief asks for one, is `text-h2`. Headings and key figures are set in Instrument Serif, which has one weight: never put `font-bold`, `font-semibold` or `font-medium` on a heading, a key figure or a serif total, and where a stock component ships `font-medium` around serif text, add `font-normal`. Sentence case.
- **Sheets:** a sheet is a plain element with `rounded-xl border border-border bg-card p-6`, not the shadcn `Card`. Never put a sheet inside a sheet: divide its parts with 1px rules (`border-t border-border`). A sheet is a `flex flex-col gap-3` when it holds a heading row and content. A sheet with a heading is a `<section>` named by that heading with `aria-labelledby`, unless the page brief names its element; a list of rows in it is a `<ul>`.
- **Sheet heading:** a sheet opens with a heading row, unless the page brief says it has none: `flex min-h-8 flex-wrap items-center justify-between gap-3`. It holds a label heading, an `<h2>` (or `<h3>`, to keep heading order) in `font-mono text-label uppercase text-muted-foreground`, and at its right end anything that belongs to the whole sheet: a link, a badge, a count, a filter.
- **Sheets with rows:** a sheet that holds a table or a list of rows has no padding of its own, no gap, and `overflow-hidden`. Its heading row is one element: the heading row's classes plus `px-6 pt-6 pb-3 border-b border-border`, with no wrapper around it. Each row of a list has `px-6 py-3` and a 1px top border, except the first.
- **Labels:** sheet headings, table headers, field labels, nav links, legends, and button and badge text are labels: `font-mono text-label uppercase`, a short fragment, in `text-muted-foreground` unless a note or the page brief gives another color. Button and badge text keep their component's color. Helper text and error lines share the label's font and size but are sentences and not uppercased: they are not labels.
- **Small figures:** anything the page brief calls a small figure (a date, a reference, a count, a name, helper text) is `font-mono text-label tabular-nums text-muted-foreground`, without `uppercase`. A `text-foreground` in the page brief replaces the muted color.
- **Numbers:** an amount, a date, an account number or a reference that stands on its own (a cell, a value, a list row) is `font-mono tabular-nums`; inside a sentence it stays in the body font. In a table, amounts and their column's header are right-aligned (`text-right`). A date that stands on its own is a `<time>` with a `dateTime`.
- **Key figures:** a balance or a total that a sheet is about is `font-heading tabular-nums text-foreground`, in `text-h1`, or `text-h1 xl:text-display` where the page brief says display. Its label sits above it with `gap-1`. It has no color of its own: a figure for money out says "out" in its label.
- **Signed amounts:** money in or out in a row or a cell is one element, `inline-flex items-baseline justify-end gap-2 whitespace-nowrap`: the word first, a label: "In" or "Out", in `text-muted-foreground`, then the figure in `font-mono tabular-nums`, `text-primary` with a plus sign for money in, `text-destructive` with a minus sign for money out. The word comes first, so the digits keep the column's right edge. Never show in or out by color alone. Green and red mean in and out and nothing else, never decoration.
- **Measure:** a paragraph of body text (`text-body`) is `text-foreground`, never muted, and at most `max-w-lg` wide (about 70 characters a line). A small figure stays muted even when it is a sentence in a `<p>`: it is not a paragraph in this sense.
- **Buttons:** the shadcn `Button` with `className="px-4 font-mono text-label uppercase"`, its stock height and corner; add it with `npx shadcn@latest add button` if missing. The default variant (pine green) is for the one main action of a view: at most one enabled default button at a time. Other actions are `variant="secondary"` (green-black ink) or, for quiet ones, `variant="outline"`. On a page with a `secondary` button, replace the `secondary` variant's stock `hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]` with `hover:bg-secondary/80` in `components/ui/button.tsx`, once; add nothing to the buttons: the stock hover does not change this theme's secondary color. A button that sends a form needs `type="submit"`: this `Button` is `type="button"` unless told otherwise. A button that keeps the focus when its own click disables it (Previous and Next, "Approve", "Mark as paid") stays on the page, disabled, with `focusableWhenDisabled`. A button whose click moves focus elsewhere, or that is disabled before anyone clicks it, uses the plain `disabled` prop. With `focusableWhenDisabled`, Base UI sets `aria-disabled` and `data-disabled`, not `disabled`, so the stock `disabled:` classes do nothing: on a page that uses the prop, and only there, add `data-disabled:pointer-events-none data-disabled:opacity-50` beside them in `components/ui/button.tsx`. A link styled as a button is an `<a>` with `cn(buttonVariants({ variant }), "…")` and the same classes: `buttonVariants` alone does not merge classes.
- **Button groups:** a set of buttons where one is chosen (a filter) is a `role="group"` with `flex flex-wrap gap-1` and an `aria-label`, or, where the page brief gives it a visible label, `aria-labelledby` with that label's `id` instead. The chosen button has `aria-pressed="true"` and `variant="secondary"`; the rest have `aria-pressed="false"` and `variant="outline"`.
- **Badges:** a badge marks something that waits on someone: "Due", "To approve". It is the shadcn `Badge` (`npx shadcn@latest add badge`) in the `outline` variant with `className="h-auto rounded-sm border-transparent bg-tertiary px-2 py-1 font-mono text-label uppercase text-tertiary-foreground"`. The corner must be in this `className`, or the stock pill wins. One or two words, no icon. Brass is a fill only: never write `text-tertiary`.
- **States:** a state that waits on no one is a status mark and a word: `inline-flex items-center gap-2`. The mark is a small square, `size-2 shrink-0 rounded-sm` with `aria-hidden="true"`: `bg-primary` for settled (Paid, Cleared, Approved), `bg-destructive` for failed or late (Overdue, Declined), `bg-muted-foreground` for neutral (Draft, Sent, Scheduled). The word is `text-body text-foreground`. Never show a state by color alone.
- **Inputs:** the shadcn `Input` (`npx shadcn@latest add input`) with `className="px-2 text-body md:text-body"`, its stock height and corner; `px-2` puts its text on the same line as the text of a `Select` above or below. In `components/ui/input.tsx`, replace `bg-transparent` and `dark:bg-input/30` with `bg-card`, to match the selects; `file:bg-transparent` and the `disabled:` fills stay. An amount field is also `font-mono tabular-nums text-right`. A field is a `flex flex-col gap-3`: a visible `<label>` with `block`, styled as a label and tied to the field with `htmlFor`; then a stack with `gap-2` holding the field, any helper text (a small figure) and the error line when there is one. A field that has neither helper text nor an error line needs no stack: it follows its label directly. Name the helper text in the field's `aria-describedby`.
- **Selects:** a choice from a list is the shadcn `Select`; add it with `npx shadcn@latest add select`. Never a native `<select>`: the browser draws that one and its open list, and no control here keeps the browser's look. Write `<Select items={…} value={…} onValueChange={…}>` around `<SelectTrigger><SelectValue /></SelectTrigger>` and a `<SelectContent>` that holds one `<SelectItem value="…">` per choice directly, with no `SelectGroup`. `items` is the list of the choices as `{ value, label }`: without it the trigger shows the value, not the label. `onValueChange` gets the new value, not an event, and its type allows `null`: ignore a `null`. A select with nothing chosen yet has the value `null` and `<SelectValue placeholder="…" />`, which the trigger shows in `text-muted-foreground`; the placeholder is not a row of the list. The trigger fills its parent: set a width on an element around it, not on the trigger. Same label and stack as any field: the `<label>`'s `htmlFor` is the `id` on the `SelectTrigger`, which also takes the field's `aria-describedby` and `aria-invalid`, and the focus when code moves it to the field. Where the Errors note says a field changes, a select changes in `onValueChange`. Edit `components/ui/select.tsx`, once, changing the classes in the file, so that the trigger looks like an `Input` and the open list is the theme's:
  - `SelectTrigger`: replace `w-fit` with `w-full`, `bg-transparent` with `bg-card`, its two stock gaps (its own and the one in `*:data-[slot=select-value]:`) with `gap-2`, its stock paddings (the vertical one and the two side paddings after it) with `pr-1 pl-2`, its small text size with `text-body`, its `focus-visible:ring-*` classes with the outline classes of the Focus rule, and its `aria-invalid:ring-*` classes, the `dark:` one included, with `aria-invalid:ring-0`; delete `dark:bg-input/30` and `dark:hover:bg-input/50`, so that the fill is the sheet's white in both modes, as on an `Input`. Give the `ChevronDownIcon` in it `strokeWidth={1.5}`. `pr-1` is meant: the chevron is drawn 4px inside its 16px box, so its tip ends 8px from the border, as far as the text starts from the left one.
  - `SelectContent`: change the default `align = "center"` to `align = "start"` and `alignItemWithTrigger = true` to `alignItemWithTrigger = false`, so that the list opens under the trigger, not over it. On the popup, replace `w-(--anchor-width) min-w-36` with `max-w-(--available-width) min-w-(--anchor-width)`, which makes the list as wide as its trigger and wider only where a choice needs it, and replace `shadow-md ring-1 ring-foreground/10` with `border border-border shadow-sm`: a solid 1px rule, and the one short shadow `DESIGN.md` gives what floats. Its `rounded-lg` and `bg-popover` stay, and it gets no padding: the rows run from edge to edge.
  - `SelectItem`: replace its stock gap with `gap-2`, its left padding with `pl-2`, its right padding with `pr-6`, a step of the scale that still clears the check, and its small text size with `text-body` (`py-1` stays); delete `rounded-md` and the one class that starts with `not-data-[variant=destructive]:focus:`; add `border-border not-first:border-t`, a 1px rule between rows, as in a sheet with rows; on the `<span>` around the `CheckIcon`, replace `right-2` with `right-1`; give the `CheckIcon` `strokeWidth={1.5}`. A row is then as tall as the trigger, with its text under the trigger's text. The row under the pointer or the arrow keys keeps the stock grey fill (`focus:bg-accent`); the chosen row has a check under the trigger's chevron, in the text color, not green: green means money in.
- **Errors:** an error line is `flex items-start gap-2 font-mono text-label text-destructive`, not uppercased, holding the `CircleAlert` icon (`shrink-0`; it is about as tall as the line, 16px against 15.6px, so `items-start` lines it up) and a sentence that says what to do. The field gets `aria-invalid` and names the line in its `aria-describedby`. Fields are checked in code on submit, with `noValidate` on the `<form>`; focus moves to the first field with an error. An error line is removed when its own field changes (on `input` or `change`); an error that depends on a second field is also removed when that field changes. Every other error stays until the next submit.
- **Confirmations:** a message after an action goes into a `role="status"` element that is on the page from the start, empty, or it may not be announced. It is never hidden, has no classes that draw or take space, and is never an item of a `gap-*` stack or row: put it in a plain `<div>` with the element above it. The message inside it, rendered only when there is one, carries the look and the space, such as `mt-3`. Buttons or links that follow a message sit after the status element in that `<div>`, not inside it, with their own top margin. Where a message replaces a form, the form and the status element share that `<div>`. Where the message replaces the control that had focus, give its first element `tabIndex={-1}` and move focus to it.
- **Tables:** the shadcn `Table` (`npx shadcn@latest add table`) with `text-body`. Header cells are labels in `text-muted-foreground`, keep their stock `h-10` and `whitespace-nowrap` (so a header is one short line) and get `px-4`. Body and footer cells get `px-4 py-2`; in a sheet with rows the first and last cell of every row, header and footer rows included, also get `first:pl-6 last:pr-6`. Cells that hold a sentence get `whitespace-normal`. Body rows keep their 1px borders and the stock `TableRow` hover fill, also where a row does nothing. No `<caption>`, which would scroll away: the table's visible name is the heading above its box (the sheet's heading row or the section's `<h2>`), and the `label` prop repeats its words; where the page brief gives a table no heading, the `label` alone names it. A wide table scrolls sideways in its own box: edit `components/ui/table.tsx` to give its scroll box `tabIndex={0}`, `role="region"`, an `aria-label` from a required `label` prop, and the Focus rule's outline drawn inside, since the sheet with rows around it clips: its classes with `focus-visible:-outline-offset-2` in place of `focus-visible:outline-offset-2`. A brief whose table is not in a sheet with rows says otherwise.
- **Totals:** a total row sits in a `<tfoot>`. The stock `TableFooter` ships a fill and `font-medium`: give it `bg-transparent font-normal`, and each of its `TableRow`s `hover:bg-transparent`. The total row's cells (not the `<tr>`) get `border-t-4 border-double border-foreground`. Its label and amounts are `font-heading text-h2 tabular-nums`.
- **Icons:** from `lucide-react`, with `size-4` and `strokeWidth={1.5}`, only where the page brief or these notes name one, with `aria-hidden="true"` beside a word. Never emoji.
- **Charts:** drawn with plain elements, with square corners. Money in is `bg-primary` and money out `bg-destructive`, always in that order, with a legend in words; grid lines are 1px `border-border`; axis values are small figures. The drawing has `aria-hidden="true"`, and every chart has a text alternative that gives the numbers.
- **Corners:** `rounded-sm` (2px) for badges and status marks, `rounded-lg` (3px, what they ship with) for buttons, inputs, selects and the lists and popups they open, `rounded-xl` (6px) for sheets. No full rounds and no pills.
- **Surfaces:** flat. No shadows, blur or gradients in the code you write. Only what floats over the page, the open list of a `Select` and a popup, has a shadow: the `shadow-sm` its note gives it, with a 1px border.
- **Menus on small screens:** below `md` the nav links go behind a "Menu" button (`variant="outline"`, `md:hidden`) with `aria-expanded` and `aria-controls`, at the right end of the header's row (`ml-auto`). It opens a second `<nav>` under the row, inside the `<header>`: it has `md:hidden`, the `hidden` attribute while closed, the `id` that `aria-controls` names and a full-width 1px top border; in its container, a `<ul>` with `py-2`, each link a block with `py-2`. Do not use a `Sheet` or a `Dialog`.
- **Motion:** only colors transition in the code you write; stock components keep their motion.

## Rules

- **Colors:** only the theme's colors, through the semantic classes (`bg-background`, `text-foreground`, `bg-card`, `bg-primary`, `text-primary-foreground`, `text-muted-foreground`, `border-border` and so on). No hex, rgb or named colors in components, and no Tailwind palette classes such as `bg-blue-500` or `text-gray-600`.
- **Spacing:** padding, margin and gap use only the scale's steps (`1`, `2`, `3`, `4`, `6`, `12`) plus 0, 1px and 2px. No arbitrary values such as `p-[18px]`, and no other steps such as `p-5` or `gap-10`. `auto` margins are fine. Widths and heights such as `w-64` or `size-4` are sizes, not spacing. This applies to the code you write: a stock component keeps the spacing inside it, unless the page brief changes it. That includes the stock `gap-1.5` between a `Button`'s icon and its words: leave it, and add no gap class to the button.
- **Type:** every piece of text you write gets its size from one of `text-display`, `text-h1`, `text-h2`, `text-body`, `text-label`, set on the element or on a parent it inherits from. Put `text-body` on the outermost element of the page you write. No other sizes. A stock shadcn component keeps the size it ships with, unless `DESIGN.md` or the page brief gives that component its own style. A type class does not replace a weight class: where a stock component ships `font-medium` and the text should be regular, add `font-normal`. Text that `uppercase` sets in capitals is written in normal case in the code, also where the page brief shows it in capitals, so a screen reader does not spell it out.
- **Fonts:** only the theme's fonts, through `font-sans`, `font-heading` and `font-mono`. Do not add a font.
- **Corners:** only the `rounded-*` classes, which the theme already sets. No arbitrary radius in the code you write; a stock component's own corner classes stay. This theme has no full rounds: do not use `rounded-full`, and give a small mark a corner under half its height or none, because a box whose corner is half its height or more is a full round however it is written.
- **Contrast:** all text meets WCAG AA against its background.
- **Stock components:** a component from `components/ui`, and an `<a>` styled with `buttonVariants`, keeps the hover, pressed and disabled colors and the motion it ships with, unless the page brief changes them, also where the layout notes give links a transition. They are the theme's colors under other names. The same holds for every other stock class that neither the notes nor the page brief name, also in a file you edit: it stays. Examples are `TableHead`'s `h-10`, `font-medium` and `whitespace-nowrap`, a `Badge`'s `gap-1` and `whitespace-nowrap`, and the `group-has-[:focus-visible]/field-label:` classes, which only act inside a shadcn `Field`. A `Button` that a stock component renders inside itself, such as the `CalendarDayButton`'s `size="icon"`, keeps its variant and size: what the notes say about button sizes is for buttons you write. Classes the notes give a stock component go in its `className` where you use it, unless they say to change its file. `TableCell`'s stock `p-2` then stays beside the `px-*` and `py-*` you pass, which is fine: those win.
- **Link transitions:** where the layout notes give every link a transition, that includes a link whose color does not change on hover, such as the name in the header: there the class does nothing, which is fine.
- **Forms:** a typed value is trimmed at both ends before it is checked and before the page shows it back (in a confirmation, a list or a summary), so a field of spaces is empty. The field itself keeps what was typed. A field's error line comes after its helper text, and its `aria-describedby` names the helper text first. A group of choices with an error (radios, checkboxes, toggle buttons) names its error line in its own `aria-describedby`, unless the page brief ties the error line to each control in it. A group that only holds fields does not: each field names its own. A radio group takes `aria-invalid` on its `RadioGroup` and a set of checkboxes on each `Checkbox`. A `<fieldset>` and a `role="group"` do not take it, so a group of toggle buttons has none.
- **Long words:** every email address and URL, the page's own included, and any name the visitor typed that the page shows back, gets `wrap-break-word` on its element or on the paragraph that holds it. One long word can run out of its box or push it wider, also in a narrow column on a wide screen. A flex item, and an item of a grid with no `grid-cols-*` class at that width, is never narrower than its longest word or its widest scroll box, so neither the class nor a scroll box keeps it in: give such an item `min-w-0`, or give the grid `grid-cols-1` below its breakpoint (`grid grid-cols-1 md:grid-cols-12`).
- **Grid columns:** an item placed in "columns 9–12" gets a span and a start at the grid's breakpoint (`md:col-span-4 md:col-start-9` where it is `md`). Write the start whenever the item does not begin right after the one before it.
- **Lists:** a list "with no markers and no padding" needs no class for it: Tailwind's base styles already remove both.
- **Dates and figures:** where the layout notes and the page brief leave a case open, a `<time>` wraps only the date or the time, not the words around it. A date or a time inside a sentence then gets no `<time>`, and nor does a copyright year. That is about the element only: whether the figure takes `tabular-nums` is a separate question. Where they leave open whether a figure in a label line, a row or a table cell takes `tabular-nums`, add it: it changes only the width of digits. Figures in running text need none. Where they ask for it but not on which element, put it on the element that holds the whole figure or label line, so that it covers every figure in it; a `<time>` inside inherits it. For a time inside a sentence, that is the `<time>` itself, not the paragraph.
- **Menus on small screens:** where the layout notes put the nav links behind a "Menu" button that opens a second `<nav>` in the header, the button is hidden from the notes' breakpoint up (`md:hidden` for `md`). Escape closes the menu while focus is on the button or in the menu, through one `onKeyDown` on the `<header>` that acts only while the menu is open, and focus then goes to the button. The second `<nav>` marks the current page's link the way the row does. It shares the row's `aria-label`, which is right, because one of the two is always hidden.
- **Counts:** a number with a noun reads right at one: "1 set", not "1 sets". Where the page brief gives the words for only one of the two, write the other the same way.
- **Sizes from data:** a height or a width that comes from data (a chart bar, a meter) is set with an inline `style`. That is the one use for an inline style.
- **Focus:** every link and control shows a 2px outline on keyboard focus: `focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring`. Where a class list that the layout notes or the page brief spell out for a link, a nav link or a table's scroll box lacks them, add them to it. Keep `focus-visible:outline-solid` in it: in Tailwind 4 an `outline-none` on the same element, which stock components carry, otherwise hides the outline. An element that only gets focus from code (a heading or a message with `tabIndex={-1}`) gets the same outline written with `focus:` in place of `focus-visible:` (`focus:outline-solid focus:outline-2 focus:outline-offset-2 focus:outline-ring`): after a mouse click, a browser does not match `:focus-visible` on an element that code focuses. A link, a button or a field that code focuses keeps the `focus-visible:` classes it has: after a mouse click it shows no outline, which is how a browser treats every control, and is right. A stock component that ships its own focus ring (`Button`, `buttonVariants`, `Input`, `Textarea`, `Checkbox`, `Switch`, `RadioGroupItem`, `SelectTrigger`, the day buttons of a `Calendar`, `AccordionTrigger`, the close button of a `Sheet`) must lose that ring. Do it once, in the component's file in `components/ui`, which is yours to change: replace its `focus-visible:ring-*` classes with the outline classes, and in a field (an `Input`, a `Textarea`, a `SelectTrigger`, a `Checkbox`, a `Switch` or a `RadioGroupItem`) replace its `aria-invalid:ring-*` classes, the `dark:` ones included, with `aria-invalid:ring-0`, or a field with an error shows a tinted ring. `Button` has two more sets. Its base classes also carry `aria-invalid:ring-*` classes, the `dark:` one included: replace them with one `aria-invalid:ring-0`, as in a field. Its `aria-invalid:border-destructive` and `dark:aria-invalid:border-destructive/50` are borders and stay: what the notes say about a field's border classes is for fields. Its `destructive` variant carries `focus-visible:ring-*` classes of its own, the `dark:` one included: delete them and put nothing in their place, because the base classes already give every variant the outline. That variant's `focus-visible:border-destructive/40` is a border and stays. Wherever this rule says replace, change the classes in the file and do not add `ring-0` beside them: an added class only wins where it comes later and passes through `cn`. The stock `focus-visible:border-ring` can stay. These ring changes go only into the files of components that this page uses and that can take focus on it: a `Badge` that is not a link keeps its ring classes. So does `button.tsx` on a page with no `Button` and no `buttonVariants` link. Its other edits still follow the notes: a hover change they make "on every page" is made here too, and the `cn` import from the setup steps goes into every file. A box that scrolls sideways (a code block, a wide table) gets `tabIndex={0}`, `role="region"`, an `aria-label` and the same outline, also at widths where it happens to fit. Where a focusable box touches the edges of a parent that has `overflow-hidden`, draw its outline inside it: `focus-visible:-outline-offset-2` in place of `focus-visible:outline-offset-2`.
- **Controls:** no control keeps the browser's own look, at rest or open. A choice from a list is the project's `Select`, never a native `<select>`, whose arrow and open list the browser draws. A date is picked from the project's `Calendar` in a `Popover`, never an `<input type="date">`. A checkbox, a radio button and a switch are the project's `Checkbox`, `RadioGroup` and `Switch`, never a bare `<input>`. Add a missing one with `npx shadcn@latest add <name>`. The theme's layout notes say how it styles each one. For one they do not cover, make it match the theme's `Input`: the same height, corner, border, fill, text size and focus outline, with its icon as far from the right edge as the text is from the left, and a popup on the theme's surface with a 1px `border-border`, the theme's corner and text in the type scale. Leave no stock text size, glow ring or translucent ring on it. Every `Textarea` gets `resize-none` as well as the classes the notes give it, so the browser draws no grip in its corner. The stock one grows with its text (`field-sizing-content`), and one the page brief sizes (`field-sizing-fixed` with `rows`) keeps that size. A field that searches or filters is an `Input` with `type="search"`, which tells a screen reader it is a search box. It also gets `[&::-webkit-search-cancel-button]:appearance-none`, which hides the clear button a browser draws in it. A `Select` takes its name from its visible label in two ways: the `<label>` has the `SelectTrigger`'s `id` as its `htmlFor` (the trigger is a `<button>`, so a click on the label reaches it), and the trigger has `aria-labelledby` with the label's `id`. Base UI links only its own `Select.Label`, which `select.tsx` does not wrap (its `SelectLabel` heads a group in the open list). A date field you write as a component takes a `ref` and passes it to its trigger, so code can focus it. The stock `CalendarDayButton` makes a `ref` and never attaches it, so add `ref={ref}` to its `<Button>`, or the arrow keys move nothing. End its classes with a `dark:data-[selected-single=true]:hover:` copy of the chosen day's fill and text classes (`dark:data-[selected-single=true]:hover:bg-primary dark:data-[selected-single=true]:hover:text-primary-foreground` for the stock ones): a `hover:` class loses to the chosen day's stock `data-[selected-single=true]:` classes, but a `dark:hover:` one beats them.
- **Not allowed:** purple or multi-color gradients; emoji used as icons or bullets; glows and colored shadows.
- **Avoid:** a card inside a card.
- **Dark mode:** the page must work with the `dark` class on `<html>`. Because every color comes from a semantic class, this needs no extra code; do not write `dark:` color overrides. A new shadcn project follows the system's mode and switches on the `d` key: leave that as it is, and add no mode switch of your own.

From the theme's own do's and don'ts:

- Do right-align amounts and use tabular figures.
- Do show a negative amount with a minus sign and a word, not by color alone.
- Do keep the serif in its one weight and let size set the hierarchy.
- Don't use green and red as decoration: here they mean in and out.
- Don't use gradients, glows or rounded pills.
- Don't introduce a color, size or radius that is not a token above.

## Page briefs

Ledger has a full brief for each of these pages: sections, layout, sample content and checks. When the user asks for one of them, fetch its brief and follow it. Where a brief and the notes above differ, the brief wins.

- **Overview:** the overview screen of a small-business banking and invoicing product, with account balances, money in and out for the month, the things that wait on the user and recent transactions. https://strictthemes.com/themes/ledger/prompts/overview.md
- **Transactions:** a statement of a business's transactions, with search, an account filter and an in/out filter, a total row that follows the filters, paging and an empty state. https://strictthemes.com/themes/ledger/prompts/transactions.md
- **Invoice:** one invoice set as a document on a white sheet, with who it is from and to, its number and dates, line items with subtotal, tax and total, its state, payment details and a way to mark it as paid. https://strictthemes.com/themes/ledger/prompts/invoice.md
- **Payment:** a form to send a payment from a business account, with checks on every field, a review step that states the amount in words, and a confirmation that says nothing was sent. https://strictthemes.com/themes/ledger/prompts/transfer.md
- **Report:** a yearly report on a small business's money, made for reading, with three very large figures, a short commentary, a table of the year by quarter and notes. https://strictthemes.com/themes/ledger/prompts/report.md

## Check before you finish

Build the project, then measure it against the theme with Strict Check:

```bash
npx @strictthemes/check --dist dist
```

`dist` is the folder the build wrote. Add `--path /pricing` for each page you touched other than `/`. Fix every error it lists by using a value the theme allows, and run it again until the last line starts with `Passed`. Do not mark code `strict-ignore` to get there.

Then tell the user what you built, what the check reported, and anything you could not verify.
