{
  "kata": "0.1",
  "system": {
    "name": "Alewa",
    "compiledFrom": [
      { "kind": "tokens", "ref": "alewa-design-system/tokens.css", "method": "parsed" },
      { "kind": "components", "ref": "alewa-design-system/alewa.css", "method": "parsed" },
      { "kind": "styleguide", "ref": "alewa-design-system/index.html", "method": "rendered inspection" },
      { "kind": "note", "ref": "alewa-design-system/README.md", "method": "human-written prose" }
    ],
    "compiledAt": "2026-08-02",
    "widths": [1440, 900, 390],
    "complete": true,
    "note": "Written before it was compiled, which is why almost nothing here is a guess."
  },

  "surfaces": {
    "product": {
      "description": "The Alewa application. Every screen a person works in.",
      "appliesTo": ["src/**", "app/**"],
      "roles": {
        "page":          { "value": "#FBF5E4", "confidence": "stated", "role": "the warm paper the product sits on" },
        "surface":       { "value": "#FFFFFF", "confidence": "stated", "role": "raised things: cards, rows, sheets" },
        "surfaceSunk":   { "value": "#FBF7EA", "confidence": "stated", "role": "inset things: draft bodies, wells" },
        "surfaceTint":   { "value": "#FDF9EC", "confidence": "stated", "role": "quiet cards that sit on the page" },
        "line":          { "value": "#ECE4D0", "confidence": "stated" },
        "lineStrong":    { "value": "#DDD4BD", "confidence": "stated" },
        "ink":           { "value": "#171412", "confidence": "stated", "role": "headlines, primary text" },
        "inkMuted":      { "value": "#6D675C", "confidence": "stated", "role": "body text, descriptions" },
        "inkSoft":       { "value": "#A39C8E", "confidence": "stated", "role": "labels, metadata, timestamps" },
        "inkInverse":    { "value": "#FBF5E4", "confidence": "stated" },

        "needsYou":      { "value": "#F5BA4B", "confidence": "stated", "role": "top of your day, wants attention" },
        "needsYouWash":  { "value": "#FDF1DC", "confidence": "stated" },
        "needsYouEdge":  { "value": "#ECCF9B", "confidence": "stated" },
        "handled":       { "value": "#2FAE53", "confidence": "stated", "role": "sent, approved, done" },
        "handledWash":   { "value": "#E8F6EC", "confidence": "stated" },
        "reason":        { "value": "#2F6FED", "confidence": "stated", "role": "why Alewa ranked it, links" },
        "reasonInk":     { "value": "#2A56B8", "confidence": "stated" },
        "reasonWash":    { "value": "#EEF3FF", "confidence": "stated" },
        "quiet":         { "value": "#A39C8E", "confidence": "stated", "role": "set aside, out of your way" },
        "danger":        { "value": "#D94F3D", "confidence": "stated", "role": "disconnect, delete, destructive" },
        "dangerWash":    { "value": "#FDECE9", "confidence": "stated" }
      },
      "note": "Colour is named for the job it does, never for its hue. There is exactly one reason to reach for each of these, and the name says what that reason is."
    },

    "productDark": {
      "description": "The same roles at night. Values move, meanings do not.",
      "appliesTo": ["src/**", "app/**"],
      "activatedBy": ["prefers-color-scheme: dark", "[data-theme=\"dark\"]"],
      "roles": {
        "ink":        { "value": "#F7F1E1", "confidence": "stated" },
        "inkMuted":   { "value": "#ACA595", "confidence": "stated" },
        "inkSoft":    { "value": "#7C7566", "confidence": "stated" },
        "handled":    { "value": "#45C06A", "confidence": "stated" },
        "reason":     { "value": "#7BA4FF", "confidence": "stated" },
        "reasonInk":  { "value": "#A8C2FF", "confidence": "stated" }
      },
      "note": "No component edit is needed to switch themes, because no component ever referred to a hue."
    }
  },

  "type": {
    "pairing": {
      "display": "Plus Jakarta Sans",
      "text": "Public Sans",
      "mono": "ui-monospace, SFMono-Regular, Menlo",
      "confidence": "stated",
      "why": "Personality in the letterforms, restraint in the layout. Jolly enough to feel like an everyday product, serious enough for software that handles contracts."
    },
    "scale": {
      "displayXl": "clamp(2.9rem, 7.6vw, 5.6rem)",
      "displayL":  "clamp(2.2rem, 4.8vw, 3.7rem)",
      "displayM":  "clamp(1.7rem, 3.4vw, 2.5rem)",
      "bodyL": "1.12rem", "body": "1rem", "bodyS": ".92rem", "micro": ".74rem",
      "confidence": "stated"
    }
  },

  "space": {
    "scale": [4, 8, 12, 16, 20, 24, 32, 40, 48, 64, 80, 110],
    "enforce": true,
    "sectionRhythm": 110,
    "confidence": "stated",
    "note": "Off-scale padding, margin or gap is a violation."
  },

  "radius": {
    "xs": 10, "sm": 14, "md": 18, "lg": 22, "xl": 28, "pill": 999,
    "confidence": "stated",
    "rule": "Round, not sharp. Pills for actions, generous radii everywhere else."
  },

  "composition": {
    "breakpoints": [
      { "name": "compact", "max": 640, "intent": "single column, action drops below the row body", "confidence": "stated" },
      { "name": "stack", "max": 900, "intent": "styleguide and multi-column grids collapse", "confidence": "stated" }
    ],
    "alignment": [
      {
        "id": "balanced-display-lines",
        "rule": "Display type balances, body type uses pretty, and .a-line forces a break where meaning demands it.",
        "why": "Lines filled greedily until one word is stranded read as careless, because they are.",
        "check": "text-wrap: balance on display, pretty on body, and no rendered line holding fewer than three words.",
        "checkable": "model",
        "confidence": "stated"
      },
      {
        "id": "reason-travels-with-rank",
        "rule": "Anything ranked or drafted carries its reason in plain words, in the same component.",
        "why": "A rank without a reason is a black box, and this product's whole promise is that it is not one.",
        "check": "Any element bound to a rank or score renders an adjacent reason string.",
        "checkable": "model",
        "confidence": "stated"
      }
    ],
    "motion": [
      {
        "id": "respect-reduced-motion",
        "rule": "Every animation, including the draft typing effect, honours prefers-reduced-motion.",
        "check": "No animation or transition longer than 1ms inside a prefers-reduced-motion: reduce block.",
        "checkable": "auto",
        "confidence": "stated"
      }
    ]
  },

  "patterns": {
    "row": {
      "use": "One item in a ranked list, carrying a mark, a title, a sender and a written reason.",
      "neverUse": ["a grid of cards", "anything without a reason"],
      "confidence": "stated"
    },
    "chip": {
      "use": "One piece of status attached to an object.",
      "neverUse": ["a list of names", "navigation"],
      "instead": { "a list of names": "cluster of plain text" },
      "confidence": "stated"
    },
    "approvalLoop": {
      "kind": "pattern, not component",
      "use": "Any surface that can send, delete or commit on a person's behalf routes through an explicit approve action a person triggers.",
      "neverUse": ["a send that fires without a person", "an undo window presented as consent"],
      "confidence": "stated",
      "note": "This is a product promise, not a style preference. Alewa drafts. The person decides."
    },
    "iconSet": {
      "use": "30 stroked symbols on a 24 grid, inheriting currentColor.",
      "neverUse": ["emoji", "a second icon library", "the four-point sparkle"],
      "confidence": "stated"
    }
  },

  "prohibitions": [
    { "id": "no-window-chrome", "rule": "Nothing pretends to be a window. No traffic lights, no fake title bars.", "source": "stated", "checkable": "auto" },
    { "id": "no-emoji-icons", "rule": "Icons are drawn, never typed. No emoji anywhere in the interface.", "source": "stated", "checkable": "auto" },
    { "id": "no-sparkle", "rule": "No four-point sparkle, in any form. It is the universal badge for a machine made this.", "source": "stated", "checkable": "auto" },
    { "id": "no-exclamation", "rule": "No exclamation marks in product copy. This software handles contracts and money.", "source": "stated", "checkable": "auto" },
    { "id": "no-em-dash-fragments", "rule": "Finish sentences rather than stapling fragments together with an em dash.", "source": "stated", "checkable": "model" },
    { "id": "no-raw-hex", "rule": "Components never reference a raw colour. If you are about to type a hex, add a token instead.", "source": "stated", "checkable": "auto" },
    { "id": "no-unattended-send", "rule": "No surface sends, deletes or commits on its own.", "source": "stated", "checkable": "model" },
    { "id": "say-alewa-not-ai", "rule": "Say Alewa, not AI. Name the reason in full rather than labelling it.", "source": "stated", "checkable": "model" }
  ],

  "accessibility": [
    { "id": "one-focus-treatment", "rule": "One focus ring, applied globally. Never removed.", "checkable": "auto" },
    { "id": "colour-never-alone", "rule": "Colour never carries meaning alone. The ranked row pairs its mark with a number and a written reason.", "checkable": "model" },
    { "id": "rows-are-keyboard-reachable", "rule": "Interactive rows respond to Enter and Space.", "checkable": "auto" }
  ],

  "conflicts": [],

  "unspecified": [
    { "id": "density-scale", "question": "Is there a compact density for power users, and what changes at it?", "assumed": "One density only.", "raisedBy": "compile", "severity": "medium", "status": "open" },
    { "id": "data-table", "question": "There is no table component. Rows cover lists, but reporting will need columns.", "assumed": "None exists yet.", "raisedBy": "compile", "severity": "low", "status": "open" }
  ]
}
