{
 "name": "kindofui",
 "url": "https://kindofui.vercel.app/",
 "build": 1012,
 "patterns": [
  {
   "id": "bento",
   "title": "Bento grid",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "Rounded tiles of different sizes packed into one grid. The biggest tile holds the headline feature and small tiles hold single facts.",
   "goodFor": "Feature overviews, portfolios, product pages",
   "watchOut": "Long reading or strict step-by-step flows",
   "seenIn": "Apple product pages, Linear, Vercel, portfolio sites",
   "prompt": "Design this interface in the Bento grid visual style.\n\nWhat it is: Rounded tiles of different sizes packed into one grid. The biggest tile holds the headline feature and small tiles hold single facts.\nGood for: Feature overviews, portfolios, product pages.\nWatch out: Long reading or strict step-by-step flows.\nSeen in: Apple product pages, Linear, Vercel, portfolio sites\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-bento\">\n    <div class=\"b1\"><span>Pro camera system</span><big>Titanium.<br>Strong. Light.</big></div>\n    <div class=\"b2\"><span>Battery</span><big>22h</big></div>\n    <div class=\"b3\"><span>Chip</span><big>A18</big></div>\n    <div class=\"b4\"><span>48MP Main · 5× Telephoto</span><div class=\"bars\"><i style=\"height:40%\"></i><i style=\"height:70%\"></i><i style=\"height:55%\"></i><i style=\"height:90%\"></i><i style=\"height:65%\"></i><i style=\"height:100%\"></i></div></div>\n    <div class=\"b5\"><span>USB‑C</span><big>10Gb/s</big></div>\n    <div class=\"b6\"><span>Action button</span><big>One press.</big></div>\n    <div class=\"b7\"><span>Colors</span><big>4</big></div>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-bento, .s-bento *, .s-bento *::before, .s-bento *::after { box-sizing: border-box; }\n.s-bento { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-bento button { font: inherit; cursor: pointer; }\n.s-bento { background: #ebebee; padding: 10px; display: grid; grid-template-columns: repeat(4,1fr); grid-template-rows: repeat(3,1fr); gap: 8px; container-type: inline-size; }\n.s-bento > div { background: #fff; border-radius: 14px; padding: 10px; color: #111; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; font-size: 10.5px; line-height: 1.25; }\n.s-bento big { font: 700 20px/1 var(--display); display: block; }\n.s-bento .b1 { grid-column: span 2; grid-row: span 2; background: linear-gradient(155deg,#1d1d20,#43444b); color: #fff; }\n.s-bento .b1 big { font-size: 24px; }\n@container (max-width:380px) {\n  .s-bento > div { padding: 8px; }\n  .s-bento big { font-size: 15px; }\n  .s-bento .b1 big { font-size: 21px; }\n}\n@container (max-width:300px) {\n  .s-bento > div { padding: 7px; }\n  .s-bento big { font-size: 12.5px; }\n  .s-bento .b1 big { font-size: 18px; }\n}\n.s-bento .b3 { background: #d9f99d; }\n.s-bento .b4 { grid-column: span 2; }\n.s-bento .b6 { grid-column: span 2; background: #dbe7ff; }\n.s-bento .bars { display: flex; gap: 3px; align-items: end; height: 22px; }\n.s-bento .bars i { flex: 1; background: #111; border-radius: 2px; }",
    "js": ""
   }
  },
  {
   "id": "glass",
   "title": "Glassmorphism",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "Frosted, semi-transparent panels that blur what sits behind them, with a thin light border. Needs a colorful background to work.",
   "goodFor": "Overlays and controls over rich photos or gradients",
   "watchOut": "Plain backgrounds and text-heavy screens; check contrast",
   "seenIn": "visionOS, iOS Control Center, Windows 11 Acrylic",
   "prompt": "Design this interface in the Glassmorphism visual style.\n\nWhat it is: Frosted, semi-transparent panels that blur what sits behind them, with a thin light border. Needs a colorful background to work.\nGood for: Overlays and controls over rich photos or gradients.\nWatch out: Plain backgrounds and text-heavy screens; check contrast.\nSeen in: visionOS, iOS Control Center, Windows 11 Acrylic\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-glass center\">\n    <span class=\"orb o1\"></span><span class=\"orb o2\"></span>\n    <div class=\"card\">\n      <div style=\"font-size:12px;opacity:.85\">Mumbai</div>\n      <div class=\"temp\">29°</div>\n      <div style=\"font-size:12px;opacity:.85\">Partly cloudy · H 31° L 26°</div>\n      <div class=\"hrs\"><span>Now<b>29°</b></span><span>3PM<b>30°</b></span><span>6PM<b>28°</b></span><span>9PM<b>27°</b></span></div>\n    </div>\n  </div>\n",
    "css": ":root { --body: \"Figtree\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Figtree */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-glass, .s-glass *, .s-glass *::before, .s-glass *::after { box-sizing: border-box; }\n.s-glass { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-glass button { font: inherit; cursor: pointer; }\n.center { display: grid; place-items: center; }\n.s-glass { background: radial-gradient(circle at 18% 28%,#ff6fae 0,transparent 32%),radial-gradient(circle at 82% 18%,#6f8bff 0,transparent 38%),radial-gradient(circle at 62% 88%,#ffcf5c 0,transparent 32%),#191d3a; }\n.s-glass .orb { position: absolute; border-radius: 50%; }\n.s-glass .o1 { width: 90px; height: 90px; background: #ff9a62; left: 22%; top: 20%; }\n.s-glass .o2 { width: 70px; height: 70px; background: #5ee0c8; right: 20%; bottom: 16%; }\n.s-glass .card { position: relative; width: min(78%,280px); padding: 18px; border-radius: 20px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.4); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.25); }\n.s-glass .temp { font: 300 46px/1 var(--body); }\n.s-glass .hrs { display: flex; justify-content: space-between; margin-top: 12px; font-size: 11px; opacity: .9; }\n.s-glass .hrs span { display: grid; text-align: center; gap: 2px; }\n@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {\n  .s-glass .card { background: rgba(255,255,255,.3); }\n}",
    "js": ""
   }
  },
  {
   "id": "neu",
   "title": "Neumorphism",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "Elements look pushed out of, or pressed into, the same-colored surface using one light and one dark shadow. Low contrast makes it hard to use for real products.",
   "goodFor": "Concepts, small widgets, a few toggles",
   "watchOut": "Real products: low contrast fails accessibility",
   "seenIn": "Dribbble concepts, smart-home and calculator apps",
   "prompt": "Design this interface in the Neumorphism visual style.\n\nWhat it is: Elements look pushed out of, or pressed into, the same-colored surface using one light and one dark shadow. Low contrast makes it hard to use for real products.\nGood for: Concepts, small widgets, a few toggles.\nWatch out: Real products: low contrast fails accessibility.\nSeen in: Dribbble concepts, smart-home and calculator apps\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-neu\">\n    <div class=\"knob\"><div>72%</div></div>\n    <div class=\"col\">\n      <button class=\"nb\" aria-pressed=\"true\" data-toggle>Bass boost</button>\n      <button class=\"nb\" aria-pressed=\"false\" data-toggle>Night mode</button>\n      <button class=\"nb\" aria-pressed=\"false\" data-toggle>Shuffle</button>\n    </div>\n  </div>\n",
    "css": ":root { --body: \"Figtree\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Figtree */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-neu, .s-neu *, .s-neu *::before, .s-neu *::after { box-sizing: border-box; }\n.s-neu { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-neu button { font: inherit; cursor: pointer; }\n.s-neu { background: #e2e7ee; display: flex; align-items: center; justify-content: center; gap: 28px; flex-wrap: wrap; color: #6b7686; padding: 12px; }\n.s-neu .knob { width: 110px; height: 110px; border-radius: 50%; box-shadow: 9px 9px 18px #bec4ce,-9px -9px 18px #fff; display: grid; place-items: center; }\n.s-neu .knob div { width: 76px; height: 76px; border-radius: 50%; box-shadow: inset 6px 6px 12px #c3c9d3,inset -6px -6px 12px #fff; display: grid; place-items: center; font: 700 18px var(--body); }\n.s-neu .col { display: grid; gap: 14px; }\n.s-neu .nb { border: 0; background: #e2e7ee; color: #6b7686; width: 110px; height: 40px; border-radius: 12px; box-shadow: 6px 6px 12px #c3c9d3,-6px -6px 12px #fff; font-weight: 600; }\n.s-neu .nb[aria-pressed=\"true\"] { box-shadow: inset 5px 5px 10px #c3c9d3,inset -5px -5px 10px #fff; color: #3b82f6; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // generic toggles\n  $$('[data-toggle]').forEach(b=>b.addEventListener('click',()=>b.setAttribute('aria-pressed',b.getAttribute('aria-pressed')!=='true')));\n})();"
   }
  },
  {
   "id": "minimal",
   "title": "Minimalism",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "Lots of white space, one or two colors and only the elements the task needs. Hierarchy comes from size and spacing instead of decoration.",
   "goodFor": "Content-first products, writing and reading tools",
   "watchOut": "Feature-dense apps that need visible options",
   "seenIn": "Google Search, Notion, Apple, Muji",
   "prompt": "Design this interface in the Minimalism visual style.\n\nWhat it is: Lots of white space, one or two colors and only the elements the task needs. Hierarchy comes from size and spacing instead of decoration.\nGood for: Content-first products, writing and reading tools.\nWatch out: Feature-dense apps that need visible options.\nSeen in: Google Search, Notion, Apple, Muji\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-min\">\n    <small>Notes</small>\n    <h4 role=\"none\">Write less.<br>Mean more.</h4>\n    <p>A blank page, a blinking cursor and nothing else in your way.</p>\n    <a href=\"#minimal\">Start writing →</a>\n  </div>\n",
    "css": ":root { --body: \"Figtree\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Figtree */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-min, .s-min *, .s-min *::before, .s-min *::after { box-sizing: border-box; }\n.s-min { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-min button { font: inherit; cursor: pointer; }\n.s-min { background: #fff; color: #111; padding: 36px 34px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }\n.s-min small { font: 500 11px var(--body); letter-spacing: .14em; text-transform: uppercase; color: #888; }\n.s-min h4 { font: 500 30px/1.1 var(--body); margin: 0; letter-spacing: -.02em; }\n.s-min p { margin: 0; color: #777; font-size: 13px; max-width: 30ch; }\n.s-min a { color: #111; font-size: 13px; }",
    "js": ""
   }
  },
  {
   "id": "material",
   "title": "Material Design",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "Google's system: layered surfaces with elevation shadows, a top app bar, chips, and a floating action button for the main action.",
   "goodFor": "Android apps, admin tools, teams wanting a ready system",
   "watchOut": "Brands that need a very distinctive look",
   "seenIn": "Android, Gmail, Google Drive, Google Calendar",
   "prompt": "Design this interface in the Material Design visual style.\n\nWhat it is: Google's system: layered surfaces with elevation shadows, a top app bar, chips, and a floating action button for the main action.\nGood for: Android apps, admin tools, teams wanting a ready system.\nWatch out: Brands that need a very distinctive look.\nSeen in: Android, Gmail, Google Drive, Google Calendar\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-mat\">\n    <div class=\"bar\">☰ <span>Inbox</span></div>\n    <div class=\"chips\"><span class=\"on\">Primary</span><span>Updates</span><span>Promotions</span></div>\n    <div class=\"item\"><span class=\"av\">AK</span><div><b>Ananya Kapoor</b><br><span style=\"color:#666\">Design review moved to 4 PM</span></div></div>\n    <div class=\"item\"><span class=\"av\" style=\"background:#386a20\">RS</span><div><b>Rohan Shah</b><br><span style=\"color:#666\">Here are the final icons</span></div></div>\n    <button class=\"fab\" aria-label=\"Compose\">+</button>\n  </div>\n",
    "css": "/* base styles the site gives every demo (scoped to this demo) */\n.s-mat, .s-mat *, .s-mat *::before, .s-mat *::after { box-sizing: border-box; }\n.s-mat { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-mat button { font: inherit; cursor: pointer; }\n.s-mat { background: #fdf7ff; color: #1d1b20; font-family: Roboto,system-ui,sans-serif; }\n.s-mat .bar { background: #6750a4; color: #fff; height: 52px; display: flex; align-items: center; gap: 14px; padding: 0 16px; font-size: 17px; box-shadow: 0 2px 4px rgba(0,0,0,.2); }\n.s-mat .chips { display: flex; gap: 6px; padding: 12px 14px 4px; }\n.s-mat .chips span { border: 1px solid #79747e; border-radius: 8px; padding: 4px 10px; font-size: 11px; }\n.s-mat .chips span.on { background: #e8def8; border-color: #e8def8; }\n.s-mat .item { margin: 8px 14px; background: #fff; border-radius: 12px; padding: 10px 12px; display: flex; gap: 10px; align-items: center; box-shadow: 0 1px 3px rgba(0,0,0,.18),0 1px 2px rgba(0,0,0,.1); font-size: 12px; }\n.s-mat .av { width: 32px; height: 32px; border-radius: 50%; background: #7d5260; color: #fff; display: grid; place-items: center; font-weight: 600; flex: none; }\n.s-mat .fab { position: absolute; right: 16px; bottom: 16px; width: 54px; height: 54px; border-radius: 16px; background: #eaddff; color: #21005d; border: 0; font-size: 26px; box-shadow: 0 3px 6px rgba(0,0,0,.25); }",
    "js": ""
   }
  },
  {
   "id": "flat",
   "title": "Flat design",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "Solid colors, no shadows, no gradients, no textures. Simple icons and crisp shapes.",
   "goodFor": "Icons, dashboards, simple informative UIs",
   "watchOut": "Hiding what is clickable; add hover and focus cues",
   "seenIn": "Windows 8 Metro, early iOS 7, Microsoft Office icons",
   "prompt": "Design this interface in the Flat design visual style.\n\nWhat it is: Solid colors, no shadows, no gradients, no textures. Simple icons and crisp shapes.\nGood for: Icons, dashboards, simple informative UIs.\nWatch out: Hiding what is clickable; add hover and focus cues.\nSeen in: Windows 8 Metro, early iOS 7, Microsoft Office icons\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-flat\">\n    <div class=\"w2 h2\" style=\"background:#1e88e5\"><i>✉</i><span>Mail · 3 new</span></div>\n    <div style=\"background:#fb8c00\"><i>☀</i><span>31°</span></div>\n    <div style=\"background:#43a047\"><i>♫</i><span>Music</span></div>\n    <div class=\"w2\" style=\"background:#8e24aa\"><i>◷</i><span>Meeting at 10:30</span></div>\n    <div style=\"background:#e53935\"><i>⌂</i><span>Home</span></div>\n    <div style=\"background:#00897b\"><i>✎</i><span>Notes</span></div>\n    <div class=\"w2\" style=\"background:#3949ab\"><i>☷</i><span>Calendar</span></div>\n  </div>\n",
    "css": "/* base styles the site gives every demo (scoped to this demo) */\n.s-flat, .s-flat *, .s-flat *::before, .s-flat *::after { box-sizing: border-box; }\n.s-flat { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-flat button { font: inherit; cursor: pointer; }\n.s-flat { background: #263238; padding: 12px; display: grid; grid-template-columns: repeat(4,1fr); grid-template-rows: repeat(3,1fr); gap: 6px; color: #fff; font-family: \"Segoe UI\",system-ui,sans-serif; }\n.s-flat div { padding: 8px; display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; }\n.s-flat i { font-style: normal; font-size: 22px; line-height: 1; }\n.s-flat .w2 { grid-column: span 2; }\n.s-flat .h2 { grid-row: span 2; }",
    "js": ""
   }
  },
  {
   "id": "skeuo",
   "title": "Skeuomorphism",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "Digital objects copy real materials: leather, wood, paper, brushed metal. The switch flips like a physical one.",
   "goodFor": "Music tools, games, kids apps, familiar metaphors",
   "watchOut": "General apps; it dates quickly and adds noise",
   "seenIn": "iOS 1 to 6, old Notes and Calendar apps, audio plugins",
   "prompt": "Design this interface in the Skeuomorphism visual style.\n\nWhat it is: Digital objects copy real materials: leather, wood, paper, brushed metal. The switch flips like a physical one.\nGood for: Music tools, games, kids apps, familiar metaphors.\nWatch out: General apps; it dates quickly and adds noise.\nSeen in: iOS 1 to 6, old Notes and Calendar apps, audio plugins\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-skeu\">\n    <div class=\"pad\"><div class=\"lea\">Notes</div><div class=\"paper\">Groceries<br>Milk, eggs<br>Call Priya at 6</div></div>\n    <label>Wi‑Fi<button class=\"sw\" aria-pressed=\"true\" aria-label=\"Wi-Fi\" data-toggle></button></label>\n  </div>\n",
    "css": "/* fonts used (all on Google Fonts): Caveat */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-skeu, .s-skeu *, .s-skeu *::before, .s-skeu *::after { box-sizing: border-box; }\n.s-skeu { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-skeu button { font: inherit; cursor: pointer; }\n.s-skeu { background: repeating-linear-gradient(90deg,#8a5a34 0 14px,#7d5030 14px 28px,#94633b 28px 40px); display: flex; align-items: center; justify-content: center; gap: 22px; padding: 14px; }\n.s-skeu .pad { width: 190px; border-radius: 8px; overflow: hidden; box-shadow: 0 12px 24px rgba(0,0,0,.45); }\n.s-skeu .lea { background: linear-gradient(#6b3a1f,#4e2913); height: 38px; position: relative; color: #f0d9b5; font: 600 13px Georgia,serif; display: grid; place-items: center; text-shadow: 0 -1px 0 #2a1408; }\n.s-skeu .lea::after { content: \"\"; position: absolute; inset: 5px; border: 1.5px dashed #c99a62; border-radius: 4px; }\n.s-skeu .paper { background: #fff7c2; background-image: repeating-linear-gradient(#fff7c2 0 21px,#b9cde4 21px 22px); padding: 6px 12px 10px 26px; font: 500 18px/22px \"Caveat\",cursive; color: #2c3e67; border-left: 2px solid #e8a6a6; min-height: 150px; }\n.s-skeu .sw { width: 72px; height: 34px; border-radius: 17px; background: linear-gradient(#5a5f66,#9aa0a8); box-shadow: inset 0 2px 5px rgba(0,0,0,.6),0 1px 0 rgba(255,255,255,.3); position: relative; border: 0; padding: 0; }\n.s-skeu .sw::after { content: \"\"; position: absolute; top: 2px; left: 2px; width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 30%,#fff,#c9ccd1 55%,#8e939b); box-shadow: 0 2px 4px rgba(0,0,0,.5); transition: left .2s; }\n.s-skeu .sw[aria-pressed=\"true\"] { background: linear-gradient(#2f7d32,#5cbf60); }\n.s-skeu .sw[aria-pressed=\"true\"]::after { left: 40px; }\n.s-skeu label { color: #f3e2c7; font: 600 11px Georgia,serif; display: grid; gap: 6px; justify-items: center; text-shadow: 0 1px 1px #000; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // generic toggles\n  $$('[data-toggle]').forEach(b=>b.addEventListener('click',()=>b.setAttribute('aria-pressed',b.getAttribute('aria-pressed')!=='true')));\n})();"
   }
  },
  {
   "id": "neobrutal",
   "title": "Neo-brutalism",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "Thick black borders, hard offset shadows with no blur, loud flat colors and chunky type.",
   "goodFor": "Indie SaaS, creator tools, playful brands",
   "watchOut": "Banking, healthcare, anything that must feel calm",
   "seenIn": "Gumroad, Figma community pages, many indie SaaS sites",
   "prompt": "Design this interface in the Neo-brutalism visual style.\n\nWhat it is: Thick black borders, hard offset shadows with no blur, loud flat colors and chunky type.\nGood for: Indie SaaS, creator tools, playful brands.\nWatch out: Banking, healthcare, anything that must feel calm.\nSeen in: Gumroad, Figma community pages, many indie SaaS sites\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-nb\">\n    <div class=\"card\">\n      <h4 role=\"none\">Sell your stuff online.</h4>\n      <div class=\"row\"><span class=\"tag\">No code</span><span class=\"tag\" style=\"background:#7cf5c8\">0% setup fee</span></div>\n    </div>\n    <div class=\"row\"><button>Start selling</button><button class=\"alt\">See pricing</button></div>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; --body: \"Figtree\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque, Figtree */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-nb, .s-nb *, .s-nb *::before, .s-nb *::after { box-sizing: border-box; }\n.s-nb { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-nb button { font: inherit; cursor: pointer; }\n.s-nb { background: #ffe066; color: #000; padding: 22px; display: flex; flex-direction: column; justify-content: center; gap: 14px; font-family: var(--body); }\n.s-nb .card { background: #fff; border: 3px solid #000; box-shadow: 7px 7px 0 #000; border-radius: 10px; padding: 14px 16px; }\n.s-nb h4 { font: 800 24px/1.05 var(--display); margin: 0 0 6px; }\n.s-nb .row { display: flex; gap: 10px; flex-wrap: wrap; }\n.s-nb button { border: 3px solid #000; background: #ff6b9d; font-weight: 800; padding: 8px 16px; border-radius: 8px; box-shadow: 4px 4px 0 #000; transition: transform .1s,box-shadow .1s; }\n.s-nb button:active { transform: translate(4px,4px); box-shadow: 0 0 0 #000; }\n.s-nb button.alt { background: #7cf5c8; }\n.s-nb .tag { border: 2px solid #000; padding: 2px 8px; border-radius: 999px; font: 700 11px var(--body); background: #c3b5ff; }",
    "js": ""
   }
  },
  {
   "id": "brutal",
   "title": "Brutalism",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "Raw, default-browser look: system serif fonts, blue underlined links, plain tables, no polish on purpose.",
   "goodFor": "Art, portfolios, statements, raw data sites",
   "watchOut": "Mainstream shopping or non-technical users",
   "seenIn": "Craigslist, Hacker News, Berkshire Hathaway, art portfolios",
   "prompt": "Design this interface in the Brutalism visual style.\n\nWhat it is: Raw, default-browser look: system serif fonts, blue underlined links, plain tables, no polish on purpose.\nGood for: Art, portfolios, statements, raw data sites.\nWatch out: Mainstream shopping or non-technical users.\nSeen in: Craigslist, Hacker News, Berkshire Hathaway, art portfolios\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-bru\">\n    <h4 role=\"none\">RAW DATA ARCHIVE</h4>\n    <a href=\"#brutal\">index</a> | <a href=\"#brutal\">about</a> | <a href=\"#brutal\">contact</a>\n    <hr>\n    <table><tbody><tr><th>file</th><th>size</th><th>date</th></tr><tr><td><a href=\"#brutal\">report_q3.txt</a></td><td>12 KB</td><td>2026-10-02</td></tr><tr><td><a href=\"#brutal\">notes.txt</a></td><td>3 KB</td><td>2026-09-14</td></tr><tr><td><a href=\"#brutal\">photos/</a></td><td>-</td><td>2026-08-30</td></tr></tbody></table>\n    <hr>\n    <code>last updated 2026-11-07</code>\n  </div>\n",
    "css": "/* base styles the site gives every demo (scoped to this demo) */\n.s-bru, .s-bru *, .s-bru *::before, .s-bru *::after { box-sizing: border-box; }\n.s-bru { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-bru button { font: inherit; cursor: pointer; }\n.s-bru { background: #fff; color: #000; font-family: \"Times New Roman\",Times,serif; padding: 14px 16px; font-size: 14px; overflow: auto; }\n.s-bru h4 { font-size: 26px; margin: 0 0 4px; font-weight: 700; }\n.s-bru a { color: #00e; }\n.s-bru hr { border: 0; border-top: 1px solid #000; margin: 8px 0; }\n.s-bru table { border-collapse: collapse; font-size: 12px; width: 100%; }\n.s-bru td,.s-bru th { border: 1px solid #000; padding: 2px 5px; text-align: left; }\n.s-bru code { font-family: \"Courier New\",monospace; }",
    "js": ""
   }
  },
  {
   "id": "darkui",
   "title": "Dark UI",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "Light text on near-black surfaces. Depth comes from slightly lighter layers instead of shadows, and color is saved for accents and artwork.",
   "goodFor": "Media, coding tools, long sessions at night",
   "watchOut": "Pure black with pure white text; it causes glare",
   "seenIn": "Spotify, Discord, Netflix, VS Code",
   "prompt": "Design this interface in the Dark UI visual style.\n\nWhat it is: Light text on near-black surfaces. Depth comes from slightly lighter layers instead of shadows, and color is saved for accents and artwork.\nGood for: Media, coding tools, long sessions at night.\nWatch out: Pure black with pure white text; it causes glare.\nSeen in: Spotify, Discord, Netflix, VS Code\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-dark\">\n    <div class=\"art\"></div>\n    <div>\n      <div class=\"t\">Midnight Drive</div><div class=\"a\">Lofi Collective</div>\n      <div class=\"prog\"><i></i></div><div class=\"time\"><span>1:24</span><span>3:18</span></div>\n      <div class=\"ctl\"><button aria-label=\"Previous\">⏮</button><button class=\"play\" aria-label=\"Pause\">❚❚</button><button aria-label=\"Next\">⏭</button></div>\n    </div>\n    <div class=\"list\"><span>Up next: Neon Rain <b>2:56</b></span><span>Slow Tide <b>4:02</b></span></div>\n  </div>\n",
    "css": ":root { --body: \"Figtree\",system-ui,sans-serif; --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): Figtree, JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-dark, .s-dark *, .s-dark *::before, .s-dark *::after { box-sizing: border-box; }\n.s-dark { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-dark button { font: inherit; cursor: pointer; }\n.s-dark { background: #0c0e12; color: #e8eaf0; padding: 18px; display: grid; grid-template-columns: 110px 1fr; gap: 16px; align-items: center; }\n.s-dark .art { width: 110px; aspect-ratio: 1; max-width: 100%; border-radius: 12px; background: conic-gradient(from 210deg,#ff5f6d,#ffc371,#47cacc,#7f5af0,#ff5f6d); box-shadow: 0 10px 30px rgba(127,90,240,.35); }\n.s-dark .t { font: 700 17px var(--body); }\n.s-dark .a { color: #8b93a5; font-size: 12px; }\n.s-dark .prog { height: 4px; background: #2a2e38; border-radius: 2px; margin: 14px 0 4px; }\n.s-dark .prog i { display: block; height: 100%; width: 42%; background: #e8eaf0; border-radius: 2px; }\n.s-dark .time { display: flex; justify-content: space-between; font: 11px var(--mono); color: #8b93a5; }\n.s-dark .ctl { display: flex; gap: 18px; align-items: center; margin-top: 10px; }\n.s-dark .ctl button { background: none; border: 0; color: #e8eaf0; font-size: 16px; }\n.s-dark .ctl .play { width: 42px; height: 42px; border-radius: 50%; background: #e8eaf0; color: #0c0e12; }\n.s-dark .list { grid-column: 1/-1; display: grid; gap: 6px; font-size: 12px; color: #8b93a5; border-top: 1px solid #20242d; padding-top: 10px; }\n.s-dark .list span { display: flex; justify-content: space-between; }",
    "js": ""
   }
  },
  {
   "id": "aurora",
   "title": "Aurora / mesh gradient",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "Large, heavily blurred color blobs that slowly drift behind the content, like northern lights.",
   "goodFor": "Landing page heroes and launch moments",
   "watchOut": "Behind dense text; also respect reduced motion",
   "seenIn": "Stripe, Vercel, Linear, Arc browser",
   "prompt": "Design this interface in the Aurora / mesh gradient visual style.\n\nWhat it is: Large, heavily blurred color blobs that slowly drift behind the content, like northern lights.\nGood for: Landing page heroes and launch moments.\nWatch out: Behind dense text; also respect reduced motion.\nSeen in: Stripe, Vercel, Linear, Arc browser\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-aur\">\n    <span class=\"blob b1\"></span><span class=\"blob b2\"></span><span class=\"blob b3\"></span>\n    <div class=\"in\"><h4 role=\"none\">Ship faster.</h4><p>Deploy from git in seconds, on every push.</p><button>Get started</button></div>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-aur, .s-aur *, .s-aur *::before, .s-aur *::after { box-sizing: border-box; }\n.s-aur { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-aur button { font: inherit; cursor: pointer; }\n.s-aur { background: #070b1a; color: #fff; display: grid; place-items: center; text-align: center; }\n.s-aur .blob { position: absolute; width: 220px; height: 220px; border-radius: 50%; filter: blur(50px); opacity: .75; animation: drift 12s ease-in-out infinite alternate; }\n.s-aur .b1 { background: #00d4ff; left: -40px; top: -60px; }\n.s-aur .b2 { background: #a855f7; right: -40px; top: 20px; animation-delay: -4s; }\n.s-aur .b3 { background: #22c55e; left: 30%; bottom: -120px; animation-delay: -8s; }\n.s-aur .in { position: relative; display: grid; gap: 12px; justify-items: center; padding: 0 20px; }\n.s-aur h4 { font: 800 32px/1 var(--display); margin: 0; letter-spacing: -.02em; }\n.s-aur p { margin: 0; font-size: 13px; opacity: .8; }\n.s-aur button { border: 0; background: #fff; color: #070b1a; padding: 9px 18px; border-radius: 999px; font-weight: 700; }\n@keyframes drift {\n  to{transform:translate(40px,30px) scale(1.15)}\n}",
    "js": ""
   }
  },
  {
   "id": "clay",
   "title": "Claymorphism",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "Puffy, inflated shapes with big rounded corners, soft outer shadows and inner highlights so they look like soft clay. Friendly and playful.",
   "goodFor": "Kids, education, onboarding, friendly consumer apps",
   "watchOut": "Serious B2B tools and data-heavy screens",
   "seenIn": "kids' learning apps, onboarding screens, 3D icon packs",
   "prompt": "Design this interface in the Claymorphism visual style.\n\nWhat it is: Puffy, inflated shapes with big rounded corners, soft outer shadows and inner highlights so they look like soft clay. Friendly and playful.\nGood for: Kids, education, onboarding, friendly consumer apps.\nWatch out: Serious B2B tools and data-heavy screens.\nSeen in: kids' learning apps, onboarding screens, 3D icon packs\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-clay\">\n    <div class=\"c\"><span class=\"ic\" style=\"background:#ffb4c6\"></span>Lessons<small>12 left</small></div>\n    <div class=\"c\"><span class=\"ic\" style=\"background:#9fe0c8\"></span>Streak<small>7 days</small></div>\n    <div class=\"c\"><span class=\"ic\" style=\"background:#ffd98a\"></span>Badges<small>5 earned</small></div>\n  </div>\n",
    "css": ":root { --body: \"Figtree\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Figtree */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-clay, .s-clay *, .s-clay *::before, .s-clay *::after { box-sizing: border-box; }\n.s-clay { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-clay button { font: inherit; cursor: pointer; }\n.s-clay { background: #efe4ff; display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap; align-content: center; padding: 12px; font-family: var(--body); color: #3b2a5c; container-type: inline-size; }\n.s-clay .c { width: 118px; padding: 12px 12px; border-radius: 30px; background: #fff; text-align: center; box-shadow: 12px 14px 26px rgba(138,99,210,.35),inset -6px -6px 14px rgba(160,120,220,.25),inset 6px 6px 12px #fff; display: grid; gap: 6px; justify-items: center; font-weight: 700; font-size: 13px; }\n.s-clay .ic { width: 44px; height: 44px; border-radius: 18px; box-shadow: inset -5px -5px 10px rgba(0,0,0,.15),inset 5px 5px 10px rgba(255,255,255,.6); }\n.s-clay small { font-weight: 500; font-size: 11px; color: #7a6a99; }\n@container (max-width:300px) {\n  .s-clay { gap: 10px; padding: 8px; }\n  .s-clay .c { width: 100px; padding: 9px 8px; gap: 4px; font-size: 12px; }\n  .s-clay .ic { width: 34px; height: 34px; border-radius: 14px; }\n}",
    "js": ""
   }
  },
  {
   "id": "retro",
   "title": "Retro / Y2K / pixel",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "Nostalgic computer looks: beveled grey windows, pixel fonts, blue title bars, chrome and early-2000s colors.",
   "goodFor": "Games, music, nostalgia campaigns",
   "watchOut": "Core workflows where speed and clarity matter",
   "seenIn": "Poolsuite FM, retro game sites, Gen Z fashion brands",
   "prompt": "Design this interface in the Retro / Y2K / pixel visual style.\n\nWhat it is: Nostalgic computer looks: beveled grey windows, pixel fonts, blue title bars, chrome and early-2000s colors.\nGood for: Games, music, nostalgia campaigns.\nWatch out: Core workflows where speed and clarity matter.\nSeen in: Poolsuite FM, retro game sites, Gen Z fashion brands\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-retro\">\n    <div class=\"win\">\n      <div class=\"tb\"><span>Copying files…</span><span><b>_</b> <b>×</b></span></div>\n      <div class=\"bd\">\n        <span>From 'C:\\MUSIC' to 'A:\\'</span>\n        <div class=\"pb\"><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i></div>\n        <span>3 minutes remaining</span>\n        <div class=\"btns\"><button>Cancel</button></div>\n      </div>\n    </div>\n  </div>\n",
    "css": "/* fonts used (all on Google Fonts): VT323 */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-retro, .s-retro *, .s-retro *::before, .s-retro *::after { box-sizing: border-box; }\n.s-retro { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-retro button { font: inherit; cursor: pointer; }\n.s-retro { background: #008080; padding: 16px; display: grid; place-items: center; font-family: \"VT323\",monospace; font-size: 18px; color: #000; }\n.s-retro .win { width: min(100%,300px); background: #c0c0c0; border: 2px solid; border-color: #fff #404040 #404040 #fff; box-shadow: 1px 1px 0 #000; }\n.s-retro .tb { background: linear-gradient(90deg,#000080,#1084d0); color: #fff; padding: 2px 4px; display: flex; justify-content: space-between; align-items: center; }\n.s-retro .tb b { display: inline-grid; place-items: center; width: 18px; height: 16px; background: #c0c0c0; color: #000; border: 2px solid; border-color: #fff #404040 #404040 #fff; font-size: 14px; line-height: 1; }\n.s-retro .bd { padding: 10px; display: grid; gap: 8px; }\n.s-retro .pb { height: 18px; border: 2px solid; border-color: #404040 #fff #fff #404040; padding: 2px; display: flex; gap: 2px; }\n.s-retro .pb i { width: 10px; background: #000080; }\n.s-retro .btns { display: flex; justify-content: flex-end; gap: 8px; }\n.s-retro .btns button { font: inherit; background: #c0c0c0; border: 2px solid; border-color: #fff #404040 #404040 #fff; padding: 0 14px; }\n.s-retro .btns button:active { border-color: #404040 #fff #fff #404040; }",
    "js": ""
   }
  },
  {
   "id": "editorial",
   "title": "Editorial / typography-led",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "Big expressive type carries the design, laid out like a magazine with kickers, bylines, columns and drop caps.",
   "goodFor": "Blogs, magazines, case studies, brand stories",
   "watchOut": "Dense app screens and forms",
   "seenIn": "The New York Times features, Medium, The Verge, Awwwards portfolios",
   "prompt": "Design this interface in the Editorial / typography-led visual style.\n\nWhat it is: Big expressive type carries the design, laid out like a magazine with kickers, bylines, columns and drop caps.\nGood for: Blogs, magazines, case studies, brand stories.\nWatch out: Dense app screens and forms.\nSeen in: The New York Times features, Medium, The Verge, Awwwards portfolios\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-edit\">\n    <span class=\"kick\">THE WEEKEND ESSAY</span>\n    <h4 role=\"none\">The slow return of the printed page</h4>\n    <div class=\"by\">By Meera Iyer · 8 min read</div>\n    <div class=\"cols\">Independent bookshops reported their best year in a decade, and readers say the reason is simple. A book asks for nothing back: no alerts, no feeds, no streaks to protect.</div>\n  </div>\n",
    "css": ":root { --body: \"Figtree\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Figtree, DM Serif Display */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-edit, .s-edit *, .s-edit *::before, .s-edit *::after { box-sizing: border-box; }\n.s-edit { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-edit button { font: inherit; cursor: pointer; }\n.s-edit { background: #fbfbf9; color: #111; padding: 20px 22px; display: grid; gap: 10px; align-content: start; }\n.s-edit .kick { font: 700 10px var(--body); letter-spacing: .2em; color: #c0262d; }\n.s-edit h4 { font: 400 36px/.98 \"DM Serif Display\",Georgia,serif; margin: 0; letter-spacing: -.01em; }\n.s-edit .by { font: 11px var(--body); color: #666; border-top: 1px solid #111; border-bottom: 1px solid #ddd; padding: 5px 0; }\n.s-edit .cols { columns: 2; column-gap: 16px; font: 12px/1.5 Georgia,serif; color: #333; }\n.s-edit .cols::first-letter { float: left; font: 400 40px/.8 \"DM Serif Display\",serif; margin: 4px 6px 0 0; color: #111; }",
    "js": ""
   }
  },
  {
   "id": "illus",
   "title": "Illustration-led",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "Custom drawings give the brand its personality and explain the product before the copy does.",
   "goodFor": "Onboarding, empty states, explaining abstract products",
   "watchOut": "Every screen; it slows production and loading",
   "seenIn": "Mailchimp, Slack (older site), Notion, Headspace",
   "prompt": "Design this interface in the Illustration-led visual style.\n\nWhat it is: Custom drawings give the brand its personality and explain the product before the copy does.\nGood for: Onboarding, empty states, explaining abstract products.\nWatch out: Every screen; it slows production and loading.\nSeen in: Mailchimp, Slack (older site), Notion, Headspace\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-illus\">\n    <div><h4 role=\"none\">Send emails people actually open</h4><p>Templates, scheduling and reports in one place.</p><button>Try it free</button></div>\n    <svg viewBox=\"0 0 200 160\" aria-hidden=\"true\">\n      <circle cx=\"160\" cy=\"34\" r=\"18\" fill=\"#ffc94d\"></circle>\n      <path d=\"M0 130 Q50 95 100 120 T200 110 V160 H0Z\" fill=\"#8fd3a8\"></path>\n      <path d=\"M0 145 Q60 120 120 140 T200 135 V160 H0Z\" fill=\"#5fb883\"></path>\n      <rect x=\"120\" y=\"92\" width=\"8\" height=\"40\" fill=\"#8a5a3c\"></rect>\n      <rect x=\"106\" y=\"70\" width=\"36\" height=\"26\" rx=\"12\" fill=\"#ff7a45\"></rect>\n      <rect x=\"114\" y=\"78\" width=\"14\" height=\"4\" rx=\"2\" fill=\"#fff\"></rect>\n      <circle cx=\"62\" cy=\"62\" r=\"13\" fill=\"#f2c4a2\"></circle>\n      <path d=\"M48 58 Q62 40 76 58 Q70 50 62 50 Q54 50 48 58Z\" fill=\"#2c2340\"></path>\n      <rect x=\"47\" y=\"76\" width=\"30\" height=\"40\" rx=\"12\" fill=\"#5b7cfa\"></rect>\n      <rect x=\"40\" y=\"114\" width=\"10\" height=\"20\" rx=\"5\" fill=\"#2c2340\"></rect>\n      <rect x=\"74\" y=\"114\" width=\"10\" height=\"20\" rx=\"5\" fill=\"#2c2340\"></rect>\n      <rect x=\"76\" y=\"84\" width=\"34\" height=\"6\" rx=\"3\" fill=\"#5b7cfa\" transform=\"rotate(-20 76 84)\"></rect>\n      <rect x=\"96\" y=\"58\" width=\"22\" height=\"15\" rx=\"2\" fill=\"#fff\" stroke=\"#16324f\" stroke-width=\"1.5\" transform=\"rotate(-12 107 65)\"></rect>\n      <path d=\"M96 58 L107 67 L118 58\" fill=\"none\" stroke=\"#16324f\" stroke-width=\"1.5\" transform=\"rotate(-12 107 65)\"></path>\n    </svg>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-illus, .s-illus *, .s-illus *::before, .s-illus *::after { box-sizing: border-box; }\n.s-illus { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-illus button { font: inherit; cursor: pointer; }\n.s-illus { background: #e6f2ff; color: #16324f; display: grid; grid-template-columns: 1fr 1fr; align-items: center; padding: 0 18px; gap: 10px; }\n.s-illus h4 { font: 800 22px/1.1 var(--display); margin: 0 0 8px; }\n.s-illus p { margin: 0 0 12px; font-size: 12px; color: #3d5a7a; }\n.s-illus button { border: 0; background: #ff7a45; color: #fff; font-weight: 700; padding: 8px 14px; border-radius: 8px; }\n.s-illus svg { width: 100%; height: auto; }",
    "js": ""
   }
  },
  {
   "id": "swiss",
   "title": "Swiss / International style",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "A strict grid, sans-serif type, flush-left text, and bold geometric shapes in red, black and white.",
   "goodFor": "Posters, museums, agencies, information-heavy sites",
   "watchOut": "Playful consumer brands that need warmth",
   "seenIn": "museum posters, Swiss railway signage, many design agency sites",
   "prompt": "Design this interface in the Swiss / International style visual style.\n\nWhat it is: A strict grid, sans-serif type, flush-left text, and bold geometric shapes in red, black and white.\nGood for: Posters, museums, agencies, information-heavy sites.\nWatch out: Playful consumer brands that need warmth.\nSeen in: museum posters, Swiss railway signage, many design agency sites\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-swiss\">\n    <span class=\"no\">Nº 47 — Zürich</span>\n    <div class=\"red\"></div>\n    <h4 role=\"none\">Form<br>folgt<br>Funktion.</h4>\n    <span class=\"circ\"></span>\n    <div class=\"small\">Kunstgewerbemuseum. Ausstellung vom 4. bis 28. November. Täglich geöffnet 10 to 18 Uhr. Eintritt frei.</div>\n  </div>\n",
    "css": "/* base styles the site gives every demo (scoped to this demo) */\n.s-swiss, .s-swiss *, .s-swiss *::before, .s-swiss *::after { box-sizing: border-box; }\n.s-swiss { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-swiss button { font: inherit; cursor: pointer; }\n.s-swiss { background: #fff; color: #000; font-family: \"Helvetica Neue\",Helvetica,Arial,sans-serif; display: grid; grid-template-columns: repeat(6,1fr); grid-template-rows: repeat(6,1fr); gap: 0; padding: 16px; }\n.s-swiss .red { grid-column: 4/7; grid-row: 1/4; background: #e30613; }\n.s-swiss .circ { grid-column: 5/6; grid-row: 4/6; border-radius: 50%; background: #000; aspect-ratio: 1; max-width: 100%; align-self: center; }\n.s-swiss h4 { grid-column: 1/5; grid-row: 2/5; font: 700 42px/.9 \"Helvetica Neue\",Helvetica,Arial,sans-serif; margin: 0; letter-spacing: -.03em; z-index: 1; align-self: center; }\n.s-swiss .small { grid-column: 1/4; grid-row: 5/7; font-size: 10px; line-height: 1.35; align-self: end; columns: 2; column-gap: 10px; }\n.s-swiss .no { grid-column: 1/3; grid-row: 1/2; font-size: 10px; font-weight: 700; }",
    "js": ""
   }
  },
  {
   "id": "memphis",
   "title": "Memphis",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "1980s-inspired chaos: squiggles, triangles, dot patterns and clashing bright colors. Fun and attention-grabbing.",
   "goodFor": "Events, festivals, youth campaigns",
   "watchOut": "Long-term product UI; it tires the eye",
   "seenIn": "event posters, music festival sites, youth brands",
   "prompt": "Design this interface in the Memphis visual style.\n\nWhat it is: 1980s-inspired chaos: squiggles, triangles, dot patterns and clashing bright colors. Fun and attention-grabbing.\nGood for: Events, festivals, youth campaigns.\nWatch out: Long-term product UI; it tires the eye.\nSeen in: event posters, music festival sites, youth brands\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-memphis\">\n    <svg viewBox=\"0 0 400 290\" preserveAspectRatio=\"xMidYMid slice\" aria-hidden=\"true\">\n      <path d=\"M20 60 q15 -20 30 0 t30 0 t30 0 t30 0\" fill=\"none\" stroke=\"#ff5c8a\" stroke-width=\"6\" stroke-linecap=\"round\"></path>\n      <polygon points=\"320,30 360,95 280,95\" fill=\"#3ec1d3\"></polygon>\n      <circle cx=\"70\" cy=\"220\" r=\"34\" fill=\"#ffd23f\"></circle>\n      <rect x=\"300\" y=\"190\" width=\"60\" height=\"60\" fill=\"none\" stroke=\"#111\" stroke-width=\"5\" transform=\"rotate(20 330 220)\"></rect>\n      <path d=\"M150 260 l20 -20 l20 20 l20 -20 l20 20\" fill=\"none\" stroke=\"#6a4cff\" stroke-width=\"6\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>\n      <rect x=\"230\" y=\"20\" width=\"10\" height=\"60\" fill=\"#111\" transform=\"rotate(35 235 50)\"></rect>\n    </svg>\n    <div class=\"box\"><h4 role=\"none\">Party Mode</h4><p>Fri 14 Nov · Doors 8 PM</p></div>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; --body: \"Figtree\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque, Figtree */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-memphis, .s-memphis *, .s-memphis *::before, .s-memphis *::after { box-sizing: border-box; }\n.s-memphis { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-memphis button { font: inherit; cursor: pointer; }\n.s-memphis { background: #fff4e6; display: grid; place-items: center; color: #111; background-image: radial-gradient(#111 1.2px,transparent 1.4px); background-size: 16px 16px; }\n.s-memphis svg { position: absolute; inset: 0; width: 100%; height: 100%; }\n.s-memphis .box { position: relative; background: #fff; border: 3px solid #111; padding: 14px 22px; text-align: center; transform: rotate(-3deg); box-shadow: 8px 8px 0 #ff5c8a; }\n.s-memphis h4 { font: 800 28px/1 var(--display); margin: 0; }\n.s-memphis p { margin: 4px 0 0; font: 600 12px var(--body); }",
    "js": ""
   }
  },
  {
   "id": "neon",
   "title": "Cyberpunk / synthwave neon",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "Glowing cyan and magenta text on black, neon outlines and a retro perspective grid.",
   "goodFor": "Games, music, night-life, launches",
   "watchOut": "Long text and readability-critical screens",
   "seenIn": "game launchers, crypto and Web3 sites, music visualizers",
   "prompt": "Design this interface in the Cyberpunk / synthwave neon visual style.\n\nWhat it is: Glowing cyan and magenta text on black, neon outlines and a retro perspective grid.\nGood for: Games, music, night-life, launches.\nWatch out: Long text and readability-critical screens.\nSeen in: game launchers, crypto and Web3 sites, music visualizers\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-neon\">\n    <span class=\"sun\"></span><span class=\"floor\"></span>\n    <div class=\"in\"><h4 role=\"none\">NIGHT CITY</h4><button>ENTER</button></div>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque, JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-neon, .s-neon *, .s-neon *::before, .s-neon *::after { box-sizing: border-box; }\n.s-neon { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-neon button { font: inherit; cursor: pointer; }\n.s-neon { background: #08000f; color: #fff; display: grid; place-items: center; text-align: center; font-family: var(--display); }\n.s-neon .floor { position: absolute; left: -50%; right: -50%; bottom: -40px; height: 150px; background-image: linear-gradient(#ff2bd6 1px,transparent 1px),linear-gradient(90deg,#ff2bd6 1px,transparent 1px); background-size: 30px 30px; transform: perspective(200px) rotateX(60deg); opacity: .55; }\n.s-neon .sun { position: absolute; width: 140px; height: 140px; border-radius: 50%; top: 46px; background: linear-gradient(#ffe259,#ff2bd6); opacity: .85; -webkit-mask: repeating-linear-gradient(#000 0 10px,transparent 10px 14px); mask: repeating-linear-gradient(#000 0 10px,transparent 10px 14px); }\n.s-neon .in { position: relative; display: grid; gap: 10px; justify-items: center; margin-top: -30px; }\n.s-neon h4 { margin: 0; font-size: 34px; font-weight: 800; letter-spacing: .08em; color: #e8fdff; text-shadow: 0 0 6px #00f0ff,0 0 18px #00f0ff,0 0 36px #00a2ff; }\n.s-neon button { background: transparent; color: #ff7ae9; border: 2px solid #ff2bd6; padding: 7px 18px; border-radius: 4px; font: 700 12px var(--mono); letter-spacing: .15em; box-shadow: 0 0 12px #ff2bd6,inset 0 0 10px #ff2bd6; text-shadow: 0 0 6px #ff2bd6; }",
    "js": ""
   }
  },
  {
   "id": "liquidglass",
   "title": "Liquid Glass",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "Apple's newer take on glass: clear, lens-like controls with bright edge highlights that bend the colors behind them. Controls float above the content instead of sitting in solid bars.",
   "goodFor": "Floating toolbars and controls over rich content",
   "watchOut": "Busy or low-contrast backgrounds; test legibility",
   "seenIn": "iOS 26, macOS Tahoe, Apple Music",
   "prompt": "Design this interface in the Liquid Glass visual style.\n\nWhat it is: Apple's newer take on glass: clear, lens-like controls with bright edge highlights that bend the colors behind them. Controls float above the content instead of sitting in solid bars.\nGood for: Floating toolbars and controls over rich content.\nWatch out: Busy or low-contrast backgrounds; test legibility.\nSeen in: iOS 26, macOS Tahoe, Apple Music\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-lg\">\n    <div class=\"hd\"><small>Lisbon · 6:42 PM</small><b>Golden hour at the Miradouro</b></div>\n    <div class=\"gl np\"><i class=\"art\"></i><span class=\"ti\"><b>Harbour Lights</b><small>The Tram Line</small></span><span>❚❚</span></div>\n    <div class=\"gl bar2\"><span class=\"on\">⌂<small>Home</small></span><span>♫<small>Library</small></span><span>◎<small>Radio</small></span></div>\n    <div class=\"gl srch\">⌕</div>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-lg, .s-lg *, .s-lg *::before, .s-lg *::after { box-sizing: border-box; }\n.s-lg { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-lg button { font: inherit; cursor: pointer; }\n.s-lg { background: repeating-linear-gradient(60deg,rgba(255,255,255,.1) 0 14px,transparent 14px 28px),linear-gradient(150deg,#ff9966,#ff5e62 35%,#8e2de2 70%,#00c6ff); color: #fff; }\n.s-lg .hd { position: absolute; left: 18px; top: 18px; display: grid; gap: 2px; text-shadow: 0 1px 6px rgba(0,0,0,.3); }\n.s-lg .hd b { font: 700 22px/1.1 var(--display); max-width: 14ch; }\n.s-lg small { font-size: 10px; opacity: .85; }\n.s-lg .gl { position: absolute; background: rgba(255,255,255,.1); backdrop-filter: blur(3px) saturate(190%); -webkit-backdrop-filter: blur(3px) saturate(190%); border-radius: 999px; box-shadow: inset 1.5px 1.5px 0 rgba(255,255,255,.8),inset -1px -1px 0 rgba(255,255,255,.3),inset 0 0 20px rgba(255,255,255,.2),0 10px 26px rgba(0,0,0,.22); }\n.s-lg .np { left: 16px; right: 16px; bottom: 78px; display: flex; align-items: center; gap: 10px; padding: 7px 14px 7px 7px; font-size: 12px; }\n.s-lg .np .art { width: 34px; height: 34px; border-radius: 50%; background: conic-gradient(#ffd166,#ef476f,#118ab2,#ffd166); flex: none; }\n.s-lg .np .ti { flex: 1; display: grid; }\n.s-lg .bar2 { left: 16px; bottom: 16px; display: flex; gap: 2px; padding: 5px; }\n.s-lg .bar2 span { padding: 5px 14px; border-radius: 999px; display: grid; justify-items: center; font-size: 16px; line-height: 1.1; }\n.s-lg .bar2 span.on { background: rgba(255,255,255,.28); }\n.s-lg .srch { right: 16px; bottom: 16px; width: 54px; height: 54px; display: grid; place-items: center; font-size: 20px; }\n@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {\n  .s-lg .gl { background: rgba(255,255,255,.28); }\n}",
    "js": ""
   }
  },
  {
   "id": "vaporwave",
   "title": "Vaporwave",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "Pink and teal sunsets, striped suns, checkerboard floors, wide-spaced letters and 90s computer nostalgia.",
   "goodFor": "Music, art projects, nostalgia campaigns",
   "watchOut": "Anything that must feel trustworthy",
   "seenIn": "album art, music visualizers, art and fashion campaigns",
   "prompt": "Design this interface in the Vaporwave visual style.\n\nWhat it is: Pink and teal sunsets, striped suns, checkerboard floors, wide-spaced letters and 90s computer nostalgia.\nGood for: Music, art projects, nostalgia campaigns.\nWatch out: Anything that must feel trustworthy.\nSeen in: album art, music visualizers, art and fashion campaigns\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-vap\"><span class=\"sky\"></span><span class=\"sun\"></span><span class=\"fl\"></span><h4 role=\"none\">ＶＡＰＯＲＷＡＶＥ</h4><span class=\"sub\">ｍａｌｌ ｓｏｆｔ ９５</span></div>\n",
    "css": "/* fonts used (all on Google Fonts): VT323 */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-vap, .s-vap *, .s-vap *::before, .s-vap *::after { box-sizing: border-box; }\n.s-vap { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-vap button { font: inherit; cursor: pointer; }\n.s-vap { background: #1a0933; color: #fff; }\n.s-vap .sky { position: absolute; inset: 0 0 40% 0; background: linear-gradient(#2b1055,#7597de 45%,#ff71ce); }\n.s-vap .sun { position: absolute; left: 50%; top: 12%; width: 120px; height: 120px; margin-left: -60px; border-radius: 50%; background: linear-gradient(#fffb96,#ff71ce 80%); -webkit-mask: linear-gradient(#000 55%,transparent 55% 60%,#000 60% 68%,transparent 68% 72%,#000 72% 80%,transparent 80% 84%,#000 84%); mask: linear-gradient(#000 55%,transparent 55% 60%,#000 60% 68%,transparent 68% 72%,#000 72% 80%,transparent 80% 84%,#000 84%); }\n.s-vap .fl { position: absolute; left: -40%; right: -40%; top: 60%; bottom: -20%; background: repeating-conic-gradient(#ff71ce 0 25%,#1a0933 0 50%) 0 0/36px 36px; transform: perspective(140px) rotateX(50deg); transform-origin: top; }\n.s-vap h4 { position: absolute; left: 0; right: 0; top: 47%; margin: 0; text-align: center; font: 400 30px/1 \"VT323\",monospace; letter-spacing: .04em; color: #fff; text-shadow: 3px 3px 0 #01cdfe,-2px -2px 0 #ff71ce; }\n.s-vap .sub { position: absolute; left: 0; right: 0; bottom: 16px; text-align: center; font: 400 18px \"VT323\",monospace; color: #fffb96; text-shadow: 0 0 6px #ff71ce; }",
    "js": ""
   }
  },
  {
   "id": "pixel",
   "title": "Pixel art",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "Chunky square pixels, limited palettes, pixel fonts and stepped button edges, like 8-bit and 16-bit games.",
   "goodFor": "Games, gamified apps, playful landing pages",
   "watchOut": "Body text; pixel fonts are hard to read at length",
   "seenIn": "indie games, retro game sites, gamified learning apps",
   "prompt": "Design this interface in the Pixel art visual style.\n\nWhat it is: Chunky square pixels, limited palettes, pixel fonts and stepped button edges, like 8-bit and 16-bit games.\nGood for: Games, gamified apps, playful landing pages.\nWatch out: Body text; pixel fonts are hard to read at length.\nSeen in: indie games, retro game sites, gamified learning apps\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-pix\">\n    <div class=\"hud\"><span><i class=\"ht\"></i><i class=\"ht\"></i><i class=\"ht e\"></i></span><span>◉ ×042</span></div>\n    <b class=\"ttl\">WORLD 1-2</b>\n    <div class=\"menu\"><button class=\"pb on\">▶ CONTINUE</button><button class=\"pb\">NEW GAME</button><button class=\"pb\">OPTIONS</button></div>\n  </div>\n",
    "css": "/* fonts used (all on Google Fonts): Press Start 2P */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-pix, .s-pix *, .s-pix *::before, .s-pix *::after { box-sizing: border-box; }\n.s-pix { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-pix button { font: inherit; cursor: pointer; }\n.s-pix { background: #1a1c2c; color: #f4f4f4; font: 9px/1.6 \"Press Start 2P\",monospace; padding: 16px; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 10px; }\n.s-pix .hud { display: flex; justify-content: space-between; align-items: center; width: 100%; color: #ffcd75; }\n.s-pix .ht { display: inline-block; width: 21px; height: 18px; position: relative; margin-right: 4px; color: #e43b44; }\n.s-pix .ht.e { color: #3b3f5c; }\n.s-pix .ht::before { content: \"\"; position: absolute; left: 0; top: 0; width: 3px; height: 3px; box-shadow: 3px 0,6px 0,12px 0,15px 0,0 3px,3px 3px,6px 3px,9px 3px,12px 3px,15px 3px,18px 3px,0 6px,3px 6px,6px 6px,9px 6px,12px 6px,15px 6px,18px 6px,3px 9px,6px 9px,9px 9px,12px 9px,15px 9px,6px 12px,9px 12px,12px 12px,9px 15px; }\n.s-pix .ttl { font-size: 18px; color: #73eff7; align-self: center; text-shadow: 3px 3px 0 #29366f; }\n.s-pix .menu { display: grid; gap: 12px; justify-items: center; }\n.s-pix .pb { font: inherit; color: #f4f4f4; background: #3b5dc9; border: 0; padding: 8px 12px; min-width: 150px; box-shadow: 0 3px #000,0 -3px #000,3px 0 #000,-3px 0 #000,inset -3px -3px 0 #29366f; }\n.s-pix .pb.on { background: #38b764; box-shadow: 0 3px #000,0 -3px #000,3px 0 #000,-3px 0 #000,inset -3px -3px 0 #257179; }\n.s-pix .pb:hover { background: #41a6f6; }",
    "js": ""
   }
  },
  {
   "id": "retrofuture",
   "title": "Retro-futurism",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "The future as imagined in the 1950s and 60s: atoms, starbursts, boomerang shapes, cream, orange and teal.",
   "goodFor": "Travel, events, brand campaigns with a story",
   "watchOut": "Utility apps where the theme gets in the way",
   "seenIn": "travel posters, theme parks, brand campaigns",
   "prompt": "Design this interface in the Retro-futurism visual style.\n\nWhat it is: The future as imagined in the 1950s and 60s: atoms, starbursts, boomerang shapes, cream, orange and teal.\nGood for: Travel, events, brand campaigns with a story.\nWatch out: Utility apps where the theme gets in the way.\nSeen in: travel posters, theme parks, brand campaigns\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-rf\">\n    <svg class=\"atom\" viewBox=\"0 0 120 120\" aria-hidden=\"true\"><g fill=\"none\" stroke=\"#1d3c45\" stroke-width=\"3\"><ellipse cx=\"60\" cy=\"60\" rx=\"54\" ry=\"18\"></ellipse><ellipse cx=\"60\" cy=\"60\" rx=\"54\" ry=\"18\" transform=\"rotate(60 60 60)\"></ellipse><ellipse cx=\"60\" cy=\"60\" rx=\"54\" ry=\"18\" transform=\"rotate(120 60 60)\"></ellipse></g><circle cx=\"60\" cy=\"60\" r=\"10\" fill=\"#e8743b\"></circle></svg>\n    <div><small>WORLD'S FAIR · 1962</small><h4 role=\"none\">The Home of Tomorrow</h4><p>Push-button kitchens. Rocket-speed travel. Living, made modern.</p><button>Book a tour</button></div>\n    <span class=\"star\"></span>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque, JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-rf, .s-rf *, .s-rf *::before, .s-rf *::after { box-sizing: border-box; }\n.s-rf { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-rf button { font: inherit; cursor: pointer; }\n.s-rf { background: #f3e9d2; color: #1d3c45; display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 16px; padding: 0 20px; }\n.s-rf .atom { width: 110px; height: 110px; animation: spin 14s linear infinite; }\n.s-rf small { font: 700 10px var(--mono); letter-spacing: .15em; color: #e8743b; }\n.s-rf h4 { font: 800 26px/1 var(--display); font-style: italic; margin: 4px 0 6px; }\n.s-rf p { margin: 0 0 10px; font-size: 12px; }\n.s-rf button { border: 0; background: #2a9d8f; color: #fff; font-weight: 700; padding: 8px 16px; border-radius: 999px 999px 999px 4px; }\n.s-rf .star { position: absolute; right: 18px; top: 18px; width: 40px; height: 40px; background: #e8743b; clip-path: polygon(50% 0,58% 40%,100% 50%,58% 60%,50% 100%,42% 60%,0 50%,42% 40%); }\n@keyframes spin {\n  to{transform:rotate(1turn)}\n}",
    "js": ""
   }
  },
  {
   "id": "threed",
   "title": "3D / hyperrealism",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "Objects with real depth, lighting and reflections that tilt as you move.",
   "goodFor": "Product showcases, cards, hero moments",
   "watchOut": "Every element; heavy 3D hurts speed and focus",
   "seenIn": "credit card sites, Apple product pages, Spline scenes",
   "prompt": "Design this interface in the 3D / hyperrealism visual style.\n\nWhat it is: Objects with real depth, lighting and reflections that tilt as you move.\nGood for: Product showcases, cards, hero moments.\nWatch out: Every element; heavy 3D hurts speed and focus.\nSeen in: credit card sites, Apple product pages, Spline scenes\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-3d\"><div class=\"cd\"><span class=\"chip\"></span><span class=\"num\">4821 •••• •••• 0926</span><span class=\"nm\">PRIYA MENON <em>09/29</em></span></div><span class=\"hint3\">move your pointer over the card</span></div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-3d, .s-3d *, .s-3d *::before, .s-3d *::after { box-sizing: border-box; }\n.s-3d { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-3d button { font: inherit; cursor: pointer; }\n.s-3d { background: radial-gradient(circle at 50% 30%,#2b2f45,#0d0f18); display: grid; place-items: center; perspective: 700px; color: #fff; }\n.s-3d .cd { width: 220px; height: 138px; border-radius: 16px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(135deg,#ffd194,#d1913c 55%,#8a5a19); color: #3b2508; font: 600 12px var(--mono); transform: rotateX(14deg) rotateY(-20deg); transform-style: preserve-3d; transition: transform .15s; box-shadow: 0 30px 40px rgba(0,0,0,.5); position: relative; }\n.s-3d .cd::after { content: \"\"; position: absolute; inset: 0; border-radius: 16px; background: linear-gradient(115deg,transparent 35%,rgba(255,255,255,.5) 48%,transparent 62%); background-size: 250% 100%; background-position: var(--gx,40%) 0; pointer-events: none; }\n.s-3d .chip { width: 36px; height: 27px; border-radius: 5px; background: linear-gradient(135deg,#fef3c7,#b8860b); transform: translateZ(30px); }\n.s-3d .num { transform: translateZ(24px); font-size: 13px; letter-spacing: .06em; }\n.s-3d .nm { display: flex; justify-content: space-between; transform: translateZ(18px); font-size: 10px; }\n.s-3d em { font-style: normal; }\n.s-3d .hint3 { position: absolute; bottom: 12px; font: 10px var(--mono); color: #8b93a5; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // 3D card tilt\n  (() => { const st = $('.s-3d'), cd = $('.s-3d .cd'); if (!st) return;\n    st.addEventListener('pointermove', e => { const r = st.getBoundingClientRect(), x = (e.clientX - r.left) / r.width - .5, y = (e.clientY - r.top) / r.height - .5;\n      cd.style.transform = `rotateX(${(-y * 34).toFixed(1)}deg) rotateY(${(x * 40).toFixed(1)}deg)`; cd.style.setProperty('--gx', ((x + .5) * 100).toFixed(0) + '%'); });\n    st.addEventListener('pointerleave', () => { cd.style.transform = ''; cd.style.removeProperty('--gx'); });\n  })();\n})();"
   }
  },
  {
   "id": "hud",
   "title": "HUD / sci-fi interface",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "Thin glowing lines, corner brackets, radar sweeps and monospaced readouts, like a cockpit or a film's computer screen.",
   "goodFor": "Games, monitoring, sci-fi themed dashboards",
   "watchOut": "Everyday apps; thin glowing text strains the eyes",
   "seenIn": "game interfaces, sci-fi films, monitoring tools",
   "prompt": "Design this interface in the HUD / sci-fi interface visual style.\n\nWhat it is: Thin glowing lines, corner brackets, radar sweeps and monospaced readouts, like a cockpit or a film's computer screen.\nGood for: Games, monitoring, sci-fi themed dashboards.\nWatch out: Everyday apps; thin glowing text strains the eyes.\nSeen in: game interfaces, sci-fi films, monitoring tools\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-hud\">\n    <div class=\"rad\"><i class=\"bl\" style=\"left:30%;top:28%\"></i><i class=\"bl\" style=\"left:68%;top:60%\"></i></div>\n    <div class=\"pan\"><span class=\"t\">TARGET LOCK · SECTOR 7G</span><span>ALT <b>12,400 m</b></span><span>SPD <b>842 km/h</b></span><span>HDG <b>274°</b></span><span class=\"mt\"><i></i></span><span class=\"warn\">⚠ FUEL 28%</span></div>\n  </div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-hud, .s-hud *, .s-hud *::before, .s-hud *::after { box-sizing: border-box; }\n.s-hud { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-hud button { font: inherit; cursor: pointer; }\n.s-hud { background: #03121a; color: #5ff5ff; font: 11px/1.4 var(--mono); padding: 16px; display: grid; grid-template-columns: 130px 1fr; gap: 16px; align-items: center; text-shadow: 0 0 6px rgba(95,245,255,.5); }\n.s-hud .rad { width: 130px; height: 130px; border-radius: 50%; border: 1px solid rgba(95,245,255,.6); background: linear-gradient(rgba(95,245,255,.3),rgba(95,245,255,.3)) center/1px 100% no-repeat,linear-gradient(rgba(95,245,255,.3),rgba(95,245,255,.3)) center/100% 1px no-repeat,repeating-radial-gradient(circle,transparent 0 21px,rgba(95,245,255,.25) 21px 22px); position: relative; overflow: hidden; }\n.s-hud .rad::before { content: \"\"; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(rgba(95,245,255,.5),transparent 22%); animation: spin 3s linear infinite; }\n.s-hud .bl { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #ff5f5f; box-shadow: 0 0 8px #ff5f5f; }\n.s-hud .pan { display: grid; gap: 6px; padding: 12px; min-width: 0; background: linear-gradient(#5ff5ff,#5ff5ff) 0 0/14px 2px,linear-gradient(#5ff5ff,#5ff5ff) 0 0/2px 14px,linear-gradient(#5ff5ff,#5ff5ff) 100% 0/14px 2px,linear-gradient(#5ff5ff,#5ff5ff) 100% 0/2px 14px,linear-gradient(#5ff5ff,#5ff5ff) 0 100%/14px 2px,linear-gradient(#5ff5ff,#5ff5ff) 0 100%/2px 14px,linear-gradient(#5ff5ff,#5ff5ff) 100% 100%/14px 2px,linear-gradient(#5ff5ff,#5ff5ff) 100% 100%/2px 14px,rgba(95,245,255,.05); background-repeat: no-repeat; }\n.s-hud .t { font-size: 10px; letter-spacing: .12em; opacity: .8; }\n.s-hud .pan > span { display: flex; justify-content: space-between; gap: 6px; }\n.s-hud .mt { height: 6px; border: 1px solid rgba(95,245,255,.5); }\n.s-hud .mt i { display: block; height: 100%; width: 72%; background: #5ff5ff; }\n.s-hud .warn { color: #ffb547; animation: blink 1s steps(2) infinite; }\n@keyframes spin {\n  to{transform:rotate(1turn)}\n}\n@keyframes blink {\n  50%{opacity:.25}\n}",
    "js": ""
   }
  },
  {
   "id": "spatial",
   "title": "Spatial UI",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "Floating glass windows placed in a real room, with side \"ornaments\" for tabs and a grab bar to move the window.",
   "goodFor": "AR/VR apps and immersive experiences",
   "watchOut": "Flat screens, where depth effects only add blur",
   "seenIn": "Apple visionOS, Meta Quest apps",
   "prompt": "Design this interface in the Spatial UI visual style.\n\nWhat it is: Floating glass windows placed in a real room, with side \"ornaments\" for tabs and a grab bar to move the window.\nGood for: AR/VR apps and immersive experiences.\nWatch out: Flat screens, where depth effects only add blur.\nSeen in: Apple visionOS, Meta Quest apps\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-sp\"><div class=\"win\"><div class=\"orn\"><i>◫</i><i class=\"on\">▤</i><i>♡</i></div><b>Photos</b><div class=\"ph3\"><i style=\"background:linear-gradient(135deg,#f6d365,#fda085)\"></i><i style=\"background:linear-gradient(135deg,#84fab0,#8fd3f4)\"></i><i style=\"background:linear-gradient(135deg,#a18cd1,#fbc2eb)\"></i><i style=\"background:linear-gradient(135deg,#fccb90,#d57eeb)\"></i></div><span class=\"grab\"></span></div></div>\n",
    "css": "/* base styles the site gives every demo (scoped to this demo) */\n.s-sp, .s-sp *, .s-sp *::before, .s-sp *::after { box-sizing: border-box; }\n.s-sp { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-sp button { font: inherit; cursor: pointer; }\n.s-sp { background: linear-gradient(#cfd9df 0,#b4c2cc 58%,#8d7b6a 58%,#6f604f); display: grid; place-items: center; color: #fff; }\n.s-sp::before { content: \"\"; position: absolute; left: 8%; top: 12%; width: 70px; height: 90px; background: #e9eef2; border: 6px solid #a0aeb8; opacity: .7; filter: blur(1.5px); }\n.s-sp .win { width: min(60%,220px); margin-left: 40px; padding: 14px; border-radius: 24px; background: rgba(235,235,245,.3); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); border: 1px solid rgba(255,255,255,.5); box-shadow: 0 30px 50px rgba(0,0,0,.25); display: grid; gap: 10px; position: relative; font-size: 13px; text-shadow: 0 1px 2px rgba(0,0,0,.2); }\n.s-sp .orn { position: absolute; left: -46px; top: 50%; transform: translateY(-50%); display: grid; gap: 6px; padding: 6px; border-radius: 22px; background: rgba(235,235,245,.3); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,.5); }\n.s-sp .orn i { font-style: normal; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; font-size: 13px; }\n.s-sp .orn i.on { background: rgba(255,255,255,.4); }\n.s-sp .ph3 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }\n.s-sp .ph3 i { aspect-ratio: 4/3; border-radius: 10px; max-width: 100%; }\n.s-sp .grab { position: absolute; bottom: -14px; left: 50%; width: 56px; height: 5px; margin-left: -28px; border-radius: 3px; background: rgba(255,255,255,.8); }\n@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {\n  .s-sp .win,.s-sp .orn { background: rgba(235,235,245,.72); color: #1d1b20; text-shadow: none; }\n}",
    "js": ""
   }
  },
  {
   "id": "kinetic",
   "title": "Kinetic typography",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "Type that moves: letters stretch, squash and scroll so the words themselves become the animation.",
   "goodFor": "Hero headlines, intros, music and event sites",
   "watchOut": "Body text and anything people must read fast",
   "seenIn": "music festival sites, film title sequences, brand launches",
   "prompt": "Design this interface in the Kinetic typography visual style.\n\nWhat it is: Type that moves: letters stretch, squash and scroll so the words themselves become the animation.\nGood for: Hero headlines, intros, music and event sites.\nWatch out: Body text and anything people must read fast.\nSeen in: music festival sites, film title sequences, brand launches\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-kin\">\n    <div class=\"mq\"><span>NEW SEASON · NEW SOUND · NEW SEASON · NEW SOUND ·&nbsp;</span><span>NEW SEASON · NEW SOUND · NEW SEASON · NEW SOUND ·&nbsp;</span></div>\n    <div class=\"w\"><span style=\"--d:0s\">M</span><span style=\"--d:.1s\">O</span><span style=\"--d:.2s\">V</span><span style=\"--d:.3s\">E</span></div>\n    <div class=\"mq r\"><span>LIVE 14 NOV · TICKETS OUT NOW · LIVE 14 NOV · TICKETS OUT NOW ·&nbsp;</span><span>LIVE 14 NOV · TICKETS OUT NOW · LIVE 14 NOV · TICKETS OUT NOW ·&nbsp;</span></div>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque, JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-kin, .s-kin *, .s-kin *::before, .s-kin *::after { box-sizing: border-box; }\n.s-kin { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-kin button { font: inherit; cursor: pointer; }\n.s-kin { background: #111; color: #f5f5f0; display: grid; align-content: center; gap: 8px; }\n.s-kin .mq { display: flex; white-space: nowrap; font: 700 13px var(--mono); color: #ffde59; width: max-content; justify-self: start; animation: mq 10s linear infinite; }\n.s-kin .mq.r { animation-direction: reverse; color: #ff5ca8; }\n.s-kin .w { display: flex; justify-content: center; font: 800 88px/1 var(--display); letter-spacing: -.03em; }\n.s-kin .w span { display: inline-block; transform-origin: 50% 100%; animation: kin 1.4s cubic-bezier(.6,0,.4,1) infinite; animation-delay: var(--d); }\n@keyframes mq {\n  to{transform:translateX(-50%)}\n}\n@keyframes kin {\n  0%,100%{transform:scaleY(1)}50%{transform:scaleY(.55);color:#ff5ca8}\n}",
    "js": ""
   }
  },
  {
   "id": "organic",
   "title": "Organic / biophilic",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "Soft blob shapes, earthy greens and clay tones, gentle serifs and slow natural movement inspired by plants and nature.",
   "goodFor": "Wellness, food, plants, sustainability brands",
   "watchOut": "Technical tools that need precise grids",
   "seenIn": "plant shops, wellness, food and sustainability brands",
   "prompt": "Design this interface in the Organic / biophilic visual style.\n\nWhat it is: Soft blob shapes, earthy greens and clay tones, gentle serifs and slow natural movement inspired by plants and nature.\nGood for: Wellness, food, plants, sustainability brands.\nWatch out: Technical tools that need precise grids.\nSeen in: plant shops, wellness, food and sustainability brands\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-org\">\n    <div class=\"blob\"><svg viewBox=\"0 0 100 100\" aria-hidden=\"true\"><path d=\"M50 92 C50 62 50 40 50 14\" stroke=\"#2f5d3a\" stroke-width=\"3\" fill=\"none\"></path><path d=\"M50 56 C30 51 20 36 22 22 C38 24 48 38 50 56Z\" fill=\"#3e7c4f\"></path><path d=\"M50 42 C68 38 78 24 76 12 C60 14 52 26 50 42Z\" fill=\"#4f9461\"></path><path d=\"M50 72 C70 70 82 58 82 46 C66 46 54 56 50 72Z\" fill=\"#3e7c4f\"></path></svg></div>\n    <div><small>Indoor plants</small><h4 role=\"none\">Monstera Deliciosa</h4><p>Loves bright, indirect light. Water once a week.</p><span class=\"row\"><b>₹1,249</b><button>Add to basket</button></span></div>\n  </div>\n",
    "css": ":root { --body: \"Figtree\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Figtree, DM Serif Display */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-org, .s-org *, .s-org *::before, .s-org *::after { box-sizing: border-box; }\n.s-org { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-org button { font: inherit; cursor: pointer; }\n.s-org { background: #f1efe4; color: #2f3e2c; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 16px; padding: 0 20px; }\n.s-org .blob { width: 130px; height: 150px; background: #c9d8b6; border-radius: 63% 37% 54% 46%/55% 48% 52% 45%; display: grid; place-items: center; animation: morph 8s ease-in-out infinite; max-width: 100%; }\n.s-org .blob svg { width: 90px; height: 90px; }\n.s-org small { font: 600 10px var(--body); letter-spacing: .14em; text-transform: uppercase; color: #7a8a63; }\n.s-org h4 { font: 400 24px/1.05 \"DM Serif Display\",Georgia,serif; margin: 4px 0 6px; }\n.s-org p { margin: 0 0 12px; font-size: 12px; color: #5b6650; }\n.s-org .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }\n.s-org button { border: 0; background: #c46d3b; color: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 600; }\n@keyframes morph {\n  50%{border-radius:40% 60% 38% 62%/60% 40% 58% 42%}\n}",
    "js": ""
   }
  },
  {
   "id": "genz",
   "title": "Gen Z maximalism / anti-design",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "Deliberate chaos: clashing fonts, rotated stickers, starbursts, scrolling strips and loud neon. Breaks the rules on purpose.",
   "goodFor": "Fashion drops, youth brands, social campaigns",
   "watchOut": "Checkout, forms and accessibility-critical flows",
   "seenIn": "streetwear drops, youth brands, social campaigns",
   "prompt": "Design this interface in the Gen Z maximalism / anti-design visual style.\n\nWhat it is: Deliberate chaos: clashing fonts, rotated stickers, starbursts, scrolling strips and loud neon. Breaks the rules on purpose.\nGood for: Fashion drops, youth brands, social campaigns.\nWatch out: Checkout, forms and accessibility-critical flows.\nSeen in: streetwear drops, youth brands, social campaigns\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-genz\">\n    <div class=\"strip\"><span>✦ FREE SHIPPING ✦ NO CAP ✦ FREE SHIPPING ✦ NO CAP ✦ FREE SHIPPING ✦ NO CAP ✦ FREE SHIPPING ✦ NO CAP ✦</span></div>\n    <b class=\"t1\">no thoughts,</b><i class=\"t2\">just fits</i><span class=\"burst\">NEW<br>DROP</span><span class=\"stk s1\">★ 4.9 from 2k+</span><span class=\"stk s2\">limited!!</span><span class=\"note\">trust me lol</span><button class=\"cta\">SHOP THE DROP</button>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; --body: \"Figtree\",system-ui,sans-serif; --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque, Figtree, JetBrains Mono, VT323, DM Serif Display, Caveat */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-genz, .s-genz *, .s-genz *::before, .s-genz *::after { box-sizing: border-box; }\n.s-genz { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-genz button { font: inherit; cursor: pointer; }\n.s-genz { background: #c6ff00; color: #111; container-type: inline-size; }\n.s-genz .strip { background: #111; color: #c6ff00; font: 700 11px var(--mono); padding: 5px 0; white-space: nowrap; overflow: hidden; }\n.s-genz .strip span { display: inline-block; animation: mq 12s linear infinite; }\n.s-genz .t1 { position: absolute; left: 18px; top: 46px; font: 800 34px/1 var(--display); transform: rotate(-4deg); }\n.s-genz .t2 { position: absolute; left: 56px; top: 92px; font: 400 36px/1 \"DM Serif Display\",serif; font-style: italic; color: #ff3ea5; transform: rotate(3deg); }\n.s-genz .burst { position: absolute; right: 18px; top: 40px; width: 80px; height: 80px; display: grid; place-items: center; text-align: center; background: #ff3ea5; color: #fff; font: 800 13px/1 var(--display); clip-path: polygon(50% 0,61% 15%,79% 8%,80% 27%,98% 32%,88% 50%,98% 68%,80% 73%,79% 92%,61% 85%,50% 100%,39% 85%,21% 92%,20% 73%,2% 68%,12% 50%,2% 32%,20% 27%,21% 8%,39% 15%); animation: spin 10s linear infinite; }\n.s-genz .stk { position: absolute; padding: 5px 10px; border: 2px solid #111; font: 700 12px var(--body); border-radius: 999px; }\n.s-genz .s1 { left: 20px; bottom: 60px; background: #7cc7ff; transform: rotate(-6deg); }\n.s-genz .s2 { right: 28px; bottom: 96px; background: #fff; transform: rotate(8deg); font: 400 18px \"VT323\",monospace; }\n.s-genz .note { position: absolute; left: 24px; bottom: 18px; font: 500 20px \"Caveat\",cursive; transform: rotate(-3deg); }\n@container (max-width:300px) {\n  .s-genz .t1 { left: 14px; font-size: 27px; }\n  .s-genz .t2 { left: 46px; font-size: 30px; }\n  .s-genz .burst { width: 62px; height: 62px; right: 10px; top: 52px; font-size: 11px; }\n}\n.s-genz .cta { position: absolute; right: 18px; bottom: 18px; border: 2px solid #111; background: #111; color: #c6ff00; font: 800 12px var(--mono); padding: 9px 12px; box-shadow: 4px 4px 0 #ff3ea5; }\n@keyframes spin {\n  to{transform:rotate(1turn)}\n}\n@keyframes mq {\n  to{transform:translateX(-50%)}\n}",
    "js": ""
   }
  },
  {
   "id": "ascii",
   "title": "ASCII / dithering",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "Pictures made of text characters and dot patterns, monospaced type and terminal colors. Dithering fakes shades with patterns of dots.",
   "goodFor": "Developer tools, terminals, retro tech brands",
   "watchOut": "Mass-market consumer apps",
   "seenIn": "developer tools, terminal-style portfolios, retro tech brands",
   "prompt": "Design this interface in the ASCII / dithering visual style.\n\nWhat it is: Pictures made of text characters and dot patterns, monospaced type and terminal colors. Dithering fakes shades with patterns of dots.\nGood for: Developer tools, terminals, retro tech brands.\nWatch out: Mass-market consumer apps.\nSeen in: developer tools, terminal-style portfolios, retro tech brands\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-asc\">\n<pre aria-label=\"ASCII art of a sun over mountains\">     \\   |   /\n   --  .---.  --\n      (     )\n   --  '---'  --\n     /   |   \\\n        /\\\n   /\\  /  \\  /\\\n  /  \\/    \\/  \\\n /    \\     \\   \\\n</pre>\n    <div class=\"dth\" aria-hidden=\"true\"><i></i><i></i><i></i><i></i><i></i></div>\n    <span class=\"bar3\">LOADING [######----] 62%</span>\n  </div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-asc, .s-asc *, .s-asc *::before, .s-asc *::after { box-sizing: border-box; }\n.s-asc { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-asc button { font: inherit; cursor: pointer; }\n.s-asc { background: #0b0b0b; color: #d4d4d4; font: 11px/1.15 var(--mono); display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; gap: 12px; padding: 16px; align-items: center; }\n.s-asc pre { margin: 0; color: #9cff8f; font: inherit; overflow: hidden; }\n.s-asc .dth { display: grid; height: 150px; border: 1px solid #333; }\n.s-asc .dth i:nth-child(1) { background: #d4d4d4; }\n.s-asc .dth i:nth-child(2) { background: repeating-conic-gradient(#d4d4d4 0 25%,#0b0b0b 0 50%) 0 0/4px 4px; }\n.s-asc .dth i:nth-child(3) { background: radial-gradient(#d4d4d4 1px,transparent 1.3px) 0 0/4px 4px; }\n.s-asc .dth i:nth-child(4) { background: radial-gradient(#d4d4d4 .9px,transparent 1.1px) 0 0/6px 6px; }\n.s-asc .dth i:nth-child(5) { background: #0b0b0b; }\n.s-asc .bar3 { grid-column: 1/-1; color: #9cff8f; }",
    "js": ""
   }
  },
  {
   "id": "bauhaus",
   "title": "Bauhaus",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "Primary colors, pure circles, squares and triangles, bold sans-serif type and strong asymmetric balance.",
   "goodFor": "Posters, art and design brands, education",
   "watchOut": "Dense dashboards and long forms",
   "seenIn": "posters, design schools, art exhibitions",
   "prompt": "Design this interface in the Bauhaus visual style.\n\nWhat it is: Primary colors, pure circles, squares and triangles, bold sans-serif type and strong asymmetric balance.\nGood for: Posters, art and design brands, education.\nWatch out: Dense dashboards and long forms.\nSeen in: posters, design schools, art exhibitions\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-bau\"><span class=\"sq\"></span><span class=\"ci\"></span><span class=\"tr\"></span><span class=\"bk\"></span><div class=\"tx\">bauhaus<br>ausstellung<small>weimar · juli–sept 1923</small></div></div>\n",
    "css": "/* base styles the site gives every demo (scoped to this demo) */\n.s-bau, .s-bau *, .s-bau *::before, .s-bau *::after { box-sizing: border-box; }\n.s-bau { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-bau button { font: inherit; cursor: pointer; }\n.s-bau { background: #f2ece0; color: #111; display: grid; grid-template-columns: repeat(4,1fr); grid-template-rows: repeat(4,1fr); font-family: \"Helvetica Neue\",Arial,sans-serif; }\n.s-bau .sq { grid-area: 1/1/3/3; background: #d62828; }\n.s-bau .ci { grid-area: 1/3/3/5; background: #003f88; border-radius: 50%; width: min(100%,136px); aspect-ratio: 1; max-width: 100%; justify-self: center; align-self: center; }\n.s-bau .tr { grid-area: 3/1/5/2; background: #fcbf49; clip-path: polygon(0 100%,100% 100%,50% 0); }\n.s-bau .bk { grid-area: 3/2/5/3; background: #111; width: 30%; justify-self: center; }\n.s-bau .tx { grid-area: 3/3/5/5; padding: 10px; font: 700 22px/1 \"Helvetica Neue\",Arial,sans-serif; align-self: end; letter-spacing: -.02em; }\n.s-bau small { display: block; font: 500 10px/1.3 \"Helvetica Neue\",Arial,sans-serif; margin-top: 6px; letter-spacing: .04em; }",
    "js": ""
   }
  },
  {
   "id": "artdeco",
   "title": "Art Deco",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "Gold on deep navy or black, fan and sunburst patterns, double borders, symmetry and tall, elegant capitals.",
   "goodFor": "Hotels, restaurants, luxury, events, invitations",
   "watchOut": "Fast utility apps and casual brands",
   "seenIn": "hotels, cocktail bars, luxury brands, wedding invitations",
   "prompt": "Design this interface in the Art Deco visual style.\n\nWhat it is: Gold on deep navy or black, fan and sunburst patterns, double borders, symmetry and tall, elegant capitals.\nGood for: Hotels, restaurants, luxury, events, invitations.\nWatch out: Fast utility apps and casual brands.\nSeen in: hotels, cocktail bars, luxury brands, wedding invitations\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-deco\"><span class=\"fan\"></span><div class=\"box\"><small>EST. 1928</small><h4 role=\"none\">THE GRAND</h4><span>BALLROOM · BAR · SUPPER CLUB</span><button>RESERVE A TABLE</button></div></div>\n",
    "css": ":root { --body: \"Figtree\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Figtree, Poiret One */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-deco, .s-deco *, .s-deco *::before, .s-deco *::after { box-sizing: border-box; }\n.s-deco { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-deco button { font: inherit; cursor: pointer; }\n.s-deco { background: #0f1b2d; color: #d4af37; display: grid; place-items: center; text-align: center; }\n.s-deco .fan { position: absolute; left: 50%; bottom: -170px; width: 400px; height: 400px; margin-left: -200px; border-radius: 50%; background: repeating-conic-gradient(rgba(212,175,55,.45) 0 1.5deg,transparent 1.5deg 10deg); -webkit-mask: radial-gradient(circle,transparent 0 30%,#000 30.5% 70%,transparent 70.5%); mask: radial-gradient(circle,transparent 0 30%,#000 30.5% 70%,transparent 70.5%); }\n.s-deco .box { position: relative; background: #0f1b2d; border: 2px solid #d4af37; outline: 1px solid #d4af37; outline-offset: 5px; padding: 16px 24px; display: grid; gap: 6px; justify-items: center; }\n.s-deco h4 { margin: 0; font: 400 32px/1 \"Poiret One\",Georgia,serif; letter-spacing: .22em; }\n.s-deco .box small,.s-deco .box span { font: 500 10px var(--body); letter-spacing: .3em; }\n.s-deco button { margin-top: 6px; background: #d4af37; color: #0f1b2d; border: 0; padding: 7px 14px; font: 700 10px var(--body); letter-spacing: .2em; }",
    "js": ""
   }
  },
  {
   "id": "monochrome",
   "title": "Monochrome",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "Only black, white and greys. Contrast, size and space do all the work, which makes the product the hero.",
   "goodFor": "Fashion, photography, premium minimal products",
   "watchOut": "Status-heavy UIs that need color for errors",
   "seenIn": "fashion labels, photography portfolios, premium tech",
   "prompt": "Design this interface in the Monochrome visual style.\n\nWhat it is: Only black, white and greys. Contrast, size and space do all the work, which makes the product the hero.\nGood for: Fashion, photography, premium minimal products.\nWatch out: Status-heavy UIs that need color for errors.\nSeen in: fashion labels, photography portfolios, premium tech\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-mono\">\n    <div class=\"l\"><svg viewBox=\"0 0 120 70\" aria-hidden=\"true\"><path d=\"M8 52 C20 50 34 40 44 26 L58 30 C64 40 80 44 104 46 C112 47 114 56 108 60 L14 62 C8 62 6 56 8 52Z\" fill=\"#fff\"></path><path d=\"M14 62 L108 60\" stroke=\"#000\" stroke-width=\"3\"></path><path d=\"M50 34 l6 2 M54 38 l6 2 M58 42 l6 2\" stroke=\"#000\" stroke-width=\"2\"></path></svg></div>\n    <div class=\"r\"><small>MODEL 01</small><h4 role=\"none\">Everyday Runner</h4><p>One colour. Zero noise.</p><b>₹6,999</b><button>Add to bag</button></div>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque, JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-mono, .s-mono *, .s-mono *::before, .s-mono *::after { box-sizing: border-box; }\n.s-mono { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-mono button { font: inherit; cursor: pointer; }\n.s-mono { background: #fff; color: #000; display: grid; grid-template-columns: 1fr 1fr; }\n.s-mono .l { background: #000; display: grid; place-items: center; padding: 16px; }\n.s-mono .l svg { width: 100%; max-width: 150px; }\n.s-mono .r { padding: 18px; display: grid; gap: 6px; align-content: center; }\n.s-mono small { font: 600 10px var(--mono); letter-spacing: .2em; }\n.s-mono h4 { margin: 0; font: 800 24px/1 var(--display); }\n.s-mono p { margin: 0; font-size: 12px; color: #555; }\n.s-mono button { justify-self: start; background: #000; color: #fff; border: 0; padding: 8px 16px; font-weight: 600; }",
    "js": ""
   }
  },
  {
   "id": "duotone",
   "title": "Duotone",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "A photo turned into just two colors, one for shadows and one for highlights, often with bold type on top.",
   "goodFor": "Hero images, campaigns, year-in-review stories",
   "watchOut": "Product photos where true color matters",
   "seenIn": "year-in-review campaigns, editorial heroes, posters",
   "prompt": "Design this interface in the Duotone visual style.\n\nWhat it is: A photo turned into just two colors, one for shadows and one for highlights, often with bold type on top.\nGood for: Hero images, campaigns, year-in-review stories.\nWatch out: Product photos where true color matters.\nSeen in: year-in-review campaigns, editorial heroes, posters\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-duo\"><span class=\"ph\"></span><span class=\"o1\"></span><span class=\"o2\"></span><div class=\"tx\"><small>YOUR 2026</small><h4 role=\"none\">412 hours<br>of music</h4></div></div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque, JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-duo, .s-duo *, .s-duo *::before, .s-duo *::after { box-sizing: border-box; }\n.s-duo { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-duo button { font: inherit; cursor: pointer; }\n.s-duo { isolation: isolate; color: #fff; display: grid; align-content: end; padding: 18px; }\n.s-duo .ph { position: absolute; inset: 0; background: radial-gradient(circle at 62% 32%,#eee 0 13%,transparent 13.5%),radial-gradient(ellipse 34% 30% at 62% 78%,#ccc 0 99%,transparent 100%),radial-gradient(circle at 30% 20%,#999,#222 70%); filter: grayscale(1) contrast(1.2); }\n.s-duo .o1 { position: absolute; inset: 0; background: #2b0a6b; mix-blend-mode: lighten; }\n.s-duo .o2 { position: absolute; inset: 0; background: #ff4f8b; mix-blend-mode: multiply; }\n.s-duo .tx { position: relative; z-index: 1; }\n.s-duo small { font: 700 10px var(--mono); letter-spacing: .2em; }\n.s-duo h4 { margin: 4px 0 0; font: 800 30px/1 var(--display); }",
    "js": ""
   }
  },
  {
   "id": "grain",
   "title": "Grain / noise texture",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "A fine film-like noise over gradients and flat colors. It removes the \"too digital\" look and hides color banding.",
   "goodFor": "Adding warmth to gradients and flat colors",
   "watchOut": "Small text and controls; keep it subtle",
   "seenIn": "modern landing pages, album covers, brand illustrations",
   "prompt": "Design this interface in the Grain / noise texture visual style.\n\nWhat it is: A fine film-like noise over gradients and flat colors. It removes the \"too digital\" look and hides color banding.\nGood for: Adding warmth to gradients and flat colors.\nWatch out: Small text and controls; keep it subtle.\nSeen in: modern landing pages, album covers, brand illustrations\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-grain\"><div class=\"tx\"><h4 role=\"none\">Golden hour</h4><p>Left half: flat gradient. Right half: the same gradient with grain.</p></div><span class=\"lb a\">no grain</span><span class=\"lb b\">grain</span></div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono, DM Serif Display */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-grain, .s-grain *, .s-grain *::before, .s-grain *::after { box-sizing: border-box; }\n.s-grain { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-grain button { font: inherit; cursor: pointer; }\n.s-grain { background: linear-gradient(135deg,#ff8a5b,#f6c453 50%,#7bd3c1); color: #2a1a10; display: grid; place-items: center; text-align: center; }\n.s-grain::after { content: \"\"; position: absolute; inset: 0 0 0 50%; background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E\"); mix-blend-mode: overlay; opacity: .9; pointer-events: none; }\n.s-grain::before { content: \"\"; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1px dashed rgba(0,0,0,.3); }\n.s-grain .tx { position: relative; }\n.s-grain h4 { margin: 0; font: 400 38px/1 \"DM Serif Display\",serif; }\n.s-grain p { margin: 6px 0 0; font-size: 12px; }\n.s-grain .lb { position: absolute; top: 10px; font: 600 10px var(--mono); text-transform: uppercase; letter-spacing: .1em; }\n.s-grain .a { left: 12px; }\n.s-grain .b { right: 12px; }",
    "js": ""
   }
  },
  {
   "id": "holographic",
   "title": "Holographic / iridescent",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "Shifting rainbow pastels with shiny streaks, like a hologram sticker or foil card.",
   "goodFor": "Membership cards, rewards, premium highlights",
   "watchOut": "Large areas; it gets tacky and hard to read",
   "seenIn": "membership cards, collectibles, packaging, event passes",
   "prompt": "Design this interface in the Holographic / iridescent visual style.\n\nWhat it is: Shifting rainbow pastels with shiny streaks, like a hologram sticker or foil card.\nGood for: Membership cards, rewards, premium highlights.\nWatch out: Large areas; it gets tacky and hard to read.\nSeen in: membership cards, collectibles, packaging, event passes\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-holo\"><div class=\"cd\"><span>MEMBER · 2026</span><b>GOLD PASS</b><span class=\"nm\">ADITI RAO <em>Nº 004821</em></span></div></div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque, JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-holo, .s-holo *, .s-holo *::before, .s-holo *::after { box-sizing: border-box; }\n.s-holo { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-holo button { font: inherit; cursor: pointer; }\n.s-holo { background: #e9e7f5; display: grid; place-items: center; color: #3a2f5c; }\n.s-holo .cd { width: 230px; height: 144px; border-radius: 14px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; background: linear-gradient(115deg,#ffd6e8,#c1f0ff,#e2ffd1,#fff1b8,#e3d1ff,#ffd6e8); background-size: 300% 300%; animation: holo 6s ease-in-out infinite; box-shadow: 0 14px 30px rgba(80,60,140,.25); font: 600 11px var(--mono); color: #3a2f5c; }\n.s-holo .cd::after { content: \"\"; position: absolute; inset: 0; background: repeating-linear-gradient(115deg,transparent 0 7px,rgba(255,255,255,.45) 7px 9px); mix-blend-mode: overlay; pointer-events: none; }\n.s-holo b { font: 800 24px var(--display); letter-spacing: .04em; }\n.s-holo .nm { display: flex; justify-content: space-between; }\n.s-holo em { font-style: normal; }\n@keyframes holo {\n  50%{background-position:100% 50%}\n}",
    "js": ""
   }
  },
  {
   "id": "eink",
   "title": "E-ink / paper",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "Grey paper, black serif text, no color and no animation. Calm, readable and easy on the eyes.",
   "goodFor": "Reading apps, focus modes, low-power devices",
   "watchOut": "Animated or color-coded interfaces",
   "seenIn": "Kindle, Kobo, reading and focus modes",
   "prompt": "Design this interface in the E-ink / paper visual style.\n\nWhat it is: Grey paper, black serif text, no color and no animation. Calm, readable and easy on the eyes.\nGood for: Reading apps, focus modes, low-power devices.\nWatch out: Animated or color-coded interfaces.\nSeen in: Kindle, Kobo, reading and focus modes\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-eink\">\n    <div class=\"tp\"><span>Chapter 4 · The Harbour</span><span class=\"bat\" role=\"img\" aria-label=\"Battery 60%\"></span></div>\n    <p>The boats came in before dawn, their lamps still lit, and the whole town seemed to lean toward the water. Meena stood at the end of the pier with her father's old coat around her shoulders and counted the hulls the way he had taught her: by their sound against the posts, not by sight.</p>\n    <div class=\"ft\"><span>Page 87 of 312</span><span>12 min left in chapter</span></div>\n  </div>\n",
    "css": "/* base styles the site gives every demo (scoped to this demo) */\n.s-eink, .s-eink *, .s-eink *::before, .s-eink *::after { box-sizing: border-box; }\n.s-eink { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-eink button { font: inherit; cursor: pointer; }\n.s-eink { background: #e8e6df; color: #1a1a1a; font-family: Georgia,\"Times New Roman\",serif; padding: 16px 22px; display: grid; grid-template-rows: auto 1fr auto; gap: 10px; }\n.s-eink .tp,.s-eink .ft { display: flex; justify-content: space-between; align-items: center; font: 11px Georgia,serif; color: #555; }\n.s-eink p { margin: 0; font-size: 14px; line-height: 1.6; text-align: justify; hyphens: auto; overflow: hidden; }\n.s-eink .bat { width: 22px; height: 10px; border: 1.5px solid #333; border-radius: 2px; background: linear-gradient(90deg,#333 60%,transparent 60%) 1px 1px/calc(100% - 2px) calc(100% - 2px) no-repeat; }",
    "js": ""
   }
  },
  {
   "id": "ios",
   "title": "Apple HIG (iOS style)",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "Apple's Human Interface Guidelines: large titles, grouped rounded lists, colored icon squares, chevrons and green switches.",
   "goodFor": "Native iPhone and iPad apps",
   "watchOut": "Android apps, where Material feels more at home",
   "seenIn": "iPhone Settings, Apple's own apps, most native iOS apps",
   "prompt": "Design this interface in the Apple HIG (iOS style) visual style.\n\nWhat it is: Apple's Human Interface Guidelines: large titles, grouped rounded lists, colored icon squares, chevrons and green switches.\nGood for: Native iPhone and iPad apps.\nWatch out: Android apps, where Material feels more at home.\nSeen in: iPhone Settings, Apple's own apps, most native iOS apps\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-ios\">\n    <h4 role=\"none\">Settings</h4><div class=\"sr\">⌕ Search</div>\n    <div class=\"grp\"><div class=\"row\"><i style=\"background:#ff9500\">✈</i><span>Airplane Mode</span><button class=\"isw\" aria-pressed=\"false\" aria-label=\"Airplane Mode\" data-toggle></button></div><div class=\"row\"><i style=\"background:#007aff\">≋</i><span>Wi‑Fi</span><em>Home_5G</em><b>›</b></div><div class=\"row\"><i style=\"background:#34c759\">◉</i><span>Mobile Data</span><b>›</b></div></div>\n    <div class=\"grp\"><div class=\"row\"><i style=\"background:#ff3b30\">◔</i><span>Notifications</span><b>›</b></div></div>\n  </div>\n",
    "css": "/* base styles the site gives every demo (scoped to this demo) */\n.s-ios, .s-ios *, .s-ios *::before, .s-ios *::after { box-sizing: border-box; }\n.s-ios { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-ios button { font: inherit; cursor: pointer; }\n.s-ios { background: #f2f2f7; color: #000; font: 13px -apple-system,\"SF Pro Text\",system-ui,sans-serif; padding: 14px 16px; display: grid; gap: 8px; align-content: start; }\n.s-ios h4 { margin: 0; font-size: 26px; font-weight: 700; }\n.s-ios .sr { background: #e3e3e8; border-radius: 10px; padding: 6px 10px; color: #8e8e93; }\n.s-ios .grp { background: #fff; border-radius: 10px; overflow: hidden; }\n.s-ios .row { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-bottom: .5px solid #d1d1d6; min-height: 38px; }\n.s-ios .row:last-child { border: 0; }\n.s-ios .row i { width: 26px; height: 26px; border-radius: 7px; color: #fff; font-style: normal; display: grid; place-items: center; font-size: 13px; flex: none; }\n.s-ios .row span { flex: 1; }\n.s-ios em { font-style: normal; color: #8e8e93; }\n.s-ios .row b { color: #c4c4c7; font-size: 18px; font-weight: 400; line-height: 1; }\n.s-ios .isw { width: 46px; height: 28px; border-radius: 14px; border: 0; background: #e9e9ea; position: relative; padding: 0; transition: background .2s; flex: none; }\n.s-ios .isw::after { content: \"\"; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: left .2s; }\n.s-ios .isw[aria-pressed=\"true\"] { background: #34c759; }\n.s-ios .isw[aria-pressed=\"true\"]::after { left: 20px; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // generic toggles\n  $$('[data-toggle]').forEach(b=>b.addEventListener('click',()=>b.setAttribute('aria-pressed',b.getAttribute('aria-pressed')!=='true')));\n})();"
   }
  },
  {
   "id": "fluent",
   "title": "Fluent (Windows style)",
   "section": "styles",
   "sectionName": "Visual styles",
   "description": "Microsoft's design system: soft tinted backgrounds, light cards, a blue accent bar on the selected item and rounded toggles.",
   "goodFor": "Windows apps and Microsoft-ecosystem tools",
   "watchOut": "Brands that need their own identity",
   "seenIn": "Windows 11 Settings, Microsoft 365, Teams",
   "prompt": "Design this interface in the Fluent (Windows style) visual style.\n\nWhat it is: Microsoft's design system: soft tinted backgrounds, light cards, a blue accent bar on the selected item and rounded toggles.\nGood for: Windows apps and Microsoft-ecosystem tools.\nWatch out: Brands that need their own identity.\nSeen in: Windows 11 Settings, Microsoft 365, Teams\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-flu\">\n    <div class=\"nv\"><span>⌂ Home</span><span class=\"on\">▭ System</span><span>✱ Bluetooth</span><span>◐ Personalisation</span><span>☰ Apps</span></div>\n    <div class=\"mn\"><h4 role=\"none\">Display</h4><div class=\"fc\"><span>Brightness</span><input type=\"range\" id=\"flu-r\" value=\"70\" aria-label=\"Brightness\"></div><div class=\"fc\"><span>Night light<small>Warmer colours at night</small></span><button class=\"fsw\" aria-pressed=\"true\" aria-label=\"Night light\" data-toggle></button></div><div class=\"fc\"><span>HDR<small>Brighter, more vivid video</small></span><button class=\"fsw\" aria-pressed=\"false\" aria-label=\"HDR\" data-toggle></button></div></div>\n  </div>\n",
    "css": "/* base styles the site gives every demo (scoped to this demo) */\n.s-flu, .s-flu *, .s-flu *::before, .s-flu *::after { box-sizing: border-box; }\n.s-flu { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-flu button { font: inherit; cursor: pointer; }\n.s-flu { background: linear-gradient(135deg,#eef2f7,#f5eff3); color: #1b1b1b; font: 12px \"Segoe UI Variable\",\"Segoe UI\",system-ui,sans-serif; display: grid; grid-template-columns: 118px 1fr; }\n.s-flu .nv { padding: 12px 6px; display: grid; gap: 2px; align-content: start; }\n.s-flu .nv span { padding: 6px 8px; border-radius: 5px; position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.s-flu .nv span.on { background: rgba(0,0,0,.05); }\n.s-flu .nv span.on::before { content: \"\"; position: absolute; left: 0; top: 25%; bottom: 25%; width: 3px; border-radius: 2px; background: #0067c0; }\n.s-flu .mn { padding: 12px; display: grid; gap: 6px; align-content: start; min-width: 0; }\n.s-flu h4 { margin: 0 0 6px; font-size: 18px; font-weight: 600; }\n.s-flu .fc { background: rgba(255,255,255,.75); border: 1px solid #e5e5e5; border-radius: 6px; padding: 9px 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }\n.s-flu .fc span { display: grid; }\n.s-flu small { color: #666; font-size: 10.5px; }\n.s-flu input[type=range] { accent-color: #0067c0; width: 90px; min-width: 0; }\n.s-flu .fsw { width: 40px; height: 20px; border-radius: 10px; border: 1px solid #868686; background: #fff; position: relative; padding: 0; flex: none; }\n.s-flu .fsw::after { content: \"\"; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: #5d5d5d; transition: left .15s; }\n.s-flu .fsw[aria-pressed=\"true\"] { background: #0067c0; border-color: #0067c0; }\n.s-flu .fsw[aria-pressed=\"true\"]::after { left: 23px; background: #fff; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // generic toggles\n  $$('[data-toggle]').forEach(b=>b.addEventListener('click',()=>b.setAttribute('aria-pressed',b.getAttribute('aria-pressed')!=='true')));\n})();"
   }
  },
  {
   "id": "cards",
   "title": "Card layout",
   "section": "layouts",
   "sectionName": "Layouts",
   "description": "Equal cards in a grid, each a self-contained preview with image, title and key facts. Easy to scan and compare.",
   "goodFor": "Browsing and comparing similar items",
   "watchOut": "Items with very different amounts of content",
   "seenIn": "Airbnb, Netflix, Trello, Dribbble",
   "prompt": "Build this layout for my page: Card layout.\n\nWhat it is: Equal cards in a grid, each a self-contained preview with image, title and key facts. Easy to scan and compare.\nGood for: Browsing and comparing similar items.\nWatch out: Items with very different amounts of content.\nSeen in: Airbnb, Netflix, Trello, Dribbble\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage wf s-cards\">\n    <div class=\"cd\"><div class=\"im\" style=\"background:linear-gradient(135deg,#fbbf24,#f97316)\"></div><div class=\"tx\"><b>Goa beach villa</b><span>★ 4.8</span><span class=\"pr\">₹8,400 / night</span></div></div>\n    <div class=\"cd\"><div class=\"im\" style=\"background:linear-gradient(135deg,#34d399,#0f766e)\"></div><div class=\"tx\"><b>Munnar tea estate</b><span>★ 4.9</span><span class=\"pr\">₹5,200 / night</span></div></div>\n    <div class=\"cd\"><div class=\"im\" style=\"background:linear-gradient(135deg,#93c5fd,#4f46e5)\"></div><div class=\"tx\"><b>Manali cabin</b><span>★ 4.7</span><span class=\"pr\">₹3,900 / night</span></div></div>\n    <div class=\"cd\"><div class=\"im\" style=\"background:linear-gradient(135deg,#fda4af,#be185d)\"></div><div class=\"tx\"><b>Jaipur haveli</b><span>★ 4.6</span><span class=\"pr\">₹6,100 / night</span></div></div>\n    <div class=\"cd\"><div class=\"im\" style=\"background:linear-gradient(135deg,#c4b5fd,#7c3aed)\"></div><div class=\"tx\"><b>Udaipur lake room</b><span>★ 4.9</span><span class=\"pr\">₹7,300 / night</span></div></div>\n    <div class=\"cd\"><div class=\"im\" style=\"background:linear-gradient(135deg,#fde68a,#ca8a04)\"></div><div class=\"tx\"><b>Rishikesh camp</b><span>★ 4.5</span><span class=\"pr\">₹2,800 / night</span></div></div>\n  </div>\n",
    "css": "/* base styles the site gives every demo (scoped to this demo) */\n.s-cards, .s-cards *, .s-cards *::before, .s-cards *::after { box-sizing: border-box; }\n.s-cards { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-cards button { font: inherit; cursor: pointer; }\n.wf { background: #f3f4f7; color: #2b3040; }\n.s-cards { padding: 10px 12px; display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; align-content: center; }\n.s-cards .cd { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); font-size: 11px; min-width: 0; }\n.s-cards .im { aspect-ratio: 16/9; max-width: 100%; }\n.s-cards .tx { padding: 6px 8px; display: grid; gap: 1px; }\n.s-cards .tx b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.s-cards .pr { color: #555; }",
    "js": ""
   }
  },
  {
   "id": "masonry",
   "title": "Masonry grid",
   "section": "layouts",
   "sectionName": "Layouts",
   "description": "Columns of items with different heights that stack tightly with no gaps, like a brick wall.",
   "goodFor": "Image-led browsing: photos, recipes, inspiration",
   "watchOut": "Content where order matters",
   "seenIn": "Pinterest, Unsplash, Behance",
   "prompt": "Build this layout for my page: Masonry grid.\n\nWhat it is: Columns of items with different heights that stack tightly with no gaps, like a brick wall.\nGood for: Image-led browsing: photos, recipes, inspiration.\nWatch out: Content where order matters.\nSeen in: Pinterest, Unsplash, Behance\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage wf s-mason\">\n    <div style=\"height:90px;background:#fca5a5\"></div><div style=\"height:140px;background:#fdba74\"></div><div style=\"height:70px;background:#fde047\"></div>\n    <div style=\"height:120px;background:#86efac\"></div><div style=\"height:80px;background:#67e8f9\"></div><div style=\"height:150px;background:#93c5fd\"></div>\n    <div style=\"height:100px;background:#c4b5fd\"></div><div style=\"height:65px;background:#f9a8d4\"></div><div style=\"height:130px;background:#a7f3d0\"></div>\n    <div style=\"height:85px;background:#fcd34d\"></div><div style=\"height:110px;background:#bfdbfe\"></div><div style=\"height:95px;background:#fecaca\"></div>\n  </div>\n",
    "css": "/* base styles the site gives every demo (scoped to this demo) */\n.s-mason, .s-mason *, .s-mason *::before, .s-mason *::after { box-sizing: border-box; }\n.s-mason { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-mason button { font: inherit; cursor: pointer; }\n.wf { background: #f3f4f7; color: #2b3040; }\n.s-mason { padding: 12px; columns: 4; column-gap: 8px; overflow: hidden; }\n.s-mason div { break-inside: avoid; margin-bottom: 8px; border-radius: 8px; }",
    "js": ""
   }
  },
  {
   "id": "dashboard",
   "title": "Dashboard",
   "section": "layouts",
   "sectionName": "Layouts",
   "description": "Sidebar navigation, a top bar with filters, summary numbers first and charts below them.",
   "goodFor": "Monitoring numbers and acting on them",
   "watchOut": "Showing every metric; pick the few that matter",
   "seenIn": "Stripe Dashboard, Google Analytics, Shopify admin",
   "prompt": "Build this layout for my page: Dashboard.\n\nWhat it is: Sidebar navigation, a top bar with filters, summary numbers first and charts below them.\nGood for: Monitoring numbers and acting on them.\nWatch out: Showing every metric; pick the few that matter.\nSeen in: Stripe Dashboard, Google Analytics, Shopify admin\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage wf s-dash\">\n    <div class=\"side\"><i class=\"on\"></i><i></i><i></i><i></i><i></i></div>\n    <div class=\"main\">\n      <div class=\"tbar\"><b>Overview</b><span style=\"color:#888\">Last 30 days ▾</span></div>\n      <div class=\"kpis\">\n        <div class=\"kpi bx\"><span style=\"color:#777\">Revenue</span><strong>₹4.2L</strong><span class=\"up\">▲ 12%</span></div>\n        <div class=\"kpi bx\"><span style=\"color:#777\">Orders</span><strong>1,284</strong><span class=\"up\">▲ 4%</span></div>\n        <div class=\"kpi bx\"><span style=\"color:#777\">Refunds</span><strong>0.8%</strong><span class=\"dn\">▲ 0.2%</span></div>\n      </div>\n      <div class=\"chart bx\"><i style=\"height:35%\"></i><i style=\"height:50%\"></i><i style=\"height:42%\"></i><i style=\"height:60%\"></i><i style=\"height:55%\"></i><i style=\"height:72%\"></i><i style=\"height:66%\"></i><i style=\"height:80%\"></i><i style=\"height:74%\"></i><i style=\"height:92%\"></i></div>\n    </div>\n  </div>\n",
    "css": ":root { --body: \"Figtree\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Figtree */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-dash, .s-dash *, .s-dash *::before, .s-dash *::after { box-sizing: border-box; }\n.s-dash { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-dash button { font: inherit; cursor: pointer; }\n.wf { background: #f3f4f7; color: #2b3040; }\n.bx { background: #fff; border: 1px solid #dfe3ea; border-radius: 6px; }\n.s-dash { display: grid; grid-template-columns: 46px 1fr; font-size: 11px; }\n.s-dash .side { background: #1e2230; display: grid; align-content: start; gap: 14px; padding: 14px 0; justify-items: center; }\n.s-dash .side i { width: 18px; height: 18px; border-radius: 5px; background: #3a4158; }\n.s-dash .side i.on { background: #6c8cff; }\n.s-dash .main { padding: 12px; display: grid; gap: 10px; grid-template-rows: auto auto 1fr; min-width: 0; }\n.s-dash .tbar { display: flex; justify-content: space-between; align-items: center; }\n.s-dash .tbar b { font-size: 14px; }\n.s-dash .kpis { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }\n.s-dash .kpi { padding: 8px; display: grid; gap: 2px; min-width: 0; }\n.s-dash .kpi strong { font: 700 16px var(--body); font-variant-numeric: tabular-nums; }\n.s-dash .up { color: #16a34a; }\n.s-dash .dn { color: #dc2626; }\n.s-dash .chart { padding: 10px; display: flex; align-items: end; gap: 6px; min-height: 0; }\n.s-dash .chart i { flex: 1; background: #6c8cff; border-radius: 3px 3px 0 0; }\n.s-dash .chart i:last-child { background: #2541c9; }",
    "js": ""
   }
  },
  {
   "id": "split",
   "title": "Split screen",
   "section": "layouts",
   "sectionName": "Layouts",
   "description": "Two halves with different jobs: one sells or shows a picture, the other holds the action, often a form.",
   "goodFor": "Login, sign-up, before/after, two-option choices",
   "watchOut": "Content that needs full width, especially on phones",
   "seenIn": "login and sign-up pages, product comparison pages",
   "prompt": "Build this layout for my page: Split screen.\n\nWhat it is: Two halves with different jobs: one sells or shows a picture, the other holds the action, often a form.\nGood for: Login, sign-up, before/after, two-option choices.\nWatch out: Content that needs full width, especially on phones.\nSeen in: login and sign-up pages, product comparison pages\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-split\">\n    <div class=\"l\"><b style=\"font-family:var(--display)\">Ledgerly</b><q>We closed our books three days faster in the first month.</q><span style=\"font-size:11px;opacity:.8\">Neha, Finance lead</span></div>\n    <form class=\"r\" onsubmit=\"event.preventDefault()\">\n      <b style=\"font-size:16px\">Welcome back</b>\n      <input id=\"sp-email\" type=\"email\" placeholder=\"Email\" value=\"neha@company.in\" aria-label=\"Email\">\n      <input id=\"sp-pass\" type=\"password\" placeholder=\"Password\" value=\"password\" aria-label=\"Password\">\n      <button type=\"submit\">Sign in</button>\n      <span style=\"color:#666;text-align:center\">New here? <u>Create an account</u></span>\n    </form>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-split, .s-split *, .s-split *::before, .s-split *::after { box-sizing: border-box; }\n.s-split { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-split button { font: inherit; cursor: pointer; }\n.s-split { display: grid; grid-template-columns: 1fr 1fr; }\n.s-split .l { background: linear-gradient(160deg,#0f766e,#134e4a); color: #e6fffa; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; }\n.s-split .l q { font: 600 15px/1.35 var(--display); }\n.s-split .r { background: #fff; padding: 18px; display: grid; gap: 8px; align-content: center; color: #111; font-size: 12px; }\n.s-split input { width: 100%; border: 1px solid #cfd5dd; border-radius: 6px; padding: 7px 8px; font: inherit; }\n.s-split button { background: #0f766e; color: #fff; border: 0; border-radius: 6px; padding: 8px; font-weight: 700; }",
    "js": ""
   }
  },
  {
   "id": "hero",
   "title": "Hero + sections",
   "section": "layouts",
   "sectionName": "Layouts",
   "description": "The classic landing page: navigation, a big headline with one call to action, then feature blocks as you scroll.",
   "goodFor": "Marketing and landing pages",
   "watchOut": "Logged-in apps where people come to work",
   "seenIn": "almost every SaaS and startup site",
   "prompt": "Build this layout for my page: Hero + sections.\n\nWhat it is: The classic landing page: navigation, a big headline with one call to action, then feature blocks as you scroll.\nGood for: Marketing and landing pages.\nWatch out: Logged-in apps where people come to work.\nSeen in: almost every SaaS and startup site\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage wf s-hero\">\n    <div class=\"nav\"><b style=\"font-family:var(--display)\">Taskly</b><span><span>Features</span><span>Pricing</span><span>Docs</span></span></div>\n    <div class=\"h\"><b>Plan your week in five minutes</b><span style=\"font-size:11px;color:#666\">Tasks, calendar and notes in one place.</span><button>Start free</button></div>\n    <div class=\"feat\"><div class=\"bx\"><b>Smart lists</b><div class=\"ln\"></div><div class=\"ln\" style=\"width:70%\"></div></div><div class=\"bx\"><b>Calendar sync</b><div class=\"ln\"></div><div class=\"ln\" style=\"width:60%\"></div></div><div class=\"bx\"><b>Reminders</b><div class=\"ln\"></div><div class=\"ln\" style=\"width:80%\"></div></div></div>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-hero, .s-hero *, .s-hero *::before, .s-hero *::after { box-sizing: border-box; }\n.s-hero { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-hero button { font: inherit; cursor: pointer; }\n.wf { background: #f3f4f7; color: #2b3040; }\n.bx { background: #fff; border: 1px solid #dfe3ea; border-radius: 6px; }\n.ln { height: 6px; border-radius: 3px; background: #d6dbe4; }\n.s-hero { padding: 10px; display: grid; gap: 8px; grid-template-rows: auto 1fr auto; }\n.s-hero .nav { display: flex; justify-content: space-between; align-items: center; font-size: 11px; }\n.s-hero .nav span { display: flex; gap: 10px; color: #666; }\n.s-hero .h { display: grid; justify-items: center; text-align: center; gap: 8px; align-content: center; background: linear-gradient(#fff,#eef2ff); border-radius: 10px; padding: 10px; }\n.s-hero .h b { font: 800 22px/1.05 var(--display); max-width: 22ch; }\n.s-hero .h button { border: 0; background: #3557e0; color: #fff; border-radius: 6px; padding: 6px 14px; font-size: 12px; font-weight: 600; }\n.s-hero .feat { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }\n.s-hero .feat div { padding: 8px; display: grid; gap: 5px; font-size: 10px; }",
    "js": ""
   }
  },
  {
   "id": "scrolly",
   "title": "Scrollytelling",
   "section": "layouts",
   "sectionName": "Layouts",
   "description": "A visual stays pinned while text scrolls past it, and the visual changes with each step of the story.",
   "goodFor": "Data stories, product launches, explainers",
   "watchOut": "Reference content people scan or revisit",
   "seenIn": "NYT and Guardian data stories, Apple AirPods pages",
   "prompt": "Build this layout for my page: Scrollytelling.\n\nWhat it is: A visual stays pinned while text scrolls past it, and the visual changes with each step of the story.\nGood for: Data stories, product launches, explainers.\nWatch out: Reference content people scan or revisit.\nSeen in: NYT and Guardian data stories, Apple AirPods pages\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-scrolly\">\n    <div class=\"vis\"><div class=\"dot\" id=\"sc-dot\">2015</div></div>\n    <div class=\"steps\" id=\"sc-steps\" tabindex=\"0\" role=\"region\" aria-label=\"Story steps\">\n      <div class=\"step on\" data-c=\"#38bdf8\" data-s=\"70\" data-l=\"2015\">In 2015, the city had 40 km of metro line.</div>\n      <div class=\"step\" data-c=\"#a78bfa\" data-s=\"100\" data-l=\"2020\">By 2020 it had doubled, and daily riders crossed one million.</div>\n      <div class=\"step\" data-c=\"#f472b6\" data-s=\"130\" data-l=\"2025\">Today 160 km of track carry three million people a day.</div>\n    </div>\n    <span class=\"hint\">scroll the right side →</span>\n  </div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-scrolly, .s-scrolly *, .s-scrolly *::before, .s-scrolly *::after { box-sizing: border-box; }\n.s-scrolly { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-scrolly button { font: inherit; cursor: pointer; }\n.s-scrolly { display: grid; grid-template-columns: 1fr 1fr; background: #0f172a; color: #e2e8f0; }\n.s-scrolly .vis { display: grid; place-items: center; border-right: 1px solid #1e293b; }\n.s-scrolly .dot { width: 70px; height: 70px; border-radius: 50%; background: #38bdf8; transition: all .5s; display: grid; place-items: center; font: 700 12px var(--mono); color: #0f172a; }\n.s-scrolly .steps { overflow-y: auto; padding: 0 14px; }\n.s-scrolly .step { min-height: 200px; display: flex; align-items: center; font-size: 13px; color: #64748b; transition: color .3s; }\n.s-scrolly .step.on { color: #fff; }\n.s-scrolly .step:first-child { min-height: 150px; }\n.s-scrolly .step:last-child { min-height: 240px; }\n.s-scrolly .hint { position: absolute; bottom: 8px; left: 0; width: 50%; text-align: center; white-space: nowrap; font: 9.5px var(--mono); color: #64748b; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // scrollytelling\n  const steps=$$('#sc-steps .step'),dot=$('#sc-dot'),box=$('#sc-steps');\n  function upd(){\n    const mid=box.getBoundingClientRect().top+box.clientHeight/2;let best=steps[0],d=1e9;\n    steps.forEach(s=>{const r=s.getBoundingClientRect();const dd=Math.abs(r.top+r.height/2-mid);if(dd<d){d=dd;best=s}});\n    steps.forEach(s=>s.classList.toggle('on',s===best));\n    dot.style.background=best.dataset.c;dot.style.width=dot.style.height=best.dataset.s+'px';dot.textContent=best.dataset.l;\n  }\n  box.addEventListener('scroll',upd,{passive:true});\n})();"
   }
  },
  {
   "id": "asym",
   "title": "Asymmetric / broken grid",
   "section": "layouts",
   "sectionName": "Layouts",
   "description": "Elements overlap, rotate and break out of a regular grid on purpose to feel editorial and dynamic.",
   "goodFor": "Fashion, agencies, portfolios, editorial",
   "watchOut": "Forms, docs and anything scanned quickly",
   "seenIn": "fashion brands, creative agencies, portfolio sites",
   "prompt": "Build this layout for my page: Asymmetric / broken grid.\n\nWhat it is: Elements overlap, rotate and break out of a regular grid on purpose to feel editorial and dynamic.\nGood for: Fashion, agencies, portfolios, editorial.\nWatch out: Forms, docs and anything scanned quickly.\nSeen in: fashion brands, creative agencies, portfolio sites\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-asym\">\n    <span class=\"big\">07</span>\n    <div class=\"img\"></div>\n    <div class=\"txt\"><b>Autumn<br>Collection</b><span>Raw linen, earth tones and loose cuts.</span></div>\n    <span class=\"strip\"></span>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-asym, .s-asym *, .s-asym *::before, .s-asym *::after { box-sizing: border-box; }\n.s-asym { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-asym button { font: inherit; cursor: pointer; }\n.s-asym { background: #f0ede6; color: #1a1a1a; }\n.s-asym .img { position: absolute; left: 8%; top: 12%; width: 46%; height: 68%; background: linear-gradient(150deg,#c2410c,#7c2d12); transform: rotate(-4deg); }\n.s-asym .txt { position: absolute; right: 6%; top: 30%; width: 52%; background: #fff; padding: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.12); }\n.s-asym .txt b { font: 800 24px/1 var(--display); display: block; margin-bottom: 6px; }\n.s-asym .txt span { font-size: 11px; color: #555; }\n.s-asym .big { position: absolute; right: 8%; top: 2%; font: 800 70px/1 var(--display); color: transparent; -webkit-text-stroke: 1.5px #1a1a1a; }\n.s-asym .strip { position: absolute; left: 0; bottom: 12%; width: 60%; height: 12px; background: #1a1a1a; }",
    "js": ""
   }
  },
  {
   "id": "fz",
   "title": "F-pattern & Z-pattern",
   "section": "layouts",
   "sectionName": "Layouts",
   "description": "How eyes scan a screen. On text-heavy pages people read the top lines, then skim down the left (F). On simple pages the eye zig-zags from logo to menu to call to action (Z).",
   "goodFor": "Placing headlines, key info and calls to action",
   "watchOut": "Assuming everyone scans the same way; test it",
   "seenIn": "search results and blogs (F), landing pages and ads (Z)",
   "prompt": "Build this layout for my page: F-pattern & Z-pattern.\n\nWhat it is: How eyes scan a screen. On text-heavy pages people read the top lines, then skim down the left (F). On simple pages the eye zig-zags from logo to menu to call to action (Z).\nGood for: Placing headlines, key info and calls to action.\nWatch out: Assuming everyone scans the same way; test it.\nSeen in: search results and blogs (F), landing pages and ads (Z)\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage wf s-fz\">\n    <div class=\"pg bx\">\n      <span class=\"lbl\">F-pattern · text page</span>\n      <div class=\"ln\" style=\"width:95%\"></div><div class=\"ln\" style=\"width:90%\"></div><div class=\"ln\" style=\"width:60%\"></div><div class=\"ln\" style=\"width:55%\"></div><div class=\"ln\" style=\"width:30%\"></div><div class=\"ln\" style=\"width:35%\"></div><div class=\"ln\" style=\"width:25%\"></div><div class=\"ln\" style=\"width:28%\"></div>\n      <svg viewBox=\"0 0 100 100\" preserveAspectRatio=\"none\" aria-hidden=\"true\"><polyline points=\"10,20 90,20 10,20 10,42 60,42 10,42 10,95\" fill=\"none\" stroke=\"#e5484d\" stroke-width=\"2\" vector-effect=\"non-scaling-stroke\" stroke-dasharray=\"4 3\"></polyline></svg>\n    </div>\n    <div class=\"pg bx\">\n      <span class=\"lbl\">Z-pattern · landing page</span>\n      <div style=\"display:flex;justify-content:space-between\"><div class=\"ln\" style=\"width:30%\"></div><div class=\"ln\" style=\"width:30%\"></div></div>\n      <div style=\"height:60px\"></div>\n      <div style=\"display:flex;justify-content:space-between;align-items:center\"><div class=\"ln\" style=\"width:40%\"></div><span style=\"background:#3557e0;color:#fff;border-radius:4px;padding:3px 8px;font-size:10px\">CTA</span></div>\n      <svg viewBox=\"0 0 100 100\" preserveAspectRatio=\"none\" aria-hidden=\"true\"><polyline points=\"12,24 88,24 12,82 88,82\" fill=\"none\" stroke=\"#e5484d\" stroke-width=\"2\" vector-effect=\"non-scaling-stroke\" stroke-dasharray=\"4 3\"></polyline></svg>\n    </div>\n  </div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-fz, .s-fz *, .s-fz *::before, .s-fz *::after { box-sizing: border-box; }\n.s-fz { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-fz button { font: inherit; cursor: pointer; }\n.wf { background: #f3f4f7; color: #2b3040; }\n.bx { background: #fff; border: 1px solid #dfe3ea; border-radius: 6px; }\n.ln { height: 6px; border-radius: 3px; background: #d6dbe4; }\n.s-fz { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px; }\n.s-fz .pg { position: relative; padding: 10px; display: grid; gap: 7px; align-content: start; }\n.s-fz .pg svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }\n.s-fz .lbl { font: 700 11px var(--mono); margin-bottom: 2px; }",
    "js": ""
   }
  },
  {
   "id": "holygrail",
   "title": "Holy grail layout",
   "section": "layouts",
   "sectionName": "Layouts",
   "description": "Header on top, footer at the bottom, and three columns between them: navigation, main content and a side panel.",
   "goodFor": "Docs, news, admin panels, wikis",
   "watchOut": "Phones; collapse the side columns",
   "seenIn": "MDN docs, Wikipedia, news sites, admin panels",
   "prompt": "Build this layout for my page: Holy grail layout.\n\nWhat it is: Header on top, footer at the bottom, and three columns between them: navigation, main content and a side panel.\nGood for: Docs, news, admin panels, wikis.\nWatch out: Phones; collapse the side columns.\nSeen in: MDN docs, Wikipedia, news sites, admin panels\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage wf s-hg\"><div class=\"h\">Header</div><div class=\"n\">Nav</div><div class=\"m\">Main content</div><div class=\"a\">Aside</div><div class=\"f\">Footer</div></div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-hg, .s-hg *, .s-hg *::before, .s-hg *::after { box-sizing: border-box; }\n.s-hg { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-hg button { font: inherit; cursor: pointer; }\n.wf { background: #f3f4f7; color: #2b3040; }\n.s-hg { padding: 12px; display: grid; gap: 6px; grid-template: \"h h h\" 34px \"n m a\" 1fr \"f f f\" 28px/60px 1fr 70px; font: 600 11px var(--mono); color: #4b5568; }\n.s-hg > div { display: grid; place-items: center; border-radius: 6px; }\n.s-hg .h { grid-area: h; background: #c7d2fe; }\n.s-hg .n { grid-area: n; background: #ddd6fe; }\n.s-hg .m { grid-area: m; background: #fff; border: 1px solid #dfe3ea; }\n.s-hg .a { grid-area: a; background: #fde68a; }\n.s-hg .f { grid-area: f; background: #cbd5e1; }",
    "js": ""
   }
  },
  {
   "id": "grid12",
   "title": "12-column grid",
   "section": "layouts",
   "sectionName": "Layouts",
   "description": "The page is split into 12 equal columns with gutters. Blocks span 12, 8, 6, 4 or 3 columns, so everything lines up. The red stripes are the columns.",
   "goodFor": "Almost any responsive page layout",
   "watchOut": "Forcing tiny components onto it",
   "seenIn": "Bootstrap, most marketing sites, Figma layout grids",
   "prompt": "Build this layout for my page: 12-column grid.\n\nWhat it is: The page is split into 12 equal columns with gutters. Blocks span 12, 8, 6, 4 or 3 columns, so everything lines up. The red stripes are the columns.\nGood for: Almost any responsive page layout.\nWatch out: Forcing tiny components onto it.\nSeen in: Bootstrap, most marketing sites, Figma layout grids\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage wf s-g12\">\n    <div class=\"cols\" id=\"g12-cols\"><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i></div>\n    <div class=\"g\"><div class=\"bx\" style=\"grid-column:span 12\">span 12 · header</div><div class=\"bx\" style=\"grid-column:span 8;height:80px\">span 8 · main</div><div class=\"bx\" style=\"grid-column:span 4\">span 4 · side</div><div class=\"bx\" style=\"grid-column:span 4\">span 4</div><div class=\"bx\" style=\"grid-column:span 4\">span 4</div><div class=\"bx\" style=\"grid-column:span 4\">span 4</div><div class=\"bx\" style=\"grid-column:span 6\">span 6</div><div class=\"bx\" style=\"grid-column:span 6\">span 6</div><div class=\"bx\" style=\"grid-column:span 3\">3</div><div class=\"bx\" style=\"grid-column:span 3\">3</div><div class=\"bx\" style=\"grid-column:span 3\">3</div><div class=\"bx\" style=\"grid-column:span 3\">3</div></div>\n    <button class=\"tgl\" id=\"g12-btn\">Hide columns</button>\n  </div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-g12, .s-g12 *, .s-g12 *::before, .s-g12 *::after { box-sizing: border-box; }\n.s-g12 { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-g12 button { font: inherit; cursor: pointer; }\n.wf { background: #f3f4f7; color: #2b3040; }\n.bx { background: #fff; border: 1px solid #dfe3ea; border-radius: 6px; }\n.s-g12 { padding: 14px; }\n.s-g12 .cols,.s-g12 .g { display: grid; grid-template-columns: repeat(12,1fr); gap: 8px; }\n.s-g12 .cols { position: absolute; inset: 14px; pointer-events: none; z-index: 1; }\n.s-g12 .cols i { background: rgba(229,72,77,.13); }\n.s-g12 .g .bx { padding: 6px; font: 9px/1.2 var(--mono); min-height: 30px; min-width: 0; overflow-wrap: anywhere; }\n.s-g12 .tgl { position: absolute; right: 12px; bottom: 10px; z-index: 2; border: 1px solid #d6dae1; background: #fff; border-radius: 6px; padding: 4px 10px; font-size: 11px; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  const on = (sel, ev, fn) => { const el = $(sel); if (el) el.addEventListener(ev, fn); return el; };\n\n  /* ---------- Layouts ---------- */\n  on('#g12-btn', 'click', e => { const c = $('#g12-cols'); c.hidden = !c.hidden; e.currentTarget.textContent = c.hidden ? 'Show columns' : 'Hide columns'; });\n})();"
   }
  },
  {
   "id": "listdetail",
   "title": "List-detail (master-detail)",
   "section": "layouts",
   "sectionName": "Layouts",
   "description": "A list on one side and the selected item's full content on the other.",
   "goodFor": "Email, chat, files, settings on wide screens",
   "watchOut": "Phones; show list and detail as separate screens",
   "seenIn": "Gmail, Outlook, Apple Mail, Finder",
   "prompt": "Build this layout for my page: List-detail (master-detail).\n\nWhat it is: A list on one side and the selected item's full content on the other.\nGood for: Email, chat, files, settings on wide screens.\nWatch out: Phones; show list and detail as separate screens.\nSeen in: Gmail, Outlook, Apple Mail, Finder\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-ld\"><ul id=\"ld-list\"></ul><div class=\"dt\" id=\"ld-dt\"></div></div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-ld, .s-ld *, .s-ld *::before, .s-ld *::after { box-sizing: border-box; }\n.s-ld { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-ld button { font: inherit; cursor: pointer; }\n.s-ld { display: grid; grid-template-columns: 44% 1fr; background: #fff; color: #1f2430; font-size: 12px; }\n.s-ld ul { list-style: none; margin: 0; padding: 0; border-right: 1px solid #eef0f3; overflow-y: auto; }\n.s-ld li { border-bottom: 1px solid #f2f3f6; }\n.s-ld li button { all: unset; display: grid; gap: 1px; padding: 9px 12px; width: 100%; box-sizing: border-box; cursor: pointer; }\n.s-ld li button:focus-visible { outline: 2px solid #3557e0; outline-offset: -2px; }\n.s-ld li span { color: #777; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.s-ld li.on { background: #eef1ff; box-shadow: inset 3px 0 #3557e0; }\n.s-ld .dt { padding: 14px; display: grid; gap: 6px; align-content: start; min-width: 0; }\n.s-ld .dt h5 { margin: 0; font: 700 15px var(--display); }\n.s-ld .dt small { color: #888; }\n.s-ld .dt p { margin: 0; color: #555; line-height: 1.5; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // list-detail\n  (() => { const m = [\n      ['Ananya Kapoor', 'Design review moved', 'Hi team, the design review is now at 4 PM in Room 3. Please bring the latest pricing page mockups.', '10:42 AM'],\n      ['Rohan Shah', 'Final icons', 'Attached are the final icon exports in SVG and PNG at 1x, 2x and 3x.', '9:15 AM'],\n      ['Billing', 'Your invoice for October', 'Your invoice of ₹4,720 is ready. It will be charged to the card ending 0926 on 10 Nov.', 'Yesterday'],\n      ['Kavya', 'Lunch on Friday?', 'Thinking of the new South Indian place near the office. Does 1 PM work for you?', 'Mon']];\n    const ul = $('#ld-list'), dt = $('#ld-dt'); if (!ul) return;\n    ul.innerHTML = m.map(x => `<li><button><b>${x[0]}</b><span>${x[1]}</span></button></li>`).join('');\n    const show = i => { [...ul.children].forEach((li, j) => li.classList.toggle('on', i === j)); const x = m[i];\n      dt.innerHTML = `<small>${x[3]}</small><h5 role=\"none\">${x[1]}</h5><b>${x[0]}</b><p>${x[2]}</p>`; };\n    [...ul.children].forEach((li, i) => li.firstChild.addEventListener('click', () => show(i))); show(0);\n  })();\n})();"
   }
  },
  {
   "id": "kanban",
   "title": "Kanban board",
   "section": "layouts",
   "sectionName": "Layouts",
   "description": "Columns for each stage of work, with cards that move left to right.",
   "goodFor": "Tasks moving through stages",
   "watchOut": "Data with no clear stages, or hundreds of items",
   "seenIn": "Trello, Jira, Linear, GitHub Projects",
   "prompt": "Build this layout for my page: Kanban board.\n\nWhat it is: Columns for each stage of work, with cards that move left to right.\nGood for: Tasks moving through stages.\nWatch out: Data with no clear stages, or hundreds of items.\nSeen in: Trello, Jira, Linear, GitHub Projects\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-kb\">\n    <div class=\"col\"><h5 role=\"none\">To do <em>3</em></h5><div class=\"cards\"><div class=\"kc\">Write onboarding copy<span class=\"tg2 y\">Content</span></div><div class=\"kc\">Fix login timeout<span class=\"tg2 r\">Bug</span></div><div class=\"kc\">Plan Q1 survey<span class=\"tg2 b\">Research</span></div></div></div>\n    <div class=\"col\"><h5 role=\"none\">Doing <em>2</em></h5><div class=\"cards\"><div class=\"kc\">Pricing page design<span class=\"tg2 p\">Design</span></div><div class=\"kc\">Dark mode tokens<span class=\"tg2 p\">Design</span></div></div></div>\n    <div class=\"col\"><h5 role=\"none\">Done <em>1</em></h5><div class=\"cards\"><div class=\"kc\">Logo refresh<span class=\"tg2 g\">Brand</span></div></div></div>\n  </div>\n",
    "css": ":root { --body: \"Figtree\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Figtree */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-kb, .s-kb *, .s-kb *::before, .s-kb *::after { box-sizing: border-box; }\n.s-kb { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-kb button { font: inherit; cursor: pointer; }\n.s-kb { background: #f3f4f7; color: #1f2430; display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; padding: 12px; font-size: 11px; }\n.s-kb .col { background: #e7e9ee; border-radius: 8px; padding: 6px; display: grid; grid-template-rows: auto 1fr; gap: 6px; min-width: 0; }\n.s-kb h5 { margin: 2px 4px; font: 700 11px var(--body); display: flex; justify-content: space-between; }\n.s-kb h5 em { font-style: normal; color: #888; }\n.s-kb .cards { display: grid; gap: 6px; align-content: start; min-height: 40px; }\n.s-kb .kc { background: #fff; border-radius: 6px; padding: 7px; box-shadow: 0 1px 2px rgba(0,0,0,.08); display: grid; gap: 5px; cursor: grab; }\n.s-kb .tg2 { justify-self: start; font-size: 9px; font-weight: 600; padding: 1px 6px; border-radius: 4px; }\n.s-kb .tg2.y { background: #fef3c7; color: #92400e; }\n.s-kb .tg2.r { background: #fee2e2; color: #991b1b; }\n.s-kb .tg2.b { background: #dbeafe; color: #1e40af; }\n.s-kb .tg2.p { background: #ede9fe; color: #5b21b6; }\n.s-kb .tg2.g { background: #dcfce7; color: #166534; }\n.s-kb .sortable-ghost { opacity: .4; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // loads SortableJS (drag and drop) from a CDN, then runs the demo\n  const whenSortable = fn => { if (window.Sortable) return fn(); const s = document.createElement('script'); s.src = 'https://cdnjs.cloudflare.com/ajax/libs/Sortable/1.15.2/Sortable.min.js'; s.onload = fn; document.head.append(s); };\n\n  whenSortable(() => {\n    const Srt = window.Sortable;\n\n    function kbCount(){ $$('.s-kb .col').forEach(c => { $('h5 em', c).textContent = $$('.kc', c).length; }); }\n\n    // kanban\n    if (Srt) $$('.s-kb .cards').forEach(el => new Srt(el, { group: 'kb', animation: 150, onSort: kbCount }));\n  });\n})();"
   }
  },
  {
   "id": "carousel",
   "title": "Carousel / slider",
   "section": "layouts",
   "sectionName": "Layouts",
   "description": "One slide at a time with arrows and dots.",
   "goodFor": "A few equally important visual items",
   "watchOut": "Hiding key content; most people never see slide 3",
   "seenIn": "e-commerce homepages, app stores, news sites",
   "prompt": "Build this layout for my page: Carousel / slider.\n\nWhat it is: One slide at a time with arrows and dots.\nGood for: A few equally important visual items.\nWatch out: Hiding key content; most people never see slide 3.\nSeen in: e-commerce homepages, app stores, news sites\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-car\">\n    <div class=\"tr\" id=\"car-tr\" tabindex=\"0\" role=\"region\" aria-label=\"Carousel slides\"><div class=\"sl\" style=\"background:linear-gradient(135deg,#f6d365,#fda085)\"><b>Summer sale</b><span>Up to 40% off sandals</span></div><div class=\"sl\" style=\"background:linear-gradient(135deg,#43cea2,#185a9d)\"><b>New: Trail series</b><span>Built for monsoon hikes</span></div><div class=\"sl\" style=\"background:linear-gradient(135deg,#a18cd1,#7b4397)\"><b>Members get more</b><span>Free delivery, always</span></div><div class=\"sl\" style=\"background:linear-gradient(135deg,#30cfd0,#330867)\"><b>Gift cards</b><span>From ₹500</span></div></div>\n    <button class=\"ar l\" id=\"car-p\" aria-label=\"Previous slide\">‹</button><button class=\"ar r\" id=\"car-n\" aria-label=\"Next slide\">›</button>\n    <div class=\"dots\" id=\"car-d\"></div>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-car, .s-car *, .s-car *::before, .s-car *::after { box-sizing: border-box; }\n.s-car { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-car button { font: inherit; cursor: pointer; }\n.s-car { background: #fff; padding: 14px; display: grid; grid-template-rows: 1fr auto; gap: 10px; color: #1f2430; }\n.s-car .tr { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 12px; }\n.s-car .tr::-webkit-scrollbar { display: none; }\n.s-car .sl { flex: 0 0 100%; scroll-snap-align: center; border-radius: 12px; padding: 18px; display: flex; flex-direction: column; justify-content: flex-end; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.25); }\n.s-car .sl b { font: 800 22px var(--display); }\n.s-car .ar { position: absolute; top: calc(50% - 28px); width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); box-shadow: 0 2px 6px rgba(0,0,0,.2); font-size: 18px; line-height: 1; color: #1f2430; }\n.s-car .ar.l { left: 22px; }\n.s-car .ar.r { right: 22px; }\n.s-car .dots { display: flex; gap: 16px; justify-content: center; }\n.s-car .dots button { width: 8px; height: 8px; border-radius: 4px; border: 0; background: #d1d5db; padding: 0; transition: width .2s; }\n.s-car .dots button.on { width: 22px; background: #3557e0; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  const on = (sel, ev, fn) => { const el = $(sel); if (el) el.addEventListener(ev, fn); return el; };\n\n  // carousel\n  (() => { const tr = $('#car-tr'), d = $('#car-d'); if (!tr) return; const n = tr.children.length;\n    d.innerHTML = Array.from({ length: n }, (_, i) => `<button aria-label=\"Slide ${i + 1}\"></button>`).join(''); const dots = [...d.children];\n    const cur = () => Math.round(tr.scrollLeft / (tr.clientWidth + 10));\n    const go = i => tr.scrollTo({ left: Math.max(0, Math.min(n - 1, i)) * (tr.clientWidth + 10), behavior: 'smooth' });\n    const upd = () => { const i = cur(); dots.forEach((b, j) => b.classList.toggle('on', i === j)); };\n    tr.addEventListener('scroll', upd, { passive: true }); dots.forEach((b, i) => b.addEventListener('click', () => go(i)));\n    on('#car-p', 'click', () => go(cur() - 1)); on('#car-n', 'click', () => go(cur() + 1)); upd();\n  })();\n})();"
   }
  },
  {
   "id": "shelf",
   "title": "Horizontal scroll rows (shelves)",
   "section": "layouts",
   "sectionName": "Layouts",
   "description": "Rows of items that scroll sideways, one row per category. Lets people browse a lot without long pages.",
   "goodFor": "Browsing many items by category: media, shops",
   "watchOut": "Content that needs side-by-side comparison",
   "seenIn": "Netflix, Prime Video, App Store, Spotify",
   "prompt": "Build this layout for my page: Horizontal scroll rows (shelves).\n\nWhat it is: Rows of items that scroll sideways, one row per category. Lets people browse a lot without long pages.\nGood for: Browsing many items by category: media, shops.\nWatch out: Content that needs side-by-side comparison.\nSeen in: Netflix, Prime Video, App Store, Spotify\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-shelf\">\n    <div><div class=\"rh\"><b>Continue watching</b><span>See all</span></div><div class=\"tk\"></div></div>\n    <div><div class=\"rh\"><b>Top picks for you</b><span>See all</span></div><div class=\"tk p\"></div></div>\n  </div>\n",
    "css": "/* base styles the site gives every demo (scoped to this demo) */\n.s-shelf, .s-shelf *, .s-shelf *::before, .s-shelf *::after { box-sizing: border-box; }\n.s-shelf { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-shelf button { font: inherit; cursor: pointer; }\n.s-shelf { background: #141414; color: #fff; padding: 12px 0 12px 14px; display: grid; gap: 12px; align-content: start; font-size: 12px; }\n.s-shelf .rh { display: flex; justify-content: space-between; padding-right: 14px; margin-bottom: 6px; }\n.s-shelf .rh span { color: #aaa; font-size: 11px; }\n.s-shelf .tk { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-right: 14px; }\n.s-shelf .tk::-webkit-scrollbar { display: none; }\n.s-shelf .t { flex: 0 0 132px; aspect-ratio: 16/9; border-radius: 6px; scroll-snap-align: start; position: relative; display: flex; align-items: flex-end; padding: 6px; font-weight: 700; font-size: 11px; max-width: 100%; overflow: hidden; }\n.s-shelf .t i { position: absolute; left: 0; bottom: 0; height: 3px; background: #e50914; }\n.s-shelf .tk.p .t { flex-basis: 92px; aspect-ratio: 2/3; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // shelves\n  (() => { const r = $$('.s-shelf .tk'); if (r.length < 2) return;\n    const a = [['Monsoon Diaries', 62, '#7c3aed,#db2777'], ['The Last Over', 30, '#0ea5e9,#1e3a8a'], ['Spice Route', 85, '#f59e0b,#b91c1c'], ['Night Shift', 12, '#10b981,#064e3b'], ['Hill Station', 50, '#64748b,#0f172a'], ['Old City', 70, '#f97316,#7c2d12']];\n    r[0].innerHTML = a.map(x => `<div class=\"t\" style=\"background:linear-gradient(135deg,${x[2]})\">${x[0]}<i style=\"width:${x[1]}%\"></i></div>`).join('');\n    r[1].innerHTML = a.slice().reverse().map(x => `<div class=\"t\" style=\"background:linear-gradient(160deg,${x[2]})\">${x[0]}</div>`).join('');\n  })();\n})();"
   }
  },
  {
   "id": "timeline",
   "title": "Timeline",
   "section": "layouts",
   "sectionName": "Layouts",
   "description": "Events in order along a line, with done, current and upcoming steps clearly marked.",
   "goodFor": "Order tracking, history, changelogs, processes",
   "watchOut": "Non-chronological content",
   "seenIn": "order tracking, changelogs, history pages, Git logs",
   "prompt": "Build this layout for my page: Timeline.\n\nWhat it is: Events in order along a line, with done, current and upcoming steps clearly marked.\nGood for: Order tracking, history, changelogs, processes.\nWatch out: Non-chronological content.\nSeen in: order tracking, changelogs, history pages, Git logs\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-tl\"><ol><li class=\"done\"><b>Order placed</b><span>Mon 3 Nov, 10:14 AM</span></li><li class=\"done\"><b>Packed at warehouse</b><span>Mon 3 Nov, 6:40 PM</span></li><li class=\"done\"><b>Shipped</b><span>Tue 4 Nov, 9:05 AM · Tracking 7731 0042</span></li><li class=\"cur\"><b>Out for delivery</b><span>Today, 8:12 AM</span></li><li><b>Delivered</b><span>Expected by 7 PM</span></li></ol></div>\n",
    "css": "/* base styles the site gives every demo (scoped to this demo) */\n.s-tl, .s-tl *, .s-tl *::before, .s-tl *::after { box-sizing: border-box; }\n.s-tl { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-tl button { font: inherit; cursor: pointer; }\n.s-tl { background: #fff; color: #1f2430; padding: 18px 20px; font-size: 12px; }\n.s-tl ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; position: relative; }\n.s-tl ol::before { content: \"\"; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: #e3e6ec; }\n.s-tl li { position: relative; padding-left: 28px; display: grid; gap: 1px; color: #9aa0aa; }\n.s-tl li::before { content: \"\"; position: absolute; left: 0; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid #d0d5de; box-sizing: border-box; }\n.s-tl li.done,.s-tl li.cur { color: #1f2430; }\n.s-tl li.done::before { background: #16a34a; border-color: #16a34a; }\n.s-tl li.cur::before { border-color: #3557e0; box-shadow: 0 0 0 4px rgba(53,87,224,.2); }\n.s-tl li span { font-size: 11px; color: #888; }",
    "js": ""
   }
  },
  {
   "id": "pricing",
   "title": "Pricing table",
   "section": "layouts",
   "sectionName": "Layouts",
   "description": "Plans side by side with the recommended one raised and highlighted.",
   "goodFor": "Comparing 2 to 4 plans quickly",
   "watchOut": "More than four plans, or hidden fees",
   "seenIn": "almost every SaaS pricing page",
   "prompt": "Build this layout for my page: Pricing table.\n\nWhat it is: Plans side by side with the recommended one raised and highlighted.\nGood for: Comparing 2 to 4 plans quickly.\nWatch out: More than four plans, or hidden fees.\nSeen in: almost every SaaS pricing page\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-price\">\n    <div class=\"bill\"><button class=\"on\" data-b=\"m\">Monthly</button><button data-b=\"y\">Yearly <em>−20%</em></button></div>\n    <div class=\"tiers\">\n      <div class=\"tr\"><b>Free</b><strong data-m=\"₹0\" data-y=\"₹0\">₹0</strong><small>/ month</small><span>1 project</span><button>Start</button></div>\n      <div class=\"tr pop\"><em class=\"bd\">Most popular</em><b>Pro</b><strong data-m=\"₹499\" data-y=\"₹399\">₹499</strong><small>/ month</small><span>Unlimited projects</span><button>Upgrade</button></div>\n      <div class=\"tr\"><b>Team</b><strong data-m=\"₹1,299\" data-y=\"₹1,039\">₹1,299</strong><small>/ month</small><span>10 seats, SSO</span><button>Contact</button></div>\n    </div>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; --body: \"Figtree\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque, Figtree */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-price, .s-price *, .s-price *::before, .s-price *::after { box-sizing: border-box; }\n.s-price { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-price button { font: inherit; cursor: pointer; }\n.s-price { background: #f6f7fb; color: #1f2430; padding: 14px; display: grid; grid-template-rows: auto 1fr; gap: 12px; font-size: 11px; }\n.s-price .bill { justify-self: center; display: inline-flex; background: #e7e9f0; border-radius: 999px; padding: 3px; }\n.s-price .bill button { border: 0; background: none; border-radius: 999px; padding: 5px 12px; font-size: 11px; color: #555; }\n.s-price .bill button.on { background: #fff; color: #111; font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12); }\n.s-price .bill em { font-style: normal; color: #16a34a; }\n.s-price .tiers { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; align-items: center; }\n.s-price .tr { background: #fff; border: 1px solid #e3e6ec; border-radius: 10px; padding: 12px 6px; display: grid; gap: 6px; justify-items: center; text-align: center; position: relative; min-width: 0; }\n.s-price .tr strong { font: 800 19px var(--display); font-variant-numeric: tabular-nums; }\n.s-price .tr small { color: #888; }\n.s-price .tr button { border: 1px solid #3557e0; color: #3557e0; background: #fff; border-radius: 6px; padding: 5px 10px; font-size: 11px; font-weight: 600; }\n.s-price .pop { border: 2px solid #3557e0; padding: 20px 6px; box-shadow: 0 10px 24px rgba(53,87,224,.18); }\n.s-price .pop button { background: #3557e0; color: #fff; }\n.s-price .bd { position: absolute; top: -9px; background: #3557e0; color: #fff; font: 600 9px var(--body); font-style: normal; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // pricing monthly/yearly\n  (() => { const b = $$('.s-price .bill button');\n    b.forEach(x => x.addEventListener('click', () => { b.forEach(y => y.classList.toggle('on', y === x)); $$('.s-price strong').forEach(s => s.textContent = s.dataset[x.dataset.b]); }));\n  })();\n})();"
   }
  },
  {
   "id": "parallax",
   "title": "Parallax scrolling",
   "section": "layouts",
   "sectionName": "Layouts",
   "description": "Background layers move slower than the foreground, which creates a feeling of depth.",
   "goodFor": "Storytelling and brand moments",
   "watchOut": "Every page; it can cause motion sickness and lag",
   "seenIn": "travel and brand stories, Apple product pages, game sites",
   "prompt": "Build this layout for my page: Parallax scrolling.\n\nWhat it is: Background layers move slower than the foreground, which creates a feeling of depth.\nGood for: Storytelling and brand moments.\nWatch out: Every page; it can cause motion sickness and lag.\nSeen in: travel and brand stories, Apple product pages, game sites\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-plx\">\n    <div class=\"scr\" id=\"plx\" tabindex=\"0\" role=\"region\" aria-label=\"Parallax scene\"><div class=\"pin\">\n      <span class=\"ly sky\"></span>\n      <svg class=\"ly\" data-f=\".15\" viewBox=\"0 0 400 200\" preserveAspectRatio=\"none\" aria-hidden=\"true\"><polygon points=\"0,200 0,120 60,70 120,110 190,50 260,105 330,60 400,100 400,200\" fill=\"#7b8fd1\"></polygon></svg>\n      <svg class=\"ly\" data-f=\".35\" viewBox=\"0 0 400 200\" preserveAspectRatio=\"none\" aria-hidden=\"true\"><polygon points=\"0,200 0,150 80,100 150,140 230,90 310,140 400,110 400,200\" fill=\"#45599a\"></polygon></svg>\n      <div class=\"ly tx\" data-f=\"-.4\"><b>Into the Himalaya</b><span>scroll inside ↓</span></div>\n      <svg class=\"ly\" data-f=\".7\" viewBox=\"0 0 400 200\" preserveAspectRatio=\"none\" aria-hidden=\"true\"><polygon points=\"0,200 0,175 100,135 200,170 300,130 400,165 400,200\" fill=\"#1c2a52\"></polygon></svg>\n    </div><div class=\"sp\"></div></div>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque, JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-plx, .s-plx *, .s-plx *::before, .s-plx *::after { box-sizing: border-box; }\n.s-plx { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-plx button { font: inherit; cursor: pointer; }\n.s-plx { background: #f9d29d; color: #fff; }\n.s-plx .scr { position: absolute; inset: 0; overflow-y: auto; scrollbar-width: thin; }\n.s-plx .pin { position: sticky; top: 0; height: 290px; overflow: hidden; }\n.s-plx .ly { position: absolute; left: 0; width: 100%; }\n.s-plx .sky { inset: 0; height: 100%; background: linear-gradient(#f6a96b,#f9d29d 60%,#fbe7c6); }\n.s-plx svg.ly { bottom: 0; height: 200px; }\n.s-plx .tx { top: 56px; display: grid; justify-items: center; gap: 4px; text-align: center; }\n.s-plx .tx b { font: 800 26px var(--display); text-shadow: 0 2px 8px rgba(0,0,0,.25); }\n.s-plx .tx span { font: 11px var(--mono); }\n.s-plx .sp { height: 520px; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // parallax\n  (() => { const s = $('#plx'); if (!s) return; const ly = $$('#plx [data-f]');\n    s.addEventListener('scroll', () => { const t = s.scrollTop; ly.forEach(l => l.style.transform = `translateY(${t * l.dataset.f}px)`); }, { passive: true });\n  })();\n\n  $$('nav.index button[data-f]').forEach(b => { const s = collections.find(x => x.id === b.dataset.f); if (s) b.insertAdjacentHTML('beforeend', `<span class=\"kn\">${$$('article.demo', s).length}</span>`); });\n})();"
   }
  },
  {
   "id": "fullscreen",
   "title": "Full-screen sections (scroll snap)",
   "section": "layouts",
   "sectionName": "Layouts",
   "description": "Each section fills the screen and scrolling snaps from one to the next, like slides.",
   "goodFor": "Short product pages, presentations, app intros",
   "watchOut": "Long content; snapping fights free scrolling",
   "seenIn": "app launch pages, product reveals, presentations",
   "prompt": "Build this layout for my page: Full-screen sections (scroll snap).\n\nWhat it is: Each section fills the screen and scrolling snaps from one to the next, like slides.\nGood for: Short product pages, presentations, app intros.\nWatch out: Long content; snapping fights free scrolling.\nSeen in: app launch pages, product reveals, presentations\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-fs\">\n    <div class=\"scr\" id=\"fs\" tabindex=\"0\" role=\"region\" aria-label=\"Full-screen sections\"><div style=\"background:#0f172a\"><b>Fast</b><span>Loads in under a second</span></div><div style=\"background:#3557e0\"><b>Private</b><span>Your data stays on your phone</span></div><div style=\"background:#15803d\"><b>Free</b><span>No ads, no trials</span></div><div style=\"background:#b45309\"><b>Get the app</b><span>iOS and Android</span></div></div>\n    <div class=\"dots\" id=\"fs-d\"></div>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-fs, .s-fs *, .s-fs *::before, .s-fs *::after { box-sizing: border-box; }\n.s-fs { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-fs button { font: inherit; cursor: pointer; }\n.s-fs { color: #fff; }\n.s-fs .scr { position: absolute; inset: 0; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; }\n.s-fs .scr::-webkit-scrollbar { display: none; }\n.s-fs .scr > div { height: 100%; scroll-snap-align: start; display: grid; place-content: center; justify-items: center; gap: 4px; text-align: center; }\n.s-fs .scr b { font: 800 34px var(--display); }\n.s-fs .scr span { font-size: 13px; opacity: .85; }\n.s-fs .dots { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: grid; gap: 18px; }\n.s-fs .dots button { width: 8px; height: 8px; border-radius: 4px; border: 0; padding: 0; background: rgba(255,255,255,.45); transition: height .2s; }\n.s-fs .dots button.on { background: #fff; height: 20px; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // full-screen snap sections\n  (() => { const s = $('#fs'), d = $('#fs-d'); if (!s) return; const n = s.children.length;\n    d.innerHTML = Array.from({ length: n }, (_, i) => `<button aria-label=\"Section ${i + 1}\"></button>`).join(''); const b = [...d.children];\n    const upd = () => { const i = Math.round(s.scrollTop / s.clientHeight); b.forEach((x, j) => x.classList.toggle('on', i === j)); };\n    s.addEventListener('scroll', upd, { passive: true }); b.forEach((x, i) => x.addEventListener('click', () => s.scrollTo({ top: i * s.clientHeight, behavior: 'smooth' }))); upd();\n  })();\n})();"
   }
  },
  {
   "id": "stickynav",
   "title": "Top navbar (sticky header)",
   "section": "navigation",
   "sectionName": "Navigation",
   "description": "A horizontal menu at the top that stays pinned while the page scrolls under it.",
   "goodFor": "Most websites and long pages",
   "watchOut": "Tall headers that eat small screens",
   "seenIn": "nearly every website, GitHub, Shopify stores",
   "prompt": "Build this navigation pattern for my app: Top navbar (sticky header).\n\nWhat it is: A horizontal menu at the top that stays pinned while the page scrolls under it.\nGood for: Most websites and long pages.\nWatch out: Tall headers that eat small screens.\nSeen in: nearly every website, GitHub, Shopify stores\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-sticky\" style=\"background:#fff;color:#1f2430\">\n    <div class=\"scr\" tabindex=\"0\" role=\"region\" aria-label=\"Page content\">\n      <div class=\"hd\"><b>Brewly</b><span><span>Shop</span><span>Learn</span><span>Cart (2)</span></span></div>\n      <div class=\"body wf\" style=\"background:#fff\">\n        <b style=\"font:700 18px var(--display)\">Single-origin coffee, roasted weekly</b>\n        <div class=\"ln\"></div><div class=\"ln\" style=\"width:85%\"></div><div class=\"ln\" style=\"width:92%\"></div><div class=\"ln\" style=\"width:70%\"></div>\n        <div style=\"height:60px;border-radius:8px;background:linear-gradient(135deg,#a16207,#451a03)\"></div>\n        <div class=\"ln\"></div><div class=\"ln\" style=\"width:80%\"></div><div class=\"ln\" style=\"width:88%\"></div><div class=\"ln\" style=\"width:60%\"></div>\n        <div style=\"height:60px;border-radius:8px;background:linear-gradient(135deg,#d97706,#78350f)\"></div>\n        <div class=\"ln\"></div><div class=\"ln\" style=\"width:75%\"></div><div class=\"ln\" style=\"width:90%\"></div>\n        <div style=\"height:60px;border-radius:8px;background:linear-gradient(135deg,#92400e,#1c1917)\"></div>\n        <div class=\"ln\"></div><div class=\"ln\" style=\"width:65%\"></div>\n      </div>\n    </div>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-sticky, .s-sticky *, .s-sticky *::before, .s-sticky *::after { box-sizing: border-box; }\n.s-sticky { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-sticky button { font: inherit; cursor: pointer; }\n.wf { background: #f3f4f7; color: #2b3040; }\n.ln { height: 6px; border-radius: 3px; background: #d6dbe4; }\n.s-sticky .scr { position: absolute; inset: 0; overflow-y: auto; }\n.s-sticky .hd { position: sticky; top: 0; background: rgba(255,255,255,.9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid #e5e7eb; display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; font-size: 12px; z-index: 1; }\n.s-sticky .hd span { display: flex; gap: 12px; color: #555; }\n.s-sticky .hd b { font-family: var(--display); font-size: 15px; }\n.s-sticky .body { padding: 14px; display: grid; gap: 9px; }",
    "js": ""
   }
  },
  {
   "id": "mega",
   "title": "Mega menu",
   "section": "navigation",
   "sectionName": "Navigation",
   "description": "A wide dropdown that shows many grouped links at once, often with a promo tile. Used when a site has lots of sections.",
   "goodFor": "Large sites with many categories",
   "watchOut": "Small sites; a simple menu is faster",
   "seenIn": "Amazon, Adobe, Microsoft, big retail sites",
   "prompt": "Build this navigation pattern for my app: Mega menu.\n\nWhat it is: A wide dropdown that shows many grouped links at once, often with a promo tile. Used when a site has lots of sections.\nGood for: Large sites with many categories.\nWatch out: Small sites; a simple menu is faster.\nSeen in: Amazon, Adobe, Microsoft, big retail sites\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-mega\">\n    <div class=\"nv\"><b>Studio</b><span class=\"on\">Products ▾</span><span>Solutions</span><span>Pricing</span></div>\n    <div class=\"panel\">\n      <div><h5 role=\"none\">Create</h5><ul><li>Photo editor</li><li>Video editor</li><li>Illustration</li><li>3D</li></ul></div>\n      <div><h5 role=\"none\">Share</h5><ul><li>Portfolio</li><li>Stock</li><li>Fonts</li><li>Libraries</li></ul></div>\n      <div class=\"promo\"><b>New: AI fill</b><span style=\"font-size:11px\">Remove objects in one click →</span></div>\n    </div>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; --body: \"Figtree\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque, Figtree */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-mega, .s-mega *, .s-mega *::before, .s-mega *::after { box-sizing: border-box; }\n.s-mega { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-mega button { font: inherit; cursor: pointer; }\n.s-mega { background: #f6f7f9; font-size: 12px; color: #1f2430; }\n.s-mega .nv { background: #fff; display: flex; gap: 16px; align-items: center; padding: 10px 14px; border-bottom: 1px solid #e5e7eb; }\n.s-mega .nv b { font-family: var(--display); margin-right: 6px; }\n.s-mega .nv span.on { color: #3557e0; font-weight: 600; }\n.s-mega .panel { margin: 0 10px; background: #fff; border: 1px solid #e5e7eb; border-top: 0; border-radius: 0 0 10px 10px; box-shadow: 0 14px 30px rgba(0,0,0,.08); display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; padding: 14px; }\n.s-mega .panel h5 { margin: 0 0 6px; font: 700 10px var(--body); letter-spacing: .1em; text-transform: uppercase; color: #888; }\n.s-mega .panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }\n.s-mega .promo { background: linear-gradient(150deg,#3557e0,#7c3aed); color: #fff; border-radius: 8px; padding: 10px; display: flex; flex-direction: column; justify-content: space-between; }",
    "js": ""
   }
  },
  {
   "id": "hamburger",
   "title": "Hamburger menu",
   "section": "navigation",
   "sectionName": "Navigation",
   "description": "Three lines that open a hidden menu, saving space on small screens.",
   "goodFor": "Secondary links on small screens",
   "watchOut": "Hiding main sections on desktop",
   "seenIn": "mobile websites, Gmail mobile, many apps",
   "prompt": "Build this navigation pattern for my app: Hamburger menu.\n\nWhat it is: Three lines that open a hidden menu, saving space on small screens.\nGood for: Secondary links on small screens.\nWatch out: Hiding main sections on desktop.\nSeen in: mobile websites, Gmail mobile, many apps\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-ham center\">\n    <div class=\"phone open\" id=\"ham\">\n      <div class=\"top\"><button class=\"hb\" aria-label=\"Menu\" aria-expanded=\"true\"><i></i><i></i><i></i></button><b>Readr</b><span style=\"width:28px\"></span></div>\n      <div class=\"cnt wf\" style=\"background:#fff\"><div class=\"ln\"></div><div class=\"ln\" style=\"width:80%\"></div><div style=\"height:60px;background:#e5e7eb;border-radius:6px\"></div><div class=\"ln\"></div><div class=\"ln\" style=\"width:60%\"></div></div>\n      <div class=\"drawer\"><span>Home</span><span>Saved</span><span>Topics</span><span>Settings</span><span style=\"opacity:.6\">Sign out</span></div>\n    </div>\n  </div>\n",
    "css": "/* base styles the site gives every demo (scoped to this demo) */\n.s-ham, .s-ham *, .s-ham *::before, .s-ham *::after { box-sizing: border-box; }\n.s-ham { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-ham button { font: inherit; cursor: pointer; }\n.center { display: grid; place-items: center; }\n.phone { width: 172px; height: 262px; border-radius: 26px; border: 6px solid #1b1d22; background: #fff; position: relative; overflow: hidden; color: #1b1d22; font-size: 11px; }\n.wf { background: #f3f4f7; color: #2b3040; }\n.ln { height: 6px; border-radius: 3px; background: #d6dbe4; }\n.s-ham { background: #e9ecf1; }\n.s-ham .top { display: flex; align-items: center; justify-content: space-between; padding: 10px; border-bottom: 1px solid #eee; }\n.s-ham .hb { width: 28px; height: 28px; border: 0; background: none; display: grid; gap: 4px; align-content: center; padding: 4px; }\n.s-ham .hb i { display: block; height: 2px; background: #1b1d22; border-radius: 2px; transition: .25s; }\n.s-ham .phone.open .hb i:nth-child(1) { transform: translateY(6px) rotate(45deg); }\n.s-ham .phone.open .hb i:nth-child(2) { opacity: 0; }\n.s-ham .phone.open .hb i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }\n.s-ham .drawer { position: absolute; top: 49px; left: 0; bottom: 0; width: 78%; background: #1b1d22; color: #fff; padding: 14px; display: grid; align-content: start; gap: 12px; font-size: 13px; transform: translateX(-100%); transition: transform .3s; }\n.s-ham .phone.open .drawer { transform: none; }\n.s-ham .cnt { padding: 10px; display: grid; gap: 7px; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // hamburger\n  const ham=$('#ham'),hb=$('.hb',ham);\n  hb.addEventListener('click',()=>{const o=ham.classList.toggle('open');hb.setAttribute('aria-expanded',o)});\n})();"
   }
  },
  {
   "id": "tabbar",
   "title": "Bottom tab bar",
   "section": "navigation",
   "sectionName": "Navigation",
   "description": "Three to five main sections pinned to the bottom of a phone screen, within easy reach of the thumb.",
   "goodFor": "3 to 5 top-level sections on mobile",
   "watchOut": "More than five items or rarely used pages",
   "seenIn": "Instagram, YouTube, WhatsApp, most iOS apps",
   "prompt": "Build this navigation pattern for my app: Bottom tab bar.\n\nWhat it is: Three to five main sections pinned to the bottom of a phone screen, within easy reach of the thumb.\nGood for: 3 to 5 top-level sections on mobile.\nWatch out: More than five items or rarely used pages.\nSeen in: Instagram, YouTube, WhatsApp, most iOS apps\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-tabbar center\">\n    <div class=\"phone\" data-tabs=\"\">\n      <div class=\"scr\" data-panel=\"home\"><h5 role=\"none\">Home</h5><div style=\"height:90px;border-radius:8px;background:linear-gradient(135deg,#f58529,#dd2a7b,#8134af)\"></div><div class=\"ln\" style=\"width:70%\"></div></div>\n      <div class=\"scr\" data-panel=\"search\" hidden=\"\"><h5 role=\"none\">Search</h5><div style=\"border:1px solid #ddd;border-radius:8px;padding:6px;color:#999\">Search</div><div style=\"display:grid;grid-template-columns:1fr 1fr 1fr;gap:3px\"><div style=\"aspect-ratio:1;background:#fbcfe8\"></div><div style=\"aspect-ratio:1;background:#bfdbfe\"></div><div style=\"aspect-ratio:1;background:#bbf7d0\"></div><div style=\"aspect-ratio:1;background:#fde68a\"></div><div style=\"aspect-ratio:1;background:#ddd6fe\"></div><div style=\"aspect-ratio:1;background:#fecaca\"></div></div></div>\n      <div class=\"scr\" data-panel=\"add\" hidden=\"\"><h5 role=\"none\">New post</h5><div style=\"height:110px;border:2px dashed #ccc;border-radius:8px;display:grid;place-items:center;color:#999\">Add photo</div></div>\n      <div class=\"scr\" data-panel=\"likes\" hidden=\"\"><h5 role=\"none\">Activity</h5><span>Priya liked your photo</span><span>Arjun followed you</span></div>\n      <div class=\"scr\" data-panel=\"me\" hidden=\"\"><h5 role=\"none\">Profile</h5><div style=\"width:50px;height:50px;border-radius:50%;background:#ddd\"></div><span>128 posts · 2.4k followers</span></div>\n      <div class=\"tb\">\n        <button class=\"on\" data-tab=\"home\"><span>⌂</span>Home</button><button data-tab=\"search\"><span>⌕</span>Search</button><button data-tab=\"add\"><span>＋</span>Post</button><button data-tab=\"likes\"><span>♡</span>Activity</button><button data-tab=\"me\"><span>◯</span>Profile</button>\n      </div>\n    </div>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-tabbar, .s-tabbar *, .s-tabbar *::before, .s-tabbar *::after { box-sizing: border-box; }\n.s-tabbar { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-tabbar button { font: inherit; cursor: pointer; }\n[hidden] { display: none !important; }\n.center { display: grid; place-items: center; }\n.phone { width: 172px; height: 262px; border-radius: 26px; border: 6px solid #1b1d22; background: #fff; position: relative; overflow: hidden; color: #1b1d22; font-size: 11px; }\n.ln { height: 6px; border-radius: 3px; background: #d6dbe4; }\n.s-tabbar { background: #e9ecf1; }\n.s-tabbar .scr { padding: 10px; display: grid; gap: 8px; }\n.s-tabbar .scr h5 { margin: 0; font: 700 15px var(--display); }\n.s-tabbar .tb { position: absolute; bottom: 0; left: 0; right: 0; display: flex; border-top: 1px solid #e5e7eb; background: #fff; padding: 5px 0 7px; }\n.s-tabbar .tb button { flex: 1; min-width: 0; padding: 0 1px; border: 0; background: none; display: grid; justify-items: center; gap: 1px; font-size: 9px; color: #9aa0aa; }\n.s-tabbar .tb button span { font-size: 16px; line-height: 1; }\n.s-tabbar .tb button.on { color: #e1306c; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // generic tabs\n  $$('[data-tabs]').forEach(g=>{\n    const tabs=$$('[data-tab]',g);\n    tabs.forEach(b=>b.addEventListener('click',()=>{\n      tabs.forEach(x=>x.classList.toggle('on',x===b));\n      $$('[data-panel]',g).forEach(p=>p.hidden=p.dataset.panel!==b.dataset.tab);\n    }));\n  });\n})();"
   }
  },
  {
   "id": "sidebar",
   "title": "Sidebar / drawer",
   "section": "navigation",
   "sectionName": "Navigation",
   "description": "A vertical panel on the left listing sections or channels. Good when there are many destinations and a wide screen.",
   "goodFor": "Apps with many sections or channels",
   "watchOut": "Simple sites with only a few pages",
   "seenIn": "Slack, Discord, Notion, Gmail desktop",
   "prompt": "Build this navigation pattern for my app: Sidebar / drawer.\n\nWhat it is: A vertical panel on the left listing sections or channels. Good when there are many destinations and a wide screen.\nGood for: Apps with many sections or channels.\nWatch out: Simple sites with only a few pages.\nSeen in: Slack, Discord, Notion, Gmail desktop\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-side\">\n    <div class=\"sb\"><b>Acme team ▾</b><span>Threads</span><span>Mentions</span><small>Channels</small><span># general</span><span class=\"on\"># design</span><span># launch</span><small>Direct</small><span>Kavya</span><span>Dev</span></div>\n    <div class=\"mn\"><b># design</b>\n      <div class=\"msg\"><i style=\"background:#f59e0b\"></i><div><b>Kavya</b> <span style=\"color:#999;font-size:10px\">10:42</span><br>New icons are in Figma</div></div>\n      <div class=\"msg\"><i style=\"background:#10b981\"></i><div><b>Dev</b> <span style=\"color:#999;font-size:10px\">10:45</span><br>Looks great, shipping today</div></div>\n    </div>\n  </div>\n",
    "css": "/* base styles the site gives every demo (scoped to this demo) */\n.s-side, .s-side *, .s-side *::before, .s-side *::after { box-sizing: border-box; }\n.s-side { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-side button { font: inherit; cursor: pointer; }\n.s-side { display: grid; grid-template-columns: 130px 1fr; font-size: 12px; }\n.s-side .sb { background: #3f0e40; color: #d7c6d8; padding: 12px 10px; display: grid; align-content: start; gap: 3px; }\n.s-side .sb b { color: #fff; font-size: 13px; margin-bottom: 8px; }\n.s-side .sb small { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; opacity: .7; margin-top: 8px; }\n.s-side .sb span { padding: 3px 6px; border-radius: 4px; }\n.s-side .sb span.on { background: #1164a3; color: #fff; }\n.s-side .mn { background: #fff; color: #1d1c1d; padding: 12px; display: grid; align-content: start; gap: 12px; min-width: 0; }\n.s-side .msg { display: flex; gap: 8px; }\n.s-side .msg i { width: 26px; height: 26px; border-radius: 5px; flex: none; }",
    "js": ""
   }
  },
  {
   "id": "cmdk",
   "title": "Command palette",
   "section": "navigation",
   "sectionName": "Navigation",
   "description": "A search box that runs any action by typing. Fast for power users.",
   "goodFor": "Power users and apps with many actions",
   "watchOut": "Being the only way to reach a feature",
   "seenIn": "Linear, Notion, VS Code, Raycast, GitHub",
   "prompt": "Build this navigation pattern for my app: Command palette.\n\nWhat it is: A search box that runs any action by typing. Fast for power users.\nGood for: Power users and apps with many actions.\nWatch out: Being the only way to reach a feature.\nSeen in: Linear, Notion, VS Code, Raycast, GitHub\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-cmd\">\n    <div class=\"bgui\"><div class=\"ln\"></div><div class=\"ln\" style=\"width:70%\"></div><div class=\"ln\" style=\"width:85%\"></div><div class=\"ln\" style=\"width:50%\"></div></div>\n    <div class=\"pal\">\n      <input id=\"cmd-input\" placeholder=\"Type a command or search…\" aria-label=\"Command search\" autocomplete=\"off\">\n      <ul id=\"cmd-list\" tabindex=\"0\" aria-label=\"Commands\"></ul>\n    </div>\n  </div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-cmd, .s-cmd *, .s-cmd *::before, .s-cmd *::after { box-sizing: border-box; }\n.s-cmd { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-cmd button { font: inherit; cursor: pointer; }\n.ln { height: 6px; border-radius: 3px; background: #d6dbe4; }\n.s-cmd { background: #1f2430; display: grid; place-items: center; padding: 14px; }\n.s-cmd .bgui { position: absolute; inset: 0; padding: 14px; display: grid; gap: 8px; align-content: start; opacity: .35; }\n.s-cmd .bgui .ln { background: #4a5266; }\n.s-cmd .pal { position: relative; width: min(100%,330px); background: #fff; border-radius: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.5); overflow: hidden; color: #1b1d22; font-size: 13px; }\n.s-cmd input { width: 100%; border: 0; border-bottom: 1px solid #eee; padding: 12px 14px; font: inherit; outline: none; }\n.s-cmd ul { list-style: none; margin: 0; padding: 6px; max-height: 170px; overflow: auto; }\n.s-cmd li { display: flex; justify-content: space-between; padding: 7px 8px; border-radius: 6px; }\n.s-cmd li.on { background: #eef1ff; }\n.s-cmd kbd { font: 11px var(--mono); color: #777; background: #f2f3f5; border-radius: 4px; padding: 1px 5px; }\n.s-cmd .empty { padding: 10px 14px; color: #888; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // command palette\n  const cmds=[['Create issue','C'],['Go to inbox','G I'],['Search projects','/'],['Assign to me','I'],['Change theme','⌘ T'],['Invite teammates',''],['Open settings','⌘ ,'],['Log out','']];\n  const ci=$('#cmd-input'),cl=$('#cmd-list');\n  function renderCmd(){\n    const q=ci.value.trim().toLowerCase();const f=cmds.filter(c=>c[0].toLowerCase().includes(q));\n    cl.innerHTML=f.length?f.map((c,i)=>`<li class=\"${i===0?'on':''}\"><span>${c[0]}</span>${c[1]?`<kbd>${c[1]}</kbd>`:''}</li>`).join(''):'<li class=\"empty\">No commands match</li>';\n  }\n  ci.addEventListener('input',renderCmd);renderCmd();\n})();"
   }
  },
  {
   "id": "crumbs",
   "title": "Breadcrumbs",
   "section": "navigation",
   "sectionName": "Navigation",
   "description": "A trail that shows where you are in a hierarchy and lets you jump back up a level. Two styles shown: slash and chevron.",
   "goodFor": "Deep hierarchies: shops, docs, file systems",
   "watchOut": "Flat sites with one or two levels",
   "seenIn": "Amazon, Flipkart, file managers, documentation",
   "prompt": "Build this navigation pattern for my app: Breadcrumbs.\n\nWhat it is: A trail that shows where you are in a hierarchy and lets you jump back up a level. Two styles shown: slash and chevron.\nGood for: Deep hierarchies: shops, docs, file systems.\nWatch out: Flat sites with one or two levels.\nSeen in: Amazon, Flipkart, file managers, documentation\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-crumb\">\n    <nav aria-label=\"Breadcrumb\"><a href=\"#crumbs\">Home</a>/<a href=\"#crumbs\">Electronics</a>/<a href=\"#crumbs\">Laptops</a>/<span>ThinkPad X1 Carbon</span></nav>\n    <h5 role=\"none\">ThinkPad X1 Carbon</h5>\n    <div class=\"chev\"><span>Account</span><span>Settings</span><span class=\"on\">Privacy</span></div>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-crumb, .s-crumb *, .s-crumb *::before, .s-crumb *::after { box-sizing: border-box; }\n.s-crumb { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-crumb button { font: inherit; cursor: pointer; }\n.s-crumb { background: #fff; color: #1f2430; padding: 22px; display: grid; gap: 22px; align-content: center; font-size: 13px; }\n.s-crumb nav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: #666; }\n.s-crumb nav a { color: #3557e0; text-decoration: none; }\n.s-crumb nav a:hover { text-decoration: underline; }\n.s-crumb .chev { display: flex; flex-wrap: wrap; }\n.s-crumb .chev span { background: #e8ecf4; padding: 6px 14px 6px 18px; clip-path: polygon(0 0,calc(100% - 10px) 0,100% 50%,calc(100% - 10px) 100%,0 100%,10px 50%); margin-right: -6px; font-size: 12px; }\n.s-crumb .chev span:first-child { clip-path: polygon(0 0,calc(100% - 10px) 0,100% 50%,calc(100% - 10px) 100%,0 100%); padding-left: 12px; }\n.s-crumb .chev span.on { background: #3557e0; color: #fff; }\n.s-crumb h5 { margin: 0; font: 700 20px var(--display); }",
    "js": ""
   }
  },
  {
   "id": "stepper",
   "title": "Stepper / wizard",
   "section": "navigation",
   "sectionName": "Navigation",
   "description": "Breaks a long task into ordered steps and shows progress.",
   "goodFor": "Long tasks split into steps: checkout, sign-up",
   "watchOut": "Short forms that fit on one screen",
   "seenIn": "checkout flows, account sign-up, insurance and loan forms",
   "prompt": "Build this navigation pattern for my app: Stepper / wizard.\n\nWhat it is: Breaks a long task into ordered steps and shows progress.\nGood for: Long tasks split into steps: checkout, sign-up.\nWatch out: Short forms that fit on one screen.\nSeen in: checkout flows, account sign-up, insurance and loan forms\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-step\" id=\"stp\">\n    <ol><li><i>1</i>Cart</li><li><i>2</i>Address</li><li><i>3</i>Payment</li><li><i>4</i>Done</li></ol>\n    <div class=\"pane\" id=\"stp-pane\"></div>\n    <div class=\"acts\"><button id=\"stp-back\">Back</button><button class=\"pri\" id=\"stp-next\">Next</button></div>\n  </div>\n",
    "css": "/* base styles the site gives every demo (scoped to this demo) */\n.s-step, .s-step *, .s-step *::before, .s-step *::after { box-sizing: border-box; }\n.s-step { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-step button { font: inherit; cursor: pointer; }\n.s-step { background: #fff; color: #1f2430; padding: 22px 18px; display: grid; gap: 22px; align-content: center; font-size: 12px; }\n.s-step ol { list-style: none; margin: 0; padding: 0; display: flex; justify-content: space-between; position: relative; }\n.s-step ol::before { content: \"\"; position: absolute; top: 13px; left: 12%; right: 12%; height: 2px; background: #e3e6ec; }\n.s-step li { position: relative; display: grid; justify-items: center; gap: 5px; flex: 1; color: #888; }\n.s-step li i { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 2px solid #d0d5de; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 12px; }\n.s-step li.done i { background: #16a34a; border-color: #16a34a; color: #fff; }\n.s-step li.cur { color: #1f2430; font-weight: 600; }\n.s-step li.cur i { border-color: #3557e0; color: #3557e0; }\n.s-step .pane { border: 1px solid #e3e6ec; border-radius: 8px; padding: 12px; min-height: 56px; }\n.s-step .acts { display: flex; justify-content: space-between; }\n.s-step .acts button { border: 1px solid #cfd5de; background: #fff; border-radius: 6px; padding: 6px 14px; }\n.s-step .acts button.pri { background: #3557e0; border-color: #3557e0; color: #fff; }\n.s-step .acts button:disabled { opacity: .4; cursor: default; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // stepper\n  const sp=['Cart: 2 items · ₹1,840','Deliver to: 14 MG Road, Pune 411001','Pay with: UPI · name@okbank','Order placed. Arriving Thursday.'];\n  let si=1;const sli=$$('#stp li'),pane=$('#stp-pane'),bk=$('#stp-back'),nx=$('#stp-next');\n  function rs(){sli.forEach((l,i)=>{l.className=i<si?'done':i===si?'cur':'';l.querySelector('i').textContent=i<si?'✓':i+1});pane.textContent=sp[si];bk.disabled=si===0;nx.textContent=si===3?'Start over':si===2?'Place order':'Next'}\n  nx.addEventListener('click',()=>{si=si===3?0:si+1;rs()});bk.addEventListener('click',()=>{if(si>0){si--;rs()}});rs();\n})();"
   }
  },
  {
   "id": "tabs",
   "title": "Tabs & segmented control",
   "section": "navigation",
   "sectionName": "Navigation",
   "description": "Switch between views of the same thing without leaving the page.",
   "goodFor": "Switching views of the same item",
   "watchOut": "Steps in a sequence; use a stepper",
   "seenIn": "product pages, browser tabs, iOS Settings, fitness apps",
   "prompt": "Build this navigation pattern for my app: Tabs & segmented control.\n\nWhat it is: Switch between views of the same thing without leaving the page.\nGood for: Switching views of the same item.\nWatch out: Steps in a sequence; use a stepper.\nSeen in: product pages, browser tabs, iOS Settings, fitness apps\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-tabs\">\n    <span class=\"lbl\">Underline tabs</span>\n    <div data-tabs=\"\">\n      <div class=\"ul\"><button class=\"on\" data-tab=\"o\">Overview</button><button data-tab=\"s\">Specs</button><button data-tab=\"r\">Reviews (214)</button></div>\n      <p data-panel=\"o\" style=\"margin:10px 0 0\">Noise-cancelling headphones with 40 hours of battery.</p>\n      <p data-panel=\"s\" hidden=\"\" style=\"margin:10px 0 0\">Bluetooth 5.3 · 250 g · USB‑C fast charge</p>\n      <p data-panel=\"r\" hidden=\"\" style=\"margin:10px 0 0\">★★★★½ \"Best I've owned for the price.\"</p>\n    </div>\n    <span class=\"lbl\">Segmented control</span>\n    <div data-tabs=\"\" style=\"display:grid;gap:8px\">\n      <div class=\"seg\"><button data-tab=\"d\">Day</button><button class=\"on\" data-tab=\"w\">Week</button><button data-tab=\"m\">Month</button></div>\n      <span data-panel=\"d\" hidden=\"\">6,240 steps today</span><span data-panel=\"w\">41,880 steps this week</span><span data-panel=\"m\" hidden=\"\">182,400 steps this month</span>\n    </div>\n  </div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-tabs, .s-tabs *, .s-tabs *::before, .s-tabs *::after { box-sizing: border-box; }\n.s-tabs { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-tabs button { font: inherit; cursor: pointer; }\n[hidden] { display: none !important; }\n.s-tabs { background: #fff; color: #1f2430; padding: 18px; display: grid; gap: 18px; align-content: start; font-size: 13px; }\n.s-tabs .ul { display: flex; gap: 18px; border-bottom: 1px solid #e3e6ec; }\n.s-tabs .ul button { border: 0; background: none; padding: 8px 0; color: #777; border-bottom: 2px solid transparent; margin-bottom: -1px; }\n.s-tabs .ul button.on { color: #3557e0; border-color: #3557e0; font-weight: 600; }\n.s-tabs .seg { display: inline-flex; background: #eef0f4; border-radius: 9px; padding: 3px; gap: 2px; justify-self: start; }\n.s-tabs .seg button { border: 0; background: none; padding: 5px 14px; border-radius: 7px; font-size: 12px; color: #555; }\n.s-tabs .seg button.on { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15); color: #111; font-weight: 600; }\n.s-tabs .lbl { font: 10px var(--mono); color: #999; text-transform: uppercase; letter-spacing: .08em; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // generic tabs\n  $$('[data-tabs]').forEach(g=>{\n    const tabs=$$('[data-tab]',g);\n    tabs.forEach(b=>b.addEventListener('click',()=>{\n      tabs.forEach(x=>x.classList.toggle('on',x===b));\n      $$('[data-panel]',g).forEach(p=>p.hidden=p.dataset.panel!==b.dataset.tab);\n    }));\n  });\n})();"
   }
  },
  {
   "id": "dropdown",
   "title": "Dropdown menu",
   "section": "navigation",
   "sectionName": "Navigation",
   "description": "A button that opens a short list of actions or links, then closes.",
   "goodFor": "Account menus and short action lists",
   "watchOut": "Main navigation with only a few items",
   "seenIn": "account menus on GitHub, Google and most web apps",
   "prompt": "Build this navigation pattern for my app: Dropdown menu.\n\nWhat it is: A button that opens a short list of actions or links, then closes.\nGood for: Account menus and short action lists.\nWatch out: Main navigation with only a few items.\nSeen in: account menus on GitHub, Google and most web apps\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-dd\">\n    <div class=\"nv\"><b>Brewly</b><span>Shop</span><span>Learn</span>\n      <div class=\"acct\"><button class=\"ab\" id=\"dd-btn\" aria-expanded=\"true\" aria-haspopup=\"menu\">Neha ▾</button>\n        <div class=\"menu\" id=\"dd-menu\" role=\"menu\"><span class=\"who\"><b>Neha Kulkarni</b><small>neha@example.com</small></span><button role=\"menuitem\">Profile</button><button role=\"menuitem\">Orders</button><button role=\"menuitem\">Subscriptions</button><hr><button role=\"menuitem\" class=\"out\">Sign out</button></div>\n      </div>\n    </div>\n    <div class=\"wfb\"><div class=\"ln\"></div><div class=\"ln\" style=\"width:70%\"></div><div class=\"ln\" style=\"width:85%\"></div></div>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-dd, .s-dd *, .s-dd *::before, .s-dd *::after { box-sizing: border-box; }\n.s-dd { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-dd button { font: inherit; cursor: pointer; }\n.ln { height: 6px; border-radius: 3px; background: #d6dbe4; }\n.s-dd { background: #f3f4f7; color: #1f2430; font-size: 12px; }\n.s-dd .nv { background: #fff; display: flex; gap: 16px; align-items: center; padding: 10px 14px; border-bottom: 1px solid #e5e7eb; }\n.s-dd .nv b { font-family: var(--display); font-size: 14px; }\n.s-dd .acct { margin-left: auto; position: relative; }\n.s-dd .ab { border: 1px solid #d6dae1; background: #fff; border-radius: 999px; padding: 5px 12px; font-size: 12px; }\n.s-dd .menu { position: absolute; right: 0; top: calc(100% + 6px); width: 190px; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; box-shadow: 0 14px 30px rgba(0,0,0,.12); padding: 6px; display: grid; z-index: 2; }\n.s-dd .who { display: grid; padding: 6px 8px 8px; border-bottom: 1px solid #eee; margin-bottom: 4px; }\n.s-dd .who small { color: #888; }\n.s-dd .menu button { border: 0; background: none; text-align: left; padding: 7px 8px; border-radius: 6px; font-size: 12px; color: #1f2430; }\n.s-dd .menu button:hover { background: #f1f3f8; }\n.s-dd hr { border: 0; border-top: 1px solid #eee; margin: 4px 0; width: 100%; }\n.s-dd .menu .out { color: #dc2626; }\n.s-dd .wfb { padding: 14px; display: grid; gap: 8px; width: 50%; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  const on = (sel, ev, fn) => { const el = $(sel); if (el) el.addEventListener(ev, fn); return el; };\n\n  /* ---------- Navigation ---------- */\n  on('#dd-btn', 'click', e => { const m = $('#dd-menu'); m.hidden = !m.hidden; e.currentTarget.setAttribute('aria-expanded', !m.hidden); });\n})();"
   }
  },
  {
   "id": "fatfooter",
   "title": "Fat footer",
   "section": "navigation",
   "sectionName": "Navigation",
   "description": "A large footer with grouped links, a newsletter box and legal info. It acts as a sitemap for people who reach the bottom.",
   "goodFor": "Large sites: sitemap, help, legal, newsletter",
   "watchOut": "Apps where nobody reaches the footer",
   "seenIn": "Apple, Amazon, large retail and news sites",
   "prompt": "Build this navigation pattern for my app: Fat footer.\n\nWhat it is: A large footer with grouped links, a newsletter box and legal info. It acts as a sitemap for people who reach the bottom.\nGood for: Large sites: sitemap, help, legal, newsletter.\nWatch out: Apps where nobody reaches the footer.\nSeen in: Apple, Amazon, large retail and news sites\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-ff\">\n    <div class=\"cols5\">\n      <div class=\"brand\"><b>Brewly</b><p>Fresh coffee, roasted in Pune every Monday.</p><form onsubmit=\"event.preventDefault()\"><input id=\"ff-mail\" placeholder=\"Email for offers\" aria-label=\"Email for offers\"><button>Join</button></form></div>\n      <div><h5 role=\"none\">Shop</h5><span>Beans</span><span>Gear</span><span>Gift cards</span><span>Subscriptions</span></div>\n      <div><h5 role=\"none\">Learn</h5><span>Brew guides</span><span>Origins</span><span>Blog</span></div>\n      <div><h5 role=\"none\">Help</h5><span>Shipping</span><span>Returns</span><span>Contact</span></div>\n    </div>\n    <div class=\"legal\"><span>© 2026 Brewly</span><span>Privacy · Terms · Cookies</span></div>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-ff, .s-ff *, .s-ff *::before, .s-ff *::after { box-sizing: border-box; }\n.s-ff { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-ff button { font: inherit; cursor: pointer; }\n.s-ff { background: #111827; color: #9ca3af; padding: 16px; display: grid; grid-template-rows: 1fr auto; gap: 12px; font-size: 11px; container-type: inline-size; }\n.s-ff .cols5 { display: grid; grid-template-columns: 1.6fr repeat(3,1fr); gap: 12px; }\n.s-ff .cols5 > div { display: grid; grid-template-columns: minmax(0,1fr); align-content: start; gap: 5px; min-width: 0; }\n@container (max-width:520px) {\n  .s-ff .cols5 { grid-template-columns: repeat(3,minmax(0,1fr)); }\n  .s-ff .brand { grid-column: 1/-1; }\n}\n.s-ff .brand b { color: #fff; font: 700 15px var(--display); }\n.s-ff p { margin: 0 0 4px; }\n.s-ff form { display: flex; gap: 4px; }\n.s-ff input { flex: 1; min-width: 0; background: #1f2937; border: 1px solid #374151; border-radius: 5px; color: #fff; padding: 5px 7px; font-size: 11px; }\n.s-ff form button { border: 0; background: #fbbf24; color: #111; border-radius: 5px; padding: 0 8px; font-weight: 700; font-size: 11px; }\n.s-ff h5 { margin: 0 0 3px; color: #fff; font-size: 11px; }\n.s-ff .legal { border-top: 1px solid #1f2937; padding-top: 8px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px; }",
    "js": ""
   }
  },
  {
   "id": "navrail",
   "title": "Navigation rail",
   "section": "navigation",
   "sectionName": "Navigation",
   "description": "A slim vertical bar of icons with labels, made for tablets and desktop. The selected item gets a pill.",
   "goodFor": "Tablets and desktop apps with 3 to 7 destinations",
   "watchOut": "Phones; use a bottom tab bar",
   "seenIn": "Gmail on tablets, Google Drive, Android tablet apps",
   "prompt": "Build this navigation pattern for my app: Navigation rail.\n\nWhat it is: A slim vertical bar of icons with labels, made for tablets and desktop. The selected item gets a pill.\nGood for: Tablets and desktop apps with 3 to 7 destinations.\nWatch out: Phones; use a bottom tab bar.\nSeen in: Gmail on tablets, Google Drive, Android tablet apps\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-rail\" data-tabs=\"\">\n    <div class=\"rl\"><button class=\"fb\" aria-label=\"Compose\">✎</button><button class=\"on\" data-tab=\"m\"><i>✉</i>Mail</button><button data-tab=\"c\"><i>☷</i>Chat</button><button data-tab=\"s\"><i>◫</i>Spaces</button><button data-tab=\"v\"><i>◉</i>Meet</button></div>\n    <div class=\"pn\">\n      <div data-panel=\"m\"><h5 role=\"none\">Inbox</h5><div class=\"it3\"><b>Ravi Menon</b><span>Invoice for October</span></div><div class=\"it3\"><b>Design team</b><span>Crit notes from Thursday</span></div><div class=\"it3\"><b>Neha</b><span>Coffee on Friday?</span></div></div>\n      <div data-panel=\"c\" hidden=\"\"><h5 role=\"none\">Chat</h5><div class=\"it3\"><b>Arjun</b><span>Pushed the fix 👍</span></div><div class=\"it3\"><b>Zoya</b><span>Can you review my PR?</span></div></div>\n      <div data-panel=\"s\" hidden=\"\"><h5 role=\"none\">Spaces</h5><div class=\"it3\"><b># launch</b><span>12 new messages</span></div><div class=\"it3\"><b># research</b><span>3 new messages</span></div></div>\n      <div data-panel=\"v\" hidden=\"\"><h5 role=\"none\">Meet</h5><div class=\"it3\"><b>Start a meeting</b><span>Get a link to share</span></div><div class=\"it3\"><b>Join with a code</b><span>abc-defg-hij</span></div></div>\n    </div>\n  </div>\n",
    "css": "/* base styles the site gives every demo (scoped to this demo) */\n.s-rail, .s-rail *, .s-rail *::before, .s-rail *::after { box-sizing: border-box; }\n.s-rail { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-rail button { font: inherit; cursor: pointer; }\n[hidden] { display: none !important; }\n.s-rail { background: #fef7ff; color: #1d1b20; display: grid; grid-template-columns: 76px 1fr; font: 11px Roboto,system-ui,sans-serif; }\n.s-rail .rl { display: grid; align-content: start; justify-items: center; gap: 6px; padding: 8px 0; border-right: 1px solid #ece6f0; }\n.s-rail .fb { width: 44px; height: 44px; border-radius: 14px; border: 0; background: #ffd8e4; font-size: 18px; margin-bottom: 4px; color: #31111d; }\n.s-rail .rl button[data-tab] { border: 0; background: none; display: grid; justify-items: center; gap: 3px; font-size: 11px; color: #49454f; }\n.s-rail .rl button i { font-style: normal; width: 52px; height: 30px; border-radius: 15px; display: grid; place-items: center; font-size: 15px; }\n.s-rail .rl button.on i { background: #e8def8; color: #1d192b; }\n.s-rail .rl button.on { font-weight: 700; color: #1d1b20; }\n.s-rail .pn { padding: 14px; min-width: 0; }\n.s-rail .pn > div { display: grid; gap: 8px; }\n.s-rail h5 { margin: 0; font-size: 18px; font-weight: 500; }\n.s-rail .it3 { background: #fff; border-radius: 12px; padding: 8px 10px; display: grid; gap: 2px; }\n.s-rail .it3 span { color: #666; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // generic tabs\n  $$('[data-tabs]').forEach(g=>{\n    const tabs=$$('[data-tab]',g);\n    tabs.forEach(b=>b.addEventListener('click',()=>{\n      tabs.forEach(x=>x.classList.toggle('on',x===b));\n      $$('[data-panel]',g).forEach(p=>p.hidden=p.dataset.panel!==b.dataset.tab);\n    }));\n  });\n})();"
   }
  },
  {
   "id": "dock",
   "title": "Dock",
   "section": "navigation",
   "sectionName": "Navigation",
   "description": "A row of app icons that grow under the pointer, with dots under running apps.",
   "goodFor": "Launching favorite apps or tools",
   "watchOut": "Deep navigation with many levels",
   "seenIn": "macOS Dock, iPadOS dock, Windows taskbar",
   "prompt": "Build this navigation pattern for my app: Dock.\n\nWhat it is: A row of app icons that grow under the pointer, with dots under running apps.\nGood for: Launching favorite apps or tools.\nWatch out: Deep navigation with many levels.\nSeen in: macOS Dock, iPadOS dock, Windows taskbar\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-dock\">\n    <div class=\"mb\"><b>Files</b><span>File</span><span>Edit</span><span>View</span></div>\n    <div class=\"dk\"><i class=\"run\" data-n=\"Home\" style=\"background:linear-gradient(#5ac8fa,#007aff)\">⌂</i><i class=\"run\" data-n=\"Mail\" style=\"background:linear-gradient(#64d2ff,#0a84ff)\">✉</i><i data-n=\"Music\" style=\"background:linear-gradient(#ff6b8b,#ff2d55)\">♫</i><i class=\"run\" data-n=\"Photos\" style=\"background:linear-gradient(#ffd60a,#ff9f0a)\">✿</i><i data-n=\"Notes\" style=\"background:linear-gradient(#ffe082,#ffc107)\">✎</i><i data-n=\"Settings\" style=\"background:linear-gradient(#a1a1aa,#52525b)\">⚙</i></div>\n  </div>\n",
    "css": "/* base styles the site gives every demo (scoped to this demo) */\n.s-dock, .s-dock *, .s-dock *::before, .s-dock *::after { box-sizing: border-box; }\n.s-dock { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-dock button { font: inherit; cursor: pointer; }\n.s-dock { background: linear-gradient(160deg,#ee9ca7,#6a82fb 60%,#1c2551); color: #fff; display: grid; align-content: end; justify-items: center; padding-bottom: 14px; }\n.s-dock .mb { position: absolute; top: 0; left: 0; right: 0; padding: 4px 12px; background: rgba(255,255,255,.25); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 11px; display: flex; gap: 14px; }\n.s-dock .dk { display: flex; align-items: flex-end; gap: 6px; padding: 6px 8px; border-radius: 18px; background: rgba(255,255,255,.22); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.35); height: 58px; }\n.s-dock .dk i { font-style: normal; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; color: #fff; transform-origin: 50% 100%; transition: transform .15s; box-shadow: 0 2px 6px rgba(0,0,0,.2); cursor: pointer; position: relative; }\n.s-dock .dk i:hover { transform: scale(1.55); }\n.s-dock .dk i:hover + i,.s-dock .dk i:has(+ i:hover) { transform: scale(1.25); }\n.s-dock .dk i::after { content: attr(data-n); position: absolute; bottom: calc(100% + 6px); background: rgba(30,30,30,.85); font-size: 8px; padding: 2px 5px; border-radius: 4px; white-space: nowrap; opacity: 0; transition: opacity .15s; pointer-events: none; }\n.s-dock .dk i:hover::after { opacity: 1; }\n.s-dock .dk i.run::before { content: \"\"; position: absolute; bottom: -5px; width: 4px; height: 4px; border-radius: 50%; background: #fff; }\n@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {\n  .s-dock .mb { background: rgba(255,255,255,.6); }\n  .s-dock .dk { background: rgba(255,255,255,.5); }\n}",
    "js": ""
   }
  },
  {
   "id": "fab",
   "title": "Floating action button (speed dial)",
   "section": "navigation",
   "sectionName": "Navigation",
   "description": "One round button for the main action, floating above the content. It can expand into a few related actions.",
   "goodFor": "One primary action on a mobile screen",
   "watchOut": "Several equal actions, or covering content",
   "seenIn": "Gmail compose, Google Keep, Google Maps",
   "prompt": "Build this navigation pattern for my app: Floating action button (speed dial).\n\nWhat it is: One round button for the main action, floating above the content. It can expand into a few related actions.\nGood for: One primary action on a mobile screen.\nWatch out: Several equal actions, or covering content.\nSeen in: Gmail compose, Google Keep, Google Maps\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-fab center\">\n    <div class=\"phone open\" id=\"fabph\">\n      <div class=\"hd2\">Notes</div><div class=\"lst\"><div></div><div></div><div></div><div></div></div>\n      <span class=\"scrim\"></span>\n      <div class=\"sd\"><div class=\"act\"><span>Photo</span><button aria-label=\"Photo\">◉</button></div><div class=\"act\"><span>Checklist</span><button aria-label=\"Checklist\">☑</button></div><div class=\"act\"><span>Voice note</span><button aria-label=\"Voice note\">♪</button></div><button class=\"main\" aria-expanded=\"true\" aria-label=\"Create\">+</button></div>\n    </div>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-fab, .s-fab *, .s-fab *::before, .s-fab *::after { box-sizing: border-box; }\n.s-fab { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-fab button { font: inherit; cursor: pointer; }\n.center { display: grid; place-items: center; }\n.phone { width: 172px; height: 262px; border-radius: 26px; border: 6px solid #1b1d22; background: #fff; position: relative; overflow: hidden; color: #1b1d22; font-size: 11px; }\n.s-fab { background: #e9ecf1; }\n.s-fab .hd2 { padding: 12px; font: 700 16px var(--display); }\n.s-fab .lst { padding: 0 12px; display: grid; gap: 8px; }\n.s-fab .lst div { background: #f3f4f7; border-radius: 8px; height: 34px; }\n.s-fab .scrim { position: absolute; inset: 0; background: rgba(255,255,255,.75); opacity: 0; pointer-events: none; transition: opacity .2s; }\n.s-fab .phone.open .scrim { opacity: 1; }\n.s-fab .sd { position: absolute; right: 12px; bottom: 12px; display: grid; justify-items: end; gap: 10px; z-index: 2; }\n.s-fab .act { display: flex; align-items: center; gap: 8px; opacity: 0; transform: translateY(10px); transition: .2s; pointer-events: none; }\n.s-fab .phone.open .act { opacity: 1; transform: none; pointer-events: auto; }\n.s-fab .act span { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); border-radius: 4px; padding: 2px 6px; font-size: 10px; }\n.s-fab .act button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); font-size: 14px; margin-right: 6px; color: #1f2430; }\n.s-fab .main { width: 48px; height: 48px; border-radius: 16px; border: 0; background: #3557e0; color: #fff; font-size: 26px; box-shadow: 0 4px 10px rgba(53,87,224,.4); transition: transform .2s; }\n.s-fab .phone.open .main { transform: rotate(45deg); }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  const on = (sel, ev, fn) => { const el = $(sel); if (el) el.addEventListener(ev, fn); return el; };\n\n  on('#fabph .main', 'click', e => { const o = $('#fabph').classList.toggle('open'); e.currentTarget.setAttribute('aria-expanded', o); });\n})();"
   }
  },
  {
   "id": "toc",
   "title": "Table of contents (scroll spy)",
   "section": "navigation",
   "sectionName": "Navigation",
   "description": "A list of the page's sections that highlights where you are as you scroll, and jumps to a section when clicked.",
   "goodFor": "Long docs and articles",
   "watchOut": "Short pages with two or three sections",
   "seenIn": "MDN, Stripe Docs, Wikipedia, long blog posts",
   "prompt": "Build this navigation pattern for my app: Table of contents (scroll spy).\n\nWhat it is: A list of the page's sections that highlights where you are as you scroll, and jumps to a section when clicked.\nGood for: Long docs and articles.\nWatch out: Short pages with two or three sections.\nSeen in: MDN, Stripe Docs, Wikipedia, long blog posts\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-toc\">\n    <nav class=\"tc\" id=\"toc-nav\" aria-label=\"On this page\"><b>On this page</b><button class=\"on\" data-t=\"toc1\">Install</button><button data-t=\"toc2\">Configure</button><button data-t=\"toc3\">Deploy</button><button data-t=\"toc4\">Troubleshoot</button></nav>\n    <div class=\"ct\" id=\"toc-ct\" tabindex=\"0\" role=\"region\" aria-label=\"Article\">\n      <h5 role=\"none\" id=\"toc1\">Install</h5><p>Run <code>npm install brewkit</code> in your project folder. Node 20 or later is required. The installer adds a <code>brewkit.config.js</code> file with sensible defaults, so most projects work straight away.</p>\n      <h5 role=\"none\" id=\"toc2\">Configure</h5><p>Open the config file and set your API key and region. Most teams only change the region and the output folder. Every option is listed in the reference, with its default value and an example.</p>\n      <h5 role=\"none\" id=\"toc3\">Deploy</h5><p>Run <code>brewkit deploy</code> to build and upload your site. The first deploy takes about a minute. Later deploys only upload files that changed, so they usually finish in a few seconds.</p>\n      <h5 role=\"none\" id=\"toc4\">Troubleshoot</h5><p>If a deploy fails, run <code>brewkit doctor</code>. It checks your Node version, API key and network, and prints the fix for each problem it finds.</p>\n    </div>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque, JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-toc, .s-toc *, .s-toc *::before, .s-toc *::after { box-sizing: border-box; }\n.s-toc { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-toc button { font: inherit; cursor: pointer; }\n.s-toc { display: grid; grid-template-columns: 118px 1fr; background: #fff; color: #1f2430; font-size: 12px; }\n.s-toc .tc { padding: 14px 10px; display: grid; align-content: start; gap: 2px; border-right: 1px solid #eef0f3; }\n.s-toc .tc b { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: #888; margin-bottom: 6px; }\n.s-toc .tc button { border: 0; background: none; text-align: left; padding: 4px 8px; border-left: 2px solid #e3e6ec; color: #666; font-size: 12px; }\n.s-toc .tc button.on { border-color: #3557e0; color: #3557e0; font-weight: 600; }\n.s-toc .ct { overflow-y: auto; padding: 14px 14px 160px; position: relative; min-width: 0; }\n.s-toc h5 { margin: 0 0 6px; font: 700 15px var(--display); }\n.s-toc .ct p { margin: 0 0 18px; color: #555; line-height: 1.55; }\n.s-toc code { font: 11px var(--mono); background: #f3f4f7; padding: 1px 4px; border-radius: 3px; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // table of contents + scroll spy\n  (() => { const ct = $('#toc-ct'); if (!ct) return; const bs = $$('#toc-nav button'); const hs = bs.map(b => document.getElementById(b.dataset.t));\n    bs.forEach((b, i) => b.addEventListener('click', () => ct.scrollTo({ top: hs[i].offsetTop - 14, behavior: 'smooth' })));\n    ct.addEventListener('scroll', () => { let k = 0; hs.forEach((h, i) => { if (h.offsetTop - 30 <= ct.scrollTop) k = i; }); bs.forEach((b, i) => b.classList.toggle('on', i === k)); }, { passive: true });\n  })();\n})();"
   }
  },
  {
   "id": "accordion",
   "title": "Accordion",
   "section": "navigation",
   "sectionName": "Navigation",
   "description": "Stacked headers that expand to show their content. Opening one closes the others here.",
   "goodFor": "FAQs and optional details",
   "watchOut": "Content most people need; it hides it",
   "seenIn": "FAQ pages, product specs, mobile settings",
   "prompt": "Build this navigation pattern for my app: Accordion.\n\nWhat it is: Stacked headers that expand to show their content. Opening one closes the others here.\nGood for: FAQs and optional details.\nWatch out: Content most people need; it hides it.\nSeen in: FAQ pages, product specs, mobile settings\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-acc\">\n    <h5 role=\"none\">Frequently asked questions</h5>\n    <details name=\"faq\" open=\"\"><summary>How long does delivery take?</summary><p>2 to 4 working days in metro cities and 5 to 7 days elsewhere.</p></details>\n    <details name=\"faq\"><summary>Can I return an opened product?</summary><p>Yes, within 30 days, as long as it isn't damaged.</p></details>\n    <details name=\"faq\"><summary>Do you ship outside India?</summary><p>Not yet. We'll email you when we do.</p></details>\n    <details name=\"faq\"><summary>How do I cancel my subscription?</summary><p>Go to Account › Subscriptions and choose Cancel. No calls needed.</p></details>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-acc, .s-acc *, .s-acc *::before, .s-acc *::after { box-sizing: border-box; }\n.s-acc { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-acc button { font: inherit; cursor: pointer; }\n.s-acc { background: #fff; color: #1f2430; padding: 16px 18px; display: grid; align-content: start; font-size: 13px; overflow: auto; }\n.s-acc h5 { margin: 0 0 8px; font: 700 15px var(--display); }\n.s-acc details { border-bottom: 1px solid #e9ebf0; }\n.s-acc summary { list-style: none; cursor: pointer; padding: 10px 0; display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }\n.s-acc summary::-webkit-details-marker { display: none; }\n.s-acc summary::after { content: \"+\"; font-size: 18px; line-height: 1; color: #3557e0; transition: transform .2s; }\n.s-acc details[open] summary::after { transform: rotate(45deg); }\n.s-acc details p { margin: 0 0 10px; color: #555; }",
    "js": ""
   }
  },
  {
   "id": "backtotop",
   "title": "Back-to-top button",
   "section": "navigation",
   "sectionName": "Navigation",
   "description": "A small button that appears after you scroll down and takes you back to the top.",
   "goodFor": "Very long pages and feeds",
   "watchOut": "Short pages, where it only adds clutter",
   "seenIn": "long blogs, shopping listings, news sites",
   "prompt": "Build this navigation pattern for my app: Back-to-top button.\n\nWhat it is: A small button that appears after you scroll down and takes you back to the top.\nGood for: Very long pages and feeds.\nWatch out: Short pages, where it only adds clutter.\nSeen in: long blogs, shopping listings, news sites\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-btt\">\n    <div class=\"scr\" id=\"btt-s\" tabindex=\"0\" role=\"region\" aria-label=\"Product list\"><h5 role=\"none\">All products</h5><div class=\"gr\" id=\"btt-l\"></div></div>\n    <button class=\"up\" id=\"btt\" hidden=\"\" aria-label=\"Back to top\">↑</button><span class=\"hint\">scroll down ↓</span>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque, JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-btt, .s-btt *, .s-btt *::before, .s-btt *::after { box-sizing: border-box; }\n.s-btt { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-btt button { font: inherit; cursor: pointer; }\n[hidden] { display: none !important; }\n.s-btt { background: #fff; color: #1f2430; font-size: 12px; }\n.s-btt .scr { position: absolute; inset: 0; overflow-y: auto; padding: 14px; }\n.s-btt h5 { margin: 0 0 10px; font: 700 15px var(--display); }\n.s-btt .gr { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }\n.s-btt .gr div { aspect-ratio: 1; border-radius: 8px; display: flex; align-items: flex-end; padding: 5px; font-size: 10px; color: #fff; font-weight: 600; max-width: 100%; }\n.s-btt .up { position: absolute; right: 14px; bottom: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #111827; color: #fff; font-size: 16px; box-shadow: 0 4px 10px rgba(0,0,0,.3); }\n.s-btt .hint { position: absolute; right: 12px; bottom: 10px; font: 10px var(--mono); color: #555; background: #fff; padding: 3px 7px; border-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.15); }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // back to top\n  (() => { const s = $('#btt-s'), l = $('#btt-l'), b = $('#btt'), h = $('.s-btt .hint'); if (!s) return;\n    const n = ['Kurta', 'Sneakers', 'Tote', 'Watch', 'Scarf', 'Jeans', 'Shirt', 'Cap', 'Wallet', 'Sandals', 'Jacket', 'Saree', 'Belt', 'Mug', 'Lamp', 'Rug', 'Vase', 'Pillow', 'Bottle', 'Backpack', 'Hoodie', 'Socks', 'Earrings', 'Planter'];\n    l.innerHTML = n.map((x, i) => `<div style=\"background:hsl(${i * 37 % 360} 50% 45%)\">${x}</div>`).join('');\n    s.addEventListener('scroll', () => { b.hidden = s.scrollTop < 120; h.hidden = s.scrollTop >= 120; }, { passive: true });\n    b.addEventListener('click', () => s.scrollTo({ top: 0, behavior: 'smooth' }));\n  })();\n})();"
   }
  },
  {
   "id": "backbutton",
   "title": "Back button closes overlays",
   "section": "navigation",
   "sectionName": "Navigation",
   "description": "People expect Back to undo what looks like a new page: a photo opened full screen, a filter, a step. Add a history entry for those views, so Back closes the photo instead of leaving the whole page and losing their place.",
   "goodFor": "Photo viewers, filters, multi-step flows, single-page apps",
   "watchOut": "Adding history for tiny toggles; Back then feels stuck",
   "basedOn": "Baymard on Back button expectations (2020): 59% of e-commerce sites break at least one; 37% get overlays wrong",
   "prompt": "Build this navigation pattern for my app: Back button closes overlays.\n\nWhat it is: People expect Back to undo what looks like a new page: a photo opened full screen, a filter, a step. Add a history entry for those views, so Back closes the photo instead of leaving the whole page and losing their place.\nGood for: Photo viewers, filters, multi-step flows, single-page apps.\nWatch out: Adding history for tiny toggles; Back then feels stuck.\nBased on: Baymard on Back button expectations (2020): 59% of e-commerce sites break at least one; 37% get overlays wrong\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-back\">\n    <div class=\"seg\" role=\"group\" aria-label=\"Version\"><button type=\"button\" aria-pressed=\"true\" data-m=\"no\">Back leaves the page</button><button type=\"button\" aria-pressed=\"false\" data-m=\"yes\">Back closes the photo</button></div>\n    <div class=\"win\"><div class=\"chrome\"><button type=\"button\" class=\"bk\" aria-label=\"Back\"><svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M10 3 5 8l5 5\"></path></svg></button><span class=\"url\">shop.example/lamps</span></div><div class=\"page\"></div></div>\n    <p class=\"res\">Open a photo, then press the Back arrow.</p>\n  </div>\n",
    "css": ":root { --body: \"Figtree\",system-ui,sans-serif; --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): Figtree, JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-back, .s-back *, .s-back *::before, .s-back *::after { box-sizing: border-box; }\n.s-back { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-back button { font: inherit; cursor: pointer; }\n.s-dly,.s-rsv,.s-esum,.s-lbl,.s-pwd,.s-dbl,.s-deb,.s-inl,.s-fcs,.s-back { background: #fff; color: #1f2430; font-size: 12px; padding: 12px 14px; }\n.s-esum .seg,.s-lbl .seg,.s-pwd .seg,.s-fcs .seg,.s-back .seg { display: flex; border: 1px solid #c9ced8; border-radius: 7px; overflow: hidden; margin-bottom: 9px; }\n.s-esum .seg button,.s-lbl .seg button,.s-pwd .seg button,.s-fcs .seg button,.s-back .seg button { flex: 1; border: 0; border-left: 1px solid #c9ced8; background: #fff; color: #4a5160; padding: 5px 6px; font: 600 11px var(--body); }\n.s-esum .seg button:first-child,.s-lbl .seg button:first-child,.s-pwd .seg button:first-child,.s-fcs .seg button:first-child,.s-back .seg button:first-child { border-left: 0; }\n.s-esum .seg [aria-pressed=\"true\"],.s-lbl .seg [aria-pressed=\"true\"],.s-pwd .seg [aria-pressed=\"true\"],.s-fcs .seg [aria-pressed=\"true\"],.s-back .seg [aria-pressed=\"true\"] { background: #1f2430; color: #fff; }\n.s-dly .act,.s-rsv .act,.s-esum .act,.s-lbl .act,.s-pwd .act,.s-dbl .act,.s-inl .act,.s-fcs .act,.s-back .act { border: 1px solid #1f2430; background: #1f2430; color: #fff; border-radius: 6px; padding: 6px 12px; font: 600 12px var(--body); }\n.s-dly .ghost,.s-rsv .ghost,.s-fcs .ghost,.s-back .ghost { border: 1px solid #c9ced8; background: #fff; color: #1f2430; border-radius: 6px; padding: 5px 10px; font: 600 11px var(--body); }\n.s-back { display: grid; grid-template-rows: auto 1fr auto; gap: 0; }\n.s-back .win { border: 1px solid #c9ced8; border-radius: 9px; overflow: hidden; display: grid; grid-template-rows: auto 1fr; min-height: 0; }\n.s-back .chrome { display: flex; align-items: center; gap: 6px; padding: 5px 7px; background: #eef0f3; border-bottom: 1px solid #d6dae1; font: 11px var(--mono); color: #4a5160; }\n.s-back .chrome button { border: 1px solid #c9ced8; background: #fff; border-radius: 5px; width: 26px; height: 22px; display: grid; place-items: center; padding: 0; color: #1f2430; }\n.s-back .chrome svg { width: 13px; height: 13px; }\n.s-back .page { position: relative; padding: 8px; display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; align-content: start; min-height: 0; overflow: hidden; }\n.s-back .page h5 { grid-column: 1/-1; margin: 0; font: 700 12px var(--body); }\n.s-back .th { height: 46px; border: 0; border-radius: 6px; padding: 0; background: linear-gradient(135deg,#c9d4f2,#eef0f3); }\n.s-back .th:nth-child(3) { background: linear-gradient(135deg,#f2d9c9,#eef0f3); }\n.s-back .th:nth-child(4) { background: linear-gradient(135deg,#cfe8d8,#eef0f3); }\n.s-back .lb { position: absolute; inset: 0; background: rgba(20,22,30,.82); display: grid; place-items: center; color: #fff; font: 600 12px var(--body); }\n.s-back .lb[hidden] { display: none; }\n.s-back .lb div { width: 60%; aspect-ratio: 1.3; border-radius: 8px; background: linear-gradient(135deg,#c9d4f2,#8aa2ff); }\n.s-back .away { grid-column: 1/-1; display: grid; gap: 6px; color: #4a5160; }\n.s-back .away i { display: block; height: 8px; border-radius: 4px; background: #e3e6ec; }\n.s-back .res { padding-top: 7px; font-size: 11px; color: #5f6672; min-height: 24px; }\n.s-back .res b { color: #1f2430; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // back button: a mini browser with its own history\n  (() => {\n    const st = $('.s-back'); if (!st) return;\n    const page = $('.page', st), url = $('.url', st), res = $('.res', st); let mode = 'no', stack = [];\n    const shop = () => { page.innerHTML = '<h5>Desk lamps</h5>' + [1, 2, 3, 4, 5, 6].map(i => `<button class=\"th\" type=\"button\" aria-label=\"Open photo ${i}\"></button>`).join('') + '<div class=\"lb\" hidden><div></div></div>'; url.textContent = 'shop.example/lamps'; };\n    const away = () => { page.innerHTML = '<div class=\"away\"><b style=\"color:#1f2430\">Search results</b><i style=\"width:90%\"></i><i style=\"width:70%\"></i><i style=\"width:80%\"></i></div>'; url.textContent = 'shop.example/search?q=lamp'; };\n    const reset = () => { stack = ['search']; shop(); res.textContent = 'Open a photo, then press the Back arrow.'; };\n    page.addEventListener('click', e => { const t = e.target.closest('.th'); if (!t) return; $('.lb', page).hidden = false; if (mode === 'yes') { stack.push('photo'); url.textContent = 'shop.example/lamps#photo'; } res.textContent = 'Photo open. Now press the Back arrow.'; });\n    $('.bk', st).addEventListener('click', () => { const lb = $('.lb', page);\n      if (mode === 'yes' && stack[stack.length - 1] === 'photo') { stack.pop(); lb.hidden = true; url.textContent = 'shop.example/lamps'; res.innerHTML = 'Back <b>closed the photo</b>. You are still on the lamps page.'; }\n      else if (page.querySelector('.th')) { away(); res.innerHTML = 'Back <b>left the page</b>. The lamps and your place are gone.'; setTimeout(reset, 2600); } });\n    $$('.seg button', st).forEach(b => b.addEventListener('click', () => { mode = b.dataset.m; $$('.seg button', st).forEach(x => x.setAttribute('aria-pressed', x === b)); reset(); }));\n    reset();\n  })();\n})();"
   }
  },
  {
   "id": "searchfirst",
   "title": "Search-first navigation",
   "section": "navigation",
   "sectionName": "Navigation",
   "description": "A big search box is the main way to get around, with recent searches and live suggestions.",
   "goodFor": "Large catalogs: recipes, products, help centers",
   "watchOut": "Small sites where browsing is faster",
   "seenIn": "Google, Airbnb, Spotlight, recipe and help sites",
   "prompt": "Build this navigation pattern for my app: Search-first navigation.\n\nWhat it is: A big search box is the main way to get around, with recent searches and live suggestions.\nGood for: Large catalogs: recipes, products, help centers.\nWatch out: Small sites where browsing is faster.\nSeen in: Google, Airbnb, Spotlight, recipe and help sites\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-sf\">\n    <b class=\"lg\">find</b>\n    <div class=\"sb\"><span>⌕</span><input id=\"sf-in\" placeholder=\"Search recipes, chefs, ingredients\" aria-label=\"Search recipes\" autocomplete=\"off\"></div>\n    <div class=\"rc\"><small>Recent:</small><button>paneer</button><button>dal makhani</button><button>chai</button></div>\n    <ul id=\"sf-list\"></ul>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; --body: \"Figtree\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque, Figtree */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-sf, .s-sf *, .s-sf *::before, .s-sf *::after { box-sizing: border-box; }\n.s-sf { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-sf button { font: inherit; cursor: pointer; }\n.s-sf { background: #fff; color: #1f2430; padding: 20px; display: grid; align-content: start; justify-items: center; gap: 10px; font-size: 12px; }\n.s-sf .lg { font: 800 28px var(--display); letter-spacing: -.03em; color: #e8590c; }\n.s-sf .sb { width: 100%; display: flex; align-items: center; gap: 8px; border: 1px solid #dfe3ea; border-radius: 999px; padding: 8px 14px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }\n.s-sf .sb input { flex: 1; min-width: 0; border: 0; outline: none; font: 13px var(--body); background: none; color: #1f2430; }\n.s-sf .sb:focus-within { border-color: #e8590c; box-shadow: 0 0 0 3px rgba(232,89,12,.15); }\n.s-sf .rc { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; }\n.s-sf .rc small { color: #888; }\n.s-sf .rc button { border: 1px solid #e3e6ec; background: #f7f8fa; border-radius: 999px; padding: 3px 10px; font-size: 11px; color: #1f2430; }\n.s-sf ul { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 2px; }\n.s-sf li { padding: 5px 10px; border-radius: 6px; display: flex; justify-content: space-between; }\n.s-sf li span { color: #999; font-size: 10px; }\n.s-sf li:hover { background: #f3f4f7; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // search-first\n  (() => { const d = [['Paneer butter masala', 'Recipe'], ['Palak paneer', 'Recipe'], ['Paneer', 'Ingredient'], ['Pav bhaji', 'Recipe'], ['Poha', 'Recipe'], ['Masala chai', 'Recipe'], ['Chef Anita Rao', 'Chef'], ['Dal makhani', 'Recipe'], ['Dosa batter', 'Recipe'], ['Chef Rohan Iyer', 'Chef'], ['Peas', 'Ingredient'], ['Quick breakfast ideas', 'Collection']];\n    const i = $('#sf-in'), ul = $('#sf-list'); if (!i) return;\n    const r = () => { const q = i.value.trim().toLowerCase(); const f = q ? d.filter(x => x[0].toLowerCase().includes(q)).slice(0, 5) : d.slice(0, 4);\n      ul.innerHTML = (q ? '' : '<li style=\"color:#999;font-size:10px\">Trending</li>') + (f.length ? f.map(x => `<li><b style=\"font-weight:500\">${x[0]}</b><span>${x[1]}</span></li>`).join('') : '<li style=\"color:#999\">No results. Try \"paneer\" or \"chai\".</li>'); };\n    i.addEventListener('input', r); $$('.s-sf .rc button').forEach(b => b.addEventListener('click', () => { i.value = b.textContent; r(); i.focus(); })); r();\n  })();\n})();"
   }
  },
  {
   "id": "micro",
   "title": "Microinteractions",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "Small animations that confirm an action happened: a heart that pops, a switch that slides, a button that says \"Copied\".",
   "goodFor": "Confirming actions and adding delight",
   "watchOut": "Slow or flashy effects that delay the task",
   "seenIn": "Twitter/X like, iOS switches, Stripe copy buttons",
   "prompt": "Build this UI pattern for my app: Microinteractions.\n\nWhat it is: Small animations that confirm an action happened: a heart that pops, a switch that slides, a button that says \"Copied\".\nGood for: Confirming actions and adding delight.\nWatch out: Slow or flashy effects that delay the task.\nSeen in: Twitter/X like, iOS switches, Stripe copy buttons\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-micro\">\n    <figure><button class=\"like\" id=\"like\" aria-pressed=\"false\"><svg viewBox=\"0 0 24 24\"><path d=\"M12 21s-7-4.5-9.5-9A5.5 5.5 0 0 1 12 6a5.5 5.5 0 0 1 9.5 6c-2.5 4.5-9.5 9-9.5 9z\"></path></svg><span id=\"like-n\">128</span></button><figcaption>Like</figcaption></figure>\n    <figure><button class=\"tg\" aria-pressed=\"false\" aria-label=\"Notifications\" data-toggle></button><figcaption>Toggle</figcaption></figure>\n    <figure><button class=\"cp\" id=\"copy\">Copy link</button><figcaption>Feedback</figcaption></figure>\n  </div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-micro, .s-micro *, .s-micro *::before, .s-micro *::after { box-sizing: border-box; }\n.s-micro { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-micro button { font: inherit; cursor: pointer; }\n.s-micro { background: #fff; color: #1f2430; display: flex; align-items: center; justify-content: center; gap: 26px; flex-wrap: wrap; padding: 14px; }\n.s-micro .like { border: 1px solid #e5e7eb; background: #fff; border-radius: 999px; padding: 8px 16px; display: flex; gap: 8px; align-items: center; font-weight: 600; font-variant-numeric: tabular-nums; }\n.s-micro .like svg { width: 20px; height: 20px; fill: none; stroke: #555; stroke-width: 2; transition: transform .2s; }\n.s-micro .like.on svg { fill: #f43f5e; stroke: #f43f5e; animation: pop .35s; }\n.s-micro .tg { width: 50px; height: 28px; border-radius: 14px; background: #d1d5db; border: 0; position: relative; transition: background .2s; }\n.s-micro .tg::after { content: \"\"; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: left .2s; }\n.s-micro .tg[aria-pressed=\"true\"] { background: #22c55e; }\n.s-micro .tg[aria-pressed=\"true\"]::after { left: 25px; }\n.s-micro .cp { border: 0; background: #111827; color: #fff; border-radius: 8px; padding: 9px 16px; min-width: 110px; transition: background .2s; }\n.s-micro .cp.ok { background: #16a34a; }\n.s-micro figure { margin: 0; display: grid; gap: 8px; justify-items: center; font: 11px var(--mono); color: #777; }\n@keyframes pop {\n  40%{transform:scale(1.45)}\n}\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // generic toggles\n  $$('[data-toggle]').forEach(b=>b.addEventListener('click',()=>b.setAttribute('aria-pressed',b.getAttribute('aria-pressed')!=='true')));\n\n  // like / copy\n  const like=$('#like'),ln=$('#like-n');\n  like.addEventListener('click',()=>{const on=!like.classList.contains('on');like.classList.toggle('on',on);like.setAttribute('aria-pressed',on);ln.textContent=128+(on?1:0)});\n  const cp=$('#copy');\n  cp.addEventListener('click',()=>{try{navigator.clipboard&&navigator.clipboard.writeText('https://suryapratik.vercel.app/').catch(()=>{})}catch(e){}cp.textContent='Copied ✓';cp.classList.add('ok');setTimeout(()=>{cp.textContent='Copy link';cp.classList.remove('ok')},1500)});\n})();"
   }
  },
  {
   "id": "skeleton",
   "title": "Skeleton loading",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "Grey shimmering shapes stand in for content while it loads, so the page feels faster and doesn't jump.",
   "goodFor": "Content that loads within a few seconds",
   "watchOut": "Very short loads, and screens that already show data (keep the last known value)",
   "seenIn": "YouTube, Facebook, LinkedIn, Swiggy",
   "prompt": "Build this UI pattern for my app: Skeleton loading.\n\nWhat it is: Grey shimmering shapes stand in for content while it loads, so the page feels faster and doesn't jump.\nGood for: Content that loads within a few seconds.\nWatch out: Very short loads, and screens that already show data (keep the last known value).\nSeen in: YouTube, Facebook, LinkedIn, Swiggy\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-skel\">\n    <div class=\"col\"><span class=\"lbl\">Loading</span>\n      <div class=\"post\"><div class=\"row\"><span class=\"sk av\"></span><span class=\"sk\" style=\"height:8px;width:60%\"></span></div><span class=\"sk ph\"></span><span class=\"sk\" style=\"height:8px;width:80%\"></span></div>\n      <div class=\"post\"><div class=\"row\"><span class=\"sk av\"></span><span class=\"sk\" style=\"height:8px;width:50%\"></span></div><span class=\"sk ph\"></span></div>\n    </div>\n    <div class=\"col\" id=\"skel-r\"></div>\n    <button class=\"rp\" id=\"skel-btn\">Reload</button>\n  </div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-skel, .s-skel *, .s-skel *::before, .s-skel *::after { box-sizing: border-box; }\n.s-skel { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-skel button { font: inherit; cursor: pointer; }\n.s-skel { background: #fff; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px; font-size: 11px; color: #1f2430; }\n.s-skel .col { display: grid; gap: 8px; align-content: start; }\n.s-skel .lbl { font: 10px var(--mono); color: #999; text-transform: uppercase; }\n.s-skel .post { border: 1px solid #eef0f3; border-radius: 8px; padding: 8px; display: grid; gap: 6px; }\n.s-skel .row { display: flex; gap: 6px; align-items: center; }\n.sk { background: linear-gradient(90deg,#eceef2 25%,#f7f8fa 50%,#eceef2 75%); background-size: 200% 100%; animation: shim 1.3s linear infinite; border-radius: 4px; }\n.s-skel .av { width: 24px; height: 24px; border-radius: 50%; flex: none; }\n.s-skel .ph { height: 44px; border-radius: 6px; }\n.s-skel .rp { position: absolute; right: 12px; bottom: 10px; border: 1px solid #d6dae1; background: #fff; border-radius: 6px; padding: 4px 10px; font-size: 11px; }\n@keyframes shim {\n  to{background-position:-200% 0}\n}\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // skeleton\n  const sr=$('#skel-r');\n  const loaded=`<span class=\"lbl\">Loaded</span>\n    <div class=\"post\"><div class=\"row\"><span class=\"av\" style=\"background:#f59e0b;border-radius:50%;width:24px;height:24px\"></span><b>Aditi Rao</b></div><span class=\"ph\" style=\"background:linear-gradient(135deg,#60a5fa,#a78bfa)\"></span><span>Sunset at Marine Drive</span></div>\n    <div class=\"post\"><div class=\"row\"><span class=\"av\" style=\"background:#10b981;border-radius:50%;width:24px;height:24px\"></span><b>Kabir Sen</b></div><span class=\"ph\" style=\"background:linear-gradient(135deg,#fbbf24,#f87171)\"></span></div>`;\n  const skel=$('.s-skel .col').innerHTML.replace('Loading','Loading…');\n  sr.innerHTML=loaded;\n  $('#skel-btn').addEventListener('click',()=>{sr.innerHTML=skel;setTimeout(()=>sr.innerHTML=loaded,1500)});\n})();"
   }
  },
  {
   "id": "lastknown",
   "title": "Last known value (stale-while-revalidate)",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "While fresh data loads, keep showing the data from last time with a small \"Updating\" note and when it was last updated, then change the numbers in place. People keep reading instead of waiting, and nothing jumps.",
   "goodFor": "Dashboards, inboxes and lists that refresh data people already see",
   "watchOut": "First load, when there is nothing to show yet; use a skeleton",
   "seenIn": "email inboxes, analytics dashboards, apps built with SWR or TanStack Query",
   "prompt": "Build this UI pattern for my app: Last known value (stale-while-revalidate).\n\nWhat it is: While fresh data loads, keep showing the data from last time with a small \"Updating\" note and when it was last updated, then change the numbers in place. People keep reading instead of waiting, and nothing jumps.\nGood for: Dashboards, inboxes and lists that refresh data people already see.\nWatch out: First load, when there is nothing to show yet; use a skeleton.\nSeen in: email inboxes, analytics dashboards, apps built with SWR or TanStack Query\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-lkv\">\n    <div class=\"lk-row\" data-lk=\"spin\"><span class=\"lk-lbl\">Spinner<small>nothing to read<b>0 s</b></small></span><div class=\"lk-tile\"><div class=\"lk-top\"><span>Orders today</span><span class=\"lk-when\"></span></div><div class=\"lk-num\">1,284</div><div class=\"lk-sub\">₹4.21L revenue</div></div></div>\n    <div class=\"lk-row\" data-lk=\"skel\"><span class=\"lk-lbl\">Skeleton<small>nothing to read<b>0 s</b></small></span><div class=\"lk-tile\"><div class=\"lk-top\"><span>Orders today</span><span class=\"lk-when\"></span></div><div class=\"lk-num\">1,284</div><div class=\"lk-sub\">₹4.21L revenue</div></div></div>\n    <div class=\"lk-row\" data-lk=\"last\"><span class=\"lk-lbl\">Last known value<small>nothing to read<b>0 s</b></small></span><div class=\"lk-tile\"><div class=\"lk-top\"><span>Orders today</span><span class=\"lk-when\">2 min ago</span></div><div class=\"lk-num\">1,284</div><div class=\"lk-sub\">₹4.21L revenue</div></div></div>\n    <div class=\"lk-bar\"><span>Slow network: each refresh takes 1.6 s</span><button class=\"lk-btn\" type=\"button\">Refresh</button></div>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; --body: \"Figtree\",system-ui,sans-serif; --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque, Figtree, JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-lkv, .s-lkv *, .s-lkv *::before, .s-lkv *::after { box-sizing: border-box; }\n.s-lkv { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-lkv button { font: inherit; cursor: pointer; }\n.s-lkv { background: #fff; color: #1f2430; display: grid; grid-template-rows: repeat(3,minmax(0,1fr)) auto; gap: 8px; padding: 12px 14px; font-size: 12px; }\n.s-lkv .lk-row { display: grid; grid-template-columns: 84px minmax(0,1fr); gap: 10px; align-items: center; min-height: 0; }\n.s-lkv .lk-lbl { display: grid; gap: 2px; font-weight: 600; font-size: 12px; line-height: 1.25; }\n.s-lkv .lk-lbl small { display: grid; font: 10px/1.3 var(--mono); color: #5f6672; font-weight: 400; }\n.s-lkv .lk-lbl small b { color: #1f2430; font-weight: 600; }\n@media (max-width:420px) {\n  .s-lkv .lk-row { grid-template-columns: 72px minmax(0,1fr); gap: 8px; }\n  .s-lkv .lk-tile { padding: 6px 8px; }\n  .s-lkv .lk-top { font-size: 10px; }\n}\n.s-lkv .lk-tile { border: 1px solid #e3e6ec; border-radius: 8px; padding: 6px 10px; height: 60px; display: grid; align-content: center; gap: 1px; overflow: hidden; }\n.s-lkv .lk-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: #5f6672; font-size: 10.5px; white-space: nowrap; }\n.s-lkv .lk-num { font: 700 18px/1.15 var(--display); font-variant-numeric: tabular-nums; transition: color 1.2s; }\n.s-lkv .lk-num.chg { color: #3557e0; transition: none; }\n.s-lkv .lk-sub { color: #5f6672; font-size: 10.5px; font-variant-numeric: tabular-nums; }\n.s-lkv .lk-mid { display: grid; place-items: center; height: 100%; }\n.s-lkv .lk-ring { display: inline-block; width: 16px; height: 16px; border: 2px solid #d3d7df; border-top-color: #3557e0; border-radius: 50%; animation: lkspin .8s linear infinite; }\n.s-lkv .lk-top .lk-ring { width: 10px; height: 10px; border-width: 1.5px; margin-right: 4px; vertical-align: -1px; }\n.s-lkv .lk-sk { display: block; height: 8px; border-radius: 4px; background: linear-gradient(90deg,#eceef2 25%,#f6f7f9 50%,#eceef2 75%); background-size: 200% 100%; animation: lkshine 1.2s linear infinite; }\n.s-lkv .lk-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: #5f6672; font-size: 10.5px; }\n.s-lkv .lk-btn { border: 1px solid #c9ced8; background: #fff; color: #1f2430; border-radius: 6px; padding: 5px 12px; font: 600 12px var(--body); flex: none; }\n.s-lkv .lk-btn:disabled { opacity: .55; cursor: progress; }\n@media (prefers-reduced-motion:reduce) {\n  .s-lkv .lk-ring,.s-lkv .lk-sk { animation: none; }\n  .s-lkv .lk-num { transition: none; }\n}\n@keyframes lkspin {\n  to{transform:rotate(360deg)}\n}\n@keyframes lkshine {\n  to{background-position:-200% 0}\n}\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // last known value vs spinner vs skeleton: same data, same slow network, measured time with nothing to read\n  (() => {\n    const st = $('.s-lkv'); if (!st) return;\n    const btn = $('.lk-btn', st), rows = $$('.lk-row', st), DELAY = 1600;\n    const calm = matchMedia('(prefers-reduced-motion: reduce)');\n    let orders = 1284, rev = 4.21, busy = false;\n    const fmt = n => n.toLocaleString('en-IN');\n    const tile = (r, o, v, when) => { $('.lk-tile', r).innerHTML = `<div class=\"lk-top\"><span>Orders today</span><span class=\"lk-when\">${when}</span></div><div class=\"lk-num\">${fmt(o)}</div><div class=\"lk-sub\">₹${v.toFixed(2)}L revenue</div>`; };\n    const blank = (r, ms) => { $('.lk-lbl small b', r).textContent = ms ? (ms / 1000).toFixed(1) + ' s' : '0 s'; };\n    btn.addEventListener('click', () => {\n      if (busy) return; busy = true; btn.disabled = true; btn.textContent = 'Refreshing';\n      const t0 = performance.now(), next = [orders + 13 + Math.floor(Math.random() * 9), rev + 0.04 + Math.random() * 0.04];\n      rows.forEach(r => {\n        const k = r.dataset.lk, t = $('.lk-tile', r);\n        if (k === 'spin') t.innerHTML = '<div class=\"lk-mid\"><span class=\"lk-ring\" role=\"img\" aria-label=\"Loading\"></span></div>';\n        if (k === 'skel') t.innerHTML = '<span class=\"lk-sk\" style=\"width:40%\"></span><span class=\"lk-sk\" style=\"width:55%;height:14px\"></span><span class=\"lk-sk\" style=\"width:35%\"></span>';\n        if (k === 'last') $('.lk-when', r).innerHTML = '<span class=\"lk-ring\" aria-hidden=\"true\"></span>Updating';\n      });\n      setTimeout(() => {\n        const ms = performance.now() - t0; [orders, rev] = next;\n        rows.forEach(r => {\n          const k = r.dataset.lk;\n          if (k === 'last') {\n            const n = $('.lk-num', r); n.textContent = fmt(orders); $('.lk-sub', r).textContent = '₹' + rev.toFixed(2) + 'L revenue'; $('.lk-when', r).textContent = 'Just updated';\n            if (!calm.matches) { n.classList.add('chg'); requestAnimationFrame(() => requestAnimationFrame(() => n.classList.remove('chg'))); }\n            blank(r, 0);\n          } else { tile(r, orders, rev, ''); blank(r, ms); }\n        });\n        busy = false; btn.disabled = false; btn.textContent = 'Refresh';\n      }, DELAY);\n    });\n  })();\n})();"
   }
  },
  {
   "id": "delayspin",
   "title": "Delayed spinner (no flash of loading)",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "Fast requests show no loader at all. A spinner appears only if the wait passes a short delay, and once shown it stays a minimum time, so quick loads never flash.",
   "goodFor": "Buttons, refreshes and requests that are usually fast",
   "watchOut": "Delay plus minimum adds time; tune both together",
   "basedOn": "NN/g on progress indicators (no looped animation under 1 second); the spin-delay library's defaults. The exact numbers are common practice, not research.",
   "prompt": "Build this UI pattern for my app: Delayed spinner (no flash of loading).\n\nWhat it is: Fast requests show no loader at all. A spinner appears only if the wait passes a short delay, and once shown it stays a minimum time, so quick loads never flash.\nGood for: Buttons, refreshes and requests that are usually fast.\nWatch out: Delay plus minimum adds time; tune both together.\nBased on: NN/g on progress indicators (no looped animation under 1 second); the spin-delay library's defaults. The exact numbers are common practice, not research.\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-dly\">\n    <label class=\"ctl\">Response time <input type=\"range\" min=\"100\" max=\"3000\" step=\"50\" value=\"150\" aria-label=\"Response time in milliseconds\"><output>150 ms</output></label>\n    <div class=\"two\">\n      <div class=\"pane\"><span class=\"cap\">Spinner at once<small>shown for every request</small></span><div class=\"box\" data-k=\"now\"><b>Orders</b><i style=\"width:80%\"></i><i style=\"width:60%\"></i><i style=\"width:70%\"></i><div class=\"ov\" hidden=\"\"><span class=\"ring\"></span></div></div><span class=\"cnt\">flashes: <b>0</b></span></div>\n      <div class=\"pane\"><span class=\"cap\">Delayed spinner<small>after 300 ms, kept 500 ms</small></span><div class=\"box\" data-k=\"late\"><b>Orders</b><i style=\"width:80%\"></i><i style=\"width:60%\"></i><i style=\"width:70%\"></i><div class=\"ov\" hidden=\"\"><span class=\"ring\"></span></div></div><span class=\"cnt\">flashes: <b>0</b></span></div>\n    </div>\n    <div class=\"bar\"><span>A flash is a spinner seen for under 300 ms</span><button class=\"act\" type=\"button\">Refresh</button></div>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; --body: \"Figtree\",system-ui,sans-serif; --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque, Figtree, JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-dly, .s-dly *, .s-dly *::before, .s-dly *::after { box-sizing: border-box; }\n.s-dly { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-dly button { font: inherit; cursor: pointer; }\n[hidden] { display: none !important; }\n.s-dly,.s-rsv,.s-esum,.s-lbl,.s-pwd,.s-dbl,.s-deb,.s-inl,.s-fcs,.s-back { background: #fff; color: #1f2430; font-size: 12px; padding: 12px 14px; }\n.s-dly .two,.s-rsv .two,.s-dbl .two,.s-deb .two,.s-inl .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-height: 0; }\n.s-dly .cap,.s-rsv .cap,.s-dbl .cap,.s-deb .cap,.s-inl .cap { font: 600 11px/1.3 var(--body); color: #1f2430; }\n.s-dly .cap small,.s-rsv .cap small,.s-dbl .cap small,.s-deb .cap small,.s-inl .cap small { display: block; font-weight: 400; color: #5f6672; }\n.s-dly .act,.s-rsv .act,.s-esum .act,.s-lbl .act,.s-pwd .act,.s-dbl .act,.s-inl .act,.s-fcs .act,.s-back .act { border: 1px solid #1f2430; background: #1f2430; color: #fff; border-radius: 6px; padding: 6px 12px; font: 600 12px var(--body); }\n.s-dly .ghost,.s-rsv .ghost,.s-fcs .ghost,.s-back .ghost { border: 1px solid #c9ced8; background: #fff; color: #1f2430; border-radius: 6px; padding: 5px 10px; font: 600 11px var(--body); }\n.s-dly { display: grid; grid-template-rows: auto 1fr auto; gap: 8px; }\n.s-dly .ctl { display: flex; align-items: center; gap: 8px; font-size: 11.5px; }\n.s-dly .ctl input { flex: 1; min-width: 0; accent-color: #3557e0; }\n.s-dly .ctl output { font: 600 11.5px var(--mono); min-width: 52px; text-align: right; }\n.s-dly .pane { display: grid; grid-template-rows: auto 1fr auto; gap: 5px; min-height: 0; }\n.s-dly .box { position: relative; border: 1px solid #e3e6ec; border-radius: 8px; padding: 7px 9px; display: grid; gap: 5px; align-content: start; overflow: hidden; }\n.s-dly .box i { display: block; height: 7px; border-radius: 4px; background: #e3e6ec; }\n.s-dly .box b { font: 700 13px var(--display); }\n.s-dly .ov { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.88); }\n.s-dly .ov[hidden] { display: none; }\n.s-dly .ring { width: 18px; height: 18px; border: 2px solid #d3d7df; border-top-color: #3557e0; border-radius: 50%; animation: s2spin .8s linear infinite; }\n.s-dly .cnt { font: 11px var(--mono); color: #5f6672; }\n.s-dly .bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: #5f6672; font-size: 11px; }\n@media (prefers-reduced-motion:reduce) {\n  .s-dly .ring { animation: none; }\n}\n@keyframes s2spin {\n  to{transform:rotate(360deg)}\n}\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // delayed spinner: same response time, two loading policies, real flash count\n  (() => {\n    const st = $('.s-dly'); if (!st) return;\n    const range = $('input', st), out = $('output', st), go = $('.act', st), boxes = $$('.box', st), cnt = $$('.cnt b', st), flashes = [0, 0];\n    range.addEventListener('input', () => { out.textContent = range.value + ' ms'; });\n    go.addEventListener('click', () => {\n      const d = +range.value; go.disabled = true;\n      boxes.forEach((box, i) => { const ov = $('.ov', box), t0 = performance.now();\n        if (i === 0) { ov.hidden = false; setTimeout(() => { ov.hidden = true; if (performance.now() - t0 < 300) cnt[0].textContent = ++flashes[0]; }, d); }\n        else if (d > 300) { setTimeout(() => { ov.hidden = false; const shownAt = performance.now(); setTimeout(() => { ov.hidden = true; if (performance.now() - shownAt < 300) cnt[1].textContent = ++flashes[1]; }, Math.max(d - 300, 500)); }, 300); } });\n      setTimeout(() => { go.disabled = false; }, Math.max(d, d > 300 ? 800 : 0) + 50);\n    });\n  })();\n})();"
   }
  },
  {
   "id": "reserve",
   "title": "Reserve space (no layout shift)",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "Give images, ads, banners and anything that loads late a fixed slot, so the page never jumps. A jump right before a tap sends the finger to the wrong button.",
   "goodFor": "Feeds, product pages, anything with images, ads or banners",
   "watchOut": "A slot of the wrong size still makes the page move",
   "basedOn": "web.dev Cumulative Layout Shift (good is 0.1 or less, poor above 0.25)",
   "prompt": "Build this UI pattern for my app: Reserve space (no layout shift).\n\nWhat it is: Give images, ads, banners and anything that loads late a fixed slot, so the page never jumps. A jump right before a tap sends the finger to the wrong button.\nGood for: Feeds, product pages, anything with images, ads or banners.\nWatch out: A slot of the wrong size still makes the page move.\nBased on: web.dev Cumulative Layout Shift (good is 0.1 or less, poor above 0.25)\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-rsv\">\n    <div class=\"two\">\n      <div><span class=\"cap\">Nothing reserved<small>the banner pushes the page</small></span><div class=\"ph\" data-k=\"no\"><div class=\"slot\"></div><button class=\"opt buy\" type=\"button\">Buy again</button><button class=\"opt\" type=\"button\">Cancel order</button><span class=\"tap\" aria-hidden=\"true\"></span></div><p class=\"res\"></p></div>\n      <div><span class=\"cap\">Space reserved<small>a slot waits for the banner</small></span><div class=\"ph\" data-k=\"yes\"><div class=\"slot keep\"></div><button class=\"opt buy\" type=\"button\">Buy again</button><button class=\"opt\" type=\"button\">Cancel order</button><span class=\"tap\" aria-hidden=\"true\"></span></div><p class=\"res\"></p></div>\n    </div>\n    <div class=\"bar\"><button class=\"act\" type=\"button\">Load the page</button></div>\n  </div>\n",
    "css": ":root { --body: \"Figtree\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Figtree */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-rsv, .s-rsv *, .s-rsv *::before, .s-rsv *::after { box-sizing: border-box; }\n.s-rsv { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-rsv button { font: inherit; cursor: pointer; }\n.s-dly,.s-rsv,.s-esum,.s-lbl,.s-pwd,.s-dbl,.s-deb,.s-inl,.s-fcs,.s-back { background: #fff; color: #1f2430; font-size: 12px; padding: 12px 14px; }\n.s-dly .two,.s-rsv .two,.s-dbl .two,.s-deb .two,.s-inl .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-height: 0; }\n.s-dly .cap,.s-rsv .cap,.s-dbl .cap,.s-deb .cap,.s-inl .cap { font: 600 11px/1.3 var(--body); color: #1f2430; }\n.s-dly .cap small,.s-rsv .cap small,.s-dbl .cap small,.s-deb .cap small,.s-inl .cap small { display: block; font-weight: 400; color: #5f6672; }\n.s-dly .act,.s-rsv .act,.s-esum .act,.s-lbl .act,.s-pwd .act,.s-dbl .act,.s-inl .act,.s-fcs .act,.s-back .act { border: 1px solid #1f2430; background: #1f2430; color: #fff; border-radius: 6px; padding: 6px 12px; font: 600 12px var(--body); }\n.s-dly .ghost,.s-rsv .ghost,.s-fcs .ghost,.s-back .ghost { border: 1px solid #c9ced8; background: #fff; color: #1f2430; border-radius: 6px; padding: 5px 10px; font: 600 11px var(--body); }\n.s-rsv { display: grid; grid-template-rows: 1fr auto; gap: 8px; }\n.s-rsv .ph { position: relative; border: 1px solid #e3e6ec; border-radius: 10px; padding: 8px; display: grid; align-content: start; gap: 6px; overflow: hidden; height: 136px; }\n.s-rsv .slot { height: 0; border-radius: 6px; overflow: hidden; }\n.s-rsv .slot.keep { height: 34px; background: #eef0f3; }\n.s-rsv .ban { height: 34px; border-radius: 6px; background: #1f2430; color: #fff; display: grid; place-items: center; font: 600 11px var(--body); }\n.s-rsv .opt { height: 34px; border: 1px solid #c9ced8; background: #fff; border-radius: 6px; padding: 0 8px; text-align: left; font: 600 11.5px var(--body); color: #1f2430; }\n.s-rsv .opt.buy { border-color: #1f2430; }\n.s-rsv .tap { position: absolute; left: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 2px solid #c2352b; background: rgba(194,53,43,.15); pointer-events: none; }\n.s-rsv .res { margin: 5px 0 0; font-size: 11px; line-height: 1.35; color: #5f6672; min-height: 30px; }\n.s-rsv .res b { color: #1f2430; }\n.s-rsv .bar { display: flex; justify-content: flex-end; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // reserve space: a banner arrives late; a tap aimed at Cancel lands wherever the page has moved to\n  (() => {\n    const st = $('.s-rsv'); if (!st) return;\n    const go = $('.act', st), phones = $$('.ph', st);\n    const target = ph => $$('.opt', ph)[1];\n    const reset = ph => { const sl = $('.slot', ph); sl.innerHTML = ''; sl.style.height = ''; $('.tap', ph).style.top = (target(ph).offsetTop + 17) + 'px'; $('.tap', ph).hidden = true; ph.nextElementSibling.textContent = ''; };\n    phones.forEach(reset);\n    go.addEventListener('click', () => {\n      go.disabled = true; phones.forEach(reset);\n      phones.forEach(ph => { const y0 = target(ph).offsetTop, tap = $('.tap', ph); tap.style.top = (y0 + 17) + 'px';\n        setTimeout(() => { const sl = $('.slot', ph); sl.innerHTML = '<div class=\"ban\">Free delivery this week</div>'; if (!sl.classList.contains('keep')) sl.style.height = '34px'; }, 900);\n        setTimeout(() => { tap.hidden = false; const r = tap.getBoundingClientRect(), hit = document.elementFromPoint(r.left + r.width / 2, r.top + r.height / 2), b = hit && hit.closest('.opt'), moved = target(ph).offsetTop - y0;\n          ph.nextElementSibling.innerHTML = `Aimed at Cancel order, tapped: <b>${b ? b.textContent : 'the banner'}</b>. Page moved ${moved} px.`; go.disabled = false; }, 980); });\n    });\n  })();\n})();"
   }
  },
  {
   "id": "errsummary",
   "title": "Error summary on submit",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "When a form fails, a box at the top lists every problem, each one a link to its field, and keyboard focus moves to it. Errors further down a long form are no longer missed, and screen reader users learn that submitting failed.",
   "goodFor": "Long forms, checkout, government and business forms",
   "watchOut": "Summary wording must match the messages at the fields",
   "seenIn": "GOV.UK services (GOV.UK Design System)",
   "prompt": "Build this UI pattern for my app: Error summary on submit.\n\nWhat it is: When a form fails, a box at the top lists every problem, each one a link to its field, and keyboard focus moves to it. Errors further down a long form are no longer missed, and screen reader users learn that submitting failed.\nGood for: Long forms, checkout, government and business forms.\nWatch out: Summary wording must match the messages at the fields.\nSeen in: GOV.UK services (GOV.UK Design System)\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-esum\">\n    <div class=\"seg\" role=\"group\" aria-label=\"Version\"><button type=\"button\" aria-pressed=\"true\" data-m=\"no\">Errors at the fields only</button><button type=\"button\" aria-pressed=\"false\" data-m=\"yes\">Error summary on top</button></div>\n    <div class=\"sc\" tabindex=\"-1\"><form novalidate=\"\">\n      <label data-f=\"name\">Full name<input autocomplete=\"off\" value=\"\"></label>\n      <label data-f=\"email\">Email<input autocomplete=\"off\" value=\"asha@studio\"></label>\n      <label data-f=\"phone\">Phone<input autocomplete=\"off\" value=\"98765\"></label>\n      <label data-f=\"pin\">PIN code<input autocomplete=\"off\" value=\"560001\"></label>\n    </form></div>\n    <div class=\"foot\"><span class=\"st\">Press Continue with the mistakes left in</span><button class=\"act\" type=\"button\">Continue</button></div>\n  </div>\n",
    "css": ":root { --body: \"Figtree\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Figtree */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-esum, .s-esum *, .s-esum *::before, .s-esum *::after { box-sizing: border-box; }\n.s-esum { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-esum button { font: inherit; cursor: pointer; }\n.s-dly,.s-rsv,.s-esum,.s-lbl,.s-pwd,.s-dbl,.s-deb,.s-inl,.s-fcs,.s-back { background: #fff; color: #1f2430; font-size: 12px; padding: 12px 14px; }\n.s-esum .seg,.s-lbl .seg,.s-pwd .seg,.s-fcs .seg,.s-back .seg { display: flex; border: 1px solid #c9ced8; border-radius: 7px; overflow: hidden; margin-bottom: 9px; }\n.s-esum .seg button,.s-lbl .seg button,.s-pwd .seg button,.s-fcs .seg button,.s-back .seg button { flex: 1; border: 0; border-left: 1px solid #c9ced8; background: #fff; color: #4a5160; padding: 5px 6px; font: 600 11px var(--body); }\n.s-esum .seg button:first-child,.s-lbl .seg button:first-child,.s-pwd .seg button:first-child,.s-fcs .seg button:first-child,.s-back .seg button:first-child { border-left: 0; }\n.s-esum .seg [aria-pressed=\"true\"],.s-lbl .seg [aria-pressed=\"true\"],.s-pwd .seg [aria-pressed=\"true\"],.s-fcs .seg [aria-pressed=\"true\"],.s-back .seg [aria-pressed=\"true\"] { background: #1f2430; color: #fff; }\n.s-dly .act,.s-rsv .act,.s-esum .act,.s-lbl .act,.s-pwd .act,.s-dbl .act,.s-inl .act,.s-fcs .act,.s-back .act { border: 1px solid #1f2430; background: #1f2430; color: #fff; border-radius: 6px; padding: 6px 12px; font: 600 12px var(--body); }\n.s-esum { display: grid; grid-template-rows: auto 1fr auto; gap: 0; }\n.s-esum .sc { overflow: auto; border: 1px solid #e3e6ec; border-radius: 8px; padding: 8px 10px; display: grid; gap: 7px; align-content: start; }\n.s-esum .sum { border: 2px solid #c2352b; border-radius: 6px; padding: 7px 9px; outline: none; }\n.s-esum .sum:focus-visible { box-shadow: 0 0 0 3px #f2c94c; }\n.s-esum .sum b { display: block; font-size: 12px; margin-bottom: 3px; }\n.s-esum .sum a { display: block; color: #b3261e; font-size: 11.5px; }\n.s-esum label { display: grid; gap: 3px; font: 600 11.5px var(--body); }\n.s-esum input { border: 1px solid #8a919e; border-radius: 5px; padding: 5px 7px; font: 12px var(--body); }\n.s-esum .bad input { border: 2px solid #c2352b; }\n.s-esum .msg { color: #b3261e; font-weight: 600; font-size: 11px; }\n.s-esum .foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 8px; font-size: 11px; color: #5f6672; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // parallax\n  (() => { const s = $('#plx'); if (!s) return; const ly = $$('#plx [data-f]');\n    s.addEventListener('scroll', () => { const t = s.scrollTop; ly.forEach(l => l.style.transform = `translateY(${t * l.dataset.f}px)`); }, { passive: true });\n  })();\n\n  $$('nav.index button[data-f]').forEach(b => { const s = collections.find(x => x.id === b.dataset.f); if (s) b.insertAdjacentHTML('beforeend', `<span class=\"kn\">${$$('article.demo', s).length}</span>`); });\n})();"
   }
  },
  {
   "id": "labels",
   "title": "Label placement",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "Where a field's name lives. A placeholder disappears as soon as there is text, so filled and autofilled forms can't be checked. A floating label stays but is tiny. A label above the field is always readable.",
   "goodFor": "Every form; labels above fields work best on phones",
   "watchOut": "Floating labels: check error states, contrast and autofill",
   "basedOn": "NN/g on placeholders (2014); Baymard on inline labels (2013); Google research on form guidelines (Seckler et al., CHI 2014)",
   "prompt": "Build this UI pattern for my app: Label placement.\n\nWhat it is: Where a field's name lives. A placeholder disappears as soon as there is text, so filled and autofilled forms can't be checked. A floating label stays but is tiny. A label above the field is always readable.\nGood for: Every form; labels above fields work best on phones.\nWatch out: Floating labels: check error states, contrast and autofill.\nBased on: NN/g on placeholders (2014); Baymard on inline labels (2013); Google research on form guidelines (Seckler et al., CHI 2014)\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-lbl\">\n    <div class=\"seg\" role=\"group\" aria-label=\"Label style\"><button type=\"button\" aria-pressed=\"true\" data-m=\"ph\">Placeholder only</button><button type=\"button\" aria-pressed=\"false\" data-m=\"fl\">Floating</button><button type=\"button\" aria-pressed=\"false\" data-m=\"top\">Above the field</button></div>\n    <div class=\"frm\"></div>\n  </div>\n",
    "css": ":root { --body: \"Figtree\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Figtree */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-lbl, .s-lbl *, .s-lbl *::before, .s-lbl *::after { box-sizing: border-box; }\n.s-lbl { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-lbl button { font: inherit; cursor: pointer; }\n.s-dly,.s-rsv,.s-esum,.s-lbl,.s-pwd,.s-dbl,.s-deb,.s-inl,.s-fcs,.s-back { background: #fff; color: #1f2430; font-size: 12px; padding: 12px 14px; }\n.s-esum .seg,.s-lbl .seg,.s-pwd .seg,.s-fcs .seg,.s-back .seg { display: flex; border: 1px solid #c9ced8; border-radius: 7px; overflow: hidden; margin-bottom: 9px; }\n.s-esum .seg button,.s-lbl .seg button,.s-pwd .seg button,.s-fcs .seg button,.s-back .seg button { flex: 1; border: 0; border-left: 1px solid #c9ced8; background: #fff; color: #4a5160; padding: 5px 6px; font: 600 11px var(--body); }\n.s-esum .seg button:first-child,.s-lbl .seg button:first-child,.s-pwd .seg button:first-child,.s-fcs .seg button:first-child,.s-back .seg button:first-child { border-left: 0; }\n.s-esum .seg [aria-pressed=\"true\"],.s-lbl .seg [aria-pressed=\"true\"],.s-pwd .seg [aria-pressed=\"true\"],.s-fcs .seg [aria-pressed=\"true\"],.s-back .seg [aria-pressed=\"true\"] { background: #1f2430; color: #fff; }\n.s-dly .act,.s-rsv .act,.s-esum .act,.s-lbl .act,.s-pwd .act,.s-dbl .act,.s-inl .act,.s-fcs .act,.s-back .act { border: 1px solid #1f2430; background: #1f2430; color: #fff; border-radius: 6px; padding: 6px 12px; font: 600 12px var(--body); }\n.s-lbl { display: grid; grid-template-rows: auto 1fr; gap: 0; }\n.s-lbl .frm { display: grid; gap: 10px; align-content: start; }\n.s-lbl .f { position: relative; display: grid; gap: 4px; }\n.s-lbl .f > span { font: 600 11.5px var(--body); color: #1f2430; }\n.s-lbl input { border: 1px solid #8a919e; border-radius: 6px; padding: 8px 9px; font: 13px var(--body); color: #1f2430; width: 100%; }\n.s-lbl input::placeholder { color: #8a919e; }\n.s-lbl .float > span { position: absolute; left: 10px; top: 3px; font-size: 9px; font-weight: 600; color: #5f6672; }\n.s-lbl .float input { padding: 15px 9px 4px; }\n.s-lbl .err { color: #b3261e; font-size: 11px; font-weight: 600; }\n.s-lbl .note { color: #5f6672; font-size: 11px; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // label placement: the same filled form three ways, then a check\n  (() => {\n    const st = $('.s-lbl'); if (!st) return;\n    const frm = $('.frm', st), F = [['Email', 'asha@studio', 'email'], ['Phone', '', 'tel']];\n    const draw = m => { frm.innerHTML = F.map(([l, v, t]) => m === 'ph' ? `<div class=\"f\"><input type=\"${t}\" aria-label=\"${l}\" placeholder=\"${l}\" value=\"${v}\"></div>` : `<label class=\"f${m === 'fl' ? ' float' : ''}\"><span>${l}</span><input type=\"${t}\" ${m === 'fl' ? '' : ''}value=\"${v}\"></label>`).join('')\n      + '<div><button class=\"act\" type=\"button\">Check</button></div><p class=\"note\"></p>'; };\n    frm.addEventListener('click', e => { if (!e.target.closest('.act')) return; const box = $('.f', frm), ok = /\\S+@\\S+\\.\\S+/.test($('input', box).value); $$('.err', frm).forEach(x => x.remove());\n      if (!ok) { const er = document.createElement('span'); er.className = 'err'; er.textContent = 'Enter a valid email address'; box.append(er); }\n      const m = $('.seg [aria-pressed=\"true\"]', st).dataset.m; $('.note', frm).textContent = m === 'ph' ? 'Which field is wrong? The label vanished when the text went in.' : m === 'fl' ? 'The label is there, but small and faint.' : 'Label, value and error all readable.'; });\n    $$('.seg button', st).forEach(b => b.addEventListener('click', () => { $$('.seg button', st).forEach(x => x.setAttribute('aria-pressed', x === b)); draw(b.dataset.m); }));\n    draw('ph');\n  })();\n})();"
   }
  },
  {
   "id": "password",
   "title": "Password field done right",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "Show the rules before people type and tick them off live, offer a show password button, and let paste and password managers work. Skip rules like \"one capital and one symbol\".",
   "goodFor": "Sign up, password change, any new credential",
   "watchOut": "Blocking paste or adding symbol rules",
   "basedOn": "NIST SP 800-63B (no composition rules, allow paste, offer show password); NN/g on password creation (2015); Baymard on password rules (2022)",
   "prompt": "Build this UI pattern for my app: Password field done right.\n\nWhat it is: Show the rules before people type and tick them off live, offer a show password button, and let paste and password managers work. Skip rules like \"one capital and one symbol\".\nGood for: Sign up, password change, any new credential.\nWatch out: Blocking paste or adding symbol rules.\nBased on: NIST SP 800-63B (no composition rules, allow paste, offer show password); NN/g on password creation (2015); Baymard on password rules (2022)\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-pwd\">\n    <div class=\"seg\" role=\"group\" aria-label=\"Version\"><button type=\"button\" aria-pressed=\"true\" data-m=\"bad\">Hidden rules</button><button type=\"button\" aria-pressed=\"false\" data-m=\"good\">Rules up front</button></div>\n    <div class=\"frm\"></div>\n  </div>\n",
    "css": ":root { --body: \"Figtree\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Figtree */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-pwd, .s-pwd *, .s-pwd *::before, .s-pwd *::after { box-sizing: border-box; }\n.s-pwd { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-pwd button { font: inherit; cursor: pointer; }\n.s-dly,.s-rsv,.s-esum,.s-lbl,.s-pwd,.s-dbl,.s-deb,.s-inl,.s-fcs,.s-back { background: #fff; color: #1f2430; font-size: 12px; padding: 12px 14px; }\n.s-esum .seg,.s-lbl .seg,.s-pwd .seg,.s-fcs .seg,.s-back .seg { display: flex; border: 1px solid #c9ced8; border-radius: 7px; overflow: hidden; margin-bottom: 9px; }\n.s-esum .seg button,.s-lbl .seg button,.s-pwd .seg button,.s-fcs .seg button,.s-back .seg button { flex: 1; border: 0; border-left: 1px solid #c9ced8; background: #fff; color: #4a5160; padding: 5px 6px; font: 600 11px var(--body); }\n.s-esum .seg button:first-child,.s-lbl .seg button:first-child,.s-pwd .seg button:first-child,.s-fcs .seg button:first-child,.s-back .seg button:first-child { border-left: 0; }\n.s-esum .seg [aria-pressed=\"true\"],.s-lbl .seg [aria-pressed=\"true\"],.s-pwd .seg [aria-pressed=\"true\"],.s-fcs .seg [aria-pressed=\"true\"],.s-back .seg [aria-pressed=\"true\"] { background: #1f2430; color: #fff; }\n.s-dly .act,.s-rsv .act,.s-esum .act,.s-lbl .act,.s-pwd .act,.s-dbl .act,.s-inl .act,.s-fcs .act,.s-back .act { border: 1px solid #1f2430; background: #1f2430; color: #fff; border-radius: 6px; padding: 6px 12px; font: 600 12px var(--body); }\n.s-pwd { display: grid; grid-template-rows: auto 1fr; gap: 0; }\n.s-pwd .frm { display: grid; gap: 7px; align-content: start; }\n.s-pwd .row { display: flex; gap: 6px; }\n.s-pwd input { flex: 1; min-width: 0; border: 1px solid #8a919e; border-radius: 6px; padding: 7px 9px; font: 13px var(--body); }\n.s-pwd .eye { border: 1px solid #c9ced8; background: #fff; border-radius: 6px; width: 34px; display: grid; place-items: center; color: #1f2430; padding: 0; }\n.s-pwd .eye svg { width: 16px; height: 16px; }\n.s-pwd ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; font-size: 11.5px; }\n.s-pwd li { display: flex; gap: 6px; align-items: center; color: #5f6672; }\n.s-pwd li::before { content: \"\"; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid #8a919e; flex: none; }\n.s-pwd li.ok { color: #1f2430; }\n.s-pwd li.ok::before { background: #1e7f4f; border-color: #1e7f4f; }\n.s-pwd .err { color: #b3261e; font-size: 11.5px; font-weight: 600; min-height: 15px; }\n.s-pwd .foot { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: #5f6672; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // password: hidden rules one at a time vs rules up front, live ticks, show password, paste allowed\n  (() => {\n    const st = $('.s-pwd'); if (!st) return;\n    const frm = $('.frm', st), HIDDEN = [[v => v.length >= 8, 'Must be at least 8 characters'], [v => /[A-Z]/.test(v), 'Must contain a capital letter'], [v => /\\d/.test(v), 'Must contain a number'], [v => /[^A-Za-z0-9]/.test(v), 'Must contain a symbol']];\n    const COMMON = ['password', 'password123', '123456789012345', 'qwertyuiopasdfg'], GOOD = [[v => v.length >= 15, '15 or more characters (spaces are fine)'], [v => v && !COMMON.includes(v.toLowerCase()), 'Not a common password']];\n    let tries = 0;\n    const draw = m => { tries = 0;\n      frm.innerHTML = m === 'bad'\n        ? '<label style=\"font:600 11.5px var(--body)\">New password</label><div class=\"row\"><input type=\"password\" aria-label=\"New password\" autocomplete=\"new-password\"></div><p class=\"err\" role=\"alert\"></p><div class=\"foot\"><span>Attempts: <b class=\"t\">0</b></span><button class=\"act\" type=\"button\">Create account</button></div>'\n        : '<label style=\"font:600 11.5px var(--body)\">New password</label><ul>' + GOOD.map(g => `<li>${g[1]}</li>`).join('') + '</ul><div class=\"row\"><input type=\"password\" aria-label=\"New password\" autocomplete=\"new-password\"><button class=\"eye\" type=\"button\" aria-label=\"Show password\" aria-pressed=\"false\">' + EYE + '</button></div><p class=\"err\" role=\"alert\"></p><div class=\"foot\"><span>Attempts: <b class=\"t\">0</b></span><button class=\"act\" type=\"button\">Create account</button></div>';\n      const inp = $('input', frm);\n      if (m === 'bad') inp.addEventListener('paste', e => { e.preventDefault(); $('.err', frm).textContent = 'Pasting is not allowed'; });\n      else inp.addEventListener('input', () => $$('li', frm).forEach((li, i) => li.classList.toggle('ok', GOOD[i][0](inp.value))));\n      const eye = $('.eye', frm); if (eye) eye.addEventListener('click', () => { const on = inp.type === 'password'; inp.type = on ? 'text' : 'password'; eye.setAttribute('aria-pressed', on); eye.setAttribute('aria-label', on ? 'Hide password' : 'Show password'); });\n      $('.act', frm).addEventListener('click', () => { $('.t', frm).textContent = ++tries; const v = inp.value, rules = m === 'bad' ? HIDDEN : GOOD, miss = rules.find(r => !r[0](v)); $('.err', frm).textContent = miss ? (m === 'bad' ? miss[1] : 'Check the rules above') : 'Account created'; $('.err', frm).style.color = miss ? '' : '#1e7f4f'; }); };\n    const EYE = '<svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" aria-hidden=\"true\"><path d=\"M1.5 8S4 3.5 8 3.5 14.5 8 14.5 8 12 12.5 8 12.5 1.5 8 1.5 8Z\"/><circle cx=\"8\" cy=\"8\" r=\"2\"/></svg>';\n    $$('.seg button', st).forEach(b => b.addEventListener('click', () => { $$('.seg button', st).forEach(x => x.setAttribute('aria-pressed', x === b)); draw(b.dataset.m); }));\n    draw('bad');\n  })();\n})();"
   }
  },
  {
   "id": "doublesubmit",
   "title": "Double-submit protection",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "Make Pay and Submit safe to click twice: show the pressed state at once, ignore repeat clicks while the request runs, and let the server drop duplicates with an idempotency key. Slow networks and double-click habits otherwise create two orders and two charges.",
   "goodFor": "Payments, orders, sending messages, creating records",
   "watchOut": "Blocking clicks in the browser alone; dedupe on the server too",
   "seenIn": "Stripe API (idempotency keys), GOV.UK Design System (prevent double click)",
   "prompt": "Build this UI pattern for my app: Double-submit protection.\n\nWhat it is: Make Pay and Submit safe to click twice: show the pressed state at once, ignore repeat clicks while the request runs, and let the server drop duplicates with an idempotency key. Slow networks and double-click habits otherwise create two orders and two charges.\nGood for: Payments, orders, sending messages, creating records.\nWatch out: Blocking clicks in the browser alone; dedupe on the server too.\nSeen in: Stripe API (idempotency keys), GOV.UK Design System (prevent double click)\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-dbl\">\n    <p class=\"tip\" style=\"margin:0\">Click Pay three times quickly on each side.</p>\n    <div class=\"two\">\n      <div class=\"pane\"><span class=\"cap\">Unprotected<small>every click sends an order</small></span><button class=\"act\" type=\"button\" data-k=\"no\">Pay ₹499</button><ol aria-label=\"Orders created, unprotected\"></ol></div>\n      <div class=\"pane\"><span class=\"cap\">Protected<small>pressed at once, repeats ignored</small></span><button class=\"act\" type=\"button\" data-k=\"yes\">Pay ₹499</button><ol aria-label=\"Orders created, protected\"></ol></div>\n    </div>\n  </div>\n",
    "css": ":root { --body: \"Figtree\",system-ui,sans-serif; --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): Figtree, JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-dbl, .s-dbl *, .s-dbl *::before, .s-dbl *::after { box-sizing: border-box; }\n.s-dbl { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-dbl button { font: inherit; cursor: pointer; }\n.s-dly,.s-rsv,.s-esum,.s-lbl,.s-pwd,.s-dbl,.s-deb,.s-inl,.s-fcs,.s-back { background: #fff; color: #1f2430; font-size: 12px; padding: 12px 14px; }\n.s-dly .two,.s-rsv .two,.s-dbl .two,.s-deb .two,.s-inl .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-height: 0; }\n.s-dly .cap,.s-rsv .cap,.s-dbl .cap,.s-deb .cap,.s-inl .cap { font: 600 11px/1.3 var(--body); color: #1f2430; }\n.s-dly .cap small,.s-rsv .cap small,.s-dbl .cap small,.s-deb .cap small,.s-inl .cap small { display: block; font-weight: 400; color: #5f6672; }\n.s-dly .act,.s-rsv .act,.s-esum .act,.s-lbl .act,.s-pwd .act,.s-dbl .act,.s-inl .act,.s-fcs .act,.s-back .act { border: 1px solid #1f2430; background: #1f2430; color: #fff; border-radius: 6px; padding: 6px 12px; font: 600 12px var(--body); }\n.s-dbl { display: grid; grid-template-rows: auto 1fr; gap: 8px; }\n.s-dbl .tip { font-size: 11px; color: #5f6672; }\n.s-dbl .pane { display: grid; grid-template-rows: auto auto 1fr; gap: 6px; min-height: 0; }\n.s-dbl .act:disabled { opacity: .7; cursor: progress; }\n.s-dbl ol { margin: 0; padding: 6px 8px 6px 24px; border: 1px solid #e3e6ec; border-radius: 7px; font: 11px/1.5 var(--mono); overflow: auto; min-height: 0; }\n.s-dbl .n { font: 600 11.5px var(--body); }\n.s-dbl .n.bad { color: #b3261e; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // double submit: three quick clicks on each side, a ledger of orders\n  (() => {\n    const st = $('.s-dbl'); if (!st) return;\n    $$('.act', st).forEach(btn => { const ol = btn.nextElementSibling, safe = btn.dataset.k === 'yes'; let n = 0, busy = false;\n      btn.addEventListener('click', () => {\n        if (safe) { if (busy) return; busy = true; btn.disabled = true; btn.textContent = 'Paying…'; }\n        setTimeout(() => { n++; const li = document.createElement('li'); li.textContent = `Order ${1040 + n}, ₹499 charged`; ol.append(li); ol.setAttribute('aria-label', `${n} orders created`);\n          if (safe) { busy = false; btn.disabled = false; btn.textContent = 'Pay ₹499'; } }, 1500); }); });\n  })();\n})();"
   }
  },
  {
   "id": "debounce",
   "title": "Search as you type, done right",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "Wait for a short pause in typing before searching, and cancel or ignore older requests. Otherwise every key sends a request, and a slow reply for \"la\" can arrive after the one for \"lamp\" and replace the right results.",
   "goodFor": "Search boxes, autocomplete and live filters",
   "watchOut": "Enter must still search; announce result counts",
   "basedOn": "MDN on debouncing and AbortController; NN/g on search suggestions (2018). The pause length is convention, not research.",
   "prompt": "Build this UI pattern for my app: Search as you type, done right.\n\nWhat it is: Wait for a short pause in typing before searching, and cancel or ignore older requests. Otherwise every key sends a request, and a slow reply for \"la\" can arrive after the one for \"lamp\" and replace the right results.\nGood for: Search boxes, autocomplete and live filters.\nWatch out: Enter must still search; announce result counts.\nBased on: MDN on debouncing and AbortController; NN/g on search suggestions (2018). The pause length is convention, not research.\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-deb\">\n    <input type=\"search\" aria-label=\"Search products\" placeholder=\"Type lamp quickly\">\n    <div class=\"two\">\n      <div class=\"pane\"><span class=\"cap\">A request per key<small>slow replies can arrive last</small></span><span class=\"shown\">Showing: <b>nothing yet</b></span><ul class=\"log\" aria-label=\"Requests, every key\"></ul></div>\n      <div class=\"pane\"><span class=\"cap\">Wait for a pause<small>older requests cancelled</small></span><span class=\"shown\">Showing: <b>nothing yet</b></span><ul class=\"log\" aria-label=\"Requests, after a pause\"></ul></div>\n    </div>\n  </div>\n",
    "css": ":root { --body: \"Figtree\",system-ui,sans-serif; --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): Figtree, JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-deb, .s-deb *, .s-deb *::before, .s-deb *::after { box-sizing: border-box; }\n.s-deb { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-deb button { font: inherit; cursor: pointer; }\n.s-dly,.s-rsv,.s-esum,.s-lbl,.s-pwd,.s-dbl,.s-deb,.s-inl,.s-fcs,.s-back { background: #fff; color: #1f2430; font-size: 12px; padding: 12px 14px; }\n.s-dly .two,.s-rsv .two,.s-dbl .two,.s-deb .two,.s-inl .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-height: 0; }\n.s-dly .cap,.s-rsv .cap,.s-dbl .cap,.s-deb .cap,.s-inl .cap { font: 600 11px/1.3 var(--body); color: #1f2430; }\n.s-dly .cap small,.s-rsv .cap small,.s-dbl .cap small,.s-deb .cap small,.s-inl .cap small { display: block; font-weight: 400; color: #5f6672; }\n.s-deb { display: grid; grid-template-rows: auto 1fr; gap: 8px; }\n.s-deb input { width: 100%; border: 1px solid #8a919e; border-radius: 6px; padding: 7px 9px; font: 13px var(--body); }\n.s-deb .pane { display: grid; grid-template-rows: auto auto 1fr; gap: 5px; min-height: 0; }\n.s-deb .shown { font-size: 11px; }\n.s-deb .shown b { font-family: var(--mono); }\n.s-deb .shown.stale b { color: #b3261e; }\n.s-deb .log { margin: 0; padding: 6px 8px; border: 1px solid #e3e6ec; border-radius: 7px; font: 10.5px/1.5 var(--mono); color: #4a5160; overflow: auto; min-height: 0; list-style: none; }\n.s-deb .log .x { text-decoration: line-through; color: #8a919e; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // search as you type: slow replies for short queries arrive last; a pause plus cancelling keeps the right results\n  (() => {\n    const st = $('.s-deb'); if (!st) return;\n    const inp = $('input', st), panes = $$('.pane', st); let timer = 0, latest = 0, seq = 0;\n    const fake = q => new Promise(res => setTimeout(() => res(q), Math.max(120, 900 - q.length * 170)));   // shorter queries are slower here, like a busy index\n    const log = (pane, txt, cls) => { const li = document.createElement('li'); li.textContent = txt; if (cls) li.className = cls; $('.log', pane).append(li); $('.log', pane).scrollTop = 1e6; return li; };\n    const show = (pane, q) => { const s = $('.shown', pane); s.innerHTML = `Showing: <b>${q || 'nothing'}</b>`; s.classList.toggle('stale', q !== inp.value.trim()); };\n    inp.addEventListener('input', () => {\n      const q = inp.value.trim(); if (!q) return;\n      const li = log(panes[0], 'GET ?q=' + q); fake(q).then(r => { li.textContent += '  done'; show(panes[0], r); });\n      clearTimeout(timer); timer = setTimeout(() => { const id = ++seq; latest = id; $$('.log li', panes[1]).forEach(x => { if (/pending/.test(x.textContent)) { x.textContent = x.textContent.replace('pending', 'cancelled'); x.className = 'x'; } });\n        const l2 = log(panes[1], 'GET ?q=' + q + '  pending'); fake(q).then(r => { if (id !== latest) return; l2.textContent = 'GET ?q=' + q + '  done'; show(panes[1], r); }); }, 300);\n    });\n    inp.addEventListener('input', () => panes.forEach(p => { const s = $('.shown', p); s.classList.toggle('stale', !!$('b', s) && $('b', s).textContent !== 'nothing yet' && $('b', s).textContent !== inp.value.trim()); }));\n  })();\n})();"
   }
  },
  {
   "id": "inlinestatus",
   "title": "Inline message vs toast",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "Put errors and results next to where the person acted, and keep them until they are fixed. A toast that slides in at the edge and disappears is easy to miss and impossible to reread. Keep toasts for small, undoable confirmations.",
   "goodFor": "Save results, form errors, anything people must act on",
   "watchOut": "Toasts for errors or anything that cannot be undone",
   "basedOn": "NN/g on indicators, validations and notifications (2024); WCAG 2.2 Status Messages (4.1.3) and Timing Adjustable (2.2.1); GitHub Primer's saving pattern",
   "prompt": "Build this UI pattern for my app: Inline message vs toast.\n\nWhat it is: Put errors and results next to where the person acted, and keep them until they are fixed. A toast that slides in at the edge and disappears is easy to miss and impossible to reread. Keep toasts for small, undoable confirmations.\nGood for: Save results, form errors, anything people must act on.\nWatch out: Toasts for errors or anything that cannot be undone.\nBased on: NN/g on indicators, validations and notifications (2024); WCAG 2.2 Status Messages (4.1.3) and Timing Adjustable (2.2.1); GitHub Primer's saving pattern\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-inl\">\n    <div class=\"two\">\n      <div class=\"pane\" data-k=\"toast\"><span class=\"cap\">Toast<small>gone after 3 seconds</small></span><div class=\"fld\">Display name<span>Asha Kumar</span></div><button class=\"act\" type=\"button\">Save changes</button><div class=\"toast\" role=\"status\" hidden=\"\"></div></div>\n      <div class=\"pane\" data-k=\"inline\"><span class=\"cap\">Inline message<small>stays until it is fixed</small></span><div class=\"fld\">Display name<span>Asha Kumar</span></div><button class=\"act\" type=\"button\">Save changes</button><p class=\"im\" role=\"alert\" hidden=\"\"></p></div>\n    </div>\n    <div class=\"bar\"><span>Both saves fail. Look away for a moment, then back.</span></div>\n  </div>\n",
    "css": ":root { --body: \"Figtree\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Figtree */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-inl, .s-inl *, .s-inl *::before, .s-inl *::after { box-sizing: border-box; }\n.s-inl { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-inl button { font: inherit; cursor: pointer; }\n[hidden] { display: none !important; }\n.s-dly,.s-rsv,.s-esum,.s-lbl,.s-pwd,.s-dbl,.s-deb,.s-inl,.s-fcs,.s-back { background: #fff; color: #1f2430; font-size: 12px; padding: 12px 14px; }\n.s-dly .two,.s-rsv .two,.s-dbl .two,.s-deb .two,.s-inl .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-height: 0; }\n.s-dly .cap,.s-rsv .cap,.s-dbl .cap,.s-deb .cap,.s-inl .cap { font: 600 11px/1.3 var(--body); color: #1f2430; }\n.s-dly .cap small,.s-rsv .cap small,.s-dbl .cap small,.s-deb .cap small,.s-inl .cap small { display: block; font-weight: 400; color: #5f6672; }\n.s-dly .act,.s-rsv .act,.s-esum .act,.s-lbl .act,.s-pwd .act,.s-dbl .act,.s-inl .act,.s-fcs .act,.s-back .act { border: 1px solid #1f2430; background: #1f2430; color: #fff; border-radius: 6px; padding: 6px 12px; font: 600 12px var(--body); }\n.s-inl { display: grid; grid-template-rows: 1fr auto; gap: 8px; }\n.s-inl .pane { position: relative; border: 1px solid #e3e6ec; border-radius: 10px; padding: 10px; display: grid; align-content: start; gap: 8px; overflow: hidden; }\n.s-inl .fld { display: grid; gap: 3px; font: 600 11px var(--body); }\n.s-inl .fld span { border: 1px solid #c9ced8; border-radius: 5px; padding: 5px 7px; font-weight: 400; font-size: 12px; }\n.s-inl .im { color: #b3261e; font-size: 11px; font-weight: 600; }\n.s-inl .im button { border: 0; background: none; padding: 0; color: #3557e0; font: 600 11px var(--body); text-decoration: underline; }\n.s-inl .toast { position: absolute; left: 8px; right: 8px; bottom: 8px; background: #1f2430; color: #fff; border-radius: 7px; padding: 7px 9px; font-size: 11px; transition: opacity .2s; }\n.s-inl .toast[hidden] { display: block; opacity: 0; pointer-events: none; }\n.s-inl .bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 11px; color: #5f6672; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // inline message vs toast: both saves fail; one message waits for you, the other does not\n  (() => {\n    const st = $('.s-inl'); if (!st) return;\n    $$('.pane', st).forEach(p => { const btn = $('.act', p), toast = p.dataset.k === 'toast';\n      btn.addEventListener('click', () => { btn.textContent = 'Saving…'; btn.disabled = true;\n        setTimeout(() => { btn.textContent = 'Save changes'; btn.disabled = false;\n          if (toast) { const t = $('.toast', p); t.textContent = \"Couldn't save. Try again.\"; t.hidden = false; clearTimeout(t._t); t._t = setTimeout(() => { t.hidden = true; }, 3000); }\n          else { const m = $('.im', p); m.hidden = false; m.innerHTML = 'Couldn\\u2019t save your name. <button type=\"button\">Try again</button>'; } }, 700); });\n      p.addEventListener('click', e => { if (e.target.closest('.im button')) { $('.im', p).hidden = true; btn.click(); } }); });\n  })();\n})();"
   }
  },
  {
   "id": "infinite",
   "title": "Infinite scroll vs pagination",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "Infinite scroll keeps loading as you reach the bottom, good for browsing. Pagination splits results into numbered pages, good for finding and returning to things.",
   "goodFor": "Casual browsing feeds",
   "watchOut": "Search results or anything people return to",
   "seenIn": "Instagram and X feeds (infinite), Google results and Amazon (pages)",
   "prompt": "Build this UI pattern for my app: Infinite scroll vs pagination.\n\nWhat it is: Infinite scroll keeps loading as you reach the bottom, good for browsing. Pagination splits results into numbered pages, good for finding and returning to things.\nGood for: Casual browsing feeds.\nWatch out: Search results or anything people return to.\nSeen in: Instagram and X feeds (infinite), Google results and Amazon (pages)\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-inf\">\n    <div class=\"col\"><span class=\"lbl\">Infinite scroll</span><div class=\"feed\" id=\"inf-feed\" tabindex=\"0\" role=\"region\" aria-label=\"Feed\"></div><span class=\"ld\">↓ scroll for more</span></div>\n    <div class=\"col\"><span class=\"lbl\">Pagination</span><div class=\"feed\" id=\"pg-feed\"></div><div class=\"pg\" id=\"pg-btns\"></div></div>\n  </div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-inf, .s-inf *, .s-inf *::before, .s-inf *::after { box-sizing: border-box; }\n.s-inf { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-inf button { font: inherit; cursor: pointer; }\n.s-inf { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px; background: #f3f4f7; font-size: 11px; color: #2b3040; }\n.s-inf .col { display: grid; grid-template-rows: auto 1fr auto; gap: 6px; min-height: 0; }\n.s-inf .lbl { font: 10px var(--mono); color: #888; text-transform: uppercase; }\n.s-inf .feed { overflow-y: auto; display: grid; gap: 5px; align-content: start; padding-right: 2px; }\n.s-inf .it { background: #fff; border: 1px solid #e3e6ec; border-radius: 6px; padding: 7px 8px; }\n.s-inf .ld { text-align: center; color: #888; padding: 4px; }\n.s-inf .pg { display: flex; gap: 4px; justify-content: center; }\n.s-inf .pg button { border: 1px solid #d6dae1; background: #fff; border-radius: 5px; min-width: 24px; height: 24px; font-size: 11px; }\n.s-inf .pg button.on { background: #3557e0; color: #fff; border-color: #3557e0; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // infinite + pagination\n  const titles=['Morning standup notes','Hiring plan for Q1','Logo feedback round','Pricing page draft','Customer interview #12','Sprint retro','Bug: login timeout','Launch checklist','Holiday calendar','API rate limits','Design crit recap','Onboarding emails'];\n  const feed=$('#inf-feed');let n=0;\n  function more(k){for(let i=0;i<k&&n<60;i++,n++){const d=document.createElement('div');d.className='it';d.textContent=`#${n+1} ${titles[n%titles.length]}`;feed.appendChild(d)}}\n  more(8);feed.addEventListener('scroll',()=>{if(feed.scrollTop+feed.clientHeight>feed.scrollHeight-20)more(5)},{passive:true});\n  const pf=$('#pg-feed'),pb=$('#pg-btns');let pgi=0;\n  function rp(){pf.innerHTML=Array.from({length:5},(_,i)=>{const k=pgi*5+i;return `<div class=\"it\">#${k+1} ${titles[k%titles.length]}</div>`}).join('');\n    pb.innerHTML=['‹',1,2,3,'›'].map(x=>`<button class=\"${x===pgi+1?'on':''}\" data-p=\"${x}\">${x}</button>`).join('')}\n  pb.addEventListener('click',e=>{const p=e.target.dataset.p;if(!p)return;pgi=p==='‹'?Math.max(0,pgi-1):p==='›'?Math.min(2,pgi+1):p-1;rp()});rp();\n})();"
   }
  },
  {
   "id": "disclosure",
   "title": "Progressive disclosure",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "Show the few options most people need, and hide the rest behind \"Advanced\" or \"Show more\" until someone asks.",
   "goodFor": "Advanced settings and long forms",
   "watchOut": "Hiding options most people need",
   "seenIn": "Vercel and Netlify setup, print dialogs, FAQ accordions",
   "prompt": "Build this UI pattern for my app: Progressive disclosure.\n\nWhat it is: Show the few options most people need, and hide the rest behind \"Advanced\" or \"Show more\" until someone asks.\nGood for: Advanced settings and long forms.\nWatch out: Hiding options most people need.\nSeen in: Vercel and Netlify setup, print dialogs, FAQ accordions\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-prog\">\n    <label for=\"pd-name\">Project name<input id=\"pd-name\" value=\"Q4 launch site\"></label>\n    <label for=\"pd-vis\">Visibility<select id=\"pd-vis\"><option>Private</option><option>Team</option><option>Public</option></select></label>\n    <details>\n      <summary>Advanced settings</summary>\n      <div style=\"display:grid;gap:8px\">\n        <div class=\"two\"><label for=\"pd-region\">Region<select id=\"pd-region\"><option>Mumbai</option><option>Singapore</option></select></label><label for=\"pd-node\">Node version<select id=\"pd-node\"><option>22</option><option>20</option></select></label></div>\n        <label class=\"chk\" for=\"pd-cache\"><input type=\"checkbox\" id=\"pd-cache\" checked=\"\"> Enable build cache</label>\n      </div>\n    </details>\n  </div>\n",
    "css": ":root { --body: \"Figtree\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Figtree */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-prog, .s-prog *, .s-prog *::before, .s-prog *::after { box-sizing: border-box; }\n.s-prog { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-prog button { font: inherit; cursor: pointer; }\n.s-prog { background: #fff; color: #1f2430; padding: 16px 18px; display: grid; gap: 9px; align-content: start; font-size: 12px; overflow: auto; }\n.s-prog label { display: grid; gap: 3px; font-weight: 600; }\n.s-prog input,.s-prog select { border: 1px solid #cfd5dd; border-radius: 6px; padding: 6px 8px; font: 400 12px var(--body); width: 100%; }\n.s-prog details { border: 1px solid #e3e6ec; border-radius: 8px; padding: 8px 10px; }\n.s-prog summary { cursor: pointer; color: #3557e0; font-weight: 600; }\n.s-prog details[open] summary { margin-bottom: 8px; }\n.s-prog .two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }\n.s-prog .chk { display: flex; gap: 6px; align-items: center; font-weight: 400; }\n.s-prog .chk input { width: auto; }",
    "js": ""
   }
  },
  {
   "id": "empty",
   "title": "Empty states & onboarding",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "Left: an empty screen that explains what will appear and how to start. Right: a coach mark that highlights one button during a first-time tour.",
   "goodFor": "First-time screens and zero-results states",
   "watchOut": "Long forced tours; let people skip",
   "seenIn": "Gmail empty inbox, Duolingo, Notion, Asana onboarding",
   "prompt": "Build this UI pattern for my app: Empty states & onboarding.\n\nWhat it is: Left: an empty screen that explains what will appear and how to start. Right: a coach mark that highlights one button during a first-time tour.\nGood for: First-time screens and zero-results states.\nWatch out: Long forced tours; let people skip.\nSeen in: Gmail empty inbox, Duolingo, Notion, Asana onboarding\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-empty\">\n    <div class=\"e\">\n      <svg viewBox=\"0 0 90 70\" aria-hidden=\"true\"><rect x=\"10\" y=\"20\" width=\"70\" height=\"44\" rx=\"6\" fill=\"#eef1ff\" stroke=\"#3557e0\" stroke-width=\"2\"></rect><path d=\"M10 40 H32 L38 48 H52 L58 40 H80\" fill=\"none\" stroke=\"#3557e0\" stroke-width=\"2\"></path><circle cx=\"68\" cy=\"14\" r=\"8\" fill=\"#ffd23f\"></circle></svg>\n      <b>No messages yet</b><span>When customers write in, their messages will show up here.</span><button>Connect email</button>\n    </div>\n    <div class=\"o\">\n      <button class=\"tgt\">+ New project</button>\n      <div class=\"tip\"><b>Create your first project</b><span style=\"color:#666;font-size:11px\">Projects keep tasks, files and people together.</span><div class=\"ft\"><span class=\"dots\"><i class=\"on\"></i><i></i><i></i></span><button>Next</button></div></div>\n    </div>\n  </div>\n",
    "css": "/* base styles the site gives every demo (scoped to this demo) */\n.s-empty, .s-empty *, .s-empty *::before, .s-empty *::after { box-sizing: border-box; }\n.s-empty { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-empty button { font: inherit; cursor: pointer; }\n.s-empty { display: grid; grid-template-columns: 1fr 1fr; background: #fff; color: #1f2430; font-size: 12px; }\n.s-empty .e { display: grid; justify-items: center; align-content: center; text-align: center; gap: 8px; padding: 14px; border-right: 1px solid #eef0f3; }\n.s-empty .e svg { width: 90px; height: 70px; }\n.s-empty .e b { font-size: 14px; }\n.s-empty .e span { color: #777; font-size: 11px; }\n.s-empty .e button { border: 0; background: #3557e0; color: #fff; border-radius: 6px; padding: 6px 12px; font-weight: 600; }\n.s-empty .o { position: relative; background: #f3f4f7; padding: 12px; }\n.s-empty .o .tgt { position: absolute; left: 18px; top: 24px; border: 0; background: #3557e0; color: #fff; border-radius: 6px; padding: 6px 10px; font-size: 11px; box-shadow: 0 0 0 4px rgba(53,87,224,.25),0 0 0 9999px rgba(15,23,42,.35); }\n.s-empty .o .tip { position: absolute; left: 14px; right: 14px; top: 72px; background: #fff; border-radius: 10px; padding: 10px; box-shadow: 0 10px 24px rgba(0,0,0,.2); display: grid; gap: 6px; }\n.s-empty .o .tip::before { content: \"\"; position: absolute; top: -6px; left: 26px; width: 12px; height: 12px; background: #fff; transform: rotate(45deg); }\n.s-empty .o .tip .ft { display: flex; justify-content: space-between; align-items: center; }\n.s-empty .dots { display: flex; gap: 4px; }\n.s-empty .dots i { width: 6px; height: 6px; border-radius: 50%; background: #cfd5de; }\n.s-empty .dots i.on { background: #3557e0; }\n.s-empty .tip button { border: 0; background: #3557e0; color: #fff; border-radius: 5px; padding: 4px 10px; font-size: 11px; }",
    "js": ""
   }
  },
  {
   "id": "swipe",
   "title": "Gesture-based UI",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "Swipe, drag, pinch, long-press and pull-to-refresh instead of buttons.",
   "goodFor": "Fast yes/no choices and list actions on touch",
   "watchOut": "Being the only way to act; add buttons too",
   "seenIn": "Tinder, Bumble, iOS mail swipe actions, Google Photos pinch zoom",
   "prompt": "Build this UI pattern for my app: Gesture-based UI.\n\nWhat it is: Swipe, drag, pinch, long-press and pull-to-refresh instead of buttons.\nGood for: Fast yes/no choices and list actions on touch.\nWatch out: Being the only way to act; add buttons too.\nSeen in: Tinder, Bumble, iOS mail swipe actions, Google Photos pinch zoom\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-swipe\">\n    <span class=\"hint\">drag a card left or right</span>\n    <div class=\"deck\" id=\"deck\"></div>\n    <div class=\"acts\"><button id=\"sw-no\" aria-label=\"Skip\">✕</button><button id=\"sw-yes\" aria-label=\"Like\" style=\"color:#e11d48\">♥</button></div>\n  </div>\n",
    "css": ":root { --body: \"Figtree\",system-ui,sans-serif; --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): Figtree, JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-swipe, .s-swipe *, .s-swipe *::before, .s-swipe *::after { box-sizing: border-box; }\n.s-swipe { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-swipe button { font: inherit; cursor: pointer; }\n.s-swipe { background: linear-gradient(#fff1f2,#ffe4e6); display: grid; place-items: center; }\n.s-swipe .deck { position: relative; width: 170px; height: 210px; }\n.s-swipe .sc { position: absolute; inset: 0; border-radius: 16px; box-shadow: 0 8px 20px rgba(0,0,0,.18); display: flex; flex-direction: column; justify-content: flex-end; padding: 12px; color: #fff; font: 700 16px var(--body); touch-action: pan-y; user-select: none; cursor: grab; transition: transform .3s; }\n.s-swipe .sc small { font-weight: 500; font-size: 11px; opacity: .9; }\n.s-swipe .sc.drag { transition: none; cursor: grabbing; }\n.s-swipe .acts { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 14px; }\n.s-swipe .acts button { width: 38px; height: 38px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.15); font-size: 16px; }\n.s-swipe .hint { position: absolute; top: 8px; left: 0; right: 0; text-align: center; font: 10px var(--mono); color: #9f1239; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // swipe deck\n  const people=[['Ishita, 26','Loves trekking',\"#f472b6,#be185d\"],['Aarav, 28','Coffee and code',\"#60a5fa,#1d4ed8\"],['Zoya, 25','Painter',\"#fbbf24,#ea580c\"],['Vikram, 29','Plays the tabla',\"#34d399,#047857\"]];\n  const deck=$('#deck');\n  function fill(){deck.innerHTML='';people.slice().reverse().forEach(p=>{const c=document.createElement('div');c.className='sc';c.style.background=`linear-gradient(160deg,${p[2]})`;c.innerHTML=`${p[0]}<small>${p[1]}</small>`;deck.appendChild(c);drag(c)})}\n  function top(){return deck.lastElementChild}\n  function fly(c,dir){c.style.transform=`translateX(${dir*260}px) rotate(${dir*25}deg)`;c.style.opacity='0';setTimeout(()=>{c.remove();if(!deck.children.length)setTimeout(fill,400)},300)}\n  function drag(c){let x0=null,dx=0;\n    c.addEventListener('pointerdown',e=>{if(c!==top())return;x0=e.clientX;c.classList.add('drag');c.setPointerCapture(e.pointerId)});\n    c.addEventListener('pointermove',e=>{if(x0===null)return;dx=e.clientX-x0;c.style.transform=`translateX(${dx}px) rotate(${dx/12}deg)`});\n    const end=()=>{if(x0===null)return;c.classList.remove('drag');x0=null;if(Math.abs(dx)>70)fly(c,Math.sign(dx));else c.style.transform='';dx=0};\n    c.addEventListener('pointerup',end);c.addEventListener('pointercancel',end)}\n  $('#sw-no').addEventListener('click',()=>top()&&fly(top(),-1));$('#sw-yes').addEventListener('click',()=>top()&&fly(top(),1));fill();\n})();"
   }
  },
  {
   "id": "chat",
   "title": "Conversational UI",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "Users get things done by chatting, with quick-reply buttons for common answers.",
   "goodFor": "Support, open questions, AI assistants",
   "watchOut": "Tasks a simple form does faster",
   "seenIn": "ChatGPT, Claude, Siri, bank and airline support bots",
   "prompt": "Build this UI pattern for my app: Conversational UI.\n\nWhat it is: Users get things done by chatting, with quick-reply buttons for common answers.\nGood for: Support, open questions, AI assistants.\nWatch out: Tasks a simple form does faster.\nSeen in: ChatGPT, Claude, Siri, bank and airline support bots\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-chat\">\n    <div class=\"hd\"><i></i>Support assistant</div>\n    <div class=\"log\" id=\"chat-log\">\n      <div class=\"m b\">Hi! What can I help you with today?</div>\n      <div class=\"m u\">Where is my order?</div>\n      <div class=\"m b\">Order #48213 left the warehouse today and should arrive Monday.</div>\n      <div class=\"qr\"><button>Track package</button><button>Change address</button></div>\n    </div>\n    <form id=\"chat-form\"><input id=\"chat-in\" placeholder=\"Type a message\" aria-label=\"Message\"><button type=\"submit\">Send</button></form>\n  </div>\n",
    "css": "/* base styles the site gives every demo (scoped to this demo) */\n.s-chat, .s-chat *, .s-chat *::before, .s-chat *::after { box-sizing: border-box; }\n.s-chat { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-chat button { font: inherit; cursor: pointer; }\n.s-chat { background: #fff; display: grid; grid-template-rows: auto 1fr auto; font-size: 12px; color: #1f2430; }\n.s-chat .hd { padding: 9px 12px; border-bottom: 1px solid #eef0f3; display: flex; gap: 8px; align-items: center; font-weight: 600; }\n.s-chat .hd i { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg,#3557e0,#22c1c3); }\n.s-chat .log { overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 7px; }\n.s-chat .m { max-width: 78%; padding: 7px 10px; border-radius: 14px; line-height: 1.35; }\n.s-chat .m.u { align-self: flex-end; background: #3557e0; color: #fff; border-bottom-right-radius: 4px; }\n.s-chat .m.b { align-self: flex-start; background: #eef0f4; border-bottom-left-radius: 4px; }\n.s-chat .qr { display: flex; gap: 5px; flex-wrap: wrap; }\n.s-chat .qr button { border: 1px solid #3557e0; color: #3557e0; background: #fff; border-radius: 999px; padding: 3px 9px; font-size: 11px; }\n.s-chat form { display: flex; gap: 6px; padding: 8px; border-top: 1px solid #eef0f3; }\n.s-chat input { flex: 1; min-width: 0; border: 1px solid #d6dae1; border-radius: 999px; padding: 6px 12px; font: inherit; }\n.s-chat form button { border: 0; background: #3557e0; color: #fff; border-radius: 999px; padding: 0 14px; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // chat\n  const log=$('#chat-log'),cf=$('#chat-form'),cin=$('#chat-in');\n  function say(t,who){const d=document.createElement('div');d.className='m '+who;d.textContent=t;log.appendChild(d);log.scrollTop=log.scrollHeight}\n  const replies=['Thanks! I have passed that to the delivery team.','Sure. Your package is in Nagpur and on schedule.','Done. You will get an SMS with the new address.'];let ri=0;\n  cf.addEventListener('submit',e=>{e.preventDefault();const t=cin.value.trim();if(!t)return;say(t,'u');cin.value='';setTimeout(()=>say(replies[ri++%3],'b'),600)});\n  $$('#chat-log .qr button').forEach(b=>b.addEventListener('click',()=>{say(b.textContent,'u');setTimeout(()=>say(replies[ri++%3],'b'),600)}));\n})();"
   }
  },
  {
   "id": "modal",
   "title": "Modals & toasts",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "A modal blocks the page to ask for a decision. A toast is a short message at the bottom that confirms what happened and disappears.",
   "goodFor": "Confirming destructive actions",
   "watchOut": "Interrupting for things that can wait",
   "seenIn": "GitHub delete dialogs, Gmail \"Message sent · Undo\"",
   "prompt": "Build this UI pattern for my app: Modals & toasts.\n\nWhat it is: A modal blocks the page to ask for a decision. A toast is a short message at the bottom that confirms what happened and disappears.\nGood for: Confirming destructive actions.\nWatch out: Interrupting for things that can wait.\nSeen in: GitHub delete dialogs, Gmail \"Message sent · Undo\"\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-modal\">\n    <div class=\"pgc\"><b style=\"font-size:14px\">Project settings</b><div class=\"ln\" style=\"width:80%;background:#d6dbe4\"></div><div class=\"ln\" style=\"width:60%;background:#d6dbe4\"></div><button id=\"mo-open\">Delete project</button></div>\n    <div class=\"ov\" id=\"mo-ov\">\n      <div class=\"dlg\" role=\"dialog\" aria-labelledby=\"mo-t\"><b id=\"mo-t\">Delete \"Q4 launch site\"?</b><span style=\"color:#555\">This removes all 24 files. You can undo for 10 seconds.</span><div class=\"acts\"><button id=\"mo-cancel\">Cancel</button><button class=\"del\" id=\"mo-del\">Delete</button></div></div>\n    </div>\n    <div class=\"toast\" id=\"mo-toast\" hidden=\"\">Project deleted<button id=\"mo-undo\">Undo</button></div>\n  </div>\n",
    "css": "/* base styles the site gives every demo (scoped to this demo) */\n.s-modal, .s-modal *, .s-modal *::before, .s-modal *::after { box-sizing: border-box; }\n.s-modal { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-modal button { font: inherit; cursor: pointer; }\n[hidden] { display: none !important; }\n.ln { height: 6px; border-radius: 3px; background: #d6dbe4; }\n.s-modal { background: #f3f4f7; font-size: 12px; color: #1f2430; }\n.s-modal .pgc { padding: 14px; display: grid; gap: 8px; }\n.s-modal .pgc button { justify-self: start; border: 1px solid #dc2626; color: #dc2626; background: #fff; border-radius: 6px; padding: 6px 12px; }\n.s-modal .ov { position: absolute; inset: 0; background: rgba(15,23,42,.45); display: grid; place-items: center; padding: 14px; }\n.s-modal .dlg { background: #fff; border-radius: 12px; padding: 16px; width: min(100%,260px); display: grid; gap: 8px; box-shadow: 0 20px 40px rgba(0,0,0,.3); }\n.s-modal .dlg b { font-size: 14px; }\n.s-modal .dlg .acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }\n.s-modal .dlg button { border: 1px solid #d6dae1; background: #fff; border-radius: 6px; padding: 6px 12px; }\n.s-modal .dlg button.del { background: #dc2626; border-color: #dc2626; color: #fff; }\n.s-modal .toast { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); background: #111827; color: #fff; border-radius: 8px; padding: 8px 14px; display: flex; gap: 12px; align-items: center; white-space: nowrap; box-shadow: 0 8px 20px rgba(0,0,0,.25); }\n.s-modal .toast button { background: none; border: 0; color: #93c5fd; font-weight: 600; padding: 0; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // modal + toast\n  const ov=$('#mo-ov'),toast=$('#mo-toast');let tt;\n  $('#mo-open').addEventListener('click',()=>{ov.hidden=false;toast.hidden=true});\n  $('#mo-cancel').addEventListener('click',()=>ov.hidden=true);\n  $('#mo-del').addEventListener('click',()=>{ov.hidden=true;toast.hidden=false;clearTimeout(tt);tt=setTimeout(()=>toast.hidden=true,4000)});\n  $('#mo-undo').addEventListener('click',()=>{toast.hidden=true});\n})();"
   }
  },
  {
   "id": "darkpat",
   "title": "Dark patterns",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "Tricks that push people into choices they didn't intend: fake timers, pre-ticked add-ons, fees revealed late, and guilt-trip opt-out links. Know them so you never ship them.",
   "goodFor": "Spotting and removing them in design reviews",
   "watchOut": "Ever shipping them; they break trust and often the law",
   "seenIn": "some travel and ticketing checkouts, hard-to-cancel subscriptions",
   "prompt": "Build this UI pattern for my app: Dark patterns.\n\nWhat it is: Tricks that push people into choices they didn't intend: fake timers, pre-ticked add-ons, fees revealed late, and guilt-trip opt-out links. Know them so you never ship them.\nGood for: Spotting and removing them in design reviews.\nWatch out: Ever shipping them; they break trust and often the law.\nSeen in: some travel and ticketing checkouts, hard-to-cancel subscriptions\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-dark-p\">\n    <div class=\"timer\"><span>Offer ends in<span class=\"flag\">FAKE URGENCY</span></span><span id=\"dp-t\">04:59</span></div>\n    <div class=\"row\"><span>Flight DEL → BOM</span><b>₹5,480</b></div>\n    <label class=\"chk\" for=\"dp-ins\"><input type=\"checkbox\" id=\"dp-ins\" checked=\"\"> Add travel insurance ₹499<span class=\"flag\">PRE-CHECKED</span></label>\n    <div class=\"row\"><span>Convenience fee<span class=\"flag\">HIDDEN COST</span></span><b>₹349</b></div>\n    <button class=\"pay\">Pay ₹6,328</button>\n    <span class=\"shame\">No thanks, I don't care about my safety<span class=\"flag\">CONFIRMSHAMING</span></span>\n  </div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-dark-p, .s-dark-p *, .s-dark-p *::before, .s-dark-p *::after { box-sizing: border-box; }\n.s-dark-p { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-dark-p button { font: inherit; cursor: pointer; }\n.s-dark-p { background: #fff; color: #1f2430; padding: 14px 16px; display: grid; gap: 8px; align-content: start; font-size: 12px; }\n.s-dark-p .timer { background: #fef2f2; color: #b91c1c; border-radius: 6px; padding: 6px 10px; font-weight: 700; display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }\n.s-dark-p .row { display: flex; justify-content: space-between; border-bottom: 1px solid #f0f1f4; padding: 5px 0; }\n.s-dark-p .chk { display: flex; gap: 6px; align-items: center; }\n.s-dark-p .pay { background: #16a34a; color: #fff; border: 0; border-radius: 8px; padding: 9px; font-weight: 700; font-size: 13px; }\n.s-dark-p .shame { text-align: center; font-size: 10px; color: #9ca3af; text-decoration: underline; }\n.s-dark-p .flag { font: 700 9px var(--mono); color: #fff; background: #dc2626; border-radius: 3px; padding: 1px 5px; margin-left: 6px; vertical-align: middle; letter-spacing: .04em; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // fake countdown\n  let s=299;const dt=$('#dp-t');setInterval(()=>{s=s<=0?299:s-1;dt.textContent=String(Math.floor(s/60)).padStart(2,'0')+':'+String(s%60).padStart(2,'0')},1000);\n})();"
   }
  },
  {
   "id": "validation",
   "title": "Inline form validation",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "Fields check themselves as you type and say exactly how to fix the problem, with a live password strength meter.",
   "goodFor": "Sign-up, checkout, any important form",
   "watchOut": "Showing errors before someone finishes typing",
   "seenIn": "Stripe checkout, Google account sign-up",
   "prompt": "Build this UI pattern for my app: Inline form validation.\n\nWhat it is: Fields check themselves as you type and say exactly how to fix the problem, with a live password strength meter.\nGood for: Sign-up, checkout, any important form.\nWatch out: Showing errors before someone finishes typing.\nSeen in: Stripe checkout, Google account sign-up\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-val\">\n    <form id=\"val\" novalidate=\"\">\n      <label for=\"v-email\">Email</label><input id=\"v-email\" type=\"email\" value=\"neha@brewly\" autocomplete=\"off\"><span class=\"msg\" id=\"v-em\"></span>\n      <label for=\"v-pw\">Password</label><input id=\"v-pw\" type=\"password\" value=\"Coffee1\" autocomplete=\"off\"><div class=\"mt\"><i id=\"v-bar\"></i></div><span class=\"msg\" id=\"v-pm\"></span>\n      <button type=\"submit\">Create account</button>\n    </form>\n  </div>\n",
    "css": ":root { --body: \"Figtree\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Figtree */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-val, .s-val *, .s-val *::before, .s-val *::after { box-sizing: border-box; }\n.s-val { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-val button { font: inherit; cursor: pointer; }\n.s-val { background: #fff; color: #1f2430; padding: 14px 20px; font-size: 12px; overflow: auto; }\n.s-val form { display: grid; gap: 4px; }\n.s-val label { font-weight: 600; margin-top: 4px; }\n.s-val input { border: 1.5px solid #cfd5dd; border-radius: 7px; padding: 8px 10px; font: 13px var(--body); color: #1f2430; }\n.s-val input.bad { border-color: #dc2626; background: #fef2f2; }\n.s-val input.ok { border-color: #16a34a; }\n.s-val .msg { font-size: 11px; min-height: 15px; }\n.s-val .msg.bad { color: #dc2626; }\n.s-val .msg.ok { color: #16a34a; }\n.s-val .mt { height: 5px; background: #eceef2; border-radius: 3px; overflow: hidden; }\n.s-val .mt i { display: block; height: 100%; width: 0; transition: width .2s,background .2s; }\n.s-val button { margin-top: 6px; border: 0; background: #3557e0; color: #fff; border-radius: 7px; padding: 9px; font-weight: 600; }\n.s-val button:disabled { background: #a9b6ec; cursor: not-allowed; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // inline validation\n  (() => { const e = $('#v-email'), p = $('#v-pw'), em = $('#v-em'), pm = $('#v-pm'), bar = $('#v-bar'), btn = $('#val button'); if (!e) return;\n    const set = (inp, msg, ok, t) => { inp.classList.toggle('bad', !ok); inp.classList.toggle('ok', ok); msg.className = 'msg ' + (ok ? 'ok' : 'bad'); msg.textContent = t; };\n    const ve = () => { const v = e.value.trim();\n      if (!v) { set(e, em, false, 'Enter your email address.'); return false; }\n      if (!/^[^@\\s]+@[^@\\s]+$/.test(v)) { set(e, em, false, 'An email needs an @, like name@example.com.'); return false; }\n      if (!/^[^@\\s]+@[^@\\s]+\\.[a-z]{2,}$/i.test(v)) { set(e, em, false, 'Add a domain ending, like .com or .in.'); return false; }\n      set(e, em, true, 'Looks good.'); return true; };\n    const vp = () => { const v = p.value; let s = 0; if (v.length >= 8) s++; if (/\\d/.test(v)) s++; if (/[A-Z]/.test(v)) s++; if (/[^A-Za-z0-9]/.test(v)) s++;\n      bar.style.width = (s * 25 || 6) + '%'; bar.style.background = ['#dc2626', '#f97316', '#eab308', '#22c55e', '#16a34a'][s];\n      const miss = []; if (v.length < 8) miss.push(`${8 - v.length} more character${8 - v.length > 1 ? 's' : ''}`); if (!/\\d/.test(v)) miss.push('a number');\n      const ok = !miss.length; set(p, pm, ok, ok ? (s >= 4 ? 'Strong password.' : 'Good. A symbol or capital letter makes it stronger.') : 'Add ' + miss.join(' and ') + '.'); return ok; };\n    const all = () => { const a = ve(), b = vp(); btn.disabled = !(a && b); };\n    e.addEventListener('input', all); p.addEventListener('input', all);\n    $('#val').addEventListener('submit', ev => { ev.preventDefault(); btn.textContent = 'Account created ✓'; }); all();\n  })();\n})();"
   }
  },
  {
   "id": "facets",
   "title": "Faceted search & filters",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "Checkboxes narrow a list by several attributes at once, with a live result count and removable filter chips. Tick some filters.",
   "goodFor": "Large catalogs and search results",
   "watchOut": "Small lists that fit on one screen",
   "seenIn": "Amazon, Flipkart, Myntra, Airbnb",
   "prompt": "Build this UI pattern for my app: Faceted search & filters.\n\nWhat it is: Checkboxes narrow a list by several attributes at once, with a live result count and removable filter chips. Tick some filters.\nGood for: Large catalogs and search results.\nWatch out: Small lists that fit on one screen.\nSeen in: Amazon, Flipkart, Myntra, Airbnb\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-fac\">\n    <div class=\"fl\"><b>Brand</b><label for=\"fac-b1\"><input type=\"checkbox\" id=\"fac-b1\" value=\"Aero\" data-k=\"brand\">Aero</label><label for=\"fac-b2\"><input type=\"checkbox\" id=\"fac-b2\" value=\"Stride\" data-k=\"brand\">Stride</label><label for=\"fac-b3\"><input type=\"checkbox\" id=\"fac-b3\" value=\"Kora\" data-k=\"brand\">Kora</label><b>Price</b><label for=\"fac-p\"><input type=\"checkbox\" id=\"fac-p\">Under ₹3,000</label><b>Rating</b><label for=\"fac-r\"><input type=\"checkbox\" id=\"fac-r\" checked=\"\">4★ &amp; up</label></div>\n    <div class=\"rs\"><div class=\"ct\"><b id=\"fac-n\">4</b> results <button id=\"fac-clr\">Clear all</button></div><div class=\"chips\" id=\"fac-chips\"></div><ul id=\"fac-list\"></ul></div>\n  </div>\n",
    "css": "/* base styles the site gives every demo (scoped to this demo) */\n.s-fac, .s-fac *, .s-fac *::before, .s-fac *::after { box-sizing: border-box; }\n.s-fac { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-fac button { font: inherit; cursor: pointer; }\n.s-fac { background: #fff; color: #1f2430; display: grid; grid-template-columns: 120px 1fr; font-size: 12px; }\n.s-fac .fl { padding: 12px; border-right: 1px solid #eef0f3; display: grid; gap: 4px; align-content: start; }\n.s-fac .fl b { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: #888; margin-top: 6px; }\n.s-fac label { display: flex; gap: 6px; align-items: center; }\n.s-fac .rs { padding: 12px; display: grid; gap: 8px; align-content: start; min-width: 0; }\n.s-fac .ct { display: flex; gap: 4px; align-items: center; }\n.s-fac .ct button { margin-left: auto; border: 0; background: none; color: #3557e0; font-size: 11px; font-weight: 600; }\n.s-fac .chips { display: flex; flex-wrap: wrap; gap: 4px; }\n.s-fac .chips span { background: #eef1ff; color: #3557e0; border-radius: 999px; padding: 2px 8px; font-size: 10px; }\n.s-fac ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }\n.s-fac li { display: flex; justify-content: space-between; gap: 6px; border: 1px solid #eef0f3; border-radius: 6px; padding: 6px 8px; }\n.s-fac li span { color: #777; white-space: nowrap; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  const on = (sel, ev, fn) => { const el = $(sel); if (el) el.addEventListener(ev, fn); return el; };\n\n  // faceted filters\n  (() => { const P = [['Aero Run 2', 'Aero', 2799, 4.5], ['Aero Glide', 'Aero', 4499, 4.2], ['Stride Lite', 'Stride', 1999, 3.9], ['Stride Pro', 'Stride', 3599, 4.6], ['Kora Trail', 'Kora', 3299, 4.1], ['Kora Flex', 'Kora', 2499, 3.8]];\n    const cb = $$('.s-fac input'), ul = $('#fac-list'), n = $('#fac-n'), ch = $('#fac-chips'); if (!ul) return;\n    const fmt = x => '₹' + x.toLocaleString('en-IN');\n    const r = () => { const br = cb.filter(c => c.dataset.k === 'brand' && c.checked).map(c => c.value), cheap = $('#fac-p').checked, top = $('#fac-r').checked;\n      const f = P.filter(p => (!br.length || br.includes(p[1])) && (!cheap || p[2] < 3000) && (!top || p[3] >= 4));\n      n.textContent = f.length; ch.innerHTML = cb.filter(c => c.checked).map(c => `<span>${c.parentNode.textContent.trim()}</span>`).join('');\n      ul.innerHTML = f.map(p => `<li><b>${p[0]}</b><span>${fmt(p[2])} · ★${p[3]}</span></li>`).join('') || '<li>No shoes match. Remove a filter.</li>'; };\n    cb.forEach(c => c.addEventListener('change', r)); on('#fac-clr', 'click', () => { cb.forEach(c => c.checked = false); r(); }); r();\n  })();\n})();"
   }
  },
  {
   "id": "autocomplete",
   "title": "Autocomplete",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "Suggestions appear as you type, with the matching letters highlighted and keyboard support.",
   "goodFor": "Cities, addresses, products, people",
   "watchOut": "Fields with few options; use a select",
   "seenIn": "Google Maps, food delivery address fields, Uber",
   "prompt": "Build this UI pattern for my app: Autocomplete.\n\nWhat it is: Suggestions appear as you type, with the matching letters highlighted and keyboard support.\nGood for: Cities, addresses, products, people.\nWatch out: Fields with few options; use a select.\nSeen in: Google Maps, food delivery address fields, Uber\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-ac\"><label for=\"ac-in\">Deliver to city</label><div><input id=\"ac-in\" value=\"Ba\" autocomplete=\"off\" role=\"combobox\" aria-expanded=\"true\" aria-controls=\"ac-list\" aria-autocomplete=\"list\"><ul id=\"ac-list\" role=\"listbox\" aria-label=\"City suggestions\"></ul></div><small>Type to search · ↑ ↓ to move · Enter to pick</small></div>\n",
    "css": ":root { --body: \"Figtree\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Figtree */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-ac, .s-ac *, .s-ac *::before, .s-ac *::after { box-sizing: border-box; }\n.s-ac { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-ac button { font: inherit; cursor: pointer; }\n.s-ac { background: #fff; color: #1f2430; padding: 20px; display: grid; gap: 6px; align-content: start; font-size: 12px; }\n.s-ac label { font-weight: 600; }\n.s-ac input { width: 100%; border: 1.5px solid #3557e0; border-radius: 8px; padding: 9px 11px; font: 13px var(--body); box-shadow: 0 0 0 3px rgba(53,87,224,.15); outline: none; color: #1f2430; }\n.s-ac ul { list-style: none; margin: 4px 0 0; padding: 4px; border: 1px solid #e3e6ec; border-radius: 8px; box-shadow: 0 10px 24px rgba(0,0,0,.1); max-height: 150px; overflow: auto; background: #fff; }\n.s-ac li { padding: 6px 8px; border-radius: 5px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }\n.s-ac li b { font-weight: 400; }\n.s-ac li span { color: #999; font-size: 10px; }\n.s-ac li.on,.s-ac li:hover { background: #eef1ff; }\n.s-ac mark { background: none; color: #3557e0; font-weight: 700; }\n.s-ac small { color: #888; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // autocomplete\n  (() => { const C = [['Bengaluru', 'Karnataka'], ['Bhopal', 'Madhya Pradesh'], ['Bhubaneswar', 'Odisha'], ['Bareilly', 'Uttar Pradesh'], ['Bathinda', 'Punjab'], ['Chennai', 'Tamil Nadu'], ['Coimbatore', 'Tamil Nadu'], ['Dehradun', 'Uttarakhand'], ['Delhi', 'Delhi'], ['Hyderabad', 'Telangana'], ['Indore', 'Madhya Pradesh'], ['Jaipur', 'Rajasthan'], ['Kochi', 'Kerala'], ['Kolkata', 'West Bengal'], ['Lucknow', 'Uttar Pradesh'], ['Mumbai', 'Maharashtra'], ['Mysuru', 'Karnataka'], ['Nagpur', 'Maharashtra'], ['Patna', 'Bihar'], ['Pune', 'Maharashtra'], ['Surat', 'Gujarat'], ['Vadodara', 'Gujarat'], ['Varanasi', 'Uttar Pradesh'], ['Visakhapatnam', 'Andhra Pradesh']];\n    const i = $('#ac-in'), ul = $('#ac-list'); if (!i) return; let k = 0, f = [];\n    const esc = s => s.replace(/[&<>]/g, c => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;' }[c]));\n    const r = () => { const q = i.value.trim().toLowerCase();\n      f = q ? C.filter(c => c[0].toLowerCase().includes(q)).sort((a, b) => a[0].toLowerCase().indexOf(q) - b[0].toLowerCase().indexOf(q)) : []; k = 0;\n      ul.hidden = !q; i.setAttribute('aria-expanded', f.length > 0);\n      ul.innerHTML = f.length ? f.map((c, j) => { const s = c[0].toLowerCase().indexOf(q);\n        return `<li role=\"option\" class=\"${j === k ? 'on' : ''}\"><b>${esc(c[0].slice(0, s))}<mark>${esc(c[0].slice(s, s + q.length))}</mark>${esc(c[0].slice(s + q.length))}</b><span>${c[1]}</span></li>`; }).join('') : (q ? '<li>No city found. Check the spelling.</li>' : ''); };\n    const pick = j => { if (!f[j]) return; i.value = f[j][0]; ul.hidden = true; i.setAttribute('aria-expanded', 'false'); };\n    ul.addEventListener('click', e => { const li = e.target.closest('li'); if (li) pick([...ul.children].indexOf(li)); });\n    i.addEventListener('keydown', e => {\n      if (e.key === 'ArrowDown' || e.key === 'ArrowUp') { e.preventDefault(); if (!f.length) return; k = (k + (e.key === 'ArrowDown' ? 1 : -1) + f.length) % f.length; [...ul.children].forEach((l, j) => l.classList.toggle('on', j === k)); }\n      else if (e.key === 'Enter') { e.preventDefault(); pick(k); } else if (e.key === 'Escape') ul.hidden = true; });\n    i.addEventListener('input', r); r();\n  })();\n})();"
   }
  },
  {
   "id": "datatable",
   "title": "Sortable data table",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "Rows of records with a sticky header.",
   "goodFor": "Comparing many records across columns",
   "watchOut": "Phones; switch to cards or a list",
   "seenIn": "Google Sheets, Airtable, admin panels, analytics tools",
   "prompt": "Build this UI pattern for my app: Sortable data table.\n\nWhat it is: Rows of records with a sticky header.\nGood for: Comparing many records across columns.\nWatch out: Phones; switch to cards or a list.\nSeen in: Google Sheets, Airtable, admin panels, analytics tools\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-tbl\"><div class=\"wrap2\"><table id=\"tbl\"><thead><tr><th><button>Name</button></th><th><button>Team</button></th><th class=\"n\"><button>Tasks</button></th><th class=\"n\"><button>On time</button></th></tr></thead><tbody></tbody></table></div></div>\n",
    "css": "/* base styles the site gives every demo (scoped to this demo) */\n.s-tbl, .s-tbl *, .s-tbl *::before, .s-tbl *::after { box-sizing: border-box; }\n.s-tbl { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-tbl button { font: inherit; cursor: pointer; }\n.s-tbl { background: #fff; color: #1f2430; padding: 12px; font-size: 12px; }\n.s-tbl .wrap2 { overflow: auto; height: 100%; border: 1px solid #e9ebf0; border-radius: 8px; }\n.s-tbl table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }\n.s-tbl th { position: sticky; top: 0; background: #f7f8fa; text-align: left; border-bottom: 1px solid #e9ebf0; padding: 0; }\n.s-tbl th button { all: unset; cursor: pointer; display: block; padding: 8px 10px; font-weight: 600; font-size: 11px; width: 100%; box-sizing: border-box; }\n.s-tbl th button:focus-visible { outline: 2px solid #3557e0; outline-offset: -2px; }\n.s-tbl th.n,.s-tbl td.n { text-align: right; }\n.s-tbl th[aria-sort=\"ascending\"] button::after { content: \" ▲\"; color: #3557e0; }\n.s-tbl th[aria-sort=\"descending\"] button::after { content: \" ▼\"; color: #3557e0; }\n.s-tbl td { padding: 7px 10px; border-bottom: 1px solid #f1f2f5; white-space: nowrap; }\n.s-tbl tr:hover td { background: #fafbff; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // sortable table\n  (() => { const D = [['Aditi Rao', 'Design', 42, 96], ['Kabir Sen', 'Engineering', 57, 88], ['Meera Iyer', 'Engineering', 38, 92], ['Rohan Shah', 'Product', 21, 99], ['Zoya Khan', 'Design', 33, 85], ['Vikram Das', 'Support', 64, 90]];\n    const tb = $('#tbl tbody'), th = $$('#tbl th'); if (!tb) return; let sk = 2, dir = -1;\n    const r = () => { const d = D.slice().sort((a, b) => (typeof a[sk] === 'number' ? a[sk] - b[sk] : a[sk].localeCompare(b[sk])) * dir);\n      tb.innerHTML = d.map(x => `<tr><td>${x[0]}</td><td>${x[1]}</td><td class=\"n\">${x[2]}</td><td class=\"n\">${x[3]}%</td></tr>`).join('');\n      th.forEach((h, i) => h.setAttribute('aria-sort', i === sk ? (dir > 0 ? 'ascending' : 'descending') : 'none')); };\n    th.forEach((h, i) => h.querySelector('button').addEventListener('click', () => { dir = i === sk ? -dir : (typeof D[0][i] === 'number' ? -1 : 1); sk = i; r(); })); r();\n  })();\n})();"
   }
  },
  {
   "id": "dragdrop",
   "title": "Drag and drop reorder",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "Grab a handle and drag items into a new order. Numbers update as you drop.",
   "goodFor": "Reordering, kanban, file upload",
   "watchOut": "Being the only way to reorder; add keyboard options",
   "seenIn": "Spotify playlists, Trello, Notion blocks",
   "prompt": "Build this UI pattern for my app: Drag and drop reorder.\n\nWhat it is: Grab a handle and drag items into a new order. Numbers update as you drop.\nGood for: Reordering, kanban, file upload.\nWatch out: Being the only way to reorder; add keyboard options.\nSeen in: Spotify playlists, Trello, Notion blocks\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-dnd\">\n    <b>Your playlist order</b>\n    <ol id=\"dnd\"><li><span class=\"h\">⋮⋮</span><i style=\"background:#f472b6\"></i><span class=\"ti\">Monsoon Letters<small>3:42</small></span></li><li><span class=\"h\">⋮⋮</span><i style=\"background:#60a5fa\"></i><span class=\"ti\">Old City Lights<small>4:05</small></span></li><li><span class=\"h\">⋮⋮</span><i style=\"background:#fbbf24\"></i><span class=\"ti\">Slow Train to Goa<small>3:18</small></span></li><li><span class=\"h\">⋮⋮</span><i style=\"background:#34d399\"></i><span class=\"ti\">Neon Chai<small>2:57</small></span></li><li><span class=\"h\">⋮⋮</span><i style=\"background:#a78bfa\"></i><span class=\"ti\">Hill Station<small>4:21</small></span></li></ol>\n    <small>Drag the ⋮⋮ handle to reorder</small>\n  </div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-dnd, .s-dnd *, .s-dnd *::before, .s-dnd *::after { box-sizing: border-box; }\n.s-dnd { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-dnd button { font: inherit; cursor: pointer; }\n.s-dnd { background: #f3f4f7; color: #1f2430; padding: 10px 18px; display: grid; gap: 6px; align-content: start; font-size: 12px; }\n.s-dnd ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: n; }\n.s-dnd li { background: #fff; border-radius: 8px; padding: 4px 10px; display: flex; gap: 10px; align-items: center; box-shadow: 0 1px 2px rgba(0,0,0,.06); }\n.s-dnd li::before { counter-increment: n; content: counter(n); width: 14px; color: #999; font: 11px var(--mono); }\n.s-dnd .h { cursor: grab; color: #9aa0aa; letter-spacing: -2px; touch-action: none; padding: 4px; }\n.s-dnd li i { width: 26px; height: 26px; border-radius: 5px; flex: none; }\n.s-dnd .ti { display: grid; flex: 1; }\n.s-dnd small { color: #888; }\n.s-dnd .sortable-ghost { opacity: .4; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // loads SortableJS (drag and drop) from a CDN, then runs the demo\n  const whenSortable = fn => { if (window.Sortable) return fn(); const s = document.createElement('script'); s.src = 'https://cdnjs.cloudflare.com/ajax/libs/Sortable/1.15.2/Sortable.min.js'; s.onload = fn; document.head.append(s); };\n\n  whenSortable(() => {\n    const Srt = window.Sortable;\n\n    // drag & drop reorder\n    if (Srt && $('#dnd')) new Srt($('#dnd'), { handle: '.h', animation: 150 });\n  });\n})();"
   }
  },
  {
   "id": "optimistic",
   "title": "Optimistic UI",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "The change shows up instantly while it saves in the background, and only asks you to retry if saving fails.",
   "goodFor": "Likes, messages, small edits that rarely fail",
   "watchOut": "Payments and actions that must be confirmed",
   "seenIn": "WhatsApp messages, Instagram likes, Linear, Todoist",
   "prompt": "Build this UI pattern for my app: Optimistic UI.\n\nWhat it is: The change shows up instantly while it saves in the background, and only asks you to retry if saving fails.\nGood for: Likes, messages, small edits that rarely fail.\nWatch out: Payments and actions that must be confirmed.\nSeen in: WhatsApp messages, Instagram likes, Linear, Todoist\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-opt\">\n    <form id=\"opt-f\"><input id=\"opt-in\" value=\"Book flight to Kochi\" aria-label=\"New task\"><button>Add</button></form>\n    <label class=\"fail\" for=\"opt-fail\"><input type=\"checkbox\" id=\"opt-fail\"> Simulate network failure</label>\n    <ul id=\"opt-l\"><li><span>Send invoice to client</span><em>Saved ✓</em></li><li><span>Renew domain</span><em>Saved ✓</em></li></ul>\n  </div>\n",
    "css": ":root { --body: \"Figtree\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Figtree */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-opt, .s-opt *, .s-opt *::before, .s-opt *::after { box-sizing: border-box; }\n.s-opt { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-opt button { font: inherit; cursor: pointer; }\n.s-opt { background: #fff; color: #1f2430; padding: 16px 18px; display: grid; gap: 8px; align-content: start; font-size: 12px; }\n.s-opt form { display: flex; gap: 6px; }\n.s-opt form input { flex: 1; min-width: 0; border: 1px solid #cfd5dd; border-radius: 7px; padding: 8px 10px; font: 13px var(--body); color: #1f2430; }\n.s-opt form button { border: 0; background: #3557e0; color: #fff; border-radius: 7px; padding: 0 14px; font-weight: 600; }\n.s-opt .fail { display: flex; gap: 6px; align-items: center; color: #666; font-size: 11px; }\n.s-opt ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }\n.s-opt li { display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 1px solid #eef0f3; border-radius: 7px; padding: 7px 10px; animation: fadeIn .25s; }\n.s-opt li em { font-style: normal; font-size: 10px; color: #16a34a; white-space: nowrap; }\n.s-opt li.pend { color: #888; }\n.s-opt li.pend em { color: #888; }\n.s-opt li.err { border-color: #fecaca; background: #fef2f2; }\n.s-opt li.err em { color: #dc2626; }\n.s-opt li em button { border: 0; background: none; color: #3557e0; font-weight: 600; font-size: 11px; padding: 0; margin-left: 6px; }\n@keyframes fadeIn {\n  from{opacity:0;transform:translateY(-4px)}\n}\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // optimistic UI\n  (() => { const f = $('#opt-f'), i = $('#opt-in'), l = $('#opt-l'), fail = $('#opt-fail'); if (!f) return;\n    const save = li => { li.className = 'pend'; $('em', li).textContent = 'Saving…';\n      setTimeout(() => { if (fail.checked) { li.className = 'err'; $('em', li).innerHTML = 'Not saved<button type=\"button\">Retry</button>'; $('em button', li).addEventListener('click', () => save(li)); }\n        else { li.className = ''; $('em', li).textContent = 'Saved ✓'; } }, 900); };\n    f.addEventListener('submit', e => { e.preventDefault(); const t = i.value.trim(); if (!t) return; const li = document.createElement('li'); li.innerHTML = '<span></span><em></em>'; li.firstChild.textContent = t; l.prepend(li); save(li); i.value = ''; });\n  })();\n})();"
   }
  },
  {
   "id": "notifications",
   "title": "Notification center",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "A bell with an unread count opens a panel of recent activity. Unread items are tinted and dotted.",
   "goodFor": "Updates people need to act on",
   "watchOut": "Marketing noise; respect quiet hours",
   "seenIn": "GitHub, LinkedIn, Slack, Figma",
   "prompt": "Build this UI pattern for my app: Notification center.\n\nWhat it is: A bell with an unread count opens a panel of recent activity. Unread items are tinted and dotted.\nGood for: Updates people need to act on.\nWatch out: Marketing noise; respect quiet hours.\nSeen in: GitHub, LinkedIn, Slack, Figma\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-ntf\">\n    <div class=\"tb\"><b>Workspace</b><button class=\"bell\" id=\"ntf-b\" aria-expanded=\"true\" aria-label=\"Notifications, 3 unread\"><svg viewBox=\"0 0 24 24\" width=\"20\" height=\"20\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\"><path d=\"M6 16V11a6 6 0 0 1 12 0v5l2 2H4z\"></path><path d=\"M10 20a2 2 0 0 0 4 0\"></path></svg><span class=\"bdg\" id=\"ntf-c\">3</span></button></div>\n    <div class=\"pnl\" id=\"ntf-p\">\n      <div class=\"ph\"><b>Notifications</b><button id=\"ntf-r\">Mark all as read</button></div>\n      <div class=\"nt un\"><i style=\"background:#f59e0b\">AK</i><span><span><b>Ananya</b> commented on <b>Pricing page</b></span><small>2 min ago</small></span></div>\n      <div class=\"nt un\"><i style=\"background:#10b981\">RS</i><span><span><b>Rohan</b> assigned you <b>Fix login timeout</b></span><small>18 min ago</small></span></div>\n      <div class=\"nt un\"><i style=\"background:#8b5cf6\">ZK</i><span><span><b>Zoya</b> mentioned you in <b># design</b></span><small>1 hr ago</small></span></div>\n      <div class=\"nt\"><i style=\"background:#64748b\">KS</i><span><span><b>Kabir</b> shared <b>Q4 plan</b></span><small>Yesterday</small></span></div>\n    </div>\n  </div>\n",
    "css": ":root { --body: \"Figtree\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Figtree */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-ntf, .s-ntf *, .s-ntf *::before, .s-ntf *::after { box-sizing: border-box; }\n.s-ntf { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-ntf button { font: inherit; cursor: pointer; }\n.s-ntf { background: #f3f4f7; color: #1f2430; font-size: 12px; }\n.s-ntf .tb { background: #fff; display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; border-bottom: 1px solid #e5e7eb; }\n.s-ntf .bell { position: relative; border: 0; background: none; padding: 4px; color: #1f2430; display: grid; }\n.s-ntf .bdg { position: absolute; top: -2px; right: -4px; background: #dc2626; color: #fff; font: 700 9px var(--body); min-width: 16px; height: 16px; border-radius: 8px; display: grid; place-items: center; padding: 0 3px; }\n.s-ntf .pnl { position: absolute; right: 10px; top: 46px; width: min(280px,calc(100% - 20px)); background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; box-shadow: 0 14px 30px rgba(0,0,0,.12); overflow: hidden; }\n.s-ntf .ph { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-bottom: 1px solid #eee; }\n.s-ntf .ph button { border: 0; background: none; color: #3557e0; font-size: 11px; font-weight: 600; }\n.s-ntf .nt { display: flex; gap: 8px; padding: 8px 12px; position: relative; border-bottom: 1px solid #f4f5f7; }\n.s-ntf .nt.un { background: #f5f7ff; }\n.s-ntf .nt.un::after { content: \"\"; position: absolute; right: 12px; top: 14px; width: 7px; height: 7px; border-radius: 50%; background: #3557e0; }\n.s-ntf .nt i { width: 26px; height: 26px; border-radius: 50%; flex: none; color: #fff; font: 700 9px var(--body); font-style: normal; display: grid; place-items: center; }\n.s-ntf .nt span { display: grid; padding-right: 14px; }\n.s-ntf small { color: #888; font-size: 10px; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  const on = (sel, ev, fn) => { const el = $(sel); if (el) el.addEventListener(ev, fn); return el; };\n\n  // notifications\n  on('#ntf-b', 'click', e => { const p = $('#ntf-p'); p.hidden = !p.hidden; e.currentTarget.setAttribute('aria-expanded', !p.hidden); });\n\n  on('#ntf-r', 'click', () => { $$('.s-ntf .nt.un').forEach(n => n.classList.remove('un')); $('#ntf-c').hidden = true; $('#ntf-b').setAttribute('aria-label', 'Notifications, none unread'); });\n})();"
   }
  },
  {
   "id": "tooltip",
   "title": "Tooltips & popovers",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "A tooltip is a short label that appears on hover or focus. A popover is a small panel you open on click and can interact with.",
   "goodFor": "Labels for icon buttons and short hints",
   "watchOut": "Essential info, or touch-only screens",
   "seenIn": "Figma toolbar, Google Docs, Notion share menu",
   "prompt": "Build this UI pattern for my app: Tooltips & popovers.\n\nWhat it is: A tooltip is a short label that appears on hover or focus. A popover is a small panel you open on click and can interact with.\nGood for: Labels for icon buttons and short hints.\nWatch out: Essential info, or touch-only screens.\nSeen in: Figma toolbar, Google Docs, Notion share menu\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-tip\">\n    <div class=\"row\">\n      <span class=\"pw\"><button class=\"sh\" id=\"pop-b\" aria-expanded=\"true\">Share ▾</button><div class=\"pop\" id=\"pop\"><b>Share \"Q4 plan\"</b><input id=\"pop-l\" value=\"docs.example.com/q4\" readonly=\"\" aria-label=\"Share link\"><label for=\"pop-c\"><input type=\"checkbox\" checked=\"\" id=\"pop-c\"> Anyone with the link can view</label><button class=\"cp2\">Copy link</button></div></span>\n      <span class=\"tw\"><button class=\"ib\" aria-label=\"Bold\" aria-describedby=\"tt1\">B</button><span role=\"tooltip\" id=\"tt1\" class=\"tt\">Bold <kbd>Ctrl B</kbd></span></span>\n      <span class=\"tw\"><button class=\"ib\" aria-label=\"Italic\" aria-describedby=\"tt2\"><i>I</i></button><span role=\"tooltip\" id=\"tt2\" class=\"tt\">Italic <kbd>Ctrl I</kbd></span></span>\n      <span class=\"tw\"><button class=\"ib\" aria-label=\"Insert link\" aria-describedby=\"tt3\">⛓</button><span role=\"tooltip\" id=\"tt3\" class=\"tt\">Insert link <kbd>Ctrl K</kbd></span></span>\n    </div>\n    <small class=\"hint\">Hover or Tab to B, I and ⛓ for tooltips</small>\n  </div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-tip, .s-tip *, .s-tip *::before, .s-tip *::after { box-sizing: border-box; }\n.s-tip { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-tip button { font: inherit; cursor: pointer; }\n.s-tip { background: #fff; color: #1f2430; padding: 16px; font-size: 12px; }\n.s-tip .row { display: flex; gap: 4px; align-items: center; border: 1px solid #e3e6ec; border-radius: 8px; padding: 5px; width: max-content; max-width: 100%; }\n.s-tip .tw,.s-tip .pw { position: relative; }\n.s-tip .ib { width: 30px; height: 30px; border: 0; background: none; border-radius: 6px; font-weight: 700; color: #1f2430; }\n.s-tip .ib:hover { background: #f1f3f8; }\n.s-tip .tt { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: #111827; color: #fff; font-size: 11px; padding: 4px 8px; border-radius: 5px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 3; }\n.s-tip .tt::before { content: \"\"; position: absolute; top: -4px; left: 50%; margin-left: -4px; border: 4px solid transparent; border-top: 0; border-bottom-color: #111827; }\n.s-tip .tw:hover .tt,.s-tip .tw:focus-within .tt { opacity: 1; }\n.s-tip kbd { font: 10px var(--mono); opacity: .7; margin-left: 4px; }\n.s-tip .sh { border: 1px solid #d6dae1; background: #fff; border-radius: 6px; padding: 6px 10px; margin-right: 4px; color: #1f2430; }\n.s-tip .pop { position: absolute; left: 0; top: calc(100% + 10px); width: 220px; background: #fff; border: 1px solid #e3e6ec; border-radius: 10px; box-shadow: 0 14px 30px rgba(0,0,0,.12); padding: 12px; display: grid; gap: 8px; z-index: 2; }\n.s-tip .pop input[readonly] { border: 1px solid #e3e6ec; border-radius: 6px; padding: 6px; font: 11px var(--mono); background: #f7f8fa; color: #1f2430; min-width: 0; }\n.s-tip .pop label { display: flex; gap: 6px; align-items: center; font-size: 11px; }\n.s-tip .cp2 { border: 0; background: #3557e0; color: #fff; border-radius: 6px; padding: 7px; font-weight: 600; }\n.s-tip .hint { position: absolute; left: 16px; bottom: 12px; color: #888; font-size: 11px; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  const on = (sel, ev, fn) => { const el = $(sel); if (el) el.addEventListener(ev, fn); return el; };\n\n  // popover + copy\n  on('#pop-b', 'click', e => { const p = $('#pop'); p.hidden = !p.hidden; e.currentTarget.setAttribute('aria-expanded', !p.hidden); });\n\n  on('.s-tip .cp2', 'click', e => { const t = e.currentTarget; try { navigator.clipboard && navigator.clipboard.writeText('https://docs.example.com/q4').catch(() => {}); } catch (_) {} t.textContent = 'Link copied ✓'; setTimeout(() => t.textContent = 'Copy link', 1500); });\n})();"
   }
  },
  {
   "id": "pulltorefresh",
   "title": "Pull to refresh",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "Drag a list down past the top and let go to load new items, with a spinner while it works.",
   "goodFor": "Feeds and inboxes on mobile",
   "watchOut": "Desktop, or content that updates by itself",
   "seenIn": "Instagram, Gmail mobile, X, most feeds",
   "prompt": "Build this UI pattern for my app: Pull to refresh.\n\nWhat it is: Drag a list down past the top and let go to load new items, with a spinner while it works.\nGood for: Feeds and inboxes on mobile.\nWatch out: Desktop, or content that updates by itself.\nSeen in: Instagram, Gmail mobile, X, most feeds\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-ptr center\">\n    <div class=\"phone\"><div class=\"ind\" id=\"ptr-i\"><span class=\"spin\"></span></div>\n      <div class=\"lst\" id=\"ptr-l\"><div class=\"hd2\">Inbox</div><div class=\"it4\"><b>Priya</b><span>Lunch tomorrow?</span></div><div class=\"it4\"><b>Bank</b><span>Statement for October</span></div><div class=\"it4\"><b>Kabir</b><span>Slides attached</span></div><div class=\"it4\"><b>Delivery</b><span>Arriving today</span></div></div>\n    </div>\n    <small class=\"hint\">drag the list down</small>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque, JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-ptr, .s-ptr *, .s-ptr *::before, .s-ptr *::after { box-sizing: border-box; }\n.s-ptr { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-ptr button { font: inherit; cursor: pointer; }\n.center { display: grid; place-items: center; }\n.phone { width: 172px; height: 262px; border-radius: 26px; border: 6px solid #1b1d22; background: #fff; position: relative; overflow: hidden; color: #1b1d22; font-size: 11px; }\n.s-ptr { background: #e9ecf1; }\n.s-ptr .ind { position: absolute; top: 8px; left: 50%; margin-left: -14px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); display: grid; place-items: center; transform: translateY(-50px); z-index: 2; }\n.s-ptr .spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #3557e0; border-right-color: transparent; }\n.s-ptr .ind.go .spin { animation: spin .7s linear infinite; }\n.s-ptr .lst { touch-action: pan-y; cursor: grab; background: #fff; position: absolute; inset: 0; user-select: none; -webkit-user-select: none; }\n.s-ptr .hd2 { padding: 10px 12px; font: 700 15px var(--display); }\n.s-ptr .it4 { padding: 7px 12px; border-bottom: 1px solid #f1f2f5; display: grid; }\n.s-ptr .it4 span { color: #777; font-size: 10px; }\n.s-ptr .it4.new { background: #eef1ff; }\n.s-ptr .hint { position: absolute; right: 10px; bottom: 10px; max-width: 72px; font: 10px/1.3 var(--mono); color: #555; text-align: right; }\n@keyframes spin {\n  to{transform:rotate(1turn)}\n}\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // pull to refresh\n  (() => { const l = $('#ptr-l'), ind = $('#ptr-i'); if (!l) return; let y0 = null, dy = 0, busy = false, k = 0;\n    const nm = [['Arjun', 'Tickets are booked'], ['Mom', 'Call when free'], ['HR', 'Holiday list for 2027'], ['Ishita', 'Sent the photos']];\n    const begin = y => { if (busy) return; y0 = y; dy = 0; l.style.transition = ind.style.transition = 'none'; };\n    const pull = y => { dy = Math.max(0, Math.min(90, (y - y0) * .6)); l.style.transform = `translateY(${dy}px)`; ind.style.transform = `translateY(${dy - 40}px) rotate(${dy * 4}deg)`; };\n    const end = () => { if (y0 === null) return; y0 = null; l.style.transition = ind.style.transition = 'transform .25s';\n      if (dy > 55) { busy = true; l.style.transform = 'translateY(48px)'; ind.style.transform = 'translateY(8px)'; ind.classList.add('go');\n        setTimeout(() => { const x = nm[k++ % nm.length]; const d = document.createElement('div'); d.className = 'it4 new'; d.innerHTML = `<b>${x[0]}</b><span>${x[1]}</span>`; $('.hd2', l).after(d);\n          ind.classList.remove('go'); l.style.transform = ''; ind.style.transform = ''; busy = false; }, 1000); }\n      else { l.style.transform = ''; ind.style.transform = ''; } dy = 0; };\n    // mouse and pen: pointer events\n    l.addEventListener('pointerdown', e => { if (e.pointerType === 'touch') return; begin(e.clientY); if (y0 !== null) l.setPointerCapture(e.pointerId); });\n    l.addEventListener('pointermove', e => { if (e.pointerType !== 'touch' && y0 !== null) pull(e.clientY); });\n    l.addEventListener('pointerup', e => { if (e.pointerType !== 'touch') end(); }); l.addEventListener('pointercancel', e => { if (e.pointerType !== 'touch') end(); });\n    // touch: take over only a downward pull; an upward drag or a scroll already under way stays with the page\n    l.addEventListener('touchstart', e => begin(e.touches[0].clientY), { passive: true });\n    l.addEventListener('touchmove', e => { if (y0 === null) return; const y = e.touches[0].clientY;\n      if (y > y0 && e.cancelable) { e.preventDefault(); pull(y); } else { dy = 0; end(); } }, { passive: false });\n    l.addEventListener('touchend', end); l.addEventListener('touchcancel', end);\n  })();\n})();"
   }
  },
  {
   "id": "lazyload",
   "title": "Lazy loading (blur-up)",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "Images load only when they scroll into view, starting as a blurry preview and sharpening when ready.",
   "goodFor": "Long image galleries and feeds",
   "watchOut": "Images in the first screen; load those at once",
   "seenIn": "Pinterest, Medium, Unsplash",
   "prompt": "Build this UI pattern for my app: Lazy loading (blur-up).\n\nWhat it is: Images load only when they scroll into view, starting as a blurry preview and sharpening when ready.\nGood for: Long image galleries and feeds.\nWatch out: Images in the first screen; load those at once.\nSeen in: Pinterest, Medium, Unsplash\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-lazy\"><div class=\"scr\" id=\"lz\" tabindex=\"0\" role=\"region\" aria-label=\"Photo grid\"></div><button class=\"rp\" id=\"lz-r\">Reset</button></div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-lazy, .s-lazy *, .s-lazy *::before, .s-lazy *::after { box-sizing: border-box; }\n.s-lazy { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-lazy button { font: inherit; cursor: pointer; }\n.s-lazy { background: #fff; color: #1f2430; font-size: 11px; }\n.s-lazy .scr { position: absolute; inset: 0; overflow-y: auto; padding: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; }\n.s-lazy .im { aspect-ratio: 4/3; border-radius: 8px; background: #e5e7eb; position: relative; overflow: hidden; max-width: 100%; }\n.s-lazy .im::before { content: \"\"; position: absolute; inset: -12px; background: var(--bg2); filter: blur(12px); opacity: .45; transition: filter .6s,opacity .6s; }\n.s-lazy .im.ld::before { filter: blur(0); opacity: 1; }\n.s-lazy .im span { position: absolute; left: 6px; bottom: 5px; font: 10px var(--mono); color: #fff; background: rgba(0,0,0,.45); padding: 1px 5px; border-radius: 3px; }\n.s-lazy .rp { position: absolute; right: 12px; bottom: 10px; border: 1px solid #d6dae1; background: #fff; border-radius: 6px; padding: 4px 10px; font-size: 11px; color: #1f2430; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  const on = (sel, ev, fn) => { const el = $(sel); if (el) el.addEventListener(ev, fn); return el; };\n\n  // lazy loading (blur-up)\n  (() => { const s = $('#lz'); if (!s) return; let io;\n    const g = ['#f6d365,#fda085', '#84fab0,#8fd3f4', '#a18cd1,#fbc2eb', '#fccb90,#d57eeb', '#e0c3fc,#8ec5fc', '#f093fb,#f5576c', '#4facfe,#00f2fe', '#43e97b,#38f9d7', '#fa709a,#fee140', '#30cfd0,#330867', '#ff9a9e,#fecfef', '#667eea,#764ba2'];\n    const build = () => { s.innerHTML = g.map((c, i) => `<div class=\"im\" style=\"--bg2:linear-gradient(135deg,${c})\"><span>photo_${String(i + 1).padStart(2, '0')}.jpg</span></div>`).join(''); s.scrollTop = 0;\n      if ('IntersectionObserver' in window) { io && io.disconnect(); io = new IntersectionObserver(es => es.forEach(en => { if (en.isIntersecting) { const t = en.target; io.unobserve(t); setTimeout(() => t.classList.add('ld'), 500 + Math.random() * 500); } }), { root: s }); $$('.im', s).forEach(x => io.observe(x)); }\n      else $$('.im', s).forEach(x => x.classList.add('ld')); };\n    build(); on('#lz-r', 'click', build);\n  })();\n})();"
   }
  },
  {
   "id": "errors",
   "title": "Error states",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "Good errors say what happened and how to fix it: a plain 404, an offline notice, an inline field error and a failed-payment message with a way to retry.",
   "goodFor": "Explaining what went wrong and how to fix it",
   "watchOut": "Blaming the user, or \"Something went wrong\"",
   "seenIn": "GitHub 404, Stripe form errors, Gmail offline banner",
   "prompt": "Build this UI pattern for my app: Error states.\n\nWhat it is: Good errors say what happened and how to fix it: a plain 404, an offline notice, an inline field error and a failed-payment message with a way to retry.\nGood for: Explaining what went wrong and how to fix it.\nWatch out: Blaming the user, or \"Something went wrong\".\nSeen in: GitHub 404, Stripe form errors, Gmail offline banner\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-err\">\n    <div class=\"nf\"><b>404</b><span>This page could not be found.</span><button type=\"button\" class=\"lk\">Back to home</button></div>\n    <div class=\"fm\"><div class=\"ban\" role=\"status\"><svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" aria-hidden=\"true\"><path d=\"M1.5 6a9 9 0 0 1 4-2.2M14.5 6a9 9 0 0 0-3.2-1.9M4 8.6a5.5 5.5 0 0 1 2-1.2M12 8.6a5.5 5.5 0 0 0-1.4-1M8 12h.01M2 2l12 12\"></path></svg><span>You're offline. Changes will sync when you reconnect.</span></div><label for=\"er-c\">Card number</label><input id=\"er-c\" value=\"4821 0000 1234\" aria-invalid=\"true\" aria-describedby=\"er-m\"><span class=\"m\" id=\"er-m\"><svg viewBox=\"0 0 16 16\" fill=\"currentColor\" aria-hidden=\"true\"><path fill-rule=\"evenodd\" d=\"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14Zm-.75-10.5h1.5v4.5h-1.5V4.5Zm0 6h1.5V12h-1.5v-1.5Z\"></path></svg><span>Your card number is incomplete.</span></span><div class=\"fb2\" role=\"alert\"><svg viewBox=\"0 0 16 16\" fill=\"currentColor\" aria-hidden=\"true\"><path fill-rule=\"evenodd\" d=\"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14Zm-.75-10.5h1.5v4.5h-1.5V4.5Zm0 6h1.5V12h-1.5v-1.5Z\"></path></svg><div><b>Card declined</b><span>Your bank declined this payment. Try another card.</span><div class=\"ac\"><button type=\"button\" class=\"lk\">Try again</button><button type=\"button\" class=\"lk\">Use UPI</button></div></div></div></div>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; --body: \"Figtree\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque, Figtree */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-err, .s-err *, .s-err *::before, .s-err *::after { box-sizing: border-box; }\n.s-err { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-err button { font: inherit; cursor: pointer; }\n.s-err { background: #fff; color: #1a1f36; display: grid; grid-template-columns: .8fr 1.7fr; font-size: 11px; }\n.s-err .nf { display: grid; align-content: center; justify-items: start; gap: 6px; padding: 12px; border-right: 1px solid #e3e8ee; }\n.s-err .nf b { font: 600 38px/1 var(--display); letter-spacing: -.03em; color: #1a1f36; }\n.s-err .nf span { color: #697386; line-height: 1.4; }\n.s-err .lk { border: 0; background: none; padding: 0; color: #0969da; font: 600 11.5px var(--body); cursor: pointer; }\n.s-err .lk:hover { text-decoration: underline; }\n.s-err .fm { padding: 10px; display: grid; gap: 5px; align-content: start; min-width: 0; }\n.s-err svg { width: 14px; height: 14px; flex: none; margin-top: 1px; }\n.s-err .ban { background: #1f2328; color: #fff; border-radius: 6px; padding: 7px 9px; display: flex; gap: 7px; align-items: flex-start; line-height: 1.35; }\n.s-err label { font-weight: 600; margin-top: 4px; }\n.s-err input { border: 1px solid #df1b41; background: #fff; border-radius: 6px; padding: 7px 9px; font: 12.5px var(--body); font-variant-numeric: tabular-nums; color: #1a1f36; min-width: 0; box-shadow: 0 0 0 3px rgba(223,27,65,.12); }\n.s-err .m { color: #df1b41; display: flex; gap: 5px; align-items: flex-start; line-height: 1.35; }\n.s-err .fb2 { border: 1px solid #e3e8ee; border-radius: 8px; padding: 9px 10px; display: flex; gap: 8px; align-items: flex-start; background: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.06); margin-top: 2px; }\n.s-err .fb2 > svg { color: #df1b41; }\n.s-err .fb2 > div { display: grid; gap: 2px; min-width: 0; }\n.s-err .fb2 b { font-size: 12px; }\n.s-err .fb2 span { color: #697386; line-height: 1.4; }\n.s-err .ac { display: flex; gap: 12px; margin-top: 4px; }",
    "js": ""
   }
  },
  {
   "id": "loaders",
   "title": "Loaders & progress",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "Spinners for short unknown waits, progress bars and rings when you know how far along it is, and buttons that show they're working.",
   "goodFor": "Showing that work is happening",
   "watchOut": "Spinners for long tasks; show real progress",
   "seenIn": "Google Drive uploads, YouTube, every form submit",
   "prompt": "Build this UI pattern for my app: Loaders & progress.\n\nWhat it is: Spinners for short unknown waits, progress bars and rings when you know how far along it is, and buttons that show they're working.\nGood for: Showing that work is happening.\nWatch out: Spinners for long tasks; show real progress.\nSeen in: Google Drive uploads, YouTube, every form submit\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-load\">\n    <figure><span class=\"sp1\"></span><figcaption>Spinner</figcaption></figure>\n    <figure><span class=\"dts\"><i></i><i></i><i></i></span><figcaption>Typing dots</figcaption></figure>\n    <figure><span class=\"ring\" id=\"ld-ring\"><b id=\"ld-pct\">0%</b></span><figcaption>Circular progress</figcaption></figure>\n    <figure class=\"wide\"><span class=\"pbar\"><i id=\"ld-bar\"></i></span><figcaption id=\"ld-txt\">Uploading report.pdf · 0.0 of 4.2 MB</figcaption></figure>\n    <figure class=\"wide\"><button class=\"lb\" id=\"ld-btn\">Save changes</button><figcaption>Button loading state (click it)</figcaption></figure>\n  </div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-load, .s-load *, .s-load *::before, .s-load *::after { box-sizing: border-box; }\n.s-load { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-load button { font: inherit; cursor: pointer; }\n.s-load { background: #fff; color: #1f2430; display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; padding: 18px; align-content: center; font-size: 11px; }\n.s-load figure { margin: 0; display: grid; justify-items: center; gap: 8px; color: #777; }\n.s-load .wide { grid-column: 1/-1; justify-items: stretch; text-align: center; }\n.s-load .sp1 { width: 28px; height: 28px; border-radius: 50%; border: 3px solid #e3e6ec; border-top-color: #3557e0; animation: spin .8s linear infinite; }\n.s-load .dts { display: flex; gap: 4px; height: 28px; align-items: center; }\n.s-load .dts i { width: 7px; height: 7px; border-radius: 50%; background: #3557e0; animation: bnc 1s infinite; }\n.s-load .dts i:nth-child(2) { animation-delay: .15s; }\n.s-load .dts i:nth-child(3) { animation-delay: .3s; }\n.s-load .ring { width: 44px; height: 44px; border-radius: 50%; background: conic-gradient(#3557e0 calc(var(--p,0)*1%),#e3e6ec 0); display: grid; place-items: center; position: relative; }\n.s-load .ring::before { content: \"\"; position: absolute; inset: 5px; border-radius: 50%; background: #fff; }\n.s-load .ring b { position: relative; font: 600 10px var(--mono); color: #1f2430; font-variant-numeric: tabular-nums; }\n.s-load .pbar { height: 8px; background: #eceef2; border-radius: 4px; overflow: hidden; display: block; }\n.s-load .pbar i { display: block; height: 100%; width: 0; background: #3557e0; border-radius: 4px; transition: width .2s; }\n.s-load .lb { justify-self: center; border: 0; background: #3557e0; color: #fff; border-radius: 7px; padding: 8px 16px; font-weight: 600; min-width: 140px; display: inline-flex; gap: 8px; justify-content: center; align-items: center; }\n.s-load .lb.busy { background: #7d93ea; cursor: progress; }\n.s-load .lb.busy::before { content: \"\"; width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; animation: spin .7s linear infinite; }\n@keyframes spin {\n  to{transform:rotate(1turn)}\n}\n@keyframes bnc {\n  0%,60%,100%{transform:none;opacity:.4}30%{transform:translateY(-6px);opacity:1}\n}\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  const on = (sel, ev, fn) => { const el = $(sel); if (el) el.addEventListener(ev, fn); return el; };\n\n  // loaders\n  (() => { const ring = $('#ld-ring'), pct = $('#ld-pct'), bar = $('#ld-bar'), txt = $('#ld-txt'); if (!ring) return; let p = 0;\n    setInterval(() => { p = p >= 100 ? 0 : p + 2; ring.style.setProperty('--p', p); pct.textContent = p + '%'; bar.style.width = p + '%'; txt.textContent = p >= 100 ? 'Upload complete ✓' : `Uploading report.pdf · ${(p * 4.2 / 100).toFixed(1)} of 4.2 MB`; }, 120);\n    on('#ld-btn', 'click', e => { const b = e.currentTarget; if (b.classList.contains('busy')) return; b.classList.add('busy'); b.textContent = 'Saving…';\n      setTimeout(() => { b.classList.remove('busy'); b.textContent = 'Saved ✓'; setTimeout(() => b.textContent = 'Save changes', 1500); }, 1600); });\n  })();\n})();"
   }
  },
  {
   "id": "auth",
   "title": "Login & OTP verification",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "One-time code boxes that jump to the next box as you type and accept a pasted code, plus passwordless options.",
   "goodFor": "Sign-in and two-step verification",
   "watchOut": "Blocking paste in code fields",
   "seenIn": "banking apps, WhatsApp, Google 2-step verification",
   "prompt": "Build this UI pattern for my app: Login & OTP verification.\n\nWhat it is: One-time code boxes that jump to the next box as you type and accept a pasted code, plus passwordless options.\nGood for: Sign-in and two-step verification.\nWatch out: Blocking paste in code fields.\nSeen in: banking apps, WhatsApp, Google 2-step verification\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-auth\">\n    <b>Verify it's you</b><span class=\"sub\">We sent a 6-digit code to +91 98•••• 4210</span>\n    <div class=\"otp\" id=\"otp\"><input id=\"otp1\" inputmode=\"numeric\" maxlength=\"1\" aria-label=\"Digit 1\" value=\"4\" autocomplete=\"one-time-code\"><input id=\"otp2\" inputmode=\"numeric\" maxlength=\"1\" aria-label=\"Digit 2\" value=\"8\"><input id=\"otp3\" inputmode=\"numeric\" maxlength=\"1\" aria-label=\"Digit 3\"><input id=\"otp4\" inputmode=\"numeric\" maxlength=\"1\" aria-label=\"Digit 4\"><input id=\"otp5\" inputmode=\"numeric\" maxlength=\"1\" aria-label=\"Digit 5\"><input id=\"otp6\" inputmode=\"numeric\" maxlength=\"1\" aria-label=\"Digit 6\"></div>\n    <span class=\"st\" id=\"otp-s\">Resend code in 0:24</span>\n    <div class=\"or\">or</div>\n    <button class=\"alt\">Use a passkey instead</button><button class=\"alt\">Email me a sign-in link</button>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque, JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-auth, .s-auth *, .s-auth *::before, .s-auth *::after { box-sizing: border-box; }\n.s-auth { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-auth button { font: inherit; cursor: pointer; }\n.s-auth { background: #fff; color: #1f2430; padding: 16px 20px; display: grid; gap: 8px; align-content: center; justify-items: center; text-align: center; font-size: 12px; }\n.s-auth > b { font: 700 17px var(--display); }\n.s-auth .sub { color: #666; }\n.s-auth .otp { display: flex; gap: 6px; margin: 2px 0; }\n.s-auth .otp input { width: 36px; height: 42px; text-align: center; font: 600 18px var(--mono); border: 1.5px solid #cfd5dd; border-radius: 8px; color: #1f2430; padding: 0; }\n.s-auth .otp input:focus { border-color: #3557e0; outline: none; box-shadow: 0 0 0 3px rgba(53,87,224,.18); }\n.s-auth .otp.ok input { border-color: #16a34a; background: #f0fdf4; }\n.s-auth .st { color: #888; font-size: 11px; }\n.s-auth .st.ok { color: #16a34a; font-weight: 600; }\n.s-auth .or { width: 100%; max-width: 260px; display: flex; align-items: center; gap: 8px; color: #aaa; font-size: 10px; }\n.s-auth .or::before,.s-auth .or::after { content: \"\"; flex: 1; height: 1px; background: #eee; }\n.s-auth .alt { width: 100%; max-width: 260px; border: 1px solid #d6dae1; background: #fff; border-radius: 8px; padding: 8px; font-weight: 600; color: #1f2430; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // OTP\n  (() => { const ins = $$('#otp input'), s = $('#otp-s'), w = $('#otp'); if (!w) return;\n    const chk = () => { const v = ins.map(i => i.value).join(''); const ok = v.length === 6; w.classList.toggle('ok', ok); s.classList.toggle('ok', ok); s.textContent = ok ? 'Code verified ✓' : 'Resend code in 0:24'; };\n    ins.forEach((i, k) => {\n      i.addEventListener('input', () => { i.value = i.value.replace(/\\D/g, '').slice(-1); if (i.value && ins[k + 1]) ins[k + 1].focus(); chk(); });\n      i.addEventListener('keydown', e => { if (e.key === 'Backspace' && !i.value && ins[k - 1]) ins[k - 1].focus(); });\n      i.addEventListener('paste', e => { e.preventDefault(); const d = (e.clipboardData.getData('text') || '').replace(/\\D/g, '').slice(0, 6); d.split('').forEach((c, j) => { if (ins[k + j]) ins[k + j].value = c; }); ins[Math.min(5, k + d.length)].focus(); chk(); });\n    });\n  })();\n})();"
   }
  },
  {
   "id": "settings",
   "title": "Settings page",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "Preferences grouped under clear headings, with switches that act right away and risky actions set apart in a danger zone.",
   "goodFor": "Preferences people change rarely",
   "watchOut": "Hiding core features in settings",
   "seenIn": "GitHub, Slack, iOS Settings",
   "prompt": "Build this UI pattern for my app: Settings page.\n\nWhat it is: Preferences grouped under clear headings, with switches that act right away and risky actions set apart in a danger zone.\nGood for: Preferences people change rarely.\nWatch out: Hiding core features in settings.\nSeen in: GitHub, Slack, iOS Settings\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-set\">\n    <h5 role=\"none\">Notifications</h5>\n    <div class=\"grp\"><div class=\"rw\"><span><b>Email digest</b><small>A summary every Monday</small></span><button class=\"sw3\" aria-pressed=\"true\" data-toggle aria-label=\"Email digest\"></button></div><div class=\"rw\"><span><b>Push notifications</b><small>Mentions and replies only</small></span><button class=\"sw3\" aria-pressed=\"false\" data-toggle aria-label=\"Push notifications\"></button></div><div class=\"rw\"><span><b>Language</b></span><select id=\"set-lang\" aria-label=\"Language\"><option>English</option><option>हिन्दी</option><option>தமிழ்</option><option>বাংলা</option></select></div></div>\n    <h5 role=\"none\" class=\"dz\">Danger zone</h5>\n    <div class=\"grp dz\"><div class=\"rw\"><span><b>Delete account</b><small>This can't be undone</small></span><button class=\"del\">Delete</button></div></div>\n  </div>\n",
    "css": ":root { --body: \"Figtree\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Figtree */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-set, .s-set *, .s-set *::before, .s-set *::after { box-sizing: border-box; }\n.s-set { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-set button { font: inherit; cursor: pointer; }\n.s-set { background: #f7f8fa; color: #1f2430; padding: 14px 16px; display: grid; gap: 6px; align-content: start; font-size: 12px; }\n.s-set h5 { margin: 4px 0 0; font: 700 11px var(--body); text-transform: uppercase; letter-spacing: .08em; color: #666; }\n.s-set h5.dz { color: #dc2626; }\n.s-set .grp { background: #fff; border: 1px solid #e9ebf0; border-radius: 10px; }\n.s-set .grp.dz { border-color: #fecaca; }\n.s-set .rw { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #f1f2f5; }\n.s-set .rw:last-child { border: 0; }\n.s-set .rw span { display: grid; }\n.s-set small { color: #888; font-size: 10.5px; }\n.s-set select { border: 1px solid #d6dae1; border-radius: 6px; padding: 4px 6px; font: 12px var(--body); background: #fff; color: #1f2430; }\n.s-set .sw3 { width: 38px; height: 22px; border-radius: 11px; border: 0; background: #d1d5db; position: relative; padding: 0; flex: none; transition: background .2s; }\n.s-set .sw3::after { content: \"\"; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: left .2s; }\n.s-set .sw3[aria-pressed=\"true\"] { background: #3557e0; }\n.s-set .sw3[aria-pressed=\"true\"]::after { left: 18px; }\n.s-set .del { border: 1px solid #dc2626; background: #fff; color: #dc2626; border-radius: 6px; padding: 5px 10px; font-weight: 600; font-size: 11px; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // generic toggles\n  $$('[data-toggle]').forEach(b=>b.addEventListener('click',()=>b.setAttribute('aria-pressed',b.getAttribute('aria-pressed')!=='true')));\n})();"
   }
  },
  {
   "id": "ratings",
   "title": "Ratings & reviews",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "An average score, a breakdown bar for each star level, and a star input that previews on hover.",
   "goodFor": "Product reviews and quick feedback",
   "watchOut": "Asking before people have used it",
   "seenIn": "Amazon, Google Play, Flipkart, App Store",
   "prompt": "Build this UI pattern for my app: Ratings & reviews.\n\nWhat it is: An average score, a breakdown bar for each star level, and a star input that previews on hover.\nGood for: Product reviews and quick feedback.\nWatch out: Asking before people have used it.\nSeen in: Amazon, Google Play, Flipkart, App Store\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-rate\">\n    <div class=\"sum\"><b>4.3</b><span class=\"st5\" aria-hidden=\"true\">★★★★☆</span><small>1,284 ratings</small></div>\n    <div class=\"hist\"><span>5★</span><i><b style=\"width:62%\"></b></i><em>62%</em><span>4★</span><i><b style=\"width:20%\"></b></i><em>20%</em><span>3★</span><i><b style=\"width:9%\"></b></i><em>9%</em><span>2★</span><i><b style=\"width:4%\"></b></i><em>4%</em><span>1★</span><i><b style=\"width:5%\"></b></i><em>5%</em></div>\n    <div class=\"you\"><span>Rate this product</span><div class=\"stars\" id=\"stars\" role=\"group\" aria-label=\"Your rating\"><button aria-label=\"1 star\">★</button><button aria-label=\"2 stars\">★</button><button aria-label=\"3 stars\">★</button><button aria-label=\"4 stars\">★</button><button aria-label=\"5 stars\">★</button></div><small id=\"star-t\">Tap a star</small></div>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-rate, .s-rate *, .s-rate *::before, .s-rate *::after { box-sizing: border-box; }\n.s-rate { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-rate button { font: inherit; cursor: pointer; }\n.s-rate { background: #fff; color: #1f2430; padding: 16px 18px; display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; align-content: center; font-size: 11px; }\n.s-rate .sum { display: grid; justify-items: center; gap: 2px; }\n.s-rate .sum b { font: 800 36px/1 var(--display); }\n.s-rate .st5 { color: #f59e0b; font-size: 14px; letter-spacing: 1px; }\n.s-rate small { color: #888; }\n.s-rate .hist { display: grid; grid-template-columns: auto 1fr auto; gap: 5px 8px; align-items: center; font-variant-numeric: tabular-nums; }\n.s-rate .hist i { height: 7px; background: #f1f2f5; border-radius: 4px; overflow: hidden; display: block; }\n.s-rate .hist i b { display: block; height: 100%; background: #f59e0b; }\n.s-rate .hist em { font-style: normal; color: #888; text-align: right; }\n.s-rate .you { grid-column: 1/-1; border-top: 1px solid #eef0f3; padding-top: 12px; display: grid; justify-items: center; gap: 4px; }\n.s-rate .stars { display: flex; gap: 2px; }\n.s-rate .stars button { border: 0; background: none; font-size: 28px; line-height: 1; color: #d1d5db; padding: 0 2px; transition: transform .1s; }\n.s-rate .stars button.on { color: #f59e0b; }\n.s-rate .stars button:hover { transform: scale(1.15); }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // ratings\n  (() => { const bs = $$('#stars button'), t = $('#star-t'); if (!bs.length) return; let v = 0; const L = ['', 'Poor', 'Fair', 'Good', 'Very good', 'Excellent'];\n    const paint = n => bs.forEach((b, i) => b.classList.toggle('on', i < n));\n    bs.forEach((b, i) => { b.addEventListener('mouseenter', () => paint(i + 1)); b.addEventListener('focus', () => paint(i + 1));\n      b.addEventListener('click', () => { v = i + 1; paint(v); bs.forEach((x, j) => x.setAttribute('aria-pressed', j < v)); t.textContent = `You rated ${v} of 5 · ${L[v]}. Thanks!`; }); });\n    $('#stars').addEventListener('mouseleave', () => paint(v));\n  })();\n})();"
   }
  },
  {
   "id": "collab",
   "title": "Live collaboration",
   "section": "interaction",
   "sectionName": "Components and UX patterns",
   "description": "See who else is here: avatar stack, named cursors, other people's selections and typing carets, all updating live.",
   "goodFor": "Docs, design tools, whiteboards",
   "watchOut": "Single-user tools where presence is noise",
   "seenIn": "Figma, Google Docs, Miro, Notion",
   "prompt": "Build this UI pattern for my app: Live collaboration.\n\nWhat it is: See who else is here: avatar stack, named cursors, other people's selections and typing carets, all updating live.\nGood for: Docs, design tools, whiteboards.\nWatch out: Single-user tools where presence is noise.\nSeen in: Figma, Google Docs, Miro, Notion\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-collab\">\n    <div class=\"tb\"><b>Q4 launch plan</b><span class=\"avs\"><i style=\"background:#f59e0b\">AK</i><i style=\"background:#10b981\">RS</i><i style=\"background:#8b5cf6\">ZK</i><em>+2</em></span></div>\n    <div class=\"doc\">\n      <h5 role=\"none\">Goals</h5>\n      <p>Grow paid sign-ups by <mark class=\"sel\">25% in the first quarter</mark> after launch, while keeping support tickets flat.</p>\n      <p>Launch in three cities first: Pune, Kochi and Indore.<span class=\"caret\" style=\"--c:#10b981\"></span></p>\n      <span class=\"cur c1\" style=\"--c:#f59e0b\"><svg viewBox=\"0 0 14 14\" aria-hidden=\"true\"><path d=\"M1 1 L13 6 L7 7.5 L5 13 Z\"></path></svg><em>Ananya</em></span>\n      <span class=\"cur c2\" style=\"--c:#8b5cf6\"><svg viewBox=\"0 0 14 14\" aria-hidden=\"true\"><path d=\"M1 1 L13 6 L7 7.5 L5 13 Z\"></path></svg><em>Zoya</em></span>\n    </div>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; --body: \"Figtree\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque, Figtree */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-collab, .s-collab *, .s-collab *::before, .s-collab *::after { box-sizing: border-box; }\n.s-collab { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-collab button { font: inherit; cursor: pointer; }\n.s-collab { background: #f3f4f7; color: #1f2430; font-size: 12px; }\n.s-collab .tb { background: #fff; display: flex; justify-content: space-between; align-items: center; padding: 9px 14px; border-bottom: 1px solid #e5e7eb; }\n.s-collab .avs { display: flex; align-items: center; }\n.s-collab .avs i { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; margin-left: -6px; color: #fff; font: 700 8px var(--body); font-style: normal; display: grid; place-items: center; }\n.s-collab .avs em { font-style: normal; margin-left: 6px; color: #666; font-size: 11px; }\n.s-collab .doc { margin: 12px; background: #fff; border-radius: 8px; padding: 14px 16px; position: relative; height: calc(100% - 72px); box-shadow: 0 1px 3px rgba(0,0,0,.06); overflow: hidden; }\n.s-collab h5 { margin: 0 0 6px; font: 700 15px var(--display); }\n.s-collab p { margin: 0 0 8px; line-height: 1.6; color: #374151; }\n.s-collab .sel { background: rgba(245,158,11,.25); color: inherit; border-radius: 2px; }\n.s-collab .caret { display: inline-block; width: 2px; height: 15px; background: var(--c); vertical-align: -3px; margin-left: 1px; animation: blink 1s steps(2) infinite; }\n.s-collab .cur { position: absolute; display: flex; align-items: flex-start; pointer-events: none; }\n.s-collab .cur svg { width: 14px; height: 14px; fill: var(--c); }\n.s-collab .cur em { font-style: normal; background: var(--c); color: #fff; font: 600 10px var(--body); padding: 1px 6px; border-radius: 0 6px 6px 6px; margin: 10px 0 0 -2px; }\n.s-collab .c1 { left: 58%; top: 28%; animation: mv1 6s ease-in-out infinite; }\n.s-collab .c2 { left: 18%; top: 66%; animation: mv2 7s ease-in-out infinite; }\n@keyframes blink {\n  50%{opacity:.25}\n}\n@keyframes mv1 {\n  50%{transform:translate(-90px,40px)}\n}\n@keyframes mv2 {\n  50%{transform:translate(110px,-30px)}\n}",
    "js": ""
   }
  },
  {
   "id": "promptbox",
   "title": "Prompt box",
   "section": "ai",
   "sectionName": "AI patterns",
   "description": "A roomy input that grows with your text, holds attachments, shows the model or mode, and only enables Send when there's something to send. Enter sends, Shift+Enter adds a line.",
   "goodFor": "Any AI chat or generation feature",
   "watchOut": "Hiding attachments or options people need",
   "seenIn": "Claude, ChatGPT, Gemini",
   "prompt": "Build this AI interface pattern for my app: Prompt box.\n\nWhat it is: A roomy input that grows with your text, holds attachments, shows the model or mode, and only enables Send when there's something to send. Enter sends, Shift+Enter adds a line.\nGood for: Any AI chat or generation feature.\nWatch out: Hiding attachments or options people need.\nSeen in: Claude, ChatGPT, Gemini\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-pb\">\n    <div class=\"greet\">Good evening, Surya</div>\n    <form class=\"box\" id=\"pb-f\">\n      <div class=\"att\" id=\"pb-att\"><span class=\"fchip\">brief.pdf <button type=\"button\" aria-label=\"Remove file\">×</button></span></div>\n      <textarea id=\"pb-t\" rows=\"2\" placeholder=\"Ask anything…\" aria-label=\"Message\">Summarise this brief in 5 bullet points</textarea>\n      <div class=\"tools\"><button type=\"button\" class=\"ic\" id=\"pb-a\" aria-label=\"Attach file\">＋</button><span class=\"model\">Fast ▾</span><button class=\"send\" id=\"pb-s\" aria-label=\"Send\">↑</button></div>\n    </form>\n    <small class=\"st\" id=\"pb-st\"></small>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; --body: \"Figtree\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque, Figtree */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-pb, .s-pb *, .s-pb *::before, .s-pb *::after { box-sizing: border-box; }\n.s-pb { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-pb button { font: inherit; cursor: pointer; }\n.s-pb { background: #faf9f7; color: #1f2430; padding: 20px; display: grid; align-content: center; gap: 10px; font-size: 13px; }\n.s-pb .greet { font: 600 20px var(--display); text-align: center; }\n.s-pb .box { background: #fff; border: 1px solid #e2e0dc; border-radius: 16px; padding: 10px 12px; box-shadow: 0 4px 14px rgba(0,0,0,.05); display: grid; gap: 6px; }\n.s-pb .box:focus-within { border-color: #b9b4ab; }\n.s-pb .att { display: flex; gap: 6px; flex-wrap: wrap; }\n.s-pb .fchip { display: inline-flex; gap: 6px; align-items: center; background: #f3f1ee; border-radius: 8px; padding: 4px 8px; font-size: 11px; }\n.s-pb .fchip button { border: 0; background: none; padding: 0; color: #888; }\n.s-pb textarea { border: 0; resize: none; font: 13px/1.45 var(--body); outline: none; background: none; color: #1f2430; }\n.s-pb .tools { display: flex; align-items: center; gap: 8px; }\n.s-pb .ic { width: 28px; height: 28px; border-radius: 8px; border: 1px solid #e2e0dc; background: #fff; color: #1f2430; }\n.s-pb .model { font-size: 11px; color: #777; margin-left: auto; }\n.s-pb .send { width: 30px; height: 30px; border-radius: 9px; border: 0; background: #1f2430; color: #fff; font-weight: 700; }\n.s-pb .send:disabled { background: #d6d3ce; cursor: default; }\n.s-pb .st { text-align: center; color: #16a34a; min-height: 16px; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  const on = (sel, ev, fn) => { const el = $(sel); if (el) el.addEventListener(ev, fn); return el; };\n\n  /* ---------- AI patterns ---------- */\n  (() => { const t = $('#pb-t'), s = $('#pb-s'), st = $('#pb-st'), att = $('#pb-att'), f = $('#pb-f'); if (!f) return;\n    const u = () => s.disabled = !t.value.trim(); t.addEventListener('input', u); u();\n    att.addEventListener('click', e => { const b = e.target.closest('button'); if (b) b.closest('.fchip').remove(); });\n    on('#pb-a', 'click', () => { const c = document.createElement('span'); c.className = 'fchip'; c.innerHTML = 'notes.txt <button type=\"button\" aria-label=\"Remove file\">×</button>'; att.appendChild(c); });\n    f.addEventListener('submit', e => { e.preventDefault(); if (!t.value.trim()) return; st.textContent = 'Sent: \"' + t.value.trim().slice(0, 40) + '\"'; t.value = ''; att.innerHTML = ''; u(); });\n    t.addEventListener('keydown', e => { if (e.key === 'Enter' && !e.shiftKey) { e.preventDefault(); f.requestSubmit(); } });\n  })();\n})();"
   }
  },
  {
   "id": "streaming",
   "title": "Streaming response",
   "section": "ai",
   "sectionName": "AI patterns",
   "description": "The answer appears word by word so people can start reading at once, with a Stop button while it writes.",
   "goodFor": "Long AI answers, so reading starts at once",
   "watchOut": "Very short answers",
   "seenIn": "Claude, ChatGPT, Perplexity",
   "prompt": "Build this AI interface pattern for my app: Streaming response.\n\nWhat it is: The answer appears word by word so people can start reading at once, with a Stop button while it writes.\nGood for: Long AI answers, so reading starts at once.\nWatch out: Very short answers.\nSeen in: Claude, ChatGPT, Perplexity\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-strm\">\n    <div class=\"q\">What should I pack for Ladakh in June?</div>\n    <div class=\"a\"><span id=\"st-t\"></span><span class=\"crt\" id=\"st-c\"></span></div>\n    <div class=\"ctl\"><button id=\"st-go\">↻ Regenerate</button><button id=\"st-stop\" hidden=\"\">■ Stop</button><button id=\"st-cp\">Copy</button></div>\n  </div>\n",
    "css": "/* base styles the site gives every demo (scoped to this demo) */\n.s-strm, .s-strm *, .s-strm *::before, .s-strm *::after { box-sizing: border-box; }\n.s-strm { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-strm button { font: inherit; cursor: pointer; }\n[hidden] { display: none !important; }\n.s-strm { background: #fff; color: #1f2430; padding: 16px 18px; display: grid; grid-template-rows: auto 1fr auto; gap: 10px; font-size: 13px; }\n.s-strm .q { justify-self: end; background: #f1f3f8; border-radius: 14px 14px 4px 14px; padding: 7px 12px; max-width: 85%; }\n.s-strm .a { line-height: 1.55; overflow: auto; }\n.s-strm .crt { display: inline-block; width: 8px; height: 14px; background: #3557e0; vertical-align: -2px; margin-left: 2px; animation: blink 1s steps(2) infinite; }\n.s-strm .crt.off { display: none; }\n.s-strm .ctl { display: flex; gap: 6px; }\n.s-strm .ctl button { border: 1px solid #e3e6ec; background: #fff; border-radius: 7px; padding: 5px 10px; font-size: 11px; color: #1f2430; }\n@keyframes blink {\n  50%{opacity:.25}\n}\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  const on = (sel, ev, fn) => { const el = $(sel); if (el) el.addEventListener(ev, fn); return el; };\n\n  (() => { const A = 'Layers matter most. Days in Leh are often around 20 to 25°C, but nights get cold and high passes can drop below freezing. Pack a fleece, a down jacket and thermal innerwear. Add sunscreen and sunglasses, since UV is strong at 3,500 m, and carry a refillable bottle to help with the altitude.';\n    const out = $('#st-t'), c = $('#st-c'), go = $('#st-go'), stop = $('#st-stop'); if (!out) return; let tm;\n    out.textContent = A; c.classList.add('off');\n    const fin = () => { clearInterval(tm); c.classList.add('off'); stop.hidden = true; go.hidden = false; };\n    go.addEventListener('click', () => { const w = A.split(' '); let i = 0; out.textContent = ''; c.classList.remove('off'); go.hidden = true; stop.hidden = false; clearInterval(tm);\n      tm = setInterval(() => { out.textContent += (i ? ' ' : '') + w[i++]; if (i >= w.length) fin(); }, 70); });\n    stop.addEventListener('click', fin);\n    on('#st-cp', 'click', e => { const b = e.currentTarget; try { navigator.clipboard && navigator.clipboard.writeText(out.textContent).catch(() => {}); } catch (_) {} b.textContent = 'Copied ✓'; setTimeout(() => b.textContent = 'Copy', 1400); });\n  })();\n})();"
   }
  },
  {
   "id": "suggestions",
   "title": "Suggested prompts",
   "section": "ai",
   "sectionName": "AI patterns",
   "description": "Starter cards on an empty screen show what the AI can do and fill the input in one tap.",
   "goodFor": "Empty AI screens and first-time users",
   "watchOut": "Generic prompts unrelated to the user",
   "seenIn": "Claude, ChatGPT, Microsoft Copilot",
   "prompt": "Build this AI interface pattern for my app: Suggested prompts.\n\nWhat it is: Starter cards on an empty screen show what the AI can do and fill the input in one tap.\nGood for: Empty AI screens and first-time users.\nWatch out: Generic prompts unrelated to the user.\nSeen in: Claude, ChatGPT, Microsoft Copilot\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-sugg\">\n    <b>What can I help with?</b>\n    <div class=\"gr2\"><button><i>✎</i>Write a polite reminder to a client</button><button><i>⌗</i>Explain a SQL join with an example</button><button><i>✈</i>Plan 3 days in Udaipur</button><button><i>▤</i>Summarise a long PDF</button></div>\n    <div class=\"inp\"><input id=\"sg-in\" placeholder=\"Message\" aria-label=\"Message\"><span aria-hidden=\"true\">↑</span></div>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; --body: \"Figtree\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque, Figtree */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-sugg, .s-sugg *, .s-sugg *::before, .s-sugg *::after { box-sizing: border-box; }\n.s-sugg { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-sugg button { font: inherit; cursor: pointer; }\n.s-sugg { background: #fff; color: #1f2430; padding: 18px; display: grid; gap: 12px; align-content: center; font-size: 12px; }\n.s-sugg > b { font: 700 18px var(--display); text-align: center; }\n.s-sugg .gr2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }\n.s-sugg .gr2 button { border: 1px solid #e3e6ec; background: #fafbfc; border-radius: 10px; padding: 10px; text-align: left; display: grid; gap: 6px; font-size: 12px; line-height: 1.35; color: #1f2430; transition: border-color .15s,transform .15s; }\n.s-sugg .gr2 button:hover { border-color: #3557e0; transform: translateY(-1px); }\n.s-sugg .gr2 i { font-style: normal; color: #3557e0; }\n.s-sugg .inp { display: flex; align-items: center; border: 1px solid #d6dae1; border-radius: 999px; padding: 4px 4px 4px 14px; }\n.s-sugg .inp input { flex: 1; min-width: 0; border: 0; outline: none; font: 13px var(--body); color: #1f2430; background: none; }\n.s-sugg .inp span { width: 28px; height: 28px; border-radius: 50%; background: #1f2430; color: #fff; display: grid; place-items: center; flex: none; }\n.s-sugg .inp.fl { border-color: #3557e0; box-shadow: 0 0 0 3px rgba(53,87,224,.15); }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  (() => { const i = $('#sg-in'), w = $('.s-sugg .inp'); if (!i) return;\n    $$('.s-sugg .gr2 button').forEach(b => b.addEventListener('click', () => { i.value = b.textContent.replace(/^\\S\\s*/, '').trim(); w.classList.add('fl'); i.focus(); }));\n    i.addEventListener('blur', () => w.classList.remove('fl'));\n  })();\n})();"
   }
  },
  {
   "id": "citations",
   "title": "Inline citations",
   "section": "ai",
   "sectionName": "AI patterns",
   "description": "Numbered markers link each claim to its source, with a preview card so people can check the answer.",
   "goodFor": "AI answers, research, fact-based content",
   "watchOut": "Links that do not actually back the claim",
   "seenIn": "Perplexity, Claude with web search, Google AI Overviews",
   "prompt": "Build this AI interface pattern for my app: Inline citations.\n\nWhat it is: Numbered markers link each claim to its source, with a preview card so people can check the answer.\nGood for: AI answers, research, fact-based content.\nWatch out: Links that do not actually back the claim.\nSeen in: Perplexity, Claude with web search, Google AI Overviews\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-cite\">\n    <small>Example answer with sources</small>\n    <p>Acme's revenue grew 18% year on year<button class=\"cn\">1</button>, driven mostly by subscriptions<button class=\"cn\">2</button>. The team expects growth to slow next quarter<button class=\"cn\">3</button>.</p>\n    <div class=\"src\" id=\"ct-s\"></div>\n  </div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-cite, .s-cite *, .s-cite *::before, .s-cite *::after { box-sizing: border-box; }\n.s-cite { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-cite button { font: inherit; cursor: pointer; }\n.s-cite { background: #fff; color: #1f2430; padding: 18px; display: grid; gap: 10px; align-content: start; font-size: 13px; }\n.s-cite small { color: #888; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }\n.s-cite p { margin: 0; line-height: 1.7; }\n.s-cite .cn { border: 0; background: #eef1ff; color: #3557e0; font: 600 10px var(--mono); border-radius: 4px; padding: 1px 5px; margin-left: 3px; vertical-align: 2px; cursor: pointer; }\n.s-cite .cn.on { background: #3557e0; color: #fff; }\n.s-cite .src { border: 1px solid #e3e6ec; border-radius: 10px; padding: 10px 12px; display: grid; gap: 3px; box-shadow: 0 6px 16px rgba(0,0,0,.06); font-size: 12px; }\n.s-cite .src span { color: #666; font-size: 11px; }\n.s-cite .src em { font-style: normal; color: #3557e0; font: 11px var(--mono); overflow-wrap: anywhere; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  (() => { const S = [['Q3 2026 results deck', 'acme-example.com/investors/q3.pdf', 'Page 4: revenue up 18% year on year.'], ['Investor call transcript', 'acme-example.com/investors/call', '\"Subscriptions were about two thirds of new revenue.\"'], ['Letter from the CFO', 'acme-example.com/blog/cfo-letter', '\"We expect growth to slow next quarter as the festive season ends.\"']];\n    const box = $('#ct-s'), bs = $$('.s-cite .cn'); if (!box) return;\n    const show = k => { bs.forEach((b, i) => b.classList.toggle('on', i === k)); box.innerHTML = `<em>[${k + 1}] ${S[k][1]}</em><b>${S[k][0]}</b><span>${S[k][2]}</span>`; };\n    bs.forEach((b, i) => { b.addEventListener('click', () => show(i)); b.addEventListener('mouseenter', () => show(i)); }); show(0);\n  })();\n})();"
   }
  },
  {
   "id": "voice",
   "title": "Voice & multimodal input",
   "section": "ai",
   "sectionName": "AI patterns",
   "description": "A mic button with a live waveform and transcript, so people can see they're being heard. This demo simulates speech; it doesn't use your microphone.",
   "goodFor": "Hands-busy moments: driving, cooking, accessibility",
   "watchOut": "Noisy places or private information",
   "seenIn": "Siri, Google Assistant, ChatGPT voice",
   "prompt": "Build this AI interface pattern for my app: Voice & multimodal input.\n\nWhat it is: A mic button with a live waveform and transcript, so people can see they're being heard. This demo simulates speech; it doesn't use your microphone.\nGood for: Hands-busy moments: driving, cooking, accessibility.\nWatch out: Noisy places or private information.\nSeen in: Siri, Google Assistant, ChatGPT voice\n\nRequirements:\n1. Match my existing stack, components and design tokens. If I have none, use semantic HTML, CSS and a little vanilla JavaScript.\n2. Every control must work with the keyboard and show a visible focus ring.\n3. Keep text contrast at WCAG AA or better (4.5:1 for body text, 3:1 for large text and icons).\n4. Respect prefers-reduced-motion and keep any motion calm and short.\n5. Make it work from 320px wide up to large desktops with no sideways scrolling.\n6. Use realistic content instead of lorem ipsum, and do not add features I did not ask for.\n\nUse the kindofui reference code below for the look and behaviour. Adapt it to my project instead of pasting it as is.",
   "code": {
    "html": "<div class=\"stage s-voice\">\n    <div class=\"tr2\" id=\"vc-t\">\"Remind me to call the bank tomorrow at 10.\"</div>\n    <div class=\"wave\" id=\"vc-w\"></div>\n    <button class=\"mic\" id=\"vc-b\" aria-pressed=\"false\" aria-label=\"Start listening\"><svg viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\"><rect x=\"9\" y=\"3\" width=\"6\" height=\"11\" rx=\"3\"></rect><path d=\"M5 11a7 7 0 0 0 14 0M12 18v3\"></path></svg></button>\n    <small id=\"vc-s\">Tap the mic to see a simulated voice request</small>\n  </div>\n",
    "css": ":root { --body: \"Figtree\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Figtree */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-voice, .s-voice *, .s-voice *::before, .s-voice *::after { box-sizing: border-box; }\n.s-voice { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-voice button { font: inherit; cursor: pointer; }\n.s-voice { background: linear-gradient(#0f172a,#1e1b4b); color: #e2e8f0; display: grid; justify-items: center; align-content: center; gap: 14px; padding: 18px; text-align: center; font-size: 13px; }\n.s-voice .tr2 { min-height: 42px; font: 500 15px/1.4 var(--body); max-width: 30ch; }\n.s-voice .wave { display: flex; gap: 3px; align-items: center; height: 40px; }\n.s-voice .wave i { width: 4px; height: 6px; border-radius: 2px; background: #818cf8; }\n.s-voice .wave.on i { animation: wv .9s ease-in-out infinite; }\n.s-voice .mic { width: 60px; height: 60px; border-radius: 50%; border: 0; background: #fff; color: #1e1b4b; display: grid; place-items: center; position: relative; }\n.s-voice .mic[aria-pressed=\"true\"] { background: #ef4444; color: #fff; }\n.s-voice .mic[aria-pressed=\"true\"]::before { content: \"\"; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid rgba(239,68,68,.5); animation: pulse 1.2s ease-out infinite; }\n.s-voice small { color: #94a3b8; }\n@keyframes wv {\n  50%{height:36px}\n}\n@keyframes pulse {\n  to{transform:scale(1.4);opacity:0}\n}\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  (() => { const b = $('#vc-b'), w = $('#vc-w'), t = $('#vc-t'), s = $('#vc-s'); if (!b) return;\n    w.innerHTML = Array.from({ length: 18 }, (_, i) => `<i style=\"animation-delay:${(i * -.07).toFixed(2)}s\"></i>`).join('');\n    const say = 'Remind me to call the bank tomorrow at 10'; let tm;\n    b.addEventListener('click', () => { const act = b.getAttribute('aria-pressed') !== 'true'; b.setAttribute('aria-pressed', act); b.setAttribute('aria-label', act ? 'Stop listening' : 'Start listening'); w.classList.toggle('on', act); clearInterval(tm);\n      if (act) { s.textContent = 'Listening…'; const words = say.split(' '); let i = 0; t.textContent = '';\n        tm = setInterval(() => { t.textContent += (i ? ' ' : '') + words[i++]; if (i >= words.length) { clearInterval(tm); setTimeout(() => { if (b.getAttribute('aria-pressed') === 'true') b.click(); }, 600); } }, 260); }\n      else { s.textContent = 'Done · Reminder set for tomorrow, 10:00 AM'; t.textContent = '\"' + say + '.\"'; } });\n  })();\n})();"
   }
  },
  {
   "id": "fitts",
   "title": "Fitts's law",
   "section": "laws",
   "sectionName": "UX laws",
   "description": "The bigger and closer a target is, the faster people can hit it.",
   "goodFor": "Sizing and placing primary buttons and touch targets",
   "watchOut": "Tiny targets far from where the hand already is",
   "seenIn": "big checkout buttons, bottom-of-screen mobile actions",
   "prompt": "Review my UI against Fitts's law.\n\nWhat it is: The bigger and closer a target is, the faster people can hit it.\nGood for: Sizing and placing primary buttons and touch targets.\nWatch out: Tiny targets far from where the hand already is.\nSeen in: big checkout buttons, bottom-of-screen mobile actions\n\nFor each screen or component I share:\n1. Point to the exact places where it breaks this law and say why it matters to the user.\n2. Suggest a concrete fix for each one, smallest change first.\n3. Apply the fixes in code when I say so, keeping my existing styles.\n4. Tell me how to check the result, for example with a quick user test or a measurement.\n\nThe kindofui example below shows the law in a small working demo.",
   "code": {
    "html": "<div class=\"stage s-fitts\"><div class=\"vs2\">\n    <div><span class=\"lb2 b\">Small &amp; far</span><button class=\"go\" data-p=\"a\">Start</button><button class=\"tg3 sm\" data-p=\"a\">OK</button><span class=\"rs\" id=\"ft-a\">Click Start, then OK</span></div>\n    <div><span class=\"lb2 g\">Big &amp; near</span><button class=\"go\" data-p=\"b\">Start</button><button class=\"tg3 bg\" data-p=\"b\">OK</button><span class=\"rs\" id=\"ft-b\">Click Start, then OK</span></div>\n  </div></div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-fitts, .s-fitts *, .s-fitts *::before, .s-fitts *::after { box-sizing: border-box; }\n.s-fitts { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-fitts button { font: inherit; cursor: pointer; }\n.vs2 { display: grid; grid-template-columns: 1fr 1fr; height: 100%; font-size: 11px; color: #1f2430; }\n.vs2 > div { padding: 10px 12px; display: grid; gap: 8px; align-content: start; position: relative; min-width: 0; }\n.vs2 > div:first-child { background: #fff; border-right: 1px solid #e5e7eb; }\n.vs2 > div:last-child { background: #fafafa; }\n.vs2 .lb2 { font: 700 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; }\n.vs2 .lb2.b { color: #b42318; }\n.vs2 .lb2.g { color: #067647; }\n.s-fitts .vs2 > div { display: block; }\n.s-fitts .go { position: absolute; left: 12px; bottom: 14px; border: 1px solid #cfd5dd; background: #fff; border-radius: 6px; padding: 5px 10px; font-size: 11px; color: #1f2430; }\n.s-fitts .tg3 { position: absolute; border: 0; background: #3557e0; color: #fff; border-radius: 5px; font-weight: 700; }\n.s-fitts .sm { right: 10px; top: 34px; width: 26px; height: 18px; font-size: 8px; padding: 0; }\n.s-fitts .bg { left: 12px; right: 12px; bottom: 50px; height: 44px; font-size: 13px; }\n.s-fitts .rs { position: absolute; left: 12px; top: 36px; right: 44px; font: 11px var(--mono); color: #444; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  /* ---------- UX laws ---------- */\n  (() => { const t0 = {};\n    $$('.s-fitts .go').forEach(b => b.addEventListener('click', () => { t0[b.dataset.p] = performance.now(); $('#ft-' + b.dataset.p).textContent = 'Now click OK…'; }));\n    $$('.s-fitts .tg3').forEach(b => b.addEventListener('click', () => { const p = b.dataset.p; if (!t0[p]) return; const ms = Math.round(performance.now() - t0[p]); t0[p] = 0; $('#ft-' + p).textContent = `${ms} ms`; }));\n  })();\n})();"
   }
  },
  {
   "id": "hick",
   "title": "Hick's law",
   "section": "laws",
   "sectionName": "UX laws",
   "description": "The more choices people see at once, the longer they take to decide. Group and reduce options.",
   "goodFor": "Menus, settings, choice-heavy screens",
   "watchOut": "Burying common choices too deep while grouping",
   "seenIn": "grouped settings menus, short restaurant menus, Google's homepage",
   "prompt": "Review my UI against Hick's law.\n\nWhat it is: The more choices people see at once, the longer they take to decide. Group and reduce options.\nGood for: Menus, settings, choice-heavy screens.\nWatch out: Burying common choices too deep while grouping.\nSeen in: grouped settings menus, short restaurant menus, Google's homepage\n\nFor each screen or component I share:\n1. Point to the exact places where it breaks this law and say why it matters to the user.\n2. Suggest a concrete fix for each one, smallest change first.\n3. Apply the fixes in code when I say so, keeping my existing styles.\n4. Tell me how to check the result, for example with a quick user test or a measurement.\n\nThe kindofui example below shows the law in a small working demo.",
   "code": {
    "html": "<div class=\"stage s-hick\"><div class=\"vs2\">\n    <div><span class=\"lb2 b\">16 choices at once</span><div class=\"m16\"><span>Overview</span><span>Invoices</span><span>Payments</span><span>Taxes</span><span>Members</span><span>Roles</span><span>Invites</span><span>Audit log</span><span>Sales</span><span>Traffic</span><span>Exports</span><span>Profile</span><span>Security</span><span>Plan</span><span>API keys</span><span>Integrations</span></div></div>\n    <div><span class=\"lb2 g\">Grouped into 4</span><div class=\"m4\"><details open=\"\"><summary>Billing</summary><span>Invoices</span><span>Payments</span><span>Taxes</span></details><details><summary>Team</summary><span>Members</span><span>Roles</span><span>Invites</span></details><details><summary>Reports</summary><span>Sales</span><span>Traffic</span><span>Exports</span></details><details><summary>Settings</summary><span>Profile</span><span>Security</span><span>API keys</span></details></div></div>\n  </div></div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-hick, .s-hick *, .s-hick *::before, .s-hick *::after { box-sizing: border-box; }\n.s-hick { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-hick button { font: inherit; cursor: pointer; }\n.vs2 { display: grid; grid-template-columns: 1fr 1fr; height: 100%; font-size: 11px; color: #1f2430; }\n.vs2 > div { padding: 10px 12px; display: grid; gap: 8px; align-content: start; position: relative; min-width: 0; }\n.vs2 > div:first-child { background: #fff; border-right: 1px solid #e5e7eb; }\n.vs2 > div:last-child { background: #fafafa; }\n.vs2 .lb2 { font: 700 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; }\n.vs2 .lb2.b { color: #b42318; }\n.vs2 .lb2.g { color: #067647; }\n.s-hick .m16 { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }\n.s-hick .m16 span { background: #fff; border: 1px solid #eee; border-radius: 4px; padding: 3px 5px; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.s-hick .m4 { display: grid; gap: 4px; }\n.s-hick .m4 details { background: #fff; border: 1px solid #e3efe6; border-radius: 6px; padding: 5px 8px; }\n.s-hick .m4 summary { font-weight: 600; cursor: pointer; }\n.s-hick .m4 span { display: block; padding: 2px 0 0 12px; color: #555; }",
    "js": ""
   }
  },
  {
   "id": "jakob",
   "title": "Jakob's law",
   "section": "laws",
   "sectionName": "UX laws",
   "description": "People spend most of their time on other sites, so they expect yours to work the same way. Use familiar patterns.",
   "goodFor": "Navigation, carts, search, forms",
   "watchOut": "Reinventing patterns people already know",
   "seenIn": "almost every online store header",
   "prompt": "Review my UI against Jakob's law.\n\nWhat it is: People spend most of their time on other sites, so they expect yours to work the same way. Use familiar patterns.\nGood for: Navigation, carts, search, forms.\nWatch out: Reinventing patterns people already know.\nSeen in: almost every online store header\n\nFor each screen or component I share:\n1. Point to the exact places where it breaks this law and say why it matters to the user.\n2. Suggest a concrete fix for each one, smallest change first.\n3. Apply the fixes in code when I say so, keeping my existing styles.\n4. Tell me how to check the result, for example with a quick user test or a measurement.\n\nThe kindofui example below shows the law in a small working demo.",
   "code": {
    "html": "<div class=\"stage s-jakob\"><div class=\"vs2\">\n    <div><span class=\"lb2 b\">Reinvented</span><div class=\"sh2 w\"><span class=\"cart\">Bag (2)</span><span class=\"srch\">?</span><b>Shopr</b></div><div class=\"pg3\"><i></i><i></i><i></i><i></i></div><small>Logo on the right, cart on the left, search hidden behind \"?\"</small></div>\n    <div><span class=\"lb2 g\">Familiar</span><div class=\"sh2\"><b>Shopr</b><span class=\"srch\">⌕ Search products</span><span class=\"cart\">Cart (2)</span></div><div class=\"pg3\"><i></i><i></i><i></i><i></i></div><small>Logo left, search in the middle, cart top right, like the stores people already use</small></div>\n  </div></div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque, JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-jakob, .s-jakob *, .s-jakob *::before, .s-jakob *::after { box-sizing: border-box; }\n.s-jakob { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-jakob button { font: inherit; cursor: pointer; }\n[hidden] { display: none !important; }\n.vs2 { display: grid; grid-template-columns: 1fr 1fr; height: 100%; font-size: 11px; color: #1f2430; }\n.vs2 > div { padding: 10px 12px; display: grid; gap: 8px; align-content: start; position: relative; min-width: 0; }\n.vs2 > div:first-child { background: #fff; border-right: 1px solid #e5e7eb; }\n.vs2 > div:last-child { background: #fafafa; }\n.vs2 .lb2 { font: 700 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; }\n.vs2 .lb2.b { color: #b42318; }\n.vs2 .lb2.g { color: #067647; }\n.s-jakob .sh2 { display: flex; gap: 6px; align-items: center; background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; padding: 6px; font-size: 10px; }\n.s-jakob .sh2 b { font-family: var(--display); font-size: 12px; }\n.s-jakob .vs2>div { min-width: 0; grid-template-columns: minmax(0,1fr); }\n.s-jakob .sh2 b,.s-jakob .sh2 .cart { flex: none; }\n.s-jakob .sh2 .srch { flex: 1; min-width: 0; border: 1px solid #e3e6ec; border-radius: 4px; padding: 3px 5px; color: #999; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.s-jakob .sh2.w .srch { flex: none; }\n.s-jakob .sh2.w b { margin-left: auto; }\n.s-jakob .sh2 .cart { background: #111827; color: #fff; border-radius: 4px; padding: 3px 5px; white-space: nowrap; }\n.s-jakob .pg3 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }\n.s-jakob .pg3 i { aspect-ratio: 8/5; background: #e5e7eb; border-radius: 4px; max-width: 100%; }\n.s-jakob small { color: #666; font-size: 10.5px; line-height: 1.4; }",
    "js": ""
   }
  },
  {
   "id": "miller",
   "title": "Miller's law (chunking)",
   "section": "laws",
   "sectionName": "UX laws",
   "description": "Short-term memory holds only a handful of items, often given as 7 ± 2. Break long numbers and lists into small groups.",
   "goodFor": "Phone and card numbers, codes, long lists",
   "watchOut": "Treating 7 as a hard rule; just chunk and group",
   "seenIn": "phone and card number fields, OTP boxes, IFSC and PIN codes",
   "prompt": "Review my UI against Miller's law (chunking).\n\nWhat it is: Short-term memory holds only a handful of items, often given as 7 ± 2. Break long numbers and lists into small groups.\nGood for: Phone and card numbers, codes, long lists.\nWatch out: Treating 7 as a hard rule; just chunk and group.\nSeen in: phone and card number fields, OTP boxes, IFSC and PIN codes\n\nFor each screen or component I share:\n1. Point to the exact places where it breaks this law and say why it matters to the user.\n2. Suggest a concrete fix for each one, smallest change first.\n3. Apply the fixes in code when I say so, keeping my existing styles.\n4. Tell me how to check the result, for example with a quick user test or a measurement.\n\nThe kindofui example below shows the law in a small working demo.",
   "code": {
    "html": "<div class=\"stage s-miller\"><div class=\"vs2\">\n    <div><span class=\"lb2 b\">One long string</span><code>9876543210</code><code>4821000012345678</code><code>ABCD0001234</code><small>Hard to read back or check</small></div>\n    <div><span class=\"lb2 g\">Chunked</span><code>98765 43210</code><code>4821 0000 1234 5678</code><code>ABCD 0001 234</code><small>Small groups are easy to hold in memory</small></div>\n  </div></div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-miller, .s-miller *, .s-miller *::before, .s-miller *::after { box-sizing: border-box; }\n.s-miller { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-miller button { font: inherit; cursor: pointer; }\n.vs2 { display: grid; grid-template-columns: 1fr 1fr; height: 100%; font-size: 11px; color: #1f2430; }\n.vs2 > div { padding: 10px 12px; display: grid; gap: 8px; align-content: start; position: relative; min-width: 0; }\n.vs2 > div:first-child { background: #fff; border-right: 1px solid #e5e7eb; }\n.vs2 > div:last-child { background: #fafafa; }\n.vs2 .lb2 { font: 700 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; }\n.vs2 .lb2.b { color: #b42318; }\n.vs2 .lb2.g { color: #067647; }\n.s-miller .vs2 > div { align-content: center; }\n.s-miller code { font: 600 14px var(--mono); background: #fff; border: 1px solid #eee; border-radius: 6px; padding: 8px; overflow-wrap: anywhere; }\n.s-miller small { color: #666; font-size: 10px; }",
    "js": ""
   }
  },
  {
   "id": "gestalt",
   "title": "Gestalt principles",
   "section": "laws",
   "sectionName": "UX laws",
   "description": "How the eye groups things: by closeness, by similar looks, by filling gaps, and by shared containers. Use them to group content without extra lines.",
   "goodFor": "Grouping with space, color and shared boxes",
   "watchOut": "Random spacing that groups the wrong things",
   "seenIn": "every well-spaced form, card and dashboard",
   "prompt": "Review my UI against Gestalt principles.\n\nWhat it is: How the eye groups things: by closeness, by similar looks, by filling gaps, and by shared containers. Use them to group content without extra lines.\nGood for: Grouping with space, color and shared boxes.\nWatch out: Random spacing that groups the wrong things.\nSeen in: every well-spaced form, card and dashboard\n\nFor each screen or component I share:\n1. Point to the exact places where it breaks this law and say why it matters to the user.\n2. Suggest a concrete fix for each one, smallest change first.\n3. Apply the fixes in code when I say so, keeping my existing styles.\n4. Tell me how to check the result, for example with a quick user test or a measurement.\n\nThe kindofui example below shows the law in a small working demo.",
   "code": {
    "html": "<div class=\"stage s-gest\">\n    <figure><div class=\"px\"><span><i></i><i></i><i></i><i></i></span><span><i></i><i></i><i></i><i></i></span></div><figcaption><b>Proximity</b>Close items read as a group</figcaption></figure>\n    <figure><div class=\"sim\"><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i></div><figcaption><b>Similarity</b>Same look = same kind</figcaption></figure>\n    <figure><div class=\"cl\"></div><figcaption><b>Closure</b>We see a full circle</figcaption></figure>\n    <figure><div class=\"cr\"><i></i><i></i><i></i><i></i></div><figcaption><b>Common region</b>A shared box groups items</figcaption></figure>\n  </div>\n",
    "css": "/* base styles the site gives every demo (scoped to this demo) */\n.s-gest, .s-gest *, .s-gest *::before, .s-gest *::after { box-sizing: border-box; }\n.s-gest { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-gest button { font: inherit; cursor: pointer; }\n.s-gest { background: #fff; color: #1f2430; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; font-size: 10.5px; }\n.s-gest figure { margin: 0; display: grid; justify-items: center; align-content: center; gap: 8px; text-align: center; background: #f7f8fa; border-radius: 8px; padding: 8px; }\n.s-gest figcaption { display: grid; color: #666; }\n.s-gest figcaption b { color: #1f2430; font-size: 11px; }\n.s-gest .px { display: flex; gap: 20px; }\n.s-gest .px span { display: grid; grid-template-columns: repeat(2,10px); gap: 4px; }\n.s-gest .px i,.s-gest .cr i { width: 10px; height: 10px; border-radius: 50%; background: #3557e0; }\n.s-gest .sim { display: grid; grid-template-columns: repeat(4,10px); gap: 6px; }\n.s-gest .sim i { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; }\n.s-gest .sim i:nth-child(2n) { background: #f59e0b; border-radius: 2px; }\n.s-gest .cl { width: 42px; height: 42px; border-radius: 50%; border: 5px dashed #3557e0; }\n.s-gest .cr { display: grid; grid-template-columns: repeat(4,10px); gap: 8px; position: relative; }\n.s-gest .cr::before { content: \"\"; position: absolute; left: -5px; top: -5px; width: 38px; height: 20px; border: 1.5px solid #3557e0; border-radius: 6px; }",
    "js": ""
   }
  },
  {
   "id": "vonrestorff",
   "title": "Von Restorff effect",
   "section": "laws",
   "sectionName": "UX laws",
   "description": "The item that looks different from the rest is the one people remember and notice first. Highlight only what matters most.",
   "goodFor": "Highlighting the one thing that matters most",
   "watchOut": "Highlighting everything, so nothing stands out",
   "seenIn": "\"Most popular\" pricing plans, primary buttons",
   "prompt": "Review my UI against Von Restorff effect.\n\nWhat it is: The item that looks different from the rest is the one people remember and notice first. Highlight only what matters most.\nGood for: Highlighting the one thing that matters most.\nWatch out: Highlighting everything, so nothing stands out.\nSeen in: \"Most popular\" pricing plans, primary buttons\n\nFor each screen or component I share:\n1. Point to the exact places where it breaks this law and say why it matters to the user.\n2. Suggest a concrete fix for each one, smallest change first.\n3. Apply the fixes in code when I say so, keeping my existing styles.\n4. Tell me how to check the result, for example with a quick user test or a measurement.\n\nThe kindofui example below shows the law in a small working demo.",
   "code": {
    "html": "<div class=\"stage s-vr\"><div class=\"vs2\">\n    <div><span class=\"lb2 b\">All the same</span><div class=\"pl\"><span>Basic <b>₹199</b></span><span>Plus <b>₹499</b></span><span>Pro <b>₹999</b></span></div></div>\n    <div><span class=\"lb2 g\">One stands out</span><div class=\"pl\"><span>Basic <b>₹199</b></span><span class=\"hl\">Plus <em>Best value</em><b>₹499</b></span><span>Pro <b>₹999</b></span></div></div>\n  </div></div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-vr, .s-vr *, .s-vr *::before, .s-vr *::after { box-sizing: border-box; }\n.s-vr { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-vr button { font: inherit; cursor: pointer; }\n.vs2 { display: grid; grid-template-columns: 1fr 1fr; height: 100%; font-size: 11px; color: #1f2430; }\n.vs2 > div { padding: 10px 12px; display: grid; gap: 8px; align-content: start; position: relative; min-width: 0; }\n.vs2 > div:first-child { background: #fff; border-right: 1px solid #e5e7eb; }\n.vs2 > div:last-child { background: #fafafa; }\n.vs2 .lb2 { font: 700 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; }\n.vs2 .lb2.b { color: #b42318; }\n.vs2 .lb2.g { color: #067647; }\n.s-vr .vs2 > div { align-content: center; }\n.s-vr .pl { display: grid; gap: 6px; }\n.s-vr .pl span { background: #fff; border: 1px solid #e3e6ec; border-radius: 6px; padding: 9px 10px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 4px; }\n.s-vr .pl .hl { background: #3557e0; color: #fff; border-color: #3557e0; transform: scale(1.05); box-shadow: 0 6px 14px rgba(53,87,224,.3); }\n.s-vr .pl em { font-style: normal; font-size: 9px; background: #fff; color: #3557e0; border-radius: 999px; padding: 1px 6px; white-space: nowrap; }",
    "js": ""
   }
  },
  {
   "id": "tesler",
   "title": "Tesler's law",
   "section": "laws",
   "sectionName": "UX laws",
   "description": "Every task has some complexity that can't be removed. The question is who handles it, and it should be the system rather than the user.",
   "goodFor": "Moving complexity into defaults and automation",
   "watchOut": "Taking control away from experts",
   "seenIn": "address autocomplete, smart defaults, auto-filled PIN codes",
   "prompt": "Review my UI against Tesler's law.\n\nWhat it is: Every task has some complexity that can't be removed. The question is who handles it, and it should be the system rather than the user.\nGood for: Moving complexity into defaults and automation.\nWatch out: Taking control away from experts.\nSeen in: address autocomplete, smart defaults, auto-filled PIN codes\n\nFor each screen or component I share:\n1. Point to the exact places where it breaks this law and say why it matters to the user.\n2. Suggest a concrete fix for each one, smallest change first.\n3. Apply the fixes in code when I say so, keeping my existing styles.\n4. Tell me how to check the result, for example with a quick user test or a measurement.\n\nThe kindofui example below shows the law in a small working demo.",
   "code": {
    "html": "<div class=\"stage s-tesler\"><div class=\"vs2\">\n    <div><span class=\"lb2 b\">User does the work</span><span class=\"f\">Flat / house no.</span><span class=\"f\">Street</span><span class=\"f\">Area</span><span class=\"f\">City</span><span class=\"f\">State ▾</span><span class=\"f\">PIN code</span></div>\n    <div><span class=\"lb2 g\">System does the work</span><span class=\"f on\">14 MG Road, Pu|</span><div class=\"sgl\"><span class=\"sg\"><svg viewBox=\"0 0 16 16\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M8 1.5a4.5 4.5 0 0 0-4.5 4.5c0 3.2 4.5 8.5 4.5 8.5s4.5-5.3 4.5-8.5A4.5 4.5 0 0 0 8 1.5Zm0 6.2a1.7 1.7 0 1 1 0-3.4 1.7 1.7 0 0 1 0 3.4Z\"></path></svg><span><b>14 MG Road</b>, Camp, Pune 411001</span></span><span class=\"sg\"><svg viewBox=\"0 0 16 16\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M8 1.5a4.5 4.5 0 0 0-4.5 4.5c0 3.2 4.5 8.5 4.5 8.5s4.5-5.3 4.5-8.5A4.5 4.5 0 0 0 8 1.5Zm0 6.2a1.7 1.7 0 1 1 0-3.4 1.7 1.7 0 0 1 0 3.4Z\"></path></svg><span><b>14 MG Road</b>, Bengaluru 560001</span></span></div><small>Pick one and city, state and PIN fill in for you.</small></div>\n  </div></div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-tesler, .s-tesler *, .s-tesler *::before, .s-tesler *::after { box-sizing: border-box; }\n.s-tesler { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-tesler button { font: inherit; cursor: pointer; }\n.vs2 { display: grid; grid-template-columns: 1fr 1fr; height: 100%; font-size: 11px; color: #1f2430; }\n.vs2 > div { padding: 10px 12px; display: grid; gap: 8px; align-content: start; position: relative; min-width: 0; }\n.vs2 > div:first-child { background: #fff; border-right: 1px solid #e5e7eb; }\n.vs2 > div:last-child { background: #fafafa; }\n.vs2 .lb2 { font: 700 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; }\n.vs2 .lb2.b { color: #b42318; }\n.vs2 .lb2.g { color: #067647; }\n.s-tesler .f { background: #fff; border: 1px solid #e3e6ec; border-radius: 5px; padding: 5px 7px; color: #999; }\n.s-tesler .f.on { border-color: #1a73e8; box-shadow: 0 0 0 3px rgba(26,115,232,.15); color: #1f2430; }\n.s-tesler .sgl { background: #fff; border: 1px solid #dfe1e5; border-radius: 6px; box-shadow: 0 2px 6px rgba(60,64,67,.15); overflow: hidden; }\n.s-tesler .sg { display: flex; gap: 7px; align-items: flex-start; padding: 7px 8px; color: #3c4043; line-height: 1.3; }\n.s-tesler .sg + .sg { border-top: 1px solid #edeff2; }\n.s-tesler .sg:hover { background: #f1f3f4; }\n.s-tesler .sg svg { width: 12px; height: 12px; flex: none; margin-top: 1px; color: #80868b; }\n.s-tesler .sg b { color: #1f2430; }\n.s-tesler small { color: #666; }",
    "js": ""
   }
  },
  {
   "id": "doherty",
   "title": "Doherty threshold",
   "section": "laws",
   "sectionName": "UX laws",
   "description": "People stay engaged when the system responds in under about 400 ms. If it can't, show feedback right away.",
   "goodFor": "Responding in under 400 ms, or giving instant feedback",
   "watchOut": "Long silent waits with no feedback",
   "seenIn": "instant search, optimistic UI, skeleton screens",
   "prompt": "Review my UI against Doherty threshold.\n\nWhat it is: People stay engaged when the system responds in under about 400 ms. If it can't, show feedback right away.\nGood for: Responding in under 400 ms, or giving instant feedback.\nWatch out: Long silent waits with no feedback.\nSeen in: instant search, optimistic UI, skeleton screens\n\nFor each screen or component I share:\n1. Point to the exact places where it breaks this law and say why it matters to the user.\n2. Suggest a concrete fix for each one, smallest change first.\n3. Apply the fixes in code when I say so, keeping my existing styles.\n4. Tell me how to check the result, for example with a quick user test or a measurement.\n\nThe kindofui example below shows the law in a small working demo.",
   "code": {
    "html": "<div class=\"stage s-doh\"><div class=\"vs2\">\n    <div><span class=\"lb2 b\">1.5 s response</span><button class=\"ld2\" data-ms=\"1500\">Load photos</button><div class=\"out\"><span>Click to feel the wait</span></div></div>\n    <div><span class=\"lb2 g\">Under 400 ms</span><button class=\"ld2\" data-ms=\"120\">Load photos</button><div class=\"out\"><span>Click to compare</span></div></div>\n  </div></div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-doh, .s-doh *, .s-doh *::before, .s-doh *::after { box-sizing: border-box; }\n.s-doh { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-doh button { font: inherit; cursor: pointer; }\n.vs2 { display: grid; grid-template-columns: 1fr 1fr; height: 100%; font-size: 11px; color: #1f2430; }\n.vs2 > div { padding: 10px 12px; display: grid; gap: 8px; align-content: start; position: relative; min-width: 0; }\n.vs2 > div:first-child { background: #fff; border-right: 1px solid #e5e7eb; }\n.vs2 > div:last-child { background: #fafafa; }\n.vs2 .lb2 { font: 700 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; }\n.vs2 .lb2.b { color: #b42318; }\n.vs2 .lb2.g { color: #067647; }\n.s-doh .ld2 { border: 0; background: #3557e0; color: #fff; border-radius: 6px; padding: 7px; font-weight: 600; }\n.s-doh .out { display: grid; grid-template-columns: repeat(3,1fr); gap: 4px; min-height: 60px; align-content: start; }\n.s-doh .out i { aspect-ratio: 1; border-radius: 4px; max-width: 100%; }\n.s-doh .out span { grid-column: 1/-1; font: 10px var(--mono); color: #666; }\n.s-doh .out .sp4 { grid-column: 1/-1; justify-self: center; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #cfd5dd; border-top-color: #3557e0; animation: spin .7s linear infinite; margin-top: 10px; }\n@keyframes spin {\n  to{transform:rotate(1turn)}\n}\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  $$('.s-doh .ld2').forEach(b => b.addEventListener('click', () => { const o = b.nextElementSibling, ms = +b.dataset.ms, t = performance.now(); o.innerHTML = '<span class=\"sp4\"></span>';\n    setTimeout(() => { o.innerHTML = Array.from({ length: 6 }, (_, i) => `<i style=\"background:hsl(${200 + i * 25} 70% 70%)\"></i>`).join('') + `<span>Loaded in ${Math.round(performance.now() - t).toLocaleString()} ms</span>`; }, ms); }));\n})();"
   }
  },
  {
   "id": "aesthetic",
   "title": "Aesthetic-usability effect",
   "section": "laws",
   "sectionName": "UX laws",
   "description": "People think good-looking designs are easier to use, and forgive small problems in them. Both forms do the same job.",
   "goodFor": "Building trust and patience through polish",
   "watchOut": "Using polish to hide real usability problems",
   "seenIn": "Stripe, Linear, Apple",
   "prompt": "Review my UI against Aesthetic-usability effect.\n\nWhat it is: People think good-looking designs are easier to use, and forgive small problems in them. Both forms do the same job.\nGood for: Building trust and patience through polish.\nWatch out: Using polish to hide real usability problems.\nSeen in: Stripe, Linear, Apple\n\nFor each screen or component I share:\n1. Point to the exact places where it breaks this law and say why it matters to the user.\n2. Suggest a concrete fix for each one, smallest change first.\n3. Apply the fixes in code when I say so, keeping my existing styles.\n4. Tell me how to check the result, for example with a quick user test or a measurement.\n\nThe kindofui example below shows the law in a small working demo.",
   "code": {
    "html": "<div class=\"stage s-aes\"><div class=\"vs2\">\n    <div><span class=\"lb2 b\">Unpolished</span><div class=\"ug\"><span>NAME:</span><input id=\"aes-1\" aria-label=\"Name (unpolished form)\"><span>E-MAIL ADDR:</span><input id=\"aes-2\" aria-label=\"Email (unpolished form)\"><button>SUBMIT FORM</button></div></div>\n    <div><span class=\"lb2 g\">Polished</span><div class=\"pf\"><label for=\"aes-3\">Name</label><input id=\"aes-3\" placeholder=\"Aditi Rao\"><label for=\"aes-4\">Email</label><input id=\"aes-4\" placeholder=\"you@example.com\"><button>Join the waitlist</button></div></div>\n  </div></div>\n",
    "css": ":root { --body: \"Figtree\",system-ui,sans-serif; --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): Figtree, JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-aes, .s-aes *, .s-aes *::before, .s-aes *::after { box-sizing: border-box; }\n.s-aes { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-aes button { font: inherit; cursor: pointer; }\n.vs2 { display: grid; grid-template-columns: 1fr 1fr; height: 100%; font-size: 11px; color: #1f2430; }\n.vs2 > div { padding: 10px 12px; display: grid; gap: 8px; align-content: start; position: relative; min-width: 0; }\n.vs2 > div:first-child { background: #fff; border-right: 1px solid #e5e7eb; }\n.vs2 > div:last-child { background: #fafafa; }\n.vs2 .lb2 { font: 700 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; }\n.vs2 .lb2.b { color: #b42318; }\n.vs2 .lb2.g { color: #067647; }\n.s-aes .ug { display: grid; gap: 3px; font: 11px \"Times New Roman\",serif; background: #ddd; padding: 6px; border: 2px ridge #aaa; }\n.s-aes .ug input { border: 2px inset #999; font: 11px \"Comic Sans MS\",cursive; padding: 1px; min-width: 0; background: #fff; color: #000; }\n.s-aes .ug button { justify-self: start; font: bold 10px Arial,sans-serif; background: #f0f; color: #0f0; border: 2px outset #ccc; }\n.s-aes .pf { display: grid; gap: 4px; background: #fff; border-radius: 10px; padding: 10px; box-shadow: 0 4px 14px rgba(0,0,0,.06); }\n.s-aes .pf label { font-weight: 600; font-size: 10.5px; }\n.s-aes .pf input { border: 1px solid #d6dae1; border-radius: 6px; padding: 5px 7px; font: 11px var(--body); min-width: 0; color: #1f2430; }\n.s-aes .pf button { margin-top: 4px; border: 0; background: #16a34a; color: #fff; border-radius: 6px; padding: 7px; font-weight: 600; }",
    "js": ""
   }
  },
  {
   "id": "nielsen",
   "title": "Nielsen's 10 heuristics",
   "section": "laws",
   "sectionName": "UX laws",
   "description": "Jakob Nielsen's ten rules of thumb for usable interfaces. Teams use them as a checklist for quick design reviews.",
   "goodFor": "Quick heuristic reviews of any interface",
   "watchOut": "Replacing testing with real users",
   "seenIn": "UX audits and design reviews everywhere",
   "prompt": "Review my UI against Nielsen's 10 heuristics.\n\nWhat it is: Jakob Nielsen's ten rules of thumb for usable interfaces. Teams use them as a checklist for quick design reviews.\nGood for: Quick heuristic reviews of any interface.\nWatch out: Replacing testing with real users.\nSeen in: UX audits and design reviews everywhere\n\nFor each screen or component I share:\n1. Point to the exact places where it breaks this law and say why it matters to the user.\n2. Suggest a concrete fix for each one, smallest change first.\n3. Apply the fixes in code when I say so, keeping my existing styles.\n4. Tell me how to check the result, for example with a quick user test or a measurement.\n\nThe kindofui example below shows the law in a small working demo.",
   "code": {
    "html": "<div class=\"stage s-nh\"><ol>\n    <li><b>Visibility of system status</b>Keep people informed</li><li><b>Match the real world</b>Use their words</li>\n    <li><b>User control and freedom</b>Easy undo and exit</li><li><b>Consistency and standards</b>Same thing, same look</li>\n    <li><b>Error prevention</b>Stop mistakes early</li><li><b>Recognition over recall</b>Show options, don't make them remember</li>\n    <li><b>Flexibility and efficiency</b>Shortcuts for experts</li><li><b>Minimalist design</b>Only what's needed</li>\n    <li><b>Help users recover from errors</b>Plain-language fixes</li><li><b>Help and documentation</b>Easy to search</li>\n  </ol></div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-nh, .s-nh *, .s-nh *::before, .s-nh *::after { box-sizing: border-box; }\n.s-nh { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-nh button { font: inherit; cursor: pointer; }\n.s-nh { background: #fff; color: #1f2430; padding: 9px; font-size: 10px; container-type: inline-size; }\n.s-nh ol { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; counter-reset: h; }\n.s-nh li { counter-increment: h; background: #f7f8fa; border-radius: 6px; padding: 3px 6px 3px 21px; position: relative; display: grid; align-content: center; color: #666; line-height: 1.2; }\n.s-nh li::before { content: counter(h); position: absolute; left: 6px; top: 3px; font: 700 11px var(--mono); color: #3557e0; }\n.s-nh li b { color: #1f2430; font-size: 11px; }\n@container (max-width:300px) {\n  .s-nh li { font-size: 0; line-height: 0; padding-block: 4px; }\n  .s-nh li b { font-size: 10.5px; line-height: 1.2; }\n  .s-nh li::before { top: 4px; }\n}",
    "js": ""
   }
  },
  {
   "id": "a11y",
   "title": "Accessibility-first (WCAG)",
   "section": "access",
   "sectionName": "Accessibility and motion",
   "description": "Design so everyone can use it, including people with low vision, motor issues or screen readers: enough contrast, big targets, real labels and keyboard focus.",
   "goodFor": "Every product, from the first sketch",
   "watchOut": "Treating it as a final checklist item",
   "seenIn": "GOV.UK, Apple, Microsoft Inclusive Design, legally required for many public sites",
   "prompt": "Make my UI follow this accessibility and motion practice: Accessibility-first (WCAG).\n\nWhat it is: Design so everyone can use it, including people with low vision, motor issues or screen readers: enough contrast, big targets, real labels and keyboard focus.\nGood for: Every product, from the first sketch.\nWatch out: Treating it as a final checklist item.\nSeen in: GOV.UK, Apple, Microsoft Inclusive Design, legally required for many public sites\n\nSteps:\n1. Audit every page and component I share against this practice and list each problem with its element.\n2. Fix the problems in code without changing the visual design more than needed.\n3. Follow WCAG 2.2 AA and say which success criterion each fix covers.\n4. Tell me how to test it myself: keyboard only, a screen reader, 200% zoom and reduced motion.\n\nThe kindofui example below shows the practice in a small working demo.",
   "code": {
    "html": "<div class=\"stage s-a11y\">\n    <span class=\"hd b\">✕ Hard to use</span><span class=\"hd g\">✓ Accessible</span>\n    <div class=\"cell\"><span class=\"lowc\">Low contrast text</span><small>1.6:1, fails WCAG</small></div>\n    <div class=\"cell\"><span class=\"hic\">Readable text</span><small>15:1, passes AA and AAA</small></div>\n    <div class=\"cell\"><div class=\"tiny\"><i></i><i></i><i></i></div><small>14px tap targets</small></div>\n    <div class=\"cell\"><div class=\"big\"><i></i><i></i><i></i></div><small>44px or larger tap targets</small></div>\n    <div class=\"cell\"><span class=\"fake\">Email</span><small>Placeholder as label, no focus ring</small></div>\n    <div class=\"cell\"><div class=\"real\"><span>Email</span><div>you@mail.com</div></div><small>Visible label and focus ring</small></div>\n  </div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-a11y, .s-a11y *, .s-a11y *::before, .s-a11y *::after { box-sizing: border-box; }\n.s-a11y { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-a11y button { font: inherit; cursor: pointer; }\n.s-a11y { background: #fff; color: #1f2430; padding: 12px 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; align-content: start; font-size: 11px; }\n.s-a11y .hd { font: 700 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; }\n.s-a11y .hd.b { color: #dc2626; }\n.s-a11y .hd.g { color: #16a34a; }\n.s-a11y .cell { border: 1px dashed #e3e6ec; border-radius: 6px; padding: 7px; display: grid; gap: 4px; align-content: start; min-width: 0; }\n.s-a11y small { color: #888; font-size: 9.5px; }\n.s-a11y .lowc { background: #fafafa; color: #c9c9c9; padding: 4px 6px; border-radius: 4px; }\n.s-a11y .hic { background: #1f2430; color: #fff; padding: 4px 6px; border-radius: 4px; }\n.s-a11y .tiny { display: flex; gap: 2px; }\n.s-a11y .tiny i { width: 14px; height: 14px; background: #d6dae1; border-radius: 3px; }\n.s-a11y .big { display: flex; gap: 6px; }\n.s-a11y .big i { width: 30px; height: 30px; background: #c7d2fe; border-radius: 6px; }\n.s-a11y .fake { border: 1px solid #ddd; border-radius: 4px; padding: 3px 6px; color: #bbb; }\n.s-a11y .real { display: grid; gap: 2px; }\n.s-a11y .real span { font-weight: 600; }\n.s-a11y .real div { border: 1px solid #9aa3b2; border-radius: 4px; padding: 3px 6px; outline: 2px solid #3557e0; outline-offset: 1px; }",
    "js": ""
   }
  },
  {
   "id": "pour",
   "title": "WCAG POUR principles",
   "section": "access",
   "sectionName": "Accessibility and motion",
   "description": "The four principles the Web Content Accessibility Guidelines are built on. Every WCAG rule fits under one of them.",
   "goodFor": "Structuring accessibility reviews",
   "watchOut": "Relying only on automated checkers",
   "seenIn": "WCAG 2.2, accessibility audits and laws worldwide",
   "prompt": "Make my UI follow this accessibility and motion practice: WCAG POUR principles.\n\nWhat it is: The four principles the Web Content Accessibility Guidelines are built on. Every WCAG rule fits under one of them.\nGood for: Structuring accessibility reviews.\nWatch out: Relying only on automated checkers.\nSeen in: WCAG 2.2, accessibility audits and laws worldwide\n\nSteps:\n1. Audit every page and component I share against this practice and list each problem with its element.\n2. Fix the problems in code without changing the visual design more than needed.\n3. Follow WCAG 2.2 AA and say which success criterion each fix covers.\n4. Tell me how to test it myself: keyboard only, a screen reader, 200% zoom and reduced motion.\n\nThe kindofui example below shows the practice in a small working demo.",
   "code": {
    "html": "<div class=\"stage s-pour\">\n    <div><b>P</b><strong>Perceivable</strong><span>Text alternatives, captions, enough contrast</span></div>\n    <div><b>O</b><strong>Operable</strong><span>Works with a keyboard, enough time, nothing that flashes</span></div>\n    <div><b>U</b><strong>Understandable</strong><span>Clear words, predictable behaviour, helpful errors</span></div>\n    <div><b>R</b><strong>Robust</strong><span>Clean markup that works with assistive technology</span></div>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-pour, .s-pour *, .s-pour *::before, .s-pour *::after { box-sizing: border-box; }\n.s-pour { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-pour button { font: inherit; cursor: pointer; }\n.s-pour { background: #fff; color: #1f2430; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px; font-size: 11px; }\n.s-pour > div { border-radius: 10px; padding: 12px; display: grid; gap: 4px; align-content: start; }\n.s-pour > div:nth-child(1) { background: #eff6ff; }\n.s-pour > div:nth-child(2) { background: #f0fdf4; }\n.s-pour > div:nth-child(3) { background: #fefce8; }\n.s-pour > div:nth-child(4) { background: #fdf2f8; }\n.s-pour b { font: 800 26px/1 var(--display); color: #3557e0; }\n.s-pour strong { font-size: 13px; }\n.s-pour span { color: #555; line-height: 1.4; }",
    "js": ""
   }
  },
  {
   "id": "colorblind",
   "title": "Color-blind safe design",
   "section": "access",
   "sectionName": "Accessibility and motion",
   "description": "About 1 in 12 men has some color blindness. Never use color alone; add labels, patterns or icons. Turn on the simulation to see the difference.",
   "goodFor": "Charts, status colors, maps",
   "watchOut": "Red vs green as the only signal",
   "seenIn": "GitHub color-blind themes, Tableau palettes, transit maps",
   "prompt": "Make my UI follow this accessibility and motion practice: Color-blind safe design.\n\nWhat it is: About 1 in 12 men has some color blindness. Never use color alone; add labels, patterns or icons. Turn on the simulation to see the difference.\nGood for: Charts, status colors, maps.\nWatch out: Red vs green as the only signal.\nSeen in: GitHub color-blind themes, Tableau palettes, transit maps\n\nSteps:\n1. Audit every page and component I share against this practice and list each problem with its element.\n2. Fix the problems in code without changing the visual design more than needed.\n3. Follow WCAG 2.2 AA and say which success criterion each fix covers.\n4. Tell me how to test it myself: keyboard only, a screen reader, 200% zoom and reduced motion.\n\nThe kindofui example below shows the practice in a small working demo.",
   "code": {
    "html": "<div class=\"stage s-cb\"><div class=\"vs2\">\n    <div><span class=\"lb2 b\">Red vs green only</span><div class=\"ch rg\"><i style=\"height:70%\"></i><i style=\"height:45%\"></i><i style=\"height:85%\"></i><i style=\"height:55%\"></i></div><small>Profit / loss by color only</small></div>\n    <div><span class=\"lb2 g\">Blue vs orange + labels</span><div class=\"ch bo\"><i style=\"height:70%\"><em>+70</em></i><i style=\"height:45%\"><em>−45</em></i><i style=\"height:85%\"><em>+85</em></i><i style=\"height:55%\"><em>−55</em></i></div><small>Color, pattern and labels</small></div>\n  </div><button class=\"sim\" id=\"cb-b\" aria-pressed=\"false\">Simulate deuteranopia</button></div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-cb, .s-cb *, .s-cb *::before, .s-cb *::after { box-sizing: border-box; }\n.s-cb { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-cb button { font: inherit; cursor: pointer; }\n.vs2 { display: grid; grid-template-columns: 1fr 1fr; height: 100%; font-size: 11px; color: #1f2430; }\n.vs2 > div { padding: 10px 12px; display: grid; gap: 8px; align-content: start; position: relative; min-width: 0; }\n.vs2 > div:first-child { background: #fff; border-right: 1px solid #e5e7eb; }\n.vs2 > div:last-child { background: #fafafa; }\n.vs2 .lb2 { font: 700 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; }\n.vs2 .lb2.b { color: #b42318; }\n.vs2 .lb2.g { color: #067647; }\n.s-cb .vs2 > div { padding-bottom: 44px; }\n.s-cb .ch { display: flex; gap: 6px; align-items: flex-end; height: 120px; border-bottom: 1px solid #ccc; padding: 14px 4px 0; }\n.s-cb .ch i { flex: 1; position: relative; border-radius: 3px 3px 0 0; }\n.s-cb .rg i:nth-child(odd) { background: #2fbf4a; }\n.s-cb .rg i:nth-child(even) { background: #e5484d; }\n.s-cb .bo i:nth-child(odd) { background: #2563eb; }\n.s-cb .bo i:nth-child(even) { background: #f59e0b repeating-linear-gradient(45deg,rgba(255,255,255,.45) 0 3px,transparent 3px 6px); }\n.s-cb .ch em { position: absolute; top: -14px; left: 0; right: 0; text-align: center; font: 9px var(--mono); font-style: normal; color: #333; }\n.s-cb small { color: #555; }\n.s-cb .sim { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); border: 1px solid #cfd5dd; background: #fff; border-radius: 6px; padding: 5px 12px; font-size: 11px; z-index: 1; color: #1f2430; white-space: nowrap; }\n.s-cb .sim[aria-pressed=\"true\"] { background: #1f2430; color: #fff; }\n.s-cb.cbs .ch { filter: url(#deut); }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  const on = (sel, ev, fn) => { const el = $(sel); if (el) el.addEventListener(ev, fn); return el; };\n\n  /* ---------- Accessibility & motion ---------- */\n  on('#cb-b', 'click', e => { const b = e.currentTarget, st = b.closest('.stage'), v = st.classList.toggle('cbs'); b.setAttribute('aria-pressed', v); b.textContent = v ? 'Show normal vision' : 'Simulate deuteranopia'; });\n})();"
   }
  },
  {
   "id": "focus",
   "title": "Visible focus states",
   "section": "access",
   "sectionName": "Accessibility and motion",
   "description": "Keyboard users need to see where they are. Removing the focus outline without a replacement makes a site unusable for them.",
   "goodFor": "Every interactive element",
   "watchOut": "Removing outlines without a visible replacement",
   "seenIn": "GOV.UK, GitHub, Apple",
   "prompt": "Make my UI follow this accessibility and motion practice: Visible focus states.\n\nWhat it is: Keyboard users need to see where they are. Removing the focus outline without a replacement makes a site unusable for them.\nGood for: Every interactive element.\nWatch out: Removing outlines without a visible replacement.\nSeen in: GOV.UK, GitHub, Apple\n\nSteps:\n1. Audit every page and component I share against this practice and list each problem with its element.\n2. Fix the problems in code without changing the visual design more than needed.\n3. Follow WCAG 2.2 AA and say which success criterion each fix covers.\n4. Tell me how to test it myself: keyboard only, a screen reader, 200% zoom and reduced motion.\n\nThe kindofui example below shows the practice in a small working demo.",
   "code": {
    "html": "<div class=\"stage s-foc\"><div class=\"vs2\">\n    <div class=\"nofocus\"><span class=\"lb2 b\">outline: none</span><button>Save</button><button>Cancel</button><button>Learn more</button></div>\n    <div class=\"okfocus\"><span class=\"lb2 g\">Visible focus ring</span><button>Save</button><button>Cancel</button><button>Learn more</button></div>\n  </div><p class=\"hint\">Click a button, then press <kbd>Tab</kbd> to move</p></div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-foc, .s-foc *, .s-foc *::before, .s-foc *::after { box-sizing: border-box; }\n.s-foc { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-foc button { font: inherit; cursor: pointer; }\n.vs2 { display: grid; grid-template-columns: 1fr 1fr; height: 100%; font-size: 11px; color: #1f2430; }\n.vs2 > div { padding: 10px 12px; display: grid; gap: 8px; align-content: start; position: relative; min-width: 0; }\n.vs2 > div:first-child { background: #fff; border-right: 1px solid #e5e7eb; }\n.vs2 > div:last-child { background: #fafafa; }\n.vs2 .lb2 { font: 700 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; }\n.vs2 .lb2.b { color: #b42318; }\n.vs2 .lb2.g { color: #067647; }\n.s-foc .vs2 > div { padding-bottom: 36px; }\n.s-foc button,.s-foc a { border: 1px solid #cfd5dd; background: #fff; border-radius: 6px; padding: 7px; font-size: 12px; color: #1f2430; text-align: center; text-decoration: none; }\n.s-foc .nofocus :focus,.s-foc .nofocus :focus-visible { outline: none; }\n.s-foc .okfocus :focus-visible { outline: 3px solid #3557e0; outline-offset: 2px; }\n.s-foc .hint { position: absolute; left: 0; right: 0; bottom: 10px; margin: 0; text-align: center; font-size: 11px; color: #555; z-index: 1; }\n.s-foc kbd { font: 10px var(--mono); border: 1px solid #ccc; border-radius: 3px; padding: 0 4px; background: #fff; }",
    "js": ""
   }
  },
  {
   "id": "focusafter",
   "title": "Focus after actions",
   "section": "access",
   "sectionName": "Accessibility and motion",
   "description": "After a delete, a closed dialog or a new view, put keyboard focus somewhere sensible: the next item, or the button that opened the dialog. When focus drops back to the page, keyboard and screen reader users are sent back to the top.",
   "goodFor": "Deletes, dialogs, inline edits and single-page apps",
   "watchOut": "Moving focus on every update; only after the person acts",
   "basedOn": "WAI-ARIA Authoring Practices, modal dialog pattern; Gatsby and Fable user testing of client-side routing (2019)",
   "prompt": "Make my UI follow this accessibility and motion practice: Focus after actions.\n\nWhat it is: After a delete, a closed dialog or a new view, put keyboard focus somewhere sensible: the next item, or the button that opened the dialog. When focus drops back to the page, keyboard and screen reader users are sent back to the top.\nGood for: Deletes, dialogs, inline edits and single-page apps.\nWatch out: Moving focus on every update; only after the person acts.\nBased on: WAI-ARIA Authoring Practices, modal dialog pattern; Gatsby and Fable user testing of client-side routing (2019)\n\nSteps:\n1. Audit every page and component I share against this practice and list each problem with its element.\n2. Fix the problems in code without changing the visual design more than needed.\n3. Follow WCAG 2.2 AA and say which success criterion each fix covers.\n4. Tell me how to test it myself: keyboard only, a screen reader, 200% zoom and reduced motion.\n\nThe kindofui example below shows the practice in a small working demo.",
   "code": {
    "html": "<div class=\"stage s-fcs\">\n    <div class=\"seg\" role=\"group\" aria-label=\"Version\"><button type=\"button\" aria-pressed=\"true\" data-m=\"lost\">Focus is lost</button><button type=\"button\" aria-pressed=\"false\" data-m=\"kept\">Focus moves on</button></div>\n    <p class=\"tip\">Use Tab to reach a Delete button and press Enter.</p>\n    <ul></ul>\n    <div class=\"now\"><span>Focus is on: <b>nothing yet</b></span><button class=\"ghost\" type=\"button\">Reset</button></div>\n  </div>\n",
    "css": ":root { --body: \"Figtree\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Figtree */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-fcs, .s-fcs *, .s-fcs *::before, .s-fcs *::after { box-sizing: border-box; }\n.s-fcs { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-fcs button { font: inherit; cursor: pointer; }\n.s-dly,.s-rsv,.s-esum,.s-lbl,.s-pwd,.s-dbl,.s-deb,.s-inl,.s-fcs,.s-back { background: #fff; color: #1f2430; font-size: 12px; padding: 12px 14px; }\n.s-esum .seg,.s-lbl .seg,.s-pwd .seg,.s-fcs .seg,.s-back .seg { display: flex; border: 1px solid #c9ced8; border-radius: 7px; overflow: hidden; margin-bottom: 9px; }\n.s-esum .seg button,.s-lbl .seg button,.s-pwd .seg button,.s-fcs .seg button,.s-back .seg button { flex: 1; border: 0; border-left: 1px solid #c9ced8; background: #fff; color: #4a5160; padding: 5px 6px; font: 600 11px var(--body); }\n.s-esum .seg button:first-child,.s-lbl .seg button:first-child,.s-pwd .seg button:first-child,.s-fcs .seg button:first-child,.s-back .seg button:first-child { border-left: 0; }\n.s-esum .seg [aria-pressed=\"true\"],.s-lbl .seg [aria-pressed=\"true\"],.s-pwd .seg [aria-pressed=\"true\"],.s-fcs .seg [aria-pressed=\"true\"],.s-back .seg [aria-pressed=\"true\"] { background: #1f2430; color: #fff; }\n.s-dly .act,.s-rsv .act,.s-esum .act,.s-lbl .act,.s-pwd .act,.s-dbl .act,.s-inl .act,.s-fcs .act,.s-back .act { border: 1px solid #1f2430; background: #1f2430; color: #fff; border-radius: 6px; padding: 6px 12px; font: 600 12px var(--body); }\n.s-dly .ghost,.s-rsv .ghost,.s-fcs .ghost,.s-back .ghost { border: 1px solid #c9ced8; background: #fff; color: #1f2430; border-radius: 6px; padding: 5px 10px; font: 600 11px var(--body); }\n.s-fcs { display: grid; grid-template-rows: auto auto 1fr auto; gap: 0; }\n.s-fcs .tip { font-size: 11px; color: #5f6672; margin-bottom: 7px; }\n.s-fcs ul { margin: 0; padding: 0; list-style: none; border: 1px solid #e3e6ec; border-radius: 8px; overflow: hidden; }\n.s-fcs li { display: flex; justify-content: space-between; align-items: center; padding: 6px 9px; border-top: 1px solid #eef0f3; font-size: 12px; }\n.s-fcs li:first-child { border-top: 0; }\n.s-fcs .ghost:focus-visible,.s-fcs .act:focus-visible { outline: 3px solid #3557e0; outline-offset: 2px; }\n.s-fcs .now { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 8px; font-size: 11px; color: #5f6672; }\n.s-fcs .now b { color: #1f2430; }\n.s-fcs .now b.lost { color: #b3261e; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // focus after actions: delete with the keyboard and see where focus goes\n  (() => {\n    const st = $('.s-fcs'); if (!st) return;\n    const ul = $('ul', st), now = $('.now b', st); let mode = 'lost';\n    const reset = () => { ul.innerHTML = ['Invoice 1042', 'Invoice 1041', 'Invoice 1040', 'Invoice 1039'].map(n => `<li><span>${n}</span><button class=\"ghost\" type=\"button\" aria-label=\"Delete ${n}\">Delete</button></li>`).join(''); now.textContent = 'nothing yet'; now.className = ''; };\n    const where = () => { const a = document.activeElement; if (a && st.contains(a)) { now.textContent = a.getAttribute('aria-label') || a.textContent; now.className = ''; } else { now.textContent = 'the page (lost)'; now.className = 'lost'; } };\n    ul.addEventListener('click', e => { const b = e.target.closest('button'); if (!b) return; const li = b.closest('li'), next = li.nextElementSibling || li.previousElementSibling; li.remove();\n      if (mode === 'kept' && next) $('button', next).focus(); else b.blur(); setTimeout(where, 30); });\n    st.addEventListener('focusin', where);\n    $$('.seg button', st).forEach(b => b.addEventListener('click', () => { mode = b.dataset.m; $$('.seg button', st).forEach(x => x.setAttribute('aria-pressed', x === b)); reset(); }));\n    $('.now .ghost', st).addEventListener('click', reset); reset();\n  })();\n})();"
   }
  },
  {
   "id": "aria",
   "title": "Semantic HTML & ARIA",
   "section": "access",
   "sectionName": "Accessibility and motion",
   "description": "Use real buttons, labels and alt text so screen readers can announce what things are. Add ARIA only when native HTML can't do it.",
   "goodFor": "Custom controls and icon-only buttons",
   "watchOut": "Adding ARIA where a native element would do",
   "seenIn": "every accessible website and app",
   "prompt": "Make my UI follow this accessibility and motion practice: Semantic HTML & ARIA.\n\nWhat it is: Use real buttons, labels and alt text so screen readers can announce what things are. Add ARIA only when native HTML can't do it.\nGood for: Custom controls and icon-only buttons.\nWatch out: Adding ARIA where a native element would do.\nSeen in: every accessible website and app\n\nSteps:\n1. Audit every page and component I share against this practice and list each problem with its element.\n2. Fix the problems in code without changing the visual design more than needed.\n3. Follow WCAG 2.2 AA and say which success criterion each fix covers.\n4. Tell me how to test it myself: keyboard only, a screen reader, 200% zoom and reduced motion.\n\nThe kindofui example below shows the practice in a small working demo.",
   "code": {
    "html": "<div class=\"stage s-aria\"><div class=\"vs2\">\n    <div><span class=\"lb2 b\">No meaning</span><code>&lt;div class=\"icon\"&gt;⌕&lt;/div&gt;</code><div class=\"sr\"><small>Screen reader says</small><b>Nothing useful, and it can't be reached with Tab</b></div><code>&lt;img src=\"shoe.jpg\"&gt;</code><div class=\"sr\"><small>Screen reader says</small><b>\"shoe dot jpg, image\"</b></div></div>\n    <div><span class=\"lb2 g\">Real meaning</span><code>&lt;button aria-label=\"Search\"&gt;⌕&lt;/button&gt;</code><div class=\"sr\"><small>Screen reader says</small><b>\"Search, button\"</b></div><code>&lt;img alt=\"Red running shoe, side view\"&gt;</code><div class=\"sr\"><small>Screen reader says</small><b>\"Red running shoe, side view, image\"</b></div></div>\n  </div></div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-aria, .s-aria *, .s-aria *::before, .s-aria *::after { box-sizing: border-box; }\n.s-aria { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-aria button { font: inherit; cursor: pointer; }\n.vs2 { display: grid; grid-template-columns: 1fr 1fr; height: 100%; font-size: 11px; color: #1f2430; }\n.vs2 > div { padding: 10px 12px; display: grid; gap: 8px; align-content: start; position: relative; min-width: 0; }\n.vs2 > div:first-child { background: #fff; border-right: 1px solid #e5e7eb; }\n.vs2 > div:last-child { background: #fafafa; }\n.vs2 .lb2 { font: 700 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; }\n.vs2 .lb2.b { color: #b42318; }\n.vs2 .lb2.g { color: #067647; }\n.s-aria code { font: 10px/1.4 var(--mono); background: #1f2430; color: #e5e7eb; border-radius: 6px; padding: 6px 8px; overflow-wrap: anywhere; display: block; }\n.s-aria .sr { display: grid; gap: 2px; background: #fff; border: 1px dashed #cfd5dd; border-radius: 6px; padding: 5px 7px; }\n.s-aria .sr small { color: #888; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }\n.s-aria .sr b { font-weight: 600; font-size: 10.5px; }",
    "js": ""
   }
  },
  {
   "id": "reducedmotion",
   "title": "Reduced motion",
   "section": "access",
   "sectionName": "Accessibility and motion",
   "description": "Some people get dizzy or sick from movement. Respect the system \"reduce motion\" setting (the prefers-reduced-motion media query) by stopping or softening animation.",
   "goodFor": "Honouring the system reduce-motion setting",
   "watchOut": "Autoplay, parallax and big motion with no off switch",
   "seenIn": "iOS Reduce Motion, macOS, Android \"Remove animations\"",
   "prompt": "Make my UI follow this accessibility and motion practice: Reduced motion.\n\nWhat it is: Some people get dizzy or sick from movement. Respect the system \"reduce motion\" setting (the prefers-reduced-motion media query) by stopping or softening animation.\nGood for: Honouring the system reduce-motion setting.\nWatch out: Autoplay, parallax and big motion with no off switch.\nSeen in: iOS Reduce Motion, macOS, Android \"Remove animations\"\n\nSteps:\n1. Audit every page and component I share against this practice and list each problem with its element.\n2. Fix the problems in code without changing the visual design more than needed.\n3. Follow WCAG 2.2 AA and say which success criterion each fix covers.\n4. Tell me how to test it myself: keyboard only, a screen reader, 200% zoom and reduced motion.\n\nThe kindofui example below shows the practice in a small working demo.",
   "code": {
    "html": "<div class=\"stage s-rm\" id=\"rm\">\n    <div class=\"hero2\"><span class=\"bl1\"></span><span class=\"bl2\"></span><b>Welcome back</b></div>\n    <div class=\"tk2\"><span>Sale ends Sunday · Free delivery over ₹999 · Sale ends Sunday · Free delivery over ₹999 ·&nbsp;</span></div>\n    <label class=\"tg4\" for=\"rm-c\"><input type=\"checkbox\" id=\"rm-c\"> Reduce motion</label>\n    <small class=\"cap\" id=\"rm-cap\">Full motion: floating shapes and a scrolling ticker.</small>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque, JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-rm, .s-rm *, .s-rm *::before, .s-rm *::after { box-sizing: border-box; }\n.s-rm { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-rm button { font: inherit; cursor: pointer; }\n.s-rm { background: #fff; color: #1f2430; display: grid; grid-template-rows: 1fr auto auto auto; font-size: 12px; }\n.s-rm .hero2 { position: relative; overflow: hidden; background: #eef1ff; display: grid; place-items: center; }\n.s-rm .hero2 b { font: 700 20px var(--display); position: relative; }\n.s-rm .bl1,.s-rm .bl2 { position: absolute; width: 70px; height: 70px; border-radius: 50%; background: #c7d2fe; animation: float 3s ease-in-out infinite; }\n.s-rm .bl1 { left: 18%; top: 16%; }\n.s-rm .bl2 { right: 16%; bottom: 10%; background: #fbcfe8; animation-delay: -1.5s; }\n.s-rm .tk2 { overflow: hidden; white-space: nowrap; background: #1f2430; color: #fff; padding: 6px 0; font: 11px var(--mono); }\n.s-rm .tk2 span { display: inline-block; animation: mq 10s linear infinite; }\n.s-rm.red .bl1,.s-rm.red .bl2,.s-rm.red .tk2 span { animation: none; }\n.s-rm.red .tk2 { text-align: center; }\n.s-rm .tg4 { display: flex; gap: 6px; align-items: center; padding: 10px 14px 2px; font-weight: 600; }\n.s-rm .cap { padding: 0 14px 12px; color: #666; }\n@keyframes mq {\n  to{transform:translateX(-50%)}\n}\n@keyframes float {\n  50%{transform:translate(20px,-18px) scale(1.15)}\n}\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  const on = (sel, ev, fn) => { const el = $(sel); if (el) el.addEventListener(ev, fn); return el; };\n\n  on('#rm-c', 'change', e => { $('#rm').classList.toggle('red', e.target.checked); $('#rm-cap').textContent = e.target.checked ? 'Reduced: shapes stay still and the ticker stops.' : 'Full motion: floating shapes and a scrolling ticker.'; });\n})();"
   }
  },
  {
   "id": "easing",
   "title": "Easing curves",
   "section": "access",
   "sectionName": "Accessibility and motion",
   "description": "Easing controls how motion speeds up and slows down. Ease-out feels natural for things entering, and a little overshoot feels springy.",
   "goodFor": "Natural motion: ease-out entering, ease-in leaving",
   "watchOut": "Linear motion for UI; it feels mechanical",
   "seenIn": "Material motion, Apple spring animations",
   "prompt": "Make my UI follow this accessibility and motion practice: Easing curves.\n\nWhat it is: Easing controls how motion speeds up and slows down. Ease-out feels natural for things entering, and a little overshoot feels springy.\nGood for: Natural motion: ease-out entering, ease-in leaving.\nWatch out: Linear motion for UI; it feels mechanical.\nSeen in: Material motion, Apple spring animations\n\nSteps:\n1. Audit every page and component I share against this practice and list each problem with its element.\n2. Fix the problems in code without changing the visual design more than needed.\n3. Follow WCAG 2.2 AA and say which success criterion each fix covers.\n4. Tell me how to test it myself: keyboard only, a screen reader, 200% zoom and reduced motion.\n\nThe kindofui example below shows the practice in a small working demo.",
   "code": {
    "html": "<div class=\"stage s-ease go\" id=\"ease\">\n    <div class=\"tk3\"><span>linear</span><i style=\"--e:linear\"></i></div>\n    <div class=\"tk3\"><span>ease-out</span><i style=\"--e:cubic-bezier(0,0,.2,1)\"></i></div>\n    <div class=\"tk3\"><span>ease-in-out</span><i style=\"--e:cubic-bezier(.4,0,.2,1)\"></i></div>\n    <div class=\"tk3\"><span>spring</span><i style=\"--e:cubic-bezier(.34,1.56,.64,1)\"></i></div>\n    <button id=\"ease-b\">Replay</button>\n  </div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-ease, .s-ease *, .s-ease *::before, .s-ease *::after { box-sizing: border-box; }\n.s-ease { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-ease button { font: inherit; cursor: pointer; }\n.s-ease { background: #fff; color: #1f2430; padding: 16px 18px; display: grid; gap: 12px; align-content: center; font-size: 11px; }\n.s-ease .tk3 { display: grid; grid-template-columns: 76px 1fr; align-items: center; gap: 10px; }\n.s-ease .tk3 span { font: 11px var(--mono); color: #555; }\n.s-ease .tk3 i { display: block; height: 26px; background: #f3f4f7; border-radius: 13px; position: relative; }\n.s-ease .tk3 i::after { content: \"\"; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #3557e0; }\n.s-ease.go .tk3 i::after { animation: slide 1.2s var(--e) forwards; }\n.s-ease button { justify-self: start; border: 1px solid #cfd5dd; background: #fff; border-radius: 6px; padding: 5px 12px; color: #1f2430; }\n@keyframes slide {\n  to{left:calc(100% - 23px)}\n}\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  const on = (sel, ev, fn) => { const el = $(sel); if (el) el.addEventListener(ev, fn); return el; };\n\n  on('#ease-b', 'click', () => { const s = $('#ease'); s.classList.remove('go'); void s.offsetWidth; s.classList.add('go'); });\n})();"
   }
  },
  {
   "id": "transitions",
   "title": "Page transitions",
   "section": "access",
   "sectionName": "Accessibility and motion",
   "description": "Motion between screens shows where you came from and where you went.",
   "goodFor": "Showing where content came from and went",
   "watchOut": "Slow transitions that delay every tap",
   "seenIn": "iOS navigation, Material container transform",
   "prompt": "Make my UI follow this accessibility and motion practice: Page transitions.\n\nWhat it is: Motion between screens shows where you came from and where you went.\nGood for: Showing where content came from and went.\nWatch out: Slow transitions that delay every tap.\nSeen in: iOS navigation, Material container transform\n\nSteps:\n1. Audit every page and component I share against this practice and list each problem with its element.\n2. Fix the problems in code without changing the visual design more than needed.\n3. Follow WCAG 2.2 AA and say which success criterion each fix covers.\n4. Tell me how to test it myself: keyboard only, a screen reader, 200% zoom and reduced motion.\n\nThe kindofui example below shows the practice in a small working demo.",
   "code": {
    "html": "<div class=\"stage s-pt\">\n    <div class=\"mode\"><span>Transition:</span><button class=\"on\" data-m=\"slide\">Slide</button><button data-m=\"fade\">Fade</button><button data-m=\"scale\">Zoom</button></div>\n    <div class=\"vw\"><div class=\"pg2 ls\" id=\"pt-list\"><button data-i=\"0\"><i style=\"background:linear-gradient(135deg,#f6d365,#fda085)\"></i>Goa</button><button data-i=\"1\"><i style=\"background:linear-gradient(135deg,#84fab0,#8fd3f4)\"></i>Munnar</button><button data-i=\"2\"><i style=\"background:linear-gradient(135deg,#a18cd1,#fbc2eb)\"></i>Jaipur</button></div><div class=\"pg2 det\" id=\"pt-det\" hidden=\"\"><button class=\"bk\" id=\"pt-bk\">‹ Back</button><i id=\"pt-img\"></i><b id=\"pt-tt\">Goa</b><span>3 nights · from ₹12,400</span></div></div>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-pt, .s-pt *, .s-pt *::before, .s-pt *::after { box-sizing: border-box; }\n.s-pt { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-pt button { font: inherit; cursor: pointer; }\n[hidden] { display: none !important; }\n.s-pt { background: #f3f4f7; color: #1f2430; padding: 12px; display: grid; grid-template-rows: auto 1fr; gap: 8px; font-size: 12px; }\n.s-pt .mode { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }\n.s-pt .mode span { color: #666; margin-right: 4px; }\n.s-pt .mode button { border: 1px solid #d6dae1; background: #fff; border-radius: 999px; padding: 3px 10px; font-size: 11px; color: #1f2430; }\n.s-pt .mode button.on { background: #1f2430; color: #fff; border-color: #1f2430; }\n.s-pt .vw { position: relative; overflow: hidden; background: #fff; border-radius: 10px; }\n.s-pt .pg2 { position: absolute; inset: 0; padding: 10px; display: grid; gap: 8px; align-content: start; background: #fff; }\n.s-pt .ls button { display: flex; gap: 10px; align-items: center; border: 1px solid #eef0f3; background: #fff; border-radius: 8px; padding: 6px; font-weight: 600; text-align: left; color: #1f2430; width: 100%; }\n.s-pt .ls i { width: 40px; height: 30px; border-radius: 5px; flex: none; }\n.s-pt .det i { display: block; height: 90px; border-radius: 8px; }\n.s-pt .det b { font: 700 18px var(--display); }\n.s-pt .det span { color: #666; }\n.s-pt .bk { justify-self: start; border: 0; background: none; color: #3557e0; font-weight: 600; padding: 0; }\n.s-pt .anim-slide { animation: ptin .35s cubic-bezier(.2,.8,.2,1); }\n.s-pt .anim-back { animation: ptback .35s cubic-bezier(.2,.8,.2,1); }\n.s-pt .anim-fade { animation: ptfade .3s ease; }\n.s-pt .anim-scale { animation: ptzoom .3s cubic-bezier(.2,.8,.2,1); }\n@keyframes ptin {\n  from{transform:translateX(100%)}\n}\n@keyframes ptback {\n  from{transform:translateX(-100%)}\n}\n@keyframes ptfade {\n  from{opacity:0}\n}\n@keyframes ptzoom {\n  from{transform:scale(.85);opacity:0}\n}\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  const on = (sel, ev, fn) => { const el = $(sel); if (el) el.addEventListener(ev, fn); return el; };\n\n  (() => { let mode = 'slide'; const L = $('#pt-list'), D = $('#pt-det'); if (!L) return; const T = ['Goa', 'Munnar', 'Jaipur'], G = ['#f6d365,#fda085', '#84fab0,#8fd3f4', '#a18cd1,#fbc2eb'];\n    const mb = $$('.s-pt .mode button'); mb.forEach(b => b.addEventListener('click', () => { mode = b.dataset.m; mb.forEach(x => x.classList.toggle('on', x === b)); }));\n    const anim = (el, c) => { el.classList.remove('anim-slide', 'anim-back', 'anim-fade', 'anim-scale'); void el.offsetWidth; el.classList.add(c); };\n    $$('#pt-list button').forEach(b => b.addEventListener('click', () => { const i = +b.dataset.i; $('#pt-tt').textContent = T[i]; $('#pt-img').style.background = `linear-gradient(135deg,${G[i]})`; L.hidden = true; D.hidden = false; anim(D, 'anim-' + mode); }));\n    on('#pt-bk', 'click', () => { D.hidden = true; L.hidden = false; anim(L, mode === 'slide' ? 'anim-back' : 'anim-' + mode); });\n  })();\n})();"
   }
  },
  {
   "id": "responsive",
   "title": "Mobile-first & responsive",
   "section": "approaches",
   "sectionName": "Process and methods",
   "description": "Design for the smallest screen first, then let the same content reflow into more columns as space grows.",
   "goodFor": "Every website and web app",
   "watchOut": "Designing desktop first and squeezing it later",
   "seenIn": "every modern website; this page reflows the same way",
   "prompt": "Help me use Mobile-first & responsive on my project.\n\nWhat it is: Design for the smallest screen first, then let the same content reflow into more columns as space grows.\nGood for: Every website and web app.\nWatch out: Designing desktop first and squeezing it later.\nSeen in: every modern website; this page reflows the same way\n\nSteps:\n1. Ask me the few questions you need about my product and users first.\n2. Walk me through the method step by step for my case, not in general.\n3. Produce the outputs the method needs (for example notes, a table or a checklist) in plain text I can share.\n4. Tell me what to do next and how to know it worked.\n\nThe kindofui example below shows the method in a small working demo.",
   "code": {
    "html": "<div class=\"stage s-resp\">\n    <figure><div class=\"dv ph\"><div class=\"ln\" style=\"background:#2b3040;width:60%\"></div><div class=\"g\"><div class=\"c\"></div><div class=\"c\"></div><div class=\"c\"></div></div></div><figcaption>Phone · 1 col</figcaption></figure>\n    <figure><div class=\"dv tb\"><div class=\"ln\" style=\"background:#2b3040;width:50%\"></div><div class=\"g\"><div class=\"c\"></div><div class=\"c\"></div><div class=\"c\"></div><div class=\"c\"></div></div></div><figcaption>Tablet · 2 col</figcaption></figure>\n    <figure><div class=\"dv ds\"><div class=\"ln\" style=\"background:#2b3040;width:35%\"></div><div class=\"g\"><div class=\"c\"></div><div class=\"c\"></div><div class=\"c\"></div><div class=\"c\"></div><div class=\"c\"></div><div class=\"c\"></div></div></div><figcaption>Desktop · 3 col</figcaption></figure>\n  </div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-resp, .s-resp *, .s-resp *::before, .s-resp *::after { box-sizing: border-box; }\n.s-resp { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-resp button { font: inherit; cursor: pointer; }\n.ln { height: 6px; border-radius: 3px; background: #d6dbe4; }\n.s-resp { background: #f3f4f7; display: flex; align-items: flex-end; justify-content: center; gap: 12px; padding: 14px; color: #2b3040; container-type: inline-size; }\n.s-resp .dv { background: #fff; border: 3px solid #2b3040; border-radius: 8px; padding: 6px; display: grid; gap: 5px; align-content: start; overflow: hidden; }\n.s-resp .ph { width: 62px; height: 120px; border-radius: 12px; }\n.s-resp .tb { width: 110px; height: 150px; }\n.s-resp .ds { width: 170px; height: 115px; border-bottom-width: 10px; }\n.s-resp .g { display: grid; gap: 4px; }\n.s-resp .tb .g { grid-template-columns: 1fr 1fr; }\n.s-resp .ds .g { grid-template-columns: repeat(3,1fr); }\n.s-resp .c { height: 26px; background: #c7d2fe; border-radius: 3px; }\n.s-resp .ds .c { height: 30px; }\n.s-resp figure { margin: 0; display: grid; justify-items: center; gap: 6px; font: 10px var(--mono); color: #6b7280; }\n@container (max-width:380px) {\n  .s-resp { gap: 8px; padding: 10px; }\n  .s-resp .dv { padding: 5px; gap: 4px; border-width: 2px; }\n  .s-resp .ph { width: 46px; height: 96px; }\n  .s-resp .tb { width: 84px; height: 122px; }\n  .s-resp .ds { width: 120px; height: 92px; border-bottom-width: 8px; }\n  .s-resp .c { height: 20px; }\n  .s-resp .ds .c { height: 22px; }\n}\n@container (max-width:300px) {\n  .s-resp { gap: 6px; padding: 8px; }\n  .s-resp .ph { width: 38px; height: 84px; }\n  .s-resp .tb { width: 66px; height: 108px; }\n  .s-resp .ds { width: 96px; height: 80px; }\n  .s-resp figure { font-size: 9px; }\n  .s-resp .c { height: 16px; }\n  .s-resp .ds .c { height: 18px; }\n}",
    "js": ""
   }
  },
  {
   "id": "designsystem",
   "title": "Design systems",
   "section": "approaches",
   "sectionName": "Process and methods",
   "description": "A shared library of tokens (colors, type, spacing) and components so every screen looks and behaves the same.",
   "goodFor": "Teams and products with many screens",
   "watchOut": "Tiny one-off sites where it is overkill",
   "seenIn": "Material (Google), Apple HIG, Carbon (IBM), Ant Design, Atlassian",
   "prompt": "Help me use Design systems on my project.\n\nWhat it is: A shared library of tokens (colors, type, spacing) and components so every screen looks and behaves the same.\nGood for: Teams and products with many screens.\nWatch out: Tiny one-off sites where it is overkill.\nSeen in: Material (Google), Apple HIG, Carbon (IBM), Ant Design, Atlassian\n\nSteps:\n1. Ask me the few questions you need about my product and users first.\n2. Walk me through the method step by step for my case, not in general.\n3. Produce the outputs the method needs (for example notes, a table or a checklist) in plain text I can share.\n4. Tell me what to do next and how to know it worked.\n\nThe kindofui example below shows the method in a small working demo.",
   "code": {
    "html": "<div class=\"stage s-ds\">\n    <div><div class=\"lbl\">Color tokens</div><div class=\"sw\"><div style=\"background:#3557e0\">primary</div><div style=\"background:#1f2430\">ink</div><div style=\"background:#16a34a\">success</div><div style=\"background:#f59e0b\">warning</div><div style=\"background:#dc2626\">danger</div></div></div>\n    <div><div class=\"lbl\">Type scale</div><div class=\"type\"><span style=\"font:800 26px var(--display)\">H1</span><span style=\"font:700 20px var(--display)\">H2</span><span style=\"font:600 16px var(--body)\">H3</span><span>Body 14</span><span style=\"font-size:11px;color:#777\">Caption 11</span></div></div>\n    <div><div class=\"lbl\">Buttons</div><div class=\"btns\"><button class=\"p\">Primary</button><button class=\"s\">Secondary</button><button class=\"gh\">Ghost</button><button class=\"dn\">Danger</button></div></div>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; --body: \"Figtree\",system-ui,sans-serif; --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque, Figtree, JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-ds, .s-ds *, .s-ds *::before, .s-ds *::after { box-sizing: border-box; }\n.s-ds { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-ds button { font: inherit; cursor: pointer; }\n.s-ds { background: #fff; color: #1f2430; padding: 14px 16px; display: grid; gap: 12px; align-content: start; font-size: 12px; }\n.s-ds .lbl { font: 10px var(--mono); color: #888; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }\n.s-ds .sw { display: flex; gap: 6px; }\n.s-ds .sw div { flex: 1; height: 34px; border-radius: 6px; display: flex; align-items: flex-end; padding: 3px 5px; font: 9px var(--mono); color: #fff; }\n.s-ds .type { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }\n.s-ds .btns { display: flex; gap: 6px; flex-wrap: wrap; }\n.s-ds .btns button { border-radius: 6px; padding: 6px 12px; font-size: 12px; font-weight: 600; border: 1px solid #3557e0; }\n.s-ds .p { background: #3557e0; color: #fff; }\n.s-ds .s { background: #fff; color: #3557e0; }\n.s-ds .gh { background: none; border-color: transparent!important; color: #3557e0; }\n.s-ds .dn { background: #dc2626; border-color: #dc2626!important; color: #fff; }",
    "js": ""
   }
  },
  {
   "id": "atomic",
   "title": "Atomic design",
   "section": "approaches",
   "sectionName": "Process and methods",
   "description": "Build UIs from the smallest parts upward: atoms (a button) make molecules (a search field), which make organisms (a header), then templates and real pages.",
   "goodFor": "Building and naming component libraries",
   "watchOut": "Over-splitting simple components",
   "seenIn": "Brad Frost's method, used by most component libraries and Figma kits",
   "prompt": "Help me use Atomic design on my project.\n\nWhat it is: Build UIs from the smallest parts upward: atoms (a button) make molecules (a search field), which make organisms (a header), then templates and real pages.\nGood for: Building and naming component libraries.\nWatch out: Over-splitting simple components.\nSeen in: Brad Frost's method, used by most component libraries and Figma kits\n\nSteps:\n1. Ask me the few questions you need about my product and users first.\n2. Walk me through the method step by step for my case, not in general.\n3. Produce the outputs the method needs (for example notes, a table or a checklist) in plain text I can share.\n4. Tell me what to do next and how to know it worked.\n\nThe kindofui example below shows the method in a small working demo.",
   "code": {
    "html": "<div class=\"stage s-atom\">\n    <figure><div class=\"fr\"><span class=\"btn\">Go</span></div><figcaption>Atom</figcaption></figure><span class=\"arr\">→</span>\n    <figure><div class=\"fr\" style=\"display:flex;gap:3px\"><span class=\"inp\"></span><span class=\"btn\">Go</span></div><figcaption>Molecule</figcaption></figure><span class=\"arr\">→</span>\n    <figure><div class=\"fr\" style=\"display:flex;gap:6px;align-items:center;width:110px\"><b style=\"font-size:9px\">Logo</b><span class=\"inp\" style=\"width:40px\"></span><span class=\"btn\">Go</span></div><figcaption>Organism</figcaption></figure><span class=\"arr\">→</span>\n    <figure><div class=\"fr\" style=\"width:62px;height:76px\"><div style=\"height:10px;background:#c7d2fe;border-radius:2px\"></div><div style=\"height:30px;border:1px dashed #cbd5e1\"></div><div style=\"height:18px;border:1px dashed #cbd5e1\"></div></div><figcaption>Template</figcaption></figure><span class=\"arr\">→</span>\n    <figure><div class=\"fr\" style=\"width:62px;height:76px\"><div style=\"height:10px;background:#3557e0;border-radius:2px\"></div><div style=\"height:30px;background:linear-gradient(135deg,#fbbf24,#f97316);border-radius:2px\"></div><div class=\"ln\" style=\"height:4px\"></div><div class=\"ln\" style=\"height:4px;width:70%\"></div></div><figcaption>Page</figcaption></figure>\n  </div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-atom, .s-atom *, .s-atom *::before, .s-atom *::after { box-sizing: border-box; }\n.s-atom { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-atom button { font: inherit; cursor: pointer; }\n.ln { height: 6px; border-radius: 3px; background: #d6dbe4; }\n.s-atom { background: #f3f4f7; display: flex; gap: 6px; align-items: center; justify-content: center; padding: 12px; color: #2b3040; overflow-x: auto; }\n.s-atom figure { margin: 0; display: grid; gap: 8px; justify-items: center; flex: none; }\n.s-atom figcaption { font: 10px var(--mono); color: #6b7280; text-align: center; }\n.s-atom .arr { color: #9ca3af; font-size: 14px; flex: none; }\n.s-atom .fr { background: #fff; border: 1px solid #dfe3ea; border-radius: 6px; padding: 6px; display: grid; gap: 4px; }\n.s-atom .btn { background: #3557e0; color: #fff; border-radius: 4px; font-size: 9px; padding: 3px 7px; }\n.s-atom .inp { border: 1px solid #cfd5dd; border-radius: 4px; height: 16px; width: 46px; background: #fff; }",
    "js": ""
   }
  },
  {
   "id": "hcd",
   "title": "Human-centered design process",
   "section": "approaches",
   "sectionName": "Process and methods",
   "description": "Start from real users, not assumptions. Research, define the problem, explore ideas, prototype, test with people, and loop back with what you learn.",
   "goodFor": "New products and big redesigns",
   "watchOut": "Skipping research and guessing",
   "seenIn": "IDEO, Google Design Sprint, Stanford d.school \"design thinking\"",
   "prompt": "Help me use Human-centered design process on my project.\n\nWhat it is: Start from real users, not assumptions. Research, define the problem, explore ideas, prototype, test with people, and loop back with what you learn.\nGood for: New products and big redesigns.\nWatch out: Skipping research and guessing.\nSeen in: IDEO, Google Design Sprint, Stanford d.school \"design thinking\"\n\nSteps:\n1. Ask me the few questions you need about my product and users first.\n2. Walk me through the method step by step for my case, not in general.\n3. Produce the outputs the method needs (for example notes, a table or a checklist) in plain text I can share.\n4. Tell me what to do next and how to know it worked.\n\nThe kindofui example below shows the method in a small working demo.",
   "code": {
    "html": "<div class=\"stage s-hcd\">\n    <svg viewBox=\"0 0 380 230\" role=\"img\" aria-label=\"Five-step design process loop\">\n      <defs><marker id=\"ar\" viewBox=\"0 0 10 10\" refX=\"9\" refY=\"5\" markerWidth=\"7\" markerHeight=\"7\" orient=\"auto\"><path d=\"M0 0L10 5L0 10z\" fill=\"#9aa3b2\"></path></marker></defs>\n      <g font-family=\"Figtree, system-ui, sans-serif\" font-size=\"12\" font-weight=\"600\" text-anchor=\"middle\">\n        <rect x=\"8\" y=\"40\" width=\"64\" height=\"50\" rx=\"10\" fill=\"#dbeafe\"></rect><text x=\"40\" y=\"62\" fill=\"#1e3a8a\">1</text><text x=\"40\" y=\"78\" fill=\"#1e3a8a\">Research</text>\n        <rect x=\"83\" y=\"40\" width=\"64\" height=\"50\" rx=\"10\" fill=\"#ede9fe\"></rect><text x=\"115\" y=\"62\" fill=\"#4c1d95\">2</text><text x=\"115\" y=\"78\" fill=\"#4c1d95\">Define</text>\n        <rect x=\"158\" y=\"40\" width=\"64\" height=\"50\" rx=\"10\" fill=\"#fce7f3\"></rect><text x=\"190\" y=\"62\" fill=\"#831843\">3</text><text x=\"190\" y=\"78\" fill=\"#831843\">Ideate</text>\n        <rect x=\"233\" y=\"40\" width=\"64\" height=\"50\" rx=\"10\" fill=\"#fef3c7\"></rect><text x=\"265\" y=\"62\" fill=\"#78350f\">4</text><text x=\"265\" y=\"78\" fill=\"#78350f\">Prototype</text>\n        <rect x=\"308\" y=\"40\" width=\"64\" height=\"50\" rx=\"10\" fill=\"#dcfce7\"></rect><text x=\"340\" y=\"62\" fill=\"#14532d\">5</text><text x=\"340\" y=\"78\" fill=\"#14532d\">Test</text>\n      </g>\n      <g stroke=\"#9aa3b2\" stroke-width=\"1.6\" fill=\"none\" marker-end=\"url(#ar)\"><path d=\"M72 65H81\"></path><path d=\"M147 65H156\"></path><path d=\"M222 65H231\"></path><path d=\"M297 65H306\"></path><path d=\"M340 92 V140 H40 V95\"></path></g>\n      <text x=\"190\" y=\"158\" text-anchor=\"middle\" font-family=\"JetBrains Mono, monospace\" font-size=\"10\" fill=\"#6b7280\">learn from users, then repeat</text>\n      <g font-family=\"Figtree, system-ui, sans-serif\" font-size=\"10\" fill=\"#4b5563\" text-anchor=\"middle\">\n        <text x=\"40\" y=\"190\">interviews</text><text x=\"115\" y=\"190\">personas</text><text x=\"190\" y=\"190\">sketches</text><text x=\"265\" y=\"190\">wireframes</text><text x=\"340\" y=\"190\">usability tests</text>\n        <text x=\"40\" y=\"205\">surveys</text><text x=\"115\" y=\"205\">user journeys</text><text x=\"190\" y=\"205\">workshops</text><text x=\"265\" y=\"205\">Figma mockups</text><text x=\"340\" y=\"205\">A/B tests</text>\n      </g>\n    </svg>\n  </div>\n",
    "css": "/* base styles the site gives every demo (scoped to this demo) */\n.s-hcd, .s-hcd *, .s-hcd *::before, .s-hcd *::after { box-sizing: border-box; }\n.s-hcd { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-hcd button { font: inherit; cursor: pointer; }\n.s-hcd { background: #fff; color: #1f2430; display: grid; place-items: center; padding: 12px; }\n.s-hcd svg { width: 100%; max-width: 380px; height: auto; }",
    "js": ""
   }
  },
  {
   "id": "hci",
   "title": "HCI: Human-Computer Interaction",
   "section": "approaches",
   "sectionName": "Process and methods",
   "description": "HCI studies how people perceive, think and act when they use computers. It turns \"make it nicer\" into specific fixes: clear feedback, visible signifiers, helpful constraints and natural mapping.",
   "goodFor": "Explaining why users get stuck and fixing it with evidence",
   "watchOut": "Treating principles as rules without testing with real users",
   "seenIn": "Don Norman's \"The Design of Everyday Things\", Apple HIG and Material guidelines, usability labs and ACM SIGCHI research",
   "prompt": "Help me use HCI: Human-Computer Interaction on my project.\n\nWhat it is: HCI studies how people perceive, think and act when they use computers. It turns \"make it nicer\" into specific fixes: clear feedback, visible signifiers, helpful constraints and natural mapping.\nGood for: Explaining why users get stuck and fixing it with evidence.\nWatch out: Treating principles as rules without testing with real users.\nSeen in: Don Norman's \"The Design of Everyday Things\", Apple HIG and Material guidelines, usability labs and ACM SIGCHI research\n\nSteps:\n1. Ask me the few questions you need about my product and users first.\n2. Walk me through the method step by step for my case, not in general.\n3. Produce the outputs the method needs (for example notes, a table or a checklist) in plain text I can share.\n4. Tell me what to do next and how to know it worked.\n\nThe kindofui example below shows the method in a small working demo.",
   "code": {
    "html": "<div class=\"stage s-hci\" data-tabs=\"\">\n    <div class=\"tb\">\n      <button type=\"button\" class=\"on\" data-tab=\"fb\">Feedback</button>\n      <button type=\"button\" data-tab=\"sg\">Signifiers</button>\n      <button type=\"button\" data-tab=\"cn\">Constraints</button>\n      <button type=\"button\" data-tab=\"mp\">Mapping</button>\n    </div>\n    <div class=\"pn\" data-panel=\"fb\"><div class=\"vs2\">\n      <div><span class=\"lb2 b\">Before</span><button type=\"button\" class=\"pay\" data-hci=\"silent\">Pay ₹499</button><small>Tap it. Nothing changes, so you wonder if it worked and tap again. Double payment.</small></div>\n      <div><span class=\"lb2 g\">After</span><button type=\"button\" class=\"pay\" data-hci=\"pay\">Pay ₹499</button><small>Tap it. It shows progress, then a clear result. People always know the system's state.</small></div>\n    </div></div>\n    <div class=\"pn\" data-panel=\"sg\" hidden=\"\"><div class=\"vs2\">\n      <div><span class=\"lb2 b\">Before</span><span class=\"flat\">Download report</span><small>Plain text. Is it a label or a link? Nothing says \"tap me\".</small></div>\n      <div><span class=\"lb2 g\">After</span><button type=\"button\" class=\"dl\" data-hci=\"dl\">⬇ Download report</button><small>Shape, colour, icon and a pointer cursor signal that it is clickable.</small></div>\n    </div></div>\n    <div class=\"pn\" data-panel=\"cn\" hidden=\"\"><div class=\"vs2\">\n      <div><span class=\"lb2 b\">Before</span><input class=\"in\" value=\"31/02/2025\" aria-label=\"Appointment date\"><button type=\"button\" class=\"pay\" data-hci=\"book\">Book</button><small class=\"err\" hidden=\"\">Invalid date. Start again.</small><small>Free typing lets people make mistakes, then scolds them afterwards.</small></div>\n      <div><span class=\"lb2 g\">After</span><div class=\"chips\"><button type=\"button\" aria-pressed=\"false\">Tue 11 Nov</button><button type=\"button\" aria-pressed=\"false\">Wed 12 Nov</button><button type=\"button\" disabled=\"\">Thu 13 Nov · full</button></div><small>Only valid options are offered, so the error cannot happen.</small></div>\n    </div></div>\n    <div class=\"pn\" data-panel=\"mp\" hidden=\"\"><div class=\"vs2\">\n      <div><span class=\"lb2 b\">Before</span><div class=\"bg\"><i></i><i></i><i></i><i></i></div><div class=\"kr\"><button type=\"button\" data-k=\"1\" aria-label=\"Knob 1\"></button><button type=\"button\" data-k=\"3\" aria-label=\"Knob 2\"></button><button type=\"button\" data-k=\"0\" aria-label=\"Knob 3\"></button><button type=\"button\" data-k=\"2\" aria-label=\"Knob 4\"></button></div><small>Four knobs in a row, four burners in a square. Trial and error.</small></div>\n      <div><span class=\"lb2 g\">After</span><div class=\"bg\"><div><i></i><button type=\"button\" aria-label=\"Knob front left\"></button></div><div><i></i><button type=\"button\" aria-label=\"Knob front right\"></button></div><div><i></i><button type=\"button\" aria-label=\"Knob back left\"></button></div><div><i></i><button type=\"button\" aria-label=\"Knob back right\"></button></div></div><small>Each control sits next to what it controls. No manual needed.</small></div>\n    </div></div>\n  </div>\n",
    "css": ":root { --body: \"Figtree\",system-ui,sans-serif; --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): Figtree, JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-hci, .s-hci *, .s-hci *::before, .s-hci *::after { box-sizing: border-box; }\n.s-hci { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-hci button { font: inherit; cursor: pointer; }\n[hidden] { display: none !important; }\n.s-hci { background: #fff; color: #1f2430; display: flex; flex-direction: column; font-size: 11px; }\n.s-hci .tb { display: flex; gap: 2px; padding: 6px 6px 0; border-bottom: 1px solid #e5e7eb; flex: none; overflow-x: auto; }\n.s-hci .tb button { border: 0; background: none; padding: 6px 8px; font: 600 11px var(--body); color: #6b7280; border-bottom: 2px solid transparent; white-space: nowrap; cursor: pointer; }\n.s-hci .tb button.on { color: #1f2430; border-bottom-color: #3557e0; }\n.s-hci .pn { flex: 1; min-height: 0; }\n.s-hci .pn:not([hidden]) { display: grid; }\n.s-hci .vs2 { height: auto; }\n.s-hci small { color: #666; line-height: 1.35; font-size: 10.5px; }\n.s-hci .pay { justify-self: start; border: 0; border-radius: 8px; background: #3557e0; color: #fff; padding: 8px 12px; font: 600 12px var(--body); cursor: pointer; }\n.s-hci .pay:disabled { opacity: .85; cursor: default; }\n.s-hci .sp { display: inline-block; width: 10px; height: 10px; border: 2px solid #fff; border-top-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -1px; margin-right: 6px; }\n.s-hci .flat { color: #444; font-size: 12px; }\n.s-hci .dl { justify-self: start; border: 1px solid #c7d0f5; background: #eef1ff; color: #2a45c7; border-radius: 8px; padding: 7px 10px; font: 600 12px var(--body); cursor: pointer; }\n.s-hci .dl:hover { background: #dfe5ff; }\n.s-hci .in { width: 100%; border: 1px solid #cfd4dc; border-radius: 6px; padding: 6px 8px; font: 12px var(--mono); color: #1f2430; background: #fff; }\n.s-hci .err { color: #dc2626; }\n.s-hci .chips { display: grid; gap: 5px; }\n.s-hci .chips button { border: 1px solid #cfd4dc; background: #fff; border-radius: 6px; padding: 6px 8px; font: 600 11px var(--body); color: #1f2430; text-align: left; cursor: pointer; }\n.s-hci .chips button[aria-pressed=\"true\"] { border-color: #16a34a; background: #e8f7ec; color: #166534; }\n.s-hci .chips button:disabled { color: #9aa0aa; background: #f3f4f7; cursor: not-allowed; }\n.s-hci .bg { display: grid; grid-template-columns: repeat(2,28px); gap: 8px; justify-content: center; }\n.s-hci .bg > div { display: grid; gap: 5px; justify-items: center; }\n.s-hci .bg i { width: 28px; height: 28px; border-radius: 50%; background: #d6dae1; transition: background .2s,box-shadow .2s; }\n.s-hci .bg i.hot { background: #ef4444; box-shadow: 0 0 8px #f87171; }\n.s-hci .kr { display: flex; gap: 4px; justify-content: center; }\n.s-hci .kr button,.s-hci .bg button { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #6b7280; background: #fff; cursor: pointer; padding: 0; }\n.s-hci .kr button.hot,.s-hci .bg button.hot { background: #6b7280; }\n.vs2 { display: grid; grid-template-columns: 1fr 1fr; height: 100%; font-size: 11px; color: #1f2430; }\n.vs2 > div { padding: 10px 12px; display: grid; gap: 8px; align-content: start; position: relative; min-width: 0; }\n.vs2 > div:first-child { background: #fff; border-right: 1px solid #e5e7eb; }\n.vs2 > div:last-child { background: #fafafa; }\n.vs2 .lb2 { font: 700 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; }\n.vs2 .lb2.b { color: #b42318; }\n.vs2 .lb2.g { color: #067647; }\n@keyframes spin {\n  to{transform:rotate(1turn)}\n}\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // generic tabs\n  $$('[data-tabs]').forEach(g=>{\n    const tabs=$$('[data-tab]',g);\n    tabs.forEach(b=>b.addEventListener('click',()=>{\n      tabs.forEach(x=>x.classList.toggle('on',x===b));\n      $$('[data-panel]',g).forEach(p=>p.hidden=p.dataset.panel!==b.dataset.tab);\n    }));\n  });\n\n  /* ---------- HCI: before / after ---------- */\n  (() => { const st = $('.s-hci'); if (!st) return; const busy = new WeakSet();\n    st.addEventListener('click', e => { const t = e.target.closest('button'); if (!t || t.disabled) return;\n      const k = t.dataset.hci;\n      if (k === 'pay' && !busy.has(t)) { busy.add(t); const o = t.textContent; t.disabled = true; t.innerHTML = '<span class=\"sp\"></span>Paying…';\n        setTimeout(() => { t.textContent = '✓ Paid ₹499'; }, 900); setTimeout(() => { t.textContent = o; t.disabled = false; busy.delete(t); }, 2400); }\n      else if (k === 'dl' && !busy.has(t)) { busy.add(t); const o = t.textContent; t.textContent = '✓ Saved to Downloads'; setTimeout(() => { t.textContent = o; busy.delete(t); }, 1500); }\n      else if (k === 'book') { const er = t.parentElement.querySelector('.err'); er.hidden = false; setTimeout(() => { er.hidden = true; }, 2200); }\n      else if (t.closest('.chips')) { const on = t.getAttribute('aria-pressed') !== 'true'; $$('.chips button', t.parentElement).forEach(b => b.setAttribute('aria-pressed', 'false')); t.setAttribute('aria-pressed', on); }\n      else if (t.closest('.kr')) { const bg = t.parentElement.previousElementSibling; const b = bg.children[+t.dataset.k]; if (b) { b.classList.toggle('hot'); t.classList.toggle('hot'); } }\n      else if (t.closest('.bg')) { t.parentElement.querySelector('i').classList.toggle('hot'); t.classList.toggle('hot'); } });\n  })();\n})();"
   }
  },
  {
   "id": "persona",
   "title": "User persona",
   "section": "approaches",
   "sectionName": "Process and methods",
   "description": "A short profile of a typical user, built from research, with goals, frustrations and context. It keeps the team designing for real people.",
   "goodFor": "Keeping the team focused on real needs",
   "watchOut": "Made-up personas not based on research",
   "seenIn": "product teams at most companies",
   "prompt": "Help me use User persona on my project.\n\nWhat it is: A short profile of a typical user, built from research, with goals, frustrations and context. It keeps the team designing for real people.\nGood for: Keeping the team focused on real needs.\nWatch out: Made-up personas not based on research.\nSeen in: product teams at most companies\n\nSteps:\n1. Ask me the few questions you need about my product and users first.\n2. Walk me through the method step by step for my case, not in general.\n3. Produce the outputs the method needs (for example notes, a table or a checklist) in plain text I can share.\n4. Tell me what to do next and how to know it worked.\n\nThe kindofui example below shows the method in a small working demo.",
   "code": {
    "html": "<div class=\"stage s-pers\">\n    <div class=\"hd\"><i>RK</i><span><b>Riya Kapoor, 29</b><small>Product manager · Bengaluru</small></span><em>\"I plan my week on the metro. If it takes more than two taps, I won't use it.\"</em></div>\n    <div class=\"gr3\">\n      <div><b>Goals</b><ul><li>See all deadlines in one place</li><li>Share status with her lead fast</li></ul></div>\n      <div><b>Frustrations</b><ul><li>Too many apps for one task</li><li>Slow, cluttered mobile screens</li></ul></div>\n      <div><b>Devices</b><span>Android phone 70% · Laptop 30%</span></div>\n      <div><b>Tech comfort</b><span class=\"mt2\"><i></i></span></div>\n    </div>\n  </div>\n",
    "css": ":root { --body: \"Figtree\",system-ui,sans-serif; }\n/* fonts used (all on Google Fonts): Figtree */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-pers, .s-pers *, .s-pers *::before, .s-pers *::after { box-sizing: border-box; }\n.s-pers { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-pers button { font: inherit; cursor: pointer; }\n.s-pers { background: #fff; color: #1f2430; padding: 14px; display: grid; gap: 10px; align-content: start; font-size: 11px; }\n.s-pers .hd { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; }\n.s-pers .hd i { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg,#f59e0b,#ef4444); color: #fff; font: 700 13px var(--body); font-style: normal; display: grid; place-items: center; }\n.s-pers .hd span { display: grid; }\n.s-pers .hd b { font-size: 14px; }\n.s-pers small { color: #777; }\n.s-pers em { grid-column: 1/-1; font-style: italic; color: #444; font-size: 12px; line-height: 1.45; }\n.s-pers .gr3 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }\n.s-pers .gr3 > div { display: grid; gap: 3px; align-content: start; }\n.s-pers .gr3 b { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: #888; }\n.s-pers ul { margin: 0; padding-left: 14px; display: grid; gap: 2px; }\n.s-pers .mt2 { height: 6px; background: #eef0f3; border-radius: 3px; display: block; }\n.s-pers .mt2 i { display: block; height: 100%; width: 80%; background: #3557e0; border-radius: 3px; }",
    "js": ""
   }
  },
  {
   "id": "journey",
   "title": "Customer journey map",
   "section": "approaches",
   "sectionName": "Process and methods",
   "description": "The stages a person goes through, what they do and feel at each one, where it hurts, and ideas to fix it.",
   "goodFor": "Finding pain points across the whole experience",
   "watchOut": "Mapping without talking to users",
   "seenIn": "service design at banks, airlines and SaaS teams",
   "prompt": "Help me use Customer journey map on my project.\n\nWhat it is: The stages a person goes through, what they do and feel at each one, where it hurts, and ideas to fix it.\nGood for: Finding pain points across the whole experience.\nWatch out: Mapping without talking to users.\nSeen in: service design at banks, airlines and SaaS teams\n\nSteps:\n1. Ask me the few questions you need about my product and users first.\n2. Walk me through the method step by step for my case, not in general.\n3. Produce the outputs the method needs (for example notes, a table or a checklist) in plain text I can share.\n4. Tell me what to do next and how to know it worked.\n\nThe kindofui example below shows the method in a small working demo.",
   "code": {
    "html": "<div class=\"stage s-jm\"><div class=\"g5\">\n    <span class=\"rl\">Stage</span><b>Discover</b><b>Sign up</b><b>First use</b><b>Pay</b><b>Renew</b>\n    <span class=\"rl\">Doing</span><span>Sees an ad</span><span>Fills 9 fields</span><span>Imports tasks</span><span>Enters card</span><span>Gets reminder</span>\n    <span class=\"rl\">Feeling</span><div class=\"cvw\"><svg viewBox=\"0 0 500 60\" preserveAspectRatio=\"none\" aria-hidden=\"true\"><polyline points=\"50,20 150,48 250,12 350,40 450,14\" fill=\"none\" stroke=\"#3557e0\" stroke-width=\"2\" vector-effect=\"non-scaling-stroke\"></polyline></svg><span class=\"dt2\" style=\"left:10%;top:33%\">Curious</span><span class=\"dt2\" style=\"left:30%;top:80%\">Annoyed</span><span class=\"dt2\" style=\"left:50%;top:20%\">Delighted</span><span class=\"dt2\" style=\"left:70%;top:67%\">Worried</span><span class=\"dt2\" style=\"left:90%;top:23%\">Happy</span></div>\n    <span class=\"rl\">Pain</span><span></span><span class=\"pn\">Form too long</span><span></span><span class=\"pn\">Surprise fee</span><span></span>\n    <span class=\"rl\">Idea</span><span></span><span class=\"id\">Sign up with phone</span><span></span><span class=\"id\">Show price early</span><span></span>\n  </div></div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-jm, .s-jm *, .s-jm *::before, .s-jm *::after { box-sizing: border-box; }\n.s-jm { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-jm button { font: inherit; cursor: pointer; }\n.s-jm { background: #fff; color: #1f2430; padding: 12px; font-size: 10px; overflow: auto; }\n.s-jm .g5 { display: grid; grid-template-columns: 46px repeat(5,minmax(54px,1fr)); gap: 5px; align-items: center; min-width: 330px; }\n.s-jm .g5 > b { background: #1f2430; color: #fff; border-radius: 5px; padding: 5px 2px; text-align: center; font-size: 10px; }\n.s-jm .rl { font: 700 9px var(--mono); text-transform: uppercase; color: #888; }\n.s-jm .g5 > span:not(.rl) { text-align: center; line-height: 1.3; }\n.s-jm .cvw { grid-column: 2/-1; position: relative; height: 70px; background: linear-gradient(#f0fdf4,#fff 50%,#fef2f2); border-radius: 6px; }\n.s-jm .cvw svg { position: absolute; inset: 0; width: 100%; height: 100%; }\n.s-jm .dt2 { position: absolute; transform: translate(-50%,-50%); background: #fff; border: 2px solid #3557e0; border-radius: 999px; padding: 1px 6px; font-size: 9px; white-space: nowrap; }\n.s-jm .pn { background: #fef2f2; color: #991b1b; border-radius: 5px; padding: 4px; }\n.s-jm .id { background: #eff6ff; color: #1e40af; border-radius: 5px; padding: 4px; }",
    "js": ""
   }
  },
  {
   "id": "cardsort",
   "title": "Card sorting",
   "section": "approaches",
   "sectionName": "Process and methods",
   "description": "Users sort topics into groups that make sense to them, which shows how to structure menus and categories.",
   "goodFor": "Planning menus and categories with users",
   "watchOut": "Deciding navigation alone in a meeting",
   "seenIn": "Optimal Workshop studies, navigation redesigns",
   "prompt": "Help me use Card sorting on my project.\n\nWhat it is: Users sort topics into groups that make sense to them, which shows how to structure menus and categories.\nGood for: Planning menus and categories with users.\nWatch out: Deciding navigation alone in a meeting.\nSeen in: Optimal Workshop studies, navigation redesigns\n\nSteps:\n1. Ask me the few questions you need about my product and users first.\n2. Walk me through the method step by step for my case, not in general.\n3. Produce the outputs the method needs (for example notes, a table or a checklist) in plain text I can share.\n4. Tell me what to do next and how to know it worked.\n\nThe kindofui example below shows the method in a small working demo.",
   "code": {
    "html": "<div class=\"stage s-cs\">\n    <div class=\"pile\"><b>Cards to sort</b><div class=\"cl2\"><span>Invoices</span><span>Change password</span><span>Team members</span><span>Export data</span><span>Dark mode</span><span>Refunds</span></div></div>\n    <div class=\"grps\"><div><b>Billing</b><div class=\"cl2\"><span>Payment methods</span></div></div><div><b>Account</b><div class=\"cl2\"><span>Profile photo</span></div></div><div><b>Data</b><div class=\"cl2\"></div></div></div>\n  </div>\n",
    "css": "/* base styles the site gives every demo (scoped to this demo) */\n.s-cs, .s-cs *, .s-cs *::before, .s-cs *::after { box-sizing: border-box; }\n.s-cs { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-cs button { font: inherit; cursor: pointer; }\n.s-cs { background: #f3f4f7; color: #1f2430; padding: 12px; display: grid; grid-template-rows: auto 1fr; gap: 10px; font-size: 11px; }\n.s-cs b { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: #666; }\n.s-cs .pile .cl2 { display: flex; flex-wrap: wrap; gap: 5px; min-height: 28px; margin-top: 5px; }\n.s-cs .grps { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }\n.s-cs .grps > div { background: #fff; border: 1.5px dashed #cfd5dd; border-radius: 8px; padding: 6px; display: grid; grid-template-rows: auto 1fr; gap: 5px; min-width: 0; }\n.s-cs .grps .cl2 { display: grid; gap: 4px; align-content: start; min-height: 60px; }\n.s-cs .cl2 span { background: #fff; border: 1px solid #d6dae1; border-radius: 5px; padding: 4px 7px; cursor: grab; box-shadow: 0 1px 2px rgba(0,0,0,.06); }\n.s-cs .pile .cl2 span { background: #fffbeb; border-color: #fde68a; }\n.s-cs .sortable-ghost { opacity: .4; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  // loads SortableJS (drag and drop) from a CDN, then runs the demo\n  const whenSortable = fn => { if (window.Sortable) return fn(); const s = document.createElement('script'); s.src = 'https://cdnjs.cloudflare.com/ajax/libs/Sortable/1.15.2/Sortable.min.js'; s.onload = fn; document.head.append(s); };\n\n  whenSortable(() => {\n    const Srt = window.Sortable;\n\n    /* ---------- Methods ---------- */\n    if (Srt) $$('.s-cs .cl2').forEach(el => new Srt(el, { group: 'cs', animation: 150 }));\n  });\n})();"
   }
  },
  {
   "id": "ia",
   "title": "Information architecture (sitemap)",
   "section": "approaches",
   "sectionName": "Process and methods",
   "description": "A map of every page and how it's grouped, planned before any visual design so people can find things.",
   "goodFor": "Planning site structure before visual design",
   "watchOut": "Structures that mirror the org chart",
   "seenIn": "planning for every large website and app",
   "prompt": "Help me use Information architecture (sitemap) on my project.\n\nWhat it is: A map of every page and how it's grouped, planned before any visual design so people can find things.\nGood for: Planning site structure before visual design.\nWatch out: Structures that mirror the org chart.\nSeen in: planning for every large website and app\n\nSteps:\n1. Ask me the few questions you need about my product and users first.\n2. Walk me through the method step by step for my case, not in general.\n3. Produce the outputs the method needs (for example notes, a table or a checklist) in plain text I can share.\n4. Tell me what to do next and how to know it worked.\n\nThe kindofui example below shows the method in a small working demo.",
   "code": {
    "html": "<div class=\"stage s-ia\"><div class=\"tree\"><span class=\"nd r\">Home</span><div class=\"lv\">\n    <div class=\"br\"><span class=\"nd\">Shop</span><span class=\"lf\">Men</span><span class=\"lf\">Women</span><span class=\"lf\">Kids</span></div>\n    <div class=\"br\"><span class=\"nd\">Help</span><span class=\"lf\">Orders</span><span class=\"lf\">Returns</span><span class=\"lf\">Contact</span></div>\n    <div class=\"br\"><span class=\"nd\">Account</span><span class=\"lf\">Profile</span><span class=\"lf\">Addresses</span><span class=\"lf\">Wishlist</span></div>\n  </div></div></div>\n",
    "css": "/* base styles the site gives every demo (scoped to this demo) */\n.s-ia, .s-ia *, .s-ia *::before, .s-ia *::after { box-sizing: border-box; }\n.s-ia { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-ia button { font: inherit; cursor: pointer; }\n.s-ia { background: #fff; color: #1f2430; padding: 16px; font-size: 11px; display: grid; place-items: center; }\n.s-ia .tree { display: grid; justify-items: center; gap: 20px; width: 100%; }\n.s-ia .nd { background: #1f2430; color: #fff; border-radius: 6px; padding: 6px 12px; font-weight: 600; position: relative; }\n.s-ia .nd.r { background: #3557e0; }\n.s-ia .nd.r::after { content: \"\"; position: absolute; left: 50%; top: 100%; height: 10px; border-left: 1.5px solid #cbd5e1; }\n.s-ia .lv { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; width: 100%; position: relative; }\n.s-ia .lv::before { content: \"\"; position: absolute; top: -10px; left: 16.6%; right: 16.6%; border-top: 1.5px solid #cbd5e1; }\n.s-ia .br { display: grid; justify-items: center; gap: 6px; position: relative; }\n.s-ia .br::before { content: \"\"; position: absolute; top: -10px; left: 50%; height: 10px; border-left: 1.5px solid #cbd5e1; }\n.s-ia .br .nd { margin-bottom: 4px; }\n.s-ia .lf { background: #f3f4f7; border: 1px solid #e3e6ec; border-radius: 5px; padding: 4px 6px; width: 100%; max-width: 90px; text-align: center; }",
    "js": ""
   }
  },
  {
   "id": "fidelity",
   "title": "Wireframe vs mockup vs prototype",
   "section": "approaches",
   "sectionName": "Process and methods",
   "description": "Three levels of detail. Wireframes test structure, mockups show the final look, and prototypes let people click through before anything is built.",
   "goodFor": "Choosing the right detail for each stage",
   "watchOut": "Polishing visuals before the flow works",
   "seenIn": "Figma, Balsamiq, design handoffs",
   "prompt": "Help me use Wireframe vs mockup vs prototype on my project.\n\nWhat it is: Three levels of detail. Wireframes test structure, mockups show the final look, and prototypes let people click through before anything is built.\nGood for: Choosing the right detail for each stage.\nWatch out: Polishing visuals before the flow works.\nSeen in: Figma, Balsamiq, design handoffs\n\nSteps:\n1. Ask me the few questions you need about my product and users first.\n2. Walk me through the method step by step for my case, not in general.\n3. Produce the outputs the method needs (for example notes, a table or a checklist) in plain text I can share.\n4. Tell me what to do next and how to know it worked.\n\nThe kindofui example below shows the method in a small working demo.",
   "code": {
    "html": "<div class=\"stage s-fid\">\n    <figure><div class=\"fr wfm\"><i class=\"b1\"></i><i class=\"l1\"></i><i class=\"l2\"></i><i class=\"bt\"></i></div><figcaption><b>Wireframe</b>Structure only</figcaption></figure>\n    <figure><div class=\"fr mk\"><i class=\"b2\"></i><b>Goa villa</b><span>₹8,400 / night</span><i class=\"bt\">Book</i></div><figcaption><b>Mockup</b>Final look, static</figcaption></figure>\n    <figure><div class=\"fr pt2\" id=\"fid-p\"><div class=\"v1\"><i class=\"b2\"></i><b>Goa villa</b><span>₹8,400 / night</span><button id=\"fid-b\">Book</button></div><div class=\"v2\" hidden=\"\"><b>Booked ✓</b><span>Fri 14 – Sun 16 Nov</span><button id=\"fid-x\">Back</button></div></div><figcaption><b>Prototype</b>Clickable: try Book</figcaption></figure>\n  </div>\n",
    "css": "/* base styles the site gives every demo (scoped to this demo) */\n.s-fid, .s-fid *, .s-fid *::before, .s-fid *::after { box-sizing: border-box; }\n.s-fid { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-fid button { font: inherit; cursor: pointer; }\n[hidden] { display: none !important; }\n.s-fid { background: #f3f4f7; color: #1f2430; display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; padding: 14px; align-content: center; font-size: 10px; }\n.s-fid figure { margin: 0; display: grid; gap: 8px; justify-items: center; text-align: center; min-width: 0; }\n.s-fid figcaption { display: grid; color: #666; }\n.s-fid figcaption b { color: #1f2430; font-size: 11px; }\n.s-fid .fr { width: 100%; max-width: 110px; height: 160px; border-radius: 10px; padding: 8px; display: grid; gap: 5px; align-content: start; text-align: left; }\n.s-fid .wfm { background: #fff; border: 1.5px dashed #9aa3b2; }\n.s-fid .wfm .b1 { height: 50px; background: repeating-linear-gradient(45deg,#e5e7eb 0 4px,#f3f4f6 4px 8px); border: 1px solid #cbd5e1; }\n.s-fid .wfm .l1 { height: 6px; background: #d6dbe4; border-radius: 3px; }\n.s-fid .wfm .l2 { height: 6px; width: 60%; background: #d6dbe4; border-radius: 3px; }\n.s-fid .wfm .bt { height: 18px; border: 1.5px solid #9aa3b2; border-radius: 4px; margin-top: 6px; }\n.s-fid .mk,.s-fid .pt2 { background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.08); }\n.s-fid .b2 { display: block; height: 50px; border-radius: 6px; background: linear-gradient(135deg,#fbbf24,#f97316); }\n.s-fid .mk b,.s-fid .pt2 b { font-size: 12px; }\n.s-fid .mk span,.s-fid .pt2 span { color: #666; }\n.s-fid .mk .bt { font-style: normal; background: #3557e0; color: #fff; border-radius: 5px; padding: 4px; text-align: center; margin-top: 4px; }\n.s-fid .pt2 { outline: 2px solid #3557e0; outline-offset: 2px; }\n.s-fid .pt2 .v1,.s-fid .pt2 .v2 { display: grid; gap: 5px; }\n.s-fid .pt2 button { border: 0; background: #3557e0; color: #fff; border-radius: 5px; padding: 5px; margin-top: 4px; font-size: 10px; font-weight: 600; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  const on = (sel, ev, fn) => { const el = $(sel); if (el) el.addEventListener(ev, fn); return el; };\n\n  on('#fid-b', 'click', () => { $('#fid-p .v1').hidden = true; $('#fid-p .v2').hidden = false; });\n\n  on('#fid-x', 'click', () => { $('#fid-p .v2').hidden = true; $('#fid-p .v1').hidden = false; });\n})();"
   }
  },
  {
   "id": "abtest",
   "title": "A/B testing",
   "section": "approaches",
   "sectionName": "Process and methods",
   "description": "Show two versions to similar groups of real users and keep the one that performs better, only once the result is statistically reliable.",
   "goodFor": "Choosing between two options with real data",
   "watchOut": "Small samples or stopping tests early",
   "seenIn": "Booking.com, Amazon, Optimizely, GrowthBook",
   "prompt": "Help me use A/B testing on my project.\n\nWhat it is: Show two versions to similar groups of real users and keep the one that performs better, only once the result is statistically reliable.\nGood for: Choosing between two options with real data.\nWatch out: Small samples or stopping tests early.\nSeen in: Booking.com, Amazon, Optimizely, GrowthBook\n\nSteps:\n1. Ask me the few questions you need about my product and users first.\n2. Walk me through the method step by step for my case, not in general.\n3. Produce the outputs the method needs (for example notes, a table or a checklist) in plain text I can share.\n4. Tell me what to do next and how to know it worked.\n\nThe kindofui example below shows the method in a small working demo.",
   "code": {
    "html": "<div class=\"stage s-ab\">\n    <div class=\"vr\"><div class=\"hd3\"><b>A · Control</b></div><button class=\"ba\">Sign up</button><div class=\"mt3\"><span>5,000 visitors</span><span>210 sign-ups</span></div><div class=\"cr2\"><i style=\"width:42%\"></i><b>4.2%</b></div></div>\n    <div class=\"vr win\"><div class=\"hd3\"><b>B · Variant</b><em>Winner</em></div><button class=\"bb\">Start free, no card needed</button><div class=\"mt3\"><span>5,000 visitors</span><span>260 sign-ups</span></div><div class=\"cr2\"><i style=\"width:52%\"></i><b>5.2%</b></div></div>\n    <div class=\"res\"><b>+23.8% lift</b> · about 98% confidence (two-sided z-test)</div>\n  </div>\n",
    "css": ":root { --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-ab, .s-ab *, .s-ab *::before, .s-ab *::after { box-sizing: border-box; }\n.s-ab { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-ab button { font: inherit; cursor: pointer; }\n.s-ab { background: #fff; color: #1f2430; padding: 14px; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; gap: 10px; font-size: 11px; }\n.s-ab .vr { border: 1px solid #e3e6ec; border-radius: 10px; padding: 10px; display: grid; gap: 8px; align-content: start; min-width: 0; }\n.s-ab .vr.win { border: 2px solid #16a34a; }\n.s-ab .hd3 { display: flex; justify-content: space-between; align-items: center; gap: 4px; }\n.s-ab .hd3 span { color: #888; }\n.s-ab em { font-style: normal; background: #16a34a; color: #fff; border-radius: 999px; padding: 1px 7px; font-size: 9px; font-weight: 700; }\n.s-ab .ba,.s-ab .bb { border: 0; border-radius: 6px; padding: 8px; font-weight: 600; font-size: 11px; color: #fff; }\n.s-ab .ba { background: #9ca3af; }\n.s-ab .bb { background: #16a34a; }\n.s-ab .mt3 { display: grid; color: #666; font-variant-numeric: tabular-nums; }\n.s-ab .cr2 { display: flex; align-items: center; gap: 6px; }\n.s-ab .cr2 i { height: 8px; background: #3557e0; border-radius: 4px; }\n.s-ab .win .cr2 i { background: #16a34a; }\n.s-ab .cr2 b { font: 700 13px var(--mono); }\n.s-ab .res { grid-column: 1/-1; background: #f0fdf4; color: #166534; border-radius: 8px; padding: 8px 10px; text-align: center; }",
    "js": ""
   }
  },
  {
   "id": "tokens",
   "title": "Design tokens",
   "section": "approaches",
   "sectionName": "Process and methods",
   "description": "Named values for color, radius, type and spacing that components read from.",
   "goodFor": "Theming, dark mode and multi-brand systems",
   "watchOut": "Hard-coding colors and sizes in components",
   "seenIn": "Material 3, Salesforce Lightning, Figma Variables",
   "prompt": "Help me use Design tokens on my project.\n\nWhat it is: Named values for color, radius, type and spacing that components read from.\nGood for: Theming, dark mode and multi-brand systems.\nWatch out: Hard-coding colors and sizes in components.\nSeen in: Material 3, Salesforce Lightning, Figma Variables\n\nSteps:\n1. Ask me the few questions you need about my product and users first.\n2. Walk me through the method step by step for my case, not in general.\n3. Produce the outputs the method needs (for example notes, a table or a checklist) in plain text I can share.\n4. Tell me what to do next and how to know it worked.\n\nThe kindofui example below shows the method in a small working demo.",
   "code": {
    "html": "<div class=\"stage s-tok\" id=\"tok\">\n    <pre id=\"tok-j\"></pre>\n    <div class=\"pv\"><div class=\"bs\" role=\"group\" aria-label=\"Brand\"><button class=\"on\" data-b=\"a\">Brand A</button><button data-b=\"b\">Brand B</button></div><div class=\"cd2\"><b>Upgrade to Pro</b><span>Unlimited projects and priority support.</span><button>Upgrade</button></div></div>\n  </div>\n",
    "css": ":root { --display: \"Bricolage Grotesque\",system-ui,sans-serif; --mono: \"JetBrains Mono\",ui-monospace,monospace; }\n/* fonts used (all on Google Fonts): Bricolage Grotesque, JetBrains Mono */\n/* base styles the site gives every demo (scoped to this demo) */\n.s-tok, .s-tok *, .s-tok *::before, .s-tok *::after { box-sizing: border-box; }\n.s-tok { position: relative; height: 290px; border-bottom: 1px solid transparent; overflow: hidden; font: 15px/1.55 system-ui, sans-serif; color: #1f2430; color-scheme: light; }\n.s-tok button { font: inherit; cursor: pointer; }\n.s-tok { background: #f3f4f7; color: #1f2430; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; font-size: 11px; --t-p: #3557e0; --t-s: #fff; --t-x: #1f2430; --t-r: 8px; --t-f: var(--display); }\n.s-tok pre { margin: 0; background: #1f2430; color: #d1d5db; border-radius: 8px; padding: 10px; font: 10px/1.5 var(--mono); overflow: auto; white-space: pre-wrap; word-break: break-all; }\n.s-tok .pv { display: grid; gap: 10px; align-content: center; min-width: 0; }\n.s-tok .bs { display: flex; gap: 4px; }\n.s-tok .bs button { flex: 1; border: 1px solid #d6dae1; background: #fff; border-radius: 6px; padding: 4px; font-size: 10px; color: #1f2430; }\n.s-tok .bs button.on { background: #1f2430; color: #fff; }\n.s-tok .cd2 { background: var(--t-s); color: var(--t-x); border-radius: var(--t-r); padding: 12px; display: grid; gap: 6px; box-shadow: 0 4px 12px rgba(0,0,0,.08); transition: all .3s; }\n.s-tok .cd2 b { font: 700 15px/1.1 var(--t-f); }\n.s-tok .cd2 span { opacity: .75; }\n.s-tok .cd2 button { border: 0; background: var(--t-p); color: #fff; border-radius: var(--t-r); padding: 7px; font-weight: 600; }\n",
    "js": "(() => {\n  const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];\n\n  (() => { const T = { a: { 'color.primary': '#3557e0', 'color.surface': '#ffffff', 'color.text': '#1f2430', 'radius.md': '8px', 'font.heading': 'Bricolage Grotesque' }, b: { 'color.primary': '#e8590c', 'color.surface': '#fff8f1', 'color.text': '#3b1d0c', 'radius.md': '20px', 'font.heading': 'DM Serif Display' } };\n    const st = $('#tok'), pre = $('#tok-j'); if (!st) return;\n    const ap = k => { const t = T[k]; st.style.setProperty('--t-p', t['color.primary']); st.style.setProperty('--t-s', t['color.surface']); st.style.setProperty('--t-x', t['color.text']); st.style.setProperty('--t-r', t['radius.md']); st.style.setProperty('--t-f', `\"${t['font.heading']}\",serif`);\n      pre.textContent = JSON.stringify(t, null, 2); $$('.s-tok .bs button').forEach(b => b.classList.toggle('on', b.dataset.b === k)); };\n    $$('.s-tok .bs button').forEach(b => b.addEventListener('click', () => ap(b.dataset.b))); ap('a');\n  })();\n})();"
   }
  }
 ],
 "decisions": [
  {
   "id": "overlay",
   "title": "Modal, drawer, popover, tooltip or toast?",
   "start": {
    "question": "Must the person deal with it before doing anything else?",
    "answers": [
     {
      "label": "Yes",
      "then": {
       "question": "Is it a short decision, like confirming a delete?",
       "answers": [
        {
         "label": "Yes",
         "then": {
          "use": "Modal dialog",
          "why": "It blocks the page on purpose, so keep it to one clear question with two buttons. Esc and Cancel must close it, and focus returns to what opened it.",
          "pattern": "modal"
         }
        },
        {
         "label": "No",
         "then": {
          "use": "Drawer (side sheet)",
          "why": "Longer forms and details fit in a panel that slides in, keeps the page visible behind it, and closes back to where they were.",
          "pattern": "sidebar"
         }
        }
       ]
      }
     },
     {
      "label": "No",
      "then": {
       "question": "Is it only telling them something already happened?",
       "answers": [
        {
         "label": "Yes",
         "then": {
          "use": "Toast",
          "why": "A short message at the edge that goes away by itself. Add Undo for anything destructive, and never let a toast be the only place important information appears.",
          "pattern": "modal"
         }
        },
        {
         "label": "No",
         "then": {
          "question": "Is it attached to one button or item on the page?",
          "answers": [
           {
            "label": "Yes",
            "then": {
             "question": "Will they click things inside it?",
             "answers": [
              {
               "label": "Yes",
               "then": {
                "use": "Popover",
                "why": "Opens on click, can hold links and controls, and closes with Esc or a click outside.",
                "pattern": "tooltip"
               }
              },
              {
               "label": "No",
               "then": {
                "use": "Tooltip",
                "why": "A short label on hover and keyboard focus. Touch screens have no hover, so never put information people need to finish the task only in a tooltip.",
                "pattern": "tooltip"
               }
              }
             ]
            }
           },
           {
            "label": "No",
            "then": {
             "use": "Inline message or banner",
             "why": "Put the message in the page where it applies. It stays until it is resolved and blocks nothing.",
             "pattern": "errors"
            }
           }
          ]
         }
        }
       ]
      }
     }
    ]
   }
  },
  {
   "id": "views",
   "title": "Tabs, segmented control, accordion or stepper?",
   "start": {
    "question": "Must people go through the parts in a fixed order?",
    "answers": [
     {
      "label": "Yes",
      "then": {
       "use": "Stepper / wizard",
       "why": "Shows where they are and what is left. Use it for checkout and sign-up, and let people go back without losing what they typed.",
       "pattern": "stepper"
      }
     },
     {
      "label": "No",
      "then": {
       "question": "Do people need to see more than one part at once, or is the screen narrow with long content?",
       "answers": [
        {
         "label": "Yes",
         "then": {
          "use": "Accordion",
          "why": "Sections stack and open in place, which suits phones and FAQs. Write headings people can scan while everything is closed.",
          "pattern": "accordion"
         }
        },
        {
         "label": "No",
         "then": {
          "question": "Are the options different views of the same data, like List and Grid or Day, Week and Month?",
          "answers": [
           {
            "label": "Yes",
            "then": {
             "use": "Segmented control",
             "why": "A compact switch between 2 to 5 views of the same thing. The content stays the same, only how it is shown changes.",
             "pattern": "tabs"
            }
           },
           {
            "label": "No",
            "then": {
             "use": "Tabs",
             "why": "Separate panels of related content on one page. Keep labels short, and few enough tabs that they fit without scrolling.",
             "pattern": "tabs"
            }
           }
          ]
         }
        }
       ]
      }
     }
    ]
   }
  },
  {
   "id": "paging",
   "title": "Pagination, infinite scroll or Load more?",
   "start": {
    "question": "Do people need to find an item again, share their place, or reach the footer?",
    "answers": [
     {
      "label": "Yes",
      "then": {
       "use": "Pagination",
       "why": "Numbered pages give a sense of place and size, work with the Back button, and keep the footer reachable. Best for search results and catalogs.",
       "pattern": "infinite"
      }
     },
     {
      "label": "No",
      "then": {
       "question": "Is it a casual feed people scroll without a goal?",
       "answers": [
        {
         "label": "Yes",
         "then": {
          "use": "Infinite scroll",
          "why": "Loads more as they reach the bottom, which suits social and media feeds. Keep their place when they come back, and do not hide important links in a footer they can never reach.",
          "pattern": "infinite"
         }
        },
        {
         "label": "No",
         "then": {
          "use": "Load more button",
          "why": "A middle ground: the list grows only when they ask, so they stay in control and the footer stays reachable.",
          "pattern": "infinite"
         }
        }
       ]
      }
     }
    ]
   }
  },
  {
   "id": "nav",
   "title": "Which main navigation?",
   "start": {
    "question": "Will it be used mostly on phones?",
    "answers": [
     {
      "label": "Yes",
      "then": {
       "question": "Are there 3 to 5 main sections people switch between often?",
       "answers": [
        {
         "label": "Yes",
         "then": {
          "use": "Bottom tab bar",
          "why": "The main sections stay one thumb tap away and always visible. Use icons with text labels.",
          "pattern": "tabbar"
         }
        },
        {
         "label": "No",
         "then": {
          "question": "Is there one main action, like Compose or Add?",
          "answers": [
           {
            "label": "Yes",
            "then": {
             "use": "Floating action button",
             "why": "One clear button for the most common action, in easy reach. Keep it to one action, not a menu of everything.",
             "pattern": "fab"
            }
           },
           {
            "label": "No",
            "then": {
             "use": "Hamburger menu",
             "why": "Fine for secondary links, but hidden menus get used less, so keep the most used sections visible on screen.",
             "pattern": "hamburger"
            }
           }
          ]
         }
        }
       ]
      }
     },
     {
      "label": "No",
      "then": {
       "question": "Is it a website people read, or an app people work in?",
       "answers": [
        {
         "label": "Website",
         "then": {
          "question": "Hundreds of categories, like a big shop or news site?",
          "answers": [
           {
            "label": "Yes",
            "then": {
             "use": "Mega menu",
             "why": "Shows many categories at once in a grouped panel. Make it work with the keyboard and on click, not only on hover.",
             "pattern": "mega"
            }
           },
           {
            "label": "No",
            "then": {
             "use": "Top navbar (sticky header)",
             "why": "The standard most sites use, so people know it already. Keep it short so it does not eat small screens.",
             "pattern": "stickynav"
            }
           }
          ]
         }
        },
        {
         "label": "App",
         "then": {
          "question": "More than 7 places to go, or nested sections?",
          "answers": [
           {
            "label": "Yes",
            "then": {
             "use": "Sidebar",
             "why": "Room for many sections and nesting. Let it collapse on smaller screens, and add a command palette for power users.",
             "pattern": "sidebar"
            }
           },
           {
            "label": "No",
            "then": {
             "use": "Navigation rail",
             "why": "A slim bar for 3 to 7 destinations that leaves room for the work. Always show labels.",
             "pattern": "navrail"
            }
           }
          ]
         }
        }
       ]
      }
     }
    ]
   }
  },
  {
   "id": "loading",
   "title": "Spinner, skeleton, progress bar or last known value?",
   "start": {
    "question": "Is there already data on screen from before, like numbers on a dashboard or an inbox list?",
    "answers": [
     {
      "label": "Yes",
      "then": {
       "use": "Keep the last known value",
       "why": "Leave the old data on screen with a small \"Updating\" note and when it was last updated, then change the values in place without moving anything. People keep reading the whole time, and a wait that keeps you busy feels shorter than an empty one. Only the very first load, when there is nothing to show yet, needs a skeleton.",
       "pattern": "lastknown"
      }
     },
     {
      "label": "No",
      "then": {
       "question": "Does it usually finish in under about one second?",
       "answers": [
        {
         "label": "Yes",
         "then": {
          "use": "No loader, just instant feedback",
          "why": "Under a second, a loader only flashes and distracts. Respond to the click at once, for example with a pressed state or an optimistic update.",
          "pattern": "doherty"
         }
        },
        {
         "label": "No",
         "then": {
          "question": "Can you tell how far along it is, like a percentage, steps or file size?",
          "answers": [
           {
            "label": "Yes",
            "then": {
             "use": "Progress bar",
             "why": "Real progress makes waiting easier and tells people whether to wait. Show steps or time left for long jobs, and let them cancel.",
             "pattern": "loaders"
            }
           },
           {
            "label": "No",
            "then": {
             "question": "Are you loading a page or list whose layout you already know?",
             "answers": [
              {
               "label": "Yes",
               "then": {
                "use": "Skeleton screen",
                "why": "Grey shapes in the final layout make the page feel faster and stop it jumping when content arrives. A common rule of thumb: wait about 300 ms before showing it, and once shown keep it about 500 ms, so fast loads never flash.",
                "pattern": "skeleton"
               }
              },
              {
               "label": "No",
               "then": {
                "use": "Spinner",
                "why": "Fine for short, unknown waits on one action. Wait about 300 ms before showing it so fast actions never flash (a rule of thumb). If it can take more than about 10 seconds, switch to a progress message and let people cancel.",
                "pattern": "loaders"
               }
              }
             ]
            }
           }
          ]
         }
        }
       ]
      }
     }
    ]
   }
  },
  {
   "id": "confirm",
   "title": "Confirm dialog or Undo?",
   "start": {
    "question": "Can the action be reversed?",
    "answers": [
     {
      "label": "Yes",
      "then": {
       "use": "Do it, then offer Undo",
       "why": "Asking \"Are you sure?\" for every action trains people to click Yes without reading. Act at once and show a toast with Undo.",
       "pattern": "modal"
      }
     },
     {
      "label": "No",
      "then": {
       "question": "Is the loss big, like deleting an account, paying, or sending to many people?",
       "answers": [
        {
         "label": "Yes",
         "then": {
          "use": "Confirm dialog that names the thing",
          "why": "Say exactly what will happen (\"Delete Northwind and its 24 files?\") and label the button with the action, not OK. For the biggest losses, ask them to type the name.",
          "pattern": "modal"
         }
        },
        {
         "label": "No",
         "then": {
          "use": "Do it, then offer Undo",
          "why": "For small losses a confirm step only slows people down. Act at once and let them undo.",
          "pattern": "modal"
         }
        }
       ]
      }
     }
    ]
   }
  },
  {
   "id": "errtime",
   "title": "When should a form show errors?",
   "start": {
    "question": "Is the field hard to get right the first time, like a new password or a username that may be taken?",
    "answers": [
     {
      "label": "Yes",
      "then": {
       "use": "Show progress as they type, errors after they leave",
       "why": "Tick the rules off as they are met instead of showing errors while people are still typing. Show a real error only once they move on. Source: Baymard on inline validation (2024).",
       "pattern": "password"
      }
     },
     {
      "label": "No",
      "then": {
       "question": "Is the person submitting the whole form right now?",
       "answers": [
        {
         "label": "Yes, they pressed Submit",
         "then": {
          "use": "Error summary on top plus a message at each field",
          "why": "List every problem at the top, link each one to its field and move focus there; keep the message next to each field too. Source: GOV.UK Design System.",
          "pattern": "errsummary"
         }
        },
        {
         "label": "No, still filling it in",
         "then": {
          "use": "Check each field when they leave it",
          "why": "Wait until the person moves on, then say what is wrong, and clear the message on the keystroke that fixes it. The research is mixed: a 2009 test (Wroblewski) favoured checking after each field, a 2007 study (Bargas-Avila et al.) favoured the end of the form. Test with your own users.",
          "pattern": "validation"
         }
        }
       ]
      }
     }
    ]
   }
  },
  {
   "id": "choice",
   "title": "Switch, checkbox or radio buttons?",
   "start": {
    "question": "Does the change apply at once, with no Save button?",
    "answers": [
     {
      "label": "Yes",
      "then": {
       "use": "Switch",
       "why": "A switch is an instant on or off, like a light switch. Never put switches in a form that waits for Save. Source: NN/g on toggle switches (2018).",
       "pattern": "settings"
      }
     },
     {
      "label": "No",
      "then": {
       "question": "Is it a single yes or no inside a form that gets submitted?",
       "answers": [
        {
         "label": "Yes",
         "then": {
          "use": "One checkbox",
          "why": "Use it for one yes or no that applies when the form is sent, like \"Email me the receipt\". Word it so that ticked means yes. Source: NN/g on checkboxes and radio buttons (2004).",
          "pattern": null
         }
        },
        {
         "label": "No",
         "then": {
          "question": "Can people pick more than one option?",
          "answers": [
           {
            "label": "Yes, any number",
            "then": {
             "use": "Checkboxes",
             "why": "Each option is independent, like filters, so show them all and let people tick any number. Source: NN/g (2004).",
             "pattern": "facets"
            }
           },
           {
            "label": "No, exactly one",
            "then": {
             "use": "Radio buttons",
             "why": "Exactly one choice from a short list. Show every option, and preselect one or offer an explicit \"None\". Source: NN/g (2004).",
             "pattern": null
            }
           }
          ]
         }
        }
       ]
      }
     }
    ]
   }
  },
  {
   "id": "pick",
   "title": "Radio buttons, dropdown or autocomplete?",
   "start": {
    "question": "Could you ask a simpler question that needs fewer options?",
    "answers": [
     {
      "label": "Yes",
      "then": {
       "use": "Ask the simpler question first",
       "why": "Fewer options beat any control. Rewrite the question, split it, or use what you already know about the person.",
       "pattern": null
      }
     },
     {
      "label": "No",
      "then": {
       "question": "Do people already know their answer, like their country, city or company?",
       "answers": [
        {
         "label": "Yes",
         "then": {
          "use": "Autocomplete",
          "why": "Let people type and pick from matches. It handles long lists that a dropdown makes painful.",
          "pattern": "autocomplete"
         }
        },
        {
         "label": "No",
         "then": {
          "question": "Do all the options fit on screen?",
          "answers": [
           {
            "label": "Yes",
            "then": {
             "use": "Radio buttons",
             "why": "Every choice is visible at once, easy to compare and easy to tap. Source: NN/g (2004).",
             "pattern": null
            }
           },
           {
            "label": "No",
            "then": {
             "use": "Dropdown, as a last resort",
             "why": "Only for a medium list people browse when space is tight. In GOV.UK testing people struggled to close dropdowns, tried to type in them and missed that they scroll. No study gives a reliable option count to switch at.",
             "pattern": null
            }
           }
          ]
         }
        }
       ]
      }
     }
    ]
   }
  },
  {
   "id": "filters",
   "title": "Filters: update live or use an Apply button?",
   "start": {
    "question": "Is this a filter sheet on a phone?",
    "answers": [
     {
      "label": "Yes",
      "then": {
       "use": "Apply button",
       "why": "On phones, let people set several filters in the sheet and apply once, so the page does not reload under their thumb. Source: NN/g on applying filters (2016).",
       "pattern": "facets"
      }
     },
     {
      "label": "No",
      "then": {
       "question": "Do results update almost instantly, well under a second?",
       "answers": [
        {
         "label": "Yes",
         "then": {
          "question": "Are people exploring rather than knowing exactly what they want?",
          "answers": [
           {
            "label": "Exploring",
            "then": {
             "use": "Update live",
             "why": "Instant results let people see what each filter does and explore. Dim the results briefly while they update. Source: NN/g (2016).",
             "pattern": "facets"
            }
           },
           {
            "label": "They know what they want",
            "then": {
             "use": "Apply button",
             "why": "When people know several criteria up front, one Apply saves them from watching the page reload after every tick. Source: NN/g (2016).",
             "pattern": "facets"
            }
           }
          ]
         }
        },
        {
         "label": "No",
         "then": {
          "use": "Apply button",
          "why": "When results take a while, live filters freeze the page between every tick. Let people set them all, then apply once. Source: NN/g (2016).",
          "pattern": "facets"
         }
        }
       ]
      }
     }
    ]
   }
  },
  {
   "id": "message",
   "title": "Toast, inline message, banner or dialog?",
   "start": {
    "question": "Is it an error the person has to fix?",
    "answers": [
     {
      "label": "Yes",
      "then": {
       "use": "Inline message",
       "why": "Put it next to the field or button it is about and keep it until it is fixed. Never a toast for errors. Sources: NN/g (2024); WCAG 2.2 Status Messages.",
       "pattern": "inlinestatus"
      }
     },
     {
      "label": "No",
      "then": {
       "question": "Does it block progress or need a decision?",
       "answers": [
        {
         "label": "Yes",
         "then": {
          "use": "Dialog",
          "why": "Stop the page on purpose for a decision, with buttons named after the action. Return focus to where the person was when it closes.",
          "pattern": "modal"
         }
        },
        {
         "label": "No",
         "then": {
          "question": "Is it about the whole page or app, like being offline or a trial ending?",
          "answers": [
           {
            "label": "Yes",
            "then": {
             "use": "Banner",
             "why": "A bar at the top that stays until the situation changes, with what to do next.",
             "pattern": "errors"
            }
           },
           {
            "label": "No",
            "then": {
             "use": "Toast, with care",
             "why": "Fine for a small confirmation of something the person just did, ideally with Undo. Keep it on screen long enough to read, announce it as a status, and make the result findable elsewhere. Source: Adrian Roselli on toast messages.",
             "pattern": "modal"
            }
           }
          ]
         }
        }
       ]
      }
     }
    ]
   }
  }
 ],
 "uxAudit": [
  {
   "group": "Usability",
   "checks": [
    {
     "check": "Main buttons are big (at least 44 by 44 px on touch) and close to where the hand or pointer already is.",
     "pattern": "fitts"
    },
    {
     "check": "Each screen offers a few clear choices; rare options are tucked away.",
     "pattern": "hick"
    },
    {
     "check": "Navigation, search, cart and forms work the way people know from other sites.",
     "pattern": "jakob"
    },
    {
     "check": "Long numbers, codes and lists are broken into small groups.",
     "pattern": "miller"
    },
    {
     "check": "Related things are grouped by space or a shared box, and unrelated things sit apart.",
     "pattern": "gestalt"
    },
    {
     "check": "Only one thing per screen stands out: the main action.",
     "pattern": "vonrestorff"
    },
    {
     "check": "Hard parts are handled by smart defaults instead of being pushed onto the user.",
     "pattern": "tesler"
    },
    {
     "check": "People can always see what is happening, undo mistakes, and read words they use themselves.",
     "pattern": "nielsen"
    }
   ]
  },
  {
   "group": "Feedback and errors",
   "checks": [
    {
     "check": "Every action responds within about 400 ms, or shows feedback at once while it works.",
     "pattern": "doherty"
    },
    {
     "check": "Anything slower than a second shows progress.",
     "pattern": "loaders"
    },
    {
     "check": "Screens that already show data keep showing it while they refresh, with the time of the last update.",
     "pattern": "lastknown"
    },
    {
     "check": "Error messages say what went wrong and how to fix it, in plain words.",
     "pattern": "errors"
    },
    {
     "check": "Forms check fields as people go, not only after Submit.",
     "pattern": "validation"
    },
    {
     "check": "Empty screens explain what goes there and offer the first step.",
     "pattern": "empty"
    },
    {
     "check": "No dark patterns: no pre-ticked boxes, hidden costs or guilt-trip wording.",
     "pattern": "darkpat"
    },
    {
     "check": "A failed submit lists every error at the top, with links to the fields.",
     "pattern": "errsummary"
    },
    {
     "check": "Field labels stay visible above the fields, not only as placeholders.",
     "pattern": "labels"
    },
    {
     "check": "Clicking Pay or Submit twice cannot create two orders.",
     "pattern": "doublesubmit"
    },
    {
     "check": "Nothing on the page jumps as images, ads or banners load.",
     "pattern": "reserve"
    }
   ]
  },
  {
   "group": "Accessibility",
   "checks": [
    {
     "check": "Body text contrast is at least 4.5:1, and the page still works at 200% zoom.",
     "pattern": "a11y"
    },
    {
     "check": "Real buttons, links and labels are used, and icon-only buttons have a name.",
     "pattern": "aria"
    },
    {
     "check": "Every control shows a clear focus ring when using the keyboard.",
     "pattern": "focus"
    },
    {
     "check": "Color is never the only signal; status also has text or an icon.",
     "pattern": "colorblind"
    }
   ]
  },
  {
   "group": "Motion",
   "checks": [
    {
     "check": "Animation calms down or stops when the system asks for reduced motion.",
     "pattern": "reducedmotion"
    },
    {
     "check": "Motion is short and eases out when things enter.",
     "pattern": "easing"
    },
    {
     "check": "Transitions show where content came from and went.",
     "pattern": "transitions"
    }
   ]
  }
 ],
 "compare": {
  "styles": [
   "Minimalism",
   "Glassmorphism",
   "Liquid Glass",
   "Neumorphism",
   "Neo-brutalism",
   "Brutalism",
   "Material",
   "Flat",
   "Skeuomorphism",
   "Claymorphism",
   "Dark UI",
   "Retro / Y2K"
  ],
  "screens": [
   {
    "id": "pricing",
    "label": "Pricing",
    "group": "mkt",
    "what": "A pricing card: plan name, monthly price, three included features and an Upgrade button."
   },
   {
    "id": "navbar",
    "label": "Landing",
    "group": "mkt",
    "what": "A landing page top: a navbar with logo, links and Sign up, then a hero with a headline, one line of copy, a primary Start free button and a secondary See demo button."
   },
   {
    "id": "product",
    "label": "Product card",
    "group": "mkt",
    "what": "A product card: image, name, price, a short detail line and an Add to cart button."
   },
   {
    "id": "paywall",
    "label": "Paywall",
    "group": "mkt",
    "what": "An honest upgrade screen: plan name, a headline, three benefits, the price after the free trial with \"Cancel anytime\", a Not now button and a Start free trial button. No fake timers or guilt wording."
   },
   {
    "id": "cookie",
    "label": "Cookie consent",
    "group": "mkt",
    "what": "A cookie consent panel: one line of why, Necessary (always on), switches for Analytics and Marketing (off by default), and Reject all and Accept all buttons of equal weight."
   },
   {
    "id": "stats",
    "label": "Dashboard",
    "group": "web",
    "what": "A dashboard: two stat tiles (revenue and orders, each with a short trend line), and a weekly sales bar chart with an Export button."
   },
   {
    "id": "inbox",
    "label": "Inbox",
    "group": "web",
    "what": "An inbox: a header with Compose, then message rows with initials avatar, sender, subject preview and time. Unread rows are bold with a dot (not colour alone), and one row is selected."
   },
   {
    "id": "editor",
    "label": "Editor",
    "group": "web",
    "what": "A document editor: a formatting toolbar (bold, italic, list, link, undo, each with an accessible name), a title, an editable text area, a word count with save status and a Publish button."
   },
   {
    "id": "table",
    "label": "Data table",
    "group": "web",
    "what": "A data table of invoices: number, customer, status written as text (Paid, Due, Overdue) and amount, with Previous and Next paging."
   },
   {
    "id": "settings",
    "label": "Settings",
    "group": "web",
    "what": "A settings panel: a heading, three labelled switches, and Cancel and Save buttons."
   },
   {
    "id": "dialog",
    "label": "Dialog",
    "group": "web",
    "what": "A confirm dialog over a dimmed page: a question naming the thing, one line on what happens, Cancel and Delete."
   },
   {
    "id": "chat",
    "label": "Chat",
    "group": "web",
    "what": "A chat: a header with the person and their status, message bubbles from both sides, and a message field with Send."
   },
   {
    "id": "signin",
    "label": "Sign in",
    "group": "app",
    "what": "A sign in form: email and password fields with labels, a Forgot password link and a Sign in button."
   },
   {
    "id": "social",
    "label": "Google / Apple sign in",
    "group": "app",
    "what": "A create account screen: Continue with Google and Continue with Apple buttons (text labels), an \"or\" divider, an email field and Continue with email."
   },
   {
    "id": "onboarding",
    "label": "Onboarding",
    "group": "app",
    "what": "An onboarding step: a picture area, \"Step 2 of 3\" in text, a title, one line of benefit, step dots, and Skip and Next."
   },
   {
    "id": "feed",
    "label": "Feed post",
    "group": "app",
    "what": "A social feed post: author avatar, name and time, a short caption, an image, and like, comment and share buttons with counts."
   },
   {
    "id": "search",
    "label": "Search",
    "group": "app",
    "what": "Search results: a search field with a Search button, filter toggles (pressed state visible), and result rows with name, price and a short detail."
   },
   {
    "id": "profile",
    "label": "Profile",
    "group": "app",
    "what": "A profile: large initials avatar, name and handle, three stats (orders, reviews, rating), and Edit profile and Share buttons."
   },
   {
    "id": "checkout",
    "label": "Checkout",
    "group": "app",
    "what": "A checkout summary: two line items with prices, delivery, the total, the payment method with Change, and a Pay button showing the amount."
   },
   {
    "id": "empty",
    "label": "Empty state",
    "group": "app",
    "what": "An empty state: a simple outline icon, \"No projects yet\", one line on what goes here, a Create project button and a secondary Import option."
   },
   {
    "id": "notify",
    "label": "Notification prompt",
    "group": "app",
    "what": "A notification permission prompt shown before the system one: an icon, the question, one honest line on what they will get, and Not now and Allow."
   }
  ]
 }
}
