{
  "$schema": "https://design-tokens.org/draft/2024",
  "color": {
    "surface": {
      "canvas":   { "$value": "#F6F1E6", "$description": "Page background — warm cream" },
      "warm":     { "$value": "#F1E9D5", "$description": "One shade deeper" },
      "deep":     { "$value": "#E8DEC5", "$description": "Third tier, used for insets" },
      "paper":    { "$value": "#FBF8F0", "$description": "Elevated surface — cards, modals" }
    },
    "ink": {
      "primary":  { "$value": "#171513", "$description": "Headlines, primary text" },
      "body":     { "$value": "#4A443D", "$description": "Body copy, secondary text" },
      "mute":     { "$value": "#8A8276", "$description": "Meta labels, placeholders, captions" },
      "hairline": { "$value": "#DDD2B8", "$description": "Borders, dividers, rules" }
    },
    "accent": {
      "teal":       { "$value": "#0E7C66", "$description": "Primary accent — settle, success, CTA" },
      "teal-deep":  { "$value": "#0A5F4F", "$description": "Teal hover / pressed" },
      "teal-pale":  { "$value": "#D6EAE2", "$description": "Teal tint for backgrounds" },
      "coral":      { "$value": "#E76F51", "$description": "Secondary accent — surgical emphasis, errors" },
      "coral-pale": { "$value": "#FADED4", "$description": "Coral tint for backgrounds" },
      "butter":     { "$value": "#F4C94E", "$description": "Tertiary — joy, celebration, confetti, highlights on dark" }
    },
    "dark": {
      "canvas":         { "$value": "#1E1A16", "$description": "Dark surface — warm brown, never pure black" },
      "elevated":       { "$value": "#2A2521", "$description": "Elevated dark surface — cards on dark" },
      "border":         { "$value": "#3D3630", "$description": "Dark borders, subtle" },
      "text-primary":   { "$value": "#FBF8F0", "$description": "Primary text on dark" },
      "text-secondary": { "$value": "rgba(251,248,240,0.70)", "$description": "Body text on dark" },
      "text-mute":      { "$value": "rgba(251,248,240,0.45)", "$description": "Labels, captions on dark" }
    },
    "semantic": {
      "success":     { "$value": "#0E7C66", "$description": "Positive — settled, confirmed" },
      "success-bg":  { "$value": "#D6EAE2", "$description": "Success background tint" },
      "warning":     { "$value": "#D4940A", "$description": "Caution — approaching cap, pending" },
      "warning-bg":  { "$value": "#FAF0D4", "$description": "Warning background tint" },
      "error":       { "$value": "#E76F51", "$description": "Destructive — overdue, failed" },
      "error-bg":    { "$value": "#FADED4", "$description": "Error background tint" },
      "info":        { "$value": "#2A9D8F", "$description": "Informational — tips, nudges" },
      "info-bg":     { "$value": "#DFF0EC", "$description": "Info background tint" }
    },
    "wordmark": {
      "teal": { "$value": "#2A9D8F", "$description": "Wordmark-only teal — lighter than UI teal" }
    },
    "glass": {
      "bg":     { "$value": "rgba(251,248,240,0.72)", "$description": "Frosted glass fill" },
      "border": { "$value": "rgba(255,255,255,0.55)", "$description": "Glass border" }
    },
    "avatar": {
      "you":   { "$value": "#171513", "$description": "Current user — ink" },
      "coral":  { "$value": "#E76F51", "$description": "Avatar ring 1" },
      "teal":   { "$value": "#0E7C66", "$description": "Avatar ring 2" },
      "butter": { "$value": "#D4940A", "$description": "Avatar ring 3" },
      "mute":   { "$value": "#8A8276", "$description": "Avatar ring 4" }
    }
  },

  "typography": {
    "family": {
      "display": { "$value": "'Bricolage Grotesque', 'Onest', system-ui, -apple-system, sans-serif", "$description": "Headlines, section titles, numerals" },
      "body":    { "$value": "'Onest', system-ui, sans-serif", "$description": "Body text, UI labels" },
      "mono":    { "$value": "'JetBrains Mono', ui-monospace, monospace", "$description": "Eyebrows, meta, amounts, code" }
    },
    "scale": {
      "display-xl": {
        "size": { "$value": "clamp(48px, 7vw, 88px)" },
        "lineHeight": { "$value": "0.95" },
        "weight": { "$value": "600" },
        "letterSpacing": { "$value": "-0.035em" },
        "family": { "$value": "{typography.family.display}" },
        "$description": "Hero headline"
      },
      "display-lg": {
        "size": { "$value": "clamp(36px, 5vw, 64px)" },
        "lineHeight": { "$value": "0.95" },
        "weight": { "$value": "600" },
        "letterSpacing": { "$value": "-0.03em" },
        "family": { "$value": "{typography.family.display}" },
        "$description": "Section headline"
      },
      "display-md": {
        "size": { "$value": "clamp(24px, 3vw, 36px)" },
        "lineHeight": { "$value": "1.05" },
        "weight": { "$value": "600" },
        "letterSpacing": { "$value": "-0.025em" },
        "family": { "$value": "{typography.family.display}" },
        "$description": "Card headline, modal title"
      },
      "display-sm": {
        "size": { "$value": "20px" },
        "lineHeight": { "$value": "1.15" },
        "weight": { "$value": "600" },
        "letterSpacing": { "$value": "-0.02em" },
        "family": { "$value": "{typography.family.display}" },
        "$description": "Sub-headline, list section title"
      },
      "body-lg": {
        "size": { "$value": "17px" },
        "lineHeight": { "$value": "1.5" },
        "weight": { "$value": "400" },
        "letterSpacing": { "$value": "0" },
        "family": { "$value": "{typography.family.body}" },
        "$description": "Primary body copy"
      },
      "body-md": {
        "size": { "$value": "15px" },
        "lineHeight": { "$value": "1.5" },
        "weight": { "$value": "400" },
        "letterSpacing": { "$value": "0" },
        "family": { "$value": "{typography.family.body}" },
        "$description": "Secondary body, descriptions"
      },
      "body-sm": {
        "size": { "$value": "13px" },
        "lineHeight": { "$value": "1.45" },
        "weight": { "$value": "400" },
        "letterSpacing": { "$value": "0" },
        "family": { "$value": "{typography.family.body}" },
        "$description": "Captions, helper text"
      },
      "mono-md": {
        "size": { "$value": "12px" },
        "lineHeight": { "$value": "1.4" },
        "weight": { "$value": "500" },
        "letterSpacing": { "$value": "0.08em" },
        "family": { "$value": "{typography.family.mono}" },
        "$description": "Labels, amounts, meta"
      },
      "mono-sm": {
        "size": { "$value": "10px" },
        "lineHeight": { "$value": "1.4" },
        "weight": { "$value": "500" },
        "letterSpacing": { "$value": "0.1em" },
        "family": { "$value": "{typography.family.mono}" },
        "$description": "Eyebrows, timestamps, fine print"
      }
    }
  },

  "spacing": {
    "0":  { "$value": "0px" },
    "1":  { "$value": "4px" },
    "2":  { "$value": "8px" },
    "3":  { "$value": "12px" },
    "4":  { "$value": "16px" },
    "5":  { "$value": "20px" },
    "6":  { "$value": "24px" },
    "8":  { "$value": "32px" },
    "10": { "$value": "40px" },
    "12": { "$value": "48px" },
    "16": { "$value": "64px" },
    "20": { "$value": "80px" },
    "24": { "$value": "96px" },
    "32": { "$value": "128px" },
    "40": { "$value": "160px" },
    "$description": "8px base grid. Step = base * multiplier."
  },

  "radius": {
    "xs":   { "$value": "6px",   "$description": "Tags, inner pills" },
    "sm":   { "$value": "10px",  "$description": "Buttons, chips, mini inputs" },
    "md":   { "$value": "14px",  "$description": "Inner cards, inputs" },
    "lg":   { "$value": "24px",  "$description": "Cards, sheets" },
    "xl":   { "$value": "28px",  "$description": "Composer, settle card" },
    "pill": { "$value": "999px", "$description": "Fully rounded — nav, CTAs" }
  },

  "shadow": {
    "sm":    { "$value": "0 1px 0 rgba(23,21,19,0.04), 0 1px 2px rgba(23,21,19,0.06)",  "$description": "Hairline edge" },
    "md":    { "$value": "0 1px 0 rgba(23,21,19,0.04), 0 8px 24px -8px rgba(23,21,19,0.12)", "$description": "Hover, menus" },
    "lg":    { "$value": "0 1px 0 rgba(23,21,19,0.04), 0 24px 60px -24px rgba(23,21,19,0.18)", "$description": "Cards" },
    "float": { "$value": "0 1px 0 rgba(23,21,19,0.04), 0 30px 80px -30px rgba(23,21,19,0.28)", "$description": "Modals, sticky CTA" }
  },

  "motion": {
    "easing": {
      "out":    { "$value": "cubic-bezier(0.23, 1, 0.32, 1)",    "$description": "Primary UI ease-out" },
      "spring": { "$value": "cubic-bezier(0.34, 1.56, 0.64, 1)", "$description": "Overshoot — toggles, pops" },
      "ios":    { "$value": "cubic-bezier(0.32, 0.72, 0, 1)",    "$description": "Sheet / drawer entrance" }
    },
    "duration": {
      "fast": { "$value": "140ms", "$description": "Button press, hover" },
      "med":  { "$value": "240ms", "$description": "Card transitions, popovers" },
      "slow": { "$value": "420ms", "$description": "Mode switches, bar resizes" }
    }
  },

  "breakpoint": {
    "sm":  { "$value": "520px",  "$description": "Small phone" },
    "md":  { "$value": "720px",  "$description": "Large phone / small tablet" },
    "lg":  { "$value": "900px",  "$description": "Tablet" },
    "xl":  { "$value": "1240px", "$description": "Desktop" }
  },

  "grid": {
    "columns":       { "$value": "12" },
    "gutter":        { "$value": "16px",  "$description": "Gap between columns" },
    "margin":        { "$value": "32px",  "$description": "Page horizontal padding" },
    "maxWidth":      { "$value": "1240px", "$description": "Container max-width" },
    "margin-mobile": { "$value": "20px",  "$description": "Page horizontal padding on mobile" }
  },

  "z-index": {
    "base":    { "$value": "0" },
    "card":    { "$value": "1" },
    "sticky":  { "$value": "10" },
    "nav":     { "$value": "50" },
    "modal":   { "$value": "100" },
    "toast":   { "$value": "200" },
    "tooltip": { "$value": "300" },
    "grain":   { "$value": "1000", "$description": "Paper grain overlay — always on top" }
  }
}
