{"version":3,"file":"tailwind.tokens.preset.cjs","sources":["../src/lib/onyx-material.ts","../src/lib/foundation-tokens.ts","../src/lib/type-roles.ts","../tailwind.tokens.preset.ts"],"sourcesContent":["/**\n * Glass material — typed class-name helpers for FLOATING surfaces (the\n * `GlassSurface` primitive composes these; `AppShell`'s Brain region does\n * too). The CSS these classes resolve to ships two ways: inherited\n * automatically from the Tailwind preset, or via the opt-in\n * `@aisquare/ui/onyx-hex.css` stylesheet (for non-preset consumers) — the\n * filename is legacy (this module used to also own the Onyx Hex notch/\n * keycap/hexagon material, removed once every consumer migrated to plain\n * `rounded-*` + real `border`/`box-shadow`).\n *\n * A glass panel is TWO stacked layers because `backdrop-filter` and\n * `filter` CANCEL on the same node:\n *   - {@link glass.back} — the BACKING layer: `filter: var(--dropFloat)` (a\n *     drop-shadow float) over the `--glassBack` backstop fill. Empty,\n *     presentational.\n *   - {@link glass.panel} / {@link glass.composer} — the GLASS layer on top:\n *     `backdrop-filter: blur(22px) saturate(150%)` over the `--glass`\n *     translucent fill, the `--glassSheen` lumen, an inset rim border\n *     (`--glassBd` for `panel`, `--acLine` for the accent-lined `composer`)\n *     and a `--glassHi` top highlight. `children` render here.\n *\n * @example\n *   import { glass, cn } from \"@aisquare/ui\";\n *   <div className={cn(glass.back, \"absolute inset-0\")} />\n *   <div className={cn(glass.panel, \"relative rounded-2xl\")}>...</div>\n */\n\n/**\n * Frosted-glass material class names for FLOATING surfaces (the `GlassSurface`\n * primitive composes these).\n */\nexport const glass = {\n  /** backing layer — float drop-shadow + backstop fill (no backdrop-filter). */\n  back: \"glass-back\",\n  /** glass layer — frost + sheen + `--glassBd` rim (the floating panel role). */\n  panel: \"glass-panel\",\n  /** glass layer — frost + sheen + `--acLine` rim (the accent-lined composer). */\n  composer: \"glass-composer\",\n} as const;\n\n/** The two glass keyline roles (`panel` rim = `--glassBd`, `composer` rim = `--acLine`). */\nexport type GlassVariant = \"panel\" | \"composer\";\n\n/**\n * Glass material geometry — theme-agnostic, lifted verbatim from the design\n * file's live glass node. Imported by the preset plugin so the recipe lives in\n * exactly one place; only the 7 glass token VALUES flip under `.dark`.\n */\nexport const GLASS_BLUR_PX = 22 as const;\n/** `backdrop-filter` value at the canonical 22px blur (the `GlassSurface` default). */\nexport const GLASS_BACKDROP_FILTER = \"blur(22px) saturate(150%)\" as const;\n/** The blue-lumen sheen, a top-right radial (origin + falloff verbatim from the design node). */\nexport const GLASS_SHEEN_GRADIENT =\n  \"radial-gradient(circle at 82% -8%, var(--glassSheen), transparent 58%)\" as const;\n","/**\n * Foundation token VALUES — the primitive design-token tier (WS-15 token set).\n *\n * Single TS source of truth consumed by two readers (the same split\n * `src/lib/onyx-material.ts` uses):\n *   - `foundationTokensPlugin` in `tailwind.preset.ts` injects these as CSS\n *     custom properties via `addBase`, so every preset consumer gets the\n *     primitives with zero imports.\n *   - `src/foundations/*.stories.tsx` iterate them to render the Storybook\n *     Foundations pages.\n *\n * `src/tokens/foundations.css` is the OPT-IN mirror for non-preset consumers\n * (the `onyx-hex.css` pattern) — keep it in sync when editing values here.\n *\n * Ramp anchors (brand contract):\n *   - navy-900  = `213 80% 13%` — brand navy #071E3C, the exact light-mode\n *     `--primary` / `--foreground` triplet.\n *   - accent-500 = `213 100% 56%` — brand blue #1F84FF, the exact `--accent`\n *     triplet (both modes).\n *   - slate/red/green/amber/sky are the Tailwind v3 palettes verbatim (as HSL\n *     triplets). Their 500 steps sit within 1 RGB point per channel of the\n *     existing `--destructive`/`--success`/`--warning`/`--info` light values\n *     (the semantics keep rounded triplets; the ramps carry Tailwind's\n *     decimals) — visually identical, so adopting a ramp step is seamless,\n *     but the pairs are NOT literally equal: never substitute\n *     `hsl(var(--<ramp>-500))` for a semantic token.\n *     `foundation-tokens.test.ts` pins both invariants (mirror parity +\n *     Tailwind-verbatim).\n */\n\nexport const RAMP_STEPS = [\n  \"50\",\n  \"100\",\n  \"200\",\n  \"300\",\n  \"400\",\n  \"500\",\n  \"600\",\n  \"700\",\n  \"800\",\n  \"900\",\n  \"950\",\n] as const;\n\nexport type RampStep = (typeof RAMP_STEPS)[number];\nexport type Ramp = Record<RampStep, string>;\n\n/** HSL triplets (no commas), `--<ramp>-<step>`. Absolute — no `.dark` flip. */\nexport const COLOR_RAMPS: Record<string, Ramp> = {\n  // Brand ink. Hue 213, anchored at 900 = #071E3C (--primary light).\n  navy: {\n    \"50\": \"213 45% 96%\",\n    \"100\": \"213 42% 91%\",\n    \"200\": \"213 38% 83%\",\n    \"300\": \"213 34% 71%\",\n    \"400\": \"214 28% 56%\",\n    \"500\": \"214 30% 42%\",\n    \"600\": \"214 40% 32%\",\n    \"700\": \"213 55% 24%\",\n    \"800\": \"213 68% 18%\",\n    \"900\": \"213 80% 13%\", // #071E3C — brand navy, = --primary (light)\n    \"950\": \"214 85% 8%\",\n  },\n  // Brand action blue. Anchored at 500 = #1F84FF (--accent, both modes).\n  accent: {\n    \"50\": \"213 100% 97%\",\n    \"100\": \"213 100% 93%\",\n    \"200\": \"213 100% 87%\",\n    \"300\": \"213 100% 78%\",\n    \"400\": \"213 100% 67%\",\n    \"500\": \"213 100% 56%\", // #1F84FF — brand blue, = --accent (both modes)\n    \"600\": \"213 90% 48%\",\n    \"700\": \"213 85% 40%\",\n    \"800\": \"213 80% 32%\",\n    \"900\": \"213 78% 24%\",\n    \"950\": \"213 80% 16%\",\n  },\n  // Neutral — Tailwind v3 slate verbatim (200 ≈ --border/--input,\n  // 500 ≈ --muted-foreground in light mode).\n  slate: {\n    \"50\": \"210 40% 98%\",\n    \"100\": \"210 40% 96.1%\",\n    \"200\": \"214 31.8% 91.4%\",\n    \"300\": \"213 26.8% 83.9%\",\n    \"400\": \"215 20.2% 65.1%\",\n    \"500\": \"215 16.3% 46.9%\",\n    \"600\": \"215 19.3% 34.5%\",\n    \"700\": \"215 25% 26.7%\",\n    \"800\": \"217 32.6% 17.5%\",\n    \"900\": \"222 47.4% 11.2%\",\n    \"950\": \"229 84% 4.9%\",\n  },\n  // Error — Tailwind v3 red verbatim (500 ≈ --destructive light).\n  red: {\n    \"50\": \"0 85.7% 97.3%\",\n    \"100\": \"0 93.3% 94.1%\",\n    \"200\": \"0 96.3% 89.4%\",\n    \"300\": \"0 93.5% 81.8%\",\n    \"400\": \"0 90.6% 70.8%\",\n    \"500\": \"0 84.2% 60.2%\",\n    \"600\": \"0 72.2% 50.6%\",\n    \"700\": \"0 73.7% 41.8%\",\n    \"800\": \"0 70% 35.3%\",\n    \"900\": \"0 62.8% 30.6%\",\n    \"950\": \"0 74.7% 15.5%\",\n  },\n  // Success — Tailwind v3 green verbatim (500 ≈ --success light).\n  green: {\n    \"50\": \"138 76.5% 96.7%\",\n    \"100\": \"141 84.2% 92.5%\",\n    \"200\": \"141 78.9% 85.1%\",\n    \"300\": \"142 76.6% 73.1%\",\n    \"400\": \"142 69.2% 58%\",\n    \"500\": \"142 70.6% 45.3%\",\n    \"600\": \"142 76.2% 36.3%\",\n    \"700\": \"142 71.8% 29.2%\",\n    \"800\": \"143 64.2% 24.1%\",\n    \"900\": \"144 61.2% 20.2%\",\n    \"950\": \"145 80.4% 10%\",\n  },\n  // Warning — Tailwind v3 amber verbatim (500 ≈ --warning/--premium light).\n  amber: {\n    \"50\": \"48 100% 96.1%\",\n    \"100\": \"48 96.5% 88.8%\",\n    \"200\": \"48 96.6% 76.7%\",\n    \"300\": \"46 96.7% 64.5%\",\n    \"400\": \"43 96.4% 56.3%\",\n    \"500\": \"38 92.1% 50.2%\",\n    \"600\": \"32 94.6% 43.7%\",\n    \"700\": \"26 90.5% 37.1%\",\n    \"800\": \"23 82.5% 31.4%\",\n    \"900\": \"22 77.8% 26.5%\",\n    \"950\": \"21 91.7% 14.1%\",\n  },\n  // Info — Tailwind v3 sky verbatim (500 ≈ --info light). Distinct from the\n  // accent-blue ramp on purpose: info ≠ action.\n  sky: {\n    \"50\": \"204 100% 97.1%\",\n    \"100\": \"204 93.8% 93.7%\",\n    \"200\": \"201 94.4% 86.1%\",\n    \"300\": \"199 95.5% 73.9%\",\n    \"400\": \"198 93.2% 59.6%\",\n    \"500\": \"199 88.7% 48.4%\",\n    \"600\": \"200 98% 39.4%\",\n    \"700\": \"201 96.3% 32.2%\",\n    \"800\": \"201 90% 27.5%\",\n    \"900\": \"202 80.3% 23.9%\",\n    \"950\": \"204 80.2% 15.9%\",\n  },\n};\n\n/** The 4px grid, keyed to mirror Tailwind (`p-4` ↔ `--space-4` = 16px).\n *  Tailwind's numeric scale REMAINS the spacing system; these are the\n *  interop/documentation tier. */\nexport const SPACE: Record<string, string> = {\n  \"0\": \"0px\",\n  \"1\": \"4px\",\n  \"2\": \"8px\",\n  \"3\": \"12px\",\n  \"4\": \"16px\",\n  \"5\": \"20px\",\n  \"6\": \"24px\",\n  \"8\": \"32px\",\n  \"10\": \"40px\",\n  \"12\": \"48px\",\n  \"16\": \"64px\",\n  \"20\": \"80px\",\n  \"24\": \"96px\",\n};\n\n/** Radius primitives — raw scale. The SEMANTIC knob stays `--radius` (12px);\n *  `rounded-sm…2xl` derive from it and are what components use. */\nexport const RADIUS: Record<string, string> = {\n  \"0\": \"0px\",\n  \"1\": \"4px\",\n  \"2\": \"8px\",\n  \"3\": \"12px\", // = --radius default → rounded-lg\n  \"4\": \"16px\",\n  \"5\": \"20px\",\n  \"6\": \"24px\",\n  full: \"9999px\",\n};\n\n/** Durations name the steps the preset's `duration-*` utilities use. */\nexport const MOTION_DURATIONS: Record<string, string> = {\n  fast: \"120ms\", // micro feedback: hover tint, press\n  base: \"180ms\", // default UI transition\n  moderate: \"240ms\", // overlays, accordions\n  slow: \"320ms\", // card entrances, layout shifts\n  slower: \"480ms\", // stage/hero reveals\n};\n\n/** Easings name the preset's `ease-*` curves; `out-soft` is the card-in /\n *  Brain-contract curve, previously anonymous. */\nexport const MOTION_EASINGS: Record<string, string> = {\n  \"smooth-out\": \"cubic-bezier(0.16, 1, 0.3, 1)\",\n  snappy: \"cubic-bezier(0.4, 0, 0.2, 1)\",\n  anticipate: \"cubic-bezier(0.7, -0.2, 0.4, 1.3)\",\n  \"out-soft\": \"cubic-bezier(0.22, 1, 0.36, 1)\",\n};\n\n/** 12-column layout contract. Breakpoints stay Tailwind defaults (sm 640 /\n *  md 768 / lg 1024 / xl 1280 / 2xl 1536) — documented, not tokenized. */\nexport const GRID: Record<string, string> = {\n  columns: \"12\",\n  gutter: \"24px\", // = gap-6, the dominant grid gap in components\n  margin: \"32px\", // page gutter, = p-8 (AppShell padding)\n  \"content-max\": \"1280px\", // = max-w-7xl / the xl breakpoint container\n};\n\n/** Elevation ladder — named neutral rungs, navy-tinted rgba(10,37,64,…).\n *  elevation-2 matches the weight of a raised card/dropdown, elevation-3 a\n *  panel/drawer, elevation-4 ≡ --shadow-pop. Mode-aware like --shadow-pop:\n *  dark flips to pure black at higher opacity. */\nexport const ELEVATION_LIGHT: Record<string, string> = {\n  \"1\": \"0 1px 3px rgba(10, 37, 64, 0.1)\",\n  \"2\": \"0 2px 4px rgba(10, 37, 64, 0.1), 0 10px 22px rgba(10, 37, 64, 0.13)\",\n  \"3\": \"0 2px 6px rgba(10, 37, 64, 0.08), 0 18px 40px rgba(10, 37, 64, 0.17)\",\n  \"4\": \"0 30px 60px rgba(10, 37, 64, 0.18)\", // ≡ --shadow-pop (light)\n};\n\n/** Dark elevation — pure-black rungs at the same weights as `ELEVATION_LIGHT`\n *  plus --shadow-pop. FLAGGED for design sign-off (--dropFloat precedent). */\nexport const ELEVATION_DARK: Record<string, string> = {\n  \"1\": \"0 1px 2px rgba(0, 0, 0, 0.3)\",\n  \"2\": \"0 1px 1px rgba(0, 0, 0, 0.3), 0 7px 16px rgba(0, 0, 0, 0.32)\",\n  \"3\": \"0 1px 1px rgba(0, 0, 0, 0.4), 0 16px 34px rgba(0, 0, 0, 0.4)\",\n  \"4\": \"0 30px 60px rgba(0, 0, 0, 0.55)\", // ≡ --shadow-pop (dark)\n};\n","/**\n * Type roles: the typography a theme can set, the way `--ui-radius-*` and `--ui-control-h-*` set shape.\n *\n * Seven roles, each read through `--ui-text-<role>-{size,line,weight,tracking}`, and four text colours read through\n * `--ui-text-{primary,secondary,tertiary,disabled}`. The `ui-text-<role>` and `ui-text-<tone>` classes\n * (tailwind.tokens.preset.ts, `typeRolesPlugin`) and the `Text` / `Heading` primitives use them.\n *\n * DEFAULTS are the library's own scale today (tailwind.tokens.preset.ts `fontSize`, the Card title), so with no theme\n * a role draws exactly what the matching library step draws: numeric and title-page = `heading`, title-section =\n * `title`, title-card = Card's md title, body = `body`, body-sm = `caption`, overline = `eyebrow`. Nothing defines the\n * variables unless a theme is loaded (docs/THEMES.md), so existing consumers compute what they computed before.\n */\nexport const TYPE_ROLES = [\"numeric\", \"title-page\", \"title-section\", \"title-card\", \"body\", \"body-sm\", \"overline\"] as const;\nexport type TypeRole = (typeof TYPE_ROLES)[number];\n\nexport const TEXT_TONES = [\"primary\", \"secondary\", \"tertiary\", \"disabled\"] as const;\nexport type TextTone = (typeof TEXT_TONES)[number];\n\nexport interface TypeRoleValues {\n  size: string;\n  line: string;\n  weight: string;\n  tracking: string;\n}\n\nexport const TYPE_ROLE_DEFAULTS: Record<TypeRole, TypeRoleValues> = {\n  numeric: { size: \"30px\", line: \"1.1\", weight: \"700\", tracking: \"-0.02em\" }, // `heading`\n  \"title-page\": { size: \"30px\", line: \"1.1\", weight: \"700\", tracking: \"-0.02em\" }, // `heading`\n  \"title-section\": { size: \"20px\", line: \"1.25\", weight: \"600\", tracking: \"-0.01em\" }, // `title`\n  \"title-card\": { size: \"1.125rem\", line: \"1.75rem\", weight: \"600\", tracking: \"-0.01em\" }, // CardTitle md as rendered: twMerge drops leading-tight for text-lg\n  body: { size: \"15px\", line: \"1.6\", weight: \"400\", tracking: \"0\" }, // `body`\n  \"body-sm\": { size: \"12px\", line: \"1.4\", weight: \"500\", tracking: \"0\" }, // `caption`\n  overline: { size: \"11px\", line: \"1.3\", weight: \"600\", tracking: \"0.12em\" }, // `eyebrow`\n};\n\nexport const TEXT_TONE_DEFAULTS: Record<TextTone, string> = {\n  primary: \"hsl(var(--foreground))\",\n  secondary: \"hsl(var(--muted-foreground))\",\n  tertiary: \"hsl(var(--muted-foreground))\",\n  disabled: \"hsl(var(--muted-foreground) / 0.5)\",\n};\n\n/** The CSS a role class carries: every property reads its role variable, falling back to the library default. */\nexport function typeRoleDeclarations(role: TypeRole): Record<string, string> {\n  const d = TYPE_ROLE_DEFAULTS[role];\n  const v = (prop: keyof TypeRoleValues) => `var(--ui-text-${role}-${prop}, ${d[prop]})`;\n  return {\n    \"font-size\": v(\"size\"),\n    \"line-height\": v(\"line\"),\n    \"font-weight\": v(\"weight\"),\n    \"letter-spacing\": v(\"tracking\"),\n    ...(role === \"numeric\" ? { \"font-variant-numeric\": \"tabular-nums\" } : {}),\n    ...(role === \"overline\" ? { \"text-transform\": \"uppercase\" } : {}),\n  };\n}\n","/**\n * The token half of the preset — theme values plus this library's OWN plugins,\n * and no third-party plugin registrations.\n *\n * WHY THIS EXISTS (aisquare-ui#285). The full preset also registers\n * `tailwindcss-animate`, `tailwindcss-motion` and `@tailwindcss/typography` on\n * the consumer's behalf. For an app with no Tailwind tuning that is a\n * convenience; for one that has tuned its own it is unadoptable, and both\n * failure modes are real:\n *\n *   - `tailwindcss-animate` claims the `duration` / `ease` / `delay` prefixes\n *     Tailwind core already owns for `transition-*`. With both claiming them,\n *     Tailwind cannot resolve an arbitrary value and REFUSES TO EMIT IT — so\n *     `duration-[180ms]` silently vanishes from the consumer's stylesheet.\n *     `aisquare-studio-unified` had already found and fixed that collision by\n *     registering a namespaced wrapper; taking the full preset undid the fix.\n *\n *   - `tailwindcss-motion` calls `flattenColorPalette`, which throws under\n *     vitest's module resolution. Any consumer test that compiles a Tailwind\n *     config IN-PROCESS therefore cannot load the preset at all. The Tailwind\n *     CLI loads it fine, so the real build is unaffected — but a guard test\n *     that makes the config itself the variable has no CLI equivalent.\n *\n * Take this entry when the app brings its own plugins, and add\n * animate / motion / typography yourself. Take `@aisquare/ui/tailwind.preset`\n * when you want the batteries included; it is this object plus those three, in\n * the same order as before, so nothing changes for existing consumers.\n */\nimport type { Config } from \"tailwindcss\";\nimport plugin from \"tailwindcss/plugin\";\nimport { GLASS_BACKDROP_FILTER, GLASS_SHEEN_GRADIENT } from \"./src/lib/onyx-material\";\nimport {\n  COLOR_RAMPS,\n  RAMP_STEPS,\n  SPACE,\n  RADIUS,\n  MOTION_DURATIONS,\n  MOTION_EASINGS,\n  GRID,\n  ELEVATION_LIGHT,\n  ELEVATION_DARK,\n} from \"./src/lib/foundation-tokens\";\nimport { TEXT_TONES, TEXT_TONE_DEFAULTS, TYPE_ROLES, typeRoleDeclarations } from \"./src/lib/type-roles\";\n\n/**\n * Aiko surface tokens — paper card background, signal accents, hairline\n * border, depth shadow. Injected via Tailwind's `addBase` so consumers get\n * sensible defaults out of the box without importing\n * `@aisquare/pretty/tokens.template.css`. Per-studio overrides in the\n * consumer's own `:root { ... }` declaration win (later cascade beats\n * `@layer base`).\n *\n * Light values match `tokens.template.css`. Dark values handle dark-mode\n * contrast — paper darkens to a lifted dark-blue, border deepens, shadow\n * goes pure black at higher opacity (dark-on-dark drop shadows need more\n * weight to read).\n */\nconst aikoTokensPlugin = plugin(({ addBase }) => {\n  addBase({\n    \":root\": {\n      \"--aiko-paper\": \"30 25% 98.5%\",\n      \"--aiko-spark\": \"76 55% 70%\",\n      \"--aiko-warm\": \"33 70% 72%\",\n      \"--aiko-hot\": \"9 68% 70%\",\n      \"--aiko-border\": \"220 14% 88%\",\n      \"--aiko-shadow\": \"0 12px 28px -14px hsl(220 30% 12% / 0.28)\",\n    },\n    \".dark\": {\n      \"--aiko-paper\": \"218 22% 13%\",\n      \"--aiko-spark\": \"76 45% 60%\",\n      \"--aiko-warm\": \"33 60% 64%\",\n      \"--aiko-hot\": \"9 60% 62%\",\n      \"--aiko-border\": \"220 14% 22%\",\n      \"--aiko-shadow\": \"0 12px 28px -14px hsl(0 0% 0% / 0.50)\",\n    },\n  });\n});\n\n/**\n * Diff / review-preview tokens — insertion and deletion colors plus pre-mixed\n * soft fills, consumed by the redline review primitives (RedlineSpan, DiffRow)\n * via classes like `text-ins`, `bg-ins-bg`, `text-del`, `bg-del-bg`. Injected\n * as base defaults (same pattern as `aikoTokensPlugin`) so consumers without\n * `tokens.template.css` still get a working palette out of the box.\n *\n * Insertion reads green (on-brand with `--success`); deletion reads red\n * (on-brand with `--destructive`). Per-studio overrides win cascade-wise — set\n * these vars in your own `:root { ... }` to retint without forking the preset.\n * Light values match `tokens.template.css`; dark values lose saturation and\n * gain lightness so the soft fills read as bands rather than alarms.\n */\nconst diffTokensPlugin = plugin(({ addBase }) => {\n  addBase({\n    \":root\": {\n      \"--ins\": \"152 55% 36%\",\n      \"--ins-bg\": \"152 60% 92%\",\n      \"--del\": \"355 65% 45%\",\n      \"--del-bg\": \"355 70% 95%\",\n    },\n    \".dark\": {\n      \"--ins\": \"152 60% 55%\",\n      \"--ins-bg\": \"152 50% 18%\",\n      \"--del\": \"355 70% 62%\",\n      \"--del-bg\": \"355 50% 22%\",\n    },\n  });\n});\n\n/**\n * Decorative palette tokens — 10 categorical hues for user-choosable accents\n * (e.g. per-item icon colors in AIStudio-v3's commands UI, which consumes\n * them via static `text-palette-*` / `bg-palette-*` class maps). Ported\n * verbatim from @aisquare/pretty@0.10.34's `paletteTokensPlugin` as part of\n * the pretty retirement: the registry owns pretty's surviving vocabulary.\n * Token-backed (not raw Tailwind hues) so a user's hue choice stays\n * theme-aware; dark values are lightened so the hues read on dark surfaces.\n * Per-studio overrides in the consumer's own `:root { ... }` win cascade-wise\n * (same distribution as `aikoTokensPlugin`).\n */\nconst paletteTokensPlugin = plugin(({ addBase }) => {\n  addBase({\n    \":root\": {\n      \"--palette-blue\": \"217 91% 60%\",\n      \"--palette-emerald\": \"160 84% 39%\",\n      \"--palette-rose\": \"350 89% 60%\",\n      \"--palette-amber\": \"38 92% 50%\",\n      \"--palette-violet\": \"258 90% 66%\",\n      \"--palette-slate\": \"215 16% 47%\",\n      \"--palette-orange\": \"25 95% 53%\",\n      \"--palette-cyan\": \"189 94% 43%\",\n      \"--palette-pink\": \"330 81% 60%\",\n      \"--palette-indigo\": \"239 84% 67%\",\n    },\n    \".dark\": {\n      \"--palette-blue\": \"217 91% 68%\",\n      \"--palette-emerald\": \"160 70% 50%\",\n      \"--palette-rose\": \"350 85% 68%\",\n      \"--palette-amber\": \"38 90% 58%\",\n      \"--palette-violet\": \"258 88% 74%\",\n      \"--palette-slate\": \"215 18% 62%\",\n      \"--palette-orange\": \"25 92% 62%\",\n      \"--palette-cyan\": \"189 85% 55%\",\n      \"--palette-pink\": \"330 80% 70%\",\n      \"--palette-indigo\": \"239 82% 74%\",\n    },\n  });\n});\n\n/**\n * Elevation + hairline tokens — the \"pop\" drop shadow and the thin divider\n * border that Unified's surfaces (modals, hover previews, cards) lean on.\n * Ported from Unified's `src/index.css` during the registry-audit reverse-sync\n * (#219 token groundwork) so the shared library owns these design tokens rather\n * than each consumer re-declaring them.\n *\n * `--shadow-pop` is a wide, soft lift a rung above `--aiko-shadow` — used by\n * floating read-only surfaces (HoverCard). `--hairline` / `--hairline-strong`\n * are the 1px divider colors (`border-hairline` / `border-hairline-strong`).\n * Injected as base defaults (same pattern as `aikoTokensPlugin`); per-studio\n * overrides in the consumer's own `:root { ... }` win cascade-wise. Light values\n * match `tokens.template.css`; dark values deepen the shadow to pure black and\n * flip the hairline to a low-alpha white so it reads on dark surfaces.\n */\nconst elevationTokensPlugin = plugin(({ addBase }) => {\n  addBase({\n    \":root\": {\n      \"--shadow-pop\": \"0 30px 60px rgba(10, 37, 64, 0.18)\",\n      \"--hairline\": \"#e1e7ef\",\n      \"--hairline-strong\": \"#c7cfdb\",\n    },\n    \".dark\": {\n      \"--shadow-pop\": \"0 30px 60px rgba(0, 0, 0, 0.55)\",\n      \"--hairline\": \"rgba(255, 255, 255, 0.1)\",\n      \"--hairline-strong\": \"rgba(255, 255, 255, 0.16)\",\n    },\n  });\n});\n\n/**\n * `outline-hidden` — a Tailwind v4 utility that does NOT exist in v3 at all\n * (not a rename with a v3 equivalent, unlike `shadow-xs`/`rounded-xs` above —\n * this one is genuinely new in v4). The byte-for-byte shadcn mirrors in\n * `src/ui/*.tsx` use it on every custom-focus-ringed element (buttons,\n * inputs, dialog close, …) to suppress the BROWSER's own default focus\n * outline in favor of the component's own `ring-*` treatment, while still\n * leaving something for forced-colors/Windows High Contrast Mode to render.\n * Without this, those 8 files were silently keeping the browser's default\n * outline showing ALONGSIDE the custom ring on focus. Matches Tailwind v4's\n * own definition verbatim (an invisible-in-normal-mode, forced-colors-safe\n * outline — not a bare `outline: none`, which forced-colors mode ignores).\n */\nconst outlineHiddenPlugin = plugin(({ addUtilities }) => {\n  addUtilities({\n    \".outline-hidden\": {\n      outline: \"2px solid transparent\",\n      \"outline-offset\": \"2px\",\n    },\n  });\n});\n\n/**\n * Type roles (docs/THEMES.md \"Type roles\"): `ui-text-<role>` sets size, line height, weight and tracking from\n * `--ui-text-<role>-*`, and `ui-text-<tone>` sets the colour from `--ui-text-<tone>`. Each falls back to the library's\n * own step (src/lib/type-roles.ts), so with no theme a role draws what the matching step draws. Components layer, so a\n * utility on the same element (`text-sm`, `text-foreground`) still wins. Emitted only where a class is used.\n */\nconst typeRolesPlugin = plugin(({ addComponents }) => {\n  addComponents({\n    ...Object.fromEntries(TYPE_ROLES.map((role) => [`.ui-text-${role}`, typeRoleDeclarations(role)])),\n    ...Object.fromEntries(\n      TEXT_TONES.map((tone) => [`.ui-text-${tone}`, { color: `var(--ui-text-${tone}, ${TEXT_TONE_DEFAULTS[tone]})` }]),\n    ),\n  });\n});\n\n/**\n * Glass material foundation — the frosted-glass classes for FLOATING surfaces\n * (`.glass-back/.glass-panel/.glass-composer`), plus the per-theme glass\n * tokens. Injected via the preset so every consumer inherits the material\n * with zero per-app CSS (the same distribution `aikoTokensPlugin` uses); the\n * opt-in `@aisquare/ui/onyx-hex.css` mirror covers non-preset consumers.\n * `GLASS_BACKDROP_FILTER`/`GLASS_SHEEN_GRADIENT` come from\n * `src/lib/onyx-material.ts` so the recipe lives in exactly one place.\n *\n * This plugin used to also own the Onyx Hex notch/keycap/hexagon material\n * (`.nx-*`, `.hex`, `.raise`/`.key`, `.elev-*`, `.nx-rim`/`.nx-keyline`) — that\n * whole system is retired now that every consumer has migrated to plain\n * `rounded-*` + a real `border`/`box-shadow`. Only the glass rules (which\n * never used `clip-path`) survive.\n *\n * Theme-agnostic geometry; only the glass token VALUES flip under `.dark`.\n */\nconst glassMaterialPlugin = plugin(({ addBase, addComponents }) => {\n  addComponents({\n    // Frosted-glass material for FLOATING surfaces (the GlassSurface primitive\n    // composes these). Two stacked layers because `backdrop-filter` and `filter`\n    // CANCEL on the same node, so they are split:\n    //   - `.glass-back`: the BACKING layer carries ONLY `filter: var(--dropFloat)`\n    //     (the float drop-shadow — survives `clip-path` where `box-shadow` is\n    //     clipped away) over a FAINT `--glassBack` fill. The fill alpha is kept\n    //     low (issue #159): it must give the drop-shadow an alpha source to cast\n    //     from, but must NOT be opaque enough to BECOME the surface the frost\n    //     blurs — at the old ~.40/.42 alpha the backdrop-filter sampled this flat\n    //     fill instead of the page, so the frost read as a flat translucent\n    //     rectangle. It is now a near-transparent shadow caster only.\n    //   - `.glass-panel` / `.glass-composer`: the GLASS layer carries ONLY\n    //     `backdrop-filter` (the 22px frost) over the `--glass` translucent fill +\n    //     the `--glassSheen` blue lumen + a `--glassHi` top highlight. The rim\n    //     keyline is a real `border` on the GlassSurface host itself (`--glassBd`\n    //     for the panel / `--acLine` for the composer) — the `inset 0 1px 0\n    //     --glassHi` top sheen here is the extra highlight on top of that border.\n    \".glass-back\": {\n      background: \"var(--glassBack)\",\n      filter: \"var(--dropFloat)\",\n    },\n    \".glass-panel\": {\n      background: `${GLASS_SHEEN_GRADIENT}, var(--glass)`,\n      backdropFilter: GLASS_BACKDROP_FILTER,\n      WebkitBackdropFilter: GLASS_BACKDROP_FILTER,\n      boxShadow: \"inset 0 1px 0 var(--glassHi)\",\n      // Containment + GPU hints (issue #9): `contain: paint` bounds the blur\n      // repaint to this box and `translateZ(0)` promotes it to its own GPU\n      // layer, so a width-animating parent does not re-rasterize the frost every\n      // frame. NOT `will-change: transform` (width is the animated property; the\n      // wrapper carries that hint). Mirrors `.glass-panel` in onyx-hex.css.\n      contain: \"paint\",\n      transform: \"translateZ(0)\",\n    },\n    \".glass-composer\": {\n      background: `${GLASS_SHEEN_GRADIENT}, var(--glass)`,\n      backdropFilter: GLASS_BACKDROP_FILTER,\n      WebkitBackdropFilter: GLASS_BACKDROP_FILTER,\n      boxShadow: \"inset 0 1px 0 var(--glassHi)\",\n      // Containment + GPU hints (issue #9) — see `.glass-panel` above. Mirrors\n      // `.glass-composer` in onyx-hex.css.\n      contain: \"paint\",\n      transform: \"translateZ(0)\",\n    },\n  });\n  addBase({\n    \":root\": {\n      // Frosted-glass family for floating panels/composer (GlassSurface). The\n      // float drop-shadow (`--dropFloat`) is the deepest shadow in the system\n      // (deeper than any card/panel elevation, since glass surfaces float\n      // above everything else). The dark values are verbatim from the design\n      // file's `.onyx` glass node; the two light glass values present in the\n      // design (--glass, --glassSheen) are verbatim and the other 5 light\n      // values are DERIVED (navy-tinted float shadow + bright white frost\n      // rim) — FLAGGED for design sign-off (see the PR's Action-Required\n      // section).\n      \"--dropFloat\":\n        \"drop-shadow(0 3px 8px rgba(10,37,64,.10)) drop-shadow(0 28px 54px rgba(10,37,64,.16))\",\n      \"--glass\": \"rgba(255,255,255,.55)\",\n      // FAINT shadow-caster fill (issue #159). Lowered from .40 so the glass\n      // layer's backdrop-filter samples the PAGE behind the panel, not this\n      // fill. Nonzero so `--dropFloat` still has an alpha source to cast from.\n      \"--glassBack\": \"rgba(255,255,255,.12)\",\n      \"--glassBd\": \"rgba(255,255,255,.85)\",\n      \"--glassHi\": \"rgba(255,255,255,.92)\",\n      \"--glassSheen\": \"rgba(30,111,224,.14)\",\n      \"--acLine\": \"rgba(30,111,224,.42)\",\n    },\n    \".dark\": {\n      // Dark frosted-glass family — verbatim from the design file's `.onyx`\n      // block. Same geometry (blur/sheen/rim structure) as light; only these\n      // values flip: a darker translucent fill, near-black backstop, faint white\n      // rim/highlight, and a brighter blue lumen + accent line.\n      \"--dropFloat\":\n        \"drop-shadow(0 3px 6px rgba(0,0,0,.45)) drop-shadow(0 28px 54px rgba(0,0,0,.58))\",\n      \"--glass\": \"rgba(20,26,40,.36)\",\n      // FAINT shadow-caster fill (issue #159). Lowered from .42 — see the light\n      // note above: keep it nonzero so the float drop-shadow casts, but low\n      // enough that the frost samples the page, not this backstop.\n      \"--glassBack\": \"rgba(9,12,20,.14)\",\n      \"--glassBd\": \"rgba(255,255,255,.22)\",\n      \"--glassHi\": \"rgba(255,255,255,.3)\",\n      \"--glassSheen\": \"rgba(90,160,255,.24)\",\n      \"--acLine\": \"rgba(70,144,255,.42)\",\n    },\n  });\n});\n\n/**\n * Backstop for `prefers-reduced-motion: reduce` across the preset's custom\n * animation utilities. DESIGN.md's Motion section claims every motion\n * primitive honors the OS preference; per-primitive React code already\n * respects it via `useReducedMotion()`, but the preset's CSS-only\n * animations (`animate-shimmer`, `animate-pulse-glow`, etc.) need an\n * explicit gate at the cascade level since `useReducedMotion` doesn't\n * touch keyframe utilities.\n *\n * Pattern matches the canonical accessible-animation guidance — globally\n * disable the named animations under reduced-motion rather than wrapping\n * each `@keyframes` body. Per-primitive `motion-reduce:` modifiers\n * applied at the call site still work; this is the backstop default.\n *\n * Covers the looping animations registered by the preset's `theme.extend.animation`\n * map: `shimmer`, `aurora-drift`, `mood-drift`, `beam`, `breathe`, `pulse-glow`,\n * `recording-glow`, `voicebar`, `noise-shift`, `sheen`, `shimmer-slide`, `skeleton-sweep`,\n * `spin-around`. Tailwind's built-in `animate-pulse` /\n * `animate-spin` / `animate-bounce` / `animate-ping` are not gated here —\n * those are consumer-facing utilities outside pretty's surface area, and\n * Tailwind's own backstop is the right home for them.\n *\n * See [#43](https://github.com/AISquare-Studio/aisquare-pretty/issues/43)\n * for the original gap report and the WCAG 2.3.3 reference.\n */\nconst reducedMotionPlugin = plugin(({ addBase }) => {\n  addBase({\n    \"@media (prefers-reduced-motion: reduce)\": {\n      \".animate-shimmer, .animate-aurora-drift, .animate-mood-drift, .animate-beam, .animate-breathe, .animate-pulse-glow, .animate-recording-glow, .animate-voicebar, .animate-noise-shift, .animate-sheen, .animate-shimmer-slide, .animate-spin-around, .animate-card-in, .animate-progress-stripe, .animate-skeleton-sweep\":\n        {\n          animation: \"none !important\",\n        },\n    },\n  });\n});\n\n/**\n * Type-system base for Onyx + Hex (#122).\n *\n * Two cascade-level defaults the named `fontFamily` / `fontSize` utilities\n * cannot express on their own:\n *\n *  1. The mono family defaults to `tabular-nums`, so counters (`12 / 24`) and\n *     ids (`exp_01H9`) align without jitter the moment a `font-mono` element\n *     renders, with no per-call-site opt-in (satisfies #44 AC4 at the library\n *     level). Authored via `addBase` on `.font-mono` so it applies wherever the\n *     mono utility lands and a call site can still override with an explicit\n *     `font-normal-nums` / `tabular-nums` utility.\n *  2. The display voice (`--font-display`, Inter Variable since the WS-15\n *     one-family consolidation) gets `font-optical-sizing: auto` so its `opsz`\n *     axis tracks the rendered size — the display cut at 56px, the text cut at\n *     body sizes; where `opsz` is unsupported the browser simply ignores it\n *     and the static weight reads, so it degrades gracefully.\n *\n * No motion, color, or hex is introduced here; faces resolve only through the\n * `--font-*` tokens.\n */\nconst typographyBasePlugin = plugin(({ addBase }) => {\n  addBase({\n    \".font-mono\": {\n      fontVariantNumeric: \"tabular-nums\",\n    },\n    \".font-display, .font-serif\": {\n      fontOpticalSizing: \"auto\",\n    },\n  });\n});\n\n/**\n * Foundations — the primitive design-token tier (WS-15 token set). Injects\n * the color ramps (navy/accent/slate/red/green/amber/sky, 50→950), the 4px\n * spacing vars, radius primitives, motion durations/easings, the 12-column\n * grid contract, and the mode-aware elevation ladder as base defaults (same\n * distribution as `aikoTokensPlugin`). Values live in ONE place —\n * `src/lib/foundation-tokens.ts` (the `onyx-material.ts` pattern) — and\n * `src/tokens/foundations.css` is the opt-in mirror for non-preset consumers.\n *\n * Primitives are ABSOLUTE: they do not flip under `.dark` (the semantic\n * tokens in `tokens.template.css` are the mode-aware layer). The one\n * exception is `--elevation-1..4`, which flips to pure black like\n * `--shadow-pop` — dark-on-dark shadows need more weight to read.\n *\n * Ramp anchors: `--navy-900` = light `--primary` (#071E3C) and\n * `--accent-500` = `--accent` (#1F84FF) byte-for-byte; the slate/red/green/\n * amber/sky ramps are Tailwind v3 palettes verbatim, so their 500 steps\n * equal the existing `--destructive`/`--success`/`--warning`/`--info` light\n * values and adopting a ramp step never shifts an existing surface.\n */\nconst foundationTokensPlugin = plugin(({ addBase }) => {\n  const root: Record<string, string> = {};\n  for (const [ramp, steps] of Object.entries(COLOR_RAMPS)) {\n    for (const [step, triplet] of Object.entries(steps)) {\n      root[`--${ramp}-${step}`] = triplet;\n    }\n  }\n  for (const [key, value] of Object.entries(SPACE)) root[`--space-${key}`] = value;\n  for (const [key, value] of Object.entries(RADIUS)) root[`--radius-${key}`] = value;\n  for (const [key, value] of Object.entries(MOTION_DURATIONS))\n    root[`--motion-duration-${key}`] = value;\n  for (const [key, value] of Object.entries(MOTION_EASINGS)) root[`--motion-ease-${key}`] = value;\n  root[\"--grid-columns\"] = GRID.columns;\n  root[\"--grid-gutter\"] = GRID.gutter;\n  root[\"--grid-margin\"] = GRID.margin;\n  root[\"--content-max\"] = GRID[\"content-max\"];\n  for (const [key, value] of Object.entries(ELEVATION_LIGHT)) root[`--elevation-${key}`] = value;\n  const dark: Record<string, string> = {};\n  for (const [key, value] of Object.entries(ELEVATION_DARK)) dark[`--elevation-${key}`] = value;\n  addBase({ \":root\": root, \".dark\": dark });\n});\n\n/** `{ 50: \"hsl(var(--navy-50))\", … }` — ramp steps as Tailwind color values. */\nconst rampSteps = (ramp: string): Record<string, string> =>\n  Object.fromEntries(RAMP_STEPS.map((step) => [step, `hsl(var(--${ramp}-${step}))`]));\n\n/**\n * Shared Tailwind preset for AISquare consumer apps.\n *\n * Provides:\n * - CSS-var-driven color mapping (`--primary`, `--accent`, etc.) — apps keep their theme.\n * - Foundations primitive tier (`foundationTokensPlugin`): color ramps\n *   (`navy/slate` + numeric steps on `accent/destructive/success/warning/info`),\n *   spacing/radius vars, motion tokens, grid contract, elevation ladder\n *   (`shadow-elevation-1..4`). Values in `src/lib/foundation-tokens.ts`;\n *   opt-in CSS mirror at `@aisquare/ui/tokens/foundations.css`.\n * - `borderRadius` scale wired to `--radius`.\n * - Glow shadow scale (`shadow-glow-{sm,md,lg,xl,aurora}`).\n * - Custom timing functions (`ease-smooth-out`, `ease-snappy`, `ease-anticipate`,\n *   `ease-out-soft`) and durations (`duration-120`…`duration-480`), resolved\n *   through the `--motion-*` foundations tokens.\n * - AI-native keyframes + animations: `animate-{shimmer, aurora-drift, beam,\n *   breathe, pulse-glow, noise-shift, spotlight-track, sheen}`.\n * - Plugins:\n *     - `tailwindcss-animate` — `data-state` driven animations (slide-in-from-*,\n *       fade-in-0, zoom-in-95, etc.) for Radix-pattern overlays. The Tailwind v4\n *       successor `tw-animate-css` is CSS-only — moving to it depends on a\n *       Tailwind v3 → v4 upgrade (separate ticket).\n *     - `tailwindcss-motion` — declarative `motion-preset-*` utilities\n *       (motion-preset-fade-blur, motion-preset-shake, etc.).\n *     - `@tailwindcss/typography` — `prose` classes consumed by `<Markdown>`\n *       (and any future long-form content primitive). Inherited by every\n *       consumer through the preset, so they don't have to wire it themselves.\n *\n * Does NOT provide token VALUES. Consumers define `--primary`, `--radius`, etc.\n * in their own CSS so each app keeps its theme overrides.\n *\n * Usage in consumer's `tailwind.config.ts`:\n *\n *   import aisquarePreset from \"@aisquare/ui/tailwind.preset\";\n *   export default {\n *     presets: [aisquarePreset],\n *     content: [\"./src/**\\/*.{ts,tsx}\"],\n *   };\n */\nconst tokensPreset = {\n  darkMode: [\"class\"],\n  content: [\"./node_modules/@aisquare/ui/dist/**/*.{js,mjs}\"],\n  theme: {\n    extend: {\n      colors: {\n        border: \"hsl(var(--border))\",\n        input: \"hsl(var(--input))\",\n        ring: \"hsl(var(--ring))\",\n        background: \"hsl(var(--background))\",\n        foreground: \"hsl(var(--foreground))\",\n        primary: {\n          DEFAULT: \"hsl(var(--primary))\",\n          foreground: \"hsl(var(--primary-foreground))\",\n        },\n        secondary: {\n          DEFAULT: \"hsl(var(--secondary))\",\n          foreground: \"hsl(var(--secondary-foreground))\",\n        },\n        destructive: {\n          DEFAULT: \"hsl(var(--destructive))\",\n          foreground: \"hsl(var(--destructive-foreground))\",\n          // Numeric steps are the ABSOLUTE red ramp (foundations); DEFAULT/\n          // foreground stay the mode-aware semantics. Same shape on success/\n          // warning/info/accent below.\n          ...rampSteps(\"red\"),\n        },\n        // Foundations ramps (primitive tier — absolute, no `.dark` flip).\n        // `navy` is the brand-ink ramp (navy-900 = light --primary #071E3C).\n        // `slate` intentionally shadows Tailwind's built-in slate with\n        // byte-identical values (now routed through `--slate-*` vars) — safe\n        // ONLY while the values stay verbatim Tailwind v3 slate; existing\n        // `text-slate-700`-style literals render unchanged. This invariant is\n        // pinned by `src/lib/foundation-tokens.test.ts` (ramps must equal\n        // tailwindcss/colors verbatim) — if you want a navy-tinted neutral,\n        // add a NEW ramp name, do not retune slate.\n        navy: rampSteps(\"navy\"),\n        slate: rampSteps(\"slate\"),\n        // Semantic state colors — wired to tokens so dark-mode + per-studio\n        // retinting work. Use these in Badge variants, Avatar status dots,\n        // any \"success/warning/info\" surface. Replaces hardcoded\n        // `bg-emerald-500` / `bg-amber-500` literals.\n        success: {\n          DEFAULT: \"hsl(var(--success))\",\n          foreground: \"hsl(var(--success-foreground))\",\n          ...rampSteps(\"green\"),\n        },\n        warning: {\n          DEFAULT: \"hsl(var(--warning))\",\n          foreground: \"hsl(var(--warning-foreground))\",\n          ...rampSteps(\"amber\"),\n        },\n        info: {\n          DEFAULT: \"hsl(var(--info))\",\n          foreground: \"hsl(var(--info-foreground))\",\n          ...rampSteps(\"sky\"),\n        },\n        premium: {\n          DEFAULT: \"hsl(var(--premium))\",\n          foreground: \"hsl(var(--premium-foreground))\",\n        },\n        muted: {\n          DEFAULT: \"hsl(var(--muted))\",\n          foreground: \"hsl(var(--muted-foreground))\",\n        },\n        accent: {\n          DEFAULT: \"hsl(var(--accent))\",\n          foreground: \"hsl(var(--accent-foreground))\",\n          // Steps are the ABSOLUTE brand-blue ramp; DEFAULT is the semantic\n          // (theme-flippable) accent. accent-500 = the default --accent value.\n          ...rampSteps(\"accent\"),\n        },\n        popover: {\n          DEFAULT: \"hsl(var(--popover))\",\n          foreground: \"hsl(var(--popover-foreground))\",\n        },\n        card: {\n          DEFAULT: \"hsl(var(--card))\",\n          foreground: \"hsl(var(--card-foreground))\",\n        },\n        // Aiko brand surface — paper card + 3 intrusion-level signal accents +\n        // hairline border. Sensible defaults are injected via\n        // `aikoTokensPlugin`; override per studio in your own `:root { ... }`.\n        \"aiko-paper\": \"hsl(var(--aiko-paper))\",\n        \"aiko-spark\": \"hsl(var(--aiko-spark))\",\n        \"aiko-warm\": \"hsl(var(--aiko-warm))\",\n        \"aiko-hot\": \"hsl(var(--aiko-hot))\",\n        \"aiko-border\": \"hsl(var(--aiko-border))\",\n        // Diff / review-preview surface — insertion + deletion colors with\n        // pre-mixed soft fills. Consumed by RedlineSpan / DiffRow via\n        // `text-ins` / `bg-ins-bg` / `text-del` / `bg-del-bg`. Sensible\n        // defaults are injected via `diffTokensPlugin`; override per studio\n        // in your own `:root { ... }`.\n        ins: {\n          DEFAULT: \"hsl(var(--ins))\",\n          bg: \"hsl(var(--ins-bg))\",\n        },\n        del: {\n          DEFAULT: \"hsl(var(--del))\",\n          bg: \"hsl(var(--del-bg))\",\n        },\n        // Decorative palette — categorical hues for user-choosable accents\n        // (e.g. per-item icon colors). Token-backed so the choice stays\n        // theme-aware; defaults injected by `paletteTokensPlugin`.\n        palette: {\n          blue: \"hsl(var(--palette-blue))\",\n          emerald: \"hsl(var(--palette-emerald))\",\n          rose: \"hsl(var(--palette-rose))\",\n          amber: \"hsl(var(--palette-amber))\",\n          violet: \"hsl(var(--palette-violet))\",\n          slate: \"hsl(var(--palette-slate))\",\n          orange: \"hsl(var(--palette-orange))\",\n          cyan: \"hsl(var(--palette-cyan))\",\n          pink: \"hsl(var(--palette-pink))\",\n          indigo: \"hsl(var(--palette-indigo))\",\n        },\n        // Hairline divider colors (raw values, not HSL triplets). Exposed as\n        // colors so `border-hairline` / `bg-hairline` / `text-hairline` (and the\n        // `-strong` variants) all resolve. Defaults injected via\n        // `elevationTokensPlugin`; override per studio in your own `:root`.\n        hairline: {\n          DEFAULT: \"var(--hairline)\",\n          strong: \"var(--hairline-strong)\",\n        },\n      },\n      // Type faces. Each maps to a `--font-*` token defined in\n      // `tokens.template.css` (light + dark) and loaded by `fonts.css`.\n      // ONE brand family (WS-15 consolidation): Inter carries sans AND the\n      // display voice (`--font-display` resolves to `--font-sans`); mono is a\n      // system stack. `display` and `serif` are BACK-COMPAT ALIASES kept on\n      // purpose: `font-serif` intentionally resolves to the sans face now\n      // (no serif ships), so existing call sites keep working instead of\n      // falling back to the browser serif. Faces are referenced ONLY through\n      // the tokens, never a hard-coded stack.\n      // `aria-invalid:` is used across the stock layer (checkbox, input,\n      // select, radio-group, textarea, toggle) for error-state styling, but\n      // Tailwind v3's default `theme.aria` shorthand map does NOT include\n      // `invalid` (only checked/disabled/expanded/hidden/pressed/readonly/\n      // required/selected/busy) — so every `aria-invalid:*` utility in those\n      // files silently compiled to no CSS at all until this was added. The\n      // shadcn source targets Tailwind v4, where `aria-*` variants resolve\n      // generically; v3 needs the shorthand declared explicitly.\n      aria: {\n        invalid: 'invalid=\"true\"',\n      },\n      fontFamily: {\n        sans: [\"var(--font-sans)\"],\n        mono: [\"var(--font-mono)\"],\n        display: [\"var(--font-display)\"],\n        serif: [\"var(--font-display)\"],\n      },\n      // Named whole-pixel type scale, the Onyx+Hex hierarchy (#122 §2). Every\n      // step is `[size, { lineHeight, letterSpacing, fontWeight }]`; zero\n      // half-pixel sizes (kills the #44 sub-pixel smear). `text-display` is the\n      // editorial serif step (hero / stage / Reports / Notes); `text-eyebrow`\n      // is the uppercase-tracked mono label. All other steps are the body sans.\n      fontSize: {\n        display: [\"56px\", { lineHeight: \"1.02\", letterSpacing: \"-0.02em\", fontWeight: \"700\" }],\n        heading: [\"30px\", { lineHeight: \"1.1\", letterSpacing: \"-0.02em\", fontWeight: \"700\" }],\n        title: [\"20px\", { lineHeight: \"1.25\", letterSpacing: \"-0.01em\", fontWeight: \"600\" }],\n        \"body-lg\": [\"17px\", { lineHeight: \"1.6\", letterSpacing: \"0\", fontWeight: \"400\" }],\n        body: [\"15px\", { lineHeight: \"1.6\", letterSpacing: \"0\", fontWeight: \"400\" }],\n        label: [\"13px\", { lineHeight: \"1.4\", letterSpacing: \"0\", fontWeight: \"500\" }],\n        caption: [\"12px\", { lineHeight: \"1.4\", letterSpacing: \"0\", fontWeight: \"500\" }],\n        eyebrow: [\"11px\", { lineHeight: \"1.3\", letterSpacing: \"0.12em\", fontWeight: \"600\" }],\n      },\n      borderRadius: {\n        lg: \"var(--radius)\",\n        md: \"calc(var(--radius) - 2px)\",\n        sm: \"calc(var(--radius) - 4px)\",\n        xl: \"calc(var(--radius) + 4px)\",\n        \"2xl\": \"calc(var(--radius) + 8px)\",\n        // Same v3/v4 registry-source gap as `shadow-xs` above: v3 has no\n        // `xs` radius step (`sm` is the smallest), so every `rounded-xs` in\n        // the byte-for-byte shadcn mirrors was silently compiling to\n        // nothing. Tailwind v4's fixed `rounded-xs` value (0.125rem),\n        // independent of the `--radius` knob v3's own `sm` derives from.\n        xs: \"0.125rem\",\n      },\n      boxShadow: {\n        // `shadow-xs` — the stock layer's byte-for-byte shadcn mirrors are\n        // pulled from shadcn's Tailwind v4 registry source (see README.md),\n        // but this preset runs Tailwind v3, which has no `xs` shadow key at\n        // all (v3's smallest named step is `sm`). Every `shadow-xs` in\n        // `src/ui/*.tsx` (button, input, switch, checkbox, menubar, textarea,\n        // radio-group, toggle, toggle-group, …) was silently compiling to\n        // NOTHING — a real, previously-unnoticed gap surfaced by a\n        // toggle-group regression test. Value is Tailwind v4's actual\n        // `shadow-xs` definition, which is byte-identical to v3's own\n        // default `shadow-sm` — bridges the v3/v4 naming gap without\n        // inventing a new visual weight.\n        xs: \"0 1px 2px 0 rgb(0 0 0 / 0.05)\",\n        // Aiko paper-card depth shadow. Shipped with mode-aware defaults via\n        // `aikoTokensPlugin` (light: dark-navy at 28%; dark: pure-black at 50%).\n        // Override `--aiko-shadow` per studio for a custom drop.\n        aiko: \"var(--aiko-shadow)\",\n        // Glow scale — auras of increasing intensity. Pair with hover/focus/active\n        // states or with the AI activity treatments (pulse-glow keyframe).\n        \"glow-sm\": \"var(--shadow-glow-sm, 0 4px 12px hsl(var(--accent) / 0.15))\",\n        glow: \"var(--shadow-glow, 0 8px 24px hsl(var(--accent) / 0.20))\",\n        \"glow-md\": \"var(--shadow-glow, 0 8px 24px hsl(var(--accent) / 0.20))\",\n        \"glow-lg\": \"var(--shadow-glow-lg, 0 12px 36px hsl(var(--accent) / 0.28))\",\n        \"glow-xl\": \"var(--shadow-glow-xl, 0 20px 60px hsl(var(--accent) / 0.36))\",\n        \"glow-aurora\":\n          \"var(--shadow-glow-aurora, 0 0 0 1px hsl(var(--accent) / 0.12), 0 8px 24px hsl(var(--accent) / 0.24), 0 24px 80px hsl(var(--primary) / 0.18))\",\n        lift: \"0 8px 20px hsl(var(--primary) / 0.18)\",\n        // Wide, soft \"pop\" lift for floating read-only surfaces (HoverCard).\n        // A rung above `aiko`. Default injected via `elevationTokensPlugin`.\n        pop: \"var(--shadow-pop, 0 30px 60px rgba(10, 37, 64, 0.18))\",\n        // Foundations elevation ladder — the named neutral rungs\n        // (`shadow-elevation-1..4`). elevation-2 ≡ --dropCard as box-shadow,\n        // elevation-3 ≡ --dropPanel, elevation-4 ≡ shadow-pop. Mode-aware\n        // defaults injected via `foundationTokensPlugin`.\n        \"elevation-1\": \"var(--elevation-1)\",\n        \"elevation-2\": \"var(--elevation-2)\",\n        \"elevation-3\": \"var(--elevation-3)\",\n        \"elevation-4\": \"var(--elevation-4)\",\n      },\n      // Named layout spacing on top of Tailwind's numeric 4px grid (which\n      // REMAINS the spacing system — foundations only name the grid contract).\n      spacing: {\n        gutter: \"var(--grid-gutter)\", // 24px — the dominant grid gap (gap-6)\n        page: \"var(--grid-margin)\", // 32px — page gutter (p-8, AppShell)\n      },\n      maxWidth: {\n        content: \"var(--content-max)\", // 1280px — the content column cap\n      },\n      backgroundImage: {\n        // Mesh / aurora gradient stops — multi-color, hue-shifting feel.\n        // Consumers can also override `--mesh-1/2/3` to retint per studio.\n        \"mesh-aurora\":\n          \"radial-gradient(at 20% 20%, hsl(var(--mesh-1, var(--accent))) 0%, transparent 55%), radial-gradient(at 80% 30%, hsl(var(--mesh-2, var(--primary))) 0%, transparent 55%), radial-gradient(at 50% 90%, hsl(var(--mesh-3, var(--accent))) 0%, transparent 55%)\",\n        \"mesh-prism\":\n          \"conic-gradient(from 180deg at 50% 50%, hsl(var(--mesh-1, var(--accent))) 0deg, hsl(var(--mesh-2, var(--primary))) 120deg, hsl(var(--mesh-3, var(--accent))) 240deg, hsl(var(--mesh-1, var(--accent))) 360deg)\",\n        \"shimmer-pass\":\n          \"linear-gradient(90deg, transparent 0%, hsl(var(--foreground) / 0.08) 50%, transparent 100%)\",\n        \"noise-overlay\":\n          \"url(\\\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.9' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E\\\")\",\n      },\n      backgroundSize: {\n        \"mesh-lg\": \"200% 200%\",\n        \"shimmer-pass\": \"200% 100%\",\n      },\n      // Easing/duration utilities resolve through the foundations motion\n      // tokens (with the previous literals as fallbacks, the glow-shadow\n      // pattern), so a consumer can retime the whole system from `:root`.\n      transitionTimingFunction: {\n        \"smooth-out\": \"var(--motion-ease-smooth-out, cubic-bezier(0.16, 1, 0.3, 1))\",\n        snappy: \"var(--motion-ease-snappy, cubic-bezier(0.4, 0, 0.2, 1))\",\n        anticipate: \"var(--motion-ease-anticipate, cubic-bezier(0.7, -0.2, 0.4, 1.3))\",\n        // The card-in / Brain-contract curve, previously anonymous.\n        \"out-soft\": \"var(--motion-ease-out-soft, cubic-bezier(0.22, 1, 0.36, 1))\",\n      },\n      transitionDuration: {\n        \"120\": \"var(--motion-duration-fast, 120ms)\",\n        \"180\": \"var(--motion-duration-base, 180ms)\",\n        \"240\": \"var(--motion-duration-moderate, 240ms)\",\n        \"320\": \"var(--motion-duration-slow, 320ms)\",\n        \"480\": \"var(--motion-duration-slower, 480ms)\",\n      },\n      keyframes: {\n        // AI-native motion vocabulary — referenced by the `animate-*` utilities below.\n        shimmer: {\n          \"0%\": { backgroundPosition: \"-200% 0\" },\n          \"100%\": { backgroundPosition: \"200% 0\" },\n        },\n        // Skeleton `sweep`: v2's 400%-wide band, walked right to left. Separate\n        // from `shimmer`, whose -200%..200% travel is tuned for a 200% image.\n        \"skeleton-sweep\": {\n          from: { backgroundPosition: \"100% 0\" },\n          to: { backgroundPosition: \"0% 0\" },\n        },\n        \"aurora-drift\": {\n          \"0%, 100%\": { backgroundPosition: \"0% 50%\" },\n          \"50%\": { backgroundPosition: \"100% 50%\" },\n        },\n        // Slow, calm drift for the <MoodLighting> ambient field. Transform-only\n        // (translate + scale, never opacity-from-0) so the field is painted at\n        // full low alpha from the first frame — html-to-image / PDF export of a\n        // stage never captures a blank backdrop. Registered in the\n        // reduced-motion kill-list above so it freezes at its rest frame.\n        //\n        // MoodLighting #160: the prior amplitude (translate 5%/-4%, scale 1.10)\n        // moved a low-alpha corner blob only a few px over the period, so the\n        // field read as static. Raised to translate 9%/-7% + scale 1.18 at the\n        // apex (still transform-only, still export-safe) so the drift crosses\n        // the perceptual threshold while staying calm. mood-drift is\n        // MoodLighting-only — no other consumer references this keyframe.\n        \"mood-drift\": {\n          \"0%, 100%\": { transform: \"translate(0, 0) scale(1)\" },\n          \"50%\": { transform: \"translate(9%, -7%) scale(1.18)\" },\n        },\n        beam: {\n          \"0%\": { transform: \"translateX(-100%) skewX(-12deg)\" },\n          \"100%\": { transform: \"translateX(200%) skewX(-12deg)\" },\n        },\n        breathe: {\n          \"0%, 100%\": { opacity: \"1\", transform: \"scale(1)\" },\n          \"50%\": { opacity: \"0.7\", transform: \"scale(0.985)\" },\n        },\n        \"pulse-glow\": {\n          \"0%, 100%\": {\n            boxShadow: \"var(--shadow-glow, 0 8px 24px hsl(var(--accent) / 0.20))\",\n          },\n          \"50%\": {\n            boxShadow:\n              \"var(--shadow-glow-aurora, 0 0 0 1px hsl(var(--accent) / 0.16), 0 12px 40px hsl(var(--accent) / 0.36), 0 24px 80px hsl(var(--primary) / 0.24))\",\n          },\n        },\n        // Destructive-tinted twin of `pulse-glow`, used to telegraph an\n        // active \"we are recording\" state on chat surfaces (`<ChatInput>`\n        // when its mic is listening). Sits 1px ring + soft outer halo at\n        // ease, ramps to a stronger ring + farther halo at the apex so\n        // the input chrome reads as alive without the noise of a fast\n        // pulse. Overrides any `focus-within:shadow-glow` that the chat\n        // variant would otherwise apply because animations win over\n        // static styles for the duration of the keyframe.\n        \"recording-glow\": {\n          \"0%, 100%\": {\n            boxShadow:\n              \"0 0 0 1px hsl(var(--destructive) / 0.25), 0 6px 20px hsl(var(--destructive) / 0.18)\",\n          },\n          \"50%\": {\n            boxShadow:\n              \"0 0 0 1px hsl(var(--destructive) / 0.50), 0 12px 36px hsl(var(--destructive) / 0.40)\",\n          },\n        },\n        // Voice-input equalizer bar (ListeningWave) — a soundbar bounce.\n        // scaleY off a centred origin, so the bar grows in both directions and\n        // a row of them reads as a level meter rather than a rising graph.\n        voicebar: {\n          \"0%, 100%\": { transform: \"scaleY(0.35)\" },\n          \"50%\": { transform: \"scaleY(1)\" },\n        },\n        \"noise-shift\": {\n          \"0%, 100%\": { backgroundPosition: \"0% 0%\" },\n          \"50%\": { backgroundPosition: \"100% 100%\" },\n        },\n        sheen: {\n          \"0%\": { opacity: \"0\", transform: \"translateX(-100%)\" },\n          \"10%, 90%\": { opacity: \"1\" },\n          \"100%\": { opacity: \"0\", transform: \"translateX(100%)\" },\n        },\n        // Conic-spark pair used by <ShimmerButton> (Creator Studio v2 port).\n        // `spin-around` rotates the conic gradient through quarter-turn rests;\n        // `shimmer-slide` walks the spark container across the button width.\n        // Speed comes from the component's `--sb-speed` inline var so each\n        // instance can tune its own pass duration.\n        \"spin-around\": {\n          \"0%\": { transform: \"translateZ(0) rotate(0)\" },\n          \"15%, 35%\": { transform: \"translateZ(0) rotate(90deg)\" },\n          \"65%, 85%\": { transform: \"translateZ(0) rotate(270deg)\" },\n          \"100%\": { transform: \"translateZ(0) rotate(360deg)\" },\n        },\n        \"shimmer-slide\": {\n          to: { transform: \"translate(calc(100cqw - 100%), 0)\" },\n        },\n        // Card entrance for grid/list cells (e.g. <ArtifactTile>). Transform-only\n        // (translateY, never opacity-from-0) so an html-to-image / PDF export of a\n        // mid-animation grid never captures a blank card. Stagger via a per-cell\n        // `animationDelay` inline style on the consumer side.\n        \"card-in\": {\n          from: { transform: \"translateY(10px)\" },\n          to: { transform: \"translateY(0)\" },\n        },\n        // Used by <Accordion> to animate Radix's data-state height transitions.\n        // Reads --radix-accordion-content-height which Radix sets per content\n        // element so the keyframe stays content-size-aware automatically.\n        \"accordion-down\": {\n          from: { height: \"0\" },\n          to: { height: \"var(--radix-accordion-content-height)\" },\n        },\n        \"accordion-up\": {\n          from: { height: \"var(--radix-accordion-content-height)\" },\n          to: { height: \"0\" },\n        },\n        // Contained indeterminate loader for <StatusProgress>. Walks a repeating\n        // stripe by exactly one tile (22px) so the motion is seamless and the\n        // track is NEVER empty (unlike shimmer-slide, which exits the container).\n        \"progress-stripe\": {\n          to: { backgroundPositionX: \"22px\" },\n        },\n      },\n      animation: {\n        shimmer: \"shimmer 1500ms cubic-bezier(0.4, 0, 0.6, 1) infinite\",\n        \"skeleton-sweep\": \"skeleton-sweep 1400ms linear infinite\",\n        \"aurora-drift\": \"aurora-drift 8000ms cubic-bezier(0.45, 0, 0.55, 1) infinite\",\n        // MoodLighting #160: 17s -> 14s so a still demo shows visible change\n        // within a few seconds; still calm. mood-drift is MoodLighting-only.\n        \"mood-drift\": \"mood-drift 14000ms ease-in-out infinite\",\n        beam: \"beam 4000ms linear infinite\",\n        breathe: \"breathe 3000ms cubic-bezier(0.45, 0, 0.55, 1) infinite\",\n        \"pulse-glow\": \"pulse-glow 2400ms cubic-bezier(0.45, 0, 0.55, 1) infinite\",\n        \"recording-glow\": \"recording-glow 2000ms cubic-bezier(0.45, 0, 0.55, 1) infinite\",\n        voicebar: \"voicebar 900ms ease-in-out infinite\",\n        \"noise-shift\": \"noise-shift 10000ms linear infinite\",\n        sheen: \"sheen 1800ms cubic-bezier(0.4, 0, 0.6, 1) infinite\",\n        \"shimmer-slide\": \"shimmer-slide var(--sb-speed, 3s) ease-in-out infinite alternate\",\n        \"spin-around\": \"spin-around calc(var(--sb-speed, 3s) * 2) infinite linear\",\n        \"accordion-down\": \"accordion-down 200ms cubic-bezier(0.4, 0, 0.2, 1)\",\n        \"accordion-up\": \"accordion-up 200ms cubic-bezier(0.4, 0, 0.2, 1)\",\n        // out-soft easing per the Brain motion contract; one-shot `both` so the\n        // final (translateY 0) frame is held.\n        \"card-in\": \"card-in 320ms cubic-bezier(0.22, 1, 0.36, 1) both\",\n        \"progress-stripe\": \"progress-stripe 700ms linear infinite\",\n      },\n    },\n  },\n  plugins: [\n    typographyBasePlugin,\n    foundationTokensPlugin,\n    aikoTokensPlugin,\n    diffTokensPlugin,\n    paletteTokensPlugin,\n    elevationTokensPlugin,\n    outlineHiddenPlugin,\n    typeRolesPlugin,\n    glassMaterialPlugin,\n    reducedMotionPlugin,\n  ],\n} satisfies Partial<Config>;\n\nexport default tokensPreset;\n"],"names":["GLASS_BACKDROP_FILTER","GLASS_SHEEN_GRADIENT","RAMP_STEPS","COLOR_RAMPS","SPACE","RADIUS","MOTION_DURATIONS","MOTION_EASINGS","GRID","ELEVATION_LIGHT","ELEVATION_DARK","TYPE_ROLES","TEXT_TONES","TYPE_ROLE_DEFAULTS","TEXT_TONE_DEFAULTS","typeRoleDeclarations","role","d","v","prop","aikoTokensPlugin","plugin","addBase","diffTokensPlugin","paletteTokensPlugin","elevationTokensPlugin","outlineHiddenPlugin","addUtilities","typeRolesPlugin","addComponents","tone","glassMaterialPlugin","reducedMotionPlugin","typographyBasePlugin","foundationTokensPlugin","root","ramp","steps","step","triplet","key","value","dark","rampSteps","tokensPreset"],"mappings":"mDAkDaA,EAAwB,4BAExBC,EACX,yECvBWC,EAAa,CACxB,KACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,KACF,EAMaC,EAAoC,CAE/C,KAAM,CACJ,GAAM,cACN,IAAO,cACP,IAAO,cACP,IAAO,cACP,IAAO,cACP,IAAO,cACP,IAAO,cACP,IAAO,cACP,IAAO,cACP,IAAO,cACP,IAAO,YAAA,EAGT,OAAQ,CACN,GAAM,eACN,IAAO,eACP,IAAO,eACP,IAAO,eACP,IAAO,eACP,IAAO,eACP,IAAO,cACP,IAAO,cACP,IAAO,cACP,IAAO,cACP,IAAO,aAAA,EAIT,MAAO,CACL,GAAM,cACN,IAAO,gBACP,IAAO,kBACP,IAAO,kBACP,IAAO,kBACP,IAAO,kBACP,IAAO,kBACP,IAAO,gBACP,IAAO,kBACP,IAAO,kBACP,IAAO,cAAA,EAGT,IAAK,CACH,GAAM,gBACN,IAAO,gBACP,IAAO,gBACP,IAAO,gBACP,IAAO,gBACP,IAAO,gBACP,IAAO,gBACP,IAAO,gBACP,IAAO,cACP,IAAO,gBACP,IAAO,eAAA,EAGT,MAAO,CACL,GAAM,kBACN,IAAO,kBACP,IAAO,kBACP,IAAO,kBACP,IAAO,gBACP,IAAO,kBACP,IAAO,kBACP,IAAO,kBACP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