Andrew Garman

// design-tokens · ag-prefix · v1.0

Design Tokens

Living reference for all --ag-* CSS custom properties. Defined insrc/styles/ag-tokens.css using a three-layer cascade:ag-color-palette → ag-theme → ag-theme-overrides. Theme switching is driven by [data-theme="dark"] on <html>.

Color Palette

Raw numeric scale — lower number = darker. All values are warm-toned for the paper notebook aesthetic. Defined in @layer ag-color-palette.

Neutral — cream paper to near-black ink

  • --ag-color-neutral-99Brightest paper
  • --ag-color-neutral-95Paper (default surface)
  • --ag-color-neutral-90Paper dark (lowered surface)
  • --ag-color-neutral-80Pencil light
  • --ag-color-neutral-70Pencil (border)
  • --ag-color-neutral-60Mid warm tone
  • --ag-color-neutral-50Ink faint (WCAG AA on paper)
  • --ag-color-neutral-40Darker warm
  • --ag-color-neutral-30Near-black warm
  • --ag-color-neutral-20Ink (primary text)
  • --ag-color-neutral-10Deep ink
  • --ag-color-neutral-05Near black

Brand — red-orange correction marker

  • --ag-color-brand-95Lightest tint
  • --ag-color-brand-90Light tint
  • --ag-color-brand-80Soft
  • --ag-color-brand-70Medium
  • --ag-color-brand-60Strong
  • --ag-color-brand-50Base brand (fill-loud)
  • --ag-color-brand-40Dark
  • --ag-color-brand-30Darker
  • --ag-color-brand-20Deepest

Accent — blue ink

  • --ag-color-accent-90Light blue
  • --ag-color-accent-70Mid blue
  • --ag-color-accent-50Blue ink (links)
  • --ag-color-accent-40Dark blue
  • --ag-color-accent-20Deep blue

Success — green ink

  • --ag-color-success-95Light green tint
  • --ag-color-success-90Green tint
  • --ag-color-success-70Mid green
  • --ag-color-success-50Green base
  • --ag-color-success-40Dark green

Warning — amber ink

  • --ag-color-warning-95Light amber tint
  • --ag-color-warning-90Amber tint
  • --ag-color-warning-70Amber mid
  • --ag-color-warning-50Amber base
  • --ag-color-warning-40Amber dark

Semantic Theme Tokens

Defined in @layer ag-theme. These flip automatically when [data-theme="dark"] is applied. Use these in components, never raw palette values.

  • --ag-color-surface-raisedCard / raised surface
  • --ag-color-surface-defaultPage background
  • --ag-color-surface-loweredRecessed / darker inset
  • --ag-color-surface-borderDefault border color
  • --ag-color-text-normalBody text
  • --ag-color-text-quietSecondary / muted text
  • --ag-color-text-linkHyperlinks
  • --ag-color-focusFocus ring color
  • --ag-color-brand-fill-quietBrand fill — subtle
  • --ag-color-brand-fill-normalBrand fill — default
  • --ag-color-brand-fill-loudBrand fill — primary CTA
  • --ag-color-brand-border-normalBrand border
  • --ag-color-success-fill-loudSuccess state fill
  • --ag-color-success-on-normalSuccess text on tint
  • --ag-color-warning-fill-loudWarning state fill
  • --ag-color-warning-on-normalWarning text on tint

Typography

Font Families

  • Special Elite — display & headings--ag-font-family-headingalias: --font-display, --font-heading
  • Work Sans — body & UI text--ag-font-family-bodyalias: --font-body
  • Courier New — code & mono labels--ag-font-family-codealias: --font-mono
  • Patrick Hand — handwritten annotations--ag-font-family-longformalias: --font-annotation

Font Size Scale

Major Second (×1.125) scale anchored at 1rem (16px). Rule: nothing below 12px hard floor; body copy minimum 16px.

  • Aa — 3xs--ag-font-size-3xs~10pxBelow hard floor — do not use
  • Aa — 2xs--ag-font-size-2xs~11pxBelow hard floor — do not use
  • Aa — xs--ag-font-size-xs~13pxHard floor — labels, annotations only
  • Aa — s--ag-font-size-s~14pxBelow 16px — captions, meta only
  • Aa — m--ag-font-size-m16pxBase — minimum for body copy
  • Aa — l--ag-font-size-l~20pxSubheadings, emphasized body
  • Aa — xl--ag-font-size-xl~25pxh3 / section headings
  • Aa — 2xl--ag-font-size-2xl~32pxh2 / page section titles
  • Aa — 3xl--ag-font-size-3xl~40pxh1 / hero headings
  • Aa — 4xl--ag-font-size-4xl~51pxDisplay — very large
  • Aa — 5xl--ag-font-size-5xl~64pxDisplay — maximum

Spacing Scale

T-shirt scale multiplied by --ag-space-scale (default 1) for density control. Use these for all margin, padding, and gap values.

  • --ag-space-3xs3xs2px
  • --ag-space-2xs2xs4px
  • --ag-space-xsxs8px
  • --ag-space-ss12px
  • --ag-space-mm16px
  • --ag-space-ll24px
  • --ag-space-xlxl32px
  • --ag-space-2xl2xl40px
  • --ag-space-3xl3xl48px
  • --ag-space-4xl4xl64px

Shadows

Hard cel-shadows: offset with no blur, ink-colored. --ag-shadow-blur-scale: 0 collapses all blur to zero. Alias: --shadow-cel--ag-shadow-s.

  • --ag-shadow-ss2px offset, no blur — tight cel
  • --ag-shadow-mm3px offset, no blur — default cel
  • --ag-shadow-ll4px offset, no blur — lifted cel

Border Radius

Tight squares match the cel/sketch aesthetic. Alias: --radius-cel--ag-border-radius-s.

  • --ag-border-radius-ss — 2px
  • --ag-border-radius-mm — 4px
  • --ag-border-radius-ll — 8px
  • --ag-border-radius-pillpill — 9999px

Legacy Aliases

Defined in @layer ag-theme-overrides. These map the old --paper, --ink, --brand-1, etc. names onto --ag-* semantic tokens. Theme switching propagates through automatically. Prefer --ag-* tokens in new code.

AliasPoints to
--paper--ag-color-surface-default
--paper-dark--ag-color-surface-lowered
--ink--ag-color-text-normal
--ink-faint--ag-color-text-quiet
--pencil--ag-color-surface-border
--blue-ink--ag-color-text-link
--green-ink--ag-color-success-on-normal
--amber-ink--ag-color-warning-on-normal
--brand-1--ag-color-brand-fill-loud
--shadow-cel--ag-shadow-s
--radius-cel--ag-border-radius-s
--font-display--ag-font-family-heading
--font-mono--ag-font-family-code
--font-size-1--ag-font-size-m (16px)
--font-size-2--ag-font-size-l (~20px)
--font-size-3--ag-font-size-xl (~25px)
--font-size-4--ag-font-size-2xl (~32px)
--font-size-5--ag-font-size-3xl (~40px)