{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"console-pricing","type":"registry:block","title":"Console pricing","description":"A dark-room hardware pricing configurator: three sculpted workload faders with LED bargraphs on the left mechanically wired into high-contrast plan slabs on the right.","author":"Hairline UI","dependencies":["lucide-react"],"files":[{"path":"registry/console-pricing.tsx","type":"registry:component","content":"// Hairline UI · console-pricing · MIT License\n// Copyright (c) 2026 Hairline UI · https://hairlineui.com/license#components\n\n\"use client\";\n\nimport * as React from \"react\";\nimport { ArrowRight, Check } from \"lucide-react\";\n\n/* ─────────────────────────────────────────────────────────\n * CONSOLE PRICING — dark-room hardware configurator\n *\n *   panel    lit obsidian/brass instrument deck on the left with\n *            3 tactile sculpted workload faders (seats, usage,\n *            retention), 16-segment LED bargraphs and a recessed\n *            phosphor cost breakdown screen\n *   slabs    3 monolithic high-contrast plan slabs on the right\n *            mechanically wired via brass bus terminals that\n *            illuminate whichever envelope matches the workload\n * ───────────────────────────────────────────────────────── */\n\nexport type ConsoleBilling = \"monthly\" | \"annual\";\nexport type ConsoleTone = \"obsidian\" | \"graphite\";\n\nexport interface ConsoleFaderConfig {\n  id: string;\n  label: string;\n  unit: string;\n  min: number;\n  max: number;\n  step: number;\n  defaultValue: number;\n  /** Dollars added per unit above min in live metered calculation */\n  ratePerUnit: number;\n  /** Optional display formatter */\n  formatValue?: (value: number) => string;\n}\n\nexport interface ConsolePlanSlab {\n  id: string;\n  name: string;\n  summary: string;\n  /** Base monthly price before metered workload add-ons; null = Custom */\n  basePrice: number | null;\n  /** Multiplier applied to metered workload on this slab (e.g. volume efficiency) */\n  meteredFactor?: number;\n  /** Recommended when live raw metered cost sits below this ceiling (null = top tier) */\n  maxMeteredThreshold: number | null;\n  specs: string[];\n  ctaLabel: string;\n}\n\nexport interface ConsoleSelection {\n  planId: string;\n  billing: ConsoleBilling;\n  faders: Record<string, number>;\n  estimatedMonthly: number | null;\n}\n\nexport interface ConsolePricingProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  eyebrow?: string;\n  heading?: string;\n  subheading?: string;\n  tone?: ConsoleTone;\n  annualDiscountPct?: number;\n  faders?: ConsoleFaderConfig[];\n  plans?: ConsolePlanSlab[];\n  onCommitPlan?: (selection: ConsoleSelection) => Promise<unknown> | void;\n}\n\nconst TONES: Record<ConsoleTone, Record<string, string>> = {\n  obsidian: {\n    \"--cp-room\": \"#090a0c\",\n    \"--cp-chassis\": \"#121418\",\n    \"--cp-slab\": \"#15171c\",\n    \"--cp-slab-active\": \"#1b1e24\",\n    \"--cp-trough\": \"#07080a\",\n    \"--cp-glass\": \"#0b0d10\",\n    \"--cp-ink\": \"#f3f1ea\",\n    \"--cp-ink-2\": \"#9ca0aa\",\n    \"--cp-ink-3\": \"#636873\",\n    \"--cp-edge\": \"rgba(243, 241, 234, 0.1)\",\n    \"--cp-edge-strong\": \"rgba(243, 241, 234, 0.22)\",\n    \"--cp-brass\": \"#e3aa3c\",\n    \"--cp-brass-hot\": \"#f7c966\",\n    \"--cp-brass-dim\": \"rgba(227, 170, 60, 0.22)\",\n    \"--cp-on-brass\": \"#0b0c0e\",\n    \"--cp-cap-top\": \"#383c45\",\n    \"--cp-cap-bot\": \"#1f2228\",\n  },\n  graphite: {\n    \"--cp-room\": \"#131518\",\n    \"--cp-chassis\": \"#1b1e23\",\n    \"--cp-slab\": \"#1e2127\",\n    \"--cp-slab-active\": \"#262a32\",\n    \"--cp-trough\": \"#0d0f12\",\n    \"--cp-glass\": \"#101216\",\n    \"--cp-ink\": \"#f5f4ef\",\n    \"--cp-ink-2\": \"#a6abb5\",\n    \"--cp-ink-3\": \"#6f7580\",\n    \"--cp-edge\": \"rgba(245, 244, 239, 0.11)\",\n    \"--cp-edge-strong\": \"rgba(245, 244, 239, 0.24)\",\n    \"--cp-brass\": \"#ea943c\",\n    \"--cp-brass-hot\": \"#ffb261\",\n    \"--cp-brass-dim\": \"rgba(234, 148, 60, 0.22)\",\n    \"--cp-on-brass\": \"#0f1012\",\n    \"--cp-cap-top\": \"#454a54\",\n    \"--cp-cap-bot\": \"#282c34\",\n  },\n};\n\nconst DEFAULT_FADERS: ConsoleFaderConfig[] = [\n  {\n    id: \"seats\",\n    label: \"Operator seats\",\n    unit: \"seats\",\n    min: 5,\n    max: 100,\n    step: 5,\n    defaultValue: 20,\n    ratePerUnit: 8,\n  },\n  {\n    id: \"compute\",\n    label: \"Monthly inference\",\n    unit: \"M tokens\",\n    min: 10,\n    max: 500,\n    step: 10,\n    defaultValue: 120,\n    ratePerUnit: 1.4,\n  },\n  {\n    id: \"retention\",\n    label: \"Trace retention\",\n    unit: \"days\",\n    min: 14,\n    max: 365,\n    step: 15,\n    defaultValue: 90,\n    ratePerUnit: 0.65,\n  },\n];\n\nconst DEFAULT_PLANS: ConsolePlanSlab[] = [\n  {\n    id: \"core\",\n    name: \"Core Rack\",\n    summary: \"Shared inference pool with automatic failover and standard trace archive.\",\n    basePrice: 120,\n    meteredFactor: 1.0,\n    maxMeteredThreshold: 340,\n    specs: [\"Up to 25 seats\", \"Multi-region edge routing\", \"90-day trace lookup\"],\n    ctaLabel: \"Provision Core\",\n  },\n  {\n    id: \"dedicated\",\n    name: \"Dedicated Bus\",\n    summary: \"Reserved GPU slices, private peering and zero cold starts under load.\",\n    basePrice: 390,\n    meteredFactor: 0.78,\n    maxMeteredThreshold: 760,\n    specs: [\"Up to 100 seats\", \"Guaranteed throughput floor\", \"SOC 2 + SAML SSO\"],\n    ctaLabel: \"Provision Dedicated\",\n  },\n  {\n    id: \"sovereign\",\n    name: \"Sovereign Cluster\",\n    summary: \"Single-tenant bare metal in your cloud region with custom retention SLA.\",\n    basePrice: null,\n    meteredFactor: 0.6,\n    maxMeteredThreshold: null,\n    specs: [\"Unlimited seats\", \"BYOC / VPC peering\", \"15-minute pager response\"],\n    ctaLabel: \"Configure cluster\",\n  },\n];\n\nconst REDUCED_QUERY = \"(prefers-reduced-motion: reduce)\";\nconst subscribeReduced = (cb: () => void) => {\n  if (typeof window === \"undefined\") return () => {};\n  const mq = window.matchMedia(REDUCED_QUERY);\n  mq.addEventListener(\"change\", cb);\n  return () => mq.removeEventListener(\"change\", cb);\n};\nconst useReducedMotion = () =>\n  React.useSyncExternalStore(\n    subscribeReduced,\n    () => (typeof window !== \"undefined\" ? window.matchMedia(REDUCED_QUERY).matches : false),\n    () => false,\n  );\n\nfunction clamp(v: number, lo: number, hi: number) {\n  return Math.max(lo, Math.min(hi, v));\n}\n\nfunction EasedNumber({ value, reduced }: { value: number; reduced: boolean }) {\n  const [shown, setShown] = React.useState(value);\n  const curRef = React.useRef(value);\n  const rafRef = React.useRef<number | null>(null);\n\n  React.useEffect(() => {\n    if (reduced) {\n      curRef.current = value;\n      return;\n    }\n    const from = curRef.current;\n    if (from === value) return;\n    const t0 = performance.now();\n    const dur = 260;\n    const tick = (now: number) => {\n      const p = Math.min(1, (now - t0) / dur);\n      const e = 1 - Math.pow(1 - p, 3);\n      const next = Math.round(from + (value - from) * e);\n      curRef.current = next;\n      setShown(next);\n      if (p < 1) rafRef.current = requestAnimationFrame(tick);\n    };\n    rafRef.current = requestAnimationFrame(tick);\n    return () => {\n      if (rafRef.current !== null) cancelAnimationFrame(rafRef.current);\n    };\n  }, [value, reduced]);\n\n  const rendered = reduced ? value : shown;\n  return <span className=\"tabular-nums\">${rendered.toLocaleString(\"en-US\")}</span>;\n}\n\nconst SEGMENTS = 18;\n\n/** Individual milled hardware fader channel with 18-segment phosphor LED bargraph. */\nfunction HardwareFader({\n  config,\n  value,\n  onChange,\n}: {\n  config: ConsoleFaderConfig;\n  value: number;\n  onChange: (next: number) => void;\n}) {\n  const trackRef = React.useRef<HTMLDivElement>(null);\n  const [active, setActive] = React.useState(false);\n\n  const ratio = clamp((value - config.min) / Math.max(1, config.max - config.min), 0, 1);\n  const litCount = Math.max(1, Math.round(ratio * SEGMENTS));\n\n  const setFromClientX = (clientX: number) => {\n    const el = trackRef.current;\n    if (!el) return;\n    const rect = el.getBoundingClientRect();\n    const r = clamp((clientX - rect.left) / Math.max(1, rect.width), 0, 1);\n    const raw = config.min + r * (config.max - config.min);\n    const snapped = Math.round((raw - config.min) / config.step) * config.step + config.min;\n    onChange(clamp(snapped, config.min, config.max));\n  };\n\n  const handlePointerDown = (e: React.PointerEvent<HTMLDivElement>) => {\n    if (e.button !== 0 && e.pointerType === \"mouse\") return;\n    e.currentTarget.setPointerCapture(e.pointerId);\n    setActive(true);\n    setFromClientX(e.clientX);\n  };\n\n  const handlePointerMove = (e: React.PointerEvent<HTMLDivElement>) => {\n    if (!active) return;\n    setFromClientX(e.clientX);\n  };\n\n  const handlePointerUp = () => {\n    setActive(false);\n  };\n\n  const handleKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {\n    if (e.key === \"ArrowRight\" || e.key === \"ArrowUp\") {\n      e.preventDefault();\n      onChange(clamp(value + config.step, config.min, config.max));\n    } else if (e.key === \"ArrowLeft\" || e.key === \"ArrowDown\") {\n      e.preventDefault();\n      onChange(clamp(value - config.step, config.min, config.max));\n    } else if (e.key === \"Home\") {\n      e.preventDefault();\n      onChange(config.min);\n    } else if (e.key === \"End\") {\n      e.preventDefault();\n      onChange(config.max);\n    }\n  };\n\n  const formatted = config.formatValue ? config.formatValue(value) : `${value.toLocaleString(\"en-US\")} ${config.unit}`;\n\n  return (\n    <div className=\"py-4 first:pt-0 last:pb-0\">\n      <div className=\"mb-2.5 flex items-baseline justify-between gap-3\">\n        <span className=\"text-[12.5px] font-medium tracking-[0.02em]\" style={{ color: \"var(--cp-ink)\" }}>\n          {config.label}\n        </span>\n        <span\n          className=\"text-[13.5px] font-semibold tabular-nums\"\n          style={{ color: \"var(--cp-brass-hot)\" }}\n        >\n          {formatted}\n        </span>\n      </div>\n\n      {/* Recessed physical fader trough + 18-segment LED bargraph */}\n      <div\n        ref={trackRef}\n        role=\"slider\"\n        tabIndex={0}\n        aria-label={config.label}\n        aria-valuemin={config.min}\n        aria-valuemax={config.max}\n        aria-valuenow={value}\n        aria-valuetext={formatted}\n        onKeyDown={handleKeyDown}\n        onPointerDown={handlePointerDown}\n        onPointerMove={handlePointerMove}\n        onPointerUp={handlePointerUp}\n        onPointerCancel={handlePointerUp}\n        className={`relative flex h-11 w-full items-center border px-2 select-none focus-visible:outline-2 focus-visible:outline-offset-2 ${\n          active ? \"cursor-grabbing\" : \"cursor-grab\"\n        }`}\n        style={{\n          touchAction: \"none\",\n          background: \"var(--cp-trough)\",\n          borderColor: active ? \"var(--cp-brass)\" : \"var(--cp-edge)\",\n          boxShadow: \"inset 0 2px 6px rgba(0,0,0,0.75)\",\n          outlineColor: \"var(--cp-brass)\",\n        }}\n      >\n        {/* Center machined rail groove */}\n        <span\n          aria-hidden=\"true\"\n          className=\"pointer-events-none absolute right-3 left-3 h-[2px]\"\n          style={{ background: \"rgba(255,255,255,0.08)\" }}\n        />\n\n        {/* 18-segment phosphor LED bargraph */}\n        <div aria-hidden=\"true\" className=\"pointer-events-none relative z-[1] flex w-full items-center justify-between gap-1\">\n          {Array.from({ length: SEGMENTS }, (_, idx) => {\n            const lit = idx < litCount;\n            const hot = lit && idx >= SEGMENTS - 3;\n            return (\n              <span\n                key={idx}\n                className=\"h-3.5 flex-1 transition-opacity duration-100\"\n                style={{\n                  background: lit ? (hot ? \"var(--cp-brass-hot)\" : \"var(--cp-brass)\") : \"rgba(255,255,255,0.06)\",\n                  opacity: lit ? 0.85 : 1,\n                }}\n              />\n            );\n          })}\n        </div>\n\n        {/* Sculpted machined metal fader cap */}\n        <div\n          aria-hidden=\"true\"\n          className=\"pointer-events-none absolute top-[3px] bottom-[3px] z-10 flex w-7 -translate-x-1/2 items-center justify-center border\"\n          style={{\n            left: `calc(${ratio * 100}% + ${(0.5 - ratio) * 28}px)`,\n            background: \"linear-gradient(180deg, var(--cp-cap-top) 0%, var(--cp-cap-bot) 100%)\",\n            borderColor: active ? \"var(--cp-brass-hot)\" : \"var(--cp-edge-strong)\",\n            boxShadow: \"0 2px 8px rgba(0,0,0,0.65), inset 0 1px 0 rgba(255,255,255,0.22)\",\n          }}\n        >\n          {/* Center brass detent line */}\n          <span className=\"h-5 w-[2px]\" style={{ background: \"var(--cp-brass-hot)\" }} />\n        </div>\n      </div>\n\n      <div className=\"mt-1.5 flex justify-between text-[10.5px] tabular-nums\" style={{ color: \"var(--cp-ink-3)\" }}>\n        <span>\n          {config.min} {config.unit}\n        </span>\n        <span>\n          {config.max} {config.unit}\n        </span>\n      </div>\n    </div>\n  );\n}\n\nexport function ConsolePricing({\n  eyebrow = \"Capacity configurator\",\n  heading = \"Dial your workload. Watch the rack price itself.\",\n  subheading = \"Configure seats, monthly compute and retention on the left deck. The matching cluster slab locks in live with your metered rate.\",\n  tone = \"obsidian\",\n  annualDiscountPct = 18,\n  faders = DEFAULT_FADERS,\n  plans = DEFAULT_PLANS,\n  onCommitPlan,\n  className = \"\",\n  style,\n  ...rest\n}: ConsolePricingProps) {\n  const reduced = useReducedMotion();\n  const [billing, setBilling] = React.useState<ConsoleBilling>(\"annual\");\n  const [values, setValues] = React.useState<Record<string, number>>(() =>\n    Object.fromEntries(faders.map((f) => [f.id, f.defaultValue])),\n  );\n  const [busyPlan, setBusyPlan] = React.useState<string | null>(null);\n  const [donePlan, setDonePlan] = React.useState<string | null>(null);\n  const [errMsg, setErrMsg] = React.useState<string | null>(null);\n\n  // Sync if faders prop changes shape\n  const safeValue = (f: ConsoleFaderConfig) => values[f.id] ?? f.defaultValue;\n\n  const lineBreakdown = faders.map((f) => {\n    const v = safeValue(f);\n    const delta = Math.max(0, v - f.min);\n    return {\n      id: f.id,\n      label: f.label,\n      cost: Math.round(delta * f.ratePerUnit),\n    };\n  });\n\n  const rawMetered = lineBreakdown.reduce((sum, item) => sum + item.cost, 0);\n\n  // Determine active matched slab based on metered threshold\n  const matchedPlanId =\n    plans.find((p) => p.maxMeteredThreshold === null || rawMetered <= p.maxMeteredThreshold)?.id ??\n    plans[plans.length - 1]?.id ??\n    \"\";\n\n  const computeSlabMonthly = (plan: ConsolePlanSlab): number | null => {\n    if (plan.basePrice === null) return null;\n    const metered = rawMetered * (plan.meteredFactor ?? 1);\n    const subtotal = plan.basePrice + metered;\n    return billing === \"annual\" ? Math.round(subtotal * (1 - annualDiscountPct / 100)) : Math.round(subtotal);\n  };\n\n  const handleCommit = async (plan: ConsolePlanSlab) => {\n    setErrMsg(null);\n    setBusyPlan(plan.id);\n    const estimatedMonthly = computeSlabMonthly(plan);\n    try {\n      if (onCommitPlan) {\n        await onCommitPlan({\n          planId: plan.id,\n          billing,\n          faders: Object.fromEntries(faders.map((f) => [f.id, safeValue(f)])),\n          estimatedMonthly,\n        });\n      } else {\n        await new Promise((r) => setTimeout(r, 420));\n      }\n      setDonePlan(plan.id);\n    } catch (e) {\n      setErrMsg(e instanceof Error ? e.message : \"Could not allocate plan right now.\");\n    } finally {\n      setBusyPlan(null);\n    }\n  };\n\n  const rootStyle = React.useMemo(() => ({ ...TONES[tone], ...style }) as React.CSSProperties, [tone, style]);\n\n  return (\n    <section\n      data-natural-width\n      style={rootStyle}\n      className={`@container relative w-full overflow-x-clip antialiased [font-family:var(--cp-text,inherit)] ${className}`}\n      {...rest}\n    >\n      {/* Lit darkroom hardware stage */}\n      <div\n        className=\"relative w-full\"\n        style={{\n          background: \"var(--cp-room)\",\n          color: \"var(--cp-ink)\",\n          backgroundImage:\n            \"radial-gradient(64% 50% at 24% 18%, rgba(227, 170, 60, 0.08), transparent 72%)\",\n        }}\n      >\n        <div className=\"mx-auto w-full max-w-[1360px] px-4 py-10 @[40rem]:px-8 @[56rem]:px-12 @[56rem]:py-14\">\n          {/* ── Top Hardware Header Strip ────────────────────────── */}\n          <div\n            className=\"mb-8 flex flex-col justify-between gap-6 pb-7 @[52rem]:flex-row @[52rem]:items-end\"\n            style={{ borderBottom: \"1px solid var(--cp-edge)\" }}\n          >\n            <div className=\"max-w-2xl\">\n              <p\n                className=\"mb-2.5 text-[11px] font-semibold tracking-[0.14em] uppercase\"\n                style={{ color: \"var(--cp-brass)\" }}\n              >\n                {eyebrow}\n              </p>\n              <h2\n                className=\"text-[28px] leading-[1.06] font-semibold tracking-[-0.03em] text-balance @[36rem]:text-[38px] @[56rem]:text-[46px]\"\n                style={{ fontFamily: \"var(--cp-display, inherit)\" }}\n              >\n                {heading}\n              </h2>\n              <p className=\"mt-3 max-w-[54ch] text-[14px] leading-[1.58]\" style={{ color: \"var(--cp-ink-2)\" }}>\n                {subheading}\n              </p>\n            </div>\n\n            {/* Machined metallic billing toggle */}\n            <div\n              role=\"radiogroup\"\n              aria-label=\"Billing interval\"\n              className=\"inline-grid shrink-0 grid-cols-2 border p-1\"\n              style={{\n                borderColor: \"var(--cp-edge-strong)\",\n                background: \"var(--cp-trough)\",\n              }}\n            >\n              {(\n                [\n                  { id: \"monthly\" as const, label: \"Monthly\" },\n                  { id: \"annual\" as const, label: `Annual −${annualDiscountPct}%` },\n                ] as const\n              ).map((opt) => {\n                const on = billing === opt.id;\n                return (\n                  <button\n                    key={opt.id}\n                    type=\"button\"\n                    role=\"radio\"\n                    aria-checked={on}\n                    onClick={() => setBilling(opt.id)}\n                    className=\"cursor-pointer px-4 py-2 text-[12px] font-semibold transition-colors duration-150 focus-visible:outline-2 focus-visible:outline-offset-2\"\n                    style={{\n                      touchAction: \"manipulation\",\n                      background: on ? \"var(--cp-brass)\" : \"transparent\",\n                      color: on ? \"var(--cp-on-brass)\" : \"var(--cp-ink-2)\",\n                      outlineColor: \"var(--cp-brass)\",\n                    }}\n                  >\n                    {opt.label}\n                  </button>\n                );\n              })}\n            </div>\n          </div>\n\n          {/* ── Asymmetric 12-Col Hardware Bench ─────────────────── */}\n          <div className=\"grid grid-cols-1 gap-5 @[56rem]:grid-cols-12 @[56rem]:items-stretch\">\n            {/* LEFT (5 cols): Lit Obsidian/Brass Instrument Panel */}\n            <div\n              className=\"relative flex flex-col justify-between border p-5 @[40rem]:p-7 @[56rem]:col-span-5\"\n              style={{\n                background: \"var(--cp-chassis)\",\n                borderColor: \"var(--cp-edge-strong)\",\n                boxShadow: \"inset 0 1px 0 rgba(255,255,255,0.06)\",\n              }}\n            >\n              <div>\n                <div\n                  className=\"mb-5 flex items-center justify-between pb-3.5\"\n                  style={{ borderBottom: \"1px solid var(--cp-edge)\" }}\n                >\n                  <span className=\"text-[11px] font-semibold tracking-[0.12em] uppercase\" style={{ color: \"var(--cp-ink-2)\" }}>\n                    Workload bus\n                  </span>\n                  <span className=\"inline-flex items-center gap-2 text-[11px] font-medium\" style={{ color: \"var(--cp-brass)\" }}>\n                    <span className=\"size-1.5 rounded-full\" style={{ background: \"var(--cp-brass-hot)\" }} />\n                    Live metering\n                  </span>\n                </div>\n\n                {/* 3 tactile sculpted fader tracks */}\n                <div className=\"divide-y\" style={{ borderColor: \"var(--cp-edge)\" }}>\n                  {faders.map((f) => (\n                    <div key={f.id} style={{ borderColor: \"var(--cp-edge)\" }}>\n                      <HardwareFader\n                        config={f}\n                        value={safeValue(f)}\n                        onChange={(next) => setValues((prev) => ({ ...prev, [f.id]: next }))}\n                      />\n                    </div>\n                  ))}\n                </div>\n              </div>\n\n              {/* Recessed dark-glass phosphor breakdown window */}\n              <div\n                className=\"mt-6 border p-4\"\n                style={{\n                  background: \"var(--cp-glass)\",\n                  borderColor: \"var(--cp-edge)\",\n                  boxShadow: \"inset 0 2px 8px rgba(0,0,0,0.7)\",\n                }}\n              >\n                <div className=\"mb-3 flex items-center justify-between text-[10.5px] font-semibold tracking-[0.1em] uppercase\" style={{ color: \"var(--cp-ink-3)\" }}>\n                  <span>Metered allocation</span>\n                  <span>Est. / month</span>\n                </div>\n                <div className=\"space-y-2 text-[12.5px]\">\n                  {lineBreakdown.map((row) => (\n                    <div key={row.id} className=\"flex items-center justify-between\">\n                      <span style={{ color: \"var(--cp-ink-2)\" }}>{row.label}</span>\n                      <span className=\"font-medium tabular-nums\" style={{ color: \"var(--cp-ink)\" }}>\n                        +${row.cost.toLocaleString(\"en-US\")}\n                      </span>\n                    </div>\n                  ))}\n                </div>\n                <div\n                  className=\"mt-3.5 flex items-baseline justify-between pt-3\"\n                  style={{ borderTop: \"1px solid var(--cp-edge)\" }}\n                >\n                  <span className=\"text-[12px] font-medium\" style={{ color: \"var(--cp-ink-2)\" }}>\n                    Metered delta\n                  </span>\n                  <span className=\"text-[20px] font-semibold tracking-[-0.02em]\" style={{ color: \"var(--cp-brass-hot)\" }}>\n                    +<EasedNumber value={rawMetered} reduced={reduced} />\n                  </span>\n                </div>\n              </div>\n            </div>\n\n            {/* RIGHT (7 cols): 3 Monolithic High-Contrast Plan Slabs */}\n            <div className=\"flex flex-col gap-3 @[56rem]:col-span-7\">\n              {plans.map((plan, index) => {\n                const isMatched = plan.id === matchedPlanId;\n                const estMonthly = computeSlabMonthly(plan);\n                const isBusy = busyPlan === plan.id;\n                const isDone = donePlan === plan.id;\n\n                return (\n                  <article\n                    key={plan.id}\n                    className=\"relative flex flex-1 flex-col justify-between border p-5 transition-colors duration-200 @[40rem]:p-6\"\n                    style={{\n                      background: isMatched ? \"var(--cp-slab-active)\" : \"var(--cp-slab)\",\n                      borderColor: isMatched ? \"var(--cp-brass)\" : \"var(--cp-edge)\",\n                      boxShadow: isMatched ? \"inset 0 1px 0 rgba(247, 201, 102, 0.25)\" : \"inset 0 1px 0 rgba(255,255,255,0.04)\",\n                    }}\n                  >\n                    {/* Physical brass bus terminal bar along left edge */}\n                    <span\n                      aria-hidden=\"true\"\n                      className=\"pointer-events-none absolute top-0 bottom-0 left-0 w-[4px] transition-colors duration-200\"\n                      style={{\n                        background: isMatched ? \"var(--cp-brass-hot)\" : \"transparent\",\n                      }}\n                    />\n\n                    <div className=\"grid grid-cols-1 gap-4 @[38rem]:grid-cols-12 @[38rem]:items-start\">\n                      {/* Slab identity & summary */}\n                      <div className=\"@[38rem]:col-span-7\">\n                        <div className=\"flex items-center gap-2.5\">\n                          <span\n                            className=\"text-[11px] font-semibold tabular-nums\"\n                            style={{ color: isMatched ? \"var(--cp-brass-hot)\" : \"var(--cp-ink-3)\" }}\n                          >\n                            0{index + 1}\n                          </span>\n                          <h3\n                            className=\"text-[20px] font-semibold tracking-[-0.02em]\"\n                            style={{ fontFamily: \"var(--cp-display, inherit)\" }}\n                          >\n                            {plan.name}\n                          </h3>\n                          {isMatched && (\n                            <span\n                              className=\"px-2 py-0.5 text-[10px] font-bold tracking-[0.09em] uppercase\"\n                              style={{\n                                background: \"var(--cp-brass)\",\n                                color: \"var(--cp-on-brass)\",\n                              }}\n                            >\n                              Matched bus\n                            </span>\n                          )}\n                        </div>\n\n                        <p className=\"mt-2 text-[13.5px] leading-[1.52]\" style={{ color: \"var(--cp-ink-2)\" }}>\n                          {plan.summary}\n                        </p>\n\n                        {/* Dense horizontal spec strip */}\n                        <div className=\"mt-4 flex flex-wrap gap-x-4 gap-y-1.5 text-[12px]\" style={{ color: \"var(--cp-ink-2)\" }}>\n                          {plan.specs.map((spec) => (\n                            <span key={spec} className=\"inline-flex items-center gap-1.5\">\n                              <span\n                                aria-hidden=\"true\"\n                                className=\"size-1.5\"\n                                style={{ background: isMatched ? \"var(--cp-brass)\" : \"var(--cp-ink-3)\" }}\n                              />\n                              {spec}\n                            </span>\n                          ))}\n                        </div>\n                      </div>\n\n                      {/* Right price & mechanical action block */}\n                      <div className=\"flex flex-col justify-between gap-4 @[38rem]:col-span-5 @[38rem]:items-end\">\n                        <div className=\"@[38rem]:text-right\">\n                          <div\n                            className=\"text-[34px] leading-none font-semibold tracking-[-0.035em] @[48rem]:text-[40px]\"\n                            style={{\n                              fontFamily: \"var(--cp-display, inherit)\",\n                              color: isMatched ? \"var(--cp-brass-hot)\" : \"var(--cp-ink)\",\n                            }}\n                          >\n                            {estMonthly !== null ? <EasedNumber value={estMonthly} reduced={reduced} /> : \"Custom\"}\n                          </div>\n                          <span className=\"mt-1 block text-[11.5px] tabular-nums\" style={{ color: \"var(--cp-ink-3)\" }}>\n                            {estMonthly !== null\n                              ? billing === \"annual\"\n                                ? `per month · billed annually`\n                                : `per month · metered`\n                              : \"Dedicated cluster quote\"}\n                          </span>\n                        </div>\n\n                        <button\n                          type=\"button\"\n                          disabled={isBusy}\n                          onClick={() => handleCommit(plan)}\n                          className=\"group inline-flex h-10 w-full cursor-pointer items-center justify-between gap-3 border px-4 text-[12.5px] font-semibold transition-colors duration-150 focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-default disabled:opacity-70 @[38rem]:w-auto @[38rem]:min-w-[172px]\"\n                          style={{\n                            touchAction: \"manipulation\",\n                            borderColor: isMatched ? \"var(--cp-brass)\" : \"var(--cp-edge-strong)\",\n                            background: isMatched ? \"var(--cp-brass)\" : \"transparent\",\n                            color: isMatched ? \"var(--cp-on-brass)\" : \"var(--cp-ink)\",\n                            outlineColor: \"var(--cp-brass)\",\n                          }}\n                        >\n                          <span>{isBusy ? \"Allocating…\" : isDone ? \"Allocated\" : plan.ctaLabel}</span>\n                          {isDone ? (\n                            <Check className=\"size-3.5\" aria-hidden=\"true\" />\n                          ) : (\n                            <ArrowRight\n                              className=\"size-3.5 transition-transform duration-200 group-hover:translate-x-1\"\n                              aria-hidden=\"true\"\n                            />\n                          )}\n                        </button>\n                      </div>\n                    </div>\n                  </article>\n                );\n              })}\n\n              {errMsg && (\n                <div\n                  role=\"alert\"\n                  className=\"border px-4 py-2.5 text-[12.5px] font-medium\"\n                  style={{\n                    borderColor: \"var(--cp-brass)\",\n                    color: \"var(--cp-brass-hot)\",\n                    background: \"var(--cp-trough)\",\n                  }}\n                >\n                  {errMsg}\n                </div>\n              )}\n            </div>\n          </div>\n        </div>\n      </div>\n    </section>\n  );\n}\n"}],"css":{},"docs":"Docs and live preview: https://hairlineui.com/blocks/console-pricing. MIT licensed: https://hairlineui.com/license#components","meta":{"license":"MIT"}}