{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://agenticdecks.com/schemas/v1/deckrun-theme-profile.json",
  "$comment": "© 2026 Agentic Decks. Publicly readable. Not open source. See https://agenticdecks.com/schemas for usage terms.",
  "title": "Deckrun theme profile",
  "description": "Theme resource for PDF and other outputs. The schema is intentionally simple: it provides hints (category, branding, typography, layout, contact, etc.) that drive how the generated output is formatted. A theme is always supplied for generation; themes can be for any document category (slide, resume, patent, generic, book). Only ASCII and Mermaid diagrams are supported in markdown input (machine-generated content). Theme/profile values are advisory; renderers may choose to ignore or adapt them based on medium capabilities (e.g., video vs PDF).",
  "type": "object",
  "properties": {
    "theme_version": {
      "type": "string",
      "description": "Theme schema version (e.g. v1). Useful for caching and agent resolution."
    },
    "category": {
      "type": "string",
      "enum": [
        "slide",
        "resume",
        "patent",
        "generic",
        "book"
      ],
      "description": "Document category this theme applies to. PDF output always uses a theme; themes are per category (e.g. slide, resume, patent, whitepaper, book)."
    },
    "diagram_formats": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "ascii",
          "mermaid"
        ]
      },
      "description": "Diagram formats allowed in markdown input. Only ASCII and Mermaid are supported; keeps input machine-generated. Default [\"ascii\", \"mermaid\"] when omitted."
    },
    "system_provided": {
      "type": "boolean",
      "description": "When true, the theme is provided by the system. Only user-provided themes can be deleted (DELETE); system-provided themes may be customized (PUT) but must not be deleted. Set by the server; omit or false when creating a theme."
    },
    "branding": {
      "type": "object",
      "description": "Organization branding: name, logo, favicon. For resume (and similar) categories, logos are typically omitted; use colors and typography only.",
      "properties": {
        "org_name": {
          "type": "string",
          "description": "Organization name (footer and title slide)."
        },
        "assets_dir": {
          "type": "string",
          "description": "Directory for slide images, backgrounds, media; logo/favicon paths resolved relative to this."
        },
        "logo_path": {
          "type": "string",
          "description": "Logo with text (title slide). Resolved relative to assets_dir if just a filename. Omit for resume and other non-slide categories."
        },
        "favicon_path": {
          "type": "string",
          "description": "Logo without text (footer). Resolved relative to assets_dir if just a filename. Omit for resume and other non-slide categories."
        },
        "logo_includes_wordmark": {
          "type": "boolean",
          "description": "When true, the logo_path image already contains the organization name as part of the graphic. The renderer will suppress the org_name text element on the title slide to avoid duplication. Default false.",
          "default": false
        },
        "colors": {
          "type": "object",
          "description": "Brand color palette. Color strings are expected to be CSS color values (e.g. hex, rgb(), named color). Renderers may normalize.",
          "properties": {
            "primary": {
              "type": "string",
              "description": "Primary brand color (e.g. footer background). CSS color value; renderers may normalize."
            },
            "accent": {
              "type": "string",
              "description": "Accent color (decorative elements, links). CSS color value; renderers may normalize."
            },
            "light_blue": {
              "type": "string",
              "description": "Secondary elements. CSS color value; renderers may normalize."
            },
            "purple": {
              "type": "string",
              "description": "Accent variations. CSS color value; renderers may normalize."
            },
            "title_slide_bg": {
              "type": "string",
              "description": "Optional. Title slide background (e.g. light #f5f5f5 when logo is dark). CSS color value."
            },
            "title_slide_text": {
              "type": "string",
              "description": "Optional. Title slide text color (e.g. dark #111827 when background is light). CSS color value."
            },
            "footer_bg": {
              "type": "string",
              "description": "Optional. Footer bar background. CSS color value."
            },
            "footer_text": {
              "type": "string",
              "description": "Optional. Footer bar text color. CSS color value."
            },
            "heading_color": {
              "type": "string",
              "description": "Optional. Presentation title, slide titles, and section headers (e.g. #5CA5EB). CSS color value."
            },
            "body_text_color": {
              "type": "string",
              "description": "Optional. Body text color for slide content (e.g. #132534). CSS color value. Defaults to primary when not set."
            },
            "title_slide_bg_gradient": {
              "type": "string",
              "description": "Optional. Full CSS background value for the title slide. Accepts any valid CSS background shorthand: solid color, gradient, or multi-layer combination. When set, overrides title_slide_bg. Three common patterns: (1) dark diagonal gradient for a bold branded look, (2) radial glow for a dramatic depth effect, (3) repeating dot-grid pattern on white for a soft textured look — use 'background-size' shorthand syntax ('/ <w> <h>') inside the value.",
              "examples": [
                "linear-gradient(160deg, #132534 0%, #7B6CB1 55%, #18A7C4 100%)",
                "linear-gradient(135deg, #0F1C38 0%, #3A3285 100%)",
                "radial-gradient(ellipse at 80% 50%, #3A3285 0%, #0F1C38 100%)",
                "radial-gradient(circle, rgba(179,182,213,0.38) 1.5px, transparent 1.5px) 0 0 / 24px 24px, radial-gradient(ellipse 50% 70% at 94% 8%, rgba(179,182,213,0.22) 0%, transparent 100%), #ffffff"
              ]
            },
            "title_slide_bg_image": {
              "type": "string",
              "description": "Optional. Path to a background image for the title slide only (resolved relative to assets_dir). When set, takes precedence over title_slide_bg_gradient and title_slide_bg. Use title_slide_text and title_slide_heading_color to ensure contrast."
            },
            "title_slide_heading_color": {
              "type": "string",
              "description": "Optional. Color of the main title / heading text on the title slide. Overrides heading_color for the title slide only. Useful when the title slide background is dark and requires white titles while content slides use a colored heading."
            },
            "title_line_gradient": {
              "type": "string",
              "description": "Optional. CSS linear-gradient for the thin separator line rendered under the title slide h2 and content slide headings. Applied via ::after pseudo-element. Use 'to right' direction with brand colors; typically 2–3 stops moving from accent to primary to a soft neutral.",
              "examples": [
                "linear-gradient(to right, #E81A89 0%, #7B6CB1 50%, #18A7C4 100%)",
                "linear-gradient(to right, #DA6D25 0%, #3A3285 50%, #B3B6D5 100%)",
                "linear-gradient(to right, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.85) 100%)"
              ]
            }
          }
        },
        "typography": {
          "type": "object",
          "description": "Font families and sizes. If a specified font is unavailable, renderer should pick a substitute from a defined fallback list or default.",
          "properties": {
            "title_font": {
              "type": "string",
              "description": "Preferred font for main titles (H1, H2) on content slides. If unavailable, renderer should substitute from fallback list or default."
            },
            "body_font": {
              "type": "string",
              "description": "Preferred font for body text on content slides. If unavailable, renderer should substitute from fallback list or default."
            },
            "footer_font": {
              "type": "string",
              "description": "Preferred font for footer text. If unavailable, renderer should substitute from fallback list or default."
            },
            "title_slide_title_font": {
              "type": "string",
              "description": "Optional. Font override for the main title on the title slide only (e.g. Georgia, 'Times New Roman', serif). When set, overrides title_font for the title slide. Useful when the title slide uses a distinct typographic treatment."
            },
            "title_slide_body_font": {
              "type": "string",
              "description": "Optional. Font override for subtitle / body text on the title slide only (e.g. Arial, Helvetica, sans-serif). When set, overrides body_font for the title slide."
            },
            "title_slide_title_size": {
              "type": "string",
              "description": "Title slide main title (e.g. 88px)."
            },
            "title_slide_subtitle_size": {
              "type": "string",
              "description": "Title slide subtitle (e.g. 28px)."
            },
            "slide_title_size": {
              "type": "string",
              "description": "Regular slide titles (e.g. 36px)."
            },
            "body_text_size": {
              "type": "string",
              "description": "Body text (e.g. 16px)."
            },
            "footer_text_size": {
              "type": "string",
              "description": "Footer text (e.g. 14px)."
            }
          }
        },
        "layout": {
          "type": "object",
          "description": "Page dimensions and, for slide, title-slide logo sizing. For resume use page size only (e.g. 8.27in x 11.69in A4); omit title_logo_* when no logo.",
          "properties": {
            "slide_width": {
              "type": "string",
              "description": "Slide width (e.g. 13.333in) or page width (e.g. 8.27in for A4)."
            },
            "slide_height": {
              "type": "string",
              "description": "Slide height (e.g. 7.5in) or page height (e.g. 11.69in for A4)."
            },
            "aspect_ratio": {
              "type": "string",
              "description": "Aspect ratio (e.g. 16 / 9 or 4 / 3) or page ratio (e.g. 8.27 / 11.69 for A4)."
            },
            "title_logo_max_height": {
              "type": "string",
              "description": "Title slide logo max height (e.g. 64px). Omit for resume."
            },
            "title_logo_max_width": {
              "type": "string",
              "description": "Title slide logo max width (e.g. 400px). Omit for resume."
            }
          }
        }
      }
    },
    "layout_hints": {
      "type": "object",
      "description": "Optional layout structure hints (title slide style, section separator, bullet indentation). Advisory; renderers may interpret or ignore.",
      "properties": {
        "title_slide_style": {
          "type": "string",
          "description": "Title slide layout or style hint."
        },
        "section_break_style": {
          "type": "string",
          "description": "Section separator styling hint."
        }
      },
      "additionalProperties": false
    },
    "accessibility": {
      "type": "object",
      "description": "Accessibility preferences. Advisory; not enforced.",
      "properties": {
        "high_contrast": {
          "type": "boolean",
          "description": "Prefer high-contrast styling. Advisory."
        },
        "preferred_font_size": {
          "type": "string",
          "description": "Preferred base font size. Advisory."
        }
      },
      "additionalProperties": false
    },
    "contact": {
      "type": "object",
      "description": "Contact information (title slide or document owner; for resume, the candidate name, title, email, location).",
      "properties": {
        "name": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "email": {
          "type": "string",
          "format": "email"
        },
        "location": {
          "type": "string"
        }
      }
    },
    "voice": {
      "type": "object",
      "description": "Default narration for this theme. When voice_id is set, it references an onboarded voice (GET /voices). Otherwise use tier (system or premium) and optional voice_identifier. Internal TTS backends are not exposed.",
      "properties": {
        "voice_id": {
          "type": "string",
          "description": "Onboarded voice identifier (deckrun://voices/...). Takes precedence when set. Use the id returned from POST /voices."
        },
        "tier": {
          "type": "string",
          "enum": ["system", "premium"],
          "description": "Narration tier when voice_id is not set. system = built-in voice (all plans); premium = high-fidelity expressive voice (paid plans)."
        },
        "voice_identifier": {
          "type": "string",
          "description": "Opaque backend voice id for premium tier."
        },
        "credential_id": {
          "type": "string",
          "description": "Optional credential reference for premium tier."
        }
      }
    },
    "language": {
      "type": "object",
      "description": "Default slide and narration language; used for metadata, defaults, and schema hints. POST /generate can override.",
      "properties": {
        "slide_language": {
          "type": "string",
          "description": "Primary language of deck (e.g. en, es). BCP 47 or ISO 639-1."
        },
        "notes_language": {
          "type": "string",
          "description": "Language of slide notes in markdown."
        },
        "audio_language": {
          "type": "string",
          "description": "Narration language; can differ from notes_language when translate is true."
        },
        "translate": {
          "type": "boolean",
          "description": "When true, translate notes to audio_language before TTS. Default false."
        }
      }
    },
    "image": {
      "type": "object",
      "description": "Optional default for image generation (future). POST /generate can pass image_override.",
      "properties": {
        "provider_id": {
          "type": "string",
          "description": "e.g. url, openai, google. GET /providers lists image providers."
        },
        "credential_id": {
          "type": "string"
        },
        "options": {
          "type": "object",
          "additionalProperties": true
        }
      }
    },
    "template": {
      "type": "object",
      "description": "Optional custom theme or template.",
      "properties": {
        "theme_id": {
          "type": "string",
          "description": "Reference to a theme."
        },
        "template_id": {
          "type": "string",
          "description": "Reference to a template."
        }
      }
    },
    "paths": {
      "type": "object",
      "properties": {
        "template_dir": {
          "type": "string",
          "description": "Template directory (relative or absolute)."
        }
      }
    }
  }
}
