Design system · Safety-Net AI

Civil

A design system for software that decides things about people's lives. It is built on the conviction that in public-benefits tools, clarity is a safety feature and a citation carries weight.

In the lineage of the U.S. Web Design System, refined past what a government site would ship.

Principles

Four convictions decide every token and component below. They come before the rules, because the rules are downstream of them.

Clarity is a safety feature

A misread notice can cost someone their benefits. Here legibility is harm reduction.

Provenance over polish

Every figure shows where it came from: a document, a rule, or an unverified claim. Sourcing is a first-class visual element.

Restraint

One accent, real whitespace, no decoration that performs rigor it does not carry. If a metric does not vary, it does not earn pixels.

Accessible by default

AA contrast, visible focus, and never color alone. Inherited from the canon, kept non-negotiable.

Why a derivative of USWDS

The U.S. Web Design System is the most battle-tested civic design language there is: accessible, plain, and trusted. Civil keeps what makes it trustworthy and refines what makes it feel like a form from 2015. Every change stays within the idiom. A government team could adopt Civil without leaving the hymnal.

DecisionUSWDSCivilWhy
Display typeMerriweather, rarely used wellSource Serif 4 for displayA serif used with intent signals editorial care; the Source super-family stays cohesive with the body sans.
Primary colorSaturated federal blueEvergreen #1F6F5CCalmer and more humane than institutional blue, still unmistakably civic.
CanvasWhite / cool grayWarm paper #FBFAF8Softer, less clinical; easier for long case review.
Type scaleBroad, utilitarianTighter ~1.2 scaleMore refined hierarchy; less shouting.
DensityForm-firstContent-firstOptimized for reading a determination, where a form layout would waste the space.

Typography

Source Sans 3 for everything you operate, Source Serif 4 for the things you read, Roboto Mono for the things you cite. The serif is the elevation: government interfaces almost never trust a serif, and used only for display it reads as care.

serif · displayEligibility, made legible
sans · text-lg 17The agent recommends; a caseworker decides.
sans · text-md 15Net monthly income is at or below the limit for a household of two.
mono · figurescase-021 · 7 CFR 273.9(a)(2) · $1,763

Color

Tokens are roles rather than paint: primary, ink, base, the warm accents, and the state colors. Color always carries meaning (success, caution, error) and never decorates. Every pairing clears AA contrast.

Theme roles

ink#14181F
primary#1F6F5C
primary-darker#143F35
primary-lighter#E4F0EC
accent-cool#356A82
accent-warm#A86F2C
base-lightest#F4F2EC
paper#FBFAF8

State

info#2E647F
success#1F6F5C
warning#8A5314
error#963232

Space: 8px base

s-1 · 8
s-2 · 16
s-3 · 24
s-4 · 32
s-6 · 48

Components

Civil keeps the four components that carry civic interfaces, each with a clear job and a clear edge.

Summary box

The headline outcome of a page, set apart. Use it for the one thing a reader must take away, here the recommendation and its reason.

Routed to human review: one document conflicts with the stated application. The agent does not decide; a caseworker will.
Do use one per view, at the top, for the decisive takeaway.
Avoid stacking several. If everything is summarized, nothing is.

Alert

A state that needs attention, in four meanings. The left bar and icon carry the meaning so it never rests on color alone.

Screening only. This is not a determination.
Eligible on stated income.
Income claimed but unverified, routed to human review.
Malformed application, cannot screen.
Do match the state to real severity; reserve error for blocking failures.
Avoid warning-by-default; an alert that is always on is ignored.

Tag

A small label for provenance, citations, and categories. Mono tags read as artifacts you can trust and trace.

Lease BEM 213 unverified
Do use a tag to show where a value came from.
Avoid tags as decoration with no referent.

Step indicator

Progress through a defined process, with the meaningful step emphasized. Here it makes the agent pipeline (and its deterministic boundary) visible.

1ingest 2extract 3screen 4route
Do emphasize the step that matters most to the reader.
Avoid using it for steps the user cannot see or affect.

Buttons

One filled primary for the main action, an outline default for the rest. At most one primary per view.

Using Civil

The system is a set of CSS custom properties (the tokens) plus component classes. Build with the tokens, never raw hex, so a palette or scale change is one edit. Reference the role rather than the value:

.recommendation {
  color: var(--ink);
  background: var(--surface);
  border-left: 3px solid var(--primary);
  padding: var(--s-2);
  border-radius: var(--radius-md);
}

Civil is implemented end-to-end in this caseworker app (web/static/styles.css) and documented in DESIGN_SYSTEM.md. The portfolio's other tools carry the same type and palette for family resemblance; the full component system lives here, where a hand-built front-end can express it.