{
  "$schema": "https://design-tokens.github.io/community-group/format/",
  "$description": "dot+ Base v1.1 design tokens. W3C Design Tokens Community Group format. Compatible with Tokens Studio for Figma and Style Dictionary.",

  "primitive": {
    "mono": {
      "0":    { "$value": "#FFFFFF", "$type": "color" },
      "50":   { "$value": "#FAFAFC", "$type": "color" },
      "100":  { "$value": "#F2F2F5", "$type": "color" },
      "200":  { "$value": "#E6E6EB", "$type": "color" },
      "300":  { "$value": "#C8C8D4", "$type": "color" },
      "400":  { "$value": "#9494A3", "$type": "color" },
      "500":  { "$value": "#6B6B78", "$type": "color" },
      "600":  { "$value": "#2E2E38", "$type": "color" },
      "700":  { "$value": "#222229", "$type": "color" },
      "800":  { "$value": "#18181F", "$type": "color" },
      "900":  { "$value": "#0F0F14", "$type": "color" },
      "1000": { "$value": "#05050A", "$type": "color" }
    },
    "accent": {
      "positive": { "$value": "#05944F", "$type": "color", "$description": "Success, done, connected" },
      "warning":  { "$value": "#BB7A00", "$type": "color", "$description": "Pending, queued, partial" },
      "negative": { "$value": "#E11900", "$type": "color", "$description": "Recording, error, critical" },
      "info":     { "$value": "#276EF1", "$type": "color", "$description": "Links, badges, AI model" }
    },
    "mark": {
      "$description": "Logo-only colors. Pure values for OLED punch in app icon grids. NEVER reference these from UI components — those use mono.* via semantic tokens.",
      "ink":       { "$value": "#000000", "$type": "color", "$description": "Pure black — disc on Paper canvas, default mark color on light surfaces" },
      "paper":     { "$value": "#FFFFFF", "$type": "color", "$description": "Pure white — icon canvas, wordmark, text mark, default mark color on dark surfaces" },
      "recording": { "$value": "{primitive.accent.negative}", "$type": "color", "$description": "Disc color for the recording-state logo variant ONLY. Same hex as accent.negative; aliased to give the logo its own semantic. Use during active audio capture (nav indicator, splash, watch complication, record button). Never use as a generic accent." }
    }
  },

  "semantic": {
    "$description": "Two modes: dark (primary at launch) and light. Components MUST reference semantic tokens, never primitives.",
    "dark": {
      "surface": {
        "primary":   { "$value": "{primitive.mono.900}",  "$type": "color" },
        "secondary": { "$value": "{primitive.mono.800}",  "$type": "color" },
        "tertiary":  { "$value": "{primitive.mono.700}",  "$type": "color" },
        "inverse":   { "$value": "{primitive.mono.50}",   "$type": "color" },
        "overlay":   { "$value": "rgba(5,5,10,0.7)",      "$type": "color" }
      },
      "content": {
        "primary":   { "$value": "{primitive.mono.0}",    "$type": "color" },
        "secondary": { "$value": "{primitive.mono.300}",  "$type": "color" },
        "tertiary":  { "$value": "{primitive.mono.500}",  "$type": "color" },
        "disabled":  { "$value": "{primitive.mono.600}",  "$type": "color" },
        "inverse":   { "$value": "{primitive.mono.1000}", "$type": "color" }
      },
      "border": {
        "opaque":    { "$value": "{primitive.mono.600}",  "$type": "color" },
        "subtle":    { "$value": "{primitive.mono.700}",  "$type": "color" }
      },
      "state": {
        "positive":  { "$value": "{primitive.accent.positive}", "$type": "color" },
        "warning":   { "$value": "{primitive.accent.warning}",  "$type": "color" },
        "negative":  { "$value": "{primitive.accent.negative}", "$type": "color" },
        "info":      { "$value": "{primitive.accent.info}",     "$type": "color" }
      },
      "shadow": {
        "1": { "$value": "none", "$type": "shadow", "$description": "Dark mode uses surface tonal lift instead of shadow" },
        "2": { "$value": "none", "$type": "shadow" },
        "3": { "$value": "none", "$type": "shadow" }
      }
    },
    "light": {
      "surface": {
        "primary":   { "$value": "{primitive.mono.0}",    "$type": "color" },
        "secondary": { "$value": "{primitive.mono.50}",   "$type": "color" },
        "tertiary":  { "$value": "{primitive.mono.100}",  "$type": "color" },
        "inverse":   { "$value": "{primitive.mono.1000}", "$type": "color" },
        "overlay":   { "$value": "rgba(5,5,10,0.4)",      "$type": "color" }
      },
      "content": {
        "primary":   { "$value": "{primitive.mono.1000}", "$type": "color" },
        "secondary": { "$value": "{primitive.mono.600}",  "$type": "color" },
        "tertiary":  { "$value": "{primitive.mono.500}",  "$type": "color" },
        "disabled":  { "$value": "{primitive.mono.300}",  "$type": "color" },
        "inverse":   { "$value": "{primitive.mono.0}",    "$type": "color" }
      },
      "border": {
        "opaque":    { "$value": "{primitive.mono.200}",  "$type": "color" },
        "subtle":    { "$value": "{primitive.mono.100}",  "$type": "color" }
      },
      "state": {
        "positive":  { "$value": "{primitive.accent.positive}", "$type": "color" },
        "warning":   { "$value": "{primitive.accent.warning}",  "$type": "color" },
        "negative":  { "$value": "{primitive.accent.negative}", "$type": "color" },
        "info":      { "$value": "{primitive.accent.info}",     "$type": "color" }
      },
      "shadow": {
        "1": { "$value": { "color": "rgba(0,0,0,0.08)", "offsetX": "0", "offsetY": "1px",  "blur": "2px",  "spread": "0" }, "$type": "shadow", "$description": "Cards" },
        "2": { "$value": { "color": "rgba(0,0,0,0.10)", "offsetX": "0", "offsetY": "4px",  "blur": "12px", "spread": "0" }, "$type": "shadow", "$description": "Popovers, dropdowns" },
        "3": { "$value": { "color": "rgba(0,0,0,0.16)", "offsetX": "0", "offsetY": "12px", "blur": "32px", "spread": "0" }, "$type": "shadow", "$description": "Modals, sheets" }
      }
    }
  },

  "spacing": {
    "1": { "$value": "4px",  "$type": "dimension", "$description": "Icon-label gap" },
    "2": { "$value": "8px",  "$type": "dimension", "$description": "Within-component padding" },
    "3": { "$value": "12px", "$type": "dimension", "$description": "Card padding, button padding" },
    "4": { "$value": "16px", "$type": "dimension", "$description": "Screen edge margin, between cards" },
    "5": { "$value": "20px", "$type": "dimension", "$description": "Section spacing" },
    "6": { "$value": "24px", "$type": "dimension", "$description": "Major section breaks" },
    "7": { "$value": "32px", "$type": "dimension", "$description": "Above section headers" },
    "8": { "$value": "48px", "$type": "dimension", "$description": "Top of screen padding" }
  },

  "radius": {
    "xs": { "$value": "4px",  "$type": "dimension", "$description": "Tags, badges, micro" },
    "sm": { "$value": "8px",  "$type": "dimension", "$description": "Cards, inputs, buttons, toggles" },
    "md": { "$value": "12px", "$type": "dimension", "$description": "Bottom sheet" },
    "lg": { "$value": "16px", "$type": "dimension", "$description": "Full-screen sheet (ceiling)" }
  },

  "font": {
    "family": {
      "sans": { "$value": "Inter, -apple-system, sans-serif", "$type": "fontFamily" },
      "mono": { "$value": "JetBrains Mono, SF Mono, monospace", "$type": "fontFamily" }
    },
    "weight": {
      "regular":  { "$value": 400, "$type": "fontWeight" },
      "medium":   { "$value": 500, "$type": "fontWeight" },
      "semibold": { "$value": 600, "$type": "fontWeight" },
      "bold":     { "$value": 700, "$type": "fontWeight" }
    }
  },

  "typography": {
    "display":    { "$type": "typography", "$value": { "fontFamily": "{font.family.sans}", "fontWeight": "{font.weight.bold}",     "fontSize": "32px", "lineHeight": "36px", "letterSpacing": "-1px"   }, "$description": "Screen titles" },
    "headline":   { "$type": "typography", "$value": { "fontFamily": "{font.family.sans}", "fontWeight": "{font.weight.bold}",     "fontSize": "22px", "lineHeight": "28px", "letterSpacing": "-0.4px" }, "$description": "Section titles, card headers" },
    "title":      { "$type": "typography", "$value": { "fontFamily": "{font.family.sans}", "fontWeight": "{font.weight.semibold}", "fontSize": "18px", "lineHeight": "24px", "letterSpacing": "-0.2px" }, "$description": "Nav bar, meeting titles" },
    "body":       { "$type": "typography", "$value": { "fontFamily": "{font.family.sans}", "fontWeight": "{font.weight.regular}",  "fontSize": "15px", "lineHeight": "22px", "letterSpacing": "0"      }, "$description": "Body text" },
    "bodyStrong": { "$type": "typography", "$value": { "fontFamily": "{font.family.sans}", "fontWeight": "{font.weight.semibold}", "fontSize": "15px", "lineHeight": "22px", "letterSpacing": "0"      }, "$description": "Emphasized body, button text" },
    "label":      { "$type": "typography", "$value": { "fontFamily": "{font.family.sans}", "fontWeight": "{font.weight.medium}",   "fontSize": "13px", "lineHeight": "18px", "letterSpacing": "0"      }, "$description": "List rows, form labels" },
    "caption":    { "$type": "typography", "$value": { "fontFamily": "{font.family.mono}", "fontWeight": "{font.weight.regular}",  "fontSize": "11px", "lineHeight": "14px", "letterSpacing": "0"      }, "$description": "Timestamps, metadata" }
  },

  "motion": {
    "duration": {
      "instant": { "$value": "0ms",   "$type": "duration" },
      "fast":    { "$value": "150ms", "$type": "duration", "$description": "State changes (toggle, button press)" },
      "medium":  { "$value": "300ms", "$type": "duration", "$description": "Sheet presentation" }
    },
    "easing": {
      "easeInOut": { "$value": "cubic-bezier(0.4, 0, 0.2, 1)", "$type": "cubicBezier" },
      "easeOut":   { "$value": "cubic-bezier(0.0, 0, 0.2, 1)", "$type": "cubicBezier" }
    }
  },

  "components": {
    "$description": "Component contracts — required tokens for each Base-aligned component. dot+ extensions are listed separately.",

    "button": {
      "$class": "Base",
      "sizes": {
        "mini":    { "height": "28px", "paddingX": "{spacing.3}", "typography": "{typography.label}" },
        "small":   { "height": "36px", "paddingX": "14px",        "typography": "{typography.label}" },
        "default": { "height": "48px", "paddingX": "{spacing.4}", "typography": "{typography.bodyStrong}" },
        "large":   { "height": "56px", "paddingX": "{spacing.5}", "typography": "{typography.bodyStrong}" }
      },
      "shapes": ["default", "pill", "square", "circle"],
      "variants": {
        "primary":     { "background": "{semantic.surface.inverse}",   "content": "{semantic.content.inverse}", "border": "none" },
        "secondary":   { "background": "{semantic.surface.tertiary}",  "content": "{semantic.content.primary}", "border": "none" },
        "tertiary":    { "background": "transparent",                  "content": "{semantic.content.primary}", "border": "1px {semantic.border.opaque}" },
        "destructive": { "background": "{semantic.state.negative}",    "content": "#FFFFFF",                    "border": "none" }
      },
      "minHitTarget": "44px",
      "haptic": "light"
    },

    "tag": {
      "$class": "Base",
      "$rename": "Renamed from Pill in v1.0",
      "height": "24px",
      "paddingX": "{spacing.2}",
      "radius": "{radius.xs}",
      "typography": "{typography.caption}",
      "variants": {
        "default":  { "background": "{semantic.surface.tertiary}",                         "content": "{semantic.content.primary}" },
        "positive": { "background": "color-mix({semantic.state.positive}, 16%)",           "content": "{semantic.state.positive}" },
        "warning":  { "background": "color-mix({semantic.state.warning}, 16%)",            "content": "{semantic.state.warning}" },
        "negative": { "background": "color-mix({semantic.state.negative}, 16%)",           "content": "{semantic.state.negative}" },
        "info":     { "background": "color-mix({semantic.state.info}, 16%)",               "content": "{semantic.state.info}" }
      }
    },

    "card": {
      "$class": "Base",
      "background": "{semantic.surface.secondary}",
      "radius": "{radius.sm}",
      "padding": "{spacing.3}",
      "borderDark": "none",
      "borderLight": "1px {semantic.border.subtle}",
      "rowDivider": "1px {semantic.border.subtle}"
    },

    "input": {
      "$class": "Base",
      "height": "48px",
      "background": "{semantic.surface.tertiary}",
      "borderDefault": "1px transparent",
      "borderFocus": "1px {semantic.state.info}",
      "borderError": "1px {semantic.state.negative}",
      "radius": "{radius.sm}",
      "paddingX": "14px",
      "labelTypography": "{typography.label}",
      "captionTypography": "{typography.caption}"
    },

    "toggle": {
      "$class": "Base",
      "trackSize": { "width": "42px", "height": "24px" },
      "knobSize":  { "width": "20px", "height": "20px" },
      "onTrack":  "{semantic.surface.inverse}",
      "offTrack": "{semantic.border.opaque}",
      "knob":     "{semantic.surface.primary}",
      "animation": "{motion.duration.fast} {motion.easing.easeInOut}"
    },

    "navBar": {
      "$class": "Base",
      "height": "52px",
      "background": "{semantic.surface.primary}",
      "titleTypography": "{typography.title}",
      "backTypography": "{typography.body}",
      "actionTypography": "{typography.bodyStrong}"
    },

    "tabBar": {
      "$class": "dot+ extension",
      "$note": "Not a Base component — iOS-only pattern. Use because Base has no bottom tab bar.",
      "height": "80px",
      "background": "{semantic.surface.primary}",
      "borderTop": "1px {semantic.border.subtle}",
      "activeContent": "{semantic.content.primary}",
      "inactiveContent": "{semantic.content.tertiary}",
      "labelTypography": "{typography.caption}"
    }
  }
}
