{
  "version": "0.1.0",
  "categories": [
    {
      "slug": "forms",
      "title": "Forms",
      "summary": "Labels, validation and errors that help people finish, and never lose their work.",
      "rules": [
        {
          "id": "FORM-01",
          "title": "Every input has a visible label",
          "category": "forms",
          "level": "MUST",
          "why": "Placeholder text disappears as soon as someone types, is usually low contrast, and is not a reliable label for screen readers.",
          "do": "Put a `<label>` above each field that stays visible while typing.",
          "dont": "Use the placeholder as the only label, such as a lone \"Email\" inside the field.",
          "check": "auto",
          "test": "Every `input`, `select` and `textarea` has a programmatic label through `label[for]`, a wrapping label or `aria-labelledby`."
        },
        {
          "id": "FORM-02",
          "title": "Validate when people leave a field, not while they type",
          "category": "forms",
          "level": "MUST",
          "why": "An error that appears after the first character punishes people before they are done.",
          "do": "Validate on blur and on submit. Once a field shows an error, re-check it live so the error clears the moment it is fixed.",
          "dont": "Show \"Invalid email\" after the first keystroke.",
          "check": "walkthrough",
          "test": "Type a partial value and confirm no error appears until focus leaves the field."
        },
        {
          "id": "FORM-03",
          "title": "Errors say what is wrong and how to fix it, next to the field",
          "category": "forms",
          "level": "MUST",
          "why": "People fix what they can see. A vague message or a banner far from the field turns a typo into a search.",
          "do": "Write \"Password needs at least 8 characters\" directly under the field and connect it with `aria-describedby`. On submit, move focus to the first field with an error.",
          "dont": "Write \"Invalid input\", or show only a summary banner at the top of a long form.",
          "check": "walkthrough",
          "test": "Submit an invalid form. Each error sits next to its field, names the fix, and focus moves to the first error."
        },
        {
          "id": "FORM-04",
          "title": "Never lose what someone typed",
          "category": "forms",
          "level": "MUST",
          "why": "A form that clears itself after an error is the fastest way to lose someone's trust.",
          "do": "Keep every value after a failed submit. Warn before leaving a page with unsaved changes. Restore drafts for long forms.",
          "dont": "Reset the form when the server returns an error.",
          "check": "walkthrough",
          "test": "Fill the form, force a server error and confirm every value is still there."
        },
        {
          "id": "FORM-05",
          "title": "Use the right input type and autocomplete",
          "category": "forms",
          "level": "SHOULD",
          "why": "The right type gives mobile users the right keyboard, and autocomplete lets browsers and password managers fill fields for them.",
          "do": "Use `type=\"email\"`, `inputmode=\"numeric\"`, `autocomplete=\"email\"` and `autocomplete=\"one-time-code\"`.",
          "dont": "Make every field `type=\"text\"`, or turn autocomplete off on login forms.",
          "check": "auto",
          "test": "Email, phone, password, address and one-time-code fields have matching `type` and `autocomplete` values."
        },
        {
          "id": "FORM-06",
          "title": "Ask only for what you need now",
          "category": "forms",
          "level": "SHOULD",
          "why": "Every extra field lowers completion. Most can wait until the person actually needs the feature.",
          "do": "Move non-essential fields to later in the journey and mark optional fields \"(optional)\".",
          "dont": "Ask for a phone number, company size and job title just to create an account.",
          "check": "visual",
          "test": "Each required field is needed for the very next step."
        },
        {
          "id": "FORM-07",
          "title": "Group long forms into clear sections or steps",
          "category": "forms",
          "level": "SHOULD",
          "why": "A long, undivided column of fields feels like more work than it is, and makes it hard to see what belongs together.",
          "do": "Group related fields under short headings (Contact, Shipping, Payment), or split long flows into steps with a progress indicator. Order fields so earlier answers narrow later ones, such as country before city.",
          "dont": "Stack every field in one long column with equal spacing and no headings.",
          "check": "visual",
          "test": "Forms with more than about six fields have labeled groups or steps, and dependent fields come after the fields they depend on."
        }
      ]
    },
    {
      "slug": "states",
      "title": "States",
      "summary": "Empty, loading, error and edge-case states, beyond the happy path that agents tend to stop at.",
      "rules": [
        {
          "id": "STATE-01",
          "title": "Design every view for empty, loading, error and success",
          "category": "states",
          "level": "MUST",
          "why": "The happy path is one state out of at least four. The missing ones are the ones people remember.",
          "do": "Before calling a view done, build and preview its empty, loading, error and success states.",
          "dont": "Ship a list that only works once data exists.",
          "check": "walkthrough",
          "test": "Force each state (no data, slow network, failed request) and confirm each has a deliberate design."
        },
        {
          "id": "STATE-02",
          "title": "Empty states explain what goes here and offer the next step",
          "category": "states",
          "level": "MUST",
          "why": "An empty screen is a new user's first impression. It should teach, not shrug.",
          "do": "Say what will appear and add the action that fills it, for example \"No projects yet\" with a \"Create project\" button.",
          "dont": "Show a blank area, \"No data\" or a lonely table header.",
          "check": "walkthrough",
          "test": "Open each list or dashboard with no data. Each shows an explanation and a primary action."
        },
        {
          "id": "STATE-03",
          "title": "Loading keeps the layout stable",
          "category": "states",
          "level": "MUST",
          "why": "Content that jumps as it loads makes people click the wrong thing and feels broken.",
          "do": "Reserve space for content and images. Use skeletons shaped like the final layout for waits longer than about 300 ms.",
          "dont": "Flash a spinner for 50 ms, or let content push the page down when it arrives.",
          "check": "auto",
          "test": "Cumulative Layout Shift stays below 0.1, and images have width and height or an aspect ratio set."
        },
        {
          "id": "STATE-04",
          "title": "Errors explain what happened and offer a way out",
          "category": "states",
          "level": "MUST",
          "why": "A dead end makes people leave. A clear message and a retry keeps them going.",
          "do": "Say what failed in plain words, keep the rest of the page usable, and offer \"Try again\" or another route.",
          "dont": "Show \"Error 500\", a stack trace or a white screen.",
          "check": "walkthrough",
          "test": "Block the API and confirm the view shows a human message with a retry, and the rest of the app still works."
        },
        {
          "id": "STATE-05",
          "title": "Handle real-world content",
          "category": "states",
          "level": "SHOULD",
          "why": "Demo data is short and tidy. Real names are long, lists hold a thousand items, and images fail to load.",
          "do": "Test with 0, 1 and 1,000 items, 60-character names, missing images and large numbers. Truncate with a tooltip or wrap on purpose.",
          "dont": "Let a long name break the layout or overlap buttons.",
          "check": "walkthrough",
          "test": "Load stress data and look for overflow, overlap and broken images."
        }
      ]
    },
    {
      "slug": "feedback",
      "title": "Feedback",
      "summary": "Every action gets a response, and people always know whether something worked.",
      "rules": [
        {
          "id": "FEED-01",
          "title": "Every action responds within 100 ms",
          "category": "feedback",
          "level": "MUST",
          "why": "Beyond roughly 100 ms, an interface stops feeling instant and people start to doubt that their click landed.",
          "do": "Show a pressed state immediately. On submit, switch the button to a pending state with a spinner and keep its label.",
          "dont": "Show nothing until the server answers.",
          "check": "walkthrough",
          "test": "Throttle the network and click each primary action. Something visibly changes right away."
        },
        {
          "id": "FEED-02",
          "title": "Confirm completed actions in the action's own words",
          "category": "feedback",
          "level": "MUST",
          "why": "Consistent words teach people the product. \"Publish\" followed by \"Published\" closes the loop.",
          "do": "After \"Publish\", show \"Published\", ideally with a link to the result.",
          "dont": "Show a generic \"Success!\", or nothing at all.",
          "check": "visual",
          "test": "Each create, update and delete action ends with a confirmation that names the action."
        },
        {
          "id": "FEED-03",
          "title": "Prevent double submission",
          "category": "feedback",
          "level": "MUST",
          "why": "An impatient double click should never create two orders or two charges.",
          "do": "Disable the action while it is pending, and make the server request idempotent where money or data is involved.",
          "dont": "Leave the submit button active during the request.",
          "check": "walkthrough",
          "test": "Double-click every submit button on a slow connection and confirm only one request goes out."
        },
        {
          "id": "FEED-04",
          "title": "Show progress for anything longer than a few seconds",
          "category": "feedback",
          "level": "SHOULD",
          "why": "Around 10 seconds, people lose focus. Showing progress, and letting them do other things, keeps them in control.",
          "do": "Use determinate progress for uploads and imports. Let people leave the page and notify them when the task is done.",
          "dont": "Show an endless spinner for a two-minute import.",
          "check": "walkthrough",
          "test": "Start the slowest task in the app and confirm it shows progress and survives leaving the page."
        }
      ]
    },
    {
      "slug": "navigation",
      "title": "Navigation",
      "summary": "People always know where they are, how they got there, and how to get back.",
      "rules": [
        {
          "id": "NAV-01",
          "title": "People can always tell where they are",
          "category": "navigation",
          "level": "MUST",
          "why": "Without a clear \"you are here\", every page feels like the first visit.",
          "do": "Highlight the current nav item and mark it with `aria-current=\"page\"`. Make the page heading match the nav label.",
          "dont": "Use nav items that look identical whatever page you are on.",
          "check": "auto",
          "test": "On each page, exactly one nav item has `aria-current` and the `h1` matches its label."
        },
        {
          "id": "NAV-02",
          "title": "The back button works as expected",
          "category": "navigation",
          "level": "MUST",
          "why": "Back is the most-used button on the web. Breaking it breaks trust.",
          "do": "Put meaningful state in the URL (tabs, filters, search, open detail views). Restore scroll position when people go back.",
          "dont": "Make back leave the app from inside a single-page view, or reset filters.",
          "check": "walkthrough",
          "test": "Apply a filter, open an item and press back. The filtered list returns in the same scroll position."
        },
        {
          "id": "NAV-03",
          "title": "Links are links and buttons are buttons",
          "category": "navigation",
          "level": "MUST",
          "why": "Real links can be opened in a new tab, copied and read correctly by assistive technology. Click handlers on `div`s can't.",
          "do": "Use `<a href>` for going somewhere and `<button>` for doing something.",
          "dont": "Use `<div onClick>` for navigation, or `<a href=\"#\">` for actions.",
          "check": "auto",
          "test": "No clickable `div` or `span` elements, and every `a` has a real `href`."
        },
        {
          "id": "NAV-04",
          "title": "Keep primary navigation consistent",
          "category": "navigation",
          "level": "SHOULD",
          "why": "People learn where things are once. Moving them costs that learning every time.",
          "do": "Keep the same items, order and position on every page.",
          "dont": "Reorder or rename nav items between sections.",
          "check": "visual",
          "test": "Compare the nav across five pages. It's identical except for the current item."
        }
      ]
    },
    {
      "slug": "accessibility",
      "title": "Accessibility",
      "summary": "Contrast, keyboard, focus and alternatives, so the product works for everyone.",
      "rules": [
        {
          "id": "A11Y-01",
          "title": "Text has enough contrast",
          "category": "accessibility",
          "level": "MUST",
          "why": "Low contrast text is hard to read for many people, on every screen, in sunlight. (WCAG 1.4.3)",
          "do": "Use at least 4.5:1 for body text and 3:1 for large text (24 px, or 18.5 px bold) and for UI components.",
          "dont": "Use light grey text on white for anything people need to read.",
          "check": "auto",
          "test": "An automated contrast scan reports no failures."
        },
        {
          "id": "A11Y-02",
          "title": "Everything works with a keyboard, and focus is visible",
          "category": "accessibility",
          "level": "MUST",
          "why": "Keyboard and switch users need to reach every control, and see where they are. (WCAG 2.1.1, 2.4.7)",
          "do": "Use native controls, keep the tab order logical, and style `:focus-visible` with a clear outline.",
          "dont": "Set `outline: none` without a replacement.",
          "check": "walkthrough",
          "test": "Complete the main flow using only Tab, Shift+Tab, Enter, Space and Escape, with focus visible at every step."
        },
        {
          "id": "A11Y-03",
          "title": "Images and icon buttons have text alternatives",
          "category": "accessibility",
          "level": "MUST",
          "why": "A screen reader can't describe a picture or an icon it has no name for. (WCAG 1.1.1, 4.1.2)",
          "do": "Give meaningful images descriptive `alt` text and decorative ones `alt=\"\"`. Give icon-only buttons an `aria-label`.",
          "dont": "Ship an unlabeled trash-can button, or `alt=\"image\"`.",
          "check": "auto",
          "test": "Every `img` has an `alt` attribute and every button has an accessible name."
        },
        {
          "id": "A11Y-04",
          "title": "Never rely on color alone",
          "category": "accessibility",
          "level": "MUST",
          "why": "About 1 in 12 men have some form of color vision deficiency, and sunlight, grayscale mode and poor screens wash color out for everyone. (WCAG 1.4.1)",
          "do": "Pair color with an icon and a word: a tick and \"Paid\", an alert and \"Overdue\", a clock and \"Due soon\".",
          "dont": "Show status with a colored dot alone, or mark errors with only a red border.",
          "check": "visual",
          "test": "View the page in grayscale and confirm all states are still distinguishable."
        },
        {
          "id": "A11Y-05",
          "title": "Dialogs manage focus",
          "category": "accessibility",
          "level": "MUST",
          "why": "If focus escapes a modal, keyboard and screen reader users get lost behind it.",
          "do": "Move focus into the dialog when it opens, keep it inside, close on Escape, and return focus to the trigger.",
          "dont": "Open a modal that leaves focus on the page behind it.",
          "check": "walkthrough",
          "test": "Open each dialog with the keyboard, tab through it, press Escape and confirm focus returns to the trigger."
        },
        {
          "id": "A11Y-06",
          "title": "Respect reduced motion",
          "category": "accessibility",
          "level": "SHOULD",
          "why": "Large or constant motion can cause nausea and distraction for people with vestibular disorders.",
          "do": "Wrap non-essential animation in `@media (prefers-reduced-motion: no-preference)`, or tone it down under `reduce`.",
          "dont": "Autoplay parallax or large movements with no way out.",
          "check": "auto",
          "test": "With reduced motion enabled, no large movement animations run."
        }
      ]
    },
    {
      "slug": "content",
      "title": "Content",
      "summary": "Words that make the product easier to use, with clear actions, one name per thing, and plain language.",
      "rules": [
        {
          "id": "COPY-01",
          "title": "Buttons say what will happen",
          "category": "content",
          "level": "MUST",
          "why": "A specific verb tells people what they're committing to before they click.",
          "do": "Write \"Save changes\", \"Send invite\" or \"Create project\".",
          "dont": "Write \"Submit\", \"OK\", \"Continue\" or \"Click here\" when a specific verb exists.",
          "check": "visual",
          "test": "Every primary button label starts with a verb that describes its result."
        },
        {
          "id": "COPY-02",
          "title": "One name for one thing",
          "category": "content",
          "level": "MUST",
          "why": "If the same thing is called a project in one place and a workspace in another, people assume they are two different things.",
          "do": "Pick one term per concept and use it in nav, headings, buttons, toasts and emails.",
          "dont": "Mix synonyms like \"remove\" and \"delete\", or \"team\" and \"organization\", for the same action or object.",
          "check": "visual",
          "test": "List the nouns and verbs used across the app. Each concept has exactly one name."
        },
        {
          "id": "COPY-03",
          "title": "Use the user's words, not the system's",
          "category": "content",
          "level": "SHOULD",
          "why": "People think in tasks, not in how the product is built.",
          "do": "Write \"Notifications\" and \"Couldn't save. Check your connection\".",
          "dont": "Show \"Webhook config\", \"null\" or \"ERR_SYNC_409\".",
          "check": "visual",
          "test": "No internal codes, database field names or developer jargon in user-facing text."
        },
        {
          "id": "COPY-04",
          "title": "Write in sentence case and plain language",
          "category": "content",
          "level": "SHOULD",
          "why": "Sentence case reads faster than Title Case or ALL CAPS, and plain words work for everyone, including non-native speakers.",
          "do": "Put the key words first, keep sentences short, and write \"Change password\".",
          "dont": "Write \"Change Your Password Now\" or \"Utilize the configuration panel\".",
          "check": "visual",
          "test": "Headings and buttons use sentence case, and no sentence is longer than about 25 words."
        },
        {
          "id": "COPY-05",
          "title": "Error messages explain, reassure and help, without blame",
          "category": "content",
          "level": "MUST",
          "why": "Errors are stressful moments. A vague or blaming message makes people feel stupid; a clear one keeps them going.",
          "do": "Say what happened and why, reassure where you can, and give the next step: \"Your bank declined the payment. No money was taken. Try another card or contact your bank.\"",
          "dont": "Write \"Error: invalid request\", \"You entered the wrong details\" or \"Something went wrong\".",
          "check": "visual",
          "test": "Every error message names the problem in plain words, avoids blaming the person, and offers a way forward."
        }
      ]
    },
    {
      "slug": "actions",
      "title": "Destructive actions",
      "summary": "Deleting, cancelling and other actions people can't easily take back.",
      "rules": [
        {
          "id": "ACT-01",
          "title": "Make destructive actions look different and keep them apart",
          "category": "actions",
          "level": "MUST",
          "why": "If \"Delete\" looks like \"Save\" and sits right next to it, someone will eventually click the wrong one.",
          "do": "Use a distinct destructive style, and place destructive actions away from primary ones, for example in a menu or a \"Danger zone\" section.",
          "dont": "Put \"Delete\" and \"Save\" side by side in the same style.",
          "check": "visual",
          "test": "Every destructive action has a distinct style and isn't next to the primary action."
        },
        {
          "id": "ACT-02",
          "title": "Offer undo where you can, confirm where you can't",
          "category": "actions",
          "level": "MUST",
          "why": "Confirming everything trains people to click \"Yes\" without reading. Undo is faster and safer.",
          "do": "For reversible actions (archive, move to trash), act immediately and show an \"Undo\" toast. For irreversible actions, confirm first and name the object and the consequence.",
          "dont": "Ask \"Are you sure?\" for every action, or delete permanently with no warning.",
          "check": "walkthrough",
          "test": "Trigger each destructive action. Reversible ones offer undo, and irreversible ones explain what will be lost."
        },
        {
          "id": "ACT-03",
          "title": "Confirmation buttons name the action",
          "category": "actions",
          "level": "MUST",
          "why": "\"Yes\" and \"No\" force people to re-read the question. \"Delete project\" doesn't.",
          "do": "Label the buttons \"Delete project\" and \"Cancel\".",
          "dont": "Label them \"Yes\" and \"No\", or \"OK\" and \"Cancel\".",
          "check": "visual",
          "test": "No confirmation dialog uses Yes/No or OK as its action labels."
        },
        {
          "id": "ACT-04",
          "title": "Add friction in proportion to the stakes",
          "category": "actions",
          "level": "SHOULD",
          "why": "Deleting a whole account or repository deserves a deliberate step that a routine action doesn't.",
          "do": "For high-stakes, irreversible actions, ask people to type the object's name to confirm.",
          "dont": "Use the same one-click confirm for deleting a comment and deleting an account.",
          "check": "walkthrough",
          "test": "Account, workspace and bulk deletes require typing a name or a similar deliberate step."
        }
      ]
    },
    {
      "slug": "mobile",
      "title": "Touch and responsive",
      "summary": "Targets, zoom and layouts that hold up on small screens and real thumbs.",
      "rules": [
        {
          "id": "TOUCH-01",
          "title": "Touch targets are at least 44 by 44 px",
          "category": "mobile",
          "level": "MUST",
          "why": "Small targets cause mis-taps, especially in lists of links or icon rows. WCAG 2.2 AA sets 24 by 24 px as the minimum, and 44 px matches Apple's guidelines.",
          "do": "Give every tappable element a hit area of at least 44 by 44 CSS px, ideally 48 by 48, with at least 8 px between neighbors.",
          "dont": "Ship 16 px icon buttons placed edge to edge.",
          "check": "auto",
          "test": "Measure every interactive element at a mobile viewport. None has a hit area below 44 by 44 px."
        },
        {
          "id": "TOUCH-02",
          "title": "Works at 320 px wide without horizontal scrolling",
          "category": "mobile",
          "level": "MUST",
          "why": "Small phones and 400% browser zoom both end up around 320 CSS px wide. (WCAG 1.4.10)",
          "do": "Let layouts reflow into one column, wrap long words and make tables scroll inside their own container.",
          "dont": "Use fixed-width containers that push the page sideways.",
          "check": "auto",
          "test": "At 320 px viewport width, the page has no horizontal scroll."
        },
        {
          "id": "TOUCH-03",
          "title": "Never disable zoom",
          "category": "mobile",
          "level": "MUST",
          "why": "People with low vision rely on pinch-zoom. Blocking it locks them out. (WCAG 1.4.4)",
          "do": "Use `<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">`. Set inputs to at least 16 px text so iOS doesn't auto-zoom them.",
          "dont": "Add `user-scalable=no` or `maximum-scale=1`.",
          "check": "auto",
          "test": "The viewport meta tag doesn't restrict scaling."
        },
        {
          "id": "TOUCH-04",
          "title": "Keep primary actions within thumb reach",
          "category": "mobile",
          "level": "SHOULD",
          "why": "On large phones, the top corners are the hardest places to reach with one hand.",
          "do": "Put the main action of a mobile view near the bottom, for example as a sticky bottom bar or a bottom sheet.",
          "dont": "Put the only \"Save\" button in the top-right corner of a long mobile form.",
          "check": "visual",
          "test": "On a mobile viewport, the main action of each view sits in the lower half of the screen or stays sticky."
        },
        {
          "id": "TOUCH-05",
          "title": "Design first for the device where the core work happens",
          "category": "mobile",
          "level": "SHOULD",
          "why": "Mobile-first is a good default for quick interactions, but tools for writing, analysis or finance deliver most of their value on a large screen with a keyboard.",
          "do": "Decide where the most important task is done, design that experience first, then adapt it to the other devices.",
          "dont": "Squeeze a spreadsheet-heavy finance tool into a phone layout first, just because \"mobile-first\" is the rule.",
          "check": "walkthrough",
          "test": "The product's primary task is fully designed and tested on the device where people mostly do it, and works acceptably on the others."
        }
      ]
    },
    {
      "slug": "visual",
      "title": "Visual craft",
      "summary": "Hierarchy, focus and restraint, and how to avoid the generic look of AI-made UI.",
      "rules": [
        {
          "id": "VIS-01",
          "title": "One primary action per view",
          "category": "visual",
          "level": "MUST",
          "why": "When everything is emphasized, nothing is. One clear primary action tells people what to do next.",
          "do": "Use one filled primary button per view or section, with secondary and tertiary styles for the rest.",
          "dont": "Put three filled buttons of the same color side by side.",
          "check": "visual",
          "test": "Each view has at most one primary-styled button per section."
        },
        {
          "id": "VIS-02",
          "title": "Build hierarchy with size, weight and space before boxes and color",
          "category": "visual",
          "level": "SHOULD",
          "why": "Borders, cards and colors added everywhere create noise. Space and type create order.",
          "do": "Group related items with proximity, separate sections with whitespace, and rank content with type size and weight.",
          "dont": "Wrap every element in a card, or put cards inside cards.",
          "check": "visual",
          "test": "No card is nested inside another card, and section separation comes mainly from spacing."
        },
        {
          "id": "VIS-03",
          "title": "Use tokens, not one-off values",
          "category": "visual",
          "level": "SHOULD",
          "why": "One-off spacing, colors and font sizes add up to an interface that feels slightly off everywhere.",
          "do": "Take spacing, color, radius and type from the design tokens in DESIGN.md or your theme.",
          "dont": "Hard-code `margin: 13px` or a hex color that isn't in the palette.",
          "check": "auto",
          "test": "Styles use only token values. Flag hard-coded colors and spacing that aren't on the scale."
        },
        {
          "id": "VIS-04",
          "title": "Avoid the generic AI look",
          "category": "visual",
          "level": "SHOULD",
          "why": "People have learned to spot default AI-made UI, and it reads as low effort.",
          "do": "Start from the product's own content and brand. Use icons from one consistent set.",
          "dont": "Default to purple-blue gradients, emoji as icons, centered everything, glassmorphism or a sparkle icon on every feature.",
          "check": "visual",
          "test": "A reviewer can't point to any default AI pattern that the brand doesn't justify."
        },
        {
          "id": "VIS-05",
          "title": "Opening an overlay never shifts the page",
          "category": "visual",
          "level": "SHOULD",
          "why": "Many modal and drawer libraries hide the scrollbar to stop the page scrolling. The page gets about 15 px wider and everything behind it jumps sideways.",
          "do": "Reserve the scrollbar space once with `html { scrollbar-gutter: stable; }`, or compensate for the scrollbar width when locking scroll.",
          "dont": "Lock scrolling with `overflow: hidden` and let the layout jump each time a modal opens and closes.",
          "check": "walkthrough",
          "test": "With Chrome DevTools' \"Layout Shift Regions\" on, opening and closing modals, drawers and menus shows no shift behind them."
        },
        {
          "id": "VIS-06",
          "title": "Name color tokens by their role, not their appearance",
          "category": "visual",
          "level": "SHOULD",
          "why": "Names like `blue-500` say what a color looks like, not when to use it, so people guess, and the palette drifts.",
          "do": "Name tokens by element and purpose, such as `text.danger`, `surface.subtle` or `border.accent.strong` (element, tone, emphasis, state, at most four parts).",
          "dont": "Reference raw palette colors like `blue-500` or `grey-100` directly in components.",
          "check": "auto",
          "test": "Components only use role-named tokens; raw palette names appear only where the tokens are defined."
        },
        {
          "id": "VIS-07",
          "title": "Put actions close to what they act on",
          "category": "visual",
          "level": "SHOULD",
          "why": "Fitts's law: the farther and smaller a target, the longer it takes to reach. Actions far from the content make people hunt and travel.",
          "do": "Place the submit button right after the last field, and row actions on the row itself. Make frequent actions larger and easier to reach.",
          "dont": "Put the only \"Save\" button in the top corner, far from the end of a long form.",
          "check": "visual",
          "test": "Each primary action sits next to the content it affects, and the most-used actions are the largest and closest targets."
        },
        {
          "id": "VIS-08",
          "title": "Align everything to a consistent grid",
          "category": "visual",
          "level": "SHOULD",
          "why": "Edges that almost line up look accidental. A shared grid makes layouts feel calm, consistent and professional.",
          "do": "Use a column grid and a spacing scale, and align text, inputs and cards to the same edges.",
          "dont": "Nudge elements a few pixels by eye, so left edges and gaps drift between sections.",
          "check": "visual",
          "test": "With a grid overlay on, content edges line up with columns and gaps use the spacing scale."
        }
      ]
    }
  ]
}