{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "faq-category-deck",
  "type": "registry:component",
  "title": "FAQ Category Deck",
  "description": "A light FAQ with topic cards in a vertical tab list (icon, count and description) and a panel that wipes in from the top when you switch, with numbered questions rising into place. Arrow keys move between topics.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "faq",
    "faq",
    "tabs",
    "categories",
    "light",
    "accordion",
    "section"
  ],
  "docs": "https://hyperblur.dev/effects/faq-category-deck",
  "files": [
    {
      "path": "registry/hyperblur/faq-category-deck.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/faq-category-deck.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface FaqCategoryDeckCategory {\n  id: string;\n  label: string;\n  description: string;\n  icon?: \"rocket\" | \"card\" | \"shield\" | \"plug\" | \"people\" | \"box\";\n  items: { question: string; answer: string }[];\n}\n\nexport interface FaqCategoryDeckProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  eyebrow?: string;\n  title?: string;\n  subtitle?: string;\n  categories?: FaqCategoryDeckCategory[];\n  value?: string;\n  defaultValue?: string;\n  onValueChange?: (id: string) => void;\n  contact?: { label: string; href: string };\n  appearance?: \"light\" | \"dark\";\n  accent?: string;\n}\n\nconst css = `\n.hb-wc12 {\n  --hb-wc12-accent: #0f766e;\n  --hb-wc12-bg: #ffffff;\n  --hb-wc12-panel: #f6f6f3;\n  --hb-wc12-card: #ffffff;\n  --hb-wc12-ink: #121417;\n  --hb-wc12-muted: #636870;\n  --hb-wc12-line: rgba(18, 20, 23, .1);\n  container-type: inline-size;\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  background: var(--hb-wc12-bg);\n  color: var(--hb-wc12-ink);\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-wc12[data-appearance=\"dark\"] {\n  --hb-wc12-bg: #0a0a0a;\n  --hb-wc12-panel: #111111;\n  --hb-wc12-card: #171717;\n  --hb-wc12-ink: #ededed;\n  --hb-wc12-muted: #8f8f8f;\n  --hb-wc12-line: rgba(255, 255, 255, .09);\n}\n.hb-wc12 *, .hb-wc12 *::before, .hb-wc12 *::after { box-sizing: border-box; }\n.hb-wc12-inner { max-width: 1160px; margin: 0 auto; padding: 72px 20px; }\n.hb-wc12-head { display: grid; gap: 12px; margin-bottom: 36px; }\n.hb-wc12-eyebrow { margin: 0; color: var(--hb-wc12-accent); font-size: 13px; font-weight: 650; }\n.hb-wc12-title { margin: 0; max-width: 18ch; font-family: var(--font-grotesk), var(--font-sans), sans-serif; font-size: clamp(30px, 4.8cqi, 48px); font-weight: 600; line-height: 1.04; letter-spacing: -.035em; text-wrap: balance; }\n.hb-wc12-sub { margin: 0; max-width: 520px; color: var(--hb-wc12-muted); font-size: 15.5px; line-height: 1.6; }\n.hb-wc12-body { display: grid; gap: 18px; }\n.hb-wc12-tabs { display: flex; gap: 8px; margin: 0 -20px; padding: 2px 20px 6px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; }\n.hb-wc12-tabs::-webkit-scrollbar { display: none; }\n.hb-wc12-tab { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; flex: none; width: 230px; padding: 14px; border: 1px solid var(--hb-wc12-line); border-radius: 16px; background: var(--hb-wc12-card); color: var(--hb-wc12-ink); font: inherit; text-align: left; cursor: pointer; scroll-snap-align: start; overflow: hidden; transition: border-color .25s ease, box-shadow .3s ease, transform .3s cubic-bezier(.3, 1.4, .5, 1); }\n.hb-wc12-tab::before { content: \"\"; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--hb-wc12-accent); transform: scaleY(0); transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); }\n.hb-wc12-tab:hover { border-color: color-mix(in srgb, var(--hb-wc12-accent) 30%, var(--hb-wc12-line)); }\n.hb-wc12-tab[aria-selected=\"true\"] { border-color: color-mix(in srgb, var(--hb-wc12-accent) 55%, transparent); box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 14px 30px -18px color-mix(in srgb, var(--hb-wc12-accent) 70%, transparent); }\n.hb-wc12-tab[aria-selected=\"true\"]::before { transform: scaleY(1); }\n.hb-wc12-tab:focus-visible, .hb-wc12-q:focus-visible, .hb-wc12-cta:focus-visible { outline: 2px solid var(--hb-wc12-accent); outline-offset: 2px; }\n.hb-wc12-ic { grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--hb-wc12-panel); color: var(--hb-wc12-muted); transition: background .3s ease, color .3s ease, transform .4s cubic-bezier(.3, 1.6, .5, 1); }\n.hb-wc12-ic svg { width: 19px; height: 19px; }\n.hb-wc12-tab[aria-selected=\"true\"] .hb-wc12-ic { background: var(--hb-wc12-accent); color: #fff; transform: rotate(-8deg); }\n.hb-wc12-tl { font-size: 15px; font-weight: 620; letter-spacing: -.01em; }\n.hb-wc12-td { grid-column: 2 / 4; color: var(--hb-wc12-muted); font-size: 12.5px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.hb-wc12-tc { display: grid; place-items: center; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--hb-wc12-panel); color: var(--hb-wc12-muted); font-size: 11.5px; font-weight: 650; font-variant-numeric: tabular-nums; }\n.hb-wc12-tab[aria-selected=\"true\"] .hb-wc12-tc { background: color-mix(in srgb, var(--hb-wc12-accent) 14%, transparent); color: var(--hb-wc12-accent); }\n.hb-wc12-panel { position: relative; padding: 22px 18px; border-radius: 22px; background: var(--hb-wc12-panel); overflow: hidden; }\n.hb-wc12-sheet { animation: hb-wc12-wipe .6s cubic-bezier(.7, 0, .2, 1) both; }\n.hb-wc12-ph { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 14px; }\n.hb-wc12-ph h3 { margin: 0; font-size: 20px; font-weight: 620; letter-spacing: -.02em; }\n.hb-wc12-ph span { color: var(--hb-wc12-muted); font-size: 13px; }\n.hb-wc12-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }\n.hb-wc12-item { border: 1px solid var(--hb-wc12-line); border-radius: 14px; background: var(--hb-wc12-card); box-shadow: 0 1px 2px rgba(16, 24, 40, .04); animation: hb-wc12-rise .5s cubic-bezier(.2, .9, .3, 1) both; animation-delay: calc(.18s + var(--hb-wc12-i) * 60ms); transition: box-shadow .3s ease; }\n.hb-wc12-item[data-open=\"true\"] { box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 12px 28px -18px rgba(16, 24, 40, .3); }\n.hb-wc12-q { display: flex; align-items: center; gap: 14px; width: 100%; padding: 15px 16px; border: 0; border-radius: 14px; background: none; color: var(--hb-wc12-ink); font: inherit; font-size: 15px; font-weight: 580; text-align: left; cursor: pointer; }\n.hb-wc12-n { flex: none; color: var(--hb-wc12-muted); font-family: var(--font-mono), monospace; font-size: 12px; font-weight: 500; transition: color .25s ease; }\n.hb-wc12-item[data-open=\"true\"] .hb-wc12-n { color: var(--hb-wc12-accent); }\n.hb-wc12-qt { flex: 1; min-width: 0; }\n.hb-wc12-chev { flex: none; width: 16px; height: 16px; color: var(--hb-wc12-muted); transition: transform .45s cubic-bezier(.3, 1.4, .5, 1), color .25s ease; }\n.hb-wc12-item[data-open=\"true\"] .hb-wc12-chev { transform: rotate(180deg); color: var(--hb-wc12-accent); }\n.hb-wc12-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s cubic-bezier(.2, .8, .2, 1); }\n.hb-wc12-item[data-open=\"true\"] .hb-wc12-wrap { grid-template-rows: 1fr; }\n.hb-wc12-wrap > div { min-height: 0; overflow: hidden; }\n.hb-wc12-a { margin: 0; padding: 0 18px 18px 44px; color: var(--hb-wc12-muted); font-size: 14.5px; line-height: 1.65; }\n.hb-wc12-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 14px 16px; border: 1px dashed var(--hb-wc12-line); border-radius: 14px; color: var(--hb-wc12-muted); font-size: 14px; }\n.hb-wc12-cta { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 10px; background: var(--hb-wc12-ink); color: var(--hb-wc12-bg); font-size: 13.5px; font-weight: 600; text-decoration: none; transition: transform .2s ease; }\n.hb-wc12-cta:hover { transform: translateY(-1px); }\n.hb-wc12-cta svg { width: 13px; height: 13px; }\n@keyframes hb-wc12-wipe { from { clip-path: inset(0 0 100% 0 round 18px); opacity: .4; } to { clip-path: inset(0 0 0 0 round 0); opacity: 1; } }\n@keyframes hb-wc12-rise { from { opacity: 0; transform: translateY(10px); } }\n@container (min-width: 820px) {\n  .hb-wc12-inner { padding: 104px 40px; }\n  .hb-wc12-head { grid-template-columns: minmax(0, 1fr) minmax(0, 420px); align-items: end; gap: 40px; }\n  .hb-wc12-body { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 24px; align-items: start; }\n  .hb-wc12-tabs { flex-direction: column; margin: 0; padding: 0; overflow: visible; }\n  .hb-wc12-tab { width: 100%; }\n  .hb-wc12-tab:not([aria-selected=\"true\"]):hover { transform: translateX(4px); }\n  .hb-wc12-panel { padding: 28px; min-height: 100%; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-wc12 *, .hb-wc12 *::before, .hb-wc12 *::after { animation: none !important; transition: none !important; }\n}\n`;\n\nconst iconPaths: Record<NonNullable<FaqCategoryDeckCategory[\"icon\"]>, string> = {\n  rocket: \"M10 2c3 1.5 5 4.5 5 8l-2.5 2.5h-5L5 10c0-3.5 2-6.5 5-8zM10 7.5a1.5 1.5 0 100 3 1.5 1.5 0 000-3zM7.5 12.5L6 17l2.5-1.5M12.5 12.5L14 17l-2.5-1.5\",\n  card: \"M2.5 5h15v10h-15zM2.5 8h15M5.5 12h3\",\n  shield: \"M10 2l6 2.5v5c0 3.8-2.6 6.5-6 7.5-3.4-1-6-3.7-6-7.5v-5zM7.3 9.8l1.9 1.9 3.6-3.7\",\n  plug: \"M7.5 2.5v4M12.5 2.5v4M5 6.5h10v3a5 5 0 01-10 0zM10 14.5v3\",\n  people: \"M7.5 9a3 3 0 100-6 3 3 0 000 6zM2 17c0-3 2.5-5 5.5-5s5.5 2 5.5 5M13.5 3.3a3 3 0 010 5.4M15.5 12.4c1.6.7 2.5 2.4 2.5 4.6\",\n  box: \"M10 2l7 3.5v9L10 18l-7-3.5v-9zM3 5.5L10 9l7-3.5M10 9v9\",\n};\n\nconst defaultCategories: FaqCategoryDeckCategory[] = [\n  {\n    id: \"start\",\n    label: \"Getting started\",\n    description: \"Setup, imports and your first week\",\n    icon: \"rocket\",\n    items: [\n      { question: \"How do I set up my first storefront?\", answer: \"Pick a theme, add three products and connect a payment method. The setup checklist on your dashboard walks through each step and usually takes about twenty minutes.\" },\n      { question: \"Can I move my products from another platform?\", answer: \"Upload a CSV or connect your old store and we import products, variants, images and inventory counts. Customer accounts can be imported too, with their consent.\" },\n      { question: \"Do I need my own domain?\", answer: \"No. Every shop starts on a free subdomain. When you are ready, connect a domain you own or buy one in Settings, Domains for 14 dollars a year.\" },\n    ],\n  },\n  {\n    id: \"billing\",\n    label: \"Billing and plans\",\n    description: \"Invoices, fees and upgrades\",\n    icon: \"card\",\n    items: [\n      { question: \"What are the transaction fees?\", answer: \"Basic charges 2.4 percent plus 30 cents per online sale. Growth lowers that to 1.9 percent, and Scale to 1.5 percent with no monthly minimum.\" },\n      { question: \"Can I pause my plan for a season?\", answer: \"Yes. Pausing keeps your store and data for 9 dollars a month while checkout is turned off. Resume any time and your theme and products are exactly as you left them.\" },\n      { question: \"Where do I download invoices?\", answer: \"All invoices live under Settings, Billing and can be emailed to your accountant automatically each month.\" },\n      { question: \"Do you offer refunds on annual plans?\", answer: \"Annual plans can be refunded in full within 30 days of purchase, and pro rata after that if you downgrade.\" },\n    ],\n  },\n  {\n    id: \"shipping\",\n    label: \"Orders and shipping\",\n    description: \"Labels, carriers and returns\",\n    icon: \"box\",\n    items: [\n      { question: \"Which carriers can I print labels for?\", answer: \"Discounted labels are available for five national carriers, and you can add your own carrier account for any other provider.\" },\n      { question: \"How do returns work for my customers?\", answer: \"Customers start a return from their order page. You approve it, a prepaid label is emailed, and the refund is issued once the parcel is scanned.\" },\n    ],\n  },\n  {\n    id: \"security\",\n    label: \"Security\",\n    description: \"Payments, fraud and access\",\n    icon: \"shield\",\n    items: [\n      { question: \"Is checkout PCI compliant?\", answer: \"Yes. Card details never touch your store. Checkout is certified PCI DSS Level 1 and every payment uses 3-D Secure where the bank supports it.\" },\n      { question: \"How do I protect my shop from fraud?\", answer: \"Every order is scored for risk. High-risk orders are held for review, and you can set rules to cancel or flag orders automatically.\" },\n      { question: \"Can staff have limited access?\", answer: \"Create staff accounts with granular permissions, so a packer can see orders without seeing revenue or payouts.\" },\n    ],\n  },\n];\n\nexport function FaqCategoryDeck({\n  eyebrow = \"Support\",\n  title = \"Find the answer by topic.\",\n  subtitle = \"Pick a topic on the left. Each one keeps the questions our merchants ask most, updated every month by the support team.\",\n  categories = defaultCategories,\n  value,\n  defaultValue,\n  onValueChange,\n  contact = { label: \"Open a ticket\", href: \"#\" },\n  appearance = \"light\",\n  accent = \"#0f766e\",\n  className = \"\",\n  style,\n  ...rest\n}: FaqCategoryDeckProps) {\n  const [inner, setInner] = React.useState(defaultValue ?? categories[0]?.id ?? \"\");\n  const current = value ?? inner;\n  const cat = categories.find((c) => c.id === current) ?? categories[0];\n  const [open, setOpen] = React.useState<Record<string, number | null>>({});\n  const tabs = React.useRef<(HTMLButtonElement | null)[]>([]);\n  const id = React.useId();\n\n  const pick = (cid: string) => {\n    if (value === undefined) setInner(cid);\n    onValueChange?.(cid);\n  };\n\n  const key = (e: React.KeyboardEvent, i: number) => {\n    const n = categories.length;\n    let next = i;\n    if (e.key === \"ArrowDown\" || e.key === \"ArrowRight\") next = (i + 1) % n;\n    else if (e.key === \"ArrowUp\" || e.key === \"ArrowLeft\") next = (i - 1 + n) % n;\n    else if (e.key === \"Home\") next = 0;\n    else if (e.key === \"End\") next = n - 1;\n    else return;\n    e.preventDefault();\n    pick(categories[next].id);\n    tabs.current[next]?.focus();\n  };\n\n  if (!cat) return null;\n  const openIndex = open[cat.id] === undefined ? 0 : open[cat.id];\n  const vars = { \"--hb-wc12-accent\": accent, ...style } as React.CSSProperties;\n\n  return (\n    <section className={`hb-wc12 ${className}`} style={vars} data-appearance={appearance} {...rest}>\n      <style href=\"hb-faq-category-deck\" precedence=\"default\">{css}</style>\n      <div className=\"hb-wc12-inner\">\n        <div className=\"hb-wc12-head\">\n          <div>\n            {eyebrow ? <p className=\"hb-wc12-eyebrow\">{eyebrow}</p> : null}\n            <h2 className=\"hb-wc12-title\">{title}</h2>\n          </div>\n          {subtitle ? <p className=\"hb-wc12-sub\">{subtitle}</p> : null}\n        </div>\n        <div className=\"hb-wc12-body\">\n          <div className=\"hb-wc12-tabs\" role=\"tablist\" aria-label=\"FAQ topics\" aria-orientation=\"vertical\">\n            {categories.map((c, i) => (\n              <button\n                key={c.id}\n                ref={(el) => {\n                  tabs.current[i] = el;\n                }}\n                type=\"button\"\n                role=\"tab\"\n                id={`${id}-t${c.id}`}\n                className=\"hb-wc12-tab\"\n                aria-selected={c.id === cat.id}\n                aria-controls={`${id}-p`}\n                tabIndex={c.id === cat.id ? 0 : -1}\n                onClick={() => pick(c.id)}\n                onKeyDown={(e) => key(e, i)}\n              >\n                <span className=\"hb-wc12-ic\" aria-hidden=\"true\">\n                  <svg viewBox=\"0 0 20 20\">\n                    <path d={iconPaths[c.icon ?? \"box\"]} fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n                  </svg>\n                </span>\n                <span className=\"hb-wc12-tl\">{c.label}</span>\n                <span className=\"hb-wc12-tc\">{c.items.length}</span>\n                <span className=\"hb-wc12-td\">{c.description}</span>\n              </button>\n            ))}\n          </div>\n          <div className=\"hb-wc12-panel\" role=\"tabpanel\" id={`${id}-p`} aria-labelledby={`${id}-t${cat.id}`}>\n            <div key={cat.id} className=\"hb-wc12-sheet\">\n              <div className=\"hb-wc12-ph\">\n                <h3>{cat.label}</h3>\n                <span>\n                  {cat.items.length} {cat.items.length === 1 ? \"question\" : \"questions\"}\n                </span>\n              </div>\n              <ul className=\"hb-wc12-list\">\n                {cat.items.map((it, i) => {\n                  const isOpen = openIndex === i;\n                  return (\n                    <li key={it.question} className=\"hb-wc12-item\" data-open={isOpen ? \"true\" : \"false\"} style={{ \"--hb-wc12-i\": i } as React.CSSProperties}>\n                      <button\n                        type=\"button\"\n                        className=\"hb-wc12-q\"\n                        aria-expanded={isOpen}\n                        aria-controls={`${id}-a${cat.id}${i}`}\n                        onClick={() => setOpen((o) => ({ ...o, [cat.id]: isOpen ? null : i }))}\n                      >\n                        <span className=\"hb-wc12-n\">{String(i + 1).padStart(2, \"0\")}</span>\n                        <span className=\"hb-wc12-qt\">{it.question}</span>\n                        <svg className=\"hb-wc12-chev\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n                          <path d=\"M4 6l4 4 4-4\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.6\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n                        </svg>\n                      </button>\n                      <div className=\"hb-wc12-wrap\" id={`${id}-a${cat.id}${i}`}>\n                        <div>\n                          <p className=\"hb-wc12-a\">{it.answer}</p>\n                        </div>\n                      </div>\n                    </li>\n                  );\n                })}\n              </ul>\n              {contact ? (\n                <div className=\"hb-wc12-foot\">\n                  <span>Did not find it in {cat.label.toLowerCase()}?</span>\n                  <a className=\"hb-wc12-cta\" href={contact.href}>\n                    {contact.label}\n                    <svg viewBox=\"0 0 14 14\" aria-hidden=\"true\">\n                      <path d=\"M2.5 7h8.5M7.5 3.5L11 7l-3.5 3.5\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.6\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n                    </svg>\n                  </a>\n                </div>\n              ) : null}\n            </div>\n          </div>\n        </div>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}