Foundations

Tokens

Semantic roles and portable CSS defaults for color, spacing, borders, focus, status, risk, disabled states, and receipts.

Families
8

color, type, spacing, radius, density, elevation, motion, semantic

Roles
9

Named by meaning, not raw values.

Current scope
roles + CSS

Portable values ship as CSS custom properties.

Appearance
system

Follows system preference; no visible toggle by default.

Usage

Use token roles to describe what a visual choice is doing: separating a surface, marking focus, showing status, identifying risk, or recording completion. The CSS custom properties below are portable defaults for generated interfaces. Repo-approved design systems can replace them only through a complete design_system_adapter selected by the implementation contract; incomplete adapters fail instead of falling back to these defaults.

Appearance

JudgmentKit provides light and dark values. The default is system-detected: generated surfaces should follow the user's operating-system or browser color-scheme preference. Do not add a visible appearance toggle unless the activity specifically needs a persistent preference.

  • Use light values as the default token map.
  • Use dark values inside the system color-scheme media query.
  • Keep appearance controls out of the UI unless they support the activity.

Values

The role-first layer exists because agents need to choose visual intent before choosing a brand palette. The values make that intent renderable and reviewable without pretending this is a full component library.

:root {
  color-scheme: light dark;
  --jk-color-canvas: #f8f7f2;
  --jk-color-surface: #ffffff;
  --jk-color-text: #171717;
  --jk-color-muted: #61615c;
  --jk-color-border: #d7d3c8;
  --jk-color-focus: #245f73;
  --jk-color-success: #2e6b48;
  --jk-color-warning: #8a5a16;
  --jk-color-risk: #8f342f;
  --jk-color-disabled: #8a8f93;
  --jk-color-receipt: #23615f;
  --jk-space-2: 0.5rem;
  --jk-space-3: 0.75rem;
  --jk-space-4: 1rem;
  --jk-radius-control: 4px;
  --jk-radius-panel: 8px;
  --jk-focus-ring: 0 0 0 3px rgba(36, 95, 115, 0.28);
}

@media (prefers-color-scheme: dark) {
  :root {
    --jk-color-canvas: #101312;
    --jk-color-surface: #181d1b;
    --jk-color-text: #f2f4ef;
    --jk-color-muted: #b8c0bb;
    --jk-color-border: #39423f;
    --jk-color-focus: #7db6c7;
    --jk-color-success: #82c99a;
    --jk-color-warning: #e0b15d;
    --jk-color-risk: #e37d76;
    --jk-color-disabled: #7d8580;
    --jk-color-receipt: #80cbc7;
    --jk-space-2: 0.5rem;
    --jk-space-3: 0.75rem;
    --jk-space-4: 1rem;
    --jk-radius-control: 4px;
    --jk-radius-panel: 8px;
    --jk-focus-ring: 0 0 0 3px rgba(125, 182, 199, 0.38);
  }
}
Portable CSS custom properties
PropertyValueRoleUse
--jk-color-canvas #f8f7f2 surfacepage canvas and application background
--jk-color-surface #ffffff surfacepanels, cards, overlays, and work regions
--jk-color-text #171717 textprimary readable text
--jk-color-muted #61615c textsecondary labels and supporting text
--jk-color-border #d7d3c8 borderdividers, control outlines, and grouped evidence
--jk-color-focus #245f73 focusvisible focus rings and active affordances
--jk-color-success #2e6b48 statusapproved, completed, and successful states
--jk-color-warning #8a5a16 statuswarning, waiting, and needs-attention states
--jk-color-risk #8f342f riskrisk, escalation, and destructive action states
--jk-color-disabled #8a8f93 disableddisabled controls with visible rationale
--jk-color-receipt #23615f receipthandoff receipts and completion confirmation
--jk-space-20.5remsurfacecompact gaps inside dense controls
--jk-space-30.75remsurfacerow gaps and adjacent evidence spacing
--jk-space-41remsurfacepanel padding and section rhythm
--jk-radius-control4pxborderbuttons, inputs, and compact controls
--jk-radius-panel8pxsurfacecards, panels, and bounded work areas
--jk-focus-ring0 0 0 3px rgba(36, 95, 115, 0.28)focusfocus-visible outline around interactive controls

Token roles

JudgmentKit token roles
RoleFamiliesUseReview check
surfacecolor, elevationbackgrounds, panels, overlays, and work-surface regionsCheck that panels, overlays, and page regions are visually distinct without adding clutter.
textcolor, typebody copy, headings, labels, and dense operational textCheck readable contrast, line length, and hierarchy before decorative styling.
bordercolor, radiuscontrol boundaries, dividers, panels, and grouped evidenceUse borders to clarify grouping, control bounds, and evidence adjacency.
focuscolor, motionvisible focus indicators and keyboard navigation affordancesKeyboard focus must remain visible and easy to follow.
statuscolor, semanticsuccess, warning, error, loading, and empty statesPair status treatment with visible words and state changes.
decisioncolor, densityprimary decision controls and bounded action groupsPrimary and destructive actions need clear separation and labels.
riskcolor, semanticrisk, escalation, destructive, or externally committing actionsEscalation and destructive states need visible context, not just stronger color.
disabledcolor, semanticdisabled controls and unavailable state reasonsDisabled controls need an unavailable reason when the next step matters.
receiptcolor, semanticcompletion, confirmation, and handoff receipt statesCompletion states should leave a clear confirmation or handoff record.

Examples

  • Status that has visible meaning

    Use
    Pair status color with text such as Approved, Warning, Returned, or Complete.
    Watch for
    Do not rely on color alone for decisions, errors, or progress.
  • Focus that is easy to find

    Use
    Use focus roles for keyboard-visible controls and clear active regions.
    Watch for
    Do not remove focus styling to make a layout look cleaner.

Accessibility

  • Color cannot be the only way a user understands status, error, risk, or completion.
  • Focus treatment must be visible for keyboard users and must not be hidden by surrounding layout.
  • Status, risk, disabled, and receipt states need visible text or nearby context.