{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "ab-test-variant-results",
  "title": "Ab Test Variant Results",
  "type": "registry:block",
  "files": [
    {
      "path": "packages/registry-react/blocks/ab-test-variant-results/AbTestVariantResults.tsx",
      "content": "'use client'\n\nimport * as React from 'react'\nimport {\n  Activity,\n  CheckCheck,\n  CheckCircle2,\n  Clock,\n  CreditCard,\n  DollarSign,\n  Pause,\n  Play,\n  ShieldCheck,\n  ShoppingCart,\n  TrendingUp,\n  Trophy,\n  Truck,\n  Users,\n  Zap,\n} from 'lucide-react'\nimport { cn } from '@/lib/utils'\nimport { Badge } from '@/components/ui/badge'\nimport { Button } from '@/components/ui/button'\nimport { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'\nimport { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/components/ui/table'\n\nexport interface AbTestVariantResultsProps {\n  title?: string\n  experimentId?: string\n  duration?: string\n  className?: string\n}\n\nconst primaryMetrics = [\n  {\n    id: 'conversion-lift',\n    label: 'Overall Conversion Lift',\n    value: '+24.8%',\n    unit: 'relative',\n    badge: '+1.27% Absolute',\n    badgeVariant: 'success' as const,\n    badgeIcon: TrendingUp,\n    description: 'Challenger (6.41%) vs Baseline Control (5.14%)',\n    highlight: true,\n  },\n  {\n    id: 'sample-size',\n    label: 'Total Sample Size',\n    value: '48,290',\n    unit: 'unique visitors',\n    badge: '50 / 50 Split',\n    badgeVariant: 'secondary' as const,\n    badgeIcon: Users,\n    description: '24,145 unique visitors per variant group',\n    highlight: false,\n  },\n  {\n    id: 'statistical-confidence',\n    label: 'Statistical Confidence',\n    value: '99.2%',\n    unit: 'confidence',\n    badge: 'p = 0.008',\n    badgeVariant: 'outline' as const,\n    badgeIcon: Activity,\n    description: 'Exceeds 95.0% significance threshold (α = 0.05)',\n    highlight: false,\n  },\n  {\n    id: 'revenue-impact',\n    label: 'Est. Annual Revenue Impact',\n    value: '+$142,000',\n    unit: 'ARR',\n    badge: '+$1.08 / visitor',\n    badgeVariant: 'success' as const,\n    badgeIcon: DollarSign,\n    description: 'Based on 131,500 annual checkouts ($5.28 vs $4.20 RPV)',\n    highlight: true,\n  },\n]\n\nconst variants = [\n  {\n    id: 'variant-a',\n    code: 'Variant A',\n    type: 'Control',\n    title: 'Multi-Step Wizard',\n    description: '3-step segmented checkout flow with separate shipping, billing, and review steps.',\n    split: '50%',\n    visitors: '24,145',\n    conversions: '1,240',\n    conversionLabel: '1,240 checkouts',\n    conversionRate: '5.14%',\n    rateBadge: 'Baseline',\n    rateBadgeVariant: 'secondary' as const,\n    revenuePerVisitor: '$4.20',\n    totalRevenue: '$101,409.00',\n    verdict: 'Baseline Control Group',\n    verdictVariant: 'outline' as const,\n    isWinner: false,\n  },\n  {\n    id: 'variant-b',\n    code: 'Variant B',\n    type: 'Challenger',\n    title: 'Single-Page with Accordion',\n    description: 'Unified single-page layout with collapsible accordion sections and sticky order summary.',\n    split: '50%',\n    visitors: '24,145',\n    conversions: '1,548',\n    conversionLabel: '1,548 checkouts (+308)',\n    conversionRate: '6.41%',\n    rateBadge: '+24.8% relative lift',\n    rateBadgeVariant: 'success' as const,\n    revenuePerVisitor: '$5.28',\n    revenueDelta: '+$1.08 / visitor',\n    totalRevenue: '$127,485.60',\n    verdict: 'Winner · 99.2% probability to beat control',\n    verdictVariant: 'success' as const,\n    isWinner: true,\n  },\n]\n\nconst funnelSteps = [\n  {\n    id: 'step-1',\n    stepNumber: '01',\n    name: 'Cart Review',\n    description: 'Initial checkout landing and cart items validation',\n    icon: ShoppingCart,\n    control: {\n      count: '24,145',\n      rate: '100.0%',\n      progress: 100,\n      retention: '100% of traffic',\n    },\n    challenger: {\n      count: '24,145',\n      rate: '100.0%',\n      progress: 100,\n      retention: '100% of traffic',\n    },\n    delta: '0.0%',\n    isPositive: null,\n    insight: 'Uniform 50/50 randomized traffic partition without sample ratio bias.',\n  },\n  {\n    id: 'step-2',\n    stepNumber: '02',\n    name: 'Shipping Address',\n    description: 'Delivery destination selection & shipping method',\n    icon: Truck,\n    control: {\n      count: '18,350',\n      rate: '76.0%',\n      progress: 76,\n      retention: '76.0% retained',\n    },\n    challenger: {\n      count: '20,523',\n      rate: '85.0%',\n      progress: 85,\n      retention: '85.0% retained',\n    },\n    delta: '+11.8% stage lift',\n    isPositive: true,\n    insight: 'Auto-fill and inline address validation lowered initial drop-off by 9.0 percentage points.',\n  },\n  {\n    id: 'step-3',\n    stepNumber: '03',\n    name: 'Payment Details',\n    description: 'Credit card input, digital wallet, or invoice terms',\n    icon: CreditCard,\n    control: {\n      count: '8,450',\n      rate: '35.0%',\n      progress: 35,\n      retention: '46.0% retained',\n    },\n    challenger: {\n      count: '11,831',\n      rate: '49.0%',\n      progress: 49,\n      retention: '57.6% retained',\n    },\n    delta: '+40.0% stage lift',\n    isPositive: true,\n    insight: 'Accordion structure preserved visible cart totals, reducing payment abandonment substantially.',\n  },\n  {\n    id: 'step-4',\n    stepNumber: '04',\n    name: 'Checkout Completed',\n    description: 'Payment authorized & order confirmation rendered',\n    icon: CheckCheck,\n    control: {\n      count: '1,240',\n      rate: '5.14%',\n      progress: 5.14,\n      retention: '14.7% of payment step',\n    },\n    challenger: {\n      count: '1,548',\n      rate: '6.41%',\n      progress: 6.41,\n      retention: '13.1% of payment step',\n    },\n    delta: '+24.8% final lift',\n    isPositive: true,\n    insight: 'Yielded 308 net incremental checkouts with statistical significance (p = 0.008).',\n  },\n]\n\nconst guardrails = [\n  {\n    id: 'srm',\n    title: 'Sample Ratio Mismatch (SRM)',\n    status: 'Passed',\n    badgeVariant: 'success' as const,\n    value: 'p = 0.982',\n    description: 'Chi-square goodness of fit verifies balanced 50.0% / 50.0% traffic delivery.',\n    icon: ShieldCheck,\n  },\n  {\n    id: 'mde',\n    title: 'Minimum Detectable Effect',\n    status: 'Achieved',\n    badgeVariant: 'success' as const,\n    value: 'Observed +24.8% vs MDE 5.0%',\n    description: 'Statistical power exceeds 99% for primary conversion rate metric.',\n    icon: Zap,\n  },\n  {\n    id: 'perf',\n    title: 'Performance Guardrail',\n    status: 'Healthy',\n    badgeVariant: 'secondary' as const,\n    value: '1.1s vs 1.3s LCP',\n    description: 'Single-page architecture improved largest contentful paint by 180ms.',\n    icon: Clock,\n  },\n]\n\nexport function AbTestVariantResults({\n  title = 'Checkout Flow: Multi-Step vs Single-Page',\n  experimentId = 'EXP-1082',\n  duration = 'Running for 14 days · 48,290 visitors',\n  className,\n}: AbTestVariantResultsProps) {\n  const [isPaused, setIsPaused] = React.useState(false)\n  const [isWinnerDeclared, setIsWinnerDeclared] = React.useState(false)\n\n  const handleDeclareWinner = () => {\n    setIsWinnerDeclared(true)\n    setIsPaused(true)\n  }\n\n  const togglePause = () => {\n    setIsPaused((prev) => !prev)\n  }\n\n  return (\n    <div data-uipkge=\"\" data-slot=\"ab-test-variant-results\" className={cn('w-full space-y-6', className)}>\n      {/* Winner Rollout Banner (if declared) */}\n      {isWinnerDeclared && (\n        <div className=\"border-success/30 bg-success/10 text-foreground dark:text-foreground flex flex-col items-start justify-between gap-3 rounded-lg border p-4 shadow-xs sm:flex-row sm:items-center\">\n          <div className=\"flex items-center gap-3\">\n            <div className=\"bg-success flex size-9 shrink-0 items-center justify-center rounded-md text-white shadow-xs\">\n              <Trophy className=\"size-4\" aria-hidden=\"true\" />\n            </div>\n            <div className=\"space-y-0.5\">\n              <p className=\"text-foreground text-sm font-semibold\">Variant B (Single-Page Accordion) Declared Winner</p>\n              <p className=\"text-muted-foreground text-xs\">\n                100% traffic rollout initiated. Estimated annual revenue increase of +$142,000 ARR in effect.\n              </p>\n            </div>\n          </div>\n          <Badge variant=\"success\" className=\"font-semibold\">\n            100% Traffic Live\n          </Badge>\n        </div>\n      )}\n\n      {/* Header Section */}\n      <div className=\"flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between\">\n        <div className=\"space-y-1.5\">\n          <div className=\"flex flex-wrap items-center gap-2.5\">\n            <h2 className=\"text-foreground text-xl font-bold tracking-tight sm:text-2xl\">{title}</h2>\n            <Badge variant=\"outline\" className=\"font-mono text-xs\">\n              {experimentId}\n            </Badge>\n            <Badge variant=\"success\" className=\"border-success/20 bg-success/10 text-success gap-1.5 font-medium\">\n              <CheckCircle2 className=\"size-3\" aria-hidden=\"true\" />\n              <span>Statistically Significant · 99.2% Confidence</span>\n            </Badge>\n            {isPaused && (\n              <Badge variant=\"secondary\" className=\"gap-1 font-medium\">\n                <Pause className=\"size-3\" aria-hidden=\"true\" />\n                <span>Paused</span>\n              </Badge>\n            )}\n          </div>\n          <p className=\"text-muted-foreground text-xs leading-relaxed sm:text-sm\">\n            {duration} · Primary Goal: <span className=\"text-foreground font-medium\">Completed Checkout Rate</span>\n          </p>\n        </div>\n\n        {/* Action Buttons */}\n        <div className=\"flex flex-wrap items-center gap-2.5\">\n          <Button size=\"sm\" variant=\"outline\" className=\"gap-1.5 shadow-xs\" onClick={togglePause}>\n            {isPaused ? (\n              <Play className=\"size-3.5\" aria-hidden=\"true\" />\n            ) : (\n              <Pause className=\"size-3.5\" aria-hidden=\"true\" />\n            )}\n            <span>{isPaused ? 'Resume Test' : 'Pause Test'}</span>\n          </Button>\n          <Button\n            size=\"sm\"\n            variant=\"default\"\n            disabled={isWinnerDeclared}\n            className=\"gap-1.5 shadow-xs\"\n            onClick={handleDeclareWinner}\n          >\n            <Trophy className=\"size-3.5\" aria-hidden=\"true\" />\n            <span>{isWinnerDeclared ? 'Winner Rolled Out 100%' : 'Declare Winner & Roll Out 100%'}</span>\n          </Button>\n        </div>\n      </div>\n\n      {/* 4 Primary Experiment Metrics Cards */}\n      <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4\">\n        {primaryMetrics.map((metric) => {\n          const BadgeIcon = metric.badgeIcon\n          return (\n            <Card\n              key={metric.id}\n              className={cn(\n                'border-border bg-card hover:border-border/80 shadow-xs transition-colors',\n                metric.highlight && 'border-success/30 bg-success/[0.02] dark:bg-success/10]',\n              )}\n            >\n              <CardHeader className=\"pb-2\">\n                <div className=\"flex items-center justify-between gap-2\">\n                  <CardTitle className=\"text-muted-foreground text-xs font-medium tracking-wider uppercase\">\n                    {metric.label}\n                  </CardTitle>\n                  <Badge variant={metric.badgeVariant} className=\"gap-1 font-medium tabular-nums\">\n                    <BadgeIcon className=\"size-3\" aria-hidden=\"true\" />\n                    <span>{metric.badge}</span>\n                  </Badge>\n                </div>\n              </CardHeader>\n              <CardContent className=\"space-y-1.5 pb-4\">\n                <div className=\"flex items-baseline gap-1.5\">\n                  <span\n                    className={cn(\n                      'text-2xl font-bold tracking-tight tabular-nums sm:text-3xl',\n                      metric.highlight ? 'text-success' : 'text-foreground',\n                    )}\n                  >\n                    {metric.value}\n                  </span>\n                  {metric.unit && <span className=\"text-muted-foreground text-xs font-normal\">{metric.unit}</span>}\n                </div>\n                <p className=\"text-muted-foreground text-xs leading-relaxed\">{metric.description}</p>\n              </CardContent>\n            </Card>\n          )\n        })}\n      </div>\n\n      {/* Variants Comparison Table Card */}\n      <Card className=\"border-border bg-card shadow-xs\">\n        <CardHeader className=\"pb-3\">\n          <div className=\"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between\">\n            <div>\n              <div className=\"flex items-center gap-2\">\n                <CardTitle className=\"text-foreground text-base font-semibold\">\n                  Variants Comparison &amp; Statistical Significance\n                </CardTitle>\n                <Badge variant=\"outline\" className=\"font-mono text-xs\">\n                  Statsig / Optimizely Model\n                </Badge>\n              </div>\n              <CardDescription className=\"mt-1 text-xs\">\n                Frequentist two-tailed Z-test with continuous monitoring and sample ratio correction.\n              </CardDescription>\n            </div>\n            <div className=\"border-border/80 bg-muted/30 flex items-center gap-2 self-start rounded-lg border px-3 py-1.5 text-xs sm:self-auto\">\n              <span className=\"text-muted-foreground\">Significance Alpha:</span>\n              <span className=\"text-foreground font-mono font-semibold tabular-nums\">α = 0.05</span>\n            </div>\n          </div>\n        </CardHeader>\n        <CardContent className=\"p-0\">\n          <div className=\"overflow-x-auto\">\n            <Table>\n              <TableHeader className=\"bg-muted/40\">\n                <TableRow className=\"border-border hover:bg-transparent\">\n                  <TableHead className=\"text-foreground text-xs font-semibold\">Variant &amp; Layout</TableHead>\n                  <TableHead className=\"text-foreground text-xs font-semibold\">Traffic Split</TableHead>\n                  <TableHead className=\"text-foreground text-right text-xs font-semibold\">Conversions</TableHead>\n                  <TableHead className=\"text-foreground text-right text-xs font-semibold\">Conversion Rate</TableHead>\n                  <TableHead className=\"text-foreground text-right text-xs font-semibold\">Revenue / Visitor</TableHead>\n                  <TableHead className=\"text-foreground text-right text-xs font-semibold\">\n                    Statistical Verdict\n                  </TableHead>\n                </TableRow>\n              </TableHeader>\n              <TableBody>\n                {variants.map((variant) => (\n                  <TableRow\n                    key={variant.id}\n                    className={cn(\n                      'border-border transition-colors',\n                      variant.isWinner\n                        ? 'bg-success/[0.04] hover:bg-success/[0.08] bg-success/[0.07]'\n                        : 'hover:bg-muted/30',\n                    )}\n                  >\n                    {/* Variant Name & Description */}\n                    <TableCell className=\"py-4\">\n                      <div className=\"flex items-start gap-2.5\">\n                        <div\n                          className={cn(\n                            'flex size-7 shrink-0 items-center justify-center rounded-md text-xs font-bold shadow-xs',\n                            variant.isWinner\n                              ? 'bg-success text-white'\n                              : 'border-border bg-muted text-muted-foreground border',\n                          )}\n                        >\n                          {variant.code === 'Variant A' ? 'A' : 'B'}\n                        </div>\n                        <div className=\"space-y-0.5\">\n                          <div className=\"flex items-center gap-1.5\">\n                            <span className=\"text-foreground text-sm font-semibold\">{variant.code}</span>\n                            <Badge variant={variant.isWinner ? 'success' : 'secondary'} className=\"text-xs font-medium\">\n                              {variant.type}\n                            </Badge>\n                          </div>\n                          <p className=\"text-foreground text-xs font-medium\">{variant.title}</p>\n                          <p className=\"text-muted-foreground text-xs\">{variant.description}</p>\n                        </div>\n                      </div>\n                    </TableCell>\n\n                    {/* Traffic Split */}\n                    <TableCell className=\"py-4 align-middle\">\n                      <div className=\"space-y-1\">\n                        <div className=\"flex items-center gap-1.5\">\n                          <span className=\"text-foreground text-sm font-semibold tabular-nums\">{variant.split}</span>\n                          <span className=\"text-muted-foreground text-xs\">allocation</span>\n                        </div>\n                        <p className=\"text-muted-foreground text-xs tabular-nums\">{variant.visitors} visitors</p>\n                      </div>\n                    </TableCell>\n\n                    {/* Conversions */}\n                    <TableCell className=\"py-4 text-right align-middle\">\n                      <div className=\"space-y-0.5\">\n                        <span className=\"text-foreground text-sm font-bold tabular-nums\">{variant.conversions}</span>\n                        <p className=\"text-muted-foreground text-xs\">completed checkouts</p>\n                      </div>\n                    </TableCell>\n\n                    {/* Conversion Rate */}\n                    <TableCell className=\"py-4 text-right align-middle\">\n                      <div className=\"flex flex-col items-end gap-1\">\n                        <span\n                          className={cn(\n                            'text-sm font-bold tabular-nums',\n                            variant.isWinner ? 'text-success text-base' : 'text-foreground',\n                          )}\n                        >\n                          {variant.conversionRate}\n                        </span>\n                        <Badge variant={variant.rateBadgeVariant} className=\"gap-1 text-xs font-medium tabular-nums\">\n                          {variant.isWinner && <TrendingUp className=\"size-3\" aria-hidden=\"true\" />}\n                          <span>{variant.rateBadge}</span>\n                        </Badge>\n                      </div>\n                    </TableCell>\n\n                    {/* Revenue per Visitor */}\n                    <TableCell className=\"py-4 text-right align-middle\">\n                      <div className=\"space-y-0.5\">\n                        <span\n                          className={cn(\n                            'text-sm font-bold tabular-nums',\n                            variant.isWinner ? 'text-success' : 'text-foreground',\n                          )}\n                        >\n                          {variant.revenuePerVisitor}\n                        </span>\n                        {variant.revenueDelta ? (\n                          <p className=\"text-success text-success text-xs font-semibold tabular-nums\">\n                            {variant.revenueDelta}\n                          </p>\n                        ) : (\n                          <p className=\"text-muted-foreground text-xs tabular-nums\">{variant.totalRevenue}</p>\n                        )}\n                      </div>\n                    </TableCell>\n\n                    {/* Statistical Verdict */}\n                    <TableCell className=\"py-4 text-right align-middle\">\n                      <div className=\"flex flex-col items-end gap-1\">\n                        <Badge\n                          variant={variant.verdictVariant}\n                          className={cn(\n                            'gap-1.5 py-1 text-xs font-semibold tabular-nums',\n                            variant.isWinner && 'border-success/30 bg-success/15 text-success',\n                          )}\n                        >\n                          {variant.isWinner ? (\n                            <Trophy className=\"text-success size-3.5\" aria-hidden=\"true\" />\n                          ) : (\n                            <CheckCircle2 className=\"text-muted-foreground size-3.5\" aria-hidden=\"true\" />\n                          )}\n                          <span>{variant.verdict}</span>\n                        </Badge>\n                      </div>\n                    </TableCell>\n                  </TableRow>\n                ))}\n              </TableBody>\n            </Table>\n          </div>\n        </CardContent>\n      </Card>\n\n      {/* Conversion Funnel Step Drop-off Comparison Card */}\n      <Card className=\"border-border bg-card shadow-xs\">\n        <CardHeader className=\"pb-4\">\n          <div className=\"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between\">\n            <div>\n              <div className=\"flex items-center gap-2\">\n                <CardTitle className=\"text-foreground text-base font-semibold\">\n                  Conversion Funnel Step Drop-off Comparison\n                </CardTitle>\n                <Badge variant=\"secondary\" className=\"text-xs\">\n                  4-Stage Funnel\n                </Badge>\n              </div>\n              <CardDescription className=\"mt-1 text-xs\">\n                Direct comparison of drop-off, progression, and conversion retention between Control and Challenger at\n                each step.\n              </CardDescription>\n            </div>\n\n            {/* Legend */}\n            <div className=\"flex flex-wrap items-center gap-4 text-xs\">\n              <div className=\"flex items-center gap-1.5\">\n                <span className=\"border-border bg-muted-foreground/30 size-3 rounded-xs border\" />\n                <span className=\"text-muted-foreground\">Variant A (Control)</span>\n              </div>\n              <div className=\"flex items-center gap-1.5\">\n                <span className=\"bg-success size-3 rounded-xs\" />\n                <span className=\"text-foreground font-medium\">Variant B (Challenger)</span>\n              </div>\n            </div>\n          </div>\n        </CardHeader>\n\n        <CardContent className=\"space-y-6\">\n          <div className=\"grid grid-cols-1 gap-4\">\n            {funnelSteps.map((step) => {\n              const StepIcon = step.icon\n              return (\n                <div\n                  key={step.id}\n                  className=\"border-border bg-card/60 hover:bg-muted/10 rounded-lg border p-4 shadow-xs transition-colors\"\n                >\n                  <div className=\"flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between\">\n                    {/* Step Meta */}\n                    <div className=\"flex items-start gap-3 lg:w-1/3\">\n                      <div className=\"border-border bg-muted/50 text-foreground flex size-9 shrink-0 items-center justify-center rounded-md border shadow-xs\">\n                        <StepIcon className=\"size-4\" aria-hidden=\"true\" />\n                      </div>\n                      <div className=\"space-y-0.5\">\n                        <div className=\"flex items-center gap-2\">\n                          <span className=\"text-muted-foreground font-mono text-xs font-bold\">\n                            STEP {step.stepNumber}\n                          </span>\n                          <span className=\"text-foreground text-sm font-semibold\">{step.name}</span>\n                        </div>\n                        <p className=\"text-muted-foreground text-xs\">{step.description}</p>\n                      </div>\n                    </div>\n\n                    {/* Comparative Bars */}\n                    <div className=\"space-y-2 lg:w-1/2\">\n                      {/* Variant A (Control) Bar */}\n                      <div className=\"space-y-1\">\n                        <div className=\"text-muted-foreground flex items-center justify-between text-xs\">\n                          <span className=\"flex items-center gap-1.5\">\n                            <span className=\"text-foreground font-medium\">Control:</span>\n                            <span className=\"tabular-nums\">{step.control.count} visitors</span>\n                          </span>\n                          <span className=\"font-mono font-medium tabular-nums\">{step.control.rate}</span>\n                        </div>\n                        <div className=\"bg-muted h-2 w-full overflow-hidden rounded-full\">\n                          <div\n                            className=\"bg-muted-foreground/40 h-full rounded-full transition-[width] duration-300\"\n                            style={{ width: `${step.control.progress}%` }}\n                          />\n                        </div>\n                      </div>\n\n                      {/* Variant B (Challenger) Bar */}\n                      <div className=\"space-y-1\">\n                        <div className=\"flex items-center justify-between text-xs\">\n                          <span className=\"flex items-center gap-1.5\">\n                            <span className=\"text-foreground font-medium\">Challenger:</span>\n                            <span className=\"text-foreground font-semibold tabular-nums\">\n                              {step.challenger.count} visitors\n                            </span>\n                          </span>\n                          <span className=\"text-success text-success font-mono font-bold tabular-nums\">\n                            {step.challenger.rate}\n                          </span>\n                        </div>\n                        <div className=\"bg-muted h-2 w-full overflow-hidden rounded-full\">\n                          <div\n                            className=\"bg-success h-full rounded-full transition-[width] duration-300\"\n                            style={{ width: `${step.challenger.progress}%` }}\n                          />\n                        </div>\n                      </div>\n                    </div>\n\n                    {/* Step Lift Badge & Insight */}\n                    <div className=\"flex flex-col items-start gap-1 lg:w-1/6 lg:items-end\">\n                      <Badge\n                        variant={step.isPositive ? 'success' : 'secondary'}\n                        className={cn(\n                          'gap-1 text-xs font-semibold tabular-nums',\n                          step.isPositive && 'border-success/30 bg-success/15 text-success',\n                        )}\n                      >\n                        {step.isPositive && <TrendingUp className=\"size-3\" aria-hidden=\"true\" />}\n                        <span>{step.delta}</span>\n                      </Badge>\n                      <span className=\"text-muted-foreground text-left text-xs tabular-nums lg:text-right\">\n                        {step.challenger.retention}\n                      </span>\n                    </div>\n                  </div>\n\n                  {/* Bottom micro insight */}\n                  <div className=\"border-border/60 bg-muted/20 text-muted-foreground mt-3 flex items-center gap-2 rounded-md border px-3 py-1.5 text-xs\">\n                    <span className=\"text-foreground shrink-0 font-medium\">Stage Note:</span>\n                    <span className=\"leading-relaxed\">{step.insight}</span>\n                  </div>\n                </div>\n              )\n            })}\n          </div>\n        </CardContent>\n      </Card>\n\n      {/* Guardrails & Quality Verification Footer */}\n      <Card className=\"border-border bg-card shadow-xs\">\n        <CardHeader className=\"pb-3\">\n          <div className=\"flex items-center gap-2\">\n            <CardTitle className=\"text-foreground text-base font-semibold\">\n              Statistical Guardrails &amp; Health Checks\n            </CardTitle>\n            <Badge variant=\"outline\" className=\"font-mono text-xs\">\n              Integrity Verified\n            </Badge>\n          </div>\n          <CardDescription className=\"text-xs\">\n            Automatic telemetry assertions verifying sample validity, statistical power, and site performance.\n          </CardDescription>\n        </CardHeader>\n        <CardContent>\n          <div className=\"grid grid-cols-1 gap-4 md:grid-cols-3\">\n            {guardrails.map((guard) => {\n              const GuardIcon = guard.icon\n              return (\n                <div\n                  key={guard.id}\n                  className=\"border-border bg-card/60 hover:bg-muted/10 flex flex-col justify-between rounded-lg border p-4 shadow-xs transition-colors\"\n                >\n                  <div className=\"space-y-2.5\">\n                    <div className=\"flex items-center justify-between\">\n                      <div className=\"border-border bg-muted/50 text-foreground flex size-8 items-center justify-center rounded-md border shadow-xs\">\n                        <GuardIcon className=\"size-4\" aria-hidden=\"true\" />\n                      </div>\n                      <Badge variant={guard.badgeVariant} className=\"text-xs font-medium\">\n                        {guard.status}\n                      </Badge>\n                    </div>\n                    <div className=\"space-y-1\">\n                      <h4 className=\"text-foreground text-sm font-semibold\">{guard.title}</h4>\n                      <p className=\"text-success text-success font-mono text-xs font-semibold tabular-nums\">\n                        {guard.value}\n                      </p>\n                      <p className=\"text-muted-foreground text-xs leading-relaxed\">{guard.description}</p>\n                    </div>\n                  </div>\n                </div>\n              )\n            })}\n          </div>\n        </CardContent>\n      </Card>\n    </div>\n  )\n}\n\nexport default AbTestVariantResults\n",
      "type": "registry:block",
      "target": "~/components/blocks/AbTestVariantResults.tsx"
    }
  ],
  "dependencies": [
    "lucide-react"
  ],
  "devDependencies": [],
  "registryDependencies": [
    "https://uipkge.dev/r/react/badge.json",
    "https://uipkge.dev/r/react/button.json",
    "https://uipkge.dev/r/react/card.json",
    "https://uipkge.dev/r/react/table.json"
  ],
  "description": "Optimizely and Statsig style A/B test statistical significance scorecard and conversion delta comparison. Features experiment status header, 4 primary experiment metrics cards, variants comparison table with statistical verdicts, and conversion funnel step drop-off comparison.",
  "categories": [
    "analytics",
    "marketing",
    "dashboard"
  ]
}