{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "fvcms.cms-local.theme.001",
  "title": "Local CMS Module — Theme",
  "description": "Per-app theme tokens + dark/light overrides. Deep-merged with vendored defaults (per FvCMS Pact §3.18.1).",
  "type": "object",
  "required": ["schema"],
  "properties": {
    "schema": { "const": "fvcms.cms-local.theme.001" },
    "tokens": {
      "type": "object",
      "description": "CSS custom property overrides. Keys are variable names (without the leading --); values are valid CSS values.",
      "additionalProperties": { "type": "string" },
      "examples": [{
        "fvcms-bg": "#0e1116",
        "fvcms-fg": "#e8e8e0",
        "fvcms-accent": "#4a8a6a"
      }]
    },
    "dark": {
      "type": "object",
      "description": "Token overrides applied only when body[data-fvcms-mode=\"dark\"]",
      "additionalProperties": { "type": "string" }
    },
    "light": {
      "type": "object",
      "description": "Token overrides applied only when body[data-fvcms-mode=\"light\"]",
      "additionalProperties": { "type": "string" }
    },
    "fonts": {
      "type": "object",
      "properties": {
        "ui":     { "type": "string", "description": "CSS font-family for UI text" },
        "mono":   { "type": "string", "description": "CSS font-family for monospace text" },
        "display":{ "type": "string", "description": "CSS font-family for display text" }
      }
    }
  },
  "additionalProperties": true
}
