[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7E51PEMK7K4YYTP05RZ2S3R":3,"skill-same:01M7E51PEMK7K4YYTP05RZ2S3R":57},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":31,"commitSha":32,"skillDirectory":33,"forksCount":14,"repositoryHtmlUrl":34,"repositoryHomepageUrl":34,"ownerHtmlUrl":35,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":36,"install":37,"resources":50},"01M7E51PEMK7K4YYTP05RZ2S3R","accelint-design-foundation",null,"Use when styling components or elements with @accelint\u002Fdesign-foundation or @accelint\u002Fdesign-toolkit packages, or when users say \"style this\", \"add styling\", \"theme this component\", \"add colors\", \"add spacing\", \"CSS modules\", \"setup design foundation\", \"@variant\", or when working with .module.css files. Provides opinionated Tailwind conventions including semantic tokens, custom spacing scale, outline-based borders, variant system, and CSS module setup guidance.","Mr-Nobody-Anonymous\u002FAll-skills","Mr-Nobody-Anonymous","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F184253119?v=4","01M7AEXFJHKTYQW5R0ZCQQTWFV","anonymous","01M7C00M3GQR4QKP9GZA42GFAK",0,"MIT","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fai-evaluation\u002Faccelint-design-foundation\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: accelint-design-foundation\ndescription: Use when styling components or elements with @accelint\u002Fdesign-foundation or @accelint\u002Fdesign-toolkit packages, or when users say \"style this\", \"add styling\", \"theme this component\", \"add colors\", \"add spacing\", \"CSS modules\", \"setup design foundation\", \"@variant\", or when working with .module.css files. Provides opinionated Tailwind conventions including semantic tokens, custom spacing scale, outline-based borders, variant system, and CSS module setup guidance.\nmetadata:\n  author: accelint\n  version: \"1.0.0\"\nsource: \"https:\u002F\u002Fgithub.com\u002Fgohypergiant\u002Fagent-skills\"\nsource_repository: \"gohypergiant\u002Fagent-skills\"\nsource_path: \"skills\u002Faccelint-design-foundation\u002FSKILL.md\"\nlicense: \"MIT\"\nimported_at: \"2026-09-20\"\n---\n\n# Accelint Design Foundation\n\nExpert knowledge for styling with `@accelint\u002Fdesign-foundation` and `@accelint\u002Fdesign-toolkit` — opinionated Tailwind conventions that differ from vanilla implementations.\n\n## NEVER Do When Styling with Design Foundation\n\n- **NEVER use numeric spacing classes as first choice** - Strongly prefer the semantic scale: `p-xxs`, `gap-m`, `m-l`. Numeric classes like `p-4`, `gap-6` work with a 1:1 relationship (`p-1` = 1px, NOT 4px like vanilla Tailwind), but should only be used for rare cases where implementing non-conforming designs. The semantic scale provides design system consistency.\n- **NEVER use manual theme handling with raw color values** - Avoid `dark:bg-gray-900` or `className={theme === 'dark' ? 'bg-black' : 'bg-white'}`. Use semantic color classes like `bg-surface-default` and `fg-primary-bold` that automatically adapt to light\u002Fdark themes.\n- **NEVER use borders for sizing elements** - Use `outline` instead of `border` classes. Borders add to element dimensions (breaks layouts), while outlines overlay without affecting size. Elements should size consistently based on content and padding only.\n- **NEVER use arbitrary Tailwind variants** - Arbitrary values like `hover:[&>svg]:opacity-50` break the design system. Use supported React Aria variants or conditional class rendering with `clsx`.\n- **NEVER bypass CSS layers when styling components** - Use `@layer components.l1`, `@layer components.l2` for cascade hierarchy. Bypassing layers causes specificity wars and makes overrides unpredictable.\n- **NEVER use primitive\u002Fdomain tokens as first choice** - Strongly prefer semantic tokens (`bg-surface-default`, `fg-primary-bold`) in components. The utility classes (`bg-*`, `fg-*`, `icon-*`, `outline-*`) provide fallback access to `domain-*` and `primitive-*` tokens for rare cases where designs go beyond the design system, but this should be exceptional. Semantic tokens provide theming flexibility and design system consistency.\n- **NEVER use inline Tailwind classes for component styling** - Component styles belong in CSS modules, not inline className props. Inline Tailwind should only be used for minor one-off overrides. Using inline classes for all component styling creates unmaintainable code and loses the benefits of CSS modules (scoping, organization, reusability).\n- **NEVER use multiple @apply directives in a single CSS rule** - Group all Tailwind classes into a single `@apply` statement. Multiple `@apply` directives prevent Tailwind IDE plugins from sorting classes and identifying issues. Write `@apply bg-surface-default outline-1 outline-interactive p-m;` not separate `@apply` lines.\n- **NEVER use attribute selectors for variants in CSS modules** - Use `@variant` directive blocks, not attribute selectors like `[data-size=\"small\"]`. Write `@variant size-small { @apply p-s; }` not `.button[data-size=\"small\"] { @apply p-s; }`. The `@variant` directive automatically applies styles when the matching data attribute is present.\n- **NEVER use Tailwind's default theme values** - The design foundation removes and replaces Tailwind defaults. Relying on default shadows, font sizes, or colors will break. Use only the semantic classes provided by the design system.\n- **NEVER omit @reference directive in CSS modules** - Every CSS module file must include `@reference '#globals';` (if custom entrypoint exists) or `@reference '@accelint\u002Fdesign-foundation\u002Fstyles';` at the top. Without this, semantic tokens and @variant blocks are undefined, causing build errors.\n- **NEVER skip PostCSS configuration** - The `@accelint\u002Fpostcss-tailwind-css-modules` plugin is required in `postcss.config.mjs`. Without it, named group selectors (like `group-hover\u002Fbutton:`) and @variant selectors fail to resolve in CSS modules.\n- **NEVER import clsx directly from 'clsx' package** - Always import from `@accelint\u002Fdesign-foundation\u002Flib\u002Futils` instead: `import { clsx } from '@accelint\u002Fdesign-foundation\u002Flib\u002Futils';`. The design foundation re-exports clsx with additional type support and design system integration. Importing directly bypasses these enhancements.\n\n## Before Styling a Component, Ask\n\nApply these tests to ensure styling aligns with the design system:\n\n### Theme Compatibility\n- **Will this work in both light and dark themes?** Use semantic color tokens that adapt automatically. Test by toggling between `@variant light` and `@variant dark`.\n- **Am I using raw color values?** If yes, replace with semantic tokens. Raw values don't theme.\n\n### Token System\n- **Am I using the correct token type?** Strongly prefer semantic tokens (`bg-surface-default`, `fg-primary-bold`). Only use `domain-*` or `primitive-*` fallbacks for exceptional cases where design goes beyond the system.\n- **Is there a semantic token for this?** Check the token catalog first. If no semantic token exists and the design genuinely requires it, fallback to `domain-*` or `primitive-*` is acceptable but rare.\n\n### Token Selection Framework\nWhen choosing a token, follow this decision tree:\n1. **Identify element purpose** - Is this a surface, text, icon, or outline?\n2. **Determine hierarchy** - Primary, secondary, or tertiary emphasis?\n3. **Consider state** - Default, hover, active, disabled?\n4. **Check status** - Info, success, warning, danger?\n\n**Example:** \"I need text color for a primary heading\"\n→ Purpose: text (`fg-*`)\n→ Hierarchy: primary with emphasis (`primary-bold`)\n→ Result: `fg-primary-bold`\n\n**Example:** \"I need background for an interactive button in hover state\"\n→ Purpose: background (`bg-*`)\n→ State: interactive hover (`interactive-bold-hover`)\n→ Result: `bg-interactive-bold-hover`\n\n### Spacing System\n- **Does this spacing value exist in the semantic scale?** Use `xxs\u002Fxs\u002Fs\u002Fm\u002Fl\u002Fxl\u002Fxxl\u002Foversized` scale. If a value isn't in the scale, question whether it's needed or use the closest semantic value.\n- **Need a non-standard spacing value?** Numeric classes (`p-1`, `m-12`) work with 1:1 relationship (p-1 = 1px, NOT 4px), but only use for rare non-conforming design cases. Semantic scale is strongly preferred for consistency.\n\n### Variant Usage\n- **Can this be expressed with data attributes?** Use `data-color=\"info\"` with supported variants instead of arbitrary classes.\n- **Am I overriding Design Toolkit components correctly?** Use `className` or `classNames` props, not custom CSS files.\n\n### Layout Impact\n- **Will outlines work here or do I need borders?** Outlines work for most cases. Borders are only needed when the border must affect layout dimensions.\n\n### Styling Approach\n- **Should this be in CSS modules or inline?** Component styles belong in CSS modules (.module.css). Only use inline Tailwind classes for minor one-off overrides or adjustments.\n- **Is this a reusable component or one-off instance?** Reusable components require CSS modules. One-off instances can use inline classes for small tweaks.\n\n### Setup Verification\n- **Is PostCSS configured correctly?** Check that `@accelint\u002Fpostcss-tailwind-css-modules` plugin is in `postcss.config.mjs`. Without it, named groups and @variant selectors won't work in CSS modules.\n- **Does every CSS module have @reference?** Each `.module.css` file must reference either `'#globals'` (custom entrypoint) or `'@accelint\u002Fdesign-foundation\u002Fstyles'` at the top.\n- **Is the CSS entrypoint imported first?** Custom globals.css (or design-foundation\u002Fstyles) must be the first import in the root layout.\n\n## Setup Requirements\n\n**CRITICAL: Design foundation requires specific PostCSS and CSS module configuration to work correctly.**\n\n### PostCSS Configuration\n\nCreate or update `postcss.config.mjs` in project root:\n\n```javascript\nexport default {\n  plugins: {\n    '@tailwindcss\u002Fpostcss': {},\n    '@accelint\u002Fpostcss-tailwind-css-modules': {}, \u002F\u002F Required for CSS modules\n  },\n};\n```\n\n**Why:** The `@accelint\u002Fpostcss-tailwind-css-modules` plugin fixes named group resolution in CSS module selectors (e.g., `group-hover\u002Fbutton:`) and @variant selectors. Without it, these selectors fail to resolve correctly in CSS module files.\n\n### Package.json Imports (If Custom CSS Entrypoint Exists)\n\nIf the project implements a custom CSS entrypoint for token\u002Futility configuration:\n\n```json\n{\n  \"imports\": {\n    \"#globals\": \".\u002Fsrc\u002Fstyles\u002Fglobals.css\"\n  }\n}\n```\n\n**Purpose:** Allows CSS modules to reference the custom entrypoint via `@reference '#globals';`\n\n### CSS Module Reference Pattern\n\n**Every CSS module file must include a reference directive:**\n\n```css\n\u002F* If project has custom CSS entrypoint (defined in package.json imports): *\u002F\n@reference '#globals';\n\n@layer components.l1 {\n  .button {\n    @apply px-m py-xs;\n  }\n}\n```\n\n```css\n\u002F* If NO custom CSS entrypoint, reference design-foundation directly: *\u002F\n@reference '@accelint\u002Fdesign-foundation\u002Fstyles';\n\n@layer components.l1 {\n  .button {\n    @apply px-m py-xs;\n  }\n}\n```\n\n**Why:** The @reference directive imports the design system's tokens, utilities, and variant definitions. Without it, semantic tokens and @variant blocks are undefined.\n\n### Custom CSS Entrypoint (Optional)\n\nIf implementing custom tokens or utilities, create a CSS entrypoint (e.g., `src\u002Fstyles\u002Fglobals.css`):\n\n```css\n\u002F* Import design foundation base *\u002F\n@import \"@accelint\u002Fdesign-foundation\u002Fstyles\";\n\n\u002F* Add custom token overrides or utilities here *\u002F\n@theme {\n  --custom-brand-color: #ff0000;\n}\n```\n\n**Then:** Import this file as the **first import** in your root layout component:\n\n```tsx\nimport '.\u002Fstyles\u002Fglobals.css'; \u002F\u002F First import\nimport { ReactNode } from 'react';\n\nexport default function RootLayout({ children }: { children: ReactNode }) {\n  return \u003Chtml>{children}\u003C\u002Fhtml>;\n}\n```\n\n## How to Use\n\nThis skill uses **progressive disclosure** to minimize context usage:\n\n### 1. Start with Core Patterns (SKILL.md)\nFollow the styling patterns and token usage below for consistent implementation.\n\n### 2. Reference Token Catalog (AGENTS.md)\nLoad [AGENTS.md](AGENTS.md) for quick reference of available tokens, spacing scale, and variant patterns.\n\n### 3. Load Detailed References as Needed\n\n**MANDATORY loading triggers** - Load these references in specific scenarios:\n\n**Setting up design foundation for the first time:**\n- **MANDATORY**: Load [references\u002Fsetup.md](references\u002Fsetup.md) (~8.9K) completely when user says \"setup design foundation\", \"configure design foundation\", \"install design foundation\", or encounters build errors like \"undefined variable\" or \"@variant not found\"\n- **Do NOT Load**: token-reference.md, variant-system.md, spacing-scale.md, migration-guide.md\n\n**Choosing tokens or understanding token hierarchy:**\n- **MANDATORY**: Load [references\u002Ftoken-reference.md](references\u002Ftoken-reference.md) (~6.5K) when uncertain which semantic token to use or when user needs complete token catalog\n- **Do NOT Load**: setup.md (unless build errors), migration-guide.md (unless migrating)\n\n**Working with @variant system or component variants:**\n- **MANDATORY**: Load [references\u002Fvariant-system.md](references\u002Fvariant-system.md) (~5.8K) when implementing data attribute variants or working with React Aria states\n- **Do NOT Load**: setup.md (unless build errors), migration-guide.md (unless migrating)\n\n**Understanding spacing scale or numeric fallbacks:**\n- **MANDATORY**: Load [references\u002Fspacing-scale.md](references\u002Fspacing-scale.md) (~8.5K) when confused about semantic vs numeric spacing or need complete spacing catalog\n- **Do NOT Load**: token-reference.md (unless also working with colors), setup.md (unless build errors)\n\n**Migrating from vanilla Tailwind:**\n- **MANDATORY**: Load [references\u002Fmigration-guide.md](references\u002Fmigration-guide.md) (~4.2K) when converting existing Tailwind code to design foundation conventions\n- **Do NOT Load**: Other references unless specific issues arise after migration\n\n**Troubleshooting build errors or setup issues:**\n- **MANDATORY**: Load [references\u002Fsetup.md](references\u002Fsetup.md) completely when encountering errors like \"undefined variable\", \"@variant not found\", \"group-hover\u002Fbutton: not working\"\n- **Do NOT Load**: Other references until setup is confirmed working\n\n## Styling Patterns\n\n### CSS Modules for Component Styling\n\n**Default approach: Component styles in CSS modules with @apply directives.**\n\n**user-card.module.css:**\n```css\n@layer components.l1 {\n  \u002F* ✅ Single @apply per rule - enables IDE plugin support *\u002F\n  .card {\n    @apply bg-surface-default outline-1 outline-interactive shadow-elevation-raised-muted p-m;\n  }\n\n  .header {\n    @apply flex items-center justify-between mb-s;\n  }\n\n  .title {\n    @apply fg-primary-bold text-body-l;\n  }\n\n  .content {\n    @apply space-y-xs mb-m;\n  }\n\n  .email {\n    @apply fg-primary-bold text-body-m;\n  }\n\n  .role {\n    @apply fg-primary-muted text-body-s;\n  }\n\n  .actions {\n    @apply flex gap-s;\n  }\n}\n\n\u002F* ❌ Wrong - multiple @apply directives break IDE plugins *\u002F\n\u002F*\n.card {\n  @apply bg-surface-default;\n  @apply outline-1 outline-interactive;\n  @apply shadow-elevation-raised-muted;\n  @apply p-m;\n}\n*\u002F\n```\n\n**user-card.tsx:**\n```tsx\nimport styles from '.\u002Fuser-card.module.css';\n\nexport function UserCard({ name, email, role }) {\n  return (\n    \u003Carticle className={styles.card}>\n      \u003Cheader className={styles.header}>\n        \u003Ch3 className={styles.title}>{name}\u003C\u002Fh3>\n      \u003C\u002Fheader>\n      \u003Cdiv className={styles.content}>\n        \u003Cp className={styles.email}>{email}\u003C\u002Fp>\n        \u003Cp className={styles.role}>{role}\u003C\u002Fp>\n      \u003C\u002Fdiv>\n    \u003C\u002Farticle>\n  );\n}\n```\n\n**Inline classes only for one-off overrides:**\n\n```tsx\n\u002F\u002F ✅ Correct - CSS module + inline override for specific instance\n\u003CUserCard className=\"mb-xl\" \u002F> {\u002F* One-off spacing adjustment *\u002F}\n\n\u002F\u002F ❌ Wrong - all styling inline\n\u003Cdiv className=\"bg-surface-default outline-1 outline-interactive shadow-elevation-raised-muted p-m\">\n  \u003Ch3 className=\"fg-primary-bold text-body-l\">{name}\u003C\u002Fh3>\n\u003C\u002Fdiv>\n```\n\n**Conditional classes with clsx:**\n\n```tsx\n\u002F\u002F ✅ Correct - import clsx from design foundation\nimport { clsx } from '@accelint\u002Fdesign-foundation\u002Flib\u002Futils';\nimport styles from '.\u002FButton.module.css';\n\nexport function Button({ variant, isActive }) {\n  return (\n    \u003Cbutton className={clsx(styles.button, isActive && styles.active)}>\n      Click me\n    \u003C\u002Fbutton>\n  );\n}\n\n\u002F\u002F ❌ Wrong - importing directly from clsx package\nimport clsx from 'clsx';\n```\n\n### Token Categories\n\n**Background tokens (`bg-*`):**\n- `bg-surface-default` - Primary surface (page\u002Fcard background)\n- `bg-surface-raised` - Raised\u002Felevated surface\n- `bg-interactive-bold` - Primary action background\n- `bg-info-muted` - Info message backgrounds\n- `bg-advisory-muted` - Warning message backgrounds\n- `bg-critical-muted` - Error\u002Fdanger message backgrounds\n- `bg-normal-muted` - Success message backgrounds\n\n**Foreground tokens (`fg-*`):**\n- `fg-primary-bold` - Primary text (headlines, body text)\n- `fg-primary-muted` - Subtle text (captions, secondary content)\n- `fg-inverse-bold` - Text on dark\u002Fcolored backgrounds\n- `fg-accent-primary-bold` - Interactive text\u002Flinks\n- `fg-critical-bold` - Error\u002Fdanger text\n\n**Outline tokens (`outline-*`):**\n- `outline-interactive` - Interactive outlines (buttons, inputs)\n- `outline-static` - Static outlines (borders, dividers)\n- `outline-info-bold` - Info state outlines\n- `outline-advisory-bold` - Warning state outlines\n- `outline-critical-bold` - Error\u002Fdanger state outlines\n\n**Token fallback pattern:**\n```tsx\n\u002F\u002F ✅ Preferred - semantic tokens\n\u003Cdiv className=\"bg-surface-default fg-primary-bold\">Content\u003C\u002Fdiv>\n\n\u002F\u002F ⚠️  Acceptable but rare - domain\u002Fprimitive fallback for edge cases\n\u003Cdiv className=\"bg-domain-brand fg-primitive-blue-500\">\n  {\u002F* Use only when design exceeds system *\u002F}\n\u003C\u002Fdiv>\n\n\u002F\u002F ❌ Wrong - using fallbacks when semantic tokens exist\n\u003Cdiv className=\"bg-primitive-neutral-100 fg-primitive-neutral-900\">\n  {\u002F* Should use bg-surface-default fg-primary-bold *\u002F}\n\u003C\u002Fdiv>\n```\n\n### Spacing Scale\n\n**Eight-step semantic scale:** `xxs` → `xs` → `s` → `m` → `l` → `xl` → `xxl` → `oversized`\n\nThink semantic meaning, not pixels. `m` means \"medium for this context\", not a specific pixel value.\n\n**CSS module usage:**\n```css\n.button {\n  @apply px-m py-xs; \u002F* ✅ Semantic spacing - preferred *\u002F\n}\n\n.card {\n  @apply p-m space-y-s; \u002F* ✅ Semantic scale for consistency *\u002F\n}\n\n\u002F* ⚠️  Acceptable but rare - numeric fallback for edge cases *\u002F\n.nonStandardLayout {\n  @apply p-13; \u002F* 13px exactly - use only for non-conforming designs *\u002F\n  \u002F* Note: p-1 = 1px (not 4px like vanilla Tailwind) *\u002F\n}\n```\n\n**Spacing fallback pattern:**\n- **Preferred**: Use semantic scale (`p-m`, `gap-s`, `mb-l`)\n- **Fallback**: Numeric classes available with 1:1 relationship (p-1 = 1px, p-12 = 12px)\n- **When to use numeric**: Only for non-conforming designs where semantic scale doesn't fit\n\n### Outlines vs Borders\n\n**Prefer outlines** - they don't affect element dimensions.\n\n```css\n\u002F* ✅ Correct - outline doesn't impact layout *\u002F\n.card {\n  @apply outline-1 outline-interactive;\n}\n\n\u002F* ❌ Wrong - border adds to dimensions *\u002F\n.card {\n  @apply border-2 border-gray-300;\n}\n```\n\n**Use borders only when:**\n- Border must participate in layout (table cells)\n- Dimension impact is explicitly desired\n\n### Variant System\n\n**Use data attributes for component variants:**\n\n**Button.module.css:**\n```css\n@layer components.l1 {\n  .button {\n    @apply px-m py-xs;\n  }\n}\n\n@layer components.l2 {\n  \u002F* ✅ Use @variant blocks for conditional styling *\u002F\n  .button {\n    @variant color-info {\n      @apply bg-interactive-bold fg-inverse-bold;\n    }\n\n    @variant color-critical {\n      @apply outline-2 outline-critical-bold fg-critical-bold;\n    }\n\n    @variant size-large {\n      @apply px-l py-s;\n    }\n  }\n}\n\n\u002F* ❌ Wrong - attribute selectors *\u002F\n\u002F*\n.button[data-color=\"primary\"] {\n  @apply bg-interactive-bold;\n}\n*\u002F\n```\n\n**Button.tsx:**\n```tsx\nimport styles from '.\u002FButton.module.css';\n\nexport function Button({ children, color = 'primary', size = 'medium' }) {\n  return (\n    \u003Cbutton\n      className={styles.button}\n      data-color={color}\n      data-size={size}\n    >\n      {children}\n    \u003C\u002Fbutton>\n  );\n}\n```\n\n**Common variants:**\n- `data-color`: `info`, `success`, `warning`, `danger`\n- `data-size`: `small`, `medium`, `large`\n- `data-state`: `active`, `disabled`, `loading`\n\n### CSS Layer Hierarchy\n\n**Always use layers in CSS modules:**\n\n```css\n\u002F* ✅ Correct - layered for predictable specificity *\u002F\n@layer components.l1 {\n  .base-styles { \u002F* Base component styles *\u002F }\n}\n\n@layer components.l2 {\n  .variant-styles { \u002F* Variant styles *\u002F }\n}\n\n@layer components.l3 {\n  .state-styles { \u002F* State styles *\u002F }\n}\n\n\u002F* ❌ Wrong - no layers causes specificity issues *\u002F\n.component {\n  background: var(--bg-surface-default);\n}\n```\n\n**Layer order:** l1 (base) \u003C l2 (variants) \u003C l3 (states)\n\n### Overriding Design Toolkit Components\n\n**Use className prop for overrides:**\n\n```tsx\n\u002F\u002F ✅ Correct - override with inline class\n\u003CDesignToolkitButton className=\"mb-l\">\n  Action\n\u003C\u002FDesignToolkitButton>\n\n\u002F\u002F ✅ Correct - use classNames prop for internal elements\n\u003CDesignToolkitButton classNames={{ icon: 'icon-override' }}>\n  Action\n\u003C\u002FDesignToolkitButton>\n```\n\n## Common Issues\n\n### Issue: \"undefined variable --bg-surface-default\"\n\n**Cause:** Missing @reference directive in CSS module.\n\n**Fix:** Add `@reference '#globals';` or `@reference '@accelint\u002Fdesign-foundation\u002Fstyles';` at the top of the CSS module file.\n\n```css\n\u002F* ✅ Correct *\u002F\n@reference '@accelint\u002Fdesign-foundation\u002Fstyles';\n\n@layer components.l1 {\n  .card {\n    @apply bg-surface-default; \u002F* Now defined *\u002F\n  }\n}\n```\n\n### Issue: \"@variant directive not recognized\"\n\n**Cause:** Missing @reference directive or PostCSS plugin not configured.\n\n**Fix 1:** Verify @reference directive exists at top of CSS module.\n\n**Fix 2:** Check `postcss.config.mjs` includes `@accelint\u002Fpostcss-tailwind-css-modules` plugin:\n\n```javascript\nexport default {\n  plugins: {\n    '@tailwindcss\u002Fpostcss': {},\n    '@accelint\u002Fpostcss-tailwind-css-modules': {}, \u002F\u002F Add this\n  },\n};\n```\n\n### Issue: \"group-hover\u002Fbutton: selector not working\"\n\n**Cause:** Missing `@accelint\u002Fpostcss-tailwind-css-modules` plugin.\n\n**Fix:** Add plugin to `postcss.config.mjs` (see above).\n\n### Issue: Styles not applying \u002F tokens showing as raw values\n\n**Cause:** CSS entrypoint not imported or imported too late.\n\n**Fix:** Ensure globals.css (or `@accelint\u002Fdesign-foundation\u002Fstyles`) is the FIRST import in root layout:\n\n```tsx\n\u002F\u002F ✅ Correct order\nimport '.\u002Fstyles\u002Fglobals.css'; \u002F\u002F First\nimport '.\u002Fother-styles.css';\nimport Component from '.\u002FComponent';\n\n\u002F\u002F ❌ Wrong order\nimport Component from '.\u002FComponent';\nimport '.\u002Fstyles\u002Fglobals.css'; \u002F\u002F Too late\n```\n\n### Issue: \"Cannot find module '#globals'\"\n\n**Cause:** Missing package.json imports field or path incorrect.\n\n**Fix:** Add imports to package.json:\n\n```json\n{\n  \"imports\": {\n    \"#globals\": \".\u002Fsrc\u002Fstyles\u002Fglobals.css\"\n  }\n}\n```\n\n**Or** change @reference to direct path:\n\n```css\n@reference '.\u002Fstyles\u002Fglobals.css';\n```\n\n**Or** use design-foundation directly:\n\n```css\n@reference '@accelint\u002Fdesign-foundation\u002Fstyles';\n```\n\n## Important Notes\n\n- **Tailwind defaults are removed** - The design foundation resets Tailwind's default theme. Don't rely on any default values for colors, spacing, shadows, or typography. Only use what's explicitly defined in the design system.\n- **Semantic tokens are CSS variables** - All semantic tokens compile to CSS custom properties like `var(--bg-surface-default)`. They can be used in custom CSS when utilities aren't sufficient, but prefer utilities.\n- **Token fallback chain exists** - Utility classes (`bg-*`, `fg-*`, `icon-*`, `outline-*`) check semantic tokens first, then fall back to `domain-*` and `primitive-*` tokens. This fallback is intentional for rare cases where designs exceed the design system, but semantic tokens should be the default choice for consistency and theming.\n- **Spacing scale is semantic, not pixel-mapped** - Don't think \"m = 16px\". Think \"m = medium spacing for this context\". The scale adapts to different contexts (button padding vs section margin). Numeric classes work with 1:1 relationship (p-1 = 1px, NOT 4px), but are fallbacks for non-conforming designs only.\n- **Theme variants use @ directives** - The `@theme static` and `@variant light\u002Fdark` syntax is custom. Don't confuse with standard CSS media queries. Themes are applied via class\u002Fattribute on root element.\n- **Design Toolkit components are React Aria** - They use React Aria for accessibility. Don't fight the React Aria state management or variants. Work with `className` and `classNames` props.\n- **Setup is NOT optional** - The PostCSS plugin and @reference directives are required, not conveniences. Missing setup causes cryptic build errors (\"undefined variable\", \"@variant not found\"). Always verify setup before debugging styling issues.\n","# Accelint Design Foundation\n\nExpert knowledge for styling with `@accelint\u002Fdesign-foundation` and `@accelint\u002Fdesign-toolkit` — opinionated Tailwind conventions that differ from vanilla implementations.\n\n## NEVER Do When Styling with Design Foundation\n\n- **NEVER use numeric spacing classes as first choice** - Strongly prefer the semantic scale: `p-xxs`, `gap-m`, `m-l`. Numeric classes like `p-4`, `gap-6` work with a 1:1 relationship (`p-1` = 1px, NOT 4px like vanilla Tailwind), but should only be used for rare cases where implementing non-conforming designs. The semantic scale provides design system consistency.\n- **NEVER use manual theme handling with raw color values** - Avoid `dark:bg-gray-900` or `className={theme === 'dark' ? 'bg-black' : 'bg-white'}`. Use semantic color classes like `bg-surface-default` and `fg-primary-bold` that automatically adapt to light\u002Fdark themes.\n- **NEVER use borders for sizing elements** - Use `outline` instead of `border` classes. Borders add to element dimensions (breaks layouts), while outlines overlay without affecting size. Elements should size consistently based on content and padding only.\n- **NEVER use arbitrary Tailwind variants** - Arbitrary values like `hover:[&>svg]:opacity-50` break the design system. Use supported React Aria variants or conditional class rendering with `clsx`.\n- **NEVER bypass CSS layers when styling components** - Use `@layer components.l1`, `@layer components.l2` for cascade hierarchy. Bypassing layers causes specificity wars and makes overrides unpredictable.\n- **NEVER use primitive\u002Fdomain tokens as first choice** - Strongly prefer semantic tokens (`bg-surface-default`, `fg-primary-bold`) in components. The utility classes (`bg-*`, `fg-*`, `icon-*`, `outline-*`) provide fallback access to `domain-*` and `primitive-*` tokens for rare cases where designs go beyond the design system, but this should be exceptional. Semantic tokens provide theming flexibility and design system consistency.\n- **NEVER use inline Tailwind classes for component styling** - Component styles belong in CSS modules, not inline className props. Inline Tailwind should only be used for minor one-off overrides. Using inline classes for all component styling creates unmaintainable code and loses the benefits of CSS modules (scoping, organization, reusability).\n- **NEVER use multiple @apply directives in a single CSS rule** - Group all Tailwind classes into a single `@apply` statement. Multiple `@apply` directives prevent Tailwind IDE plugins from sorting classes and identifying issues. Write `@apply bg-surface-default outline-1 outline-interactive p-m;` not separate `@apply` lines.\n- **NEVER use attribute selectors for variants in CSS modules** - Use `@variant` directive blocks, not attribute selectors like `[data-size=\"small\"]`. Write `@variant size-small { @apply p-s; }` not `.button[data-size=\"small\"] { @apply p-s; }`. The `@variant` directive automatically applies styles when the matching data attribute is present.\n- **NEVER use Tailwind's default theme values** - The design foundation removes and replaces Tailwind defaults. Relying on default shadows, font sizes, or colors will break. Use only the semantic classes provided by the design system.\n- **NEVER omit @reference directive in CSS modules** - Every CSS module file must include `@reference '#globals';` (if custom entrypoint exists) or `@reference '@accelint\u002Fdesign-foundation\u002Fstyles';` at the top. Without this, semantic tokens and @variant blocks are undefined, causing build errors.\n- **NEVER skip PostCSS configuration** - The `@accelint\u002Fpostcss-tailwind-css-modules` plugin is required in `postcss.config.mjs`. Without it, named group selectors (like `group-hover\u002Fbutton:`) and @variant selectors fail to resolve in CSS modules.\n- **NEVER import clsx directly from 'clsx' package** - Always import from `@accelint\u002Fdesign-foundation\u002Flib\u002Futils` instead: `import { clsx } from '@accelint\u002Fdesign-foundation\u002Flib\u002Futils';`. The design foundation re-exports clsx with additional type support and design system integration. Importing directly bypasses these enhancements.\n\n## Before Styling a Component, Ask\n\nApply these tests to ensure styling aligns with the design system:\n\n### Theme Compatibility\n- **Will this work in both light and dark themes?** Use semantic color tokens that adapt automatically. Test by toggling between `@variant light` and `@variant dark`.\n- **Am I using raw color values?** If yes, replace with semantic tokens. Raw values don't theme.\n\n### Token System\n- **Am I using the correct token type?** Strongly prefer semantic tokens (`bg-surface-default`, `fg-primary-bold`). Only use `domain-*` or `primitive-*` fallbacks for exceptional cases where design goes beyond the system.\n- **Is there a semantic token for this?** Check the token catalog first. If no semantic token exists and the design genuinely requires it, fallback to `domain-*` or `primitive-*` is acceptable but rare.\n\n### Token Selection Framework\nWhen choosing a token, follow this decision tree:\n1. **Identify element purpose** - Is this a surface, text, icon, or outline?\n2. **Determine hierarchy** - Primary, secondary, or tertiary emphasis?\n3. **Consider state** - Default, hover, active, disabled?\n4. **Check status** - Info, success, warning, danger?\n\n**Example:** \"I need text color for a primary heading\"\n→ Purpose: text (`fg-*`)\n→ Hierarchy: primary with emphasis (`primary-bold`)\n→ Result: `fg-primary-bold`\n\n**Example:** \"I need background for an interactive button in hover state\"\n→ Purpose: background (`bg-*`)\n→ State: interactive hover (`interactive-bold-hover`)\n→ Result: `bg-interactive-bold-hover`\n\n### Spacing System\n- **Does this spacing value exist in the semantic scale?** Use `xxs\u002Fxs\u002Fs\u002Fm\u002Fl\u002Fxl\u002Fxxl\u002Foversized` scale. If a value isn't in the scale, question whether it's needed or use the closest semantic value.\n- **Need a non-standard spacing value?** Numeric classes (`p-1`, `m-12`) work with 1:1 relationship (p-1 = 1px, NOT 4px), but only use for rare non-conforming design cases. Semantic scale is strongly preferred for consistency.\n\n### Variant Usage\n- **Can this be expressed with data attributes?** Use `data-color=\"info\"` with supported variants instead of arbitrary classes.\n- **Am I overriding Design Toolkit components correctly?** Use `className` or `classNames` props, not custom CSS files.\n\n### Layout Impact\n- **Will outlines work here or do I need borders?** Outlines work for most cases. Borders are only needed when the border must affect layout dimensions.\n\n### Styling Approach\n- **Should this be in CSS modules or inline?** Component styles belong in CSS modules (.module.css). Only use inline Tailwind classes for minor one-off overrides or adjustments.\n- **Is this a reusable component or one-off instance?** Reusable components require CSS modules. One-off instances can use inline classes for small tweaks.\n\n### Setup Verification\n- **Is PostCSS configured correctly?** Check that `@accelint\u002Fpostcss-tailwind-css-modules` plugin is in `postcss.config.mjs`. Without it, named groups and @variant selectors won't work in CSS modules.\n- **Does every CSS module have @reference?** Each `.module.css` file must reference either `'#globals'` (custom entrypoint) or `'@accelint\u002Fdesign-foundation\u002Fstyles'` at the top.\n- **Is the CSS entrypoint imported first?** Custom globals.css (or design-foundation\u002Fstyles) must be the first import in the root layout.\n\n## Setup Requirements\n\n**CRITICAL: Design foundation requires specific PostCSS and CSS module configuration to work correctly.**\n\n### PostCSS Configuration\n\nCreate or update `postcss.config.mjs` in project root:\n\n```javascript\nexport default {\n  plugins: {\n    '@tailwindcss\u002Fpostcss': {},\n    '@accelint\u002Fpostcss-tailwind-css-modules': {}, \u002F\u002F Required for CSS modules\n  },\n};\n```\n\n**Why:** The `@accelint\u002Fpostcss-tailwind-css-modules` plugin fixes named group resolution in CSS module selectors (e.g., `group-hover\u002Fbutton:`) and @variant selectors. Without it, these selectors fail to resolve correctly in CSS module files.\n\n### Package.json Imports (If Custom CSS Entrypoint Exists)\n\nIf the project implements a custom CSS entrypoint for token\u002Futility configuration:\n\n```json\n{\n  \"imports\": {\n    \"#globals\": \".\u002Fsrc\u002Fstyles\u002Fglobals.css\"\n  }\n}\n```\n\n**Purpose:** Allows CSS modules to reference the custom entrypoint via `@reference '#globals';`\n\n### CSS Module Reference Pattern\n\n**Every CSS module file must include a reference directive:**\n\n```css\n\u002F* If project has custom CSS entrypoint (defined in package.json imports): *\u002F\n@reference '#globals';\n\n@layer components.l1 {\n  .button {\n    @apply px-m py-xs;\n  }\n}\n```\n\n```css\n\u002F* If NO custom CSS entrypoint, reference design-foundation directly: *\u002F\n@reference '@accelint\u002Fdesign-foundation\u002Fstyles';\n\n@layer components.l1 {\n  .button {\n    @apply px-m py-xs;\n  }\n}\n```\n\n**Why:** The @reference directive imports the design system's tokens, utilities, and variant definitions. Without it, semantic tokens and @variant blocks are undefined.\n\n### Custom CSS Entrypoint (Optional)\n\nIf implementing custom tokens or utilities, create a CSS entrypoint (e.g., `src\u002Fstyles\u002Fglobals.css`):\n\n```css\n\u002F* Import design foundation base *\u002F\n@import \"@accelint\u002Fdesign-foundation\u002Fstyles\";\n\n\u002F* Add custom token overrides or utilities here *\u002F\n@theme {\n  --custom-brand-color: #ff0000;\n}\n```\n\n**Then:** Import this file as the **first import** in your root layout component:\n\n```tsx\nimport '.\u002Fstyles\u002Fglobals.css'; \u002F\u002F First import\nimport { ReactNode } from 'react';\n\nexport default function RootLayout({ children }: { children: ReactNode }) {\n  return \u003Chtml>{children}\u003C\u002Fhtml>;\n}\n```\n\n## How to Use\n\nThis skill uses **progressive disclosure** to minimize context usage:\n\n### 1. Start with Core Patterns (SKILL.md)\nFollow the styling patterns and token usage below for consistent implementation.\n\n### 2. Reference Token Catalog (AGENTS.md)\nLoad [AGENTS.md](AGENTS.md) for quick reference of available tokens, spacing scale, and variant patterns.\n\n### 3. Load Detailed References as Needed\n\n**MANDATORY loading triggers** - Load these references in specific scenarios:\n\n**Setting up design foundation for the first time:**\n- **MANDATORY**: Load [references\u002Fsetup.md](references\u002Fsetup.md) (~8.9K) completely when user says \"setup design foundation\", \"configure design foundation\", \"install design foundation\", or encounters build errors like \"undefined variable\" or \"@variant not found\"\n- **Do NOT Load**: token-reference.md, variant-system.md, spacing-scale.md, migration-guide.md\n\n**Choosing tokens or understanding token hierarchy:**\n- **MANDATORY**: Load [references\u002Ftoken-reference.md](references\u002Ftoken-reference.md) (~6.5K) when uncertain which semantic token to use or when user needs complete token catalog\n- **Do NOT Load**: setup.md (unless build errors), migration-guide.md (unless migrating)\n\n**Working with @variant system or component variants:**\n- **MANDATORY**: Load [references\u002Fvariant-system.md](references\u002Fvariant-system.md) (~5.8K) when implementing data attribute variants or working with React Aria states\n- **Do NOT Load**: setup.md (unless build errors), migration-guide.md (unless migrating)\n\n**Understanding spacing scale or numeric fallbacks:**\n- **MANDATORY**: Load [references\u002Fspacing-scale.md](references\u002Fspacing-scale.md) (~8.5K) when confused about semantic vs numeric spacing or need complete spacing catalog\n- **Do NOT Load**: token-reference.md (unless also working with colors), setup.md (unless build errors)\n\n**Migrating from vanilla Tailwind:**\n- **MANDATORY**: Load [references\u002Fmigration-guide.md](references\u002Fmigration-guide.md) (~4.2K) when converting existing Tailwind code to design foundation conventions\n- **Do NOT Load**: Other references unless specific issues arise after migration\n\n**Troubleshooting build errors or setup issues:**\n- **MANDATORY**: Load [references\u002Fsetup.md](references\u002Fsetup.md) completely when encountering errors like \"undefined variable\", \"@variant not found\", \"group-hover\u002Fbutton: not working\"\n- **Do NOT Load**: Other references until setup is confirmed working\n\n## Styling Patterns\n\n### CSS Modules for Component Styling\n\n**Default approach: Component styles in CSS modules with @apply directives.**\n\n**user-card.module.css:**\n```css\n@layer components.l1 {\n  \u002F* ✅ Single @apply per rule - enables IDE plugin support *\u002F\n  .card {\n    @apply bg-surface-default outline-1 outline-interactive shadow-elevation-raised-muted p-m;\n  }\n\n  .header {\n    @apply flex items-center justify-between mb-s;\n  }\n\n  .title {\n    @apply fg-primary-bold text-body-l;\n  }\n\n  .content {\n    @apply space-y-xs mb-m;\n  }\n\n  .email {\n    @apply fg-primary-bold text-body-m;\n  }\n\n  .role {\n    @apply fg-primary-muted text-body-s;\n  }\n\n  .actions {\n    @apply flex gap-s;\n  }\n}\n\n\u002F* ❌ Wrong - multiple @apply directives break IDE plugins *\u002F\n\u002F*\n.card {\n  @apply bg-surface-default;\n  @apply outline-1 outline-interactive;\n  @apply shadow-elevation-raised-muted;\n  @apply p-m;\n}\n*\u002F\n```\n\n**user-card.tsx:**\n```tsx\nimport styles from '.\u002Fuser-card.module.css';\n\nexport function UserCard({ name, email, role }) {\n  return (\n    \u003Carticle className={styles.card}>\n      \u003Cheader className={styles.header}>\n        \u003Ch3 className={styles.title}>{name}\u003C\u002Fh3>\n      \u003C\u002Fheader>\n      \u003Cdiv className={styles.content}>\n        \u003Cp className={styles.email}>{email}\u003C\u002Fp>\n        \u003Cp className={styles.role}>{role}\u003C\u002Fp>\n      \u003C\u002Fdiv>\n    \u003C\u002Farticle>\n  );\n}\n```\n\n**Inline classes only for one-off overrides:**\n\n```tsx\n\u002F\u002F ✅ Correct - CSS module + inline override for specific instance\n\u003CUserCard className=\"mb-xl\" \u002F> {\u002F* One-off spacing adjustment *\u002F}\n\n\u002F\u002F ❌ Wrong - all styling inline\n\u003Cdiv className=\"bg-surface-default outline-1 outline-interactive shadow-elevation-raised-muted p-m\">\n  \u003Ch3 className=\"fg-primary-bold text-body-l\">{name}\u003C\u002Fh3>\n\u003C\u002Fdiv>\n```\n\n**Conditional classes with clsx:**\n\n```tsx\n\u002F\u002F ✅ Correct - import clsx from design foundation\nimport { clsx } from '@accelint\u002Fdesign-foundation\u002Flib\u002Futils';\nimport styles from '.\u002FButton.module.css';\n\nexport function Button({ variant, isActive }) {\n  return (\n    \u003Cbutton className={clsx(styles.button, isActive && styles.active)}>\n      Click me\n    \u003C\u002Fbutton>\n  );\n}\n\n\u002F\u002F ❌ Wrong - importing directly from clsx package\nimport clsx from 'clsx';\n```\n\n### Token Categories\n\n**Background tokens (`bg-*`):**\n- `bg-surface-default` - Primary surface (page\u002Fcard background)\n- `bg-surface-raised` - Raised\u002Felevated surface\n- `bg-interactive-bold` - Primary action background\n- `bg-info-muted` - Info message backgrounds\n- `bg-advisory-muted` - Warning message backgrounds\n- `bg-critical-muted` - Error\u002Fdanger message backgrounds\n- `bg-normal-muted` - Success message backgrounds\n\n**Foreground tokens (`fg-*`):**\n- `fg-primary-bold` - Primary text (headlines, body text)\n- `fg-primary-muted` - Subtle text (captions, secondary content)\n- `fg-inverse-bold` - Text on dark\u002Fcolored backgrounds\n- `fg-accent-primary-bold` - Interactive text\u002Flinks\n- `fg-critical-bold` - Error\u002Fdanger text\n\n**Outline tokens (`outline-*`):**\n- `outline-interactive` - Interactive outlines (buttons, inputs)\n- `outline-static` - Static outlines (borders, dividers)\n- `outline-info-bold` - Info state outlines\n- `outline-advisory-bold` - Warning state outlines\n- `outline-critical-bold` - Error\u002Fdanger state outlines\n\n**Token fallback pattern:**\n```tsx\n\u002F\u002F ✅ Preferred - semantic tokens\n\u003Cdiv className=\"bg-surface-default fg-primary-bold\">Content\u003C\u002Fdiv>\n\n\u002F\u002F ⚠️  Acceptable but rare - domain\u002Fprimitive fallback for edge cases\n\u003Cdiv className=\"bg-domain-brand fg-primitive-blue-500\">\n  {\u002F* Use only when design exceeds system *\u002F}\n\u003C\u002Fdiv>\n\n\u002F\u002F ❌ Wrong - using fallbacks when semantic tokens exist\n\u003Cdiv className=\"bg-primitive-neutral-100 fg-primitive-neutral-900\">\n  {\u002F* Should use bg-surface-default fg-primary-bold *\u002F}\n\u003C\u002Fdiv>\n```\n\n### Spacing Scale\n\n**Eight-step semantic scale:** `xxs` → `xs` → `s` → `m` → `l` → `xl` → `xxl` → `oversized`\n\nThink semantic meaning, not pixels. `m` means \"medium for this context\", not a specific pixel value.\n\n**CSS module usage:**\n```css\n.button {\n  @apply px-m py-xs; \u002F* ✅ Semantic spacing - preferred *\u002F\n}\n\n.card {\n  @apply p-m space-y-s; \u002F* ✅ Semantic scale for consistency *\u002F\n}\n\n\u002F* ⚠️  Acceptable but rare - numeric fallback for edge cases *\u002F\n.nonStandardLayout {\n  @apply p-13; \u002F* 13px exactly - use only for non-conforming designs *\u002F\n  \u002F* Note: p-1 = 1px (not 4px like vanilla Tailwind) *\u002F\n}\n```\n\n**Spacing fallback pattern:**\n- **Preferred**: Use semantic scale (`p-m`, `gap-s`, `mb-l`)\n- **Fallback**: Numeric classes available with 1:1 relationship (p-1 = 1px, p-12 = 12px)\n- **When to use numeric**: Only for non-conforming designs where semantic scale doesn't fit\n\n### Outlines vs Borders\n\n**Prefer outlines** - they don't affect element dimensions.\n\n```css\n\u002F* ✅ Correct - outline doesn't impact layout *\u002F\n.card {\n  @apply outline-1 outline-interactive;\n}\n\n\u002F* ❌ Wrong - border adds to dimensions *\u002F\n.card {\n  @apply border-2 border-gray-300;\n}\n```\n\n**Use borders only when:**\n- Border must participate in layout (table cells)\n- Dimension impact is explicitly desired\n\n### Variant System\n\n**Use data attributes for component variants:**\n\n**Button.module.css:**\n```css\n@layer components.l1 {\n  .button {\n    @apply px-m py-xs;\n  }\n}\n\n@layer components.l2 {\n  \u002F* ✅ Use @variant blocks for conditional styling *\u002F\n  .button {\n    @variant color-info {\n      @apply bg-interactive-bold fg-inverse-bold;\n    }\n\n    @variant color-critical {\n      @apply outline-2 outline-critical-bold fg-critical-bold;\n    }\n\n    @variant size-large {\n      @apply px-l py-s;\n    }\n  }\n}\n\n\u002F* ❌ Wrong - attribute selectors *\u002F\n\u002F*\n.button[data-color=\"primary\"] {\n  @apply bg-interactive-bold;\n}\n*\u002F\n```\n\n**Button.tsx:**\n```tsx\nimport styles from '.\u002FButton.module.css';\n\nexport function Button({ children, color = 'primary', size = 'medium' }) {\n  return (\n    \u003Cbutton\n      className={styles.button}\n      data-color={color}\n      data-size={size}\n    >\n      {children}\n    \u003C\u002Fbutton>\n  );\n}\n```\n\n**Common variants:**\n- `data-color`: `info`, `success`, `warning`, `danger`\n- `data-size`: `small`, `medium`, `large`\n- `data-state`: `active`, `disabled`, `loading`\n\n### CSS Layer Hierarchy\n\n**Always use layers in CSS modules:**\n\n```css\n\u002F* ✅ Correct - layered for predictable specificity *\u002F\n@layer components.l1 {\n  .base-styles { \u002F* Base component styles *\u002F }\n}\n\n@layer components.l2 {\n  .variant-styles { \u002F* Variant styles *\u002F }\n}\n\n@layer components.l3 {\n  .state-styles { \u002F* State styles *\u002F }\n}\n\n\u002F* ❌ Wrong - no layers causes specificity issues *\u002F\n.component {\n  background: var(--bg-surface-default);\n}\n```\n\n**Layer order:** l1 (base) \u003C l2 (variants) \u003C l3 (states)\n\n### Overriding Design Toolkit Components\n\n**Use className prop for overrides:**\n\n```tsx\n\u002F\u002F ✅ Correct - override with inline class\n\u003CDesignToolkitButton className=\"mb-l\">\n  Action\n\u003C\u002FDesignToolkitButton>\n\n\u002F\u002F ✅ Correct - use classNames prop for internal elements\n\u003CDesignToolkitButton classNames={{ icon: 'icon-override' }}>\n  Action\n\u003C\u002FDesignToolkitButton>\n```\n\n## Common Issues\n\n### Issue: \"undefined variable --bg-surface-default\"\n\n**Cause:** Missing @reference directive in CSS module.\n\n**Fix:** Add `@reference '#globals';` or `@reference '@accelint\u002Fdesign-foundation\u002Fstyles';` at the top of the CSS module file.\n\n```css\n\u002F* ✅ Correct *\u002F\n@reference '@accelint\u002Fdesign-foundation\u002Fstyles';\n\n@layer components.l1 {\n  .card {\n    @apply bg-surface-default; \u002F* Now defined *\u002F\n  }\n}\n```\n\n### Issue: \"@variant directive not recognized\"\n\n**Cause:** Missing @reference directive or PostCSS plugin not configured.\n\n**Fix 1:** Verify @reference directive exists at top of CSS module.\n\n**Fix 2:** Check `postcss.config.mjs` includes `@accelint\u002Fpostcss-tailwind-css-modules` plugin:\n\n```javascript\nexport default {\n  plugins: {\n    '@tailwindcss\u002Fpostcss': {},\n    '@accelint\u002Fpostcss-tailwind-css-modules': {}, \u002F\u002F Add this\n  },\n};\n```\n\n### Issue: \"group-hover\u002Fbutton: selector not working\"\n\n**Cause:** Missing `@accelint\u002Fpostcss-tailwind-css-modules` plugin.\n\n**Fix:** Add plugin to `postcss.config.mjs` (see above).\n\n### Issue: Styles not applying \u002F tokens showing as raw values\n\n**Cause:** CSS entrypoint not imported or imported too late.\n\n**Fix:** Ensure globals.css (or `@accelint\u002Fdesign-foundation\u002Fstyles`) is the FIRST import in root layout:\n\n```tsx\n\u002F\u002F ✅ Correct order\nimport '.\u002Fstyles\u002Fglobals.css'; \u002F\u002F First\nimport '.\u002Fother-styles.css';\nimport Component from '.\u002FComponent';\n\n\u002F\u002F ❌ Wrong order\nimport Component from '.\u002FComponent';\nimport '.\u002Fstyles\u002Fglobals.css'; \u002F\u002F Too late\n```\n\n### Issue: \"Cannot find module '#globals'\"\n\n**Cause:** Missing package.json imports field or path incorrect.\n\n**Fix:** Add imports to package.json:\n\n```json\n{\n  \"imports\": {\n    \"#globals\": \".\u002Fsrc\u002Fstyles\u002Fglobals.css\"\n  }\n}\n```\n\n**Or** change @reference to direct path:\n\n```css\n@reference '.\u002Fstyles\u002Fglobals.css';\n```\n\n**Or** use design-foundation directly:\n\n```css\n@reference '@accelint\u002Fdesign-foundation\u002Fstyles';\n```\n\n## Important Notes\n\n- **Tailwind defaults are removed** - The design foundation resets Tailwind's default theme. Don't rely on any default values for colors, spacing, shadows, or typography. Only use what's explicitly defined in the design system.\n- **Semantic tokens are CSS variables** - All semantic tokens compile to CSS custom properties like `var(--bg-surface-default)`. They can be used in custom CSS when utilities aren't sufficient, but prefer utilities.\n- **Token fallback chain exists** - Utility classes (`bg-*`, `fg-*`, `icon-*`, `outline-*`) check semantic tokens first, then fall back to `domain-*` and `primitive-*` tokens. This fallback is intentional for rare cases where designs exceed the design system, but semantic tokens should be the default choice for consistency and theming.\n- **Spacing scale is semantic, not pixel-mapped** - Don't think \"m = 16px\". Think \"m = medium spacing for this context\". The scale adapts to different contexts (button padding vs section margin). Numeric classes work with 1:1 relationship (p-1 = 1px, NOT 4px), but are fallbacks for non-conforming designs only.\n- **Theme variants use @ directives** - The `@theme static` and `@variant light\u002Fdark` syntax is custom. Don't confuse with standard CSS media queries. Themes are applied via class\u002Fattribute on root element.\n- **Design Toolkit components are React Aria** - They use React Aria for accessibility. Don't fight the React Aria state management or variants. Work with `className` and `classNames` props.\n- **Setup is NOT optional** - The PostCSS plugin and @reference directives are required, not conveniences. Missing setup causes cryptic build errors (\"undefined variable\", \"@variant not found\"). Always verify setup before debugging styling issues.\n",{"name":5,"source":24,"license":15,"metadata":25,"description":7,"imported_at":28,"source_path":29,"source_repository":30},"https:\u002F\u002Fgithub.com\u002Fgohypergiant\u002Fagent-skills",{"author":26,"version":27},"accelint","1.0.0","2026-09-20","skills\u002Faccelint-design-foundation\u002FSKILL.md","gohypergiant\u002Fagent-skills","main","2d1750717747097b602acf30bd09a7cbd4b4c6ea","awesome_skills\u002Fai-evaluation\u002Faccelint-design-foundation","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous","2026-11-09 11:45:36",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill accelint-design-foundation",{"tool":43,"command":44},"bunx","bunx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill accelint-design-foundation",{"tool":46,"command":47},"pnpm","pnpm dlx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill accelint-design-foundation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fai-evaluation\u002Faccelint-design-foundation\u002FSKILL.md",true,[51],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"README.md","REFERENCE","参考文档",3220,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fai-evaluation\u002Faccelint-design-foundation\u002FREADME.md",[58,66,73,80,87,94],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":65},"01M7FFFZPC2025JQQHPHDX154J","dei-assessment","Assess diversity, equity, and inclusion with metrics. TRIGGERS - Use when user needs help with dei-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-assessment\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":65},"01M7FFFWN8H4WA7A6Y398QKB6J","dei-action-plan","Create DEI action plans with goals and initiatives. TRIGGERS - Use when user needs help with dei-action-plan related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-action-plan\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":65},"01M7FFFSHTM0QZRVZ2NRJTJ0PY","culture-fit-assessment","Design culture add assessment processes. TRIGGERS - Use when user needs help with culture-fit-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fculture-fit-assessment\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":65},"01M7FFFMA12RKEQA38KHJSXXPS","cowork-to-code-bridge","Use an already-installed, independently verified cowork-to-code bridge to run narrowly approved actions on the user's own macOS, Linux, or WSL2 machine through a local file queue.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcowork-to-code-bridge\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":65},"01M7FFFH1F6M8YRGW5V487GH1K","counter-offer-response","Draft counter-offer responses for retention. TRIGGERS - Use when user needs help with counter-offer-response related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcounter-offer-response\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":65},"01M7FFFDGEHV8Y7J9N40HZXW52","continuous-feedback-system","Design continuous feedback systems. TRIGGERS - Use when user needs help with continuous-feedback-system related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcontinuous-feedback-system\u002FSKILL.md",[],[]]