{
  "$schema": "https://design-tokens.github.io/community-group/format/",
  "$description": "moss design tokens. Single source of truth for the CSS :root token block; regenerated into src-tauri/src/assets/css/site.css by `cargo run --bin generate-contract-docs --features dev-tools`.",
  "$order": ["typography", "color", "layout", "spacing"],
  "typography": {
    "$description": "Font families and sizes",
    "moss-font-body": {
      "$type": "fontFamily",
      "$value": "-apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', 'WenQuanYi Micro Hei', sans-serif",
      "$description": "Body text font stack"
    },
    "moss-font-heading": {
      "$type": "fontFamily",
      "$value": "'Iowan Old Style', Athelas, 'Palatino Linotype', Palatino, 'Book Antiqua', 'Songti SC', 'Songti TC', 'STSongti', 'Noto Serif CJK SC', 'Source Han Serif SC', 'NSimSun', 'SimSun', serif",
      "$description": "Heading font stack: serif by default for editorial weight"
    },
    "moss-font-mono": {
      "$type": "fontFamily",
      "$value": "ui-monospace, 'Cascadia Code', 'SF Mono', SFMono-Regular, 'JetBrains Mono', Menlo, Consolas, 'Liberation Mono', 'Courier New', monospace",
      "$description": "Monospace stack for code"
    },
    "moss-font-size-base": {
      "$type": "dimension",
      "$value": "1.125rem",
      "$description": "Base font size"
    },
    "moss-font-size": {
      "$type": "dimension",
      "$value": "var(--moss-font-size-base)",
      "$description": "Default font size (defaults to base)"
    },
    "moss-font-weight": {
      "$type": "number",
      "$value": "320",
      "$description": "Default body font weight"
    }
  },
  "color": {
    "$description": "Color palette",
    "moss-color-accent": {
      "$type": "color",
      "$value": "#2d5a2d",
      "$description": "Links, highlights, accent elements"
    },
    "moss-color-accent-quiet": {
      "$type": "color",
      "$value": "rgba(45, 90, 45, 0.28)",
      "$description": "Quiet accent for ambient indicators (hairlines, tree-row left-borders). ~28% opacity of moss-color-accent. Consumed by the breadcrumb and preview hairlines (ADR-015 Ambient renderer)."
    },
    "moss-color-bg": {
      "$type": "color",
      "$value": "#faf8f5",
      "$description": "Page background"
    },
    "moss-color-muted": {
      "$type": "color",
      "$value": "#8a8580",
      "$description": "Secondary/muted text"
    },
    "moss-color-surface": {
      "$type": "color",
      "$value": "#f4f1ec",
      "$description": "Card and surface background"
    },
    "moss-color-text": {
      "$type": "color",
      "$value": "#2c2825",
      "$description": "Primary text"
    }
  },
  "layout": {
    "$description": "Content widths and layout",
    "$comment": "Do NOT add a `moss-nav-width` token here. The nav reads `var(--moss-nav-width, var(--moss-content-width))` in site.css, so nav-width is an intentional opt-in (unset by default) that lets the nav track --moss-content-width — including per-page content_width=wide/full overrides set on <body>. A `:root` alias `--moss-nav-width: var(--moss-content-width)` freezes at :root's value and breaks the wide preset; the test `test_css_nav_width_not_aliased_in_root` guards against re-adding it.",
    "moss-container-padding": {
      "$type": "dimension",
      "$value": "clamp(1rem, 5vw, 2rem)",
      "$description": "Container side padding"
    },
    "moss-content-width": {
      "$type": "dimension",
      "$value": "67ch",
      "$description": "Maximum content width"
    },
    "moss-content-width-sidebar": {
      "$type": "dimension",
      "$value": "62ch",
      "$description": "Content width when sidebar is active"
    },
    "moss-sidebar-width": {
      "$type": "dimension",
      "$value": "280px",
      "$description": "Sidebar width"
    },
    "moss-site-max-width": {
      "$type": "dimension",
      "$value": "1200px",
      "$description": "Maximum overall site width"
    }
  },
  "spacing": {
    "$description": "Spacing scale",
    "moss-space-xs": {
      "$type": "dimension",
      "$value": "0.5rem",
      "$description": "Extra small (8px)"
    },
    "moss-space-sm": {
      "$type": "dimension",
      "$value": "1rem",
      "$description": "Small (16px)"
    },
    "moss-space-md": {
      "$type": "dimension",
      "$value": "1.5rem",
      "$description": "Medium (24px)"
    },
    "moss-space-lg": {
      "$type": "dimension",
      "$value": "2rem",
      "$description": "Large (32px)"
    },
    "moss-space-xl": {
      "$type": "dimension",
      "$value": "3rem",
      "$description": "Extra large (48px)"
    },
    "moss-space-2xl": {
      "$type": "dimension",
      "$value": "4rem",
      "$description": "Double extra large (64px)"
    }
  }
}
