---
name: strict-theme-civic
description: "Build UI in the Civic theme from strictthemes.com. A plain, trustworthy theme for public services and health. WCAG AAA contrast, large type, and nothing left to guess. Use it when the project's DESIGN.md is Civic, or when the user asks for the Civic theme. It installs the theme into a shadcn project, gives its layout rules and its page briefs (service start page, form question page, check answers page, confirmation page and guidance page), and checks the result with Strict Check."
---

# Civic

A plain, trustworthy theme for public services and health. WCAG AAA contrast, large type, and nothing left to guess.

This skill is for building UI in the Civic 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 Civic variables in its global CSS. If not, run `npx shadcn@latest add https://strictthemes.com/r/civic.json` and save https://strictthemes.com/themes/civic/DESIGN.md as `DESIGN.md` in the project root. In a project without shadcn, use https://strictthemes.com/themes/civic/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:** Public Sans for headings, Atkinson Hyperlegible Next for body text, Atkinson Hyperlegible Mono for labels and code.
- **Type scale** (size/weight; each class also sets line height and tracking): `text-display` 48px/800, `text-h1` 34px/700, `text-h2` 24px/700, `text-body` 18px/400, `text-label` 16px/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`), 16px (`4`), 24px (`6`), 40px (`10`), 64px (`16`).
- **Corners:** `rounded-sm` 3px, `rounded-md` 5px, `rounded-xl` 8px (the `lg` corner in `DESIGN.md`). `rounded-lg` is 5px as well: it is shadcn's name for the base corner, the one its stock buttons and inputs use.
- **Colors (light mode):** primary #0B3D91, on-primary #FFFFFF, secondary #0B1320, on-secondary #FFFFFF, tertiary #FFD400, on-tertiary #0B1320, neutral #414B5A, background #FFFFFF, surface #F2F5F9, foreground #0B1320, border #7B8696, error #A30F0F, success #0B5F33.

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 Civic pages are laid out

- **Container:** one column for everything a person reads or fills in: `mx-auto max-w-[720px] px-4 md:px-6`. This width is the one arbitrary value allowed. The header's row, `<main>` and the footer's row each sit in their own copy of this container, and no content is wider: only the header's border and the footer's border and fill run the full width.
- **Page structure:** the page's outermost element has `bg-background text-body text-foreground`. Inside it, in this order: the skip link, the `<header>`, a `<main>` with the `id` `main`, and the `<footer>`. `<main>` is the container with `pt-10 pb-16`. The page's `<title>` is the `<h1>`'s words, then " – Apply for a resident's parking permit – Callowmere Council", unless the page brief gives another.
- **Voice:** the copy speaks for the council as "we" and to the reader as "you" ("We will email you"). "Callowmere Council" is written out only as a name: in the header, an address, the footer and the `<title>`.
- **Skip link:** the first element on the page is an `<a href="#main">` "Skip to main content" with `sr-only focus-visible:not-sr-only focus-visible:block focus-visible:px-4 focus-visible:py-2 text-primary underline underline-offset-4`, so it shows only when it has focus, in the `text-body` of the page's outermost element.
- **Header:** a `<header>` that runs the full width with `border-b border-border`. Inside it, one container `<div>` is itself the row: the container classes plus `flex flex-wrap items-baseline gap-x-6 gap-y-1 py-4`. It holds the council's name, a link to `/` in `font-heading text-h2 text-foreground no-underline hover:underline underline-offset-4`, and the service's name, a link to `#` in `text-body font-bold text-foreground no-underline hover:underline underline-offset-4`. These are its only two links, in this order, and neither is marked as the current page (no `aria-current`). On a phone the service name wraps under the council's name. There is no nav, no "Menu" button and no logo.
- **Footer:** a `<footer>` that runs the full width with `border-t border-border bg-card`. Inside it, one container `<div>` with `py-10` holds a `<nav>` with the `aria-label` "Footer"; the `<ul>` in the nav has `flex flex-wrap gap-x-6` and holds four links (Accessibility, Privacy, Cookies, Contact the council), each a link of the Link lists note; the row's `gap-x-6` is the only space between them. Under the nav, with `mt-6`, a `<p>` in `text-muted-foreground` with the postal address "Callowmere Council, Guildhall, Market Street, Callowmere CM1 1AA", and with `mt-2` another, also muted, with `© Callowmere Council 2026`.
- **Vertical rhythm:** written as a top margin on each element, never as `space-y-*` and never as `gap-*` on a column of content (a flex row's `gap` is fine). Keep the column in normal block flow, not flex or grid. The first element in `<main>`, and the first element inside a box, has no top margin. Then:
  - Text that follows text (a paragraph or a list after a paragraph): `mt-4`.
  - The first text under the `<h1>`: `mt-6`.
  - An `<h2>`: `mt-10`, and the text under it `mt-4`. An `<h3>`: `mt-6`, and the text under it `mt-2`.
  - A box (a box, the notice, the error summary, a summary list, a table) after text, and text after a box: `mt-6`. An `<h2>` after a box keeps its `mt-10`.
  - A form after the text above it: `mt-10`. Inside a form, each field, and each fieldset, sits in a wrapper `<div>` with `mt-6`, except the first. The row of buttons that ends a form has `mt-10`.
  - A main action on its own (a "Start now" link) sits in a `<p>` with `mt-10`.
  - A part the page brief calls a new part is a `<section>` (or the element the page brief names) with `mt-16` and `aria-labelledby` naming the `<h2>` that opens it, which has no top margin.
  - Where the page brief gives an element its own top margin, it replaces the one from this list. Nothing has a bottom margin: the next element's top margin is the gap.
- **Caption over the `<h1>`:** where the page brief gives one (a step number, a page type), it is a `<p>` in `font-mono text-label text-muted-foreground`, and the `<h1>` under it has `mt-2`.
- **Headings:** the `<h1>` is `text-h1`, and `text-display` from `md` up only where the page brief says so. An `<h2>` is `text-h2`. An `<h3>` is `text-body font-bold`. Sentence case. Only `<h1>` to `<h6>` get the heading font on their own: any other element given `text-h1` or `text-h2` (an amount, a reference number) needs its font class written out, `font-heading` or the `font-mono` the page brief names.
- **Labels:** captions, dates that stand on their own, reference numbers and button text are labels: `font-mono text-label`, sentence case, never uppercased. A label may be a fragment or a short sentence. A field's `<label>` and a `<legend>` are not labels: see Fields.
- **Text color:** headings, body text, field labels, legends and values are `text-foreground`. Hints, captions and dates under a heading are `text-muted-foreground`. Muted text only sits on `bg-background` or `bg-card`, never on `bg-muted`, `bg-tertiary`, `bg-primary` or `bg-secondary`. Running text is never muted. Every text and background pair these notes and the briefs allow meets AAA in both modes, so no pair needs measuring; a pair they do not name is not allowed.
- **Links:** a text link is `text-primary underline underline-offset-4 hover:text-foreground transition-colors duration-150` and inherits its size. A link's words say where it goes without the sentence around it, never "click here". A full stop or comma after a link sits outside it. A link whose destination the page brief does not name goes to `#`. The class lists in these notes and briefs (the skip link, the header's links, the Back link, text links, link lists) leave out the focus outline: add the outline classes from the rules to every one of them.
- **Link lists:** a list of links that stand on their own (contents, related links, the footer) is a `<ul>` with no markers and no padding. Each link is a text link (the Links note's classes) plus `inline-block py-2`, which makes it 44px tall, and the items have no margin between them.
- **Buttons:** the shadcn `Button` with `className="h-11 w-full px-6 font-mono text-label md:w-auto"`. Every button and field gets `h-11` (44px; stock ones are 32px). Button text is sentence case and says what happens ("Save and continue"), never "Submit" or "OK" alone. The default variant (civic blue) is the page's one main action. Any other button is `variant="secondary"` (blue-black ink). Never use the `destructive`, `ghost` or `link` variant. A button that sends a form needs `type="submit"`: this `Button` is `type="button"` unless told otherwise. A call to action that goes to another page is an `<a>` with the same classes: write `cn(buttonVariants({ variant }), "…")`, because `buttonVariants` alone does not merge classes. An `ArrowRight` icon goes after the words; any other icon goes before them. A button keeps the stock `whitespace-nowrap` and `justify-center`: every label here fits on one line in its box at 375px, and a button that fills the column has its words in the middle.
- **Button hovers:** in `components/ui/button.tsx`, change the default variant's `hover:bg-primary/80`, which leaves its text under 7:1, to `hover:bg-primary/90`; and replace the secondary variant's `hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]`, which cannot be told from its resting color here, with `hover:bg-secondary/80`. Make these changes on every page, also one with no `secondary` button. Change each class in the file, once, not by adding a class beside it, so the links styled with `buttonVariants` get it too.
- **No disabled buttons:** no button on these pages is ever disabled. Pressing it checks the form and says what is missing.
- **Fields:** every field is a wrapper `<div>` holding, in this order:
  - A `<label>` with `block` and `htmlFor`, in `text-body font-bold text-foreground`: the question, in sentence case, with no colon.
  - Where the page brief gives one, a hint with `mt-1`: a `<p>` in `text-muted-foreground` with an `id`.
  - Where there is an error, the error line with `mt-2`.
  - The control with `mt-2`. Its `aria-describedby` names the hint and, while there is one, the error line.
  - While it has an error, the wrapper also gets `border-l-4 border-destructive pl-4` (for a fieldset, the wrapper `<div>` around it, never the `<fieldset>` itself).
- **Inputs:** the shadcn `Input` with `className="block h-11 px-2 text-body md:text-body"`, plus the width the page brief gives: a field for a short value is about as wide as the value. `block` keeps the line box of an inline control from adding space under it; `px-2` replaces its stock side padding, which is not a step of the spacing scale. They keep the border and the fill they ship with, in dark mode too. No placeholders, as a label, a hint or an example. Set `autoComplete` to the right token, or to `off` where there is none, and `spellCheck={false}` on codes and registration numbers.
- **Fieldsets:** a group of controls that answer one question (radios, a date in three fields) is a `<fieldset>` with `m-0 min-w-0 border-0 p-0` (`min-w-0` undoes the browser's minimum width, which can push it past a narrow column), inside its wrapper `<div>`, with a `<legend>` with `p-0` as its first child, in `text-body font-bold text-foreground`. Its hint follows with `mt-1`, then the error line while there is one, with `mt-2`. The fieldset's `aria-describedby` names the hint and the error line. The red line of an error goes on the wrapper, as the Fields note says.
- **Radios:** a choice of one from a few is the shadcn `RadioGroup`; add it with `npx shadcn@latest add radio-group`. Never a native `<input type="radio">`: the browser draws that one, and no control here keeps the browser's look. The group is the fieldset itself: write `<RadioGroup render={<fieldset />} className="m-0 min-w-0 border-0 p-0" name="…" value={…} onValueChange={…}>` with the `<legend>`, the hint and the error line inside it, as the Fieldsets note says. Give it `aria-labelledby` naming the `<legend>`, the fieldset's `aria-describedby` and, while it has an error, `aria-invalid`. It is then one group with one name; a `RadioGroup` inside a `<fieldset>` would be announced twice. `onValueChange` gets the new value, not an event. Each option is a row with `mt-2`, `flex min-h-11 items-center gap-4`, holding a `<RadioGroupItem value="…" id="…" />` and its `<label>` with `htmlFor`, in `text-body`, not bold: it is an answer, not the question. The `id` lands on a hidden input, which takes the label as the name of the visible box and hands focus on to it: a click on the words chooses the option, and `focus()` on the element with that `id` puts focus on the box. Tab reaches the group once; the arrow keys move through the options and choose. Edit `components/ui/radio-group.tsx`, once, changing the classes in the file:
  - `RadioGroup`: delete `grid` and `gap-2`, since each row carries its own top margin.
  - `RadioGroupItem`: replace `size-4` with `size-6` (24px, the size of a checkbox) and `rounded-full` with `rounded-xl`. Nothing in this theme is round, so a radio button is a 24px box with the 8px corner of a box, the roundest shape the theme has, which cannot be taken for a checkbox with its 3px corner. Replace `focus-visible:border-ring` and its `focus-visible:ring-*` classes with the outline classes of the Focus rule, which does not list this component. Replace all its `aria-invalid:` classes, the `dark:` ones and `aria-invalid:aria-checked:border-primary` included, with the one class `in-aria-invalid:border-destructive`, in place of the Focus rule's `aria-invalid:ring-0`: the group takes `aria-invalid`, not its options, and this turns their borders red while it has it. Delete `data-checked:bg-primary`, `data-checked:text-primary-foreground` and `dark:data-checked:bg-primary`, because a filled box with a mark in it is a ticked checkbox. `data-checked:border-primary`, `border-input` and `dark:bg-input/30` stay: the border of an option not chosen is the one an `Input` has, over 3:1 on the page and on a box.
  - The indicator: on `RadioPrimitive.Indicator`, replace `size-4` with `size-6`; on the `<span>` inside it, replace `size-2` with `size-3`, `rounded-full` with `rounded-lg` and `bg-primary-foreground` with `bg-primary`. A chosen option is then an empty box with a civic-blue border and a 12px civic-blue block in its middle, and one not chosen is the empty box: the two differ by the mark, not by color alone.
- **Checkboxes:** the shadcn `Checkbox`, never a native `<input type="checkbox">`. It ships at 16px with a 4px corner: in `components/ui/checkbox.tsx`, change its `size-4` to `size-6` and its `rounded-[4px]` to `rounded-sm`, and make the check icon inside it `size-5`: change the indicator's `[&>svg]:size-3.5` to `[&>svg]:size-5` (where the size sits on the icon instead, change it there). Its row is `flex min-h-11 items-start gap-4`, with `mt-0.5` (2px, an extra value the spacing rule allows) on the checkbox so it lines up with the first line of its label, and the label in `text-body`, not bold. Not ticked, it is an empty box with the border an `Input` has (`border-input`, over 3:1 on the page and on a box); ticked, it is filled civic blue with a check. Its focus ring goes as the Focus rule says.
- **Errors:** an error line is a `<p>` with an `id`, `flex items-start gap-2 text-body font-bold text-destructive`. It holds two children: the `CircleAlert` icon (`mt-1 shrink-0`, `aria-hidden="true"`), and one `<span>` that holds a visually hidden `<span className="sr-only">Error: </span>` followed by a sentence that names the field and says what to do: "Enter your vehicle's registration number", not "This field is required". The field gets `aria-invalid`; the stock `aria-invalid` border stays. Fields are checked in code when the form is sent, with `noValidate` on the `<form>`. An error line, with its field's `aria-invalid` and red line, is removed when its own field changes (on `input` or `change`; for a date, any of its parts); an error that depends on a second field is also removed when that field changes. Every other error, the error summary and the title's prefix stay until the next send. A send with errors also empties the status element, so the page never shows an error and a success message at once.
- **Error summary:** after a form is sent with errors, a box appears before the page's caption: `rounded-xl border-2 border-destructive bg-background p-6`, with `tabIndex={-1}`, `role="group"` and `aria-labelledby` naming its title (a plain `<div>` cannot take a name). Inside it the title, "Your answers need a change": a `<p>` with an `id` in `font-heading text-h2`, not a heading element, so that the page's headings still start at the `<h1>`. Then with `mt-4` a `<ul>` with no markers of one link per error, in page order, each with the same words as its error line and an `href` of `#` and its control's `id`, in `font-bold text-destructive underline underline-offset-4 hover:text-foreground transition-colors duration-150`, `mt-2` between items. It follows the Back link with `mt-6`, and the caption after it keeps its `mt-6`. Focus moves to the box, which shows the outline the rules give an element that only code focuses. A link in it cancels the jump with `preventDefault()` and moves focus to its field in code with `focus({ preventScroll: true })`, then calls `scrollIntoView()` on the field's label (for a fieldset, its `<legend>`, also when focus goes to one of its parts): radios go to their first option, a date to its first wrong part. While the summary is shown, the page's `<title>` starts with "Error: ". Each send checks every field afresh; with nothing wrong, the summary and the prefix go away.
- **Confirmations:** a message that appears after an action goes into an element with `role="status"` that is on the page from the start, empty: one that arrives together with its text is often not announced. It is never hidden (no `hidden` attribute, no `empty:hidden`). The status element has no classes that draw or take space, no margin, and is never an item of a `gap-*` row: the message inside it, a `<p>` in `text-body text-foreground` rendered only while there is a message, carries the margin and the type. Buttons and links stay outside it.
- **Boxes:** a plain element with `rounded-xl border border-border bg-card p-6`. Not the shadcn `Card`. Never a box inside a box.
- **The notice:** at most one per page, only where the page brief asks for it: `rounded-xl bg-tertiary p-6 text-tertiary-foreground`. It opens with a `<p>` with `flex items-start gap-2 font-bold` holding the `TriangleAlert` icon (`mt-1 shrink-0`, `aria-hidden="true"`) and the word "Important", then the message as one `<p>` with `mt-2`. Nothing in it is muted, and nothing in it is a link or can take focus: the link color and the focus outline cannot be read on yellow. `bg-tertiary` is used for nothing else, and `text-tertiary` never.
- **Lists:** a list in running text is `list-disc` or `list-decimal` with `pl-6`, and `mt-2` between its items. The sentence before it ends with a colon. Its items are lower-case fragments that finish that sentence, except where the page brief asks for sentences: then each starts with a capital and ends with a full stop.
- **Dates and amounts:** a date is a `<time>` with a `dateTime`, written in full ("1 December 2026"); a range is two `<time>` elements. "Today" is the sample date the page brief gives, fixed in code, not the device clock, so the page behaves the same on any day. In a sentence it is still a `<time>`, in body text; on its own line it is a label. A date inside an error line, a summary link or a status message is plain text, not a `<time>`. Amounts have the pound sign and no pence ("£96"). Phone numbers are written in groups ("01632 960 418"); a `tel:` link's `href` has the digits with no spaces (`tel:01632960418`).
- **Tables:** the shadcn `Table` with `className="min-w-lg text-body"`, so it scrolls in its box on a phone. Header cells get `h-auto px-4 py-2 whitespace-normal font-bold text-foreground`; body cells `px-4 py-2 align-top whitespace-normal`; the first and last cell of each row `first:pl-0 last:pr-0`, so the table lines up with the text. Rows are divided by 1px borders and do not change on hover: `hover:bg-transparent` on every row, the header row included. No text in a table is muted. Numbers are right-aligned with `text-right tabular-nums`, and their header with `text-right`. Edit `components/ui/table.tsx`: give its scroll box `tabIndex={0}`, `role="region"` and an `aria-label`, and add a required `label` prop for the name. No `<caption>`, which would scroll sideways with the table: an `<h3>` above names it, and the `label` repeats its words.
- **Icons:** from `lucide-react`, only where the page brief or these notes name one, `size-5` with `strokeWidth={2}` unless the page brief gives another size. An icon in a `Button` gets these classes too, in place of the stock `size-4`. Every icon has a word beside it and is `aria-hidden="true"`. No button holds only an icon.
- **Corners:** `rounded-sm` (3px) for checkboxes, `rounded-lg` (5px) for buttons and inputs, `rounded-xl` (8px) for boxes, the notice, the error summary and radio buttons (the block inside a chosen one is `rounded-lg`). No pills and no `rounded-full`: nothing on these pages is round.
- **Surfaces:** flat. No shadows, no blur and no gradients in the code you write.
- **Motion:** in the code you write, the only transition is color. Nothing moves on scroll. Stock components keep the motion they ship with.

## 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`, `4`, `6`, `10`, `16`) plus 0, 1px and 2px. No arbitrary values such as `p-[18px]`, and no other steps such as `p-3` or `gap-5`. `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 AAA 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 keep every text pair at 7:1 or better, in both modes.
- Do put a visible label on every field and a word beside every icon.
- Do say what went wrong and what to do next, in the error itself.
- Don't rely on color, position or shape alone to say something.
- Don't use placeholder text as a label, or light grey text for anything.
- Don't introduce a color, size or radius that is not a token above.

## Page briefs

Civic 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.

- **Start page:** the start page of a public service, saying what it is for, who can use it, what you need, how long it takes, a "Start now" link and other ways to apply. https://strictthemes.com/themes/civic/prompts/start.md
- **Question page:** one step of a public-service form, with a few related questions, hints under the labels, a date in three fields, an error summary that links to each field, and a Back link. https://strictthemes.com/themes/civic/prompts/question.md
- **Check answers:** the last step of a public-service form, listing the answers so far with a link to change each one, the price, a declaration to tick and the button that sends the application. https://strictthemes.com/themes/civic/prompts/review.md
- **Confirmation:** the page a person sees after sending a public-service application, with a reference number they can copy, what happens next with dates, how to get help and a link to give feedback. https://strictthemes.com/themes/civic/prompts/confirmation.md
- **Guidance:** a page of plain-language guidance for a public service, with a contents list, short sections, a list, a table of fees, one important notice and related links. https://strictthemes.com/themes/civic/prompts/guidance.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.
