{
  "color": {
    "brand": {
      "default": { "$value": "{color.blue.700}", "$type": "color" },
      "hover":   { "$value": "{color.blue.800}", "$type": "color" },
      "deep":    { "$value": "{color.blue.900}", "$type": "color", "$description": "Announcement bar, footer (D7)" },
      "subtle":  { "$value": "{color.blue.50}",  "$type": "color", "$description": "Brand-tinted surface" }
    },

    "accent": {
      "default": { "$value": "{color.gold.500}", "$type": "color" },
      "hover":   { "$value": "{color.gold.600}", "$type": "color" },
      "subtle":  { "$value": "{color.gold.50}",  "$type": "color" },
      "deep":    { "$value": "{color.gold.700}", "$type": "color", "$description": "Accent text on light surfaces (WCAG AA, D9)" }
    },

    "text": {
      "default":   { "$value": "{color.gray.900}", "$type": "color" },
      "secondary": { "$value": "{color.gray.800}", "$type": "color" },
      "subtle":    { "$value": "{color.gray.600}", "$type": "color" },
      "muted":     { "$value": "{color.gray.500}", "$type": "color" },
      "inverted":  { "$value": "{color.gray.0}",   "$type": "color" },
      "brand":     { "$value": "{color.blue.700}", "$type": "color" },
      "accent":    { "$value": "{color.gold.500}", "$type": "color" },
      "link":      { "$value": "{color.blue.700}", "$type": "color" }
    },

    "surface": {
      "default":  { "$value": "{color.gray.0}",    "$type": "color", "$description": "Page background" },
      "subtle":   { "$value": "{color.gray.50}",   "$type": "color", "$description": "Cards on white pages, inputs (D6: consolidated to #f5f7fa)" },
      "muted":    { "$value": "{color.gray.200}",  "$type": "color", "$description": "Heavier neutral surface" },
      "search":   { "$value": "{color.gray.150}",  "$type": "color", "$description": "Search-bar field bg specifically" },
      "dark":     { "$value": "{color.gray.950}",  "$type": "color", "$description": "Machine-card image bg" },
      "inverted": { "$value": "{color.blue.900}",  "$type": "color", "$description": "Announcement bar, footer" }
    },

    "border": {
      "default": { "$value": "{color.gray.300}", "$type": "color" },
      "subtle":  { "$value": "{color.gray.200}", "$type": "color" },
      "strong":  { "$value": "{color.gray.400}", "$type": "color", "$description": "Card hover, active state" },
      "brand":   { "$value": "{color.blue.700}", "$type": "color", "$description": "Focused inputs, selected cards" },
      "focus":   { "$value": "{color.alpha.brand.10}", "$type": "color", "$description": "Focus ring shadow" }
    },

    "icon": {
      "default":  { "$value": "{color.gray.900}", "$type": "color" },
      "subtle":   { "$value": "{color.gray.600}", "$type": "color" },
      "muted":    { "$value": "{color.gray.300}", "$type": "color", "$description": "Image-placeholder strokes (D11: replaces former #ccc)" },
      "brand":    { "$value": "{color.blue.700}", "$type": "color" },
      "accent":   { "$value": "{color.gold.500}", "$type": "color" },
      "inverted": { "$value": "{color.gray.0}",   "$type": "color" }
    },

    "feedback": {
      "$description": "Status semantic colors. Each has default (text/icon), surface (bg), and border variants for accessible pairing. D8: text variants converged to canonical higher-contrast values.",
      "success": {
        "default": { "$value": "{color.green.500}", "$type": "color" },
        "text":    { "$value": "{color.green.800}", "$type": "color", "$description": "Canonical success text on light surface (#15692a, WCAG AA)" },
        "surface": { "$value": "{color.green.50}",  "$type": "color" },
        "border":  { "$value": "{color.green.300}", "$type": "color" }
      },
      "warning": {
        "default": { "$value": "{color.amber.500}", "$type": "color" },
        "text":    { "$value": "{color.amber.700}", "$type": "color", "$description": "Canonical warning text (#92400e, WCAG AA)" },
        "surface": { "$value": "{color.amber.50}",  "$type": "color" },
        "border":  { "$value": "{color.amber.300}", "$type": "color" }
      },
      "error": {
        "default": { "$value": "{color.red.500}", "$type": "color" },
        "hover":   { "$value": "{color.red.600}", "$type": "color" },
        "text":    { "$value": "{color.red.800}", "$type": "color", "$description": "Canonical error text (#991b1b, WCAG AA)" },
        "surface": { "$value": "{color.red.50}",  "$type": "color" },
        "border":  { "$value": "{color.red.500}", "$type": "color" }
      },
      "info": {
        "default": { "$value": "{color.indigo.700}", "$type": "color" },
        "text":    { "$value": "{color.indigo.700}", "$type": "color" },
        "surface": { "$value": "{color.indigo.50}",  "$type": "color" },
        "border":  { "$value": "{color.indigo.300}", "$type": "color" }
      },
      "stock": {
        "$description": "Stock-status color set. Visually paired with feedback colors but reserved for stock pills so they can re-theme independently if needed.",
        "in":      { "$value": "{color.green.800}",  "$type": "color" },
        "in-bg":   { "$value": "{color.green.50}",   "$type": "color" },
        "low":     { "$value": "{color.amber.700}",  "$type": "color" },
        "low-bg":  { "$value": "{color.amber.50}",   "$type": "color" },
        "out":     { "$value": "{color.red.800}",    "$type": "color" },
        "out-bg":  { "$value": "{color.red.50}",     "$type": "color" },
        "back":    { "$value": "{color.gray.700}",   "$type": "color" },
        "back-bg": { "$value": "{color.gray.50}",    "$type": "color" }
      }
    },

    "overlay": {
      "scrim":         { "$value": "{color.alpha.black.50}",  "$type": "color", "$description": "Modal/menu scrim" },
      "image-tint":    { "$value": "{color.alpha.white.85}",  "$type": "color", "$description": "Wishlist button bg over images" },
      "image-overlay": { "$value": "{color.alpha.black.50}",  "$type": "color", "$description": "Machine card icon bg" },
      "brand-wash":    { "$value": "{color.alpha.brand.06}",  "$type": "color", "$description": "Brand hover wash" }
    }
  },

  "elevation": {
    "$description": "Shadow aliases. Components should reference these names, not raw shadow primitives, so the system can be globally tuned.",
    "rest":     { "$value": "{shadow.xs}", "$type": "shadow", "$description": "Cards at rest" },
    "raised":   { "$value": "{shadow.sm}", "$type": "shadow", "$description": "Cards on hover" },
    "floating": { "$value": "{shadow.md}", "$type": "shadow", "$description": "Dropdowns, popovers" },
    "overlay":  { "$value": "{shadow.lg}", "$type": "shadow", "$description": "Modals" },
    "deep":     { "$value": "{shadow.xl}", "$type": "shadow" }
  },

  "radius": {
    "control":  { "$value": "{radius.sm}",   "$type": "dimension", "$description": "Buttons, inputs, badges" },
    "card":     { "$value": "{radius.md}",   "$type": "dimension", "$description": "Cards, alerts" },
    "panel":    { "$value": "{radius.lg}",   "$type": "dimension", "$description": "Larger surfaces, modals" },
    "pill":     { "$value": "{radius.full}", "$type": "dimension" },
    "tag":      { "$value": "{radius.xs}",   "$type": "dimension", "$description": "Stock pills, OEM badges" }
  },

  "typography": {
    "$description": "Composite typography styles — the canonical surface for components to consume. D12: while primitive font-size names preserve prototype convention, semantic typography uses standard naming (display/heading/body/label/code).",
    "display": {
      "lg": {
        "$type": "typography",
        "$value": {
          "fontFamily":    "{font-family.sans}",
          "fontSize":      "{font-size.5xl}",
          "fontWeight":    "{font-weight.extrabold}",
          "lineHeight":    "{line-height.tight}",
          "letterSpacing": "{letter-spacing.tighter}"
        },
        "$description": "56px — hero/landing"
      },
      "md": {
        "$type": "typography",
        "$value": {
          "fontFamily":    "{font-family.sans}",
          "fontSize":      "{font-size.4xl}",
          "fontWeight":    "{font-weight.bold}",
          "lineHeight":    "{line-height.tight}",
          "letterSpacing": "{letter-spacing.tight}"
        },
        "$description": "48px — section hero"
      },
      "sm": {
        "$type": "typography",
        "$value": {
          "fontFamily":    "{font-family.sans}",
          "fontSize":      "{font-size.3xl}",
          "fontWeight":    "{font-weight.bold}",
          "lineHeight":    "{line-height.tight}",
          "letterSpacing": "{letter-spacing.tight}"
        },
        "$description": "40px — compact hero, card hero"
      }
    },
    "heading": {
      "h1": { "$type": "typography", "$value": { "fontFamily": "{font-family.sans}", "fontSize": "{font-size.3xl}", "fontWeight": "{font-weight.bold}", "lineHeight": "{line-height.tight}",  "letterSpacing": "{letter-spacing.normal}" } },
      "h2": { "$type": "typography", "$value": { "fontFamily": "{font-family.sans}", "fontSize": "{font-size.2xl}", "fontWeight": "{font-weight.bold}", "lineHeight": "{line-height.tight}",  "letterSpacing": "{letter-spacing.normal}" } },
      "h3": { "$type": "typography", "$value": { "fontFamily": "{font-family.sans}", "fontSize": "{font-size.xl}",  "fontWeight": "{font-weight.bold}", "lineHeight": "{line-height.snug}",   "letterSpacing": "{letter-spacing.normal}" } },
      "h4": { "$type": "typography", "$value": { "fontFamily": "{font-family.sans}", "fontSize": "{font-size.lg}",  "fontWeight": "{font-weight.bold}", "lineHeight": "{line-height.snug}",   "letterSpacing": "{letter-spacing.normal}" } },
      "h5": { "$type": "typography", "$value": { "fontFamily": "{font-family.sans}", "fontSize": "{font-size.md}",  "fontWeight": "{font-weight.bold}", "lineHeight": "{line-height.snug}",   "letterSpacing": "{letter-spacing.normal}" } },
      "h6": { "$type": "typography", "$value": { "fontFamily": "{font-family.sans}", "fontSize": "{font-size.sm}",  "fontWeight": "{font-weight.bold}", "lineHeight": "{line-height.snug}",   "letterSpacing": "{letter-spacing.normal}" } }
    },
    "body": {
      "$description": "Body copy. Use 'md' as the canonical body size (16px). Note: 'md' here intentionally differs from the legacy primitive 'sm' which also = 16px (D12).",
      "lg":      { "$type": "typography", "$value": { "fontFamily": "{font-family.sans}", "fontSize": "{font-size.md}", "fontWeight": "{font-weight.regular}", "lineHeight": "{line-height.relaxed}", "letterSpacing": "{letter-spacing.normal}" }, "$description": "18px — emphasized prose" },
      "md":      { "$type": "typography", "$value": { "fontFamily": "{font-family.sans}", "fontSize": "{font-size.sm}", "fontWeight": "{font-weight.regular}", "lineHeight": "{line-height.relaxed}", "letterSpacing": "{letter-spacing.normal}" }, "$description": "16px — body default" },
      "sm":      { "$type": "typography", "$value": { "fontFamily": "{font-family.sans}", "fontSize": "{font-size.xs}", "fontWeight": "{font-weight.regular}", "lineHeight": "{line-height.normal}",  "letterSpacing": "{letter-spacing.normal}" }, "$description": "14px — secondary copy" },
      "xs":      { "$type": "typography", "$value": { "fontFamily": "{font-family.sans}", "fontSize": "{font-size.2xs}","fontWeight": "{font-weight.regular}", "lineHeight": "{line-height.normal}",  "letterSpacing": "{letter-spacing.normal}" }, "$description": "12px — fine print" }
    },
    "label": {
      "$description": "All-caps labels for section headers, eyebrows, status pills. D21: 'xs' uses new 10px primitive for stock badges.",
      "md": { "$type": "typography", "$value": { "fontFamily": "{font-family.sans}", "fontSize": "{font-size.xs}",  "fontWeight": "{font-weight.semibold}", "lineHeight": "{line-height.normal}", "letterSpacing": "{letter-spacing.widest}" }, "$description": "14px label" },
      "sm": { "$type": "typography", "$value": { "fontFamily": "{font-family.sans}", "fontSize": "{font-size.2xs}", "fontWeight": "{font-weight.semibold}", "lineHeight": "{line-height.normal}", "letterSpacing": "{letter-spacing.widest}" }, "$description": "12px label" },
      "xs": { "$type": "typography", "$value": { "fontFamily": "{font-family.sans}", "fontSize": "{font-size.3xs}", "fontWeight": "{font-weight.bold}",     "lineHeight": "{line-height.normal}", "letterSpacing": "{letter-spacing.wider}" },  "$description": "10px label — stock badges, OEM badges" }
    },
    "code": {
      "md": { "$type": "typography", "$value": { "fontFamily": "{font-family.mono}", "fontSize": "{font-size.xs}",  "fontWeight": "{font-weight.regular}", "lineHeight": "{line-height.normal}", "letterSpacing": "{letter-spacing.normal}" } },
      "sm": { "$type": "typography", "$value": { "fontFamily": "{font-family.mono}", "fontSize": "{font-size.2xs}", "fontWeight": "{font-weight.regular}", "lineHeight": "{line-height.normal}", "letterSpacing": "{letter-spacing.normal}" } }
    }
  },

  "motion": {
    "$description": "Composite transitions. Always reference these in components, not raw duration/easing pairs.",
    "fast":   { "$value": "{duration.fast} {easing.ease}", "$type": "transition", "$description": "Hover, focus" },
    "base":   { "$value": "{duration.base} {easing.ease}", "$type": "transition", "$description": "Card hover, dropdown" },
    "slow":   { "$value": "{duration.slow} {easing.ease}", "$type": "transition", "$description": "Modal, drawer" }
  },

  "layout": {
    "container-pad": {
      "$description": "Horizontal page gutter. Adjusts at breakpoints.",
      "small":  { "$value": "{spacing.4}",  "$type": "dimension", "$description": "16px on mobile" },
      "medium": { "$value": "{spacing.8}",  "$type": "dimension", "$description": "32px on tablet" },
      "large":  { "$value": "{spacing.20}", "$type": "dimension", "$description": "80px on desktop" }
    },
    "section-gap": {
      "small":  { "$value": "{spacing.8}",  "$type": "dimension" },
      "medium": { "$value": "{spacing.12}", "$type": "dimension" },
      "large":  { "$value": "{spacing.16}", "$type": "dimension" }
    },
    "header-height": {
      "$description": "Header height per breakpoint (D17). Components consume from here, not from primitives.",
      "small":  { "$value": "{size.header-height.small}",  "$type": "dimension" },
      "medium": { "$value": "{size.header-height.medium}", "$type": "dimension" },
      "large":  { "$value": "{size.header-height.large}",  "$type": "dimension" }
    }
  }
}
