{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mzizi-dev/json-schema/mzizi-dev-brand-system-schema.json",
  "title": "BrandSystem",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mzizi-dev-openapi.yml#/components/schemas/BrandSystem",
  "type": "object",
  "required": [
    "$schema",
    "version",
    "name",
    "minerals",
    "heritage",
    "experimental",
    "ecosystem",
    "typography",
    "spacing"
  ],
  "properties": {
    "$schema": {
      "type": "string"
    },
    "@context": {
      "type": "string",
      "const": "https://schema.org"
    },
    "@type": {
      "type": "string",
      "const": "Brand"
    },
    "version": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "lastUpdated": {
      "type": "string",
      "format": "date"
    },
    "homepage": {
      "type": "string",
      "format": "uri"
    },
    "minerals": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Mineral"
      }
    },
    "heritage": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/HeritageColor"
      }
    },
    "experimental": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ExperimentalColor"
      }
    },
    "ecosystem": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/EcosystemBrand"
      }
    },
    "typography": {
      "type": "object",
      "required": [
        "fonts",
        "scale"
      ],
      "properties": {
        "fonts": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/FontSpec"
          }
        },
        "scale": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TypeScaleEntry"
          }
        }
      }
    },
    "spacing": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/SpacingToken"
      }
    },
    "radii": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "semanticColors": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/SemanticColor"
      }
    },
    "backgrounds": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BackgroundToken"
      }
    },
    "componentSpecs": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ComponentSpec"
      }
    },
    "accessibility": {
      "$ref": "#/$defs/Accessibility"
    },
    "voiceAndTone": {
      "$ref": "#/$defs/VoiceAndTone"
    },
    "philosophy": {
      "$ref": "#/$defs/Philosophy"
    }
  },
  "$defs": {
    "Accessibility": {
      "type": "object",
      "required": [
        "standard",
        "minTouchTarget"
      ],
      "properties": {
        "standard": {
          "type": "string"
        },
        "contrastDescription": {
          "type": "string"
        },
        "minTouchTarget": {
          "type": "integer",
          "minimum": 48
        },
        "focusIndicator": {
          "type": "string"
        },
        "keyboardNavigation": {
          "type": "string"
        },
        "screenReaders": {
          "type": "string"
        }
      }
    },
    "BackgroundToken": {
      "type": "object",
      "required": [
        "name",
        "light",
        "dark",
        "usage"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "light": {
          "type": "string"
        },
        "dark": {
          "type": "string"
        },
        "usage": {
          "type": "string"
        }
      }
    },
    "ColorFamily": {
      "type": "object",
      "description": "The fields every colour family carries (minerals, heritage tones and\nexperimental tones), from `lib/tokens/palette.generated.ts`.\n`lightHex` and `darkHex` are the canonical accents and fills, not text\nvalues. For text in this colour on the page use `textLight` /\n`textDark`, measured as text on `--base` (APCA Lc 75). Where the\ncanonical value already clears that bar, `textLight` equals `lightHex`\n(and `textDark` equals `darkHex`).\n",
      "required": [
        "name",
        "hex",
        "lightHex",
        "darkHex",
        "cssVar"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "hex": {
          "$ref": "#/$defs/Hex",
          "description": "The family's single default value. For minerals it is\n`mineralApiHex` in `lib/tokens/brand.source.ts`; for heritage and\nexperimental tones it is `darkHex`.\n"
        },
        "lightHex": {
          "$ref": "#/$defs/Hex"
        },
        "darkHex": {
          "$ref": "#/$defs/Hex"
        },
        "textLight": {
          "$ref": "#/$defs/Hex",
          "description": "The family as text on `--base`, light theme: the light value of\n`--color-<name>-text` in `mzizi-tokens-globals.css`, from\n`textOnBaseTier()` in `scripts/render-globals-css.ts`.\n"
        },
        "textDark": {
          "$ref": "#/$defs/Hex",
          "description": "The family as text on `--base`, dark theme: the dark value of\n`--color-<name>-text`.\n"
        },
        "cssVar": {
          "type": "string"
        }
      }
    },
    "ComponentSpec": {
      "type": "object",
      "required": [
        "name",
        "heights",
        "padding",
        "borderRadius",
        "minTouchTarget",
        "variants"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "heights": {
          "type": "object",
          "additionalProperties": {
            "type": "number"
          }
        },
        "padding": {
          "type": "string"
        },
        "borderRadius": {
          "type": "number"
        },
        "minTouchTarget": {
          "type": "number",
          "minimum": 48
        },
        "variants": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "EcosystemBrand": {
      "type": "object",
      "required": [
        "name",
        "meaning",
        "language",
        "role",
        "mineral",
        "url"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "meaning": {
          "type": "string"
        },
        "language": {
          "type": "string"
        },
        "role": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "voice": {
          "type": "string"
        },
        "mineral": {
          "type": "string",
          "description": "The brand's palette family (usually a mineral)"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "displayName": {
          "type": "string",
          "description": "The product name people read, where it is not the wordmark `name`\n(e.g. \"Mukoko Events\" for `events`). Present only on the rows that\nhave one.\n"
        },
        "accent": {
          "type": "string",
          "description": "A second palette family for `--brand-accent`, where the brand pairs\none with its `mineral` (e.g. `circles`: tanzanite with a terracotta\naccent). Present only on the rows that have one.\n"
        },
        "aliases": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Deprecated names that still resolve to this row (e.g. `nhimbe` for\n`events`). Present only on the rows that have them; never use one in\nnew code.\n"
        }
      }
    },
    "ExperimentalColor": {
      "description": "An experimental tone (`experimentalColors` in\n`lib/tokens/palette.generated.ts`), plus `hex` (its `darkHex`), `cssVar`\nand the `-text` pair. Text on its container uses `onContainerLight` /\n`onContainerDark`; `uiLight` / `uiDark` are its UI tints.\n`lightHex` and `darkHex` are the canonical accents and fills, not text\nvalues. For text in this colour on the page use `textLight` /\n`textDark`, measured as text on `--base` (APCA Lc 75). Where the\ncanonical value already clears that bar, `textLight` equals `lightHex`\n(and `textDark` equals `darkHex`).\n",
      "allOf": [
        {
          "$ref": "#/$defs/ColorFamily"
        },
        {
          "type": "object",
          "required": [
            "containerLight",
            "containerDark",
            "onContainerLight",
            "onContainerDark",
            "uiLight",
            "uiDark",
            "heptagonIndex"
          ],
          "properties": {
            "containerLight": {
              "$ref": "#/$defs/Hex"
            },
            "containerDark": {
              "$ref": "#/$defs/Hex"
            },
            "onContainerLight": {
              "$ref": "#/$defs/Hex",
              "description": "Text colour on the light theme container"
            },
            "onContainerDark": {
              "$ref": "#/$defs/Hex",
              "description": "Text colour on the dark theme container"
            },
            "uiLight": {
              "$ref": "#/$defs/Hex"
            },
            "uiDark": {
              "$ref": "#/$defs/Hex"
            },
            "heptagonIndex": {
              "type": "integer",
              "minimum": 0,
              "description": "The tone's position on the experimental heptagon"
            }
          }
        }
      ]
    },
    "FontSpec": {
      "type": "object",
      "required": [
        "family",
        "usage",
        "reason"
      ],
      "properties": {
        "family": {
          "type": "string"
        },
        "usage": {
          "type": "string"
        },
        "reason": {
          "type": "string"
        }
      }
    },
    "HeritageColor": {
      "description": "A heritage tone (`heritageColors` in `lib/tokens/palette.generated.ts`),\nplus `hex` (its `darkHex`) and the `-text` pair.\n`lightHex` and `darkHex` are the canonical accents and fills, not text\nvalues. For text in this colour on the page use `textLight` /\n`textDark`, measured as text on `--base` (APCA Lc 75). Where the\ncanonical value already clears that bar, `textLight` equals `lightHex`\n(and `textDark` equals `darkHex`).\n",
      "allOf": [
        {
          "$ref": "#/$defs/ColorFamily"
        },
        {
          "type": "object",
          "required": [
            "origin",
            "symbolism",
            "usage"
          ],
          "properties": {
            "origin": {
              "type": "string"
            },
            "symbolism": {
              "type": "string"
            },
            "usage": {
              "type": "string"
            }
          }
        }
      ]
    },
    "Hex": {
      "type": "string",
      "pattern": "^#[0-9A-Fa-f]{6}$"
    },
    "Mineral": {
      "description": "A mineral: the `MineralToken` in `lib/tokens/palette.generated.ts`,\nplus `hex` and the `-text` pair. Text on the mineral's container uses\n`onContainerLight` / `onContainerDark`.\n`lightHex` and `darkHex` are the canonical accents and fills, not text\nvalues. For text in this colour on the page use `textLight` /\n`textDark`, measured as text on `--base` (APCA Lc 75). Where the\ncanonical value already clears that bar, `textLight` equals `lightHex`\n(and `textDark` equals `darkHex`).\n",
      "allOf": [
        {
          "$ref": "#/$defs/ColorFamily"
        },
        {
          "type": "object",
          "required": [
            "origin",
            "symbolism",
            "usage"
          ],
          "properties": {
            "role": {
              "type": "string"
            },
            "family": {
              "$ref": "#/$defs/MineralFamily"
            },
            "containerLight": {
              "$ref": "#/$defs/Hex",
              "description": "Light theme container background for this mineral"
            },
            "containerDark": {
              "$ref": "#/$defs/Hex",
              "description": "Dark theme container background for this mineral"
            },
            "onContainerLight": {
              "$ref": "#/$defs/Hex",
              "description": "Text colour on the light theme container"
            },
            "onContainerDark": {
              "$ref": "#/$defs/Hex",
              "description": "Text colour on the dark theme container"
            },
            "sortOrder": {
              "type": "integer",
              "minimum": 0,
              "description": "Position among the minerals"
            },
            "origin": {
              "type": "string",
              "description": "African origin of this mineral"
            },
            "symbolism": {
              "type": "string"
            },
            "usage": {
              "type": "string"
            }
          }
        }
      ]
    },
    "MineralFamily": {
      "type": "string",
      "enum": [
        "deep-earth",
        "hand"
      ],
      "description": "The mineral's family"
    },
    "Philosophy": {
      "type": "object",
      "required": [
        "name",
        "meaning",
        "pillars"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "meaning": {
          "type": "string"
        },
        "pillars": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "name",
              "description"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "description": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "SemanticColor": {
      "type": "object",
      "required": [
        "name",
        "light",
        "dark",
        "usage"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "light": {
          "type": "string"
        },
        "dark": {
          "type": "string"
        },
        "usage": {
          "type": "string"
        }
      }
    },
    "SpacingToken": {
      "type": "object",
      "required": [
        "name",
        "px",
        "rem",
        "usage"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "px": {
          "type": "number"
        },
        "rem": {
          "type": "string"
        },
        "usage": {
          "type": "string"
        }
      }
    },
    "TypeScaleEntry": {
      "type": "object",
      "required": [
        "name",
        "sizePx",
        "sizeRem",
        "lineHeight",
        "weight",
        "font",
        "usage"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "sizePx": {
          "type": "number"
        },
        "sizeRem": {
          "type": "string"
        },
        "lineHeight": {
          "type": "string"
        },
        "weight": {
          "type": "integer"
        },
        "font": {
          "type": "string",
          "enum": [
            "sans",
            "serif",
            "mono"
          ]
        },
        "usage": {
          "type": "string"
        }
      }
    },
    "VoiceAndTone": {
      "type": "object",
      "required": [
        "principles",
        "doList",
        "dontList"
      ],
      "properties": {
        "principles": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "doList": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "dontList": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    }
  }
}