@orangecheck/design 0.30.0 → 0.30.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/tokens/cn.ts","../src/composites/help-hint.tsx","../src/composites/section-header.tsx","../src/primitives/button.tsx","../src/composites/error-page.tsx","../src/composites/empty-state.tsx","../src/composites/stat-grid.tsx","../src/primitives/stat-block.tsx","../src/composites/stat-card.tsx","../src/composites/callout.tsx","../src/composites/definition-list.tsx","../src/composites/data-row.tsx","../src/composites/panel.tsx","../src/composites/marketing-heading.tsx","../src/primitives/badge.tsx","../src/primitives/input.tsx","../src/primitives/alert.tsx","../src/primitives/confirm-dialog.tsx","../src/primitives/prompt-dialog.tsx","../src/primitives/tooltip.tsx","../src/primitives/accordion.tsx","../src/primitives/surface.tsx","../src/primitives/icon-badge.tsx","../src/composites/feature-card.tsx","../src/composites/section.tsx","../src/composites/comparison-table.tsx","../src/composites/numbered-step.tsx","../src/composites/faq.tsx","../src/composites/email-capture.tsx","../src/composites/check-list.tsx","../src/composites/accent-note.tsx","../src/composites/verified-chip.tsx","../src/chrome/ecosystem-switcher.tsx","../src/chrome/family-properties.ts","../src/chrome/logo-dropdown.tsx","../src/tokens/provider.tsx","../src/tokens/appearance-menu.tsx","../src/chrome/account-menu.tsx","../src/chrome/primary-nav.tsx","../src/chrome/dashboard-shell.tsx","../src/chrome/app-shell.tsx","../src/chrome/layout-sub-header.tsx","../src/chrome/app-bar.tsx","../src/chrome/family-footer.tsx"],"names":["jsxs","jsx","Link","TONE_CLASS","cva","Popover2","React3","X","Check","useState","useRef","useEffect","ChevronDown","isActive","Sun","Moon","useTheme","Icon","Copy","Fragment","Plus"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAUO,SAAS,MAAM,MAAA,EAA8B;AAChD,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC/B;ACoBO,SAAS,QAA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AAA,EAAK,SAAA,EAAU,uCAAA,EAAwC,QAAA,EAAA,QAAA,EAAC,CAAA;AAAA,wBACzDA,GAAAA,CAAC,MAAA,EAAA,EAAM,QAAA,EAAA,SAAA,IAAa,oBAAA,EAAqB;AAAA,OAAA,EAC3C;AAAA,KAAA,EACF;AAAA,GAAA,EACF,CAAA,EACF,CAAA;AAEJ","file":"components.mjs","sourcesContent":["import type { ClassValue } from 'clsx';\n\nimport { clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\n/**\n * Canonical class-name merge for the OrangeCheck family.\n * `clsx` for conditional composition, `tailwind-merge` to resolve\n * conflicting Tailwind utilities (last-wins by property).\n */\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n","'use client';\n\nimport * as Popover from '@radix-ui/react-popover';\nimport { HelpCircle } from 'lucide-react';\nimport type { ReactNode } from 'react';\n\nimport { cn } from '../tokens/cn';\n\nexport interface HelpHintProps {\n /** The help body — short prose (1–3 sentences) explaining a term/control. */\n children: ReactNode;\n /** Optional bold \"§ \"-prefixed heading inside the popover. */\n title?: string;\n /** Which side the popover prefers to open toward. Default `top`. */\n side?: 'top' | 'right' | 'bottom' | 'left';\n /** `xs` tightens the icon for dense label rows; `sm` (default) suits most. */\n size?: 'xs' | 'sm';\n /** `subtle` mutes the \"?\" icon when it sits in a description / muted row;\n * `default` is primary-tinted for active labels. */\n tone?: 'default' | 'subtle';\n /** Accessible label for the trigger (defaults to \"what is this?\"). */\n label?: string;\n className?: string;\n}\n\n/**\n * HelpHint — the canonical inline \"?\" affordance for term-level guidance.\n * Click/focus reveals a small popover (Radix) with optional title + prose;\n * works on touch (not a hover tooltip). Lifted from oc-me-web's richer\n * `me/ui/HelpHint` (with `size`/`tone`), now the single source. Also the\n * keystone behind `SectionHeader`'s optional `hint`.\n */\nexport function HelpHint({\n children,\n title,\n side = 'top',\n size = 'sm',\n tone = 'default',\n label = 'what is this?',\n className,\n}: HelpHintProps) {\n const iconSize = size === 'xs' ? 12 : 14;\n return (\n <Popover.Root>\n <Popover.Trigger\n aria-label={label}\n onClick={(e) => e.stopPropagation()}\n className={cn(\n 'focus-visible:ring-primary/60 inline-flex shrink-0 items-center justify-center rounded-full transition-colors outline-none focus-visible:ring-2',\n tone === 'subtle'\n ? 'text-muted-foreground/60 hover:text-foreground/80'\n : 'text-primary/70 hover:text-primary',\n className\n )}\n >\n <HelpCircle size={iconSize} aria-hidden />\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Content\n side={side}\n sideOffset={6}\n collisionPadding={12}\n className=\"border-border bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 z-50 max-w-xs rounded-md border p-3 text-xs leading-relaxed shadow-md outline-none\"\n >\n {title && <div className=\"label-mono text-primary mb-1.5\">§ {title}</div>}\n <div className=\"text-foreground/90\">{children}</div>\n <Popover.Arrow className=\"fill-popover\" />\n </Popover.Content>\n </Popover.Portal>\n </Popover.Root>\n );\n}\n","import type { ReactNode } from 'react';\n\nimport { HelpHint } from './help-hint';\n\nexport interface SectionHeaderProps {\n /** Plain section name — rendered after a \"§ \" glyph in label-mono. */\n label: string;\n /** Optional right-side string (count, \"most recent first\"). */\n meta?: ReactNode;\n /** When provided, renders an inline HelpHint \"?\" next to the label. */\n hint?: { title?: string; body: ReactNode; side?: 'top' | 'bottom' | 'left' | 'right' };\n tone?: 'primary' | 'muted' | 'warning' | 'success' | 'destructive';\n className?: string;\n}\n\nconst TONE_CLASS = {\n primary: 'text-primary',\n muted: 'text-muted-foreground',\n warning: 'text-warning',\n success: 'text-success',\n destructive: 'text-destructive',\n} as const;\n\n/**\n * SectionHeader — the canonical \"§ x\" section header used across every\n * /me, /vault, and /fleet dashboard surface. Lifted from oc-me-web's\n * `me/ui/SectionHeader` so the visual contract stays single-source.\n *\n * Pattern is `label-mono text-primary mb-3` with a \"§ \" glyph followed by\n * the label, plus an optional muted/uppercase right-side meta string.\n */\nexport function SectionHeader({\n label,\n meta,\n hint,\n tone = 'primary',\n className = '',\n}: SectionHeaderProps) {\n return (\n <div className={`mb-3 flex items-baseline justify-between gap-2 ${className}`}>\n <div className=\"flex items-center gap-1.5\">\n <div className={`label-mono ${TONE_CLASS[tone]}`}>§ {label}</div>\n {hint && (\n <HelpHint title={hint.title} side={hint.side ?? 'bottom'}>\n {hint.body}\n </HelpHint>\n )}\n </div>\n {meta && (\n <span className=\"text-muted-foreground/70 font-mono text-[10px] tracking-widest uppercase\">\n {meta}\n </span>\n )}\n </div>\n );\n}\n","import type { VariantProps } from 'class-variance-authority';\n\nimport { Slot } from '@radix-ui/react-slot';\nimport { cva } from 'class-variance-authority';\nimport * as React from 'react';\n\nimport { cn } from '../tokens/cn';\n\nconst buttonVariants = cva(\n \"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground hover:bg-primary/90',\n destructive:\n 'bg-destructive hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 text-white',\n outline:\n 'bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 border shadow-xs',\n secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80',\n ghost: 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',\n link: 'text-primary underline-offset-4 hover:underline',\n // For CTAs placed ON a saturated brand band or a dark section\n // (e.g. a terracotta hero / footer / a forced-dark block) where\n // the surface is dark+light-text in either mode. A neutral white\n // pill + a translucent-white ghost read on any such surface;\n // hardcoded white is deliberate (cf. destructive's text-white).\n onBrand: 'bg-white text-neutral-900 shadow-sm hover:bg-white/90',\n onBrandOutline:\n 'border border-white/40 bg-transparent text-white hover:bg-white/10',\n },\n size: {\n default: 'h-9 px-4 py-2 has-[>svg]:px-3',\n sm: 'h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5',\n lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',\n icon: 'size-9',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n }\n);\n\nfunction Button({\n className,\n variant,\n size,\n asChild = false,\n ...props\n}: React.ComponentProps<'button'> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean;\n }) {\n const Comp = asChild ? Slot : 'button';\n\n return (\n <Comp\n data-slot=\"button\"\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n );\n}\n\nexport { Button, buttonVariants };\n","import Link from 'next/link';\nimport type { ReactNode } from 'react';\n\nimport { Button } from '../primitives/button';\n\nexport type OcErrorVariant = 'not-found' | 'server-error';\n\nexport interface OcErrorPageProps {\n /**\n * Picks the defaults. `not-found` is the 404 shape (primary tone, a \"go\n * back\" affordance); `server-error` is the 500 shape (destructive tone, a\n * retry affordance and a what-to-do list).\n */\n variant?: OcErrorVariant;\n /** Override the big numeral. Defaults to 404 / 500 from the variant. */\n code?: number | string;\n /** Override the headline. Lowercase, per the family voice. */\n title?: string;\n /** Override the `//` prose line under the headline. */\n detail?: string;\n /**\n * A short \"what can you do\" list, rendered as the bordered mono panel.\n * Defaults to the server-error list; pass `[]` to suppress it.\n */\n actions?: string[];\n /** Where \"go home\" points. A site with a app-scoped root can change it. */\n homeHref?: string;\n /** Extra content below the buttons — a report link, a status page, a hint. */\n children?: ReactNode;\n className?: string;\n}\n\nconst VARIANTS = {\n 'not-found': {\n code: 404,\n title: 'no such route',\n detail: \"the page you're looking for doesn't exist, or has been moved.\",\n tone: 'text-primary',\n label: 'not found',\n actions: [] as string[],\n },\n 'server-error': {\n code: 500,\n title: 'internal error',\n detail: 'something went wrong on our end.',\n tone: 'text-destructive',\n label: 'server error',\n actions: [\n 'try refreshing the page',\n 'wait a few minutes, try again',\n 'return home and start over',\n ],\n },\n} as const;\n\n/**\n * OcErrorPage — the family's 404 / 500 body.\n *\n * Nine of thirteen family sites had no error page at all and fell through to\n * Next's unstyled default: no header, no footer, no theme, none of the chrome\n * every other page on the site has. It is the one page a visitor is guaranteed\n * to reach eventually, and it was the only one that looked like a different\n * product.\n *\n * Lifted from `oc-attest-web`, which was the only site with a good one. It\n * lives here rather than being copied nine times because a copied page drifts —\n * that is the lesson of the family's `isFamilyUrl` predicate, where 14 of 15\n * hand-copied versions shared a flaw the 15th had already fixed.\n *\n * `Seo` stays with the consumer: the page's title and `noindex` are site\n * concerns and the design package has no business owning them. So a site's\n * `404.tsx` is its `<Seo>` plus `<OcErrorPage variant=\"not-found\" />`.\n *\n * The \"go back\" button uses `window.history.back()`, which needs a client\n * component — the consumer page carries `'use client'`, as Next requires for\n * any page with an interactive handler.\n */\nexport function OcErrorPage({\n variant = 'not-found',\n code,\n title,\n detail,\n actions,\n homeHref = '/',\n children,\n className = '',\n}: OcErrorPageProps) {\n const v = VARIANTS[variant];\n const shownCode = code ?? v.code;\n const shownActions = actions ?? [...v.actions];\n const isServerError = variant === 'server-error';\n\n return (\n <div\n className={`container flex min-h-[60vh] flex-col items-center justify-center ${className}`}\n >\n <div className=\"w-full max-w-xl\">\n <div className={`label-mono mb-4 ${v.tone}`}>\n § {shownCode} // {v.label}\n </div>\n <h1\n className={`font-display text-7xl font-bold tracking-tight tabular-nums sm:text-8xl ${v.tone}`}\n >\n {shownCode}\n </h1>\n <h2 className=\"font-display mt-2 text-2xl font-bold tracking-tight sm:text-3xl\">\n {title ?? v.title}\n </h2>\n <p className=\"text-muted-foreground mt-3 font-mono text-xs\">\n {'// '}\n {detail ?? v.detail}\n </p>\n\n {shownActions.length > 0 && (\n <div className=\"mt-8 border\">\n <div className=\"border-b px-4 py-2 font-mono text-[11px] tracking-widest uppercase\">\n what can you do\n </div>\n <ul className=\"divide-y font-mono text-xs\">\n {shownActions.map((a) => (\n <li key={a} className=\"px-4 py-2\">\n {'>> '}\n {a}\n </li>\n ))}\n </ul>\n </div>\n )}\n\n <div className=\"mt-8 flex flex-wrap gap-3\">\n <Button asChild className=\"font-mono\">\n <Link href={homeHref}>\n <span className=\"text-[11px] tracking-widest uppercase\">go home</span>\n </Link>\n </Button>\n <Button\n variant=\"outline\"\n onClick={() => {\n if (typeof window === 'undefined') return;\n if (isServerError) window.location.reload();\n else window.history.back();\n }}\n className=\"font-mono\"\n >\n <span className=\"text-[11px] tracking-widest uppercase\">\n {isServerError ? 'retry' : 'go back'}\n </span>\n </Button>\n </div>\n\n {children && <div className=\"mt-6\">{children}</div>}\n </div>\n </div>\n );\n}\n","import Link from 'next/link';\nimport type { ReactNode } from 'react';\n\nexport interface EmptyStateCta {\n label: string;\n href: string;\n /** External links open in a new tab and get a ↗ glyph. */\n external?: boolean;\n}\n\nexport interface EmptyStateProps {\n /** Short heading — one mono-uppercased label like \"no entries yet\". */\n label: string;\n /** Body — short prose explaining what would appear here and how. */\n children: ReactNode;\n cta?: EmptyStateCta;\n secondary?: EmptyStateCta;\n tone?: 'info' | 'warning' | 'muted';\n className?: string;\n}\n\nconst TONE_CLASS = {\n info: 'border-primary/30 bg-primary/5',\n warning: 'border-warning/40 bg-warning/5',\n muted: 'border-border bg-muted/20',\n} as const;\n\nconst LABEL_TONE_CLASS = {\n info: 'text-primary',\n warning: 'text-warning',\n muted: 'text-muted-foreground',\n} as const;\n\n/**\n * EmptyState — the canonical empty-state card used across every /me,\n * /vault, and /fleet dashboard. Empty states should *teach*: explain what\n * would appear, and how to make it appear. Lifted from oc-me-web's\n * `me/ui/EmptyState`.\n */\nexport function EmptyState({\n label,\n children,\n cta,\n secondary,\n tone = 'info',\n className = '',\n}: EmptyStateProps) {\n return (\n <div className={`border p-5 md:p-6 ${TONE_CLASS[tone]} ${className}`}>\n <div className={`label-mono mb-2 ${LABEL_TONE_CLASS[tone]}`}>§ {label}</div>\n <div className=\"text-foreground/85 max-w-2xl text-sm leading-relaxed\">{children}</div>\n {(cta || secondary) && (\n <div className=\"mt-4 flex flex-wrap gap-3\">\n {cta && <CtaLink {...cta} variant=\"primary\" />}\n {secondary && <CtaLink {...secondary} variant=\"secondary\" />}\n </div>\n )}\n </div>\n );\n}\n\nfunction CtaLink({\n label,\n href,\n external,\n variant,\n}: EmptyStateCta & { variant: 'primary' | 'secondary' }) {\n const cls =\n variant === 'primary'\n ? 'bg-primary text-primary-foreground hover:bg-primary/90 inline-flex h-9 items-center justify-center rounded-md px-4 font-mono text-[11px] font-semibold tracking-widest uppercase'\n : 'text-muted-foreground hover:text-foreground border-input hover:bg-accent inline-flex h-9 items-center justify-center rounded-md border px-4 font-mono text-[11px] tracking-widest uppercase';\n const text = external ? `${label} ↗` : label;\n if (external) {\n return (\n <a href={href} target=\"_blank\" rel=\"noreferrer\" className={cls}>\n {text}\n </a>\n );\n }\n return (\n <Link href={href} className={cls}>\n {text}\n </Link>\n );\n}\n","import type { ReactNode } from 'react';\n\nexport interface StatItem {\n /** Short uppercased label rendered in mono. */\n label: string;\n /** Primary value · already formatted as a string. */\n value: string;\n /** Optional secondary line · USD conversion, \"last 30 days\", etc. */\n sub?: string;\n /** When true, value is rendered in primary tone (use for headline metric). */\n accent?: boolean;\n /** Optional tone for the value (overrides accent). */\n tone?: 'default' | 'primary' | 'success' | 'warning' | 'destructive' | 'muted';\n}\n\nexport interface StatGridProps {\n items: StatItem[];\n columns?: 1 | 2 | 3 | 4;\n className?: string;\n}\n\nconst TONE_CLASS = {\n default: '',\n primary: 'text-primary',\n success: 'text-success',\n warning: 'text-warning',\n destructive: 'text-destructive',\n muted: 'text-muted-foreground',\n} as const;\n\nconst COL_CLASS = {\n 1: '',\n 2: 'md:grid-cols-2',\n 3: 'md:grid-cols-3',\n 4: 'md:grid-cols-2 lg:grid-cols-4',\n} as const;\n\n/**\n * StatGrid — the canonical stats row used across family dashboards.\n * Lifted from oc-me-web's `me/ui/StatGrid`. Grid of equal-width tiles\n * separated by 1px borders. Always pre-format the value string —\n * the component does no number formatting.\n */\nexport function StatGrid({ items, columns = 3, className = '' }: StatGridProps) {\n return (\n <div className={`oc-stat-grid bg-border grid gap-px border ${COL_CLASS[columns]} ${className}`}>\n {items.map((it, i) => (\n <Tile key={`${it.label}-${i}`} item={it} />\n ))}\n </div>\n );\n}\n\nfunction Tile({ item }: { item: StatItem }) {\n const tone = item.tone ?? (item.accent ? 'primary' : 'default');\n return (\n <div className=\"oc-stat-tile bg-background p-5\">\n <div className=\"text-muted-foreground/80 font-mono text-[10px] tracking-widest uppercase\">\n {item.label}\n </div>\n <div\n className={`font-display mt-1 text-2xl font-bold tabular-nums tracking-tight ${TONE_CLASS[tone]}`}\n >\n {item.value}\n </div>\n {item.sub && (\n <div className=\"text-muted-foreground/70 mt-1 font-mono text-[10px] tracking-widest uppercase\">\n {item.sub}\n </div>\n )}\n </div>\n );\n}\n\nexport function StatTile({ children, ...item }: StatItem & { children?: ReactNode }) {\n return (\n <div>\n <Tile item={item} />\n {children}\n </div>\n );\n}\n","import type { ReactNode } from 'react';\n\nimport { cn } from '../tokens/cn';\n\nexport interface StatBlockProps {\n label: string;\n value: ReactNode;\n sub?: ReactNode;\n /** Optional \"vs prior period\" delta — arrow + colour. */\n delta?: { value: number; suffix?: string } | null;\n tone?: 'default' | 'success' | 'warning' | 'destructive';\n className?: string;\n}\n\n/**\n * A single labelled value cell — the building block for every counter grid in a\n * dashboard. Optional delta arrow + colour for period-over-period deltas.\n * (Richer than StatTile: carries a delta. Use StatGrid for laid-out grids.)\n */\nexport function StatBlock({ label, value, sub, delta, tone = 'default', className }: StatBlockProps) {\n const toneClass =\n tone === 'success'\n ? 'text-success'\n : tone === 'warning'\n ? 'text-warning'\n : tone === 'destructive'\n ? 'text-destructive'\n : 'text-foreground';\n\n return (\n <div className={cn('flex flex-col gap-1', className)}>\n <span className=\"label-mono text-muted-foreground text-[10px]\">{label}</span>\n <span\n className={cn(\n 'font-display text-2xl font-bold tracking-tight tabular-nums',\n toneClass\n )}\n >\n {value}\n </span>\n <div className=\"flex items-baseline gap-2\">\n {sub && (\n <span className=\"text-muted-foreground font-mono text-[11px] tracking-wide lowercase\">\n {sub}\n </span>\n )}\n {delta && (\n <span\n className={cn(\n 'font-mono text-[11px] tracking-wide',\n delta.value > 0\n ? 'text-success'\n : delta.value < 0\n ? 'text-destructive'\n : 'text-muted-foreground'\n )}\n >\n {delta.value > 0 ? '▲' : delta.value < 0 ? '▼' : '·'}{' '}\n {Math.abs(delta.value).toFixed(1)}\n {delta.suffix ?? '%'}\n </span>\n )}\n </div>\n </div>\n );\n}\n","import type { ReactNode } from 'react';\n\nimport { StatBlock } from '../primitives/stat-block';\nimport { cn } from '../tokens/cn';\n\nexport interface StatCardProps {\n label: string;\n value: ReactNode;\n sub?: ReactNode;\n /** Optional period-over-period delta arrow + colour. */\n delta?: { value: number; suffix?: string } | null;\n tone?: 'default' | 'success' | 'warning' | 'destructive';\n /** Padding density — `sm` for dense grids, `default` for standalone cards. */\n pad?: 'sm' | 'default';\n className?: string;\n}\n\n/**\n * StatCard — a single stat in a bordered `bg-card` frame. The standalone\n * counterpart to StatBlock (the bare cell) and StatGrid (a laid-out grid):\n * this is the \"one stat in its own card\" shape that fleet (`dashboard/Stat`)\n * and me (`StatCell`, `ParticipationFeeCard` tiles, etc.) each hand-roll.\n * Wraps StatBlock so the inner cell stays single-source.\n */\nexport function StatCard({ pad = 'default', className, ...stat }: StatCardProps) {\n return (\n <div className={cn('oc-stat-card border bg-card', pad === 'sm' ? 'p-3 md:p-4' : 'p-5', className)}>\n <StatBlock {...stat} />\n </div>\n );\n}\n","import type { ReactNode } from 'react';\n\nimport { cn } from '../tokens/cn';\n\nexport type CalloutTone = 'info' | 'warning' | 'destructive' | 'success' | 'muted';\n\nexport interface CalloutProps {\n tone?: CalloutTone;\n /** Optional \"§ \"-prefixed mono header. */\n label?: string;\n /** Optional leading icon, sized by the caller (e.g. lucide `size-4`). */\n icon?: ReactNode;\n /** Body content. */\n children: ReactNode;\n /** Optional trailing action (button / link) pinned to the bottom. */\n action?: ReactNode;\n className?: string;\n}\n\nconst FRAME: Record<CalloutTone, string> = {\n info: 'border-primary/30 bg-primary/5',\n warning: 'border-warning/40 bg-warning/5',\n destructive: 'border-destructive/40 bg-destructive/5',\n success: 'border-success/40 bg-success/5',\n muted: 'border-border bg-muted/20',\n};\n\nconst LABEL: Record<CalloutTone, string> = {\n info: 'text-primary',\n warning: 'text-warning',\n destructive: 'text-destructive',\n success: 'text-success',\n muted: 'text-muted-foreground',\n};\n\n/**\n * Callout — the canonical toned panel (`border-{tone}/40 bg-{tone}/5` + an\n * optional `label-mono` header) reimplemented across stamp, pledge, vote,\n * analytics, and me (HealthBanner / SimulationBanner / FrozenBanner /\n * DangerZone, etc.). One component, five tones. For empty-states with CTAs use\n * EmptyState; for inline term help use HelpHint; this is the general\n * notice/banner frame.\n */\nexport function Callout({ tone = 'info', label, icon, children, action, className }: CalloutProps) {\n return (\n <div className={cn('border p-4 md:p-5', FRAME[tone], className)}>\n {label && (\n <div className={cn('label-mono mb-2 flex items-center gap-1.5', LABEL[tone])}>\n {icon}\n <span>§ {label}</span>\n </div>\n )}\n <div className=\"text-foreground/85 text-sm leading-relaxed\">\n {!label && icon ? (\n <span className={cn('mr-2 inline-flex align-middle', LABEL[tone])}>{icon}</span>\n ) : null}\n {children}\n </div>\n {action && <div className=\"mt-3 flex flex-wrap gap-3\">{action}</div>}\n </div>\n );\n}\n","import { Fragment, type ReactNode } from 'react';\n\nimport { cn } from '../tokens/cn';\n\nexport interface DefinitionItem {\n label: ReactNode;\n value: ReactNode;\n}\n\nexport interface DefinitionListProps {\n items: DefinitionItem[];\n className?: string;\n}\n\n/**\n * DefinitionList — the mono-label / value `<dl>` grid reimplemented in agent's\n * inspector, vote's reveal page, and me (BondAnchorCard, OperatorIdentityCard,\n * FrozenBanner). Labels render in uppercase mono; values align in a second\n * column on wider viewports, stacking on narrow ones. Long values (hashes,\n * addresses) wrap via `break-all`.\n */\nexport function DefinitionList({ items, className }: DefinitionListProps) {\n return (\n <dl\n className={cn(\n 'oc-deflist grid gap-x-5 gap-y-2 text-sm sm:grid-cols-[auto_1fr] sm:items-baseline',\n className\n )}\n >\n {items.map((item, i) => (\n <Fragment key={i}>\n <dt className=\"label-mono text-muted-foreground text-[10px]\">{item.label}</dt>\n <dd className=\"text-foreground font-mono text-xs break-all\">{item.value}</dd>\n </Fragment>\n ))}\n </dl>\n );\n}\n","import type { ElementType, ReactNode } from 'react';\n\nimport { cn } from '../tokens/cn';\n\nexport interface DataRowProps {\n /** Primary content (left-aligned, grows to fill). */\n children: ReactNode;\n /** Trailing metadata pinned right (timestamp, count, status pill). */\n meta?: ReactNode;\n /** Optional action(s) rendered after the meta (button, link). */\n action?: ReactNode;\n /** Element to render as — `li` inside a list, `div` otherwise. */\n as?: ElementType;\n className?: string;\n}\n\n/**\n * DataRow — the \"content left, meta right, optional action\" list row\n * reimplemented across me (federations, incidents, grants, distributions,\n * fee entries) and other dashboards. Pair inside a `divide-y border` list.\n * On narrow viewports content and meta stack; from `sm` up they sit on one\n * baseline-aligned line.\n */\nexport function DataRow({ children, meta, action, as, className }: DataRowProps) {\n const Tag = (as ?? 'div') as ElementType;\n return (\n <Tag\n className={cn(\n 'oc-data-row flex flex-col gap-1 py-3 sm:flex-row sm:items-baseline sm:justify-between sm:gap-4',\n className\n )}\n >\n <div className=\"min-w-0 flex-1\">{children}</div>\n {(meta || action) && (\n <div className=\"flex shrink-0 items-center gap-3 sm:justify-end\">\n {meta && (\n <span className=\"text-muted-foreground font-mono text-[11px] tracking-wide\">\n {meta}\n </span>\n )}\n {action}\n </div>\n )}\n </Tag>\n );\n}\n","import type { ReactNode } from 'react';\n\nimport { cn } from '../tokens/cn';\n\nexport interface PanelProps {\n /** Mono kicker shown above the title (e.g. \"attestations\"). Rendered uppercase. */\n label?: ReactNode;\n /** Section title. */\n title?: ReactNode;\n /** Optional trailing control (a button, link, count) pinned right of the header. */\n action?: ReactNode;\n /** Drop the top divider (use for the first panel in a stack). */\n flush?: boolean;\n className?: string;\n children?: ReactNode;\n}\n\n/**\n * Panel (DataSection) — the titled section that carries a chunk of a\n * data-dense / technical page (telemetry blocks, API sections, dashboard\n * groups). THEME-ADAPTIVE by design: under the cypherpunk skins it is a\n * flat full-width `border-t` divider section (terminal voice); under ember\n * the `.oc-panel` class promotes it to a discrete soft, warm, rounded card\n * (see the data-dense treatments in themes/ember.css). Compose these instead\n * of hand-rolling `border-t py-8` sections so subpages re-skin per theme.\n */\nexport function Panel({ label, title, action, flush, className, children }: PanelProps) {\n const hasHeader = label || title || action;\n return (\n <section className={cn('oc-panel py-8', !flush && 'border-t', className)}>\n {hasHeader && (\n <div className=\"mb-4 flex items-start justify-between gap-3\">\n <div className=\"min-w-0\">\n {label && <div className=\"label-mono text-primary mb-1\">{label}</div>}\n {title && (\n <h2 className=\"font-display text-lg font-bold tracking-tight\">{title}</h2>\n )}\n </div>\n {action && <div className=\"shrink-0\">{action}</div>}\n </div>\n )}\n {children}\n </section>\n );\n}\n","import type { ElementType, ReactNode } from 'react';\n\nimport { cn } from '../tokens/cn';\n\n/**\n * marketing-heading — the two-tone display heading used across consumer\n * landing sections. TwoToneHeading renders a solid lead clause followed by a\n * recoloured muted clause at the same size/weight; MarketingHeading wraps it\n * with an optional mono eyebrow and body paragraph. Use onBrand when it sits\n * on a brand/dark band.\n */\n\nexport interface TwoToneHeadingProps {\n lead: ReactNode;\n muted?: ReactNode;\n as?: ElementType;\n tone?: 'default' | 'onBrand';\n className?: string;\n}\n\nexport function TwoToneHeading({\n lead,\n muted,\n as,\n tone = 'default',\n className,\n}: TwoToneHeadingProps) {\n const Tag = as ?? 'h2';\n const leadColor = tone === 'onBrand' ? 'text-primary-foreground' : 'text-foreground';\n // Lighter, cleaner muted clause so the two-tone contrast reads (matches the\n // designer's light-gray second phrase, not a heavy taupe). On a brand band\n // /60 fell below AA-large (~2.5:1); /75 keeps the two-tone read while staying\n // legible on terracotta.\n const mutedColor = tone === 'onBrand' ? 'text-primary-foreground/75' : 'text-foreground/40';\n return (\n <Tag\n className={cn(\n 'font-extrabold tracking-[-0.02em] leading-[1.0] text-balance',\n 'text-3xl sm:text-4xl md:text-5xl',\n leadColor,\n className,\n )}\n >\n <span>{lead}</span>\n {muted ? <span className={mutedColor}> {muted}</span> : null}\n </Tag>\n );\n}\n\nexport interface MarketingHeadingProps {\n eyebrow?: string;\n lead: ReactNode;\n muted?: ReactNode;\n body?: ReactNode;\n align?: 'start' | 'center';\n tone?: 'default' | 'onBrand';\n as?: ElementType;\n className?: string;\n}\n\nexport function MarketingHeading({\n eyebrow,\n lead,\n muted,\n body,\n align = 'start',\n tone = 'default',\n as,\n className,\n}: MarketingHeadingProps) {\n const centered = align === 'center';\n return (\n <div className={cn('flex flex-col', centered && 'items-center text-center', className)}>\n {eyebrow && (\n <p\n className={cn(\n 'label-mono mb-3',\n tone === 'onBrand' ? 'text-primary-foreground/80' : 'text-primary',\n )}\n >\n {eyebrow}\n </p>\n )}\n <TwoToneHeading\n lead={lead}\n muted={muted}\n as={as}\n tone={tone}\n className={cn('max-w-4xl', centered && 'mx-auto')}\n />\n {body && (\n <p\n className={cn(\n 'mt-4 max-w-2xl text-base sm:text-lg',\n tone === 'onBrand' ? 'text-primary-foreground/80' : 'text-muted-foreground',\n centered && 'mx-auto',\n )}\n >\n {body}\n </p>\n )}\n </div>\n );\n}\n","import type { VariantProps } from 'class-variance-authority';\n\nimport { Slot } from '@radix-ui/react-slot';\nimport { cva } from 'class-variance-authority';\nimport * as React from 'react';\n\nimport { cn } from '../tokens/cn';\n\nconst badgeVariants = cva(\n 'focus-visible:border-ring focus-visible:ring-ring/50 inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-md border px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] [&>svg]:pointer-events-none [&>svg]:size-3',\n {\n variants: {\n variant: {\n default:\n 'bg-primary text-primary-foreground [a&]:hover:bg-primary/90 border-transparent',\n secondary:\n 'bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90 border-transparent',\n destructive:\n 'bg-destructive text-destructive-foreground [a&]:hover:bg-destructive/90 border-transparent',\n warning:\n 'bg-warning text-warning-foreground [a&]:hover:bg-warning/90 border-transparent',\n success:\n 'bg-success text-success-foreground [a&]:hover:bg-success/90 border-transparent',\n info: 'bg-info text-info-foreground [a&]:hover:bg-info/90 border-transparent',\n brand: 'bg-brand-soft text-accent-foreground border-transparent',\n neutral:\n 'bg-foreground text-background [a&]:hover:bg-foreground/90 border-transparent',\n outline: 'text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground',\n },\n },\n defaultVariants: { variant: 'default' },\n }\n);\n\nfunction Badge({\n className,\n variant,\n asChild = false,\n ...props\n}: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & { asChild?: boolean }) {\n const Comp = asChild ? Slot : 'span';\n return (\n <Comp data-slot=\"badge\" className={cn(badgeVariants({ variant }), className)} {...props} />\n );\n}\n\nexport { Badge, badgeVariants };\n","import * as React from 'react';\n\nimport { cn } from '../tokens/cn';\n\nfunction Input({ className, type, ...props }: React.ComponentProps<'input'>) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n 'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground border-input bg-input/30 hover:bg-input/50 dark:bg-input/30 dark:hover:bg-input/50 h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base shadow-xs transition-[color,box-shadow,background-color] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',\n 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',\n className\n )}\n {...props}\n />\n );\n}\n\nexport { Input };\n","import type { VariantProps } from 'class-variance-authority';\n\nimport { cva } from 'class-variance-authority';\nimport * as React from 'react';\n\nimport { cn } from '../tokens/cn';\n\nconst alertVariants = cva(\n 'relative grid w-full grid-cols-[0_1fr] items-start gap-x-0 gap-y-0.5 rounded-md border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current',\n {\n variants: {\n variant: {\n default: 'bg-card text-card-foreground',\n destructive:\n 'text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90',\n success:\n 'text-success bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-success/90',\n warning:\n 'text-warning bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-warning/90',\n },\n },\n defaultVariants: { variant: 'default' },\n }\n);\n\nfunction Alert({\n className,\n variant,\n ...props\n}: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>) {\n return (\n <div\n data-slot=\"alert\"\n role=\"alert\"\n className={cn(alertVariants({ variant }), className)}\n {...props}\n />\n );\n}\n\nfunction AlertTitle({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"alert-title\"\n className={cn('col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight', className)}\n {...props}\n />\n );\n}\n\nfunction AlertDescription({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"alert-description\"\n className={cn(\n 'text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed',\n className\n )}\n {...props}\n />\n );\n}\n\nexport { Alert, AlertTitle, AlertDescription };\n","'use client';\n\nimport * as Dialog from '@radix-ui/react-dialog';\nimport { AlertTriangle } from 'lucide-react';\nimport { useCallback, useEffect, useRef, useState } from 'react';\n\nimport { Button } from './button';\n\n/**\n * Promise-based replacement for `window.confirm` in the house design language.\n * Call `confirm({...})` from anywhere; a single mounted `<ConfirmHost />` renders\n * it. Async (resolves to a boolean) and provider-less by design.\n */\n\nexport interface ConfirmOptions {\n title: string;\n message: string;\n confirmLabel?: string;\n cancelLabel?: string;\n destructive?: boolean;\n}\n\ninterface PendingConfirm extends ConfirmOptions {\n resolve: (ok: boolean) => void;\n}\n\n// Read NODE_ENV without depending on @types/node (this is a browser package).\nconst NODE_ENV = (globalThis as { process?: { env?: { NODE_ENV?: string } } }).process?.env\n ?.NODE_ENV;\n\nlet pending: PendingConfirm | null = null;\nlet notifyHost: (() => void) | null = null;\nlet hostMountCount = 0;\n\nexport function confirm(opts: ConfirmOptions): Promise<boolean> {\n return new Promise<boolean>((resolve) => {\n pending = { ...opts, resolve };\n if (notifyHost) {\n notifyHost();\n } else if (NODE_ENV !== 'production') {\n console.warn('[ConfirmDialog] confirm() called but no <ConfirmHost /> is mounted');\n }\n });\n}\n\n/** Singleton dialog host. Mount once at the app root. */\nexport function ConfirmHost() {\n const [state, setState] = useState<PendingConfirm | null>(null);\n const submittingRef = useRef(false);\n\n useEffect(() => {\n hostMountCount += 1;\n if (hostMountCount > 1 && NODE_ENV !== 'production') {\n console.warn(\n '[ConfirmDialog] multiple <ConfirmHost /> instances mounted — the last one wins'\n );\n }\n notifyHost = () => setState(pending);\n if (pending) setState(pending);\n return () => {\n hostMountCount -= 1;\n notifyHost = null;\n };\n }, []);\n\n const close = useCallback(\n (ok: boolean) => {\n if (submittingRef.current) return;\n submittingRef.current = true;\n state?.resolve(ok);\n pending = null;\n setState(null);\n requestAnimationFrame(() => {\n submittingRef.current = false;\n });\n },\n [state]\n );\n\n if (!state) return null;\n\n return (\n <Dialog.Root open onOpenChange={(open) => !open && close(false)}>\n <Dialog.Portal>\n <Dialog.Overlay className=\"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm\" />\n <Dialog.Content className=\"bg-card border-border fixed top-1/2 left-1/2 z-50 w-[90vw] max-w-md -translate-x-1/2 -translate-y-1/2 border shadow-lg outline-none\">\n <div className=\"terminal-title\">\n <span\n className={\n 'flex items-center gap-1.5 ' +\n (state.destructive ? 'text-destructive' : 'text-primary')\n }\n >\n <AlertTriangle className=\"size-3.5\" />\n {state.title}\n </span>\n </div>\n <div className=\"space-y-4 p-4 sm:p-5\">\n <Dialog.Title className=\"sr-only\">{state.title}</Dialog.Title>\n <Dialog.Description asChild>\n <div className=\"text-muted-foreground font-mono text-xs leading-relaxed whitespace-pre-wrap [overflow-wrap:anywhere]\">\n {state.message}\n </div>\n </Dialog.Description>\n <div className=\"flex flex-wrap items-center justify-end gap-2\">\n <Button\n variant=\"outline\"\n onClick={() => close(false)}\n className=\"font-mono text-[11px] tracking-widest uppercase\"\n >\n {state.cancelLabel ?? 'cancel'}\n </Button>\n <Button\n onClick={() => close(true)}\n className={\n 'font-display tracking-wide uppercase ' +\n (state.destructive\n ? 'bg-destructive text-destructive-foreground hover:bg-destructive/90'\n : '')\n }\n >\n {state.confirmLabel ?? 'confirm'}\n </Button>\n </div>\n </div>\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n );\n}\n","'use client';\n\nimport * as Dialog from '@radix-ui/react-dialog';\nimport { Pencil } from 'lucide-react';\nimport { useCallback, useEffect, useRef, useState } from 'react';\n\nimport { Button } from './button';\nimport { Input } from './input';\nimport { Label } from './label';\n\n/**\n * Promise-based replacement for `window.prompt`, in the house design language.\n * Call `prompt({...})`; mount one `<PromptHost />` at the app root (alongside\n * `<ConfirmHost />`). Supports a masked `secret` input, a matching\n * `confirmField` (\"choose a passphrase, twice\"), and a `validate` hook.\n */\n\nexport interface PromptOptions {\n title: string;\n message?: string;\n label?: string;\n placeholder?: string;\n defaultValue?: string;\n confirmLabel?: string;\n cancelLabel?: string;\n /** Mask the input. */\n secret?: boolean;\n /** Show a second input that must match the first. Implies validation. */\n confirmField?: boolean;\n /** Minimum accepted length. */\n minLength?: number;\n /** Return an error string to block submission, or null to allow it. */\n validate?: (value: string) => string | null;\n}\n\ninterface PendingPrompt extends PromptOptions {\n resolve: (value: string | null) => void;\n}\n\nconst NODE_ENV = (globalThis as { process?: { env?: { NODE_ENV?: string } } }).process?.env\n ?.NODE_ENV;\n\nlet pending: PendingPrompt | null = null;\nlet notifyHost: (() => void) | null = null;\nlet hostMountCount = 0;\n\n/** Open a prompt dialog. Resolves to the entered string, or null if cancelled. */\nexport function prompt(opts: PromptOptions): Promise<string | null> {\n return new Promise<string | null>((resolve) => {\n pending = { ...opts, resolve };\n if (notifyHost) {\n notifyHost();\n } else if (NODE_ENV !== 'production') {\n console.warn('[PromptDialog] prompt() called but no <PromptHost /> is mounted');\n }\n });\n}\n\nexport function PromptHost() {\n const [state, setState] = useState<PendingPrompt | null>(null);\n const [value, setValue] = useState('');\n const [confirmValue, setConfirmValue] = useState('');\n const [error, setError] = useState<string | null>(null);\n const submittingRef = useRef(false);\n\n useEffect(() => {\n hostMountCount += 1;\n if (hostMountCount > 1 && NODE_ENV !== 'production') {\n console.warn('[PromptDialog] multiple <PromptHost /> instances mounted');\n }\n notifyHost = () => {\n setValue(pending?.defaultValue ?? '');\n setConfirmValue('');\n setError(null);\n setState(pending);\n };\n if (pending) notifyHost();\n return () => {\n hostMountCount -= 1;\n notifyHost = null;\n };\n }, []);\n\n const close = useCallback(\n (result: string | null) => {\n if (submittingRef.current) return;\n submittingRef.current = true;\n state?.resolve(result);\n pending = null;\n setState(null);\n requestAnimationFrame(() => {\n submittingRef.current = false;\n });\n },\n [state]\n );\n\n const submit = useCallback(() => {\n if (!state) return;\n const v = value;\n if (state.minLength && v.length < state.minLength) {\n setError(`must be at least ${state.minLength} characters`);\n return;\n }\n if (state.confirmField && v !== confirmValue) {\n setError('the two entries do not match');\n return;\n }\n if (state.validate) {\n const msg = state.validate(v);\n if (msg) {\n setError(msg);\n return;\n }\n }\n close(v);\n }, [state, value, confirmValue, close]);\n\n if (!state) return null;\n\n return (\n <Dialog.Root open onOpenChange={(open) => !open && close(null)}>\n <Dialog.Portal>\n <Dialog.Overlay className=\"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm\" />\n <Dialog.Content\n className=\"bg-card border-border fixed top-1/2 left-1/2 z-50 w-[90vw] max-w-md -translate-x-1/2 -translate-y-1/2 border shadow-lg outline-none\"\n onKeyDown={(e) => {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault();\n submit();\n }\n }}\n >\n <div className=\"terminal-title\">\n <span className=\"text-primary flex items-center gap-1.5\">\n <Pencil className=\"size-3.5\" />\n {state.title}\n </span>\n </div>\n <div className=\"space-y-4 p-4 sm:p-5\">\n <Dialog.Title className=\"sr-only\">{state.title}</Dialog.Title>\n {state.message && (\n <Dialog.Description asChild>\n <div className=\"text-muted-foreground font-mono text-xs leading-relaxed whitespace-pre-wrap\">\n {state.message}\n </div>\n </Dialog.Description>\n )}\n <div>\n {state.label && <Label>{state.label}</Label>}\n <Input\n autoFocus\n type={state.secret ? 'password' : 'text'}\n value={value}\n onChange={(e) => {\n setValue(e.target.value);\n setError(null);\n }}\n placeholder={state.placeholder}\n autoComplete=\"off\"\n spellCheck={false}\n className={\n (state.label ? 'mt-2 ' : '') + (state.secret ? 'font-mono' : '')\n }\n />\n </div>\n {state.confirmField && (\n <div>\n <Label>confirm</Label>\n <Input\n type={state.secret ? 'password' : 'text'}\n value={confirmValue}\n onChange={(e) => {\n setConfirmValue(e.target.value);\n setError(null);\n }}\n placeholder=\"re-enter to confirm\"\n autoComplete=\"off\"\n spellCheck={false}\n className={'mt-2 ' + (state.secret ? 'font-mono' : '')}\n />\n </div>\n )}\n {error && <p className=\"text-destructive font-mono text-xs\">{error}</p>}\n <div className=\"flex flex-wrap items-center justify-end gap-2\">\n <Button\n variant=\"outline\"\n onClick={() => close(null)}\n className=\"font-mono text-[11px] tracking-widest uppercase\"\n >\n {state.cancelLabel ?? 'cancel'}\n </Button>\n <Button onClick={submit} className=\"font-display tracking-wide uppercase\">\n {state.confirmLabel ?? 'ok'}\n </Button>\n </div>\n </div>\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n );\n}\n","'use client';\n\nimport * as Popover from '@radix-ui/react-popover';\nimport * as React from 'react';\n\nimport { cn } from '../tokens/cn';\n\n/**\n * `<Tooltip>` — the family's hover/focus tooltip primitive.\n *\n * Built on `@radix-ui/react-popover` (already a dependency — we do NOT add\n * `@radix-ui/react-tooltip`) but driven by a *controlled* open boolean so we\n * own the timing and gating Radix's popover doesn't give a tooltip:\n *\n * - hover-intent: opens after `openDelay`ms of sustained pointer hover,\n * closes after a short `closeDelay` grace (WCAG 1.4.13 hoverable).\n * - keyboard parity: also opens on keyboard focus (detected via input-\n * modality, since `:focus-visible` isn't applied yet inside the focus\n * event), closes on blur/Escape, never steals or traps focus.\n * - pointer-fine only: the hover path is gated behind\n * `(hover: hover) and (pointer: fine)` so it never fires on touch — by\n * pointer *type*, not a width breakpoint (a coarse tablet ≥ sm is touch).\n * - `disabled`: a hard force-close, used by `OcLogoDropdown` so the tip and\n * the family menu (which share a trigger) can never paint at once.\n *\n * The content is decorative reinforcement: it's `aria-hidden`, and\n * `pointer-events-none` so a mis-detected pointer can never intercept the\n * click path to the trigger. The authoritative accessible name belongs on the\n * trigger's own `aria-label`.\n */\n\nconst TOOLTIP_SURFACE_CLASS =\n 'bg-popover text-popover-foreground border-border rounded-md border p-2.5 shadow-md';\n\n// Same idiom as the popover/dialog primitives, a touch faster (tooltips are\n// lighter than dialogs) with a smaller 4px travel. Reduced-motion is handled\n// globally by the family `prefers-reduced-motion` reset — nothing to add here.\nconst TOOLTIP_MOTION_CLASS =\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-1 data-[side=top]:slide-in-from-bottom-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 origin-(--radix-popover-content-transform-origin) duration-150 ease-out';\n\nexport interface TooltipProps {\n /** The tooltip body. */\n content: React.ReactNode;\n /** A single trigger element (a `<button>` etc.); receives the hover/focus wiring. */\n children: React.ReactElement;\n side?: 'top' | 'right' | 'bottom' | 'left';\n align?: 'start' | 'center' | 'end';\n sideOffset?: number;\n collisionPadding?: number;\n /** ms of sustained hover before opening. Default 300 (deliberate, not twitchy). */\n openDelay?: number;\n /** ms grace before closing on pointer-leave. Default 90. */\n closeDelay?: number;\n /** Force the tooltip closed regardless of hover/focus (e.g. while a shared menu is open). */\n disabled?: boolean;\n /** Portal to `<body>` (default true). Set false to keep content inline so it inherits a scoped `data-oc-theme`. */\n portal?: boolean;\n /** z-index utility for the content. Default `z-50`. */\n zIndexClassName?: string;\n contentClassName?: string;\n}\n\ninterface TriggerHandlerProps {\n onPointerEnter?: React.PointerEventHandler;\n onPointerLeave?: React.PointerEventHandler;\n onPointerDown?: React.PointerEventHandler;\n onFocus?: React.FocusEventHandler;\n onBlur?: React.FocusEventHandler;\n onKeyDown?: React.KeyboardEventHandler;\n}\n\nfunction compose<E>(theirs: ((e: E) => void) | undefined, ours: (e: E) => void) {\n return (e: E) => {\n theirs?.(e);\n ours(e);\n };\n}\n\n/**\n * Input-modality tracker (the `:focus-visible` polyfill heuristic).\n * `:focus-visible` is NOT reliably applied synchronously inside the `focus`\n * event, so reading `el.matches(':focus-visible')` there misses keyboard focus.\n * Instead we record the last input type from global capture-phase listeners\n * that fire BEFORE focus: a keydown means the focus that follows is keyboard-\n * driven (show the hint); a pointerdown means it's a click (don't — that would\n * flash the tip over the menu).\n */\nlet lastInputWasKeyboard = false;\nlet modalityInstalled = false;\nfunction installModalityTracking() {\n if (modalityInstalled || typeof window === 'undefined') return;\n modalityInstalled = true;\n window.addEventListener('keydown', () => (lastInputWasKeyboard = true), true);\n window.addEventListener('pointerdown', () => (lastInputWasKeyboard = false), true);\n}\n\nexport function Tooltip({\n content,\n children,\n side = 'bottom',\n align = 'start',\n sideOffset = 8,\n collisionPadding = 12,\n openDelay = 300,\n closeDelay = 90,\n disabled = false,\n portal = true,\n zIndexClassName = 'z-50',\n contentClassName,\n}: TooltipProps) {\n const [hovering, setHovering] = React.useState(false);\n const [focusing, setFocusing] = React.useState(false);\n const [isFinePointer, setIsFinePointer] = React.useState(false);\n const openTimer = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n const closeTimer = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n\n // Detect a true mouse (fine pointer + real hover). Defaults false for SSR\n // and first client render, then resolves in the effect — a normal post-mount\n // update, not a hydration mismatch.\n React.useEffect(() => {\n installModalityTracking();\n const mq = window.matchMedia('(hover: hover) and (pointer: fine)');\n const apply = () => setIsFinePointer(mq.matches);\n apply();\n mq.addEventListener('change', apply);\n return () => mq.removeEventListener('change', apply);\n }, []);\n\n const clearTimers = React.useCallback(() => {\n if (openTimer.current) clearTimeout(openTimer.current);\n if (closeTimer.current) clearTimeout(closeTimer.current);\n }, []);\n\n React.useEffect(() => clearTimers, [clearTimers]);\n\n // When force-closed (e.g. the shared menu opened), drop the hover latch so\n // the tip doesn't snap back with no delay the instant the menu closes while\n // the pointer is still over the trigger. `focusing` is left alone — a\n // keyboard user who stays focused should still get the immediate hint.\n React.useEffect(() => {\n if (disabled) {\n clearTimers();\n setHovering(false);\n }\n }, [disabled, clearTimers]);\n\n const handlePointerEnter = () => {\n if (!isFinePointer) return;\n if (closeTimer.current) clearTimeout(closeTimer.current);\n openTimer.current = setTimeout(() => setHovering(true), openDelay);\n };\n const handlePointerLeave = () => {\n if (openTimer.current) clearTimeout(openTimer.current);\n closeTimer.current = setTimeout(() => setHovering(false), closeDelay);\n };\n // The first press of EITHER a single- or double-click tears the tip down\n // before the trigger's own onClick toggles a menu, so it never overlaps.\n const handlePointerDown = () => {\n clearTimers();\n setHovering(false);\n setFocusing(false);\n };\n const handleFocus = () => {\n // Only keyboard focus reveals the hint — a mouse click also focuses the\n // trigger, and re-popping the tip over an opening menu would be the bug.\n // Use the modality flag (set before focus fires) rather than\n // `:focus-visible`, which isn't applied yet inside the focus event.\n if (lastInputWasKeyboard) {\n clearTimers();\n setFocusing(true);\n }\n };\n const handleBlur = () => {\n clearTimers();\n setFocusing(false);\n };\n // Escape dismisses the focus-revealed tip without moving focus (WCAG 1.4.13).\n // Handled on the focused trigger directly — robust regardless of Radix's\n // dismissal internals (we suppress its focus-outside dismissal below).\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if (e.key === 'Escape') {\n clearTimers();\n setHovering(false);\n setFocusing(false);\n }\n };\n\n const effectiveOpen = !disabled && ((isFinePointer && hovering) || focusing);\n\n const extra: TriggerHandlerProps = {};\n const childProps = children.props as TriggerHandlerProps;\n extra.onPointerEnter = compose(childProps.onPointerEnter, handlePointerEnter);\n extra.onPointerLeave = compose(childProps.onPointerLeave, handlePointerLeave);\n extra.onPointerDown = compose(childProps.onPointerDown, handlePointerDown);\n extra.onFocus = compose(childProps.onFocus, handleFocus);\n extra.onBlur = compose(childProps.onBlur, handleBlur);\n extra.onKeyDown = compose(childProps.onKeyDown, handleKeyDown);\n const trigger = React.cloneElement(children, extra);\n\n const contentEl = (\n <Popover.Content\n side={side}\n align={align}\n sideOffset={sideOffset}\n collisionPadding={collisionPadding}\n aria-hidden\n onOpenAutoFocus={(e) => e.preventDefault()}\n onCloseAutoFocus={(e) => e.preventDefault()}\n // The tip is aria-hidden + non-focusable, so focus legitimately\n // stays on the trigger (outside the content). Don't let Radix's\n // focus-outside dismissal close a focus-revealed tip; Escape and\n // pointer-down-outside still dismiss.\n onFocusOutside={(e) => e.preventDefault()}\n className={cn(\n TOOLTIP_SURFACE_CLASS,\n TOOLTIP_MOTION_CLASS,\n 'pointer-events-none',\n zIndexClassName,\n contentClassName\n )}\n >\n {content}\n </Popover.Content>\n );\n\n return (\n <Popover.Root\n open={effectiveOpen}\n onOpenChange={(o) => {\n // Radix requests close on Escape / outside interaction — sync our\n // own state so a re-hover re-arms cleanly. We never open via Radix.\n if (!o) {\n clearTimers();\n setHovering(false);\n setFocusing(false);\n }\n }}\n modal={false}\n >\n <Popover.Anchor asChild>{trigger}</Popover.Anchor>\n {portal ? <Popover.Portal>{contentEl}</Popover.Portal> : contentEl}\n </Popover.Root>\n );\n}\n","'use client';\n\nimport * as AccordionPrimitive from '@radix-ui/react-accordion';\nimport { ChevronDown, Plus } from 'lucide-react';\nimport * as React from 'react';\n\nimport { cn } from '../tokens/cn';\n\nconst Accordion = AccordionPrimitive.Root;\n\nconst AccordionItem = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <AccordionPrimitive.Item ref={ref} className={cn('border-b', className)} {...props} />\n));\nAccordionItem.displayName = 'AccordionItem';\n\nconst AccordionTrigger = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger> & {\n /** Toggle glyph: a rotating chevron (default) or a marketing plus that\n * turns into an ✕ on open, tinted with the brand. */\n icon?: 'chevron' | 'plusMinus';\n }\n>(({ className, children, icon = 'chevron', ...props }, ref) => (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n ref={ref}\n className={cn(\n 'flex flex-1 items-center justify-between gap-4 py-4 text-left font-medium transition-all hover:underline',\n icon === 'chevron'\n ? '[&[data-state=open]>svg]:rotate-180'\n : '[&[data-state=open]>svg]:rotate-45',\n className\n )}\n {...props}\n >\n {children}\n {icon === 'chevron' ? (\n <ChevronDown className=\"h-4 w-4 shrink-0 transition-transform duration-200\" />\n ) : (\n <Plus className=\"text-primary h-5 w-5 shrink-0 transition-transform duration-200\" />\n )}\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n));\nAccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;\n\nconst AccordionContent = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <AccordionPrimitive.Content\n ref={ref}\n className=\"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm transition-all\"\n {...props}\n >\n <div className={cn('pt-0 pb-4', className)}>{children}</div>\n </AccordionPrimitive.Content>\n));\nAccordionContent.displayName = AccordionPrimitive.Content.displayName;\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent };\n","import type { VariantProps } from 'class-variance-authority';\n\nimport { cva } from 'class-variance-authority';\nimport * as React from 'react';\n\nimport { cn } from '../tokens/cn';\n\nconst surfaceVariants = cva('rounded-xl transition-colors', {\n variants: {\n tone: {\n /* Crisp panel floating on the page — the default soft card. */\n default: 'bg-card text-card-foreground',\n /* Warm-gray recessed panel. */\n muted: 'bg-muted text-foreground',\n /* Solid brand fill — small terracotta panel; inverts child text. */\n brand: 'bg-brand text-brand-foreground',\n /* High-contrast neutral panel (near-black in light, near-white in dark). */\n contrast: 'bg-foreground text-background',\n /* Translucent lightened tile for cards sitting ON a brand band. */\n onBrand:\n 'text-brand-foreground [background:color-mix(in_oklch,white_16%,var(--brand))] [border-color:color-mix(in_oklch,white_24%,transparent)]',\n /* Frame only, transparent fill. */\n outline: 'bg-transparent text-foreground',\n },\n elevation: {\n none: 'shadow-none',\n sm: 'shadow-sm',\n md: 'shadow-md',\n lg: 'shadow-lg',\n xl: 'shadow-xl',\n },\n bordered: {\n true: 'border',\n false: '',\n },\n pad: {\n none: 'p-0',\n sm: 'p-4',\n md: 'p-5 sm:p-6',\n lg: 'p-6 sm:p-8',\n },\n },\n defaultVariants: {\n tone: 'default',\n elevation: 'sm',\n bordered: true,\n pad: 'md',\n },\n});\n\nexport interface SurfaceProps\n extends Omit<React.ComponentProps<'div'>, 'color'>,\n VariantProps<typeof surfaceVariants> {}\n\n/**\n * Surface — the soft, large-radius, elevated panel that the warm theme sits on.\n *\n * The package `Card` is a TERMINAL-window frame (mono title strip, terminal\n * dots) for dashboards; Surface is its plain marketing/consumer counterpart —\n * a bg-card panel with token-routed radius + soft elevation and no chrome.\n * Re-skins per skin via the radius + shadow tokens. Use this for feature cards,\n * sign-in cards, trust chips — anything that is NOT a terminal panel.\n */\nexport function Surface({\n className,\n tone,\n elevation,\n bordered,\n pad,\n ...props\n}: SurfaceProps) {\n return (\n <div\n data-slot=\"surface\"\n className={cn(surfaceVariants({ tone, elevation, bordered, pad }), className)}\n {...props}\n />\n );\n}\n\nexport { surfaceVariants };\n","import type { VariantProps } from 'class-variance-authority';\n\nimport { cva } from 'class-variance-authority';\nimport * as React from 'react';\n\nimport { cn } from '../tokens/cn';\n\nconst iconBadgeVariants = cva(\n 'inline-flex shrink-0 items-center justify-center rounded-md font-semibold [&_svg]:pointer-events-none',\n {\n variants: {\n tone: {\n /* The signature peach tile — soft accent fill, terracotta glyph.\n Auto-swaps to warm-dark + light-peach in dark mode via tokens. */\n peach: 'bg-accent text-accent-foreground',\n /* Inverted near-black tile, light glyph (\"never do\" promises). */\n dark: 'bg-foreground text-background',\n /* Solid brand tile. */\n brand: 'bg-primary text-primary-foreground',\n /* White tile on a brand band, terracotta glyph (numbered steps). */\n onBrand: 'bg-brand-foreground text-primary',\n /* Quiet neutral tile. */\n muted: 'bg-muted text-foreground',\n /* Crisp white (card-colored) tile with a terracotta glyph and a\n soft lift — the elevated icon chip on muted/colored cards. */\n surface: 'bg-card text-primary shadow-sm',\n },\n size: {\n sm: 'size-9 text-xs [&_svg]:size-4',\n md: 'size-11 text-sm [&_svg]:size-5',\n lg: 'size-12 text-base [&_svg]:size-6',\n xl: 'size-14 text-lg [&_svg]:size-7',\n },\n },\n defaultVariants: { tone: 'peach', size: 'md' },\n }\n);\n\nexport interface IconBadgeProps\n extends Omit<React.ComponentProps<'span'>, 'color'>,\n VariantProps<typeof iconBadgeVariants> {}\n\n/**\n * IconBadge — a rounded-square tile holding a lucide icon OR a number/short\n * label. The theme's most-reused decorative atom (feature-card icons, numbered\n * steps, the verified chip). Distinct from the text `Badge` pill: this is a\n * fixed-size square tile. Tones map to skin tokens so the same markup recolours\n * across skins and light/dark (peach ↔ warm-dark).\n *\n * <IconBadge tone=\"peach\"><Lock /></IconBadge>\n * <IconBadge tone=\"onBrand\" size=\"sm\">1</IconBadge>\n */\nexport function IconBadge({ className, tone, size, children, ...props }: IconBadgeProps) {\n return (\n <span\n data-slot=\"icon-badge\"\n className={cn(iconBadgeVariants({ tone, size }), className)}\n {...props}\n >\n {children}\n </span>\n );\n}\n\nexport { iconBadgeVariants };\n","import type { ReactNode } from 'react';\n\nimport { IconBadge, Surface } from '../primitives';\nimport { cn } from '../tokens/cn';\n\nexport interface FeatureCardProps {\n /** Optional leading glyph — a lucide icon sized by IconBadge. */\n icon?: ReactNode;\n iconTone?: 'peach' | 'dark' | 'brand' | 'onBrand' | 'muted' | 'surface';\n title: ReactNode;\n children?: ReactNode;\n orientation?: 'vertical' | 'horizontal';\n align?: 'start' | 'center';\n tone?: 'default' | 'muted' | 'onBrand';\n elevation?: 'none' | 'sm' | 'md' | 'lg';\n className?: string;\n}\n\n/**\n * FeatureCard — the soft Surface tile that carries a feature: an IconBadge, a\n * title, and a line of body copy. The marketing-grid workhorse. Stack them\n * vertically in a feature grid, or go horizontal for a tighter list row.\n */\nexport function FeatureCard({\n icon,\n iconTone = 'peach',\n title,\n children,\n orientation = 'vertical',\n align = 'start',\n tone = 'default',\n elevation = 'sm',\n className,\n}: FeatureCardProps) {\n const horizontal = orientation === 'horizontal';\n const centered = !horizontal && align === 'center';\n\n return (\n <Surface\n tone={tone}\n elevation={elevation}\n pad={horizontal ? 'md' : 'lg'}\n className={cn(\n 'flex h-full',\n horizontal ? 'flex-row gap-4' : 'flex-col',\n centered && 'items-center text-center',\n className\n )}\n >\n {icon && (\n <IconBadge\n tone={iconTone}\n size=\"lg\"\n className={cn(horizontal ? 'shrink-0' : 'mb-4')}\n >\n {icon}\n </IconBadge>\n )}\n <div className={cn(horizontal && 'min-w-0')}>\n <h3 className=\"text-lg font-semibold\">{title}</h3>\n {children && (\n <p className=\"text-muted-foreground mt-1.5 text-sm leading-relaxed\">\n {children}\n </p>\n )}\n </div>\n </Surface>\n );\n}\n","import type { ReactNode } from 'react';\n\nimport { cn } from '../tokens/cn';\n\nexport interface SectionProps {\n /** Background band: neutral page, recessed gray, brand fill, or a forced-dark band on a light page. */\n tone?: 'default' | 'muted' | 'brand' | 'dark';\n /** Inner width: centered container, wide max-w-screen-2xl, or full-bleed. */\n width?: 'default' | 'wide' | 'full';\n /** Diagonal texture overlay; defaults on only for tone='brand'. */\n diagonal?: boolean;\n id?: string;\n className?: string;\n innerClassName?: string;\n children: ReactNode;\n}\n\nconst TONE: Record<NonNullable<SectionProps['tone']>, string> = {\n default: 'bg-background text-foreground',\n muted: 'bg-muted text-foreground',\n brand: 'bg-brand text-brand-foreground',\n // `dark` activates the .dark variant locally so descendant package\n // components render their dark arm even on an otherwise light page.\n dark: 'dark bg-background text-foreground',\n};\n\nconst WIDTH: Record<NonNullable<SectionProps['width']>, string> = {\n default: 'container',\n wide: 'mx-auto w-full max-w-screen-2xl px-4 sm:px-6 lg:px-8',\n full: '',\n};\n\n/**\n * Section — the full-bleed marketing band: a tone-routed background stripe with\n * vertical rhythm and a width-capped inner. Stack these to build a landing page;\n * use tone='dark' to force a dark band on a light page. BrandBand is the\n * brand-tone shorthand.\n */\nexport function Section({\n tone = 'default',\n width = 'default',\n diagonal,\n id,\n className,\n innerClassName,\n children,\n}: SectionProps) {\n const showDiagonal = diagonal ?? tone === 'brand';\n return (\n <div\n id={id}\n className={cn('w-full', TONE[tone], showDiagonal && 'oc-diagonal', className)}\n >\n <div className={cn('py-16 sm:py-20 md:py-24', WIDTH[width], innerClassName)}>\n {children}\n </div>\n </div>\n );\n}\n\n/** BrandBand — Section pinned to the brand tone. */\nexport function BrandBand(props: SectionProps) {\n return <Section tone=\"brand\" {...props} />;\n}\n","import type { ReactNode } from 'react';\n\nimport { Check, X } from 'lucide-react';\n\nimport { cn } from '../tokens/cn';\n\nexport interface ComparisonRow {\n label: ReactNode;\n theirs: ReactNode;\n ours: ReactNode;\n}\n\nexport interface ComparisonTableProps {\n rows: ComparisonRow[];\n columns?: { feature?: string; theirs: string; ours: string };\n className?: string;\n}\n\n/**\n * ComparisonTable — a two-column \"them vs us\" feature matrix for marketing pages.\n * the ours column is tinted (bg-accent/40) and its checks read text-primary; the\n * theirs column reads muted with X glyphs. skin-agnostic, scrolls on small screens.\n */\nexport function ComparisonTable({ rows, columns, className }: ComparisonTableProps) {\n const cols = { feature: '', theirs: 'A normal login', ours: 'OrangeCheck', ...columns };\n return (\n <div className={cn('overflow-hidden rounded-xl border', className)}>\n <div className=\"overflow-x-auto\">\n <div className=\"min-w-[32rem]\">\n <div className=\"grid grid-cols-[1.4fr_1fr_1fr]\">\n <div className=\"label-mono text-muted-foreground px-4 py-3.5 sm:px-6\">\n {cols.feature}\n </div>\n <div className=\"px-4 py-3.5 font-semibold text-foreground sm:px-6\">\n {cols.theirs}\n </div>\n <div className=\"bg-accent/60 border-border/60 border-l px-4 py-3.5 font-semibold text-primary sm:px-6\">\n {cols.ours}\n </div>\n </div>\n {rows.map((row, i) => (\n <div key={i} className=\"grid grid-cols-[1.4fr_1fr_1fr] border-t\">\n <div className=\"px-4 py-3.5 font-medium text-foreground sm:px-6\">\n {row.label}\n </div>\n <div className=\"text-muted-foreground flex items-center gap-2 px-4 py-3.5 sm:px-6\">\n <X className=\"text-muted-foreground/70 size-4\" />\n <span>{row.theirs}</span>\n </div>\n <div className=\"bg-accent/40 border-border/60 flex items-center gap-2 border-l px-4 py-3.5 text-foreground sm:px-6\">\n <Check className=\"size-4 text-primary\" />\n <span>{row.ours}</span>\n </div>\n </div>\n ))}\n </div>\n </div>\n </div>\n );\n}\n","import type { ReactNode } from 'react';\n\nimport { IconBadge, Surface } from '../primitives';\nimport { cn } from '../tokens/cn';\n\n/**\n * NumberedStep / StepList — the marketing \"how it works\" sequence: a peach\n * numbered tile, a title, and a short body, laid out in a responsive grid.\n * Use for 2–4 step walkthroughs on a landing page; pass tone='onBrand' when\n * the list sits on a terracotta band.\n */\n\nexport interface Step {\n title: ReactNode;\n children?: ReactNode;\n}\n\nexport interface NumberedStepProps {\n n: number;\n title: ReactNode;\n children?: ReactNode;\n tone?: 'default' | 'onBrand';\n card?: boolean;\n className?: string;\n}\n\nexport function NumberedStep({\n n,\n title,\n children,\n tone = 'default',\n card = false,\n className,\n}: NumberedStepProps) {\n const onBrand = tone === 'onBrand';\n const body = (\n <div className={cn(!card && className)}>\n <IconBadge tone={onBrand ? 'onBrand' : 'peach'} size=\"sm\">\n {n}\n </IconBadge>\n <div className=\"mt-4 text-lg font-semibold\">{title}</div>\n {children && (\n <div\n className={cn(\n 'mt-1.5 text-sm leading-relaxed',\n onBrand ? 'text-brand-foreground/80' : 'text-muted-foreground'\n )}\n >\n {children}\n </div>\n )}\n </div>\n );\n\n if (!card) return body;\n\n return (\n <Surface\n tone={onBrand ? 'onBrand' : 'default'}\n elevation={onBrand ? 'none' : 'sm'}\n pad=\"md\"\n className={className}\n >\n {body}\n </Surface>\n );\n}\n\nexport interface StepListProps {\n steps: Step[];\n variant?: 'bare' | 'card';\n tone?: 'default' | 'onBrand';\n columns?: 2 | 3 | 4;\n className?: string;\n}\n\nconst COLUMNS: Record<2 | 3 | 4, string> = {\n 2: 'md:grid-cols-2',\n 3: 'md:grid-cols-3',\n 4: 'md:grid-cols-4',\n};\n\nexport function StepList({\n steps,\n variant = 'bare',\n tone = 'default',\n columns = 3,\n className,\n}: StepListProps) {\n return (\n <div className={cn('grid gap-6 sm:grid-cols-2 sm:gap-8', COLUMNS[columns], className)}>\n {steps.map((step, index) => (\n <NumberedStep\n key={index}\n n={index + 1}\n title={step.title}\n tone={tone}\n card={variant === 'card'}\n >\n {step.children}\n </NumberedStep>\n ))}\n </div>\n );\n}\n","'use client';\n\nimport type { ReactNode } from 'react';\n\nimport { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '../primitives';\nimport { cn } from '../tokens/cn';\n\nexport interface FaqItem {\n q: ReactNode;\n a: ReactNode;\n}\n\nexport interface FaqProps {\n items: FaqItem[];\n /** Index of the item open on first render; omit for all collapsed. */\n defaultOpen?: number;\n className?: string;\n}\n\n/**\n * Faq — a plus/minus accordion list of question/answer pairs for the bottom of\n * a marketing page. single-open, collapsible. re-skins via the underlying\n * Accordion primitive.\n */\nexport function Faq({ items, defaultOpen, className }: FaqProps) {\n return (\n <Accordion\n type=\"single\"\n collapsible\n defaultValue={defaultOpen != null ? String(defaultOpen) : undefined}\n className={cn('w-full', className)}\n >\n {items.map((item, i) => (\n <AccordionItem key={i} value={String(i)}>\n <AccordionTrigger\n icon=\"plusMinus\"\n className=\"text-foreground text-base font-semibold\"\n >\n {item.q}\n </AccordionTrigger>\n <AccordionContent className=\"text-muted-foreground leading-relaxed\">\n {item.a}\n </AccordionContent>\n </AccordionItem>\n ))}\n </Accordion>\n );\n}\n","'use client';\n\nimport type { ReactNode } from 'react';\n\nimport { cn } from '../tokens/cn';\nimport { Button, Input } from '../primitives';\n\nexport interface EmailCaptureProps {\n /** Native form action (e.g. a serverless handler or list endpoint). */\n action?: string;\n /** Native form method. */\n method?: string;\n /** Client-side submit handler — preventDefault yourself if intercepting. */\n onSubmit?: (e: React.FormEvent<HTMLFormElement>) => void;\n /** Input name attribute. */\n name?: string;\n placeholder?: string;\n /** Submit button label. */\n cta?: ReactNode;\n /** Small reassurance line under the row (e.g. \"no spam, unsubscribe anytime\"). */\n note?: ReactNode;\n /** `onBrand` for placement on a terracotta/dark band. */\n tone?: 'default' | 'onBrand';\n className?: string;\n}\n\n/**\n * EmailCapture — the inline waitlist / newsletter row: a pill email field plus a\n * pill submit, with an optional fine-print note. drop it in a hero or footer\n * band; `tone='onBrand'` flips the field translucent + button white for dark\n * brand bands.\n */\nexport function EmailCapture({\n action,\n method,\n onSubmit,\n name = 'email',\n placeholder = 'you@email.com',\n cta = 'Join the waitlist',\n note,\n tone = 'default',\n className,\n}: EmailCaptureProps) {\n const onBrand = tone === 'onBrand';\n return (\n <form action={action} method={method} onSubmit={onSubmit} className={cn(className)}>\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-center\">\n <Input\n type=\"email\"\n name={name}\n required\n placeholder={placeholder}\n className={cn(\n 'rounded-full text-base md:text-sm',\n onBrand &&\n '[background:color-mix(in_oklch,white_18%,transparent)] placeholder:text-primary-foreground/60 border-transparent text-primary-foreground'\n )}\n />\n <Button type=\"submit\" variant={onBrand ? 'onBrand' : 'default'} className=\"rounded-full\">\n {cta}\n </Button>\n </div>\n {note && (\n <p\n className={cn(\n 'mt-3 text-sm',\n onBrand ? 'text-primary-foreground/70' : 'text-muted-foreground'\n )}\n >\n {note}\n </p>\n )}\n </form>\n );\n}\n","import type { ReactNode } from 'react';\n\nimport { Check } from 'lucide-react';\n\nimport { cn } from '../tokens/cn';\n\nexport interface CheckListProps {\n /** Each item: a check glyph + this label. */\n items: ReactNode[];\n orientation?: 'horizontal' | 'vertical';\n tone?: 'default' | 'onBrand';\n className?: string;\n}\n\n/**\n * CheckList — a compact run of checkmarked points. use horizontal under a hero\n * or CTA for an inline \"what you get\" row; vertical for a small feature stack.\n * `tone=\"onBrand\"` when it sits on a brand/dark band.\n */\nexport function CheckList({\n items,\n orientation = 'horizontal',\n tone = 'default',\n className,\n}: CheckListProps) {\n const glyph = tone === 'onBrand' ? 'text-brand-foreground' : 'text-primary';\n const label = tone === 'onBrand' ? 'text-brand-foreground/90' : 'text-foreground';\n\n return (\n <ul\n className={cn(\n orientation === 'horizontal'\n ? 'flex flex-wrap gap-x-6 gap-y-2 text-sm'\n : 'flex flex-col gap-2 text-sm',\n className\n )}\n >\n {items.map((item, i) => (\n <li key={i} className={cn('inline-flex items-center gap-2', label)}>\n <Check className={cn('size-4 shrink-0', glyph)} />\n {item}\n </li>\n ))}\n </ul>\n );\n}\n","import type { ReactNode } from 'react';\n\nimport { cn } from '../tokens/cn';\n\n/**\n * AccentNote — a left-bar aside for a single emphasized line of copy. Use for a\n * caveat, footnote, or pull-quote beside body text. AccentList is the stepped\n * variant: a vertical stack of titled items with one \"active\" entry expanded.\n * Both are skin-agnostic — token colors only — and re-skin per skin + mode.\n */\n\nexport interface AccentNoteProps {\n /** Optional bold lead phrase rendered inline before the body. */\n lead?: ReactNode;\n children: ReactNode;\n tone?: 'default' | 'onBrand';\n className?: string;\n}\n\nexport function AccentNote({ lead, children, tone = 'default', className }: AccentNoteProps) {\n const onBrand = tone === 'onBrand';\n return (\n <div\n className={cn(\n 'border-l-2 pl-4 text-sm leading-relaxed',\n onBrand\n ? 'border-primary-foreground/60 text-primary-foreground/80'\n : 'border-primary text-muted-foreground',\n className,\n )}\n >\n {lead && (\n <strong\n className={cn(\n 'mr-1.5 font-semibold',\n onBrand ? 'text-primary-foreground' : 'text-foreground',\n )}\n >\n {lead}\n </strong>\n )}\n {children}\n </div>\n );\n}\n\nexport interface AccentListItem {\n title: ReactNode;\n children?: ReactNode;\n active?: boolean;\n}\n\nexport interface AccentListProps {\n items: AccentListItem[];\n className?: string;\n}\n\nexport function AccentList({ items, className }: AccentListProps) {\n return (\n <div className={cn('flex flex-col', className)}>\n {items.map((item, i) => (\n <div\n key={i}\n className={cn('border-l-2 py-2 pl-5', item.active ? 'border-primary' : 'border-border')}\n >\n <div\n className={cn(\n 'font-semibold',\n item.active ? 'text-foreground' : 'text-muted-foreground',\n )}\n >\n {item.title}\n </div>\n {item.active && item.children && (\n <div className=\"text-muted-foreground mt-1 text-sm leading-relaxed\">\n {item.children}\n </div>\n )}\n </div>\n ))}\n </div>\n );\n}\n","import type { ReactNode } from 'react';\n\nimport { Check } from 'lucide-react';\n\nimport { IconBadge, Surface } from '../primitives';\nimport { cn } from '../tokens/cn';\n\nexport interface VerifiedChipProps {\n /** Leading glyph; defaults to a lucide Check. */\n icon?: ReactNode;\n /** Tone of the icon tile. */\n iconTone?: 'peach' | 'dark' | 'brand' | 'onBrand' | 'muted';\n /** Short trust phrase, e.g. \"verified on bitcoin\". */\n label: ReactNode;\n className?: string;\n}\n\n/**\n * VerifiedChip — a small floating trust chip (icon tile + short label) on a soft\n * elevated pill. drop it over a hero or card edge to mark something as verified.\n */\nexport function VerifiedChip({ icon, iconTone = 'peach', label, className }: VerifiedChipProps) {\n return (\n <Surface\n elevation=\"lg\"\n pad=\"none\"\n className={cn('inline-flex items-center gap-3 rounded-full px-3 py-2', className)}\n >\n <IconBadge tone={iconTone} size=\"sm\">\n {icon ?? <Check />}\n </IconBadge>\n <span className=\"pr-2 text-sm font-semibold text-foreground\">{label}</span>\n </Surface>\n );\n}\n","import { Boxes, Check, ChevronDown } from 'lucide-react';\nimport Link from 'next/link';\nimport { useEffect, useRef, useState } from 'react';\n\n/**\n * EcosystemSwitcher — cross-product dropdown for jumping between every\n * site in the OrangeCheck family. Drop one into every site's LayoutHeader\n * and mark the active site via the `current` prop.\n *\n * <EcosystemSwitcher current=\"lock\" />\n *\n * The component is dependency-self-contained: no Radix, no Headless UI,\n * just outside-click + Escape handling so it works identically in every\n * site without forcing a peer-dep upgrade. Every link stays in-tab — the\n * family is one app from the user's POV.\n */\n\nexport type EcosystemSlug =\n | 'home'\n | 'docs'\n | 'fleet'\n | 'me'\n | 'vault'\n | 'chat'\n | 'cosign'\n | 'btc'\n | 'globe'\n | 'attest'\n | 'lock'\n | 'vote'\n | 'stamp'\n | 'agent'\n | 'pledge'\n | 'analytics'\n | 'bot'\n | 'forge';\n\ninterface SwitcherEntry {\n slug: EcosystemSlug;\n href: string;\n label: string;\n sub: string;\n docsHref: string;\n}\n\nconst ENTRIES: SwitcherEntry[] = [\n {\n slug: 'home',\n href: 'https://ochk.io',\n label: 'orangecheck',\n sub: 'umbrella',\n docsHref: 'https://docs.ochk.io',\n },\n {\n slug: 'docs',\n href: 'https://docs.ochk.io',\n label: 'oc·docs',\n sub: 'unified docs',\n docsHref: 'https://docs.ochk.io',\n },\n {\n slug: 'me',\n href: 'https://me.ochk.io',\n label: 'oc·me',\n sub: 'earn — consumer identity',\n docsHref: 'https://docs.ochk.io/me',\n },\n {\n slug: 'vault',\n href: 'https://vault.ochk.io',\n label: 'oc·vault',\n sub: 'keep — encrypted secrets',\n docsHref: 'https://docs.ochk.io/vault',\n },\n {\n slug: 'chat',\n href: 'https://chat.ochk.io',\n label: 'oc·chat',\n sub: 'message — encrypted chat',\n docsHref: 'https://docs.ochk.io/chat',\n },\n {\n slug: 'cosign',\n href: 'https://cosign.ochk.io',\n label: 'oc·cosign',\n sub: 'cofound — get behind builders',\n docsHref: 'https://docs.ochk.io/cosign',\n },\n {\n slug: 'btc',\n href: 'https://btc.ochk.io',\n label: 'oc·btc',\n sub: 'read — bitcoin desk',\n docsHref: 'https://btc.ochk.io/data',\n },\n {\n slug: 'globe',\n href: 'https://globe.ochk.io',\n label: 'oc·globe',\n sub: 'watch — the network, live',\n docsHref: 'https://globe.ochk.io/sources',\n },\n {\n slug: 'attest',\n href: 'https://attest.ochk.io',\n label: 'oc·attest',\n sub: 'am — sybil resistance',\n docsHref: 'https://docs.ochk.io/attest',\n },\n {\n slug: 'lock',\n href: 'https://lock.ochk.io',\n label: 'oc·lock',\n sub: 'whisper — encryption',\n docsHref: 'https://docs.ochk.io/lock',\n },\n {\n slug: 'vote',\n href: 'https://vote.ochk.io',\n label: 'oc·vote',\n sub: 'decide — polls',\n docsHref: 'https://docs.ochk.io/vote',\n },\n {\n slug: 'stamp',\n href: 'https://stamp.ochk.io',\n label: 'oc·stamp',\n sub: 'declare — block-anchored',\n docsHref: 'https://docs.ochk.io/stamp',\n },\n {\n slug: 'agent',\n href: 'https://agent.ochk.io',\n label: 'oc·agent',\n sub: 'delegate — scoped auth',\n docsHref: 'https://docs.ochk.io/agent',\n },\n {\n slug: 'pledge',\n href: 'https://pledge.ochk.io',\n label: 'oc·pledge',\n sub: 'swear — bonded commitment',\n docsHref: 'https://docs.ochk.io/pledge',\n },\n];\n\n/** Entries gated behind `showOwnerEntries={true}`. Owner-only family\n * properties (`oc·analytics` at analytics.ochk.io, `oc·bot` at\n * bot.ochk.io) live here so they're invisible to everyone except\n * verified owners — the JWT claim drives the gate. */\nconst OWNER_ENTRIES: SwitcherEntry[] = [\n {\n slug: 'fleet',\n href: 'https://fleet.ochk.io',\n label: 'oc·fleet',\n sub: 'managed — agent fleet',\n docsHref: 'https://fleet.ochk.io',\n },\n {\n slug: 'analytics',\n href: 'https://analytics.ochk.io',\n label: 'oc·analytics',\n sub: 'owner cockpit',\n docsHref: 'https://analytics.ochk.io',\n },\n {\n slug: 'bot',\n href: 'https://bot.ochk.io',\n label: 'oc·bot',\n sub: 'social bot',\n docsHref: 'https://bot.ochk.io',\n },\n {\n slug: 'forge',\n href: 'https://forge.ochk.io',\n label: 'oc·forge',\n sub: 'agent ops',\n docsHref: 'https://forge.ochk.io',\n },\n];\n\nexport interface EcosystemSwitcherProps {\n current: EcosystemSlug;\n className?: string;\n /**\n * When true, append the owner-only entries (currently\n * `oc·analytics`) to the family-switcher dropdown. Consumers\n * pass this from their session: `useOcSession().account?.isOwner`.\n * Defaults to false so non-owners never see owner-only links.\n *\n * Not a security boundary — analytics.ochk.io re-checks the\n * live OWNER_OC_ADDRESSES env on every request. This prop only\n * decides whether the UX hint is visible.\n */\n showOwnerEntries?: boolean;\n}\n\nexport function EcosystemSwitcher({\n current,\n className,\n showOwnerEntries = false,\n}: EcosystemSwitcherProps) {\n const [open, setOpen] = useState(false);\n const containerRef = useRef<HTMLDivElement | null>(null);\n\n // Outside-click + Escape close.\n useEffect(() => {\n if (!open) return;\n function onDoc(e: MouseEvent) {\n if (!containerRef.current) return;\n if (!containerRef.current.contains(e.target as Node)) setOpen(false);\n }\n function onKey(e: KeyboardEvent) {\n if (e.key === 'Escape') setOpen(false);\n }\n document.addEventListener('mousedown', onDoc);\n document.addEventListener('keydown', onKey);\n return () => {\n document.removeEventListener('mousedown', onDoc);\n document.removeEventListener('keydown', onKey);\n };\n }, [open]);\n\n return (\n <div ref={containerRef} className={'relative ' + (className ?? '')}>\n <button\n type=\"button\"\n aria-haspopup=\"menu\"\n aria-expanded={open}\n aria-label=\"Switch OrangeCheck product\"\n title=\"Switch product\"\n onClick={() => setOpen((v) => !v)}\n className={\n 'inline-flex items-center gap-1 px-2 py-1 transition-colors ' +\n (open\n ? 'text-foreground'\n : 'text-muted-foreground hover:text-foreground')\n }\n >\n <Boxes className=\"h-4 w-4\" />\n <ChevronDown\n className={\n 'h-3.5 w-3.5 transition-transform ' + (open ? 'rotate-180' : '')\n }\n />\n </button>\n\n {open && (\n <div\n role=\"menu\"\n aria-label=\"Switch OrangeCheck product\"\n className=\"bg-background absolute right-0 top-full z-[60] mt-2 w-72 border shadow-lg\"\n >\n <div className=\"label-mono text-primary border-b px-4 py-2\">\n § the family\n </div>\n <ul className=\"py-1\">\n {[...ENTRIES, ...(showOwnerEntries ? OWNER_ENTRIES : [])].map((e) => {\n const isActive = e.slug === current;\n return (\n <li key={e.slug}>\n <Link\n href={e.href}\n onClick={() => setOpen(false)}\n aria-current={isActive ? 'page' : undefined}\n className={\n 'group flex items-baseline gap-3 px-4 py-2 transition-colors ' +\n (isActive\n ? 'bg-primary/5'\n : 'hover:bg-muted')\n }\n >\n <span\n className={\n 'font-display flex-1 text-[12px] font-semibold tracking-tight ' +\n (isActive\n ? 'text-primary'\n : 'text-foreground group-hover:text-primary transition-colors')\n }\n >\n {e.label}\n </span>\n <span className=\"text-muted-foreground font-mono text-[10px] tracking-wider uppercase\">\n {e.sub}\n </span>\n {isActive && (\n <Check className=\"text-primary h-3 w-3\" />\n )}\n </Link>\n </li>\n );\n })}\n </ul>\n <div className=\"border-t px-4 py-2 font-mono text-[10px] tracking-widest uppercase\">\n <Link\n href=\"https://docs.ochk.io\"\n onClick={() => setOpen(false)}\n className=\"text-muted-foreground hover:text-foreground inline-block transition-colors\"\n >\n docs.ochk.io →\n </Link>\n </div>\n </div>\n )}\n </div>\n );\n}\n","/**\n * Family-property registry — the single source of truth for every\n * orangecheck-family site. Both `<OcLogoDropdown>` (the global logo →\n * property switcher) and `<OcAccountMenu>` (the global signed-in\n * account chip) read from this table, so a one-line edit here ripples\n * to every consumer simultaneously.\n *\n * Adding a new family member means appending one entry below. Removing\n * one means deleting the entry. There are no other call sites to chase.\n */\n\nimport type { EcosystemSlug } from './ecosystem-switcher';\n\nexport type FamilyCategory = 'hub' | 'product' | 'protocol' | 'owner';\n\nexport interface FamilyProperty {\n /** Stable URL-safe identifier (e.g. `'vault'`). */\n slug: EcosystemSlug;\n /** Absolute origin (e.g. `'https://vault.ochk.io'`). */\n origin: string;\n /** Bare hostname (e.g. `'vault.ochk.io'`). Used in account-menu headers. */\n hostname: string;\n /** Wordmark label (e.g. `'oc·vault'`). */\n label: string;\n /** Short tagline (verb — what-it-does), shown under the wordmark in the menu. */\n sub: string;\n /** Docs deep-link (e.g. `'https://docs.ochk.io/vault'`). */\n docsHref: string;\n /** Family-level category that shapes the visual chip + menu sectioning. */\n category: FamilyCategory;\n}\n\nexport const FAMILY_PROPERTIES: ReadonlyArray<FamilyProperty> = [\n {\n slug: 'home',\n origin: 'https://ochk.io',\n hostname: 'ochk.io',\n label: 'orangecheck',\n sub: 'umbrella · sign-in',\n docsHref: 'https://docs.ochk.io',\n category: 'hub',\n },\n {\n slug: 'docs',\n origin: 'https://docs.ochk.io',\n hostname: 'docs.ochk.io',\n label: 'oc·docs',\n sub: 'unified reference',\n docsHref: 'https://docs.ochk.io',\n category: 'hub',\n },\n {\n slug: 'me',\n origin: 'https://me.ochk.io',\n hostname: 'me.ochk.io',\n label: 'oc·me',\n sub: 'earn — consumer identity',\n docsHref: 'https://docs.ochk.io/me',\n category: 'product',\n },\n {\n slug: 'vault',\n origin: 'https://vault.ochk.io',\n hostname: 'vault.ochk.io',\n label: 'oc·vault',\n sub: 'keep — encrypted secrets',\n docsHref: 'https://docs.ochk.io/vault',\n category: 'product',\n },\n {\n slug: 'chat',\n origin: 'https://chat.ochk.io',\n hostname: 'chat.ochk.io',\n label: 'oc·chat',\n sub: 'message — encrypted chat',\n docsHref: 'https://docs.ochk.io/chat',\n category: 'product',\n },\n {\n slug: 'cosign',\n origin: 'https://cosign.ochk.io',\n hostname: 'cosign.ochk.io',\n label: 'oc·cosign',\n sub: 'cofound — get behind builders',\n docsHref: 'https://docs.ochk.io/cosign',\n category: 'product',\n },\n {\n slug: 'btc',\n origin: 'https://btc.ochk.io',\n hostname: 'btc.ochk.io',\n label: 'oc·btc',\n sub: 'read — bitcoin desk',\n docsHref: 'https://btc.ochk.io/data',\n category: 'product',\n },\n {\n slug: 'globe',\n origin: 'https://globe.ochk.io',\n hostname: 'globe.ochk.io',\n label: 'oc·globe',\n sub: 'watch — the network, live',\n docsHref: 'https://globe.ochk.io/sources',\n category: 'product',\n },\n {\n slug: 'attest',\n origin: 'https://attest.ochk.io',\n hostname: 'attest.ochk.io',\n label: 'oc·attest',\n sub: 'am — sybil resistance',\n docsHref: 'https://docs.ochk.io/attest',\n category: 'protocol',\n },\n {\n slug: 'lock',\n origin: 'https://lock.ochk.io',\n hostname: 'lock.ochk.io',\n label: 'oc·lock',\n sub: 'whisper — encryption',\n docsHref: 'https://docs.ochk.io/lock',\n category: 'protocol',\n },\n {\n slug: 'vote',\n origin: 'https://vote.ochk.io',\n hostname: 'vote.ochk.io',\n label: 'oc·vote',\n sub: 'decide — polls',\n docsHref: 'https://docs.ochk.io/vote',\n category: 'protocol',\n },\n {\n slug: 'stamp',\n origin: 'https://stamp.ochk.io',\n hostname: 'stamp.ochk.io',\n label: 'oc·stamp',\n sub: 'declare — block-anchored',\n docsHref: 'https://docs.ochk.io/stamp',\n category: 'protocol',\n },\n {\n slug: 'agent',\n origin: 'https://agent.ochk.io',\n hostname: 'agent.ochk.io',\n label: 'oc·agent',\n sub: 'delegate — scoped auth',\n docsHref: 'https://docs.ochk.io/agent',\n category: 'protocol',\n },\n {\n slug: 'pledge',\n origin: 'https://pledge.ochk.io',\n hostname: 'pledge.ochk.io',\n label: 'oc·pledge',\n sub: 'swear — bonded commitment',\n docsHref: 'https://docs.ochk.io/pledge',\n category: 'protocol',\n },\n {\n slug: 'fleet',\n origin: 'https://fleet.ochk.io',\n hostname: 'fleet.ochk.io',\n label: 'oc·fleet',\n sub: 'managed — agent fleet',\n docsHref: 'https://fleet.ochk.io',\n category: 'owner',\n },\n {\n slug: 'analytics',\n origin: 'https://analytics.ochk.io',\n hostname: 'analytics.ochk.io',\n label: 'oc·analytics',\n sub: 'owner cockpit',\n docsHref: 'https://analytics.ochk.io',\n category: 'owner',\n },\n {\n slug: 'bot',\n origin: 'https://bot.ochk.io',\n hostname: 'bot.ochk.io',\n label: 'oc·bot',\n sub: 'social bot',\n docsHref: 'https://bot.ochk.io',\n category: 'owner',\n },\n {\n slug: 'forge',\n origin: 'https://forge.ochk.io',\n hostname: 'forge.ochk.io',\n label: 'oc·forge',\n sub: 'agent ops',\n docsHref: 'https://forge.ochk.io',\n category: 'owner',\n },\n];\n\n/**\n * Canonical lifecycle states for any family site. Used by both the\n * tiny chip rendered next to the wordmark and any other surface that\n * wants to display \"this site is still settling\" UX. Centralised\n * vocabulary so we can't accidentally drift to a parallel synonym\n * like `preview`/`experimental` on different sites.\n *\n * - `live` — production-ready; **no chip rendered** (the absence\n * of a chip is the affordance)\n * - `beta` — feature-complete but still iterating, soft launch\n * - `alpha` — early, breaking changes expected, integrators beware\n */\nexport type SiteState = 'alpha' | 'beta' | 'live';\n\nexport const SITE_STATE_LABEL: Record<Exclude<SiteState, 'live'>, string> = {\n alpha: 'alpha',\n beta: 'beta',\n};\n\n/** Find a property entry by its slug. */\nexport function findFamilyProperty(slug: EcosystemSlug): FamilyProperty | undefined {\n return FAMILY_PROPERTIES.find((p) => p.slug === slug);\n}\n","import { Check, ChevronDown, CornerDownLeft } from 'lucide-react';\nimport Link from 'next/link';\nimport { useRouter } from 'next/router';\nimport * as React from 'react';\nimport { useEffect, useId, useRef, useState, type ReactNode } from 'react';\n\nimport { Tooltip } from '../primitives/tooltip';\nimport { cn } from '../tokens/cn';\nimport type { EcosystemSlug } from './ecosystem-switcher';\nimport {\n FAMILY_PROPERTIES,\n SITE_STATE_LABEL,\n findFamilyProperty,\n type FamilyCategory,\n type SiteState,\n} from './family-properties';\n\n/**\n * `<OcLogoDropdown>` — the logo IS the dropdown.\n *\n * Wraps a site's local LogoMark + wordmark in a button that, on click,\n * drops a popover listing every OrangeCheck family property. The current\n * property is highlighted with a primary-tinted background, a left-edge\n * accent bar, and a \"home\" label — and is itself a clickable link to\n * the local home href (default `/`).\n *\n * Family properties carry one of three categories:\n *\n * - `hub` — orangecheck umbrella + docs (no badge)\n * - `product` — commercial products (me, vault, fleet) · primary chip\n * - `protocol` — open verb specs (attest, lock, vote, stamp, agent,\n * pledge) · muted chip\n *\n * The category of the *current* site is auto-rendered as a tiny mono\n * chip inside the trigger button, and the dropdown itself groups\n * entries by category with subtle mono dividers — so the product /\n * protocol distinction is visible both on the logo and in the menu,\n * with a single source of truth (`./family-properties.ts`).\n *\n * The optional `siteState` prop renders a second tiny chip after the\n * category chip — `alpha` or `beta` — for sites that aren't `live`.\n * The vocabulary is canonical across the family (see SiteState in\n * family-properties.ts). Pass it from your per-site config so a\n * single edit propagates to the logo, the account menu, and anywhere\n * else the chip surfaces.\n *\n * Mobile-aware: the popover's width is clamped to the viewport,\n * content scrolls when there are more entries than fit. The trigger\n * chips hide below `sm` to preserve mobile header space — the dropdown\n * itself still shows the grouping.\n *\n * On a fine pointer (mouse) the trigger reveals a themed `<Tooltip>` on\n * hover, and on keyboard focus — naming where you are and the two\n * affordances (`click · switch site`, `double-click · home`). It replaces\n * the old native `title=` (unthemed, undelayed, invisible on touch) and is\n * never shown on touch, where the menu's `home ✓` row is the path home.\n */\n\nconst SECTIONS: Array<{ category: FamilyCategory; label: string }> = [\n { category: 'hub', label: 'hub' },\n { category: 'product', label: 'products' },\n { category: 'protocol', label: 'protocols' },\n { category: 'owner', label: 'owner' },\n];\n\nexport interface OcLogoDropdownProps {\n /**\n * Which property this site IS. Used to highlight the active row,\n * route the active row's link to `homeHref` instead of the cross-\n * domain absolute URL, and pick the category chip rendered next\n * to the wordmark.\n */\n current: EcosystemSlug;\n /**\n * The site's local home path (for the active row). Default `/`.\n * Always a same-origin path — the logo's \"go home\" affordance is\n * preserved by clicking the highlighted row.\n */\n homeHref?: string;\n /**\n * Optional lifecycle state for this site. `'live'` (default) renders\n * no chip; `'alpha'` and `'beta'` render a small mono uppercase chip\n * after the category badge. Drive this from your per-site config so\n * one constant change ripples to every surface.\n */\n siteState?: SiteState;\n /**\n * Logo contents · typically `<LogoMark />` + `<span>oc·X</span>`.\n */\n children: ReactNode;\n /** className for the outer container. */\n className?: string;\n /** className for the trigger button. */\n triggerClassName?: string;\n /** className for the popover. */\n popoverClassName?: string;\n /**\n * When true, include the `owner` section (currently just\n * `oc·analytics`) in the family list. Consumers pass this from\n * their session: `useOcSession().account?.isOwner ?? false`.\n * Defaults to false so non-owners never see the entry.\n *\n * Not a security boundary — analytics.ochk.io re-checks the live\n * OWNER_OC_ADDRESSES env on every request. This prop only\n * controls UX visibility.\n */\n showOwnerEntries?: boolean;\n}\n\nfunction CategoryChip({ category }: { category: FamilyCategory }) {\n if (category === 'hub') return null;\n const label =\n category === 'product' ? 'product' : category === 'protocol' ? 'protocol' : 'owner';\n const tone =\n category === 'product'\n ? 'border-primary/25 bg-primary/10 text-primary'\n : category === 'protocol'\n ? 'border-muted-foreground/20 bg-muted/40 text-muted-foreground/85'\n : 'border-warning/30 bg-warning/10 text-warning';\n return (\n <span\n aria-label={\n category === 'product'\n ? 'commercial product'\n : category === 'protocol'\n ? 'protocol reference'\n : 'owner-only surface'\n }\n className={\n 'ml-1 hidden rounded-sm border px-1.5 py-[1px] font-mono text-[9px] font-medium tracking-widest uppercase sm:inline-block ' +\n tone\n }\n data-oc-category={category}\n >\n {label}\n </span>\n );\n}\n\nfunction SiteStateBadge({ state }: { state: SiteState }) {\n if (state === 'live') return null;\n return (\n <span\n aria-label={`site lifecycle: ${state}`}\n className=\"text-muted-foreground/70 ml-1 hidden font-mono text-[9px] font-medium tracking-widest uppercase sm:inline-block\"\n data-oc-site-state={state}\n >\n {SITE_STATE_LABEL[state]}\n </span>\n );\n}\n\nfunction MenuCategoryChip({ category }: { category: FamilyCategory }) {\n if (category === 'hub') return null;\n const label =\n category === 'product' ? 'pro' : category === 'protocol' ? 'spec' : 'own';\n const tone =\n category === 'product'\n ? 'bg-primary/10 text-primary'\n : category === 'protocol'\n ? 'bg-muted/60 text-muted-foreground/80'\n : 'bg-warning/15 text-warning';\n return (\n <span\n aria-hidden\n className={\n 'inline-block shrink-0 rounded-sm px-1 py-[1px] font-mono text-[9px] font-medium tracking-widest uppercase ' +\n tone\n }\n >\n {label}\n </span>\n );\n}\n\n/**\n * The hover/focus tooltip body — three rows that the native `title=` used to\n * hide: where you are, then `click · switch site` and `double-click · home`.\n * Decorative reinforcement of the trigger's `aria-label` (the tooltip itself\n * is `aria-hidden`); the same `CornerDownLeft` glyph as the in-menu home hint.\n */\nfunction SwitcherTooltipCard({ current }: { current: EcosystemSlug }) {\n const prop = findFamilyProperty(current);\n return (\n <div className=\"w-[13rem] max-w-[calc(100vw-1.5rem)]\">\n <div className=\"flex flex-col leading-tight\">\n <span className=\"flex flex-wrap items-baseline gap-x-1.5\">\n <span className=\"text-muted-foreground font-mono text-[9px] tracking-widest uppercase\">\n you’re on\n </span>\n <span className=\"text-primary font-display text-[12px] font-semibold tracking-tight\">\n {prop?.label ?? 'orangecheck family'}\n </span>\n </span>\n {prop?.sub && (\n <span className=\"text-muted-foreground mt-0.5 font-mono text-[10px] tracking-wide\">\n {prop.sub}\n </span>\n )}\n </div>\n <div className=\"border-border -mx-2.5 my-2 border-t\" />\n <div className=\"flex items-center gap-1.5\">\n <ChevronDown aria-hidden className=\"text-muted-foreground h-3 w-3 shrink-0\" />\n <span className=\"text-primary font-mono text-[10px] font-medium tracking-widest uppercase\">\n click\n </span>\n <span className=\"text-muted-foreground font-mono text-[10px]\">·</span>\n <span className=\"text-muted-foreground font-mono text-[10px] tracking-wide\">\n switch site\n </span>\n </div>\n <div className=\"mt-1.5 flex items-center gap-1.5\">\n <CornerDownLeft aria-hidden className=\"text-muted-foreground h-3 w-3 shrink-0\" />\n <span className=\"text-primary font-mono text-[10px] font-medium tracking-widest uppercase\">\n double-click\n </span>\n <span className=\"text-muted-foreground font-mono text-[10px]\">·</span>\n <span className=\"text-muted-foreground font-mono text-[10px] tracking-wide\">\n home\n </span>\n </div>\n </div>\n );\n}\n\nexport function OcLogoDropdown({\n current,\n homeHref = '/',\n siteState = 'live',\n children,\n className,\n triggerClassName,\n popoverClassName,\n showOwnerEntries = false,\n}: OcLogoDropdownProps) {\n const [open, setOpen] = useState(false);\n const containerRef = useRef<HTMLDivElement | null>(null);\n const menuId = useId();\n const router = useRouter();\n\n const currentCategory: FamilyCategory = findFamilyProperty(current)?.category ?? 'hub';\n\n /**\n * Trigger click semantics:\n *\n * single-click → toggle the family dropdown\n * double-click → navigate to `homeHref` (the local landing)\n *\n * `MouseEvent.detail` is the running click count for clicks within\n * the browser's double-click threshold (~500ms). The DOM still\n * fires the `click` event on the first tap, so the dropdown\n * momentarily opens during a double-click — and the second click\n * navigates home. That's the visual story the popover-side hint\n * sells: *open · tap again · home.*\n */\n function handleTriggerClick(e: React.MouseEvent<HTMLButtonElement>) {\n if (e.detail >= 2) {\n e.preventDefault();\n setOpen(false);\n void router.push(homeHref);\n return;\n }\n setOpen((v) => !v);\n }\n\n // Outside-click + Escape close.\n useEffect(() => {\n if (!open) return;\n function onDoc(e: MouseEvent) {\n if (!containerRef.current) return;\n if (!containerRef.current.contains(e.target as Node)) setOpen(false);\n }\n function onKey(e: KeyboardEvent) {\n if (e.key === 'Escape') setOpen(false);\n }\n document.addEventListener('mousedown', onDoc);\n document.addEventListener('keydown', onKey);\n return () => {\n document.removeEventListener('mousedown', onDoc);\n document.removeEventListener('keydown', onKey);\n };\n }, [open]);\n\n return (\n <div\n ref={containerRef}\n className={'relative inline-flex items-center ' + (className ?? '')}\n data-oc-logo-dropdown=\"\"\n data-oc-current-category={currentCategory}\n data-oc-site-state={siteState}\n >\n <Tooltip\n content={<SwitcherTooltipCard current={current} />}\n disabled={open}\n side=\"bottom\"\n align=\"start\"\n sideOffset={8}\n zIndexClassName=\"z-[70]\"\n >\n <button\n type=\"button\"\n aria-haspopup=\"menu\"\n aria-expanded={open}\n aria-controls={menuId}\n aria-label=\"orangecheck family menu\"\n onClick={handleTriggerClick}\n className={cn(\n // focus indicator is guaranteed even if a consumer overrides triggerClassName\n 'focus-visible:ring-primary/60 rounded-sm focus-visible:ring-2 focus-visible:outline-none',\n triggerClassName ??\n 'group hover:bg-accent/30 -mx-1.5 -my-1 flex min-h-[40px] items-center gap-2 rounded-sm px-1.5 py-1 transition-colors ' +\n (open ? 'bg-accent/20' : '')\n )}\n data-oc-logo-dropdown-trigger=\"\"\n data-oc-logo-dropdown-open={open ? 'true' : 'false'}\n >\n {children}\n <CategoryChip category={currentCategory} />\n <SiteStateBadge state={siteState} />\n <ChevronDown\n aria-hidden\n className={\n 'text-muted-foreground/70 group-hover:text-foreground/80 h-3.5 w-3.5 shrink-0 transition-transform duration-200 ' +\n (open ? 'rotate-180' : '')\n }\n />\n </button>\n </Tooltip>\n {/* Home affordance · a sibling Link to the trigger button\n rather than a child of it (nested buttons would be\n invalid HTML). Fades + slides in when the dropdown is\n open, whispering \"tap again, you'll go home\". Clicking\n the hint navigates directly — works for users who\n discover it before they discover the double-click. The\n subtle motion-safe pulse on the icon nudges the eye\n without shouting. */}\n <Link\n href={homeHref}\n aria-label={'go to ' + homeHref + ' (this site\\'s home)'}\n onClick={() => setOpen(false)}\n tabIndex={open ? 0 : -1}\n className={\n 'hover:text-primary group/home -ml-1 hidden items-center gap-1 rounded-sm px-1.5 py-1 font-mono text-[9px] tracking-widest uppercase transition-all duration-200 sm:inline-flex ' +\n (open\n ? 'pointer-events-auto translate-x-0 text-muted-foreground/70 opacity-100 hover:bg-accent/30'\n : 'pointer-events-none -translate-x-1 opacity-0')\n }\n data-oc-logo-dropdown-home-hint=\"\"\n >\n <CornerDownLeft\n aria-hidden\n className={\n 'h-3 w-3 group-hover/home:text-primary ' +\n (open ? 'motion-safe:animate-pulse' : '')\n }\n />\n <span className=\"text-primary/70 group-hover/home:text-primary\">\n home\n </span>\n </Link>\n\n {open && (\n <div\n id={menuId}\n role=\"menu\"\n aria-label=\"orangecheck family\"\n className={\n popoverClassName ??\n 'bg-background absolute top-full left-0 z-[60] mt-2 w-[min(20rem,calc(100vw-1rem))] border shadow-lg'\n }\n data-oc-logo-dropdown-popover=\"\"\n >\n <div className=\"label-mono text-primary border-b px-4 py-2\">\n § the orangecheck family\n </div>\n <div className=\"max-h-[min(28rem,70vh)] overflow-y-auto py-1\" role=\"none\">\n {SECTIONS.map(({ category, label }) => {\n // Owner-only sections only render when the\n // consumer has explicitly opted in (caller\n // reads `useOcSession().account?.isOwner`).\n // Non-owners simply don't see them.\n if (category === 'owner' && !showOwnerEntries) return null;\n const sectionEntries = FAMILY_PROPERTIES.filter(\n (e) => e.category === category\n );\n if (sectionEntries.length === 0) return null;\n return (\n <div key={category} role=\"none\" data-oc-section={category}>\n <div\n role=\"separator\"\n aria-hidden\n className={\n 'text-muted-foreground/60 px-4 pt-2.5 pb-1 font-mono text-[9px] font-medium tracking-widest uppercase ' +\n (category === 'hub' ? '' : 'border-t mt-1')\n }\n >\n {label}\n </div>\n <ul role=\"none\" className=\"pb-1\">\n {sectionEntries.map((e) => {\n const isActive = e.slug === current;\n const href = isActive ? homeHref : e.origin;\n return (\n <li key={e.slug} role=\"none\">\n <Link\n href={href}\n role=\"menuitem\"\n onClick={() => setOpen(false)}\n aria-current={isActive ? 'page' : undefined}\n className={\n 'group flex items-center gap-2 px-4 py-2 transition-colors ' +\n (isActive\n ? 'bg-primary/8 border-primary -ml-px border-l-2'\n : 'hover:bg-muted -ml-px border-l-2 border-transparent')\n }\n data-oc-logo-dropdown-item={\n isActive ? 'current' : 'sibling'\n }\n data-oc-entry-category={e.category}\n >\n <span className=\"flex min-w-0 flex-1 flex-col leading-tight\">\n <span\n className={\n 'font-display text-[12px] font-semibold tracking-tight ' +\n (isActive\n ? 'text-primary'\n : 'text-foreground group-hover:text-primary transition-colors')\n }\n >\n {e.label}\n </span>\n <span className=\"text-muted-foreground mt-0.5 font-mono text-[10px] tracking-wide\">\n {e.sub}\n </span>\n </span>\n <MenuCategoryChip category={e.category} />\n {isActive ? (\n <span className=\"text-primary inline-flex shrink-0 items-center gap-1 font-mono text-[10px] tracking-widest uppercase\">\n home\n <Check className=\"h-3 w-3\" />\n </span>\n ) : null}\n </Link>\n </li>\n );\n })}\n </ul>\n </div>\n );\n })}\n </div>\n <div className=\"border-t px-4 py-2 font-mono text-[10px] tracking-widest uppercase\">\n <Link\n href=\"https://docs.ochk.io\"\n onClick={() => setOpen(false)}\n className=\"text-muted-foreground hover:text-foreground inline-block transition-colors\"\n >\n docs.ochk.io →\n </Link>\n </div>\n </div>\n )}\n </div>\n );\n}\n","'use client';\n\nimport {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n type ReactNode,\n} from 'react';\n\nimport {\n accentFor,\n DEFAULT_OC_THEME,\n OC_DEFAULT_ACCENT,\n OC_MOTION_COOKIE,\n OC_SKIN_COOKIE,\n OC_THEMES,\n resolveTheme,\n type OcTheme,\n} from './themes';\nimport { OcAurora } from './aurora';\n\ndeclare global {\n interface Window {\n /** Defined by `getOcThemeInitScript()`; recolors favicon + theme-color. */\n __ocApplySkinChrome?: (skin: string) => void;\n }\n}\n\n/**\n * OcThemeProvider — the skin (named-theme) axis.\n *\n * Orthogonal to `next-themes`, which owns light/dark via the `.dark` class.\n * This provider owns the `data-oc-theme` attribute on `<html>` and persists the\n * choice in the `oc_skin` cookie at `Domain=.ochk.io`, so a skin chosen on one\n * `*.ochk.io` site is honored on every other. It re-reads the cookie on focus /\n * visibility change so a fresh choice picks up when the user returns to a tab\n * (same cross-site pickup trick `OcAccountMenu` uses for sign-in).\n *\n * Mount once, inside (or beside) the `next-themes` `<ThemeProvider>`:\n *\n * <ThemeProvider attribute=\"class\" defaultTheme=\"system\" enableSystem>\n * <OcThemeProvider>\n * …app…\n * </OcThemeProvider>\n * </ThemeProvider>\n *\n * Pair with `getOcThemeInitScript()` in `_document` to avoid a flash before\n * hydration.\n */\n\nconst ONE_YEAR = 60 * 60 * 24 * 365;\nconst ATTR = 'data-oc-theme';\nconst MOTION_ATTR = 'data-oc-motion';\n\n/** Ambient-motion switch. `'off'` freezes the aurora and every `.oc-ambient`. */\nexport type OcMotion = 'on' | 'off';\n\nfunction readSkinCookie(): string | null {\n if (typeof document === 'undefined') return null;\n const prefix = `${OC_SKIN_COOKIE}=`;\n for (const part of document.cookie.split(';')) {\n const trimmed = part.trim();\n if (trimmed.startsWith(prefix)) {\n const v = decodeURIComponent(trimmed.slice(prefix.length));\n return v.length > 0 ? v : null;\n }\n }\n return null;\n}\n\nfunction writeSkinCookie(value: string): void {\n if (typeof document === 'undefined') return;\n const isLocal =\n location.hostname === 'localhost' || location.hostname === '127.0.0.1';\n const parts = [\n `${OC_SKIN_COOKIE}=${encodeURIComponent(value)}`,\n 'Path=/',\n `Max-Age=${ONE_YEAR}`,\n 'SameSite=Lax',\n ];\n if (!isLocal) {\n parts.push('Domain=.ochk.io');\n parts.push('Secure');\n }\n document.cookie = parts.join('; ');\n}\n\nfunction applyAttr(skin: string): void {\n if (typeof document === 'undefined') return;\n document.documentElement.setAttribute(ATTR, skin);\n}\n\nfunction readMotionCookie(): OcMotion | null {\n if (typeof document === 'undefined') return null;\n const prefix = `${OC_MOTION_COOKIE}=`;\n for (const part of document.cookie.split(';')) {\n const trimmed = part.trim();\n if (trimmed.startsWith(prefix)) {\n const v = decodeURIComponent(trimmed.slice(prefix.length));\n return v === 'off' ? 'off' : v === 'on' ? 'on' : null;\n }\n }\n return null;\n}\n\nfunction writeMotionCookie(value: OcMotion): void {\n if (typeof document === 'undefined') return;\n const isLocal =\n location.hostname === 'localhost' || location.hostname === '127.0.0.1';\n const parts = [\n `${OC_MOTION_COOKIE}=${encodeURIComponent(value)}`,\n 'Path=/',\n `Max-Age=${ONE_YEAR}`,\n 'SameSite=Lax',\n ];\n if (!isLocal) {\n parts.push('Domain=.ochk.io');\n parts.push('Secure');\n }\n document.cookie = parts.join('; ');\n}\n\n/** Attribute is only present when motion is off — absence means the default. */\nfunction applyMotionAttr(motion: OcMotion): void {\n if (typeof document === 'undefined') return;\n if (motion === 'off') document.documentElement.setAttribute(MOTION_ATTR, 'off');\n else document.documentElement.removeAttribute(MOTION_ATTR);\n}\n\n/**\n * Swap the browser chrome (favicon + `<meta name=\"theme-color\">`) to the skin's\n * accent. The real work lives in the global installed by\n * `getOcThemeInitScript()` (so the favicon's original SVG is captured exactly\n * once, before the init script's own first recolor — avoids re-reading an\n * already-swapped data: URI). If the init script wasn't included, fall back to\n * the theme-color swap alone (favicon recolor needs the captured original).\n */\nfunction applySkinChrome(skin: string): void {\n if (typeof window === 'undefined') return;\n if (typeof window.__ocApplySkinChrome === 'function') {\n window.__ocApplySkinChrome(skin);\n return;\n }\n const meta = document.querySelector('meta[name=\"theme-color\"]');\n if (meta) meta.setAttribute('content', accentFor(skin));\n}\n\ninterface OcSkinContextValue {\n /** Current skin id (always resolved to a known theme). */\n skin: string;\n /** Set the skin: validates, applies the attribute, persists the cookie. */\n setSkin: (id: string) => void;\n /** The full registry, for rendering a picker. */\n themes: readonly OcTheme[];\n /** Ambient-motion switch ('off' pauses aurora + every `.oc-ambient`). */\n motion: OcMotion;\n /** Set ambient motion: applies the attribute, persists the cookie. */\n setMotion: (value: OcMotion) => void;\n}\n\nconst OcSkinContext = createContext<OcSkinContextValue | null>(null);\n\nexport interface OcThemeProviderProps {\n children: ReactNode;\n /** Skin to assume before the cookie is read (defaults to `orangecheck`). */\n defaultSkin?: string;\n /**\n * The ambient bitcoin-aurora background. `true` (default) renders it behind\n * the app; `false` disables it; `{ intensity }` tunes its strength for this\n * site (e.g. `aurora={{ intensity: 0.5 }}` on a reading-heavy surface).\n * OcAuroraGL (the silk-field upgrade) is ON by default (the CSS blobs\n * remain the permanent floor under every failure path). Reading- and\n * console-heavy surfaces opt OUT with `{ gl: false }`.\n */\n aurora?: boolean | { intensity?: number; gl?: boolean };\n}\n\nexport function OcThemeProvider({\n children,\n defaultSkin = DEFAULT_OC_THEME,\n aurora = true,\n}: OcThemeProviderProps) {\n const [skin, setSkinState] = useState<string>(() => resolveTheme(defaultSkin));\n const [motion, setMotionState] = useState<OcMotion>('on');\n const hydratedRef = useRef(false);\n\n // Hydrate from the cookies once on mount and align the attributes.\n useEffect(() => {\n if (hydratedRef.current) return;\n hydratedRef.current = true;\n const fromCookie = resolveTheme(readSkinCookie() ?? defaultSkin);\n applyAttr(fromCookie);\n applySkinChrome(fromCookie);\n setSkinState(fromCookie);\n const motionCookie = readMotionCookie() ?? 'on';\n applyMotionAttr(motionCookie);\n setMotionState(motionCookie);\n }, [defaultSkin]);\n\n // Cross-site pickup: re-read the cookies when the tab regains focus.\n useEffect(() => {\n function sync() {\n const fromCookie = resolveTheme(readSkinCookie() ?? skin);\n if (fromCookie !== skin) {\n applyAttr(fromCookie);\n applySkinChrome(fromCookie);\n setSkinState(fromCookie);\n }\n const motionCookie = readMotionCookie() ?? 'on';\n if (motionCookie !== motion) {\n applyMotionAttr(motionCookie);\n setMotionState(motionCookie);\n }\n }\n window.addEventListener('focus', sync);\n document.addEventListener('visibilitychange', sync);\n return () => {\n window.removeEventListener('focus', sync);\n document.removeEventListener('visibilitychange', sync);\n };\n }, [skin, motion]);\n\n const setSkin = useCallback((id: string) => {\n const next = resolveTheme(id);\n applyAttr(next);\n applySkinChrome(next);\n writeSkinCookie(next);\n setSkinState(next);\n }, []);\n\n const setMotion = useCallback((value: OcMotion) => {\n const next: OcMotion = value === 'off' ? 'off' : 'on';\n applyMotionAttr(next);\n writeMotionCookie(next);\n setMotionState(next);\n }, []);\n\n const value = useMemo<OcSkinContextValue>(\n () => ({ skin, setSkin, themes: OC_THEMES, motion, setMotion }),\n [skin, setSkin, motion, setMotion]\n );\n\n return (\n <OcSkinContext.Provider value={value}>\n {aurora !== false && (\n <OcAurora\n intensity={typeof aurora === 'object' ? aurora.intensity : undefined}\n // OcAuroraGL is the family default (aurora depth R2): a bare\n // provider, `aurora={true}`, or an object without `gl` opts\n // IN. Reading/console surfaces opt OUT with `gl: false`.\n gl={typeof aurora === 'object' ? (aurora.gl ?? true) : true}\n />\n )}\n {children}\n </OcSkinContext.Provider>\n );\n}\n\n/** Read the current skin + setter. Throws if used outside `OcThemeProvider`. */\nexport function useOcSkin(): OcSkinContextValue {\n const ctx = useContext(OcSkinContext);\n if (!ctx) {\n throw new Error('useOcSkin must be used within <OcThemeProvider>');\n }\n return ctx;\n}\n\n/**\n * Read the ambient-motion switch + setter. The WCAG 2.2.2 pause mechanism:\n * `'off'` sets `data-oc-motion=\"off\"` on `<html>` (persisted family-wide in the\n * `oc_motion` cookie), which pauses the aurora and any `.oc-ambient` element.\n * Throws if used outside `OcThemeProvider`.\n */\nexport function useOcMotion(): { motion: OcMotion; setMotion: (value: OcMotion) => void } {\n const { motion, setMotion } = useOcSkin();\n return { motion, setMotion };\n}\n\n/**\n * Blocking init script for `_document` (Pages Router) `<Head>`. Applies the\n * cookie's skin to `<html>` before first paint so there is no flash of the\n * default skin. Inject with:\n *\n * <script dangerouslySetInnerHTML={{ __html: getOcThemeInitScript() }} />\n */\nexport function getOcThemeInitScript(defaultSkin: string = DEFAULT_OC_THEME): string {\n // Self-contained IIFE — no imports available at parse time. Beyond applying\n // the skin attribute before first paint, it installs `window.__ocApplySkinChrome`\n // (the single owner of the favicon + theme-color swap) and runs it for the\n // saved skin. OcThemeProvider re-invokes the same global on later changes, so\n // the favicon's *original* SVG is captured exactly once (before any recolor)\n // and re-recolored from `#f97316` to the active skin's accent. The favicon\n // recolor is async (a fetch of the same-origin favicon.svg) — chrome updates\n // a beat after paint, which is fine; the skin attribute itself is synchronous.\n const accents = Object.fromEntries(OC_THEMES.map((t) => [t.id, t.accent]));\n return (\n `(function(){` +\n `var ACC=${JSON.stringify(accents)},DEF=${JSON.stringify(defaultSkin)},ORIG=${JSON.stringify(OC_DEFAULT_ACCENT)},fav=null;` +\n `function acc(s){return ACC[s]||ACC[DEF]||ORIG;}` +\n `window.__ocApplySkinChrome=function(s){try{` +\n `var a=acc(s);` +\n `var meta=document.querySelector('meta[name=\"theme-color\"]');if(meta){meta.setAttribute('content',a);}` +\n `var link=document.querySelector('link[rel~=\"icon\"][type=\"image/svg+xml\"]');if(!link){return;}` +\n `var paint=function(svg){link.setAttribute('href','data:image/svg+xml,'+encodeURIComponent(svg.split(ORIG).join(a)));};` +\n `if(fav!=null){paint(fav);return;}` +\n `var h=link.getAttribute('href');if(!h||h.indexOf('data:')===0){return;}` +\n `fetch(h).then(function(r){return r.text();}).then(function(svg){fav=svg;paint(svg);}).catch(function(){});` +\n `}catch(e){}};` +\n `try{var m=document.cookie.match(/(?:^|; )${OC_SKIN_COOKIE}=([^;]*)/);var s=m?decodeURIComponent(m[1]):DEF;if(!s){s=DEF;}` +\n `document.documentElement.setAttribute('${ATTR}',s);window.__ocApplySkinChrome(s);}` +\n `catch(e){document.documentElement.setAttribute('${ATTR}',DEF);}` +\n // Ambient-motion pause (oc_motion cookie) applied before first paint so\n // a paused choice never flashes a moving frame. Absence = motion on.\n `try{var mm=document.cookie.match(/(?:^|; )${OC_MOTION_COOKIE}=([^;]*)/);` +\n `if(mm&&decodeURIComponent(mm[1])==='off'){document.documentElement.setAttribute('${MOTION_ATTR}','off');}}` +\n `catch(e){}` +\n `})();`\n );\n}\n","'use client';\n\nimport { Check, Monitor, Moon, Palette, Pause, Sun, Waves } from 'lucide-react';\nimport { useTheme } from 'next-themes';\nimport { useEffect, useRef, useState } from 'react';\n\nimport { cn } from './cn';\nimport { useOcMotion, useOcSkin } from './provider';\n\n/**\n * OcAppearanceMenu — the single header control for ALL appearance settings.\n *\n * One icon button opens a dropdown with both axes:\n * • mode — light / dark / system (next-themes `.dark` class)\n * • theme — the registered skins (data-oc-theme, persisted .ochk.io)\n *\n * Replaces the separate `ThemeToggle` + `OcThemePicker` so every family site\n * carries exactly one appearance control. Self-contained dropdown (no Radix):\n * outside-click + Escape to close. Requires `<OcThemeProvider>` above it (skin\n * axis) and a next-themes `<ThemeProvider>` (mode axis) — both already mounted\n * on every family site.\n */\nexport interface OcAppearanceMenuProps {\n className?: string;\n triggerClassName?: string;\n popoverClassName?: string;\n}\n\nconst MODES = [\n { id: 'light', label: 'light', Icon: Sun },\n { id: 'dark', label: 'dark', Icon: Moon },\n { id: 'system', label: 'system', Icon: Monitor },\n] as const;\n\n/**\n * AppearanceControls — the mode segment + skin list, with no trigger/popover\n * chrome of its own. Embed it anywhere a surface wants to host appearance\n * settings inline (the standalone OcAppearanceMenu popover, the mobile account\n * menu, a site's Sheet drawer). Requires `<OcThemeProvider>` + next-themes\n * above it, like OcAppearanceMenu.\n */\nexport function AppearanceControls({ className }: { className?: string }) {\n const { skin, setSkin, themes } = useOcSkin();\n const { motion, setMotion } = useOcMotion();\n const { theme, setTheme } = useTheme();\n const [mounted, setMounted] = useState(false);\n useEffect(() => setMounted(true), []);\n const activeMode = mounted ? (theme ?? 'system') : null;\n const activeMotion = mounted ? motion : null;\n\n return (\n <div className={className}>\n <div className=\"label-mono text-muted-foreground px-3 pt-3 pb-2\">mode</div>\n <div className=\"grid grid-cols-3 gap-1 px-2 pb-2\">\n {MODES.map(({ id, label, Icon }) => {\n const active = activeMode === id;\n return (\n <button\n key={id}\n type=\"button\"\n role=\"menuitemradio\"\n aria-checked={active}\n onClick={() => setTheme(id)}\n className={cn(\n 'flex flex-col items-center gap-1 rounded-md border py-2 text-[11px] transition-colors',\n active\n ? 'border-primary text-foreground bg-accent'\n : 'border-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground'\n )}\n >\n <Icon className=\"size-4\" aria-hidden />\n {label}\n </button>\n );\n })}\n </div>\n <div className=\"label-mono text-muted-foreground border-t px-3 pt-3 pb-1\">theme</div>\n <ul className=\"pb-1\">\n {themes.map((t) => {\n const active = t.id === skin;\n return (\n <li key={t.id}>\n <button\n type=\"button\"\n role=\"menuitemradio\"\n aria-checked={active}\n onClick={() => setSkin(t.id)}\n className={cn(\n 'hover:bg-accent hover:text-accent-foreground flex w-full items-start gap-2 px-3 py-2 text-left transition-colors',\n active && 'text-foreground'\n )}\n >\n <span className=\"mt-0.5 size-4 shrink-0\">\n {active && <Check className=\"text-primary size-4\" aria-hidden />}\n </span>\n <span className=\"min-w-0\">\n <span className=\"block text-sm font-medium\">{t.label}</span>\n <span className=\"text-muted-foreground block text-xs leading-snug\">\n {t.description}\n </span>\n </span>\n </button>\n </li>\n );\n })}\n </ul>\n <div className=\"label-mono text-muted-foreground border-t px-3 pt-3 pb-2\">\n ambient motion\n </div>\n <div className=\"grid grid-cols-2 gap-1 px-2 pb-3\">\n {(\n [\n { id: 'on', label: 'on', Icon: Waves },\n { id: 'off', label: 'off', Icon: Pause },\n ] as const\n ).map(({ id, label, Icon }) => {\n const active = activeMotion === id;\n return (\n <button\n key={id}\n type=\"button\"\n role=\"menuitemradio\"\n aria-checked={active}\n aria-label={id === 'off' ? 'pause ambient motion' : 'ambient motion on'}\n onClick={() => setMotion(id)}\n className={cn(\n 'flex flex-col items-center gap-1 rounded-md border py-2 text-[11px] transition-colors',\n active\n ? 'border-primary text-foreground bg-accent'\n : 'border-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground'\n )}\n >\n <Icon className=\"size-4\" aria-hidden />\n {label}\n </button>\n );\n })}\n </div>\n </div>\n );\n}\n\nexport function OcAppearanceMenu({\n className,\n triggerClassName,\n popoverClassName,\n}: OcAppearanceMenuProps) {\n const [open, setOpen] = useState(false);\n const rootRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (!open) return;\n function onDown(e: MouseEvent) {\n if (rootRef.current && !rootRef.current.contains(e.target as Node)) setOpen(false);\n }\n function onKey(e: KeyboardEvent) {\n if (e.key === 'Escape') setOpen(false);\n }\n document.addEventListener('mousedown', onDown);\n document.addEventListener('keydown', onKey);\n return () => {\n document.removeEventListener('mousedown', onDown);\n document.removeEventListener('keydown', onKey);\n };\n }, [open]);\n\n return (\n <div ref={rootRef} className={cn('relative', className)}>\n <button\n type=\"button\"\n aria-label=\"appearance settings\"\n aria-haspopup=\"menu\"\n aria-expanded={open}\n title=\"appearance · mode + theme\"\n onClick={() => setOpen((v) => !v)}\n className={cn(\n 'text-muted-foreground hover:text-foreground inline-flex size-9 items-center justify-center rounded-md transition-colors outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50',\n triggerClassName\n )}\n >\n <Palette className=\"size-4\" aria-hidden />\n </button>\n\n {open && (\n <div\n role=\"menu\"\n className={cn(\n 'bg-popover text-popover-foreground absolute right-0 z-50 mt-2 w-64 overflow-hidden rounded-md border shadow-md',\n popoverClassName\n )}\n >\n <AppearanceControls />\n </div>\n )}\n </div>\n );\n}\n","'use client';\n\nimport Link from 'next/link';\nimport { useEffect, useRef, useState, type ReactNode } from 'react';\nimport { Check, Copy, Loader2, Menu, Plus, X } from 'lucide-react';\nimport {\n fetchOcLinkedIdentities,\n useOcSession,\n type DisplayIdentity,\n type DisplayIdentityKind,\n type OcAccountSummary,\n type OcLinkedIdentity,\n type OcSignOutScope,\n} from '@orangecheck/auth-client';\n\nimport { AppearanceControls } from '../tokens/appearance-menu';\nimport { cn } from '../tokens/cn';\nimport type { EcosystemSlug } from './ecosystem-switcher';\nimport { findFamilyProperty, type SiteState } from './family-properties';\n\n/**\n * `<OcAccountMenu>` — the canonical top-right account affordance for\n * every family site. Replaces the older inline-styled `OcAccountChip`\n * from `@orangecheck/auth-client` with a Tailwind-styled, fully\n * configurable, cross-site-aware dropdown.\n *\n * Three explicit visual states:\n *\n * 1. **Pre-hydration / loading** — neutral `sign in` placeholder so\n * the header never goes blank on first paint.\n * 2. **Anonymous / error** — primary-styled `sign in` CTA pointing\n * at the site's local `/signin` (or whatever `signInUrl` you\n * pass).\n * 3. **Authenticated** — pill with a primary-tinted signal dot and\n * shortened did_oc (or display name if set); click → popover\n * with the full did_oc as a one-click copy-to-clipboard row,\n * optional site-specific menu items, family dashboard link,\n * sign-out, and an optional BuildFooter showing site name +\n * version + commit sha → GitHub.\n *\n * Cross-site recognition: the component re-fetches the session on\n * `visibilitychange` and `focus` events, so when a user signs in at a\n * sibling site (ochk.io, attest.ochk.io, etc.) and tabs back, the\n * chip flips from \"sign in\" to \"signed in\" without a hard reload.\n *\n * The component reads `useOcSession()` from `@orangecheck/auth-client`,\n * so the consuming app must mount `<OcSessionProvider>` somewhere in\n * its tree (already standard in every consumer's `_app.tsx`).\n */\n\nexport interface OcAccountMenuItem {\n /** Same-origin path or absolute URL. */\n href: string;\n /** Visible label. */\n label: string;\n /**\n * When `true`, opens in a new tab and renders a ↗ glyph after the\n * label. Use for cross-domain links (e.g. `https://ochk.io/dashboard`).\n */\n external?: boolean;\n}\n\nexport interface OcAccountMenuBuildInfo {\n /** Display version string, e.g. `'0.5.0'` (rendered as `v0.5.0`). */\n version: string;\n /**\n * 7+ character commit SHA. Render as `'dev'` (or omit) for local\n * dev to suppress the GitHub link.\n */\n sha?: string;\n /**\n * GitHub `owner/repo` slug — combined with `sha` to produce the\n * `https://github.com/<repo>/commit/<sha>` link.\n */\n repo?: string;\n}\n\n/**\n * Minimal session shape `<OcAccountMenuView>` needs. Compatible with\n * `useOcSession()`'s return value but explicit so consumers running\n * their own auth context (e.g. oc-www's local `useAuth`) can pass an\n * adapter without depending on `@orangecheck/auth-client`'s exact\n * types.\n */\nexport interface OcAccountMenuSession {\n status: 'loading' | 'authenticated' | 'anonymous' | 'error';\n account: {\n didOc: string;\n displayName: string | null;\n /**\n * The identity the user has promoted as their badge label —\n * `{ kind, value }`, always populated (defaults to the did).\n * Drives the collapsed-trigger label and the active row in the\n * \"show as\" promote list.\n */\n displayIdentity: DisplayIdentity;\n /** The user's Nostr npub, when set — a promotable badge\n * identity that (unlike btc/email) is a profile field, not a\n * linked-identity row, so it is read from the session. */\n nostrNpub?: string | null;\n } | null;\n /**\n * Sign out. Accepts an optional `{ scope }` so the multi-account\n * \"leave this account\" affordance can route through the same hook.\n * Defaults to `'all'` for back-compat.\n */\n signOut: (opts?: { scope?: OcSignOutScope }) => void | Promise<void>;\n refresh: () => void | Promise<void>;\n /**\n * Promote a linked identity to be the badge label across every\n * `.ochk.io` site. The connected `<OcAccountMenu>` wires this to\n * `useOcSession().setDisplayIdentity`; a site running its own auth\n * context passes its own equivalent.\n */\n setDisplayIdentity: (kind: DisplayIdentityKind) => Promise<void>;\n /**\n * Multi-account roster · other accounts in this browser the user\n * can switch to without re-authenticating. Optional: when omitted\n * (or empty), the `§ accounts` section in `<OcAccountMenu>` is\n * suppressed and the menu renders as single-account. Sites that\n * own their auth context (e.g. oc-www's local `useAuth`) can leave\n * this unset until they add multi-account support.\n */\n roster?: OcAccountSummary[];\n /**\n * Multi-account · flip the active session to the given did_oc.\n * Required when `roster` is non-empty (otherwise the picker rows\n * have nowhere to call).\n */\n switchAccount?: (didOc: string) => Promise<void>;\n /**\n * Multi-account · URL for the \"add another account\" entry point.\n * Defaults to `/signin?add=1` when omitted, which works for every\n * `.ochk.io` family site (in-place sign-in supports the query\n * param by default).\n */\n addAccountUrl?: (returnTo?: string) => string;\n /**\n * Per-tab pinning · `true` when this tab holds its own session\n * token and operates as `account` independently of the shared\n * `.ochk.io` cookie (switching accounts in another tab won't\n * change this one). Renders a quiet `· this tab` hint in the\n * signed-in header. Optional — omitted by pre-pinning auth\n * contexts.\n */\n tabPinned?: boolean;\n}\n\nexport interface OcAccountMenuProps {\n /**\n * Which family property this site IS. Used to label the section\n * header (`§ signed in · vault.ochk.io`) and to suppress the\n * family-dashboard menu item when the user is already on `home`.\n */\n current: EcosystemSlug;\n /**\n * Where the anonymous \"sign in\" affordance points. Default `'/signin'`\n * — works with every site's in-place `<OcSignIn>` page. Pass\n * `'https://ochk.io/signin'` if you want to bounce to the auth host\n * instead.\n */\n signInUrl?: string;\n /** Label for the anonymous \"sign in\" affordance. Default `'sign in'`. */\n signInLabel?: string;\n /**\n * Where the browser lands after the user signs out. Default `'/'`\n * — the current site's own home. On sign-out the menu fires\n * `signOut()` (whose logout round-trip is `keepalive`, so it\n * survives the navigation) and *immediately* hard-navigates here.\n *\n * Navigating in the same tick is deliberate: it forecloses the\n * race where an auth-gated page observes the session flip to\n * `anonymous` and runs its own redirect-to-sign-in first. Sign-out\n * means \"leave\", not \"go sign in again\" — so the family default is\n * the site's home, never a sign-in page or the auth host.\n */\n signOutRedirect?: string;\n /**\n * Site-specific menu items, rendered between the section header\n * and the family-dashboard / sign-out rows. Keep this short —\n * 2–6 entries is the sweet spot. Pass `[]` (or omit) for sites\n * with no per-site routes worth surfacing.\n */\n menuItems?: ReadonlyArray<OcAccountMenuItem>;\n /**\n * Centered primary nav links (typically dashboard · docs · spec).\n * Rendered inside the popover at viewport widths below `sm`\n * (640px) — these are the same links the `<OcPrimaryNav>` row\n * shows inline at sm+, but at ultra-small widths the inline row\n * hides and this popover section takes its place. The result: one\n * dropdown surface owns navigation on phones, no separate\n * hamburger drawer required.\n */\n primaryNavLinks?: ReadonlyArray<OcAccountMenuItem>;\n /**\n * Tertiary nav links (about / contact / status / privacy / etc.).\n * Always visible inside the popover. Folds the legacy mobile-only\n * hamburger drawer's contents into the same dropdown as everything\n * else, so there's exactly one nav surface to learn.\n */\n secondaryNavLinks?: ReadonlyArray<OcAccountMenuItem>;\n /**\n * When `true` (default), shows a `family dashboard ↗` link to\n * `https://ochk.io/dashboard`. Set `false` for `home` (already\n * there) or for sites that don't want it.\n */\n showFamilyDashboard?: boolean;\n /**\n * Optional BuildFooter info. When present, renders a tiny mono\n * footer at the bottom of the popover with `site · vX.Y.Z · sha`\n * — the SHA links to the matching GitHub commit when `repo` is\n * also provided. Drive this from your `next.config.ts` via\n * `NEXT_PUBLIC_APP_VERSION` / `NEXT_PUBLIC_BUILD_SHA` env vars.\n */\n build?: OcAccountMenuBuildInfo;\n /**\n * Optional lifecycle chip rendered inside the BuildFooter line\n * (between site and version). Mirrors the chip on the logo so\n * both surfaces agree.\n */\n siteState?: SiteState;\n /** className overrides for layout-level customisation. */\n className?: string;\n triggerClassName?: string;\n popoverClassName?: string;\n}\n\n/**\n * Partially obscure an identity value for display — first 6 characters,\n * an ellipsis, last 4. Applied uniformly to every kind (did, Bitcoin\n * address, email, npub) and at every length, so a rendered label never\n * exposes a full identity at rest; the full value stays one click away\n * via the copy affordance. Short values fall back to a 4/3 split so the\n * middle is always masked.\n */\nfunction obscureIdentity(value: string): string {\n if (value.length <= 12) {\n return `${value.slice(0, 4)}…${value.slice(-3)}`;\n }\n return `${value.slice(0, 6)}…${value.slice(-4)}`;\n}\n\n/** Human label for an identity kind, shown as the trailing tag on each\n * promote row. */\nconst IDENTITY_KIND_LABEL: Record<DisplayIdentityKind, string> = {\n did: 'did:oc',\n btc: 'bitcoin',\n email: 'email',\n nostr: 'nostr',\n};\n\n/**\n * Best-effort clipboard write. Prefers the async Clipboard API (the\n * only thing that works off a user gesture in modern browsers), and\n * falls back to a hidden-`<textarea>` + `execCommand('copy')` for\n * non-secure contexts or older engines. Returns `true` on success so\n * the caller can decide whether to show \"copied\" feedback.\n */\nasync function writeClipboard(text: string): Promise<boolean> {\n try {\n if (navigator.clipboard?.writeText) {\n await navigator.clipboard.writeText(text);\n return true;\n }\n } catch {\n // fall through to the legacy path\n }\n try {\n const ta = document.createElement('textarea');\n ta.value = text;\n ta.setAttribute('readonly', '');\n ta.style.position = 'fixed';\n ta.style.top = '-1000px';\n ta.style.opacity = '0';\n document.body.appendChild(ta);\n ta.select();\n const ok = document.execCommand('copy');\n document.body.removeChild(ta);\n return ok;\n } catch {\n return false;\n }\n}\n\n/**\n * The `did_oc` row inside the popover header, rendered as a single\n * one-click copy affordance. Clicking anywhere on the address copies\n * the full `did_oc` to the clipboard and flips the trailing glyph\n * from a copy icon to a check for ~1.6s. The popover deliberately\n * stays open so the user sees the confirmation. A visually-hidden\n * `aria-live` region announces the result to screen readers.\n *\n * This is the canonical pattern for surfacing a copyable OrangeCheck\n * identity — every family site gets it for free via `<OcAccountMenu>`.\n */\nfunction CopyableDid({ did }: { did: string }) {\n const [copied, setCopied] = useState(false);\n const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n useEffect(\n () => () => {\n if (timerRef.current) clearTimeout(timerRef.current);\n },\n [],\n );\n\n const onCopy = async () => {\n const ok = await writeClipboard(did);\n if (!ok) return;\n setCopied(true);\n if (timerRef.current) clearTimeout(timerRef.current);\n timerRef.current = setTimeout(() => setCopied(false), 1600);\n };\n\n return (\n <button\n type=\"button\"\n onClick={onCopy}\n aria-label={\n copied\n ? 'OrangeCheck identity copied to clipboard'\n : `Copy OrangeCheck identity ${did} to clipboard`\n }\n title=\"Copy identity\"\n data-oc-account-menu-copy-did=\"\"\n data-copied={copied ? '' : undefined}\n className=\"group/did hover:bg-accent focus-visible:ring-ring/60 -mx-1.5 mt-px flex w-[calc(100%+0.75rem)] items-start gap-1.5 rounded px-1.5 py-1 text-left transition-colors focus-visible:ring-2 focus-visible:outline-none\"\n >\n <span className=\"text-foreground/90 min-w-0 flex-1 font-mono text-[11px] leading-tight break-all\">\n {did}\n </span>\n <span\n className={\n 'mt-px shrink-0 transition-colors ' +\n (copied\n ? 'text-primary'\n : 'text-muted-foreground/50 group-hover/did:text-foreground/80')\n }\n aria-hidden\n >\n {copied ? <Check className=\"size-3.5\" /> : <Copy className=\"size-3.5\" />}\n </span>\n <span className=\"sr-only\" aria-live=\"polite\">\n {copied ? 'Copied to clipboard' : ''}\n </span>\n </button>\n );\n}\n\n/**\n * One row in the \"§ show as\" list — a promote control and an\n * independent copy-to-clipboard affordance.\n *\n * The value is always rendered partially obscured (`obscureIdentity`).\n * The row body is a radio that promotes this identity to the badge\n * label; the trailing copy button writes the *full* value to the\n * clipboard via the same `writeClipboard` path as the did row (async\n * Clipboard API, hidden-`<textarea>` fallback — works on touch devices\n * and non-secure contexts). Copy and promote are deliberately separate\n * controls: one selects the identity, the other extracts it.\n */\nfunction PromoteRow({\n kind,\n value,\n active,\n busy,\n disabled,\n onPromote,\n}: {\n kind: DisplayIdentityKind;\n value: string;\n active: boolean;\n busy: boolean;\n disabled: boolean;\n onPromote: () => void;\n}) {\n const [copied, setCopied] = useState(false);\n const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n useEffect(\n () => () => {\n if (timerRef.current) clearTimeout(timerRef.current);\n },\n [],\n );\n\n const onCopy = async () => {\n const ok = await writeClipboard(value);\n if (!ok) return;\n setCopied(true);\n if (timerRef.current) clearTimeout(timerRef.current);\n timerRef.current = setTimeout(() => setCopied(false), 1600);\n };\n\n const kindLabel = IDENTITY_KIND_LABEL[kind];\n\n return (\n <div\n className=\"hover:bg-accent flex items-center gap-1 pr-2 transition-colors\"\n data-oc-account-menu-promote-row={kind}\n data-active={active ? '' : undefined}\n >\n <button\n type=\"button\"\n role=\"menuitemradio\"\n aria-checked={active}\n aria-label={active ? `Showing as ${kindLabel}` : `Show as ${kindLabel}`}\n disabled={disabled || active}\n onClick={onPromote}\n data-oc-account-menu-promote={kind}\n className=\"flex min-w-0 flex-1 items-center gap-2 py-2 pl-3 text-left font-mono text-[11px] tracking-wide disabled:cursor-default\"\n >\n <span\n className={\n 'flex size-3.5 shrink-0 items-center justify-center rounded-full border ' +\n (active ? 'border-primary' : 'border-muted-foreground/40')\n }\n aria-hidden\n >\n {active ? <span className=\"bg-primary size-1.5 rounded-full\" /> : null}\n </span>\n <span className=\"text-foreground/90 min-w-0 flex-1 truncate\">\n {obscureIdentity(value)}\n </span>\n </button>\n <button\n type=\"button\"\n onClick={() => void onCopy()}\n aria-label={\n copied ? `${kindLabel} copied to clipboard` : `Copy ${kindLabel} to clipboard`\n }\n title=\"Copy\"\n data-oc-account-menu-promote-copy={kind}\n data-copied={copied ? '' : undefined}\n className=\"hover:bg-background/70 focus-visible:ring-ring/60 flex size-6 shrink-0 items-center justify-center rounded transition-colors focus-visible:ring-2 focus-visible:outline-none\"\n >\n {copied ? (\n <Check className=\"text-primary size-3.5\" />\n ) : (\n <Copy className=\"text-muted-foreground/50 size-3.5\" />\n )}\n </button>\n <span className=\"text-muted-foreground/50 w-14 shrink-0 text-right text-[9px] tracking-widest uppercase\">\n {busy ? <Loader2 className=\"ml-auto size-3 animate-spin\" /> : kindLabel}\n </span>\n <span className=\"sr-only\" aria-live=\"polite\">\n {copied ? 'Copied to clipboard' : ''}\n </span>\n </div>\n );\n}\n\n/**\n * The \"§ show as\" block inside the popover — lists the user's\n * identities and lets them promote one as the badge label across\n * every `.ochk.io` site.\n *\n * The did is always an option (read from the session); the npub too\n * when set. The Bitcoin address and email are *linked identities*, so\n * they're lazy-fetched from the auth host the first time the popover\n * opens — `fetchOcLinkedIdentities()` is one credentialed request,\n * cached for the menu's lifetime. The section renders only once that\n * resolves and only when there are ≥2 identities worth choosing\n * between; with a single identity there is nothing to promote.\n *\n * Promotion calls `setDisplayIdentity(kind)` — which PATCHes the auth\n * host, re-mints the cross-subdomain cookie, and refreshes the session\n * — so the selected row and the collapsed label update in place and\n * every other family tab picks the choice up on its next focus.\n */\nfunction IdentityPromoteSection({\n didOc,\n nostrNpub,\n current,\n open,\n setDisplayIdentity,\n}: {\n didOc: string;\n nostrNpub: string | null;\n current: DisplayIdentity;\n open: boolean;\n setDisplayIdentity: (kind: DisplayIdentityKind) => Promise<void>;\n}) {\n const [identities, setIdentities] = useState<OcLinkedIdentity[] | null>(null);\n const [loadFailed, setLoadFailed] = useState(false);\n const [promoting, setPromoting] = useState<DisplayIdentityKind | null>(null);\n const [promoteErr, setPromoteErr] = useState<string | null>(null);\n // Track the (open-state, account) we last fetched for. Refetch when\n // didOc changes — multi-account switches swap which account's linked\n // identities should appear here, and stale data manifested as the\n // popover visibly reflowing mid-switch (\"dropdown freaking out\").\n const lastFetchKeyRef = useRef<string | null>(null);\n\n useEffect(() => {\n if (!open) return;\n // Fetch on first open AND whenever the active didOc changes.\n if (lastFetchKeyRef.current === didOc) return;\n lastFetchKeyRef.current = didOc;\n let cancelled = false;\n // Reset so the section briefly returns null (suppresses flash)\n // until the new account's identities resolve.\n setIdentities(null);\n setLoadFailed(false);\n void fetchOcLinkedIdentities()\n .then((rows) => {\n if (!cancelled) setIdentities(rows);\n })\n .catch(() => {\n if (!cancelled) setLoadFailed(true);\n });\n return () => {\n cancelled = true;\n };\n }, [open, didOc]);\n\n // Wait for the fetch to settle before rendering — avoids a section\n // that flashes in then vanishes.\n if (identities === null && !loadFailed) return null;\n\n const btc =\n identities?.find((i) => i.kind === 'btc' && i.is_primary && i.value) ??\n identities?.find((i) => i.kind === 'btc' && i.value);\n const email =\n identities?.find((i) => i.kind === 'email' && i.is_primary && i.value) ??\n identities?.find((i) => i.kind === 'email' && i.value);\n\n const options: Array<{ kind: DisplayIdentityKind; value: string }> = [\n { kind: 'did', value: didOc },\n ];\n if (btc?.value) options.push({ kind: 'btc', value: btc.value });\n if (email?.value) options.push({ kind: 'email', value: email.value });\n if (nostrNpub) options.push({ kind: 'nostr', value: nostrNpub });\n\n // Nothing to choose between → no section.\n if (options.length < 2) return null;\n\n const promote = async (kind: DisplayIdentityKind) => {\n if (promoting || kind === current.kind) return;\n setPromoting(kind);\n setPromoteErr(null);\n try {\n await setDisplayIdentity(kind);\n } catch (e) {\n setPromoteErr(e instanceof Error ? e.message : 'promotion failed');\n } finally {\n setPromoting(null);\n }\n };\n\n return (\n <div className=\"border-border border-b p-1\" data-oc-account-menu-section=\"show-as\">\n <div className=\"text-muted-foreground/60 px-3 pt-2 pb-1 font-mono text-[10px] tracking-widest uppercase\">\n § show as\n </div>\n {options.map((opt) => (\n <PromoteRow\n key={opt.kind}\n kind={opt.kind}\n value={opt.value}\n active={opt.kind === current.kind}\n busy={promoting === opt.kind}\n disabled={promoting !== null}\n onPromote={() => void promote(opt.kind)}\n />\n ))}\n {promoteErr ? (\n <div className=\"text-destructive/80 px-3 pt-1 pb-2 font-mono text-[10px]\">\n {promoteErr}\n </div>\n ) : null}\n </div>\n );\n}\n\n/**\n * Connected variant — pulls the session from `useOcSession()`. This is\n * what every consumer site with `<OcSessionProvider>` mounted should\n * use. For sites running a parallel auth context (e.g. oc-www's local\n * `useAuth`), use `<OcAccountMenuView>` below and pass a session prop\n * directly.\n */\nexport function OcAccountMenu(props: OcAccountMenuProps) {\n const session = useOcSession();\n return (\n <OcAccountMenuView\n {...props}\n session={{\n status: session.status,\n account: session.account\n ? {\n didOc: session.account.didOc,\n displayName: session.account.displayName ?? null,\n displayIdentity: session.account.displayIdentity,\n nostrNpub: session.account.nostrNpub ?? null,\n }\n : null,\n signOut: session.signOut,\n refresh: session.refresh,\n setDisplayIdentity: session.setDisplayIdentity,\n // Multi-account · the connected variant always forwards\n // these from useOcSession(). The View variant accepts\n // them as optional so sites running their own auth\n // context (oc-www) can opt in incrementally.\n roster: session.roster,\n switchAccount: session.switchAccount,\n addAccountUrl: session.addAccountUrl,\n // Structural read keeps the auth-client peer floor at\n // ^2.17.0 — `tabPinned` ships in 2.18.0 and is simply\n // undefined (no hint) on older providers.\n tabPinned: (session as { tabPinned?: boolean }).tabPinned,\n }}\n />\n );\n}\n\nexport interface OcAccountMenuViewProps extends OcAccountMenuProps {\n /**\n * The session to render. When using `<OcAccountMenuView>` directly\n * (rather than the connected `<OcAccountMenu>`), pass an adapter\n * over your local auth context.\n */\n session: OcAccountMenuSession;\n}\n\n/**\n * Presentational variant — takes a session as an explicit prop. Use\n * this when your site runs its own auth context (e.g. ochk.io's\n * local `useAuth`) and you want the family-consistent visual without\n * mounting `<OcSessionProvider>`.\n */\n/**\n * MobileMenu — the `☰` rendered to the LEFT of the identity chip on phones\n * (`md:hidden`). Holds the site's nav links (primary + secondary) and the\n * appearance controls (mode + skin), so the mobile header is just\n * `[☰][identity]` with the theme folded in — no centered hamburger, no\n * standalone palette. Auth-independent: present whether signed in or out.\n */\nfunction MobileMenu({\n primary,\n secondary,\n}: {\n primary?: ReadonlyArray<OcAccountMenuItem>;\n secondary?: ReadonlyArray<OcAccountMenuItem>;\n}) {\n const [open, setOpen] = useState(false);\n const ref = useRef<HTMLDivElement | null>(null);\n\n useEffect(() => {\n if (!open) return;\n const onClick = (e: MouseEvent) => {\n if (ref.current && !ref.current.contains(e.target as Node)) setOpen(false);\n };\n const onKey = (e: KeyboardEvent) => {\n if (e.key === 'Escape') setOpen(false);\n };\n document.addEventListener('mousedown', onClick);\n document.addEventListener('keydown', onKey);\n return () => {\n document.removeEventListener('mousedown', onClick);\n document.removeEventListener('keydown', onKey);\n };\n }, [open]);\n\n const links = [...(primary ?? []), ...(secondary ?? [])];\n const rowCls =\n 'font-display flex items-center gap-2 px-3 py-2 text-[12px] font-semibold tracking-wider uppercase text-muted-foreground hover:text-foreground hover:bg-accent transition-colors';\n\n return (\n <div ref={ref} className=\"relative md:hidden\" data-oc-account-mobile-menu=\"\">\n <button\n type=\"button\"\n onClick={() => setOpen((v) => !v)}\n aria-haspopup=\"menu\"\n aria-expanded={open}\n aria-label=\"menu\"\n className=\"border-input bg-background hover:bg-accent text-muted-foreground inline-flex size-8 items-center justify-center rounded-md border transition-colors\"\n data-oc-account-mobile-toggle=\"\"\n >\n {open ? <X className=\"size-4\" aria-hidden /> : <Menu className=\"size-4\" aria-hidden />}\n </button>\n {open && (\n <div\n role=\"menu\"\n aria-label=\"menu\"\n className=\"border-border bg-popover text-popover-foreground absolute top-[calc(100%+6px)] right-0 z-50 w-[min(16rem,calc(100vw-1rem))] overflow-hidden border shadow-xl\"\n data-oc-account-mobile-popover=\"\"\n >\n {links.length > 0 && (\n <div className=\"border-b p-1\">\n <div className=\"text-muted-foreground/60 px-3 pt-2 pb-1 font-mono text-[10px] tracking-widest uppercase\">\n § navigate\n </div>\n {links.map((l) =>\n l.external ? (\n <a\n key={l.href}\n href={l.href}\n target=\"_blank\"\n rel=\"noreferrer\"\n role=\"menuitem\"\n onClick={() => setOpen(false)}\n className={rowCls}\n >\n <span className=\"text-muted-foreground\" aria-hidden>\n →\n </span>\n <span className=\"flex-1\">{l.label}</span>\n <span className=\"text-muted-foreground/70 text-[10px]\" aria-hidden>\n ↗\n </span>\n </a>\n ) : (\n <Link\n key={l.href}\n href={l.href}\n role=\"menuitem\"\n onClick={() => setOpen(false)}\n className={rowCls}\n >\n <span className=\"text-muted-foreground\" aria-hidden>\n →\n </span>\n <span className=\"flex-1\">{l.label}</span>\n </Link>\n )\n )}\n </div>\n )}\n <AppearanceControls />\n </div>\n )}\n </div>\n );\n}\n\nexport function OcAccountMenuView({\n current,\n signInUrl = '/signin',\n signInLabel = 'sign in',\n signOutRedirect = '/',\n menuItems,\n primaryNavLinks,\n secondaryNavLinks,\n showFamilyDashboard,\n build,\n siteState,\n className,\n triggerClassName,\n popoverClassName,\n session,\n}: OcAccountMenuViewProps) {\n const {\n status,\n account,\n signOut,\n refresh,\n setDisplayIdentity,\n roster,\n switchAccount,\n addAccountUrl,\n tabPinned,\n } = session;\n const [hydrated, setHydrated] = useState(false);\n const [open, setOpen] = useState(false);\n const wrapRef = useRef<HTMLDivElement | null>(null);\n\n const property = findFamilyProperty(current);\n const hostname = property?.hostname ?? `${current}.ochk.io`;\n const isHome = current === 'home';\n const familyDashboardEnabled = showFamilyDashboard ?? !isHome;\n\n useEffect(() => setHydrated(true), []);\n\n // Cross-site sign-in pickup: re-fetch on visibility / focus.\n useEffect(() => {\n const onWake = () => {\n if (document.visibilityState === 'visible') void refresh();\n };\n const onFocus = () => void refresh();\n document.addEventListener('visibilitychange', onWake);\n window.addEventListener('focus', onFocus);\n return () => {\n document.removeEventListener('visibilitychange', onWake);\n window.removeEventListener('focus', onFocus);\n };\n }, [refresh]);\n\n // Outside-click + Escape close.\n useEffect(() => {\n if (!open) return;\n const onClick = (e: MouseEvent) => {\n if (wrapRef.current && !wrapRef.current.contains(e.target as Node)) setOpen(false);\n };\n const onKey = (e: KeyboardEvent) => {\n if (e.key === 'Escape') setOpen(false);\n };\n document.addEventListener('mousedown', onClick);\n document.addEventListener('keydown', onKey);\n return () => {\n document.removeEventListener('mousedown', onClick);\n document.removeEventListener('keydown', onKey);\n };\n }, [open]);\n\n const signInTrigger = (\n <a\n href={signInUrl}\n aria-label={signInLabel}\n data-oc-account-menu-signin=\"\"\n className={\n triggerClassName ??\n 'border-input bg-background hover:bg-accent inline-flex h-8 items-center justify-center rounded-md border px-3 font-mono text-[11px] font-semibold tracking-widest uppercase transition-colors'\n }\n >\n {signInLabel}\n </a>\n );\n\n // The mobile `☰` (nav + appearance) sits to the LEFT of the identity slot\n // on phones; on md+ it's hidden (nav is inline via OcPrimaryNav, appearance\n // is the desktop palette). Only rendered when this site has nav links.\n const hasNav = ((primaryNavLinks?.length ?? 0) + (secondaryNavLinks?.length ?? 0)) > 0;\n const wrap = (identity: ReactNode) => (\n <div className={cn('flex items-center gap-1', className)} data-oc-account-menu=\"\">\n {hasNav ? <MobileMenu primary={primaryNavLinks} secondary={secondaryNavLinks} /> : null}\n {identity}\n </div>\n );\n\n // States 1 + 2: pre-hydration or anonymous — render the same\n // placeholder/CTA so the slot is never empty.\n if (!hydrated || status === 'loading') {\n return wrap(signInTrigger);\n }\n\n if (status !== 'authenticated' || !account) {\n return wrap(signInTrigger);\n }\n\n // Authenticated — pill + popover. The collapsed label is the\n // user's vanity display name if they set one, otherwise the\n // identity they promoted (`displayIdentity` — defaults to their\n // sign-in identity, ultimately the did).\n const displayName = account.displayName ?? null;\n const label = displayName ?? obscureIdentity(account.displayIdentity.value);\n\n return wrap(\n <div ref={wrapRef} className=\"relative inline-block\">\n <button\n type=\"button\"\n onClick={() => setOpen((v) => !v)}\n aria-haspopup=\"menu\"\n aria-expanded={open}\n aria-label={`Signed in as ${account.didOc}. Open account menu.`}\n className={\n triggerClassName ??\n 'border-primary/40 bg-card hover:bg-accent inline-flex h-8 items-center gap-1.5 rounded-md border px-2 font-mono text-[11px] tracking-wide transition-colors sm:px-3'\n }\n data-oc-account-menu-trigger=\"\"\n >\n <span className=\"bg-primary inline-block size-1.5 shrink-0 rounded-full\" aria-hidden />\n {/* Below sm the chip condenses to dot + chevron only — a long\n display name / obscured did otherwise eats a phone header.\n The full label returns from sm up, capped so it can't blow\n out the row. */}\n <span className=\"text-foreground hidden max-w-[16ch] truncate sm:inline\">\n {label}\n </span>\n <svg\n width=\"9\"\n height=\"9\"\n viewBox=\"0 0 10 10\"\n aria-hidden\n className={\n 'opacity-60 transition-transform ' + (open ? 'rotate-180' : 'rotate-0')\n }\n >\n <path\n d=\"M2 4 L5 7 L8 4\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n fill=\"none\"\n strokeLinecap=\"round\"\n />\n </svg>\n </button>\n\n {open && (\n <div\n role=\"menu\"\n aria-label=\"Account menu\"\n className={\n popoverClassName ??\n 'border-border bg-popover text-popover-foreground absolute top-[calc(100%+6px)] right-0 z-50 w-[min(20rem,calc(100vw-1rem))] border shadow-xl'\n }\n data-oc-account-menu-popover=\"\"\n >\n <div className=\"border-border border-b p-3\">\n <div className=\"text-primary mb-1 font-mono text-[10px] tracking-widest uppercase\">\n § signed in · {hostname}\n {tabPinned ? (\n <span\n className=\"text-muted-foreground/70 normal-case\"\n data-oc-account-menu-tab-pin=\"\"\n title=\"This tab keeps this account even if you switch accounts in another tab\"\n >\n {' '}\n · this tab\n </span>\n ) : null}\n </div>\n <CopyableDid did={account.didOc} />\n {/* Which identity this account actually IS (email /\n bitcoin / nostr) — surfaced next to the did so a tab\n signed into a DIFFERENT account than your other tabs\n is obvious at a glance, not buried behind the did.\n The did itself already shows above; skip the\n redundant did kind. */}\n {account.displayIdentity.kind !== 'did' &&\n account.displayIdentity.value ? (\n <div className=\"mt-1 flex items-center gap-1.5 font-mono text-[10px] tracking-wide\">\n <span className=\"text-muted-foreground/50 uppercase\">\n {IDENTITY_KIND_LABEL[account.displayIdentity.kind]}\n </span>\n <span className=\"text-foreground/75\">\n {obscureIdentity(account.displayIdentity.value)}\n </span>\n </div>\n ) : null}\n {displayName ? (\n <div className=\"text-muted-foreground/80 mt-1 font-mono text-[10px] tracking-wide\">\n {displayName}\n </div>\n ) : null}\n </div>\n\n <IdentityPromoteSection\n didOc={account.didOc}\n nostrNpub={account.nostrNpub ?? null}\n current={account.displayIdentity}\n open={open}\n setDisplayIdentity={setDisplayIdentity}\n />\n\n <AccountsSection\n roster={roster ?? []}\n switchAccount={switchAccount}\n addAccountUrl={addAccountUrl}\n signOut={signOut}\n onActionStart={() => setOpen(false)}\n />\n\n {primaryNavLinks && primaryNavLinks.length > 0 ? (\n <PopoverSection\n label=\"navigate\"\n items={primaryNavLinks}\n onItemClick={() => setOpen(false)}\n className=\"hidden md:block\"\n />\n ) : null}\n\n <div className=\"p-1\" data-oc-account-menu-section=\"account\">\n {menuItems?.map((item) => {\n const onClick = () => setOpen(false);\n const cls =\n 'hover:bg-accent flex items-center gap-2 px-3 py-2 font-mono text-[11px] tracking-wide transition-colors';\n const inner = (\n <>\n <span className=\"text-muted-foreground\" aria-hidden>\n →\n </span>\n <span className=\"flex-1\">{item.label}</span>\n {item.external ? (\n <span\n className=\"text-muted-foreground/70 text-[10px]\"\n aria-hidden\n >\n ↗\n </span>\n ) : null}\n </>\n );\n return item.external ? (\n <a\n key={item.href}\n href={item.href}\n target=\"_blank\"\n rel=\"noreferrer\"\n onClick={onClick}\n role=\"menuitem\"\n className={cls}\n data-oc-account-menu-item=\"\"\n >\n {inner}\n </a>\n ) : (\n <Link\n key={item.href}\n href={item.href}\n onClick={onClick}\n role=\"menuitem\"\n className={cls}\n data-oc-account-menu-item=\"\"\n >\n {inner}\n </Link>\n );\n })}\n\n {familyDashboardEnabled ? (\n <a\n href=\"https://ochk.io/dashboard\"\n target=\"_blank\"\n rel=\"noreferrer\"\n onClick={() => setOpen(false)}\n role=\"menuitem\"\n className=\"hover:bg-accent flex items-center gap-2 px-3 py-2 font-mono text-[11px] tracking-wide transition-colors\"\n data-oc-account-menu-item=\"\"\n data-oc-account-menu-family-dashboard=\"\"\n >\n <span className=\"text-muted-foreground\" aria-hidden>\n →\n </span>\n <span className=\"flex-1\">family dashboard</span>\n <span\n className=\"text-muted-foreground/70 text-[10px]\"\n aria-hidden\n >\n ↗\n </span>\n </a>\n ) : null}\n\n <button\n type=\"button\"\n role=\"menuitem\"\n onClick={() => {\n setOpen(false);\n // Await the logout round-trip — its response is\n // what clears the `.ochk.io` cookie — and only\n // THEN hard-navigate home. Navigating first\n // (the old behavior) raced the next page's\n // session check against the still-uncleared\n // cookie, so the account badge stayed \"signed\n // in\" until a second sign-out. The hard\n // navigation is a committed browser navigation,\n // so it still wins over any auth-gated page's\n // redirect-to-sign-in effect.\n void (async () => {\n await signOut();\n if (typeof window !== 'undefined') {\n window.location.assign(signOutRedirect);\n }\n })();\n }}\n className=\"hover:bg-accent flex w-full items-center gap-2 px-3 py-2 text-left font-mono text-[11px] tracking-wide transition-colors\"\n data-oc-account-menu-item=\"\"\n data-oc-account-menu-signout=\"\"\n >\n <span className=\"text-muted-foreground\" aria-hidden>\n →\n </span>\n <span className=\"flex-1\">sign out</span>\n </button>\n </div>\n\n {secondaryNavLinks && secondaryNavLinks.length > 0 ? (\n <PopoverSection\n label=\"more\"\n items={secondaryNavLinks}\n onItemClick={() => setOpen(false)}\n bordered\n className=\"hidden md:block\"\n />\n ) : null}\n\n {build ? <BuildFooter hostname={hostname} build={build} state={siteState} /> : null}\n </div>\n )}\n </div>\n );\n}\n\n/**\n * Multi-account · `§ accounts` section. Lists the other accounts the\n * user has signed into in this browser (the roster), lets them switch\n * with one click, surfaces an \"Add another account\" entry point that\n * routes through `addAccountUrl()` (the auth host preserves the\n * current roster_id when signing in via `?add=1`), and adapts the\n * sign-out affordance to support `scope: 'current'` per row.\n *\n * Gate: the whole section is suppressed when `addAccountUrl` isn't\n * provided. That's the back-compat signal for sites running a parallel\n * auth context (e.g. oc-www's local `useAuth`) — they can adopt\n * multi-account incrementally by wiring the new props on\n * `OcAccountMenuSession` as they build out support.\n */\nfunction AccountsSection({\n roster,\n switchAccount,\n addAccountUrl,\n signOut,\n onActionStart,\n}: {\n roster: OcAccountSummary[];\n switchAccount: ((didOc: string) => Promise<void>) | undefined;\n addAccountUrl: ((returnTo?: string) => string) | undefined;\n signOut: (opts?: { scope?: OcSignOutScope }) => void | Promise<void>;\n onActionStart: () => void;\n}) {\n const [switching, setSwitching] = useState<string | null>(null);\n const [err, setErr] = useState<string | null>(null);\n\n if (!addAccountUrl) return null;\n\n const onSwitch = async (didOc: string) => {\n if (!switchAccount || switching) return;\n setSwitching(didOc);\n setErr(null);\n try {\n await switchAccount(didOc);\n // Keep the menu open just long enough for the active label\n // to flip; the surrounding popover-close-on-outside-click\n // will pick up the user's next interaction.\n } catch (e) {\n setErr(e instanceof Error ? e.message : 'switch failed');\n } finally {\n setSwitching(null);\n }\n };\n\n return (\n <div className=\"border-border border-b p-1\" data-oc-account-menu-section=\"accounts\">\n <div className=\"text-muted-foreground/60 px-3 pt-2 pb-1 font-mono text-[10px] tracking-widest uppercase\">\n § accounts\n </div>\n {roster.map((peer) => (\n <SwitchRow\n key={peer.didOc}\n peer={peer}\n busy={switching === peer.didOc}\n disabled={switching !== null}\n onSwitch={() => void onSwitch(peer.didOc)}\n />\n ))}\n <a\n href={addAccountUrl()}\n onClick={() => onActionStart()}\n role=\"menuitem\"\n data-oc-account-menu-add-account=\"\"\n className=\"hover:bg-accent flex items-center gap-2 px-3 py-2 font-mono text-[11px] tracking-wide transition-colors\"\n >\n <Plus className=\"text-muted-foreground size-3.5 shrink-0\" aria-hidden />\n <span className=\"flex-1\">\n {roster.length === 0 ? 'add another account' : 'add another'}\n </span>\n </a>\n {/* \"leave this account\" only makes sense WITH peers in the\n * roster — without them, scope='current' degrades to scope='all'\n * and the parent menu's bottom \"sign out\" row already covers\n * that case. Rendering both produces two identical sign-out\n * affordances; gate on peer count to suppress the duplicate. */}\n {roster.length > 0 ? (\n <button\n type=\"button\"\n role=\"menuitem\"\n onClick={() => {\n onActionStart();\n void (async () => {\n try {\n await signOut({ scope: 'current' });\n } catch {\n // local state still flips · cookie may not\n }\n // No hard-nav · `scope: 'current'` with peers\n // in the roster keeps the browser signed-in to\n // the next-best account; the refresh() inside\n // signOut updates the badge in place.\n })();\n }}\n data-oc-account-menu-leave-current=\"\"\n className=\"hover:bg-accent flex w-full items-center gap-2 px-3 py-2 text-left font-mono text-[11px] tracking-wide transition-colors\"\n >\n <span className=\"text-muted-foreground\" aria-hidden>\n →\n </span>\n <span className=\"flex-1\">leave this account</span>\n </button>\n ) : null}\n {err ? (\n <div className=\"text-destructive/80 px-3 pt-1 pb-2 font-mono text-[10px]\">\n {err}\n </div>\n ) : null}\n </div>\n );\n}\n\n/**\n * One row in `§ accounts` — a switch-target peer. Clicking the body\n * calls `onSwitch`; while in-flight the row shows a spinner and the\n * other rows in the list are disabled.\n */\nfunction SwitchRow({\n peer,\n busy,\n disabled,\n onSwitch,\n}: {\n peer: OcAccountSummary;\n busy: boolean;\n disabled: boolean;\n onSwitch: () => void;\n}) {\n const label = peer.displayName ?? obscureIdentity(peer.displayIdentity.value);\n const kindLabel = IDENTITY_KIND_LABEL[peer.displayIdentity.kind];\n return (\n <button\n type=\"button\"\n role=\"menuitemradio\"\n aria-checked={false}\n aria-label={`Switch to ${peer.didOc}`}\n disabled={disabled}\n onClick={onSwitch}\n data-oc-account-menu-switch-row=\"\"\n className=\"hover:bg-accent flex w-full items-center gap-2 px-3 py-2 text-left font-mono text-[11px] tracking-wide transition-colors disabled:cursor-default\"\n >\n <span\n className=\"border-muted-foreground/40 flex size-3.5 shrink-0 items-center justify-center rounded-full border\"\n aria-hidden\n />\n <span className=\"text-foreground/90 min-w-0 flex-1 truncate\">{label}</span>\n <span className=\"text-muted-foreground/50 w-14 shrink-0 text-right text-[9px] tracking-widest uppercase\">\n {busy ? <Loader2 className=\"ml-auto size-3 animate-spin\" /> : kindLabel}\n </span>\n </button>\n );\n}\n\n/**\n * Single nav section inside the identity popover (e.g. `§ navigate`, `§ more`).\n * Rendered DESKTOP-ONLY (`hidden md:block`) by callers: on mobile the same\n * links live in the account menu's `☰`, so showing them here too would double\n * up. On desktop it's the nav home for console sites that have no inline\n * OcPrimaryNav.\n */\nfunction PopoverSection({\n label,\n items,\n onItemClick,\n bordered,\n className,\n}: {\n label: string;\n items: ReadonlyArray<OcAccountMenuItem>;\n onItemClick: () => void;\n bordered?: boolean;\n className?: string;\n}) {\n const cls =\n 'hover:bg-accent flex items-center gap-2 px-3 py-2 font-mono text-[11px] tracking-wide transition-colors';\n return (\n <div\n className={cn('p-1', bordered && 'border-border border-t', className)}\n data-oc-account-menu-section={label}\n >\n <div className=\"text-muted-foreground/60 px-3 pt-2 pb-1 font-mono text-[10px] tracking-widest uppercase\">\n § {label}\n </div>\n {items.map((item) =>\n item.external ? (\n <a\n key={item.href}\n href={item.href}\n target=\"_blank\"\n rel=\"noreferrer\"\n onClick={onItemClick}\n role=\"menuitem\"\n className={cls}\n data-oc-account-menu-item=\"\"\n >\n <span className=\"text-muted-foreground\" aria-hidden>\n →\n </span>\n <span className=\"flex-1\">{item.label}</span>\n <span className=\"text-muted-foreground/70 text-[10px]\" aria-hidden>\n ↗\n </span>\n </a>\n ) : (\n <Link\n key={item.href}\n href={item.href}\n onClick={onItemClick}\n role=\"menuitem\"\n className={cls}\n data-oc-account-menu-item=\"\"\n >\n <span className=\"text-muted-foreground\" aria-hidden>\n →\n </span>\n <span className=\"flex-1\">{item.label}</span>\n </Link>\n )\n )}\n </div>\n );\n}\n\nfunction BuildFooter({\n hostname,\n build,\n state,\n}: {\n hostname: string;\n build: OcAccountMenuBuildInfo;\n state?: SiteState;\n}) {\n const sha = build.sha;\n const showSha = !!sha && sha !== 'dev';\n const commitUrl = showSha && build.repo ? `https://github.com/${build.repo}/commit/${sha}` : null;\n return (\n <div\n className=\"text-muted-foreground/60 border-border border-t px-3 py-2 font-mono text-[9.5px] tracking-widest uppercase\"\n data-oc-account-menu-build=\"\"\n >\n {hostname}\n {state && state !== 'live' ? (\n <>\n {' · '}\n <span className=\"text-muted-foreground/80\">{state}</span>\n </>\n ) : null}{' '}\n <span className=\"text-muted-foreground/80\">\n v{build.version}\n {showSha ? (\n <>\n {' · '}\n {commitUrl ? (\n <a\n href={commitUrl}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"hover:text-foreground/90 underline decoration-dotted underline-offset-2\"\n >\n {sha}\n </a>\n ) : (\n sha\n )}\n </>\n ) : null}\n </span>\n </div>\n );\n}\n","\"use client\";\n\nimport Link from \"next/link\";\nimport type { ReactNode } from \"react\";\n\n/**\n * `<OcPrimaryNav>` — the centered link row in every family site's\n * `<LayoutHeader>`. Replaces the per-site bespoke `<nav>` blocks.\n *\n * **Desktop-only.** The inline row shows at `md+`; below that it is hidden,\n * because on mobile the same links live in the account menu's `☰` drawer\n * (`OcAccountMenu`, rendered to the left of the identity chip) — one shared\n * mobile-nav pattern, no centered hamburger, no per-site fork.\n *\n * Active item is `text-primary`; siblings are muted. Active affordance is\n * text-only (no underline / bottom stripe) — deliberately restrained.\n *\n * **Usage:**\n *\n * <OcPrimaryNav\n * activePath={router.pathname}\n * links={[\n * { href: '/dashboard', label: 'dashboard' },\n * { href: 'https://docs.ochk.io/attest', label: 'docs', external: true },\n * ]}\n * />\n */\n\nexport interface OcPrimaryNavLink {\n /** Same-origin path or absolute URL. */\n href: string;\n /** Visible label · lowercase preferred (the chip styling applies tracking + uppercase). */\n label: string;\n /** When true, opens in a new tab and skips the `isActive` check. */\n external?: boolean;\n /** Optional override for the active-match. By default the link is\n * active when `activePath === href` or `activePath.startsWith(href + '/')`. */\n matchExact?: boolean;\n}\n\nexport interface OcPrimaryNavProps {\n /** Current router pathname for active-link highlight. */\n activePath: string;\n /** Link set. Keep to 2–5 entries. */\n links: ReadonlyArray<OcPrimaryNavLink>;\n /** className for the outer container. */\n className?: string;\n}\n\nfunction isActive(pathname: string, link: OcPrimaryNavLink): boolean {\n if (link.external) return false;\n if (link.matchExact) return pathname === link.href;\n if (link.href === \"/\") return pathname === \"/\";\n return pathname === link.href || pathname.startsWith(link.href + \"/\");\n}\n\nexport function OcPrimaryNav({\n activePath,\n links,\n className,\n}: OcPrimaryNavProps) {\n return (\n <nav\n aria-label=\"primary\"\n className={\n \"hidden items-center gap-0.5 sm:gap-1 md:flex \" + (className ?? \"\")\n }\n data-oc-primary-nav=\"\"\n >\n {links.map((link) => {\n const active = isActive(activePath, link);\n const cls =\n \"font-display shrink-0 px-2 py-1 sm:px-3 text-[11px] sm:text-[12px] font-semibold tracking-wider uppercase transition-colors \" +\n (active\n ? \"text-primary\"\n : \"text-muted-foreground hover:text-foreground\");\n const content: ReactNode = (\n <>\n {link.label}\n {link.external ? (\n <span\n aria-hidden\n className=\"text-muted-foreground/60 ml-1 text-[9px]\"\n >\n ↗\n </span>\n ) : null}\n </>\n );\n return link.external ? (\n <a\n key={link.href}\n href={link.href}\n target=\"_blank\"\n rel=\"noreferrer\"\n className={cls}\n data-oc-primary-nav-item=\"\"\n >\n {content}\n </a>\n ) : (\n <Link\n key={link.href}\n href={link.href}\n aria-current={active ? \"page\" : undefined}\n className={cls}\n data-oc-primary-nav-item={active ? \"active\" : \"sibling\"}\n >\n {content}\n </Link>\n );\n })}\n </nav>\n );\n}\n","'use client';\n\nimport Link from 'next/link';\nimport { useEffect, useState, type ReactNode } from 'react';\n\n/**\n * `<OcDashboardShell>` — the canonical demo-app frame for protocol\n * sites. Mirrors the `MeShell` pattern from `me.ochk.io`: persistent\n * left-rail tools on desktop, off-canvas drawer on mobile, page\n * eyebrow + title + description above the children.\n *\n * Drives the unified \"dashboard pattern\" the family rolled out\n * 2026-05-14: every protocol site's `/dashboard` (and the demo pages\n * underneath — `/create`, `/verify`, `/discover`, `/playground`, etc.)\n * wraps in this shell, so visitors crossing protocols experience the\n * same chrome.\n *\n * Layout (desktop):\n *\n * ┌─────────────┬────────────────────────────────────┐\n * │ § dashboard │ eyebrow │\n * │ ── tools ── │ title │\n * │ create ● │ description │\n * │ verify │ │\n * │ discover │ ── children ─────────────────────│\n * │ ... │ │\n * └─────────────┴────────────────────────────────────┘\n *\n * Mobile (<md): sidebar collapses behind a hamburger button at the\n * top of the main column; tapping opens a full-width drawer.\n */\n\nexport interface OcDashboardTool {\n /** Stable identifier · used as `active` key. */\n id: string;\n /** Same-origin path the tool lives at. */\n href: string;\n /** Visible label · lowercase preferred. */\n label: string;\n /** Optional one-line tagline shown under the label in the rail and\n * on the dashboard hub cards. */\n tagline?: string;\n /** Optional ascii / unicode glyph rendered before the label. */\n icon?: ReactNode;\n /** When true, opens in a new tab (e.g. an external explorer). */\n external?: boolean;\n}\n\nexport interface OcDashboardShellProps {\n /**\n * Dashboard root path — the rail header links here (\"§ dashboard\").\n * Default `'/dashboard'`.\n */\n rootHref?: string;\n /**\n * Site display name shown in the rail header above the tools list\n * (e.g. `'oc·attest'`).\n */\n siteLabel?: ReactNode;\n /** Tools to surface in the left rail. */\n tools: ReadonlyArray<OcDashboardTool>;\n /**\n * Which tool is currently active — matched against each tool's\n * `id`. Pass `undefined` on the dashboard hub itself.\n */\n active?: string;\n /** Optional small mono label above the page title. */\n eyebrow?: ReactNode;\n /** Page title — rendered as h1. */\n title?: ReactNode;\n /** Page description — rendered as a paragraph below the title. */\n description?: ReactNode;\n /** Main column content. */\n children: ReactNode;\n /** className for the outer container. */\n className?: string;\n}\n\nexport function OcDashboardShell({\n rootHref = '/dashboard',\n siteLabel,\n tools,\n active,\n eyebrow,\n title,\n description,\n children,\n className,\n}: OcDashboardShellProps) {\n const [drawerOpen, setDrawerOpen] = useState(false);\n\n // Close drawer on Escape, lock body scroll while open.\n useEffect(() => {\n if (!drawerOpen) return;\n function onKey(e: KeyboardEvent) {\n if (e.key === 'Escape') setDrawerOpen(false);\n }\n document.addEventListener('keydown', onKey);\n const prevOverflow = document.body.style.overflow;\n document.body.style.overflow = 'hidden';\n return () => {\n document.removeEventListener('keydown', onKey);\n document.body.style.overflow = prevOverflow;\n };\n }, [drawerOpen]);\n\n const hasHeader = Boolean(title) || Boolean(eyebrow);\n\n return (\n <div\n className={'container ' + (className ?? '')}\n data-oc-dashboard-shell=\"\"\n >\n <div className=\"flex min-h-[calc(100vh-3rem)] flex-col md:flex-row md:gap-8\">\n {/* Desktop sidebar */}\n <Sidebar\n rootHref={rootHref}\n siteLabel={siteLabel}\n tools={tools}\n active={active}\n variant=\"desktop\"\n />\n\n {/* Main column */}\n <div className=\"flex min-w-0 flex-1 flex-col\">\n {/* Mobile bar — hamburger + crumb */}\n <div className=\"border-border flex items-center justify-between border-b py-3 md:hidden\">\n <button\n type=\"button\"\n onClick={() => setDrawerOpen(true)}\n className=\"text-muted-foreground hover:text-foreground inline-flex h-9 items-center gap-2 px-1 font-mono text-[11px] tracking-widest uppercase transition-colors\"\n aria-label=\"open dashboard tools\"\n aria-expanded={drawerOpen}\n data-oc-dashboard-mobile-trigger=\"\"\n >\n <span className=\"text-[14px] leading-none\">≡</span>\n <span>tools</span>\n </button>\n <Link\n href={rootHref}\n className=\"text-primary font-mono text-[11px] tracking-widest uppercase\"\n >\n § dashboard\n </Link>\n </div>\n\n <div className=\"pt-6 md:pt-3\">\n {hasHeader && (\n <div className=\"max-w-3xl\">\n {eyebrow ? (\n <div className=\"label-mono text-primary mb-3 font-mono text-[10px] tracking-widest uppercase\">\n {eyebrow}\n </div>\n ) : null}\n {title ? (\n <h1 className=\"font-display text-2xl font-bold tracking-tight sm:text-3xl\">\n {title}\n </h1>\n ) : null}\n {description ? (\n <p className=\"text-muted-foreground mt-3 max-w-[64ch] text-sm leading-relaxed\">\n {description}\n </p>\n ) : null}\n </div>\n )}\n <div className={hasHeader ? 'mt-8 pb-12' : 'pb-12'}>{children}</div>\n </div>\n </div>\n </div>\n\n {/* Mobile drawer */}\n {drawerOpen ? (\n <div\n className=\"fixed inset-0 z-50 md:hidden\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label=\"dashboard tools\"\n data-oc-dashboard-drawer=\"\"\n >\n <div\n className=\"absolute inset-0 bg-background/80 backdrop-blur-sm\"\n onClick={() => setDrawerOpen(false)}\n aria-hidden\n />\n <div className=\"bg-background absolute top-0 left-0 h-full w-[85vw] max-w-sm border-r shadow-xl\">\n <Sidebar\n rootHref={rootHref}\n siteLabel={siteLabel}\n tools={tools}\n active={active}\n variant=\"drawer\"\n onClose={() => setDrawerOpen(false)}\n />\n </div>\n </div>\n ) : null}\n </div>\n );\n}\n\nfunction Sidebar({\n rootHref,\n siteLabel,\n tools,\n active,\n variant,\n onClose,\n}: {\n rootHref: string;\n siteLabel?: ReactNode;\n tools: ReadonlyArray<OcDashboardTool>;\n active?: string;\n variant: 'desktop' | 'drawer';\n onClose?: () => void;\n}) {\n const isDrawer = variant === 'drawer';\n return (\n <aside\n className={\n isDrawer\n ? 'flex h-full w-full flex-col bg-card'\n : 'hidden md:sticky md:top-4 md:flex md:h-[calc(100vh-2rem)] md:w-56 md:shrink-0 md:flex-col md:self-start md:overflow-y-auto md:rounded md:border md:bg-card/40 lg:w-60'\n }\n aria-label=\"dashboard tools\"\n data-oc-dashboard-sidebar={variant}\n >\n {/* identity strip */}\n <div className=\"border-b px-4 py-3\">\n <div className=\"flex items-center justify-between\">\n <Link\n href={rootHref}\n onClick={onClose}\n className=\"hover:text-foreground font-display text-sm font-bold tracking-tight\"\n >\n § dashboard\n </Link>\n {isDrawer ? (\n <button\n type=\"button\"\n onClick={onClose}\n className=\"text-muted-foreground hover:text-foreground -mr-2 inline-flex h-8 w-8 items-center justify-center rounded font-mono text-lg\"\n aria-label=\"close navigation\"\n >\n ×\n </button>\n ) : null}\n </div>\n {siteLabel ? (\n <div className=\"text-muted-foreground/70 mt-1 font-mono text-[10px] tracking-widest uppercase\">\n {siteLabel}\n </div>\n ) : null}\n </div>\n\n <nav className=\"flex-1 overflow-y-auto px-2 py-3\">\n <div className=\"text-muted-foreground/60 mb-1 px-3 font-mono text-[10px] tracking-widest uppercase\">\n § tools\n </div>\n <ul className=\"space-y-0.5\">\n {tools.map((tool) => {\n const isActive = tool.id === active;\n const innerCls =\n 'flex items-baseline gap-2 rounded px-3 py-1.5 text-[12.5px] transition-colors ' +\n (isActive\n ? 'bg-primary/10 text-primary font-semibold'\n : 'text-muted-foreground hover:text-foreground hover:bg-muted/30');\n const content = (\n <>\n {tool.icon ? (\n <span\n className={\n 'shrink-0 font-mono text-[11px] ' +\n (isActive ? 'text-primary' : 'text-muted-foreground/70')\n }\n aria-hidden\n >\n {tool.icon}\n </span>\n ) : null}\n <span className=\"flex-1 leading-tight\">\n <span>{tool.label}</span>\n {tool.tagline ? (\n <span className=\"text-muted-foreground/60 mt-0.5 block font-mono text-[10px] tracking-wide normal-case\">\n {tool.tagline}\n </span>\n ) : null}\n </span>\n {tool.external ? (\n <span\n className=\"text-muted-foreground/60 text-[10px]\"\n aria-hidden\n >\n ↗\n </span>\n ) : null}\n </>\n );\n return (\n <li key={tool.id}>\n {tool.external ? (\n <a\n href={tool.href}\n target=\"_blank\"\n rel=\"noreferrer\"\n onClick={onClose}\n className={innerCls}\n data-oc-dashboard-tool={isActive ? 'active' : 'sibling'}\n >\n {content}\n </a>\n ) : (\n <Link\n href={tool.href}\n onClick={onClose}\n aria-current={isActive ? 'page' : undefined}\n className={innerCls}\n data-oc-dashboard-tool={isActive ? 'active' : 'sibling'}\n >\n {content}\n </Link>\n )}\n </li>\n );\n })}\n </ul>\n </nav>\n </aside>\n );\n}\n\n/**\n * Convenience: the dashboard hub-page grid. Renders the same set of\n * tools as the sidebar, but as bigger card-style entries — used as\n * the body of `/dashboard/index.tsx` on each protocol site.\n */\nexport interface OcDashboardHubProps {\n tools: ReadonlyArray<OcDashboardTool>;\n className?: string;\n}\n\nexport function OcDashboardHub({ tools, className }: OcDashboardHubProps) {\n return (\n <ul\n className={\n 'grid gap-px border-t border-l sm:grid-cols-2 ' + (className ?? '')\n }\n data-oc-dashboard-hub=\"\"\n >\n {tools.map((tool) => {\n const content = (\n <span className=\"flex h-full flex-col gap-3 p-5 transition-colors\">\n <span className=\"flex items-baseline gap-3\">\n {tool.icon ? (\n <span\n className=\"text-primary font-mono text-[13px]\"\n aria-hidden\n >\n {tool.icon}\n </span>\n ) : null}\n <span className=\"font-display text-foreground text-base font-bold tracking-tight\">\n {tool.label}\n </span>\n {tool.external ? (\n <span\n className=\"text-muted-foreground/60 ml-auto text-xs\"\n aria-hidden\n >\n ↗\n </span>\n ) : (\n <span\n className=\"text-muted-foreground/60 ml-auto text-xs\"\n aria-hidden\n >\n →\n </span>\n )}\n </span>\n {tool.tagline ? (\n <span className=\"text-muted-foreground text-sm leading-relaxed\">\n {tool.tagline}\n </span>\n ) : null}\n </span>\n );\n const cls = 'hover:bg-muted/30 group block border-r border-b transition-colors';\n return (\n <li key={tool.id}>\n {tool.external ? (\n <a\n href={tool.href}\n target=\"_blank\"\n rel=\"noreferrer\"\n className={cls}\n >\n {content}\n </a>\n ) : (\n <Link href={tool.href} className={cls}>\n {content}\n </Link>\n )}\n </li>\n );\n })}\n </ul>\n );\n}\n","import type { ReactNode } from 'react';\n\n/**\n * AppShell — shared page chrome for every authenticated dashboard surface\n * across the OC family (vault, me, fleet, future). Lifted from oc-me-web's\n * `MeShell` and oc-vault-web's `VaultShell` — same eyebrow / title /\n * description / actions header band, no sidebar (sidebars are app-specific\n * and stay in the consuming app).\n *\n * Usage:\n * <AppShell eyebrow=\"§ vault\" title=\"your vault.\" description=\"…\">\n * ...\n * </AppShell>\n *\n * The component is stateless and dependency-free. Tailwind classes assume\n * the consuming site loads the family `globals.css` (which defines\n * `.container`, `.label-mono`, the dark-by-default palette, etc.).\n */\n\nexport interface AppShellProps {\n eyebrow?: ReactNode;\n title?: ReactNode;\n description?: ReactNode;\n /** Right-aligned action node rendered next to the title (e.g. CTA buttons). */\n headerActions?: ReactNode;\n children: ReactNode;\n className?: string;\n}\n\nexport function AppShell({\n eyebrow,\n title,\n description,\n headerActions,\n children,\n className,\n}: AppShellProps) {\n const hasHeader = Boolean(title);\n return (\n <div className={'container ' + (className ?? '')}>\n <div className=\"flex min-h-[calc(100vh-3rem)] flex-col\">\n <div className=\"flex min-w-0 flex-1 flex-col\">\n <div className=\"pt-6 md:pt-8\">\n {hasHeader && (\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between\">\n <div className=\"max-w-3xl\">\n {eyebrow && (\n <div className=\"label-mono text-primary mb-3\">\n {eyebrow}\n </div>\n )}\n <h1 className=\"font-display text-2xl font-bold tracking-tight sm:text-3xl\">\n {title}\n </h1>\n {description && (\n <p className=\"text-muted-foreground mt-3 max-w-[64ch] text-sm leading-relaxed\">\n {description}\n </p>\n )}\n </div>\n {headerActions && (\n <div className=\"flex shrink-0 items-center gap-2\">\n {headerActions}\n </div>\n )}\n </div>\n )}\n <div className={hasHeader ? 'mt-8 pb-12' : 'pb-12'}>{children}</div>\n </div>\n </div>\n </div>\n </div>\n );\n}\n","import { cn } from '../tokens/cn';\n\nexport interface LayoutSubHeaderTag {\n label: string;\n /** Hide this tag below the given breakpoint (progressive disclosure). */\n hideBelow?: 'sm' | 'md' | 'lg';\n}\n\nexport interface LayoutSubHeaderProps {\n /** Product label shown after the status, e.g. \"oc · stamp\". */\n product: string;\n /** Left-side status text. Defaults to \"live · mainnet\". */\n status?: string;\n /**\n * Right-side capability tag(s). Keep it to ONE short phrase per site —\n * the strip reads as quiet supporting context, not a feature list. A\n * second/third tag is supported (spaced, never comma-jammed) for the rare\n * site that needs it, each with its own `hideBelow`.\n */\n tags?: LayoutSubHeaderTag[];\n /** Hide the pulsing heartbeat dot (e.g. on a degraded surface). */\n noHeartbeat?: boolean;\n className?: string;\n}\n\nconst HIDE: Record<NonNullable<LayoutSubHeaderTag['hideBelow']>, string> = {\n sm: 'hidden sm:inline',\n md: 'hidden md:inline',\n lg: 'hidden lg:inline',\n};\n\n/**\n * LayoutSubHeader — the ecosystem status strip below the header. One line,\n * never wraps. Identical shape across every family surface:\n *\n * ● live · mainnet oc · stamp ················· bip-322 · opentimestamps\n *\n * Left cluster (heartbeat + status + product) is the identity; the right\n * cluster is a quiet, low-contrast capability whisper. Below `sm` the strip\n * collapses to just the heartbeat + product so it never wraps or crowds a\n * phone header — the right cluster and the `status` reappear from `sm` up.\n *\n * The band carries a faint skin-tinted translucent shade (`.oc-substrip`) so\n * it has presence on every skin × mode without bleeding the hero/aurora\n * behind it. Pass `product`, optional `status`, and `tags`.\n */\nexport function LayoutSubHeader({\n product,\n status = 'live · mainnet',\n tags = [],\n noHeartbeat = false,\n className,\n}: LayoutSubHeaderProps) {\n return (\n <div className={cn('oc-substrip border-b', className)}>\n <div className=\"container flex items-center justify-between gap-x-6 py-2 font-mono text-[11px]\">\n <div className=\"flex min-w-0 items-center gap-2.5\">\n {!noHeartbeat && (\n <span\n className=\"bg-primary inline-block size-1.5 shrink-0 animate-pulse rounded-full ring-2 ring-[color-mix(in_oklch,var(--primary),transparent_78%)]\"\n aria-hidden\n />\n )}\n <span className=\"text-muted-foreground hidden tracking-widest whitespace-nowrap uppercase sm:inline\">\n {status}\n </span>\n <span className=\"text-foreground truncate\">{product}</span>\n </div>\n {tags.length > 0 && (\n <div className=\"text-muted-foreground/55 hidden shrink-0 items-center gap-x-3 tracking-wider whitespace-nowrap uppercase sm:flex\">\n {tags.map((tag, i) => (\n <span key={i} className={tag.hideBelow ? HIDE[tag.hideBelow] : undefined}>\n {tag.label}\n </span>\n ))}\n </div>\n )}\n </div>\n </div>\n );\n}\n","import type { ReactNode } from 'react';\n\nimport { cn } from '../tokens/cn';\n\nexport interface OcAppBarProps {\n /**\n * `'full'` (default) = edge-to-edge app chrome: a `.app-bar` row (responsive\n * gutters, NO max-width), so the header's left/right edges align with a\n * full-bleed app shell below it. `'contained'` = the same row inside\n * `.container` (max-w-screen-xl), identical to the marketing/content header —\n * an escape hatch, rarely needed.\n */\n variant?: 'full' | 'contained';\n /** Logo slot — pass `<OcLogoDropdown>…</OcLogoDropdown>` with the site wordmark. */\n start?: ReactNode;\n /** Center slot — pass `<OcPrimaryNav … />`. Centered, flex-1, min-w-0. */\n center?: ReactNode;\n /** Trailing actions — pass e.g. `<HeaderAccount /><OcAppearanceMenu />`. */\n end?: ReactNode;\n /** Stick to the top of the viewport. Default `true`. Keeps `h-12` (3rem). */\n sticky?: boolean;\n className?: string;\n}\n\n/**\n * `OcAppBar` — the sanctioned FULL-BLEED application header for full-screen app\n * surfaces (chat `/app`, the analytics cockpit, the forge console, the me\n * operator plane …). It is the app-surface counterpart to the constrained\n * marketing/content header: the SAME primitives (`OcLogoDropdown` /\n * `OcPrimaryNav` / `OcAccountMenu`) mounted in an edge-to-edge `.app-bar` row\n * (gutters only, no `max-w-screen-xl`) instead of a centered `.container`, so a\n * full-bleed app shell underneath lines up edge-to-edge with the chrome above.\n *\n * Marketing / content / protocol pages keep the constrained `.container`\n * header — never use `OcAppBar` over a `.container`-capped body, or you\n * re-introduce the left/right misalignment this composition exists to fix.\n *\n * Auth-free and brand-free by design: all branding + session chrome arrive\n * through the `start` / `center` / `end` slots, so app sites and content sites\n * share one primitive layer and can never visually drift. The fixed `h-12`\n * (3rem) lets a shell below claim `h-[calc(100dvh-3rem)]`.\n */\nexport function OcAppBar({\n variant = 'full',\n start,\n center,\n end,\n sticky = true,\n className,\n}: OcAppBarProps) {\n return (\n <header\n className={cn(\n 'bg-background/90 supports-[backdrop-filter]:bg-background/70 w-full border-b backdrop-blur',\n sticky && 'sticky top-0 z-50',\n className\n )}\n >\n <div\n className={cn(\n variant === 'full' ? 'app-bar' : 'container',\n 'flex h-12 items-center justify-between gap-4'\n )}\n >\n {start}\n <div className=\"flex min-w-0 flex-1 justify-center px-2\">{center}</div>\n <div className=\"flex items-center gap-1\">{end}</div>\n </div>\n </header>\n );\n}\n","import Link from \"next/link\";\nimport type { ReactNode } from \"react\";\n\nimport { cn } from \"../tokens/cn\";\nimport { FAMILY_PROPERTIES, type FamilyCategory } from \"./family-properties\";\n\nexport interface FooterLink {\n href: string;\n label: string;\n /** Render as a cross-origin `<a target=\"_blank\">` with a ↗ affordance. */\n external?: boolean;\n}\n\nexport interface FooterColumn {\n /** Column heading, e.g. `'§ docs'`. */\n label: string;\n links: FooterLink[];\n}\n\nexport interface OcFamilyFooterBrand {\n /** The site's own logo mark (e.g. `<LogoMark size={20} />`). Optional. */\n mark?: ReactNode;\n /** Wordmark, e.g. `'oc·stamp'`. */\n wordmark: ReactNode;\n /** One-paragraph blurb under the wordmark (may contain links). */\n tagline: ReactNode;\n /** Optional license / attribution lines under the blurb. */\n meta?: ReactNode;\n}\n\nexport interface OcFamilyFooterProps {\n brand: OcFamilyFooterBrand;\n /** The site's own `§`-labelled link groups. */\n columns?: FooterColumn[];\n /**\n * Append registry-driven family columns (products / protocols) sourced from\n * `FAMILY_PROPERTIES`, so any footer that lists the family can never drift\n * from the canonical table. `'products'` is the five live products, etc.\n */\n family?: \"products\" | \"protocols\" | \"both\";\n /** Origin the legal-bar links resolve against. Defaults to ochk.io. */\n legalBase?: string;\n /** Override the left copyright line. Defaults to the canonical OC line. */\n legalCopyright?: ReactNode;\n /**\n * Override the centre legal links. Defaults to privacy / terms / security /\n * trademarks / contact (resolved against `legalBase`). Pass your own when a\n * site needs an extra link (e.g. a federation charter) or a shorter set.\n */\n legalLinks?: FooterLink[];\n /** Override the right-hand bitcoin tag (e.g. `'read on bitcoin'`). */\n builtWith?: ReactNode;\n className?: string;\n}\n\n// brand block + N content columns in one grid, mirroring the historical\n// per-site layout (`[1.2fr 1fr 1fr …]`). Keyed by content-column count so the\n// brand block keeps its wider share at every width.\nconst GRID: Record<number, string> = {\n 1: \"md:grid-cols-[1.2fr_1fr]\",\n 2: \"md:grid-cols-[1.2fr_1fr_1fr]\",\n 3: \"md:grid-cols-[1.2fr_1fr_1fr_1fr]\",\n 4: \"md:grid-cols-[1.2fr_1fr_1fr_1fr_1fr]\",\n 5: \"md:grid-cols-[1.2fr_1fr_1fr_1fr_1fr_1fr]\",\n};\n\nconst LINK_CLS =\n \"text-muted-foreground hover:text-foreground font-mono text-xs tracking-wide lowercase transition-colors\";\n\nfunction FooterLinkItem({ link }: { link: FooterLink }) {\n if (link.external) {\n return (\n <a href={link.href} target=\"_blank\" rel=\"noreferrer\" className={LINK_CLS}>\n {\"> \"}\n {link.label} ↗\n </a>\n );\n }\n return (\n <Link href={link.href} className={LINK_CLS}>\n {\"> \"}\n {link.label}\n </Link>\n );\n}\n\nfunction FooterColumnView({ column }: { column: FooterColumn }) {\n return (\n <div>\n <div className=\"label-mono text-primary mb-3\">{column.label}</div>\n <ul className=\"space-y-2\">\n {column.links.map((link) => (\n <li key={`${column.label}:${link.href}`}>\n <FooterLinkItem link={link} />\n </li>\n ))}\n </ul>\n </div>\n );\n}\n\nfunction familyColumn(category: FamilyCategory, label: string): FooterColumn {\n return {\n label,\n links: FAMILY_PROPERTIES.filter((p) => p.category === category).map(\n (p) => ({\n href: p.origin,\n label: p.label,\n external: true,\n }),\n ),\n };\n}\n\n/**\n * `<OcFamilyFooter>` — the one canonical family footer. Brand block on the\n * left, `§`-labelled link columns to the right, a single legal bar beneath.\n * Every `oc-*` site composes this with its own `brand` + `columns`; pass\n * `family` to surface the registry-driven product / protocol columns so any\n * footer listing the family always shows the full, current set.\n */\nexport function OcFamilyFooter({\n brand,\n columns = [],\n family,\n legalBase = \"https://ochk.io\",\n legalCopyright,\n legalLinks,\n builtWith,\n className,\n}: OcFamilyFooterProps) {\n const familyCols: FooterColumn[] = [];\n if (family === \"products\" || family === \"both\") {\n familyCols.push(familyColumn(\"product\", \"§ products\"));\n }\n if (family === \"protocols\" || family === \"both\") {\n familyCols.push(familyColumn(\"protocol\", \"§ protocols\"));\n }\n\n const allColumns = [...familyCols, ...columns];\n const grid = GRID[allColumns.length] ?? GRID[3];\n const year = new Date().getFullYear();\n const legal = (path: string) => `${legalBase}${path}`;\n const links: FooterLink[] = legalLinks ?? [\n { href: legal(\"/privacy\"), label: \"privacy\" },\n { href: legal(\"/terms\"), label: \"terms\" },\n { href: legal(\"/security\"), label: \"security\" },\n { href: legal(\"/trademark\"), label: \"trademarks\" },\n { href: legal(\"/contact\"), label: \"contact\" },\n ];\n\n return (\n <footer className={cn(\"border-t\", className)}>\n <div className=\"container py-10 sm:py-12 md:py-16\">\n <div className={cn(\"grid gap-8 sm:grid-cols-2 sm:gap-10\", grid)}>\n <div>\n <div className=\"flex items-center gap-2\">\n {brand.mark}\n <span className=\"font-display text-sm font-bold tracking-tight\">\n {brand.wordmark}\n </span>\n </div>\n <div className=\"text-muted-foreground mt-3 max-w-[34ch] text-sm leading-relaxed\">\n {brand.tagline}\n </div>\n {brand.meta && <div className=\"mt-4\">{brand.meta}</div>}\n </div>\n {allColumns.map((column) => (\n <FooterColumnView key={column.label} column={column} />\n ))}\n </div>\n\n <div className=\"mt-10 flex flex-col items-start justify-between gap-3 border-t pt-6 font-mono text-[11px] tracking-widest uppercase sm:flex-row sm:items-center\">\n <span className=\"text-muted-foreground\">\n {legalCopyright ?? <>© {year} orangecheck · mit + cc-by-4.0</>}\n </span>\n <div className=\"text-muted-foreground/80 flex flex-wrap items-center gap-x-4 gap-y-1\">\n {links.map((link) => (\n <a\n key={link.label}\n href={link.href}\n {...(link.external\n ? { target: \"_blank\", rel: \"noreferrer\" }\n : {})}\n className=\"hover:text-foreground transition-colors\"\n >\n {link.label}\n </a>\n ))}\n </div>\n <span className=\"text-muted-foreground inline-flex items-center gap-1.5\">\n <span className=\"text-primary text-[13px] leading-none\">₿</span>\n <span>{builtWith ?? \"built with bitcoin\"}</span>\n </span>\n </div>\n </div>\n </footer>\n );\n}\n"]}
1
+ {"version":3,"sources":["../src/tokens/cn.ts","../src/composites/help-hint.tsx","../src/composites/section-header.tsx","../src/primitives/button.tsx","../src/composites/error-page.tsx","../src/composites/empty-state.tsx","../src/composites/stat-grid.tsx","../src/primitives/stat-block.tsx","../src/composites/stat-card.tsx","../src/composites/callout.tsx","../src/composites/definition-list.tsx","../src/composites/data-row.tsx","../src/composites/panel.tsx","../src/composites/marketing-heading.tsx","../src/primitives/badge.tsx","../src/primitives/input.tsx","../src/primitives/alert.tsx","../src/primitives/confirm-dialog.tsx","../src/primitives/prompt-dialog.tsx","../src/primitives/tooltip.tsx","../src/primitives/accordion.tsx","../src/primitives/surface.tsx","../src/primitives/icon-badge.tsx","../src/composites/feature-card.tsx","../src/composites/section.tsx","../src/composites/comparison-table.tsx","../src/composites/numbered-step.tsx","../src/composites/faq.tsx","../src/composites/email-capture.tsx","../src/composites/check-list.tsx","../src/composites/accent-note.tsx","../src/composites/verified-chip.tsx","../src/chrome/ecosystem-switcher.tsx","../src/chrome/family-properties.ts","../src/chrome/logo-dropdown.tsx","../src/tokens/provider.tsx","../src/tokens/appearance-menu.tsx","../src/chrome/account-menu.tsx","../src/chrome/primary-nav.tsx","../src/chrome/dashboard-shell.tsx","../src/chrome/app-shell.tsx","../src/chrome/layout-sub-header.tsx","../src/chrome/app-bar.tsx","../src/chrome/family-footer.tsx"],"names":["jsxs","jsx","Link","TONE_CLASS","cva","Popover2","React3","X","Check","useState","useRef","useEffect","ChevronDown","isActive","Sun","Moon","useTheme","Icon","Copy","Fragment","Plus"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAUO,SAAS,MAAM,MAAA,EAA8B;AAChD,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC/B;ACoBO,SAAS,QAAA,CAAS;AAAA,EACrB,QAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA,GAAO,KAAA;AAAA,EACP,IAAA,GAAO,IAAA;AAAA,EACP,IAAA,GAAO,SAAA;AAAA,EACP,KAAA,GAAQ,eAAA;AAAA,EACR;AACJ,CAAA,EAAkB;AACd,EAAA,MAAM,QAAA,GAAW,IAAA,KAAS,IAAA,GAAO,EAAA,GAAK,EAAA;AACtC,EAAA,uBACI,IAAA,CAAS,cAAR,EACG,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAS,OAAA,CAAA,OAAA;AAAA,MAAR;AAAA,QACG,YAAA,EAAY,KAAA;AAAA,QACZ,OAAA,EAAS,CAAC,CAAA,KAAM,CAAA,CAAE,eAAA,EAAgB;AAAA,QAClC,SAAA,EAAW,EAAA;AAAA,UACP,iJAAA;AAAA,UACA,IAAA,KAAS,WACH,mDAAA,GACA,oCAAA;AAAA,UACN;AAAA,SACJ;AAAA,QAEA,QAAA,kBAAA,GAAA,CAAC,UAAA,EAAA,EAAW,IAAA,EAAM,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,MAAA,qBACfA,IAAC,gBAAA,EAAA,EAAoC,MAAA,EAAA,EAAd,MAAA,CAAO,KAAuB,CACtD;AAAA,KAAA,EACH,CAAA;AAAA,oBAEAD,IAAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,iJAAA,EACb,QAAA,EAAA;AAAA,sBAAAC,GAAAA,CAAC,UAAK,SAAA,EAAU,uBAAA,EACb,4CAAkBD,IAAAA,CAAAmB,YAAA,EAAE,QAAA,EAAA;AAAA,QAAA,OAAA;AAAA,QAAG,IAAA;AAAA,QAAK;AAAA,OAAA,EAA8B,CAAA,EAC7D,CAAA;AAAA,sBACAlB,IAAC,KAAA,EAAA,EAAI,SAAA,EAAU,wEACZ,QAAA,EAAA,KAAA,CAAM,GAAA,CAAI,CAAC,IAAA,qBACVA,GAAAA;AAAA,QAAC,GAAA;AAAA,QAAA;AAAA,UAEC,MAAM,IAAA,CAAK,IAAA;AAAA,UACV,GAAI,KAAK,QAAA,GACN,EAAE,QAAQ,QAAA,EAAU,GAAA,EAAK,YAAA,EAAa,GACtC,EAAC;AAAA,UACL,SAAA,EAAU,yCAAA;AAAA,UAET,QAAA,EAAA,IAAA,CAAK;AAAA,SAAA;AAAA,QAPD,IAAA,CAAK;AAAA,OASb,CAAA,EACH,CAAA;AAAA,sBACAD,IAAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,wDAAA,EACd,QAAA,EAAA;AAAA,wBAAAC,GAAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,uCAAA,EAAwC,QAAA,EAAA,QAAA,EAAC,CAAA;AAAA,wBACzDA,GAAAA,CAAC,MAAA,EAAA,EAAM,QAAA,EAAA,SAAA,IAAa,oBAAA,EAAqB;AAAA,OAAA,EAC3C;AAAA,KAAA,EACF;AAAA,GAAA,EACF,CAAA,EACF,CAAA;AAEJ","file":"components.mjs","sourcesContent":["import type { ClassValue } from 'clsx';\n\nimport { clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\n/**\n * Canonical class-name merge for the OrangeCheck family.\n * `clsx` for conditional composition, `tailwind-merge` to resolve\n * conflicting Tailwind utilities (last-wins by property).\n */\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n","'use client';\n\nimport * as Popover from '@radix-ui/react-popover';\nimport { HelpCircle } from 'lucide-react';\nimport type { ReactNode } from 'react';\n\nimport { cn } from '../tokens/cn';\n\nexport interface HelpHintProps {\n /** The help body — short prose (1–3 sentences) explaining a term/control. */\n children: ReactNode;\n /** Optional bold \"§ \"-prefixed heading inside the popover. */\n title?: string;\n /** Which side the popover prefers to open toward. Default `top`. */\n side?: 'top' | 'right' | 'bottom' | 'left';\n /** `xs` tightens the icon for dense label rows; `sm` (default) suits most. */\n size?: 'xs' | 'sm';\n /** `subtle` mutes the \"?\" icon when it sits in a description / muted row;\n * `default` is primary-tinted for active labels. */\n tone?: 'default' | 'subtle';\n /** Accessible label for the trigger (defaults to \"what is this?\"). */\n label?: string;\n className?: string;\n}\n\n/**\n * HelpHint — the canonical inline \"?\" affordance for term-level guidance.\n * Click/focus reveals a small popover (Radix) with optional title + prose;\n * works on touch (not a hover tooltip). Lifted from oc-me-web's richer\n * `me/ui/HelpHint` (with `size`/`tone`), now the single source. Also the\n * keystone behind `SectionHeader`'s optional `hint`.\n */\nexport function HelpHint({\n children,\n title,\n side = 'top',\n size = 'sm',\n tone = 'default',\n label = 'what is this?',\n className,\n}: HelpHintProps) {\n const iconSize = size === 'xs' ? 12 : 14;\n return (\n <Popover.Root>\n <Popover.Trigger\n aria-label={label}\n onClick={(e) => e.stopPropagation()}\n className={cn(\n 'focus-visible:ring-primary/60 inline-flex shrink-0 items-center justify-center rounded-full transition-colors outline-none focus-visible:ring-2',\n tone === 'subtle'\n ? 'text-muted-foreground/60 hover:text-foreground/80'\n : 'text-primary/70 hover:text-primary',\n className\n )}\n >\n <HelpCircle size={iconSize} aria-hidden />\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Content\n side={side}\n sideOffset={6}\n collisionPadding={12}\n className=\"border-border bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 z-50 max-w-xs rounded-md border p-3 text-xs leading-relaxed shadow-md outline-none\"\n >\n {title && <div className=\"label-mono text-primary mb-1.5\">§ {title}</div>}\n <div className=\"text-foreground/90\">{children}</div>\n <Popover.Arrow className=\"fill-popover\" />\n </Popover.Content>\n </Popover.Portal>\n </Popover.Root>\n );\n}\n","import type { ReactNode } from 'react';\n\nimport { HelpHint } from './help-hint';\n\nexport interface SectionHeaderProps {\n /** Plain section name — rendered after a \"§ \" glyph in label-mono. */\n label: string;\n /** Optional right-side string (count, \"most recent first\"). */\n meta?: ReactNode;\n /** When provided, renders an inline HelpHint \"?\" next to the label. */\n hint?: { title?: string; body: ReactNode; side?: 'top' | 'bottom' | 'left' | 'right' };\n tone?: 'primary' | 'muted' | 'warning' | 'success' | 'destructive';\n className?: string;\n}\n\nconst TONE_CLASS = {\n primary: 'text-primary',\n muted: 'text-muted-foreground',\n warning: 'text-warning',\n success: 'text-success',\n destructive: 'text-destructive',\n} as const;\n\n/**\n * SectionHeader — the canonical \"§ x\" section header used across every\n * /me, /vault, and /fleet dashboard surface. Lifted from oc-me-web's\n * `me/ui/SectionHeader` so the visual contract stays single-source.\n *\n * Pattern is `label-mono text-primary mb-3` with a \"§ \" glyph followed by\n * the label, plus an optional muted/uppercase right-side meta string.\n */\nexport function SectionHeader({\n label,\n meta,\n hint,\n tone = 'primary',\n className = '',\n}: SectionHeaderProps) {\n return (\n <div className={`mb-3 flex items-baseline justify-between gap-2 ${className}`}>\n <div className=\"flex items-center gap-1.5\">\n <div className={`label-mono ${TONE_CLASS[tone]}`}>§ {label}</div>\n {hint && (\n <HelpHint title={hint.title} side={hint.side ?? 'bottom'}>\n {hint.body}\n </HelpHint>\n )}\n </div>\n {meta && (\n <span className=\"text-muted-foreground/70 font-mono text-[10px] tracking-widest uppercase\">\n {meta}\n </span>\n )}\n </div>\n );\n}\n","import type { VariantProps } from 'class-variance-authority';\n\nimport { Slot } from '@radix-ui/react-slot';\nimport { cva } from 'class-variance-authority';\nimport * as React from 'react';\n\nimport { cn } from '../tokens/cn';\n\nconst buttonVariants = cva(\n \"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground hover:bg-primary/90',\n destructive:\n 'bg-destructive hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 text-white',\n outline:\n 'bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 border shadow-xs',\n secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80',\n ghost: 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',\n link: 'text-primary underline-offset-4 hover:underline',\n // For CTAs placed ON a saturated brand band or a dark section\n // (e.g. a terracotta hero / footer / a forced-dark block) where\n // the surface is dark+light-text in either mode. A neutral white\n // pill + a translucent-white ghost read on any such surface;\n // hardcoded white is deliberate (cf. destructive's text-white).\n onBrand: 'bg-white text-neutral-900 shadow-sm hover:bg-white/90',\n onBrandOutline:\n 'border border-white/40 bg-transparent text-white hover:bg-white/10',\n },\n size: {\n default: 'h-9 px-4 py-2 has-[>svg]:px-3',\n sm: 'h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5',\n lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',\n icon: 'size-9',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n }\n);\n\nfunction Button({\n className,\n variant,\n size,\n asChild = false,\n ...props\n}: React.ComponentProps<'button'> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean;\n }) {\n const Comp = asChild ? Slot : 'button';\n\n return (\n <Comp\n data-slot=\"button\"\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n );\n}\n\nexport { Button, buttonVariants };\n","import { ArrowLeft, Home, RefreshCw } from 'lucide-react';\nimport Link from 'next/link';\nimport type { ReactNode } from 'react';\n\nimport { Button } from '../primitives/button';\n\nexport type OcErrorVariant = 'not-found' | 'server-error';\n\nexport interface OcErrorPageProps {\n /**\n * Picks the defaults. `not-found` is the 404 shape (primary tone, a \"go\n * back\" affordance); `server-error` is the 500 shape (destructive tone, a\n * retry affordance and a what-to-do list).\n */\n variant?: OcErrorVariant;\n /** Override the big numeral. Defaults to 404 / 500 from the variant. */\n code?: number | string;\n /** Override the headline. Lowercase, per the family voice. */\n title?: string;\n /** Override the `//` prose line under the headline. */\n detail?: string;\n /**\n * A short \"what can you do\" list, rendered as the bordered mono panel.\n * Defaults to the server-error list; pass `[]` to suppress it.\n *\n * Items are nodes, not just strings, so one can carry a link — attest's\n * original 500 ended its list with \"persisting? report it on github\", and\n * a shared component that could not express that would have been a\n * downgrade for the site it was lifted from.\n */\n actions?: ReactNode[];\n /** Where \"go home\" points. A site with a app-scoped root can change it. */\n homeHref?: string;\n /** Extra content below the buttons — a report link, a status page, a hint. */\n children?: ReactNode;\n className?: string;\n}\n\nconst VARIANTS = {\n 'not-found': {\n code: 404,\n title: 'no such route',\n detail: \"the page you're looking for doesn't exist, or has been moved.\",\n tone: 'text-primary',\n label: 'not found',\n actions: [] as ReactNode[],\n },\n 'server-error': {\n code: 500,\n title: 'internal error',\n detail: 'something went wrong on our end.',\n tone: 'text-destructive',\n label: 'server error',\n actions: [\n 'try refreshing the page',\n 'wait a few minutes, try again',\n 'return home and start over',\n ] as ReactNode[],\n },\n} as const;\n\n/**\n * OcErrorPage — the family's 404 / 500 body.\n *\n * Nine of thirteen family sites had no error page at all and fell through to\n * Next's unstyled default: no header, no footer, no theme, none of the chrome\n * every other page on the site has. It is the one page a visitor is guaranteed\n * to reach eventually, and it was the only one that looked like a different\n * product.\n *\n * Lifted from `oc-attest-web`, which was the only site with a good one. It\n * lives here rather than being copied nine times because a copied page drifts —\n * that is the lesson of the family's `isFamilyUrl` predicate, where 14 of 15\n * hand-copied versions shared a flaw the 15th had already fixed.\n *\n * `Seo` stays with the consumer: the page's title and `noindex` are site\n * concerns and the design package has no business owning them. So a site's\n * `404.tsx` is its `<Seo>` plus `<OcErrorPage variant=\"not-found\" />`.\n *\n * The \"go back\" button uses `window.history.back()`, which needs a client\n * component — the consumer page carries `'use client'`, as Next requires for\n * any page with an interactive handler.\n */\nexport function OcErrorPage({\n variant = 'not-found',\n code,\n title,\n detail,\n actions,\n homeHref = '/',\n children,\n className = '',\n}: OcErrorPageProps) {\n const v = VARIANTS[variant];\n const shownCode = code ?? v.code;\n const shownActions = actions ?? [...v.actions];\n const isServerError = variant === 'server-error';\n\n return (\n <div\n className={`container flex min-h-[60vh] flex-col items-center justify-center ${className}`}\n >\n <div className=\"w-full max-w-xl\">\n <div className={`label-mono mb-4 ${v.tone}`}>\n § {shownCode} // {v.label}\n </div>\n <h1\n className={`font-display text-7xl font-bold tracking-tight tabular-nums sm:text-8xl ${v.tone}`}\n >\n {shownCode}\n </h1>\n <h2 className=\"font-display mt-2 text-2xl font-bold tracking-tight sm:text-3xl\">\n {title ?? v.title}\n </h2>\n <p className=\"text-muted-foreground mt-3 font-mono text-xs\">\n {'// '}\n {detail ?? v.detail}\n </p>\n\n {shownActions.length > 0 && (\n <div className=\"mt-8 border\">\n <div className=\"border-b px-4 py-2 font-mono text-[11px] tracking-widest uppercase\">\n what can you do\n </div>\n <ul className=\"divide-y font-mono text-xs\">\n {shownActions.map((a, i) => (\n // Index keys: items are nodes and the list is\n // static per variant, so there is nothing\n // better to key on and nothing reorders.\n <li key={i} className=\"px-4 py-2\">\n {'>> '}\n {a}\n </li>\n ))}\n </ul>\n </div>\n )}\n\n <div className=\"mt-8 flex flex-wrap gap-3\">\n <Button asChild className=\"font-mono\">\n <Link href={homeHref}>\n <Home className=\"mr-2 h-3 w-3\" />\n <span className=\"text-[11px] tracking-widest uppercase\">go home</span>\n </Link>\n </Button>\n <Button\n variant=\"outline\"\n onClick={() => {\n if (typeof window === 'undefined') return;\n if (isServerError) window.location.reload();\n else window.history.back();\n }}\n className=\"font-mono\"\n >\n {isServerError ? (\n <RefreshCw className=\"mr-2 h-3 w-3\" />\n ) : (\n <ArrowLeft className=\"mr-2 h-3 w-3\" />\n )}\n <span className=\"text-[11px] tracking-widest uppercase\">\n {isServerError ? 'retry' : 'go back'}\n </span>\n </Button>\n </div>\n\n {children && <div className=\"mt-6\">{children}</div>}\n </div>\n </div>\n );\n}\n","import Link from 'next/link';\nimport type { ReactNode } from 'react';\n\nexport interface EmptyStateCta {\n label: string;\n href: string;\n /** External links open in a new tab and get a ↗ glyph. */\n external?: boolean;\n}\n\nexport interface EmptyStateProps {\n /** Short heading — one mono-uppercased label like \"no entries yet\". */\n label: string;\n /** Body — short prose explaining what would appear here and how. */\n children: ReactNode;\n cta?: EmptyStateCta;\n secondary?: EmptyStateCta;\n tone?: 'info' | 'warning' | 'muted';\n className?: string;\n}\n\nconst TONE_CLASS = {\n info: 'border-primary/30 bg-primary/5',\n warning: 'border-warning/40 bg-warning/5',\n muted: 'border-border bg-muted/20',\n} as const;\n\nconst LABEL_TONE_CLASS = {\n info: 'text-primary',\n warning: 'text-warning',\n muted: 'text-muted-foreground',\n} as const;\n\n/**\n * EmptyState — the canonical empty-state card used across every /me,\n * /vault, and /fleet dashboard. Empty states should *teach*: explain what\n * would appear, and how to make it appear. Lifted from oc-me-web's\n * `me/ui/EmptyState`.\n */\nexport function EmptyState({\n label,\n children,\n cta,\n secondary,\n tone = 'info',\n className = '',\n}: EmptyStateProps) {\n return (\n <div className={`border p-5 md:p-6 ${TONE_CLASS[tone]} ${className}`}>\n <div className={`label-mono mb-2 ${LABEL_TONE_CLASS[tone]}`}>§ {label}</div>\n <div className=\"text-foreground/85 max-w-2xl text-sm leading-relaxed\">{children}</div>\n {(cta || secondary) && (\n <div className=\"mt-4 flex flex-wrap gap-3\">\n {cta && <CtaLink {...cta} variant=\"primary\" />}\n {secondary && <CtaLink {...secondary} variant=\"secondary\" />}\n </div>\n )}\n </div>\n );\n}\n\nfunction CtaLink({\n label,\n href,\n external,\n variant,\n}: EmptyStateCta & { variant: 'primary' | 'secondary' }) {\n const cls =\n variant === 'primary'\n ? 'bg-primary text-primary-foreground hover:bg-primary/90 inline-flex h-9 items-center justify-center rounded-md px-4 font-mono text-[11px] font-semibold tracking-widest uppercase'\n : 'text-muted-foreground hover:text-foreground border-input hover:bg-accent inline-flex h-9 items-center justify-center rounded-md border px-4 font-mono text-[11px] tracking-widest uppercase';\n const text = external ? `${label} ↗` : label;\n if (external) {\n return (\n <a href={href} target=\"_blank\" rel=\"noreferrer\" className={cls}>\n {text}\n </a>\n );\n }\n return (\n <Link href={href} className={cls}>\n {text}\n </Link>\n );\n}\n","import type { ReactNode } from 'react';\n\nexport interface StatItem {\n /** Short uppercased label rendered in mono. */\n label: string;\n /** Primary value · already formatted as a string. */\n value: string;\n /** Optional secondary line · USD conversion, \"last 30 days\", etc. */\n sub?: string;\n /** When true, value is rendered in primary tone (use for headline metric). */\n accent?: boolean;\n /** Optional tone for the value (overrides accent). */\n tone?: 'default' | 'primary' | 'success' | 'warning' | 'destructive' | 'muted';\n}\n\nexport interface StatGridProps {\n items: StatItem[];\n columns?: 1 | 2 | 3 | 4;\n className?: string;\n}\n\nconst TONE_CLASS = {\n default: '',\n primary: 'text-primary',\n success: 'text-success',\n warning: 'text-warning',\n destructive: 'text-destructive',\n muted: 'text-muted-foreground',\n} as const;\n\nconst COL_CLASS = {\n 1: '',\n 2: 'md:grid-cols-2',\n 3: 'md:grid-cols-3',\n 4: 'md:grid-cols-2 lg:grid-cols-4',\n} as const;\n\n/**\n * StatGrid — the canonical stats row used across family dashboards.\n * Lifted from oc-me-web's `me/ui/StatGrid`. Grid of equal-width tiles\n * separated by 1px borders. Always pre-format the value string —\n * the component does no number formatting.\n */\nexport function StatGrid({ items, columns = 3, className = '' }: StatGridProps) {\n return (\n <div className={`oc-stat-grid bg-border grid gap-px border ${COL_CLASS[columns]} ${className}`}>\n {items.map((it, i) => (\n <Tile key={`${it.label}-${i}`} item={it} />\n ))}\n </div>\n );\n}\n\nfunction Tile({ item }: { item: StatItem }) {\n const tone = item.tone ?? (item.accent ? 'primary' : 'default');\n return (\n <div className=\"oc-stat-tile bg-background p-5\">\n <div className=\"text-muted-foreground/80 font-mono text-[10px] tracking-widest uppercase\">\n {item.label}\n </div>\n <div\n className={`font-display mt-1 text-2xl font-bold tabular-nums tracking-tight ${TONE_CLASS[tone]}`}\n >\n {item.value}\n </div>\n {item.sub && (\n <div className=\"text-muted-foreground/70 mt-1 font-mono text-[10px] tracking-widest uppercase\">\n {item.sub}\n </div>\n )}\n </div>\n );\n}\n\nexport function StatTile({ children, ...item }: StatItem & { children?: ReactNode }) {\n return (\n <div>\n <Tile item={item} />\n {children}\n </div>\n );\n}\n","import type { ReactNode } from 'react';\n\nimport { cn } from '../tokens/cn';\n\nexport interface StatBlockProps {\n label: string;\n value: ReactNode;\n sub?: ReactNode;\n /** Optional \"vs prior period\" delta — arrow + colour. */\n delta?: { value: number; suffix?: string } | null;\n tone?: 'default' | 'success' | 'warning' | 'destructive';\n className?: string;\n}\n\n/**\n * A single labelled value cell — the building block for every counter grid in a\n * dashboard. Optional delta arrow + colour for period-over-period deltas.\n * (Richer than StatTile: carries a delta. Use StatGrid for laid-out grids.)\n */\nexport function StatBlock({ label, value, sub, delta, tone = 'default', className }: StatBlockProps) {\n const toneClass =\n tone === 'success'\n ? 'text-success'\n : tone === 'warning'\n ? 'text-warning'\n : tone === 'destructive'\n ? 'text-destructive'\n : 'text-foreground';\n\n return (\n <div className={cn('flex flex-col gap-1', className)}>\n <span className=\"label-mono text-muted-foreground text-[10px]\">{label}</span>\n <span\n className={cn(\n 'font-display text-2xl font-bold tracking-tight tabular-nums',\n toneClass\n )}\n >\n {value}\n </span>\n <div className=\"flex items-baseline gap-2\">\n {sub && (\n <span className=\"text-muted-foreground font-mono text-[11px] tracking-wide lowercase\">\n {sub}\n </span>\n )}\n {delta && (\n <span\n className={cn(\n 'font-mono text-[11px] tracking-wide',\n delta.value > 0\n ? 'text-success'\n : delta.value < 0\n ? 'text-destructive'\n : 'text-muted-foreground'\n )}\n >\n {delta.value > 0 ? '▲' : delta.value < 0 ? '▼' : '·'}{' '}\n {Math.abs(delta.value).toFixed(1)}\n {delta.suffix ?? '%'}\n </span>\n )}\n </div>\n </div>\n );\n}\n","import type { ReactNode } from 'react';\n\nimport { StatBlock } from '../primitives/stat-block';\nimport { cn } from '../tokens/cn';\n\nexport interface StatCardProps {\n label: string;\n value: ReactNode;\n sub?: ReactNode;\n /** Optional period-over-period delta arrow + colour. */\n delta?: { value: number; suffix?: string } | null;\n tone?: 'default' | 'success' | 'warning' | 'destructive';\n /** Padding density — `sm` for dense grids, `default` for standalone cards. */\n pad?: 'sm' | 'default';\n className?: string;\n}\n\n/**\n * StatCard — a single stat in a bordered `bg-card` frame. The standalone\n * counterpart to StatBlock (the bare cell) and StatGrid (a laid-out grid):\n * this is the \"one stat in its own card\" shape that fleet (`dashboard/Stat`)\n * and me (`StatCell`, `ParticipationFeeCard` tiles, etc.) each hand-roll.\n * Wraps StatBlock so the inner cell stays single-source.\n */\nexport function StatCard({ pad = 'default', className, ...stat }: StatCardProps) {\n return (\n <div className={cn('oc-stat-card border bg-card', pad === 'sm' ? 'p-3 md:p-4' : 'p-5', className)}>\n <StatBlock {...stat} />\n </div>\n );\n}\n","import type { ReactNode } from 'react';\n\nimport { cn } from '../tokens/cn';\n\nexport type CalloutTone = 'info' | 'warning' | 'destructive' | 'success' | 'muted';\n\nexport interface CalloutProps {\n tone?: CalloutTone;\n /** Optional \"§ \"-prefixed mono header. */\n label?: string;\n /** Optional leading icon, sized by the caller (e.g. lucide `size-4`). */\n icon?: ReactNode;\n /** Body content. */\n children: ReactNode;\n /** Optional trailing action (button / link) pinned to the bottom. */\n action?: ReactNode;\n className?: string;\n}\n\nconst FRAME: Record<CalloutTone, string> = {\n info: 'border-primary/30 bg-primary/5',\n warning: 'border-warning/40 bg-warning/5',\n destructive: 'border-destructive/40 bg-destructive/5',\n success: 'border-success/40 bg-success/5',\n muted: 'border-border bg-muted/20',\n};\n\nconst LABEL: Record<CalloutTone, string> = {\n info: 'text-primary',\n warning: 'text-warning',\n destructive: 'text-destructive',\n success: 'text-success',\n muted: 'text-muted-foreground',\n};\n\n/**\n * Callout — the canonical toned panel (`border-{tone}/40 bg-{tone}/5` + an\n * optional `label-mono` header) reimplemented across stamp, pledge, vote,\n * analytics, and me (HealthBanner / SimulationBanner / FrozenBanner /\n * DangerZone, etc.). One component, five tones. For empty-states with CTAs use\n * EmptyState; for inline term help use HelpHint; this is the general\n * notice/banner frame.\n */\nexport function Callout({ tone = 'info', label, icon, children, action, className }: CalloutProps) {\n return (\n <div className={cn('border p-4 md:p-5', FRAME[tone], className)}>\n {label && (\n <div className={cn('label-mono mb-2 flex items-center gap-1.5', LABEL[tone])}>\n {icon}\n <span>§ {label}</span>\n </div>\n )}\n <div className=\"text-foreground/85 text-sm leading-relaxed\">\n {!label && icon ? (\n <span className={cn('mr-2 inline-flex align-middle', LABEL[tone])}>{icon}</span>\n ) : null}\n {children}\n </div>\n {action && <div className=\"mt-3 flex flex-wrap gap-3\">{action}</div>}\n </div>\n );\n}\n","import { Fragment, type ReactNode } from 'react';\n\nimport { cn } from '../tokens/cn';\n\nexport interface DefinitionItem {\n label: ReactNode;\n value: ReactNode;\n}\n\nexport interface DefinitionListProps {\n items: DefinitionItem[];\n className?: string;\n}\n\n/**\n * DefinitionList — the mono-label / value `<dl>` grid reimplemented in agent's\n * inspector, vote's reveal page, and me (BondAnchorCard, OperatorIdentityCard,\n * FrozenBanner). Labels render in uppercase mono; values align in a second\n * column on wider viewports, stacking on narrow ones. Long values (hashes,\n * addresses) wrap via `break-all`.\n */\nexport function DefinitionList({ items, className }: DefinitionListProps) {\n return (\n <dl\n className={cn(\n 'oc-deflist grid gap-x-5 gap-y-2 text-sm sm:grid-cols-[auto_1fr] sm:items-baseline',\n className\n )}\n >\n {items.map((item, i) => (\n <Fragment key={i}>\n <dt className=\"label-mono text-muted-foreground text-[10px]\">{item.label}</dt>\n <dd className=\"text-foreground font-mono text-xs break-all\">{item.value}</dd>\n </Fragment>\n ))}\n </dl>\n );\n}\n","import type { ElementType, ReactNode } from 'react';\n\nimport { cn } from '../tokens/cn';\n\nexport interface DataRowProps {\n /** Primary content (left-aligned, grows to fill). */\n children: ReactNode;\n /** Trailing metadata pinned right (timestamp, count, status pill). */\n meta?: ReactNode;\n /** Optional action(s) rendered after the meta (button, link). */\n action?: ReactNode;\n /** Element to render as — `li` inside a list, `div` otherwise. */\n as?: ElementType;\n className?: string;\n}\n\n/**\n * DataRow — the \"content left, meta right, optional action\" list row\n * reimplemented across me (federations, incidents, grants, distributions,\n * fee entries) and other dashboards. Pair inside a `divide-y border` list.\n * On narrow viewports content and meta stack; from `sm` up they sit on one\n * baseline-aligned line.\n */\nexport function DataRow({ children, meta, action, as, className }: DataRowProps) {\n const Tag = (as ?? 'div') as ElementType;\n return (\n <Tag\n className={cn(\n 'oc-data-row flex flex-col gap-1 py-3 sm:flex-row sm:items-baseline sm:justify-between sm:gap-4',\n className\n )}\n >\n <div className=\"min-w-0 flex-1\">{children}</div>\n {(meta || action) && (\n <div className=\"flex shrink-0 items-center gap-3 sm:justify-end\">\n {meta && (\n <span className=\"text-muted-foreground font-mono text-[11px] tracking-wide\">\n {meta}\n </span>\n )}\n {action}\n </div>\n )}\n </Tag>\n );\n}\n","import type { ReactNode } from 'react';\n\nimport { cn } from '../tokens/cn';\n\nexport interface PanelProps {\n /** Mono kicker shown above the title (e.g. \"attestations\"). Rendered uppercase. */\n label?: ReactNode;\n /** Section title. */\n title?: ReactNode;\n /** Optional trailing control (a button, link, count) pinned right of the header. */\n action?: ReactNode;\n /** Drop the top divider (use for the first panel in a stack). */\n flush?: boolean;\n className?: string;\n children?: ReactNode;\n}\n\n/**\n * Panel (DataSection) — the titled section that carries a chunk of a\n * data-dense / technical page (telemetry blocks, API sections, dashboard\n * groups). THEME-ADAPTIVE by design: under the cypherpunk skins it is a\n * flat full-width `border-t` divider section (terminal voice); under ember\n * the `.oc-panel` class promotes it to a discrete soft, warm, rounded card\n * (see the data-dense treatments in themes/ember.css). Compose these instead\n * of hand-rolling `border-t py-8` sections so subpages re-skin per theme.\n */\nexport function Panel({ label, title, action, flush, className, children }: PanelProps) {\n const hasHeader = label || title || action;\n return (\n <section className={cn('oc-panel py-8', !flush && 'border-t', className)}>\n {hasHeader && (\n <div className=\"mb-4 flex items-start justify-between gap-3\">\n <div className=\"min-w-0\">\n {label && <div className=\"label-mono text-primary mb-1\">{label}</div>}\n {title && (\n <h2 className=\"font-display text-lg font-bold tracking-tight\">{title}</h2>\n )}\n </div>\n {action && <div className=\"shrink-0\">{action}</div>}\n </div>\n )}\n {children}\n </section>\n );\n}\n","import type { ElementType, ReactNode } from 'react';\n\nimport { cn } from '../tokens/cn';\n\n/**\n * marketing-heading — the two-tone display heading used across consumer\n * landing sections. TwoToneHeading renders a solid lead clause followed by a\n * recoloured muted clause at the same size/weight; MarketingHeading wraps it\n * with an optional mono eyebrow and body paragraph. Use onBrand when it sits\n * on a brand/dark band.\n */\n\nexport interface TwoToneHeadingProps {\n lead: ReactNode;\n muted?: ReactNode;\n as?: ElementType;\n tone?: 'default' | 'onBrand';\n className?: string;\n}\n\nexport function TwoToneHeading({\n lead,\n muted,\n as,\n tone = 'default',\n className,\n}: TwoToneHeadingProps) {\n const Tag = as ?? 'h2';\n const leadColor = tone === 'onBrand' ? 'text-primary-foreground' : 'text-foreground';\n // Lighter, cleaner muted clause so the two-tone contrast reads (matches the\n // designer's light-gray second phrase, not a heavy taupe). On a brand band\n // /60 fell below AA-large (~2.5:1); /75 keeps the two-tone read while staying\n // legible on terracotta.\n const mutedColor = tone === 'onBrand' ? 'text-primary-foreground/75' : 'text-foreground/40';\n return (\n <Tag\n className={cn(\n 'font-extrabold tracking-[-0.02em] leading-[1.0] text-balance',\n 'text-3xl sm:text-4xl md:text-5xl',\n leadColor,\n className,\n )}\n >\n <span>{lead}</span>\n {muted ? <span className={mutedColor}> {muted}</span> : null}\n </Tag>\n );\n}\n\nexport interface MarketingHeadingProps {\n eyebrow?: string;\n lead: ReactNode;\n muted?: ReactNode;\n body?: ReactNode;\n align?: 'start' | 'center';\n tone?: 'default' | 'onBrand';\n as?: ElementType;\n className?: string;\n}\n\nexport function MarketingHeading({\n eyebrow,\n lead,\n muted,\n body,\n align = 'start',\n tone = 'default',\n as,\n className,\n}: MarketingHeadingProps) {\n const centered = align === 'center';\n return (\n <div className={cn('flex flex-col', centered && 'items-center text-center', className)}>\n {eyebrow && (\n <p\n className={cn(\n 'label-mono mb-3',\n tone === 'onBrand' ? 'text-primary-foreground/80' : 'text-primary',\n )}\n >\n {eyebrow}\n </p>\n )}\n <TwoToneHeading\n lead={lead}\n muted={muted}\n as={as}\n tone={tone}\n className={cn('max-w-4xl', centered && 'mx-auto')}\n />\n {body && (\n <p\n className={cn(\n 'mt-4 max-w-2xl text-base sm:text-lg',\n tone === 'onBrand' ? 'text-primary-foreground/80' : 'text-muted-foreground',\n centered && 'mx-auto',\n )}\n >\n {body}\n </p>\n )}\n </div>\n );\n}\n","import type { VariantProps } from 'class-variance-authority';\n\nimport { Slot } from '@radix-ui/react-slot';\nimport { cva } from 'class-variance-authority';\nimport * as React from 'react';\n\nimport { cn } from '../tokens/cn';\n\nconst badgeVariants = cva(\n 'focus-visible:border-ring focus-visible:ring-ring/50 inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-md border px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] [&>svg]:pointer-events-none [&>svg]:size-3',\n {\n variants: {\n variant: {\n default:\n 'bg-primary text-primary-foreground [a&]:hover:bg-primary/90 border-transparent',\n secondary:\n 'bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90 border-transparent',\n destructive:\n 'bg-destructive text-destructive-foreground [a&]:hover:bg-destructive/90 border-transparent',\n warning:\n 'bg-warning text-warning-foreground [a&]:hover:bg-warning/90 border-transparent',\n success:\n 'bg-success text-success-foreground [a&]:hover:bg-success/90 border-transparent',\n info: 'bg-info text-info-foreground [a&]:hover:bg-info/90 border-transparent',\n brand: 'bg-brand-soft text-accent-foreground border-transparent',\n neutral:\n 'bg-foreground text-background [a&]:hover:bg-foreground/90 border-transparent',\n outline: 'text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground',\n },\n },\n defaultVariants: { variant: 'default' },\n }\n);\n\nfunction Badge({\n className,\n variant,\n asChild = false,\n ...props\n}: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & { asChild?: boolean }) {\n const Comp = asChild ? Slot : 'span';\n return (\n <Comp data-slot=\"badge\" className={cn(badgeVariants({ variant }), className)} {...props} />\n );\n}\n\nexport { Badge, badgeVariants };\n","import * as React from 'react';\n\nimport { cn } from '../tokens/cn';\n\nfunction Input({ className, type, ...props }: React.ComponentProps<'input'>) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n 'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground border-input bg-input/30 hover:bg-input/50 dark:bg-input/30 dark:hover:bg-input/50 h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base shadow-xs transition-[color,box-shadow,background-color] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',\n 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',\n className\n )}\n {...props}\n />\n );\n}\n\nexport { Input };\n","import type { VariantProps } from 'class-variance-authority';\n\nimport { cva } from 'class-variance-authority';\nimport * as React from 'react';\n\nimport { cn } from '../tokens/cn';\n\nconst alertVariants = cva(\n 'relative grid w-full grid-cols-[0_1fr] items-start gap-x-0 gap-y-0.5 rounded-md border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current',\n {\n variants: {\n variant: {\n default: 'bg-card text-card-foreground',\n destructive:\n 'text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90',\n success:\n 'text-success bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-success/90',\n warning:\n 'text-warning bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-warning/90',\n },\n },\n defaultVariants: { variant: 'default' },\n }\n);\n\nfunction Alert({\n className,\n variant,\n ...props\n}: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>) {\n return (\n <div\n data-slot=\"alert\"\n role=\"alert\"\n className={cn(alertVariants({ variant }), className)}\n {...props}\n />\n );\n}\n\nfunction AlertTitle({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"alert-title\"\n className={cn('col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight', className)}\n {...props}\n />\n );\n}\n\nfunction AlertDescription({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"alert-description\"\n className={cn(\n 'text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed',\n className\n )}\n {...props}\n />\n );\n}\n\nexport { Alert, AlertTitle, AlertDescription };\n","'use client';\n\nimport * as Dialog from '@radix-ui/react-dialog';\nimport { AlertTriangle } from 'lucide-react';\nimport { useCallback, useEffect, useRef, useState } from 'react';\n\nimport { Button } from './button';\n\n/**\n * Promise-based replacement for `window.confirm` in the house design language.\n * Call `confirm({...})` from anywhere; a single mounted `<ConfirmHost />` renders\n * it. Async (resolves to a boolean) and provider-less by design.\n */\n\nexport interface ConfirmOptions {\n title: string;\n message: string;\n confirmLabel?: string;\n cancelLabel?: string;\n destructive?: boolean;\n}\n\ninterface PendingConfirm extends ConfirmOptions {\n resolve: (ok: boolean) => void;\n}\n\n// Read NODE_ENV without depending on @types/node (this is a browser package).\nconst NODE_ENV = (globalThis as { process?: { env?: { NODE_ENV?: string } } }).process?.env\n ?.NODE_ENV;\n\nlet pending: PendingConfirm | null = null;\nlet notifyHost: (() => void) | null = null;\nlet hostMountCount = 0;\n\nexport function confirm(opts: ConfirmOptions): Promise<boolean> {\n return new Promise<boolean>((resolve) => {\n pending = { ...opts, resolve };\n if (notifyHost) {\n notifyHost();\n } else if (NODE_ENV !== 'production') {\n console.warn('[ConfirmDialog] confirm() called but no <ConfirmHost /> is mounted');\n }\n });\n}\n\n/** Singleton dialog host. Mount once at the app root. */\nexport function ConfirmHost() {\n const [state, setState] = useState<PendingConfirm | null>(null);\n const submittingRef = useRef(false);\n\n useEffect(() => {\n hostMountCount += 1;\n if (hostMountCount > 1 && NODE_ENV !== 'production') {\n console.warn(\n '[ConfirmDialog] multiple <ConfirmHost /> instances mounted — the last one wins'\n );\n }\n notifyHost = () => setState(pending);\n if (pending) setState(pending);\n return () => {\n hostMountCount -= 1;\n notifyHost = null;\n };\n }, []);\n\n const close = useCallback(\n (ok: boolean) => {\n if (submittingRef.current) return;\n submittingRef.current = true;\n state?.resolve(ok);\n pending = null;\n setState(null);\n requestAnimationFrame(() => {\n submittingRef.current = false;\n });\n },\n [state]\n );\n\n if (!state) return null;\n\n return (\n <Dialog.Root open onOpenChange={(open) => !open && close(false)}>\n <Dialog.Portal>\n <Dialog.Overlay className=\"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm\" />\n <Dialog.Content className=\"bg-card border-border fixed top-1/2 left-1/2 z-50 w-[90vw] max-w-md -translate-x-1/2 -translate-y-1/2 border shadow-lg outline-none\">\n <div className=\"terminal-title\">\n <span\n className={\n 'flex items-center gap-1.5 ' +\n (state.destructive ? 'text-destructive' : 'text-primary')\n }\n >\n <AlertTriangle className=\"size-3.5\" />\n {state.title}\n </span>\n </div>\n <div className=\"space-y-4 p-4 sm:p-5\">\n <Dialog.Title className=\"sr-only\">{state.title}</Dialog.Title>\n <Dialog.Description asChild>\n <div className=\"text-muted-foreground font-mono text-xs leading-relaxed whitespace-pre-wrap [overflow-wrap:anywhere]\">\n {state.message}\n </div>\n </Dialog.Description>\n <div className=\"flex flex-wrap items-center justify-end gap-2\">\n <Button\n variant=\"outline\"\n onClick={() => close(false)}\n className=\"font-mono text-[11px] tracking-widest uppercase\"\n >\n {state.cancelLabel ?? 'cancel'}\n </Button>\n <Button\n onClick={() => close(true)}\n className={\n 'font-display tracking-wide uppercase ' +\n (state.destructive\n ? 'bg-destructive text-destructive-foreground hover:bg-destructive/90'\n : '')\n }\n >\n {state.confirmLabel ?? 'confirm'}\n </Button>\n </div>\n </div>\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n );\n}\n","'use client';\n\nimport * as Dialog from '@radix-ui/react-dialog';\nimport { Pencil } from 'lucide-react';\nimport { useCallback, useEffect, useRef, useState } from 'react';\n\nimport { Button } from './button';\nimport { Input } from './input';\nimport { Label } from './label';\n\n/**\n * Promise-based replacement for `window.prompt`, in the house design language.\n * Call `prompt({...})`; mount one `<PromptHost />` at the app root (alongside\n * `<ConfirmHost />`). Supports a masked `secret` input, a matching\n * `confirmField` (\"choose a passphrase, twice\"), and a `validate` hook.\n */\n\nexport interface PromptOptions {\n title: string;\n message?: string;\n label?: string;\n placeholder?: string;\n defaultValue?: string;\n confirmLabel?: string;\n cancelLabel?: string;\n /** Mask the input. */\n secret?: boolean;\n /** Show a second input that must match the first. Implies validation. */\n confirmField?: boolean;\n /** Minimum accepted length. */\n minLength?: number;\n /** Return an error string to block submission, or null to allow it. */\n validate?: (value: string) => string | null;\n}\n\ninterface PendingPrompt extends PromptOptions {\n resolve: (value: string | null) => void;\n}\n\nconst NODE_ENV = (globalThis as { process?: { env?: { NODE_ENV?: string } } }).process?.env\n ?.NODE_ENV;\n\nlet pending: PendingPrompt | null = null;\nlet notifyHost: (() => void) | null = null;\nlet hostMountCount = 0;\n\n/** Open a prompt dialog. Resolves to the entered string, or null if cancelled. */\nexport function prompt(opts: PromptOptions): Promise<string | null> {\n return new Promise<string | null>((resolve) => {\n pending = { ...opts, resolve };\n if (notifyHost) {\n notifyHost();\n } else if (NODE_ENV !== 'production') {\n console.warn('[PromptDialog] prompt() called but no <PromptHost /> is mounted');\n }\n });\n}\n\nexport function PromptHost() {\n const [state, setState] = useState<PendingPrompt | null>(null);\n const [value, setValue] = useState('');\n const [confirmValue, setConfirmValue] = useState('');\n const [error, setError] = useState<string | null>(null);\n const submittingRef = useRef(false);\n\n useEffect(() => {\n hostMountCount += 1;\n if (hostMountCount > 1 && NODE_ENV !== 'production') {\n console.warn('[PromptDialog] multiple <PromptHost /> instances mounted');\n }\n notifyHost = () => {\n setValue(pending?.defaultValue ?? '');\n setConfirmValue('');\n setError(null);\n setState(pending);\n };\n if (pending) notifyHost();\n return () => {\n hostMountCount -= 1;\n notifyHost = null;\n };\n }, []);\n\n const close = useCallback(\n (result: string | null) => {\n if (submittingRef.current) return;\n submittingRef.current = true;\n state?.resolve(result);\n pending = null;\n setState(null);\n requestAnimationFrame(() => {\n submittingRef.current = false;\n });\n },\n [state]\n );\n\n const submit = useCallback(() => {\n if (!state) return;\n const v = value;\n if (state.minLength && v.length < state.minLength) {\n setError(`must be at least ${state.minLength} characters`);\n return;\n }\n if (state.confirmField && v !== confirmValue) {\n setError('the two entries do not match');\n return;\n }\n if (state.validate) {\n const msg = state.validate(v);\n if (msg) {\n setError(msg);\n return;\n }\n }\n close(v);\n }, [state, value, confirmValue, close]);\n\n if (!state) return null;\n\n return (\n <Dialog.Root open onOpenChange={(open) => !open && close(null)}>\n <Dialog.Portal>\n <Dialog.Overlay className=\"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm\" />\n <Dialog.Content\n className=\"bg-card border-border fixed top-1/2 left-1/2 z-50 w-[90vw] max-w-md -translate-x-1/2 -translate-y-1/2 border shadow-lg outline-none\"\n onKeyDown={(e) => {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault();\n submit();\n }\n }}\n >\n <div className=\"terminal-title\">\n <span className=\"text-primary flex items-center gap-1.5\">\n <Pencil className=\"size-3.5\" />\n {state.title}\n </span>\n </div>\n <div className=\"space-y-4 p-4 sm:p-5\">\n <Dialog.Title className=\"sr-only\">{state.title}</Dialog.Title>\n {state.message && (\n <Dialog.Description asChild>\n <div className=\"text-muted-foreground font-mono text-xs leading-relaxed whitespace-pre-wrap\">\n {state.message}\n </div>\n </Dialog.Description>\n )}\n <div>\n {state.label && <Label>{state.label}</Label>}\n <Input\n autoFocus\n type={state.secret ? 'password' : 'text'}\n value={value}\n onChange={(e) => {\n setValue(e.target.value);\n setError(null);\n }}\n placeholder={state.placeholder}\n autoComplete=\"off\"\n spellCheck={false}\n className={\n (state.label ? 'mt-2 ' : '') + (state.secret ? 'font-mono' : '')\n }\n />\n </div>\n {state.confirmField && (\n <div>\n <Label>confirm</Label>\n <Input\n type={state.secret ? 'password' : 'text'}\n value={confirmValue}\n onChange={(e) => {\n setConfirmValue(e.target.value);\n setError(null);\n }}\n placeholder=\"re-enter to confirm\"\n autoComplete=\"off\"\n spellCheck={false}\n className={'mt-2 ' + (state.secret ? 'font-mono' : '')}\n />\n </div>\n )}\n {error && <p className=\"text-destructive font-mono text-xs\">{error}</p>}\n <div className=\"flex flex-wrap items-center justify-end gap-2\">\n <Button\n variant=\"outline\"\n onClick={() => close(null)}\n className=\"font-mono text-[11px] tracking-widest uppercase\"\n >\n {state.cancelLabel ?? 'cancel'}\n </Button>\n <Button onClick={submit} className=\"font-display tracking-wide uppercase\">\n {state.confirmLabel ?? 'ok'}\n </Button>\n </div>\n </div>\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n );\n}\n","'use client';\n\nimport * as Popover from '@radix-ui/react-popover';\nimport * as React from 'react';\n\nimport { cn } from '../tokens/cn';\n\n/**\n * `<Tooltip>` — the family's hover/focus tooltip primitive.\n *\n * Built on `@radix-ui/react-popover` (already a dependency — we do NOT add\n * `@radix-ui/react-tooltip`) but driven by a *controlled* open boolean so we\n * own the timing and gating Radix's popover doesn't give a tooltip:\n *\n * - hover-intent: opens after `openDelay`ms of sustained pointer hover,\n * closes after a short `closeDelay` grace (WCAG 1.4.13 hoverable).\n * - keyboard parity: also opens on keyboard focus (detected via input-\n * modality, since `:focus-visible` isn't applied yet inside the focus\n * event), closes on blur/Escape, never steals or traps focus.\n * - pointer-fine only: the hover path is gated behind\n * `(hover: hover) and (pointer: fine)` so it never fires on touch — by\n * pointer *type*, not a width breakpoint (a coarse tablet ≥ sm is touch).\n * - `disabled`: a hard force-close, used by `OcLogoDropdown` so the tip and\n * the family menu (which share a trigger) can never paint at once.\n *\n * The content is decorative reinforcement: it's `aria-hidden`, and\n * `pointer-events-none` so a mis-detected pointer can never intercept the\n * click path to the trigger. The authoritative accessible name belongs on the\n * trigger's own `aria-label`.\n */\n\nconst TOOLTIP_SURFACE_CLASS =\n 'bg-popover text-popover-foreground border-border rounded-md border p-2.5 shadow-md';\n\n// Same idiom as the popover/dialog primitives, a touch faster (tooltips are\n// lighter than dialogs) with a smaller 4px travel. Reduced-motion is handled\n// globally by the family `prefers-reduced-motion` reset — nothing to add here.\nconst TOOLTIP_MOTION_CLASS =\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-1 data-[side=top]:slide-in-from-bottom-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 origin-(--radix-popover-content-transform-origin) duration-150 ease-out';\n\nexport interface TooltipProps {\n /** The tooltip body. */\n content: React.ReactNode;\n /** A single trigger element (a `<button>` etc.); receives the hover/focus wiring. */\n children: React.ReactElement;\n side?: 'top' | 'right' | 'bottom' | 'left';\n align?: 'start' | 'center' | 'end';\n sideOffset?: number;\n collisionPadding?: number;\n /** ms of sustained hover before opening. Default 300 (deliberate, not twitchy). */\n openDelay?: number;\n /** ms grace before closing on pointer-leave. Default 90. */\n closeDelay?: number;\n /** Force the tooltip closed regardless of hover/focus (e.g. while a shared menu is open). */\n disabled?: boolean;\n /** Portal to `<body>` (default true). Set false to keep content inline so it inherits a scoped `data-oc-theme`. */\n portal?: boolean;\n /** z-index utility for the content. Default `z-50`. */\n zIndexClassName?: string;\n contentClassName?: string;\n}\n\ninterface TriggerHandlerProps {\n onPointerEnter?: React.PointerEventHandler;\n onPointerLeave?: React.PointerEventHandler;\n onPointerDown?: React.PointerEventHandler;\n onFocus?: React.FocusEventHandler;\n onBlur?: React.FocusEventHandler;\n onKeyDown?: React.KeyboardEventHandler;\n}\n\nfunction compose<E>(theirs: ((e: E) => void) | undefined, ours: (e: E) => void) {\n return (e: E) => {\n theirs?.(e);\n ours(e);\n };\n}\n\n/**\n * Input-modality tracker (the `:focus-visible` polyfill heuristic).\n * `:focus-visible` is NOT reliably applied synchronously inside the `focus`\n * event, so reading `el.matches(':focus-visible')` there misses keyboard focus.\n * Instead we record the last input type from global capture-phase listeners\n * that fire BEFORE focus: a keydown means the focus that follows is keyboard-\n * driven (show the hint); a pointerdown means it's a click (don't — that would\n * flash the tip over the menu).\n */\nlet lastInputWasKeyboard = false;\nlet modalityInstalled = false;\nfunction installModalityTracking() {\n if (modalityInstalled || typeof window === 'undefined') return;\n modalityInstalled = true;\n window.addEventListener('keydown', () => (lastInputWasKeyboard = true), true);\n window.addEventListener('pointerdown', () => (lastInputWasKeyboard = false), true);\n}\n\nexport function Tooltip({\n content,\n children,\n side = 'bottom',\n align = 'start',\n sideOffset = 8,\n collisionPadding = 12,\n openDelay = 300,\n closeDelay = 90,\n disabled = false,\n portal = true,\n zIndexClassName = 'z-50',\n contentClassName,\n}: TooltipProps) {\n const [hovering, setHovering] = React.useState(false);\n const [focusing, setFocusing] = React.useState(false);\n const [isFinePointer, setIsFinePointer] = React.useState(false);\n const openTimer = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n const closeTimer = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n\n // Detect a true mouse (fine pointer + real hover). Defaults false for SSR\n // and first client render, then resolves in the effect — a normal post-mount\n // update, not a hydration mismatch.\n React.useEffect(() => {\n installModalityTracking();\n const mq = window.matchMedia('(hover: hover) and (pointer: fine)');\n const apply = () => setIsFinePointer(mq.matches);\n apply();\n mq.addEventListener('change', apply);\n return () => mq.removeEventListener('change', apply);\n }, []);\n\n const clearTimers = React.useCallback(() => {\n if (openTimer.current) clearTimeout(openTimer.current);\n if (closeTimer.current) clearTimeout(closeTimer.current);\n }, []);\n\n React.useEffect(() => clearTimers, [clearTimers]);\n\n // When force-closed (e.g. the shared menu opened), drop the hover latch so\n // the tip doesn't snap back with no delay the instant the menu closes while\n // the pointer is still over the trigger. `focusing` is left alone — a\n // keyboard user who stays focused should still get the immediate hint.\n React.useEffect(() => {\n if (disabled) {\n clearTimers();\n setHovering(false);\n }\n }, [disabled, clearTimers]);\n\n const handlePointerEnter = () => {\n if (!isFinePointer) return;\n if (closeTimer.current) clearTimeout(closeTimer.current);\n openTimer.current = setTimeout(() => setHovering(true), openDelay);\n };\n const handlePointerLeave = () => {\n if (openTimer.current) clearTimeout(openTimer.current);\n closeTimer.current = setTimeout(() => setHovering(false), closeDelay);\n };\n // The first press of EITHER a single- or double-click tears the tip down\n // before the trigger's own onClick toggles a menu, so it never overlaps.\n const handlePointerDown = () => {\n clearTimers();\n setHovering(false);\n setFocusing(false);\n };\n const handleFocus = () => {\n // Only keyboard focus reveals the hint — a mouse click also focuses the\n // trigger, and re-popping the tip over an opening menu would be the bug.\n // Use the modality flag (set before focus fires) rather than\n // `:focus-visible`, which isn't applied yet inside the focus event.\n if (lastInputWasKeyboard) {\n clearTimers();\n setFocusing(true);\n }\n };\n const handleBlur = () => {\n clearTimers();\n setFocusing(false);\n };\n // Escape dismisses the focus-revealed tip without moving focus (WCAG 1.4.13).\n // Handled on the focused trigger directly — robust regardless of Radix's\n // dismissal internals (we suppress its focus-outside dismissal below).\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if (e.key === 'Escape') {\n clearTimers();\n setHovering(false);\n setFocusing(false);\n }\n };\n\n const effectiveOpen = !disabled && ((isFinePointer && hovering) || focusing);\n\n const extra: TriggerHandlerProps = {};\n const childProps = children.props as TriggerHandlerProps;\n extra.onPointerEnter = compose(childProps.onPointerEnter, handlePointerEnter);\n extra.onPointerLeave = compose(childProps.onPointerLeave, handlePointerLeave);\n extra.onPointerDown = compose(childProps.onPointerDown, handlePointerDown);\n extra.onFocus = compose(childProps.onFocus, handleFocus);\n extra.onBlur = compose(childProps.onBlur, handleBlur);\n extra.onKeyDown = compose(childProps.onKeyDown, handleKeyDown);\n const trigger = React.cloneElement(children, extra);\n\n const contentEl = (\n <Popover.Content\n side={side}\n align={align}\n sideOffset={sideOffset}\n collisionPadding={collisionPadding}\n aria-hidden\n onOpenAutoFocus={(e) => e.preventDefault()}\n onCloseAutoFocus={(e) => e.preventDefault()}\n // The tip is aria-hidden + non-focusable, so focus legitimately\n // stays on the trigger (outside the content). Don't let Radix's\n // focus-outside dismissal close a focus-revealed tip; Escape and\n // pointer-down-outside still dismiss.\n onFocusOutside={(e) => e.preventDefault()}\n className={cn(\n TOOLTIP_SURFACE_CLASS,\n TOOLTIP_MOTION_CLASS,\n 'pointer-events-none',\n zIndexClassName,\n contentClassName\n )}\n >\n {content}\n </Popover.Content>\n );\n\n return (\n <Popover.Root\n open={effectiveOpen}\n onOpenChange={(o) => {\n // Radix requests close on Escape / outside interaction — sync our\n // own state so a re-hover re-arms cleanly. We never open via Radix.\n if (!o) {\n clearTimers();\n setHovering(false);\n setFocusing(false);\n }\n }}\n modal={false}\n >\n <Popover.Anchor asChild>{trigger}</Popover.Anchor>\n {portal ? <Popover.Portal>{contentEl}</Popover.Portal> : contentEl}\n </Popover.Root>\n );\n}\n","'use client';\n\nimport * as AccordionPrimitive from '@radix-ui/react-accordion';\nimport { ChevronDown, Plus } from 'lucide-react';\nimport * as React from 'react';\n\nimport { cn } from '../tokens/cn';\n\nconst Accordion = AccordionPrimitive.Root;\n\nconst AccordionItem = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <AccordionPrimitive.Item ref={ref} className={cn('border-b', className)} {...props} />\n));\nAccordionItem.displayName = 'AccordionItem';\n\nconst AccordionTrigger = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger> & {\n /** Toggle glyph: a rotating chevron (default) or a marketing plus that\n * turns into an ✕ on open, tinted with the brand. */\n icon?: 'chevron' | 'plusMinus';\n }\n>(({ className, children, icon = 'chevron', ...props }, ref) => (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n ref={ref}\n className={cn(\n 'flex flex-1 items-center justify-between gap-4 py-4 text-left font-medium transition-all hover:underline',\n icon === 'chevron'\n ? '[&[data-state=open]>svg]:rotate-180'\n : '[&[data-state=open]>svg]:rotate-45',\n className\n )}\n {...props}\n >\n {children}\n {icon === 'chevron' ? (\n <ChevronDown className=\"h-4 w-4 shrink-0 transition-transform duration-200\" />\n ) : (\n <Plus className=\"text-primary h-5 w-5 shrink-0 transition-transform duration-200\" />\n )}\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n));\nAccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;\n\nconst AccordionContent = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <AccordionPrimitive.Content\n ref={ref}\n className=\"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm transition-all\"\n {...props}\n >\n <div className={cn('pt-0 pb-4', className)}>{children}</div>\n </AccordionPrimitive.Content>\n));\nAccordionContent.displayName = AccordionPrimitive.Content.displayName;\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent };\n","import type { VariantProps } from 'class-variance-authority';\n\nimport { cva } from 'class-variance-authority';\nimport * as React from 'react';\n\nimport { cn } from '../tokens/cn';\n\nconst surfaceVariants = cva('rounded-xl transition-colors', {\n variants: {\n tone: {\n /* Crisp panel floating on the page — the default soft card. */\n default: 'bg-card text-card-foreground',\n /* Warm-gray recessed panel. */\n muted: 'bg-muted text-foreground',\n /* Solid brand fill — small terracotta panel; inverts child text. */\n brand: 'bg-brand text-brand-foreground',\n /* High-contrast neutral panel (near-black in light, near-white in dark). */\n contrast: 'bg-foreground text-background',\n /* Translucent lightened tile for cards sitting ON a brand band. */\n onBrand:\n 'text-brand-foreground [background:color-mix(in_oklch,white_16%,var(--brand))] [border-color:color-mix(in_oklch,white_24%,transparent)]',\n /* Frame only, transparent fill. */\n outline: 'bg-transparent text-foreground',\n },\n elevation: {\n none: 'shadow-none',\n sm: 'shadow-sm',\n md: 'shadow-md',\n lg: 'shadow-lg',\n xl: 'shadow-xl',\n },\n bordered: {\n true: 'border',\n false: '',\n },\n pad: {\n none: 'p-0',\n sm: 'p-4',\n md: 'p-5 sm:p-6',\n lg: 'p-6 sm:p-8',\n },\n },\n defaultVariants: {\n tone: 'default',\n elevation: 'sm',\n bordered: true,\n pad: 'md',\n },\n});\n\nexport interface SurfaceProps\n extends Omit<React.ComponentProps<'div'>, 'color'>,\n VariantProps<typeof surfaceVariants> {}\n\n/**\n * Surface — the soft, large-radius, elevated panel that the warm theme sits on.\n *\n * The package `Card` is a TERMINAL-window frame (mono title strip, terminal\n * dots) for dashboards; Surface is its plain marketing/consumer counterpart —\n * a bg-card panel with token-routed radius + soft elevation and no chrome.\n * Re-skins per skin via the radius + shadow tokens. Use this for feature cards,\n * sign-in cards, trust chips — anything that is NOT a terminal panel.\n */\nexport function Surface({\n className,\n tone,\n elevation,\n bordered,\n pad,\n ...props\n}: SurfaceProps) {\n return (\n <div\n data-slot=\"surface\"\n className={cn(surfaceVariants({ tone, elevation, bordered, pad }), className)}\n {...props}\n />\n );\n}\n\nexport { surfaceVariants };\n","import type { VariantProps } from 'class-variance-authority';\n\nimport { cva } from 'class-variance-authority';\nimport * as React from 'react';\n\nimport { cn } from '../tokens/cn';\n\nconst iconBadgeVariants = cva(\n 'inline-flex shrink-0 items-center justify-center rounded-md font-semibold [&_svg]:pointer-events-none',\n {\n variants: {\n tone: {\n /* The signature peach tile — soft accent fill, terracotta glyph.\n Auto-swaps to warm-dark + light-peach in dark mode via tokens. */\n peach: 'bg-accent text-accent-foreground',\n /* Inverted near-black tile, light glyph (\"never do\" promises). */\n dark: 'bg-foreground text-background',\n /* Solid brand tile. */\n brand: 'bg-primary text-primary-foreground',\n /* White tile on a brand band, terracotta glyph (numbered steps). */\n onBrand: 'bg-brand-foreground text-primary',\n /* Quiet neutral tile. */\n muted: 'bg-muted text-foreground',\n /* Crisp white (card-colored) tile with a terracotta glyph and a\n soft lift — the elevated icon chip on muted/colored cards. */\n surface: 'bg-card text-primary shadow-sm',\n },\n size: {\n sm: 'size-9 text-xs [&_svg]:size-4',\n md: 'size-11 text-sm [&_svg]:size-5',\n lg: 'size-12 text-base [&_svg]:size-6',\n xl: 'size-14 text-lg [&_svg]:size-7',\n },\n },\n defaultVariants: { tone: 'peach', size: 'md' },\n }\n);\n\nexport interface IconBadgeProps\n extends Omit<React.ComponentProps<'span'>, 'color'>,\n VariantProps<typeof iconBadgeVariants> {}\n\n/**\n * IconBadge — a rounded-square tile holding a lucide icon OR a number/short\n * label. The theme's most-reused decorative atom (feature-card icons, numbered\n * steps, the verified chip). Distinct from the text `Badge` pill: this is a\n * fixed-size square tile. Tones map to skin tokens so the same markup recolours\n * across skins and light/dark (peach ↔ warm-dark).\n *\n * <IconBadge tone=\"peach\"><Lock /></IconBadge>\n * <IconBadge tone=\"onBrand\" size=\"sm\">1</IconBadge>\n */\nexport function IconBadge({ className, tone, size, children, ...props }: IconBadgeProps) {\n return (\n <span\n data-slot=\"icon-badge\"\n className={cn(iconBadgeVariants({ tone, size }), className)}\n {...props}\n >\n {children}\n </span>\n );\n}\n\nexport { iconBadgeVariants };\n","import type { ReactNode } from 'react';\n\nimport { IconBadge, Surface } from '../primitives';\nimport { cn } from '../tokens/cn';\n\nexport interface FeatureCardProps {\n /** Optional leading glyph — a lucide icon sized by IconBadge. */\n icon?: ReactNode;\n iconTone?: 'peach' | 'dark' | 'brand' | 'onBrand' | 'muted' | 'surface';\n title: ReactNode;\n children?: ReactNode;\n orientation?: 'vertical' | 'horizontal';\n align?: 'start' | 'center';\n tone?: 'default' | 'muted' | 'onBrand';\n elevation?: 'none' | 'sm' | 'md' | 'lg';\n className?: string;\n}\n\n/**\n * FeatureCard — the soft Surface tile that carries a feature: an IconBadge, a\n * title, and a line of body copy. The marketing-grid workhorse. Stack them\n * vertically in a feature grid, or go horizontal for a tighter list row.\n */\nexport function FeatureCard({\n icon,\n iconTone = 'peach',\n title,\n children,\n orientation = 'vertical',\n align = 'start',\n tone = 'default',\n elevation = 'sm',\n className,\n}: FeatureCardProps) {\n const horizontal = orientation === 'horizontal';\n const centered = !horizontal && align === 'center';\n\n return (\n <Surface\n tone={tone}\n elevation={elevation}\n pad={horizontal ? 'md' : 'lg'}\n className={cn(\n 'flex h-full',\n horizontal ? 'flex-row gap-4' : 'flex-col',\n centered && 'items-center text-center',\n className\n )}\n >\n {icon && (\n <IconBadge\n tone={iconTone}\n size=\"lg\"\n className={cn(horizontal ? 'shrink-0' : 'mb-4')}\n >\n {icon}\n </IconBadge>\n )}\n <div className={cn(horizontal && 'min-w-0')}>\n <h3 className=\"text-lg font-semibold\">{title}</h3>\n {children && (\n <p className=\"text-muted-foreground mt-1.5 text-sm leading-relaxed\">\n {children}\n </p>\n )}\n </div>\n </Surface>\n );\n}\n","import type { ReactNode } from 'react';\n\nimport { cn } from '../tokens/cn';\n\nexport interface SectionProps {\n /** Background band: neutral page, recessed gray, brand fill, or a forced-dark band on a light page. */\n tone?: 'default' | 'muted' | 'brand' | 'dark';\n /** Inner width: centered container, wide max-w-screen-2xl, or full-bleed. */\n width?: 'default' | 'wide' | 'full';\n /** Diagonal texture overlay; defaults on only for tone='brand'. */\n diagonal?: boolean;\n id?: string;\n className?: string;\n innerClassName?: string;\n children: ReactNode;\n}\n\nconst TONE: Record<NonNullable<SectionProps['tone']>, string> = {\n default: 'bg-background text-foreground',\n muted: 'bg-muted text-foreground',\n brand: 'bg-brand text-brand-foreground',\n // `dark` activates the .dark variant locally so descendant package\n // components render their dark arm even on an otherwise light page.\n dark: 'dark bg-background text-foreground',\n};\n\nconst WIDTH: Record<NonNullable<SectionProps['width']>, string> = {\n default: 'container',\n wide: 'mx-auto w-full max-w-screen-2xl px-4 sm:px-6 lg:px-8',\n full: '',\n};\n\n/**\n * Section — the full-bleed marketing band: a tone-routed background stripe with\n * vertical rhythm and a width-capped inner. Stack these to build a landing page;\n * use tone='dark' to force a dark band on a light page. BrandBand is the\n * brand-tone shorthand.\n */\nexport function Section({\n tone = 'default',\n width = 'default',\n diagonal,\n id,\n className,\n innerClassName,\n children,\n}: SectionProps) {\n const showDiagonal = diagonal ?? tone === 'brand';\n return (\n <div\n id={id}\n className={cn('w-full', TONE[tone], showDiagonal && 'oc-diagonal', className)}\n >\n <div className={cn('py-16 sm:py-20 md:py-24', WIDTH[width], innerClassName)}>\n {children}\n </div>\n </div>\n );\n}\n\n/** BrandBand — Section pinned to the brand tone. */\nexport function BrandBand(props: SectionProps) {\n return <Section tone=\"brand\" {...props} />;\n}\n","import type { ReactNode } from 'react';\n\nimport { Check, X } from 'lucide-react';\n\nimport { cn } from '../tokens/cn';\n\nexport interface ComparisonRow {\n label: ReactNode;\n theirs: ReactNode;\n ours: ReactNode;\n}\n\nexport interface ComparisonTableProps {\n rows: ComparisonRow[];\n columns?: { feature?: string; theirs: string; ours: string };\n className?: string;\n}\n\n/**\n * ComparisonTable — a two-column \"them vs us\" feature matrix for marketing pages.\n * the ours column is tinted (bg-accent/40) and its checks read text-primary; the\n * theirs column reads muted with X glyphs. skin-agnostic, scrolls on small screens.\n */\nexport function ComparisonTable({ rows, columns, className }: ComparisonTableProps) {\n const cols = { feature: '', theirs: 'A normal login', ours: 'OrangeCheck', ...columns };\n return (\n <div className={cn('overflow-hidden rounded-xl border', className)}>\n <div className=\"overflow-x-auto\">\n <div className=\"min-w-[32rem]\">\n <div className=\"grid grid-cols-[1.4fr_1fr_1fr]\">\n <div className=\"label-mono text-muted-foreground px-4 py-3.5 sm:px-6\">\n {cols.feature}\n </div>\n <div className=\"px-4 py-3.5 font-semibold text-foreground sm:px-6\">\n {cols.theirs}\n </div>\n <div className=\"bg-accent/60 border-border/60 border-l px-4 py-3.5 font-semibold text-primary sm:px-6\">\n {cols.ours}\n </div>\n </div>\n {rows.map((row, i) => (\n <div key={i} className=\"grid grid-cols-[1.4fr_1fr_1fr] border-t\">\n <div className=\"px-4 py-3.5 font-medium text-foreground sm:px-6\">\n {row.label}\n </div>\n <div className=\"text-muted-foreground flex items-center gap-2 px-4 py-3.5 sm:px-6\">\n <X className=\"text-muted-foreground/70 size-4\" />\n <span>{row.theirs}</span>\n </div>\n <div className=\"bg-accent/40 border-border/60 flex items-center gap-2 border-l px-4 py-3.5 text-foreground sm:px-6\">\n <Check className=\"size-4 text-primary\" />\n <span>{row.ours}</span>\n </div>\n </div>\n ))}\n </div>\n </div>\n </div>\n );\n}\n","import type { ReactNode } from 'react';\n\nimport { IconBadge, Surface } from '../primitives';\nimport { cn } from '../tokens/cn';\n\n/**\n * NumberedStep / StepList — the marketing \"how it works\" sequence: a peach\n * numbered tile, a title, and a short body, laid out in a responsive grid.\n * Use for 2–4 step walkthroughs on a landing page; pass tone='onBrand' when\n * the list sits on a terracotta band.\n */\n\nexport interface Step {\n title: ReactNode;\n children?: ReactNode;\n}\n\nexport interface NumberedStepProps {\n n: number;\n title: ReactNode;\n children?: ReactNode;\n tone?: 'default' | 'onBrand';\n card?: boolean;\n className?: string;\n}\n\nexport function NumberedStep({\n n,\n title,\n children,\n tone = 'default',\n card = false,\n className,\n}: NumberedStepProps) {\n const onBrand = tone === 'onBrand';\n const body = (\n <div className={cn(!card && className)}>\n <IconBadge tone={onBrand ? 'onBrand' : 'peach'} size=\"sm\">\n {n}\n </IconBadge>\n <div className=\"mt-4 text-lg font-semibold\">{title}</div>\n {children && (\n <div\n className={cn(\n 'mt-1.5 text-sm leading-relaxed',\n onBrand ? 'text-brand-foreground/80' : 'text-muted-foreground'\n )}\n >\n {children}\n </div>\n )}\n </div>\n );\n\n if (!card) return body;\n\n return (\n <Surface\n tone={onBrand ? 'onBrand' : 'default'}\n elevation={onBrand ? 'none' : 'sm'}\n pad=\"md\"\n className={className}\n >\n {body}\n </Surface>\n );\n}\n\nexport interface StepListProps {\n steps: Step[];\n variant?: 'bare' | 'card';\n tone?: 'default' | 'onBrand';\n columns?: 2 | 3 | 4;\n className?: string;\n}\n\nconst COLUMNS: Record<2 | 3 | 4, string> = {\n 2: 'md:grid-cols-2',\n 3: 'md:grid-cols-3',\n 4: 'md:grid-cols-4',\n};\n\nexport function StepList({\n steps,\n variant = 'bare',\n tone = 'default',\n columns = 3,\n className,\n}: StepListProps) {\n return (\n <div className={cn('grid gap-6 sm:grid-cols-2 sm:gap-8', COLUMNS[columns], className)}>\n {steps.map((step, index) => (\n <NumberedStep\n key={index}\n n={index + 1}\n title={step.title}\n tone={tone}\n card={variant === 'card'}\n >\n {step.children}\n </NumberedStep>\n ))}\n </div>\n );\n}\n","'use client';\n\nimport type { ReactNode } from 'react';\n\nimport { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '../primitives';\nimport { cn } from '../tokens/cn';\n\nexport interface FaqItem {\n q: ReactNode;\n a: ReactNode;\n}\n\nexport interface FaqProps {\n items: FaqItem[];\n /** Index of the item open on first render; omit for all collapsed. */\n defaultOpen?: number;\n className?: string;\n}\n\n/**\n * Faq — a plus/minus accordion list of question/answer pairs for the bottom of\n * a marketing page. single-open, collapsible. re-skins via the underlying\n * Accordion primitive.\n */\nexport function Faq({ items, defaultOpen, className }: FaqProps) {\n return (\n <Accordion\n type=\"single\"\n collapsible\n defaultValue={defaultOpen != null ? String(defaultOpen) : undefined}\n className={cn('w-full', className)}\n >\n {items.map((item, i) => (\n <AccordionItem key={i} value={String(i)}>\n <AccordionTrigger\n icon=\"plusMinus\"\n className=\"text-foreground text-base font-semibold\"\n >\n {item.q}\n </AccordionTrigger>\n <AccordionContent className=\"text-muted-foreground leading-relaxed\">\n {item.a}\n </AccordionContent>\n </AccordionItem>\n ))}\n </Accordion>\n );\n}\n","'use client';\n\nimport type { ReactNode } from 'react';\n\nimport { cn } from '../tokens/cn';\nimport { Button, Input } from '../primitives';\n\nexport interface EmailCaptureProps {\n /** Native form action (e.g. a serverless handler or list endpoint). */\n action?: string;\n /** Native form method. */\n method?: string;\n /** Client-side submit handler — preventDefault yourself if intercepting. */\n onSubmit?: (e: React.FormEvent<HTMLFormElement>) => void;\n /** Input name attribute. */\n name?: string;\n placeholder?: string;\n /** Submit button label. */\n cta?: ReactNode;\n /** Small reassurance line under the row (e.g. \"no spam, unsubscribe anytime\"). */\n note?: ReactNode;\n /** `onBrand` for placement on a terracotta/dark band. */\n tone?: 'default' | 'onBrand';\n className?: string;\n}\n\n/**\n * EmailCapture — the inline waitlist / newsletter row: a pill email field plus a\n * pill submit, with an optional fine-print note. drop it in a hero or footer\n * band; `tone='onBrand'` flips the field translucent + button white for dark\n * brand bands.\n */\nexport function EmailCapture({\n action,\n method,\n onSubmit,\n name = 'email',\n placeholder = 'you@email.com',\n cta = 'Join the waitlist',\n note,\n tone = 'default',\n className,\n}: EmailCaptureProps) {\n const onBrand = tone === 'onBrand';\n return (\n <form action={action} method={method} onSubmit={onSubmit} className={cn(className)}>\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-center\">\n <Input\n type=\"email\"\n name={name}\n required\n placeholder={placeholder}\n className={cn(\n 'rounded-full text-base md:text-sm',\n onBrand &&\n '[background:color-mix(in_oklch,white_18%,transparent)] placeholder:text-primary-foreground/60 border-transparent text-primary-foreground'\n )}\n />\n <Button type=\"submit\" variant={onBrand ? 'onBrand' : 'default'} className=\"rounded-full\">\n {cta}\n </Button>\n </div>\n {note && (\n <p\n className={cn(\n 'mt-3 text-sm',\n onBrand ? 'text-primary-foreground/70' : 'text-muted-foreground'\n )}\n >\n {note}\n </p>\n )}\n </form>\n );\n}\n","import type { ReactNode } from 'react';\n\nimport { Check } from 'lucide-react';\n\nimport { cn } from '../tokens/cn';\n\nexport interface CheckListProps {\n /** Each item: a check glyph + this label. */\n items: ReactNode[];\n orientation?: 'horizontal' | 'vertical';\n tone?: 'default' | 'onBrand';\n className?: string;\n}\n\n/**\n * CheckList — a compact run of checkmarked points. use horizontal under a hero\n * or CTA for an inline \"what you get\" row; vertical for a small feature stack.\n * `tone=\"onBrand\"` when it sits on a brand/dark band.\n */\nexport function CheckList({\n items,\n orientation = 'horizontal',\n tone = 'default',\n className,\n}: CheckListProps) {\n const glyph = tone === 'onBrand' ? 'text-brand-foreground' : 'text-primary';\n const label = tone === 'onBrand' ? 'text-brand-foreground/90' : 'text-foreground';\n\n return (\n <ul\n className={cn(\n orientation === 'horizontal'\n ? 'flex flex-wrap gap-x-6 gap-y-2 text-sm'\n : 'flex flex-col gap-2 text-sm',\n className\n )}\n >\n {items.map((item, i) => (\n <li key={i} className={cn('inline-flex items-center gap-2', label)}>\n <Check className={cn('size-4 shrink-0', glyph)} />\n {item}\n </li>\n ))}\n </ul>\n );\n}\n","import type { ReactNode } from 'react';\n\nimport { cn } from '../tokens/cn';\n\n/**\n * AccentNote — a left-bar aside for a single emphasized line of copy. Use for a\n * caveat, footnote, or pull-quote beside body text. AccentList is the stepped\n * variant: a vertical stack of titled items with one \"active\" entry expanded.\n * Both are skin-agnostic — token colors only — and re-skin per skin + mode.\n */\n\nexport interface AccentNoteProps {\n /** Optional bold lead phrase rendered inline before the body. */\n lead?: ReactNode;\n children: ReactNode;\n tone?: 'default' | 'onBrand';\n className?: string;\n}\n\nexport function AccentNote({ lead, children, tone = 'default', className }: AccentNoteProps) {\n const onBrand = tone === 'onBrand';\n return (\n <div\n className={cn(\n 'border-l-2 pl-4 text-sm leading-relaxed',\n onBrand\n ? 'border-primary-foreground/60 text-primary-foreground/80'\n : 'border-primary text-muted-foreground',\n className,\n )}\n >\n {lead && (\n <strong\n className={cn(\n 'mr-1.5 font-semibold',\n onBrand ? 'text-primary-foreground' : 'text-foreground',\n )}\n >\n {lead}\n </strong>\n )}\n {children}\n </div>\n );\n}\n\nexport interface AccentListItem {\n title: ReactNode;\n children?: ReactNode;\n active?: boolean;\n}\n\nexport interface AccentListProps {\n items: AccentListItem[];\n className?: string;\n}\n\nexport function AccentList({ items, className }: AccentListProps) {\n return (\n <div className={cn('flex flex-col', className)}>\n {items.map((item, i) => (\n <div\n key={i}\n className={cn('border-l-2 py-2 pl-5', item.active ? 'border-primary' : 'border-border')}\n >\n <div\n className={cn(\n 'font-semibold',\n item.active ? 'text-foreground' : 'text-muted-foreground',\n )}\n >\n {item.title}\n </div>\n {item.active && item.children && (\n <div className=\"text-muted-foreground mt-1 text-sm leading-relaxed\">\n {item.children}\n </div>\n )}\n </div>\n ))}\n </div>\n );\n}\n","import type { ReactNode } from 'react';\n\nimport { Check } from 'lucide-react';\n\nimport { IconBadge, Surface } from '../primitives';\nimport { cn } from '../tokens/cn';\n\nexport interface VerifiedChipProps {\n /** Leading glyph; defaults to a lucide Check. */\n icon?: ReactNode;\n /** Tone of the icon tile. */\n iconTone?: 'peach' | 'dark' | 'brand' | 'onBrand' | 'muted';\n /** Short trust phrase, e.g. \"verified on bitcoin\". */\n label: ReactNode;\n className?: string;\n}\n\n/**\n * VerifiedChip — a small floating trust chip (icon tile + short label) on a soft\n * elevated pill. drop it over a hero or card edge to mark something as verified.\n */\nexport function VerifiedChip({ icon, iconTone = 'peach', label, className }: VerifiedChipProps) {\n return (\n <Surface\n elevation=\"lg\"\n pad=\"none\"\n className={cn('inline-flex items-center gap-3 rounded-full px-3 py-2', className)}\n >\n <IconBadge tone={iconTone} size=\"sm\">\n {icon ?? <Check />}\n </IconBadge>\n <span className=\"pr-2 text-sm font-semibold text-foreground\">{label}</span>\n </Surface>\n );\n}\n","import { Boxes, Check, ChevronDown } from 'lucide-react';\nimport Link from 'next/link';\nimport { useEffect, useRef, useState } from 'react';\n\n/**\n * EcosystemSwitcher — cross-product dropdown for jumping between every\n * site in the OrangeCheck family. Drop one into every site's LayoutHeader\n * and mark the active site via the `current` prop.\n *\n * <EcosystemSwitcher current=\"lock\" />\n *\n * The component is dependency-self-contained: no Radix, no Headless UI,\n * just outside-click + Escape handling so it works identically in every\n * site without forcing a peer-dep upgrade. Every link stays in-tab — the\n * family is one app from the user's POV.\n */\n\nexport type EcosystemSlug =\n | 'home'\n | 'docs'\n | 'fleet'\n | 'me'\n | 'vault'\n | 'chat'\n | 'cosign'\n | 'btc'\n | 'globe'\n | 'attest'\n | 'lock'\n | 'vote'\n | 'stamp'\n | 'agent'\n | 'pledge'\n | 'analytics'\n | 'bot'\n | 'forge';\n\ninterface SwitcherEntry {\n slug: EcosystemSlug;\n href: string;\n label: string;\n sub: string;\n docsHref: string;\n}\n\nconst ENTRIES: SwitcherEntry[] = [\n {\n slug: 'home',\n href: 'https://ochk.io',\n label: 'orangecheck',\n sub: 'umbrella',\n docsHref: 'https://docs.ochk.io',\n },\n {\n slug: 'docs',\n href: 'https://docs.ochk.io',\n label: 'oc·docs',\n sub: 'unified docs',\n docsHref: 'https://docs.ochk.io',\n },\n {\n slug: 'me',\n href: 'https://me.ochk.io',\n label: 'oc·me',\n sub: 'earn — consumer identity',\n docsHref: 'https://docs.ochk.io/me',\n },\n {\n slug: 'vault',\n href: 'https://vault.ochk.io',\n label: 'oc·vault',\n sub: 'keep — encrypted secrets',\n docsHref: 'https://docs.ochk.io/vault',\n },\n {\n slug: 'chat',\n href: 'https://chat.ochk.io',\n label: 'oc·chat',\n sub: 'message — encrypted chat',\n docsHref: 'https://docs.ochk.io/chat',\n },\n {\n slug: 'cosign',\n href: 'https://cosign.ochk.io',\n label: 'oc·cosign',\n sub: 'cofound — get behind builders',\n docsHref: 'https://docs.ochk.io/cosign',\n },\n {\n slug: 'btc',\n href: 'https://btc.ochk.io',\n label: 'oc·btc',\n sub: 'read — bitcoin desk',\n docsHref: 'https://btc.ochk.io/data',\n },\n {\n slug: 'globe',\n href: 'https://globe.ochk.io',\n label: 'oc·globe',\n sub: 'watch — the network, live',\n docsHref: 'https://globe.ochk.io/sources',\n },\n {\n slug: 'attest',\n href: 'https://attest.ochk.io',\n label: 'oc·attest',\n sub: 'am — sybil resistance',\n docsHref: 'https://docs.ochk.io/attest',\n },\n {\n slug: 'lock',\n href: 'https://lock.ochk.io',\n label: 'oc·lock',\n sub: 'whisper — encryption',\n docsHref: 'https://docs.ochk.io/lock',\n },\n {\n slug: 'vote',\n href: 'https://vote.ochk.io',\n label: 'oc·vote',\n sub: 'decide — polls',\n docsHref: 'https://docs.ochk.io/vote',\n },\n {\n slug: 'stamp',\n href: 'https://stamp.ochk.io',\n label: 'oc·stamp',\n sub: 'declare — block-anchored',\n docsHref: 'https://docs.ochk.io/stamp',\n },\n {\n slug: 'agent',\n href: 'https://agent.ochk.io',\n label: 'oc·agent',\n sub: 'delegate — scoped auth',\n docsHref: 'https://docs.ochk.io/agent',\n },\n {\n slug: 'pledge',\n href: 'https://pledge.ochk.io',\n label: 'oc·pledge',\n sub: 'swear — bonded commitment',\n docsHref: 'https://docs.ochk.io/pledge',\n },\n];\n\n/** Entries gated behind `showOwnerEntries={true}`. Owner-only family\n * properties (`oc·analytics` at analytics.ochk.io, `oc·bot` at\n * bot.ochk.io) live here so they're invisible to everyone except\n * verified owners — the JWT claim drives the gate. */\nconst OWNER_ENTRIES: SwitcherEntry[] = [\n {\n slug: 'fleet',\n href: 'https://fleet.ochk.io',\n label: 'oc·fleet',\n sub: 'managed — agent fleet',\n docsHref: 'https://fleet.ochk.io',\n },\n {\n slug: 'analytics',\n href: 'https://analytics.ochk.io',\n label: 'oc·analytics',\n sub: 'owner cockpit',\n docsHref: 'https://analytics.ochk.io',\n },\n {\n slug: 'bot',\n href: 'https://bot.ochk.io',\n label: 'oc·bot',\n sub: 'social bot',\n docsHref: 'https://bot.ochk.io',\n },\n {\n slug: 'forge',\n href: 'https://forge.ochk.io',\n label: 'oc·forge',\n sub: 'agent ops',\n docsHref: 'https://forge.ochk.io',\n },\n];\n\nexport interface EcosystemSwitcherProps {\n current: EcosystemSlug;\n className?: string;\n /**\n * When true, append the owner-only entries (currently\n * `oc·analytics`) to the family-switcher dropdown. Consumers\n * pass this from their session: `useOcSession().account?.isOwner`.\n * Defaults to false so non-owners never see owner-only links.\n *\n * Not a security boundary — analytics.ochk.io re-checks the\n * live OWNER_OC_ADDRESSES env on every request. This prop only\n * decides whether the UX hint is visible.\n */\n showOwnerEntries?: boolean;\n}\n\nexport function EcosystemSwitcher({\n current,\n className,\n showOwnerEntries = false,\n}: EcosystemSwitcherProps) {\n const [open, setOpen] = useState(false);\n const containerRef = useRef<HTMLDivElement | null>(null);\n\n // Outside-click + Escape close.\n useEffect(() => {\n if (!open) return;\n function onDoc(e: MouseEvent) {\n if (!containerRef.current) return;\n if (!containerRef.current.contains(e.target as Node)) setOpen(false);\n }\n function onKey(e: KeyboardEvent) {\n if (e.key === 'Escape') setOpen(false);\n }\n document.addEventListener('mousedown', onDoc);\n document.addEventListener('keydown', onKey);\n return () => {\n document.removeEventListener('mousedown', onDoc);\n document.removeEventListener('keydown', onKey);\n };\n }, [open]);\n\n return (\n <div ref={containerRef} className={'relative ' + (className ?? '')}>\n <button\n type=\"button\"\n aria-haspopup=\"menu\"\n aria-expanded={open}\n aria-label=\"Switch OrangeCheck product\"\n title=\"Switch product\"\n onClick={() => setOpen((v) => !v)}\n className={\n 'inline-flex items-center gap-1 px-2 py-1 transition-colors ' +\n (open\n ? 'text-foreground'\n : 'text-muted-foreground hover:text-foreground')\n }\n >\n <Boxes className=\"h-4 w-4\" />\n <ChevronDown\n className={\n 'h-3.5 w-3.5 transition-transform ' + (open ? 'rotate-180' : '')\n }\n />\n </button>\n\n {open && (\n <div\n role=\"menu\"\n aria-label=\"Switch OrangeCheck product\"\n className=\"bg-background absolute right-0 top-full z-[60] mt-2 w-72 border shadow-lg\"\n >\n <div className=\"label-mono text-primary border-b px-4 py-2\">\n § the family\n </div>\n <ul className=\"py-1\">\n {[...ENTRIES, ...(showOwnerEntries ? OWNER_ENTRIES : [])].map((e) => {\n const isActive = e.slug === current;\n return (\n <li key={e.slug}>\n <Link\n href={e.href}\n onClick={() => setOpen(false)}\n aria-current={isActive ? 'page' : undefined}\n className={\n 'group flex items-baseline gap-3 px-4 py-2 transition-colors ' +\n (isActive\n ? 'bg-primary/5'\n : 'hover:bg-muted')\n }\n >\n <span\n className={\n 'font-display flex-1 text-[12px] font-semibold tracking-tight ' +\n (isActive\n ? 'text-primary'\n : 'text-foreground group-hover:text-primary transition-colors')\n }\n >\n {e.label}\n </span>\n <span className=\"text-muted-foreground font-mono text-[10px] tracking-wider uppercase\">\n {e.sub}\n </span>\n {isActive && (\n <Check className=\"text-primary h-3 w-3\" />\n )}\n </Link>\n </li>\n );\n })}\n </ul>\n <div className=\"border-t px-4 py-2 font-mono text-[10px] tracking-widest uppercase\">\n <Link\n href=\"https://docs.ochk.io\"\n onClick={() => setOpen(false)}\n className=\"text-muted-foreground hover:text-foreground inline-block transition-colors\"\n >\n docs.ochk.io →\n </Link>\n </div>\n </div>\n )}\n </div>\n );\n}\n","/**\n * Family-property registry — the single source of truth for every\n * orangecheck-family site. Both `<OcLogoDropdown>` (the global logo →\n * property switcher) and `<OcAccountMenu>` (the global signed-in\n * account chip) read from this table, so a one-line edit here ripples\n * to every consumer simultaneously.\n *\n * Adding a new family member means appending one entry below. Removing\n * one means deleting the entry. There are no other call sites to chase.\n */\n\nimport type { EcosystemSlug } from './ecosystem-switcher';\n\nexport type FamilyCategory = 'hub' | 'product' | 'protocol' | 'owner';\n\nexport interface FamilyProperty {\n /** Stable URL-safe identifier (e.g. `'vault'`). */\n slug: EcosystemSlug;\n /** Absolute origin (e.g. `'https://vault.ochk.io'`). */\n origin: string;\n /** Bare hostname (e.g. `'vault.ochk.io'`). Used in account-menu headers. */\n hostname: string;\n /** Wordmark label (e.g. `'oc·vault'`). */\n label: string;\n /** Short tagline (verb — what-it-does), shown under the wordmark in the menu. */\n sub: string;\n /** Docs deep-link (e.g. `'https://docs.ochk.io/vault'`). */\n docsHref: string;\n /** Family-level category that shapes the visual chip + menu sectioning. */\n category: FamilyCategory;\n}\n\nexport const FAMILY_PROPERTIES: ReadonlyArray<FamilyProperty> = [\n {\n slug: 'home',\n origin: 'https://ochk.io',\n hostname: 'ochk.io',\n label: 'orangecheck',\n sub: 'umbrella · sign-in',\n docsHref: 'https://docs.ochk.io',\n category: 'hub',\n },\n {\n slug: 'docs',\n origin: 'https://docs.ochk.io',\n hostname: 'docs.ochk.io',\n label: 'oc·docs',\n sub: 'unified reference',\n docsHref: 'https://docs.ochk.io',\n category: 'hub',\n },\n {\n slug: 'me',\n origin: 'https://me.ochk.io',\n hostname: 'me.ochk.io',\n label: 'oc·me',\n sub: 'earn — consumer identity',\n docsHref: 'https://docs.ochk.io/me',\n category: 'product',\n },\n {\n slug: 'vault',\n origin: 'https://vault.ochk.io',\n hostname: 'vault.ochk.io',\n label: 'oc·vault',\n sub: 'keep — encrypted secrets',\n docsHref: 'https://docs.ochk.io/vault',\n category: 'product',\n },\n {\n slug: 'chat',\n origin: 'https://chat.ochk.io',\n hostname: 'chat.ochk.io',\n label: 'oc·chat',\n sub: 'message — encrypted chat',\n docsHref: 'https://docs.ochk.io/chat',\n category: 'product',\n },\n {\n slug: 'cosign',\n origin: 'https://cosign.ochk.io',\n hostname: 'cosign.ochk.io',\n label: 'oc·cosign',\n sub: 'cofound — get behind builders',\n docsHref: 'https://docs.ochk.io/cosign',\n category: 'product',\n },\n {\n slug: 'btc',\n origin: 'https://btc.ochk.io',\n hostname: 'btc.ochk.io',\n label: 'oc·btc',\n sub: 'read — bitcoin desk',\n docsHref: 'https://btc.ochk.io/data',\n category: 'product',\n },\n {\n slug: 'globe',\n origin: 'https://globe.ochk.io',\n hostname: 'globe.ochk.io',\n label: 'oc·globe',\n sub: 'watch — the network, live',\n docsHref: 'https://globe.ochk.io/sources',\n category: 'product',\n },\n {\n slug: 'attest',\n origin: 'https://attest.ochk.io',\n hostname: 'attest.ochk.io',\n label: 'oc·attest',\n sub: 'am — sybil resistance',\n docsHref: 'https://docs.ochk.io/attest',\n category: 'protocol',\n },\n {\n slug: 'lock',\n origin: 'https://lock.ochk.io',\n hostname: 'lock.ochk.io',\n label: 'oc·lock',\n sub: 'whisper — encryption',\n docsHref: 'https://docs.ochk.io/lock',\n category: 'protocol',\n },\n {\n slug: 'vote',\n origin: 'https://vote.ochk.io',\n hostname: 'vote.ochk.io',\n label: 'oc·vote',\n sub: 'decide — polls',\n docsHref: 'https://docs.ochk.io/vote',\n category: 'protocol',\n },\n {\n slug: 'stamp',\n origin: 'https://stamp.ochk.io',\n hostname: 'stamp.ochk.io',\n label: 'oc·stamp',\n sub: 'declare — block-anchored',\n docsHref: 'https://docs.ochk.io/stamp',\n category: 'protocol',\n },\n {\n slug: 'agent',\n origin: 'https://agent.ochk.io',\n hostname: 'agent.ochk.io',\n label: 'oc·agent',\n sub: 'delegate — scoped auth',\n docsHref: 'https://docs.ochk.io/agent',\n category: 'protocol',\n },\n {\n slug: 'pledge',\n origin: 'https://pledge.ochk.io',\n hostname: 'pledge.ochk.io',\n label: 'oc·pledge',\n sub: 'swear — bonded commitment',\n docsHref: 'https://docs.ochk.io/pledge',\n category: 'protocol',\n },\n {\n slug: 'fleet',\n origin: 'https://fleet.ochk.io',\n hostname: 'fleet.ochk.io',\n label: 'oc·fleet',\n sub: 'managed — agent fleet',\n docsHref: 'https://fleet.ochk.io',\n category: 'owner',\n },\n {\n slug: 'analytics',\n origin: 'https://analytics.ochk.io',\n hostname: 'analytics.ochk.io',\n label: 'oc·analytics',\n sub: 'owner cockpit',\n docsHref: 'https://analytics.ochk.io',\n category: 'owner',\n },\n {\n slug: 'bot',\n origin: 'https://bot.ochk.io',\n hostname: 'bot.ochk.io',\n label: 'oc·bot',\n sub: 'social bot',\n docsHref: 'https://bot.ochk.io',\n category: 'owner',\n },\n {\n slug: 'forge',\n origin: 'https://forge.ochk.io',\n hostname: 'forge.ochk.io',\n label: 'oc·forge',\n sub: 'agent ops',\n docsHref: 'https://forge.ochk.io',\n category: 'owner',\n },\n];\n\n/**\n * Canonical lifecycle states for any family site. Used by both the\n * tiny chip rendered next to the wordmark and any other surface that\n * wants to display \"this site is still settling\" UX. Centralised\n * vocabulary so we can't accidentally drift to a parallel synonym\n * like `preview`/`experimental` on different sites.\n *\n * - `live` — production-ready; **no chip rendered** (the absence\n * of a chip is the affordance)\n * - `beta` — feature-complete but still iterating, soft launch\n * - `alpha` — early, breaking changes expected, integrators beware\n */\nexport type SiteState = 'alpha' | 'beta' | 'live';\n\nexport const SITE_STATE_LABEL: Record<Exclude<SiteState, 'live'>, string> = {\n alpha: 'alpha',\n beta: 'beta',\n};\n\n/** Find a property entry by its slug. */\nexport function findFamilyProperty(slug: EcosystemSlug): FamilyProperty | undefined {\n return FAMILY_PROPERTIES.find((p) => p.slug === slug);\n}\n","import { Check, ChevronDown, CornerDownLeft } from 'lucide-react';\nimport Link from 'next/link';\nimport { useRouter } from 'next/router';\nimport * as React from 'react';\nimport { useEffect, useId, useRef, useState, type ReactNode } from 'react';\n\nimport { Tooltip } from '../primitives/tooltip';\nimport { cn } from '../tokens/cn';\nimport type { EcosystemSlug } from './ecosystem-switcher';\nimport {\n FAMILY_PROPERTIES,\n SITE_STATE_LABEL,\n findFamilyProperty,\n type FamilyCategory,\n type SiteState,\n} from './family-properties';\n\n/**\n * `<OcLogoDropdown>` — the logo IS the dropdown.\n *\n * Wraps a site's local LogoMark + wordmark in a button that, on click,\n * drops a popover listing every OrangeCheck family property. The current\n * property is highlighted with a primary-tinted background, a left-edge\n * accent bar, and a \"home\" label — and is itself a clickable link to\n * the local home href (default `/`).\n *\n * Family properties carry one of three categories:\n *\n * - `hub` — orangecheck umbrella + docs (no badge)\n * - `product` — commercial products (me, vault, fleet) · primary chip\n * - `protocol` — open verb specs (attest, lock, vote, stamp, agent,\n * pledge) · muted chip\n *\n * The category of the *current* site is auto-rendered as a tiny mono\n * chip inside the trigger button, and the dropdown itself groups\n * entries by category with subtle mono dividers — so the product /\n * protocol distinction is visible both on the logo and in the menu,\n * with a single source of truth (`./family-properties.ts`).\n *\n * The optional `siteState` prop renders a second tiny chip after the\n * category chip — `alpha` or `beta` — for sites that aren't `live`.\n * The vocabulary is canonical across the family (see SiteState in\n * family-properties.ts). Pass it from your per-site config so a\n * single edit propagates to the logo, the account menu, and anywhere\n * else the chip surfaces.\n *\n * Mobile-aware: the popover's width is clamped to the viewport,\n * content scrolls when there are more entries than fit. The trigger\n * chips hide below `sm` to preserve mobile header space — the dropdown\n * itself still shows the grouping.\n *\n * On a fine pointer (mouse) the trigger reveals a themed `<Tooltip>` on\n * hover, and on keyboard focus — naming where you are and the two\n * affordances (`click · switch site`, `double-click · home`). It replaces\n * the old native `title=` (unthemed, undelayed, invisible on touch) and is\n * never shown on touch, where the menu's `home ✓` row is the path home.\n */\n\nconst SECTIONS: Array<{ category: FamilyCategory; label: string }> = [\n { category: 'hub', label: 'hub' },\n { category: 'product', label: 'products' },\n { category: 'protocol', label: 'protocols' },\n { category: 'owner', label: 'owner' },\n];\n\nexport interface OcLogoDropdownProps {\n /**\n * Which property this site IS. Used to highlight the active row,\n * route the active row's link to `homeHref` instead of the cross-\n * domain absolute URL, and pick the category chip rendered next\n * to the wordmark.\n */\n current: EcosystemSlug;\n /**\n * The site's local home path (for the active row). Default `/`.\n * Always a same-origin path — the logo's \"go home\" affordance is\n * preserved by clicking the highlighted row.\n */\n homeHref?: string;\n /**\n * Optional lifecycle state for this site. `'live'` (default) renders\n * no chip; `'alpha'` and `'beta'` render a small mono uppercase chip\n * after the category badge. Drive this from your per-site config so\n * one constant change ripples to every surface.\n */\n siteState?: SiteState;\n /**\n * Logo contents · typically `<LogoMark />` + `<span>oc·X</span>`.\n */\n children: ReactNode;\n /** className for the outer container. */\n className?: string;\n /** className for the trigger button. */\n triggerClassName?: string;\n /** className for the popover. */\n popoverClassName?: string;\n /**\n * When true, include the `owner` section (currently just\n * `oc·analytics`) in the family list. Consumers pass this from\n * their session: `useOcSession().account?.isOwner ?? false`.\n * Defaults to false so non-owners never see the entry.\n *\n * Not a security boundary — analytics.ochk.io re-checks the live\n * OWNER_OC_ADDRESSES env on every request. This prop only\n * controls UX visibility.\n */\n showOwnerEntries?: boolean;\n}\n\nfunction CategoryChip({ category }: { category: FamilyCategory }) {\n if (category === 'hub') return null;\n const label =\n category === 'product' ? 'product' : category === 'protocol' ? 'protocol' : 'owner';\n const tone =\n category === 'product'\n ? 'border-primary/25 bg-primary/10 text-primary'\n : category === 'protocol'\n ? 'border-muted-foreground/20 bg-muted/40 text-muted-foreground/85'\n : 'border-warning/30 bg-warning/10 text-warning';\n return (\n <span\n aria-label={\n category === 'product'\n ? 'commercial product'\n : category === 'protocol'\n ? 'protocol reference'\n : 'owner-only surface'\n }\n className={\n 'ml-1 hidden rounded-sm border px-1.5 py-[1px] font-mono text-[9px] font-medium tracking-widest uppercase sm:inline-block ' +\n tone\n }\n data-oc-category={category}\n >\n {label}\n </span>\n );\n}\n\nfunction SiteStateBadge({ state }: { state: SiteState }) {\n if (state === 'live') return null;\n return (\n <span\n aria-label={`site lifecycle: ${state}`}\n className=\"text-muted-foreground/70 ml-1 hidden font-mono text-[9px] font-medium tracking-widest uppercase sm:inline-block\"\n data-oc-site-state={state}\n >\n {SITE_STATE_LABEL[state]}\n </span>\n );\n}\n\nfunction MenuCategoryChip({ category }: { category: FamilyCategory }) {\n if (category === 'hub') return null;\n const label =\n category === 'product' ? 'pro' : category === 'protocol' ? 'spec' : 'own';\n const tone =\n category === 'product'\n ? 'bg-primary/10 text-primary'\n : category === 'protocol'\n ? 'bg-muted/60 text-muted-foreground/80'\n : 'bg-warning/15 text-warning';\n return (\n <span\n aria-hidden\n className={\n 'inline-block shrink-0 rounded-sm px-1 py-[1px] font-mono text-[9px] font-medium tracking-widest uppercase ' +\n tone\n }\n >\n {label}\n </span>\n );\n}\n\n/**\n * The hover/focus tooltip body — three rows that the native `title=` used to\n * hide: where you are, then `click · switch site` and `double-click · home`.\n * Decorative reinforcement of the trigger's `aria-label` (the tooltip itself\n * is `aria-hidden`); the same `CornerDownLeft` glyph as the in-menu home hint.\n */\nfunction SwitcherTooltipCard({ current }: { current: EcosystemSlug }) {\n const prop = findFamilyProperty(current);\n return (\n <div className=\"w-[13rem] max-w-[calc(100vw-1.5rem)]\">\n <div className=\"flex flex-col leading-tight\">\n <span className=\"flex flex-wrap items-baseline gap-x-1.5\">\n <span className=\"text-muted-foreground font-mono text-[9px] tracking-widest uppercase\">\n you’re on\n </span>\n <span className=\"text-primary font-display text-[12px] font-semibold tracking-tight\">\n {prop?.label ?? 'orangecheck family'}\n </span>\n </span>\n {prop?.sub && (\n <span className=\"text-muted-foreground mt-0.5 font-mono text-[10px] tracking-wide\">\n {prop.sub}\n </span>\n )}\n </div>\n <div className=\"border-border -mx-2.5 my-2 border-t\" />\n <div className=\"flex items-center gap-1.5\">\n <ChevronDown aria-hidden className=\"text-muted-foreground h-3 w-3 shrink-0\" />\n <span className=\"text-primary font-mono text-[10px] font-medium tracking-widest uppercase\">\n click\n </span>\n <span className=\"text-muted-foreground font-mono text-[10px]\">·</span>\n <span className=\"text-muted-foreground font-mono text-[10px] tracking-wide\">\n switch site\n </span>\n </div>\n <div className=\"mt-1.5 flex items-center gap-1.5\">\n <CornerDownLeft aria-hidden className=\"text-muted-foreground h-3 w-3 shrink-0\" />\n <span className=\"text-primary font-mono text-[10px] font-medium tracking-widest uppercase\">\n double-click\n </span>\n <span className=\"text-muted-foreground font-mono text-[10px]\">·</span>\n <span className=\"text-muted-foreground font-mono text-[10px] tracking-wide\">\n home\n </span>\n </div>\n </div>\n );\n}\n\nexport function OcLogoDropdown({\n current,\n homeHref = '/',\n siteState = 'live',\n children,\n className,\n triggerClassName,\n popoverClassName,\n showOwnerEntries = false,\n}: OcLogoDropdownProps) {\n const [open, setOpen] = useState(false);\n const containerRef = useRef<HTMLDivElement | null>(null);\n const menuId = useId();\n const router = useRouter();\n\n const currentCategory: FamilyCategory = findFamilyProperty(current)?.category ?? 'hub';\n\n /**\n * Trigger click semantics:\n *\n * single-click → toggle the family dropdown\n * double-click → navigate to `homeHref` (the local landing)\n *\n * `MouseEvent.detail` is the running click count for clicks within\n * the browser's double-click threshold (~500ms). The DOM still\n * fires the `click` event on the first tap, so the dropdown\n * momentarily opens during a double-click — and the second click\n * navigates home. That's the visual story the popover-side hint\n * sells: *open · tap again · home.*\n */\n function handleTriggerClick(e: React.MouseEvent<HTMLButtonElement>) {\n if (e.detail >= 2) {\n e.preventDefault();\n setOpen(false);\n void router.push(homeHref);\n return;\n }\n setOpen((v) => !v);\n }\n\n // Outside-click + Escape close.\n useEffect(() => {\n if (!open) return;\n function onDoc(e: MouseEvent) {\n if (!containerRef.current) return;\n if (!containerRef.current.contains(e.target as Node)) setOpen(false);\n }\n function onKey(e: KeyboardEvent) {\n if (e.key === 'Escape') setOpen(false);\n }\n document.addEventListener('mousedown', onDoc);\n document.addEventListener('keydown', onKey);\n return () => {\n document.removeEventListener('mousedown', onDoc);\n document.removeEventListener('keydown', onKey);\n };\n }, [open]);\n\n return (\n <div\n ref={containerRef}\n className={'relative inline-flex items-center ' + (className ?? '')}\n data-oc-logo-dropdown=\"\"\n data-oc-current-category={currentCategory}\n data-oc-site-state={siteState}\n >\n <Tooltip\n content={<SwitcherTooltipCard current={current} />}\n disabled={open}\n side=\"bottom\"\n align=\"start\"\n sideOffset={8}\n zIndexClassName=\"z-[70]\"\n >\n <button\n type=\"button\"\n aria-haspopup=\"menu\"\n aria-expanded={open}\n aria-controls={menuId}\n aria-label=\"orangecheck family menu\"\n onClick={handleTriggerClick}\n className={cn(\n // focus indicator is guaranteed even if a consumer overrides triggerClassName\n 'focus-visible:ring-primary/60 rounded-sm focus-visible:ring-2 focus-visible:outline-none',\n triggerClassName ??\n 'group hover:bg-accent/30 -mx-1.5 -my-1 flex min-h-[40px] items-center gap-2 rounded-sm px-1.5 py-1 transition-colors ' +\n (open ? 'bg-accent/20' : '')\n )}\n data-oc-logo-dropdown-trigger=\"\"\n data-oc-logo-dropdown-open={open ? 'true' : 'false'}\n >\n {children}\n <CategoryChip category={currentCategory} />\n <SiteStateBadge state={siteState} />\n <ChevronDown\n aria-hidden\n className={\n 'text-muted-foreground/70 group-hover:text-foreground/80 h-3.5 w-3.5 shrink-0 transition-transform duration-200 ' +\n (open ? 'rotate-180' : '')\n }\n />\n </button>\n </Tooltip>\n {/* Home affordance · a sibling Link to the trigger button\n rather than a child of it (nested buttons would be\n invalid HTML). Fades + slides in when the dropdown is\n open, whispering \"tap again, you'll go home\". Clicking\n the hint navigates directly — works for users who\n discover it before they discover the double-click. The\n subtle motion-safe pulse on the icon nudges the eye\n without shouting. */}\n <Link\n href={homeHref}\n aria-label={'go to ' + homeHref + ' (this site\\'s home)'}\n onClick={() => setOpen(false)}\n tabIndex={open ? 0 : -1}\n className={\n 'hover:text-primary group/home -ml-1 hidden items-center gap-1 rounded-sm px-1.5 py-1 font-mono text-[9px] tracking-widest uppercase transition-all duration-200 sm:inline-flex ' +\n (open\n ? 'pointer-events-auto translate-x-0 text-muted-foreground/70 opacity-100 hover:bg-accent/30'\n : 'pointer-events-none -translate-x-1 opacity-0')\n }\n data-oc-logo-dropdown-home-hint=\"\"\n >\n <CornerDownLeft\n aria-hidden\n className={\n 'h-3 w-3 group-hover/home:text-primary ' +\n (open ? 'motion-safe:animate-pulse' : '')\n }\n />\n <span className=\"text-primary/70 group-hover/home:text-primary\">\n home\n </span>\n </Link>\n\n {open && (\n <div\n id={menuId}\n role=\"menu\"\n aria-label=\"orangecheck family\"\n className={\n popoverClassName ??\n 'bg-background absolute top-full left-0 z-[60] mt-2 w-[min(20rem,calc(100vw-1rem))] border shadow-lg'\n }\n data-oc-logo-dropdown-popover=\"\"\n >\n <div className=\"label-mono text-primary border-b px-4 py-2\">\n § the orangecheck family\n </div>\n <div className=\"max-h-[min(28rem,70vh)] overflow-y-auto py-1\" role=\"none\">\n {SECTIONS.map(({ category, label }) => {\n // Owner-only sections only render when the\n // consumer has explicitly opted in (caller\n // reads `useOcSession().account?.isOwner`).\n // Non-owners simply don't see them.\n if (category === 'owner' && !showOwnerEntries) return null;\n const sectionEntries = FAMILY_PROPERTIES.filter(\n (e) => e.category === category\n );\n if (sectionEntries.length === 0) return null;\n return (\n <div key={category} role=\"none\" data-oc-section={category}>\n <div\n role=\"separator\"\n aria-hidden\n className={\n 'text-muted-foreground/60 px-4 pt-2.5 pb-1 font-mono text-[9px] font-medium tracking-widest uppercase ' +\n (category === 'hub' ? '' : 'border-t mt-1')\n }\n >\n {label}\n </div>\n <ul role=\"none\" className=\"pb-1\">\n {sectionEntries.map((e) => {\n const isActive = e.slug === current;\n const href = isActive ? homeHref : e.origin;\n return (\n <li key={e.slug} role=\"none\">\n <Link\n href={href}\n role=\"menuitem\"\n onClick={() => setOpen(false)}\n aria-current={isActive ? 'page' : undefined}\n className={\n 'group flex items-center gap-2 px-4 py-2 transition-colors ' +\n (isActive\n ? 'bg-primary/8 border-primary -ml-px border-l-2'\n : 'hover:bg-muted -ml-px border-l-2 border-transparent')\n }\n data-oc-logo-dropdown-item={\n isActive ? 'current' : 'sibling'\n }\n data-oc-entry-category={e.category}\n >\n <span className=\"flex min-w-0 flex-1 flex-col leading-tight\">\n <span\n className={\n 'font-display text-[12px] font-semibold tracking-tight ' +\n (isActive\n ? 'text-primary'\n : 'text-foreground group-hover:text-primary transition-colors')\n }\n >\n {e.label}\n </span>\n <span className=\"text-muted-foreground mt-0.5 font-mono text-[10px] tracking-wide\">\n {e.sub}\n </span>\n </span>\n <MenuCategoryChip category={e.category} />\n {isActive ? (\n <span className=\"text-primary inline-flex shrink-0 items-center gap-1 font-mono text-[10px] tracking-widest uppercase\">\n home\n <Check className=\"h-3 w-3\" />\n </span>\n ) : null}\n </Link>\n </li>\n );\n })}\n </ul>\n </div>\n );\n })}\n </div>\n <div className=\"border-t px-4 py-2 font-mono text-[10px] tracking-widest uppercase\">\n <Link\n href=\"https://docs.ochk.io\"\n onClick={() => setOpen(false)}\n className=\"text-muted-foreground hover:text-foreground inline-block transition-colors\"\n >\n docs.ochk.io →\n </Link>\n </div>\n </div>\n )}\n </div>\n );\n}\n","'use client';\n\nimport {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n type ReactNode,\n} from 'react';\n\nimport {\n accentFor,\n DEFAULT_OC_THEME,\n OC_DEFAULT_ACCENT,\n OC_MOTION_COOKIE,\n OC_SKIN_COOKIE,\n OC_THEMES,\n resolveTheme,\n type OcTheme,\n} from './themes';\nimport { OcAurora } from './aurora';\n\ndeclare global {\n interface Window {\n /** Defined by `getOcThemeInitScript()`; recolors favicon + theme-color. */\n __ocApplySkinChrome?: (skin: string) => void;\n }\n}\n\n/**\n * OcThemeProvider — the skin (named-theme) axis.\n *\n * Orthogonal to `next-themes`, which owns light/dark via the `.dark` class.\n * This provider owns the `data-oc-theme` attribute on `<html>` and persists the\n * choice in the `oc_skin` cookie at `Domain=.ochk.io`, so a skin chosen on one\n * `*.ochk.io` site is honored on every other. It re-reads the cookie on focus /\n * visibility change so a fresh choice picks up when the user returns to a tab\n * (same cross-site pickup trick `OcAccountMenu` uses for sign-in).\n *\n * Mount once, inside (or beside) the `next-themes` `<ThemeProvider>`:\n *\n * <ThemeProvider attribute=\"class\" defaultTheme=\"system\" enableSystem>\n * <OcThemeProvider>\n * …app…\n * </OcThemeProvider>\n * </ThemeProvider>\n *\n * Pair with `getOcThemeInitScript()` in `_document` to avoid a flash before\n * hydration.\n */\n\nconst ONE_YEAR = 60 * 60 * 24 * 365;\nconst ATTR = 'data-oc-theme';\nconst MOTION_ATTR = 'data-oc-motion';\n\n/** Ambient-motion switch. `'off'` freezes the aurora and every `.oc-ambient`. */\nexport type OcMotion = 'on' | 'off';\n\nfunction readSkinCookie(): string | null {\n if (typeof document === 'undefined') return null;\n const prefix = `${OC_SKIN_COOKIE}=`;\n for (const part of document.cookie.split(';')) {\n const trimmed = part.trim();\n if (trimmed.startsWith(prefix)) {\n const v = decodeURIComponent(trimmed.slice(prefix.length));\n return v.length > 0 ? v : null;\n }\n }\n return null;\n}\n\nfunction writeSkinCookie(value: string): void {\n if (typeof document === 'undefined') return;\n const isLocal =\n location.hostname === 'localhost' || location.hostname === '127.0.0.1';\n const parts = [\n `${OC_SKIN_COOKIE}=${encodeURIComponent(value)}`,\n 'Path=/',\n `Max-Age=${ONE_YEAR}`,\n 'SameSite=Lax',\n ];\n if (!isLocal) {\n parts.push('Domain=.ochk.io');\n parts.push('Secure');\n }\n document.cookie = parts.join('; ');\n}\n\nfunction applyAttr(skin: string): void {\n if (typeof document === 'undefined') return;\n document.documentElement.setAttribute(ATTR, skin);\n}\n\nfunction readMotionCookie(): OcMotion | null {\n if (typeof document === 'undefined') return null;\n const prefix = `${OC_MOTION_COOKIE}=`;\n for (const part of document.cookie.split(';')) {\n const trimmed = part.trim();\n if (trimmed.startsWith(prefix)) {\n const v = decodeURIComponent(trimmed.slice(prefix.length));\n return v === 'off' ? 'off' : v === 'on' ? 'on' : null;\n }\n }\n return null;\n}\n\nfunction writeMotionCookie(value: OcMotion): void {\n if (typeof document === 'undefined') return;\n const isLocal =\n location.hostname === 'localhost' || location.hostname === '127.0.0.1';\n const parts = [\n `${OC_MOTION_COOKIE}=${encodeURIComponent(value)}`,\n 'Path=/',\n `Max-Age=${ONE_YEAR}`,\n 'SameSite=Lax',\n ];\n if (!isLocal) {\n parts.push('Domain=.ochk.io');\n parts.push('Secure');\n }\n document.cookie = parts.join('; ');\n}\n\n/** Attribute is only present when motion is off — absence means the default. */\nfunction applyMotionAttr(motion: OcMotion): void {\n if (typeof document === 'undefined') return;\n if (motion === 'off') document.documentElement.setAttribute(MOTION_ATTR, 'off');\n else document.documentElement.removeAttribute(MOTION_ATTR);\n}\n\n/**\n * Swap the browser chrome (favicon + `<meta name=\"theme-color\">`) to the skin's\n * accent. The real work lives in the global installed by\n * `getOcThemeInitScript()` (so the favicon's original SVG is captured exactly\n * once, before the init script's own first recolor — avoids re-reading an\n * already-swapped data: URI). If the init script wasn't included, fall back to\n * the theme-color swap alone (favicon recolor needs the captured original).\n */\nfunction applySkinChrome(skin: string): void {\n if (typeof window === 'undefined') return;\n if (typeof window.__ocApplySkinChrome === 'function') {\n window.__ocApplySkinChrome(skin);\n return;\n }\n const meta = document.querySelector('meta[name=\"theme-color\"]');\n if (meta) meta.setAttribute('content', accentFor(skin));\n}\n\ninterface OcSkinContextValue {\n /** Current skin id (always resolved to a known theme). */\n skin: string;\n /** Set the skin: validates, applies the attribute, persists the cookie. */\n setSkin: (id: string) => void;\n /** The full registry, for rendering a picker. */\n themes: readonly OcTheme[];\n /** Ambient-motion switch ('off' pauses aurora + every `.oc-ambient`). */\n motion: OcMotion;\n /** Set ambient motion: applies the attribute, persists the cookie. */\n setMotion: (value: OcMotion) => void;\n}\n\nconst OcSkinContext = createContext<OcSkinContextValue | null>(null);\n\nexport interface OcThemeProviderProps {\n children: ReactNode;\n /** Skin to assume before the cookie is read (defaults to `orangecheck`). */\n defaultSkin?: string;\n /**\n * The ambient bitcoin-aurora background. `true` (default) renders it behind\n * the app; `false` disables it; `{ intensity }` tunes its strength for this\n * site (e.g. `aurora={{ intensity: 0.5 }}` on a reading-heavy surface).\n * OcAuroraGL (the silk-field upgrade) is ON by default (the CSS blobs\n * remain the permanent floor under every failure path). Reading- and\n * console-heavy surfaces opt OUT with `{ gl: false }`.\n */\n aurora?: boolean | { intensity?: number; gl?: boolean };\n}\n\nexport function OcThemeProvider({\n children,\n defaultSkin = DEFAULT_OC_THEME,\n aurora = true,\n}: OcThemeProviderProps) {\n const [skin, setSkinState] = useState<string>(() => resolveTheme(defaultSkin));\n const [motion, setMotionState] = useState<OcMotion>('on');\n const hydratedRef = useRef(false);\n\n // Hydrate from the cookies once on mount and align the attributes.\n useEffect(() => {\n if (hydratedRef.current) return;\n hydratedRef.current = true;\n const fromCookie = resolveTheme(readSkinCookie() ?? defaultSkin);\n applyAttr(fromCookie);\n applySkinChrome(fromCookie);\n setSkinState(fromCookie);\n const motionCookie = readMotionCookie() ?? 'on';\n applyMotionAttr(motionCookie);\n setMotionState(motionCookie);\n }, [defaultSkin]);\n\n // Cross-site pickup: re-read the cookies when the tab regains focus.\n useEffect(() => {\n function sync() {\n const fromCookie = resolveTheme(readSkinCookie() ?? skin);\n if (fromCookie !== skin) {\n applyAttr(fromCookie);\n applySkinChrome(fromCookie);\n setSkinState(fromCookie);\n }\n const motionCookie = readMotionCookie() ?? 'on';\n if (motionCookie !== motion) {\n applyMotionAttr(motionCookie);\n setMotionState(motionCookie);\n }\n }\n window.addEventListener('focus', sync);\n document.addEventListener('visibilitychange', sync);\n return () => {\n window.removeEventListener('focus', sync);\n document.removeEventListener('visibilitychange', sync);\n };\n }, [skin, motion]);\n\n const setSkin = useCallback((id: string) => {\n const next = resolveTheme(id);\n applyAttr(next);\n applySkinChrome(next);\n writeSkinCookie(next);\n setSkinState(next);\n }, []);\n\n const setMotion = useCallback((value: OcMotion) => {\n const next: OcMotion = value === 'off' ? 'off' : 'on';\n applyMotionAttr(next);\n writeMotionCookie(next);\n setMotionState(next);\n }, []);\n\n const value = useMemo<OcSkinContextValue>(\n () => ({ skin, setSkin, themes: OC_THEMES, motion, setMotion }),\n [skin, setSkin, motion, setMotion]\n );\n\n return (\n <OcSkinContext.Provider value={value}>\n {aurora !== false && (\n <OcAurora\n intensity={typeof aurora === 'object' ? aurora.intensity : undefined}\n // OcAuroraGL is the family default (aurora depth R2): a bare\n // provider, `aurora={true}`, or an object without `gl` opts\n // IN. Reading/console surfaces opt OUT with `gl: false`.\n gl={typeof aurora === 'object' ? (aurora.gl ?? true) : true}\n />\n )}\n {children}\n </OcSkinContext.Provider>\n );\n}\n\n/** Read the current skin + setter. Throws if used outside `OcThemeProvider`. */\nexport function useOcSkin(): OcSkinContextValue {\n const ctx = useContext(OcSkinContext);\n if (!ctx) {\n throw new Error('useOcSkin must be used within <OcThemeProvider>');\n }\n return ctx;\n}\n\n/**\n * Read the ambient-motion switch + setter. The WCAG 2.2.2 pause mechanism:\n * `'off'` sets `data-oc-motion=\"off\"` on `<html>` (persisted family-wide in the\n * `oc_motion` cookie), which pauses the aurora and any `.oc-ambient` element.\n * Throws if used outside `OcThemeProvider`.\n */\nexport function useOcMotion(): { motion: OcMotion; setMotion: (value: OcMotion) => void } {\n const { motion, setMotion } = useOcSkin();\n return { motion, setMotion };\n}\n\n/**\n * Blocking init script for `_document` (Pages Router) `<Head>`. Applies the\n * cookie's skin to `<html>` before first paint so there is no flash of the\n * default skin. Inject with:\n *\n * <script dangerouslySetInnerHTML={{ __html: getOcThemeInitScript() }} />\n */\nexport function getOcThemeInitScript(defaultSkin: string = DEFAULT_OC_THEME): string {\n // Self-contained IIFE — no imports available at parse time. Beyond applying\n // the skin attribute before first paint, it installs `window.__ocApplySkinChrome`\n // (the single owner of the favicon + theme-color swap) and runs it for the\n // saved skin. OcThemeProvider re-invokes the same global on later changes, so\n // the favicon's *original* SVG is captured exactly once (before any recolor)\n // and re-recolored from `#f97316` to the active skin's accent. The favicon\n // recolor is async (a fetch of the same-origin favicon.svg) — chrome updates\n // a beat after paint, which is fine; the skin attribute itself is synchronous.\n const accents = Object.fromEntries(OC_THEMES.map((t) => [t.id, t.accent]));\n return (\n `(function(){` +\n `var ACC=${JSON.stringify(accents)},DEF=${JSON.stringify(defaultSkin)},ORIG=${JSON.stringify(OC_DEFAULT_ACCENT)},fav=null;` +\n `function acc(s){return ACC[s]||ACC[DEF]||ORIG;}` +\n `window.__ocApplySkinChrome=function(s){try{` +\n `var a=acc(s);` +\n `var meta=document.querySelector('meta[name=\"theme-color\"]');if(meta){meta.setAttribute('content',a);}` +\n `var link=document.querySelector('link[rel~=\"icon\"][type=\"image/svg+xml\"]');if(!link){return;}` +\n `var paint=function(svg){link.setAttribute('href','data:image/svg+xml,'+encodeURIComponent(svg.split(ORIG).join(a)));};` +\n `if(fav!=null){paint(fav);return;}` +\n `var h=link.getAttribute('href');if(!h||h.indexOf('data:')===0){return;}` +\n `fetch(h).then(function(r){return r.text();}).then(function(svg){fav=svg;paint(svg);}).catch(function(){});` +\n `}catch(e){}};` +\n `try{var m=document.cookie.match(/(?:^|; )${OC_SKIN_COOKIE}=([^;]*)/);var s=m?decodeURIComponent(m[1]):DEF;if(!s){s=DEF;}` +\n `document.documentElement.setAttribute('${ATTR}',s);window.__ocApplySkinChrome(s);}` +\n `catch(e){document.documentElement.setAttribute('${ATTR}',DEF);}` +\n // Ambient-motion pause (oc_motion cookie) applied before first paint so\n // a paused choice never flashes a moving frame. Absence = motion on.\n `try{var mm=document.cookie.match(/(?:^|; )${OC_MOTION_COOKIE}=([^;]*)/);` +\n `if(mm&&decodeURIComponent(mm[1])==='off'){document.documentElement.setAttribute('${MOTION_ATTR}','off');}}` +\n `catch(e){}` +\n `})();`\n );\n}\n","'use client';\n\nimport { Check, Monitor, Moon, Palette, Pause, Sun, Waves } from 'lucide-react';\nimport { useTheme } from 'next-themes';\nimport { useEffect, useRef, useState } from 'react';\n\nimport { cn } from './cn';\nimport { useOcMotion, useOcSkin } from './provider';\n\n/**\n * OcAppearanceMenu — the single header control for ALL appearance settings.\n *\n * One icon button opens a dropdown with both axes:\n * • mode — light / dark / system (next-themes `.dark` class)\n * • theme — the registered skins (data-oc-theme, persisted .ochk.io)\n *\n * Replaces the separate `ThemeToggle` + `OcThemePicker` so every family site\n * carries exactly one appearance control. Self-contained dropdown (no Radix):\n * outside-click + Escape to close. Requires `<OcThemeProvider>` above it (skin\n * axis) and a next-themes `<ThemeProvider>` (mode axis) — both already mounted\n * on every family site.\n */\nexport interface OcAppearanceMenuProps {\n className?: string;\n triggerClassName?: string;\n popoverClassName?: string;\n}\n\nconst MODES = [\n { id: 'light', label: 'light', Icon: Sun },\n { id: 'dark', label: 'dark', Icon: Moon },\n { id: 'system', label: 'system', Icon: Monitor },\n] as const;\n\n/**\n * AppearanceControls — the mode segment + skin list, with no trigger/popover\n * chrome of its own. Embed it anywhere a surface wants to host appearance\n * settings inline (the standalone OcAppearanceMenu popover, the mobile account\n * menu, a site's Sheet drawer). Requires `<OcThemeProvider>` + next-themes\n * above it, like OcAppearanceMenu.\n */\nexport function AppearanceControls({ className }: { className?: string }) {\n const { skin, setSkin, themes } = useOcSkin();\n const { motion, setMotion } = useOcMotion();\n const { theme, setTheme } = useTheme();\n const [mounted, setMounted] = useState(false);\n useEffect(() => setMounted(true), []);\n const activeMode = mounted ? (theme ?? 'system') : null;\n const activeMotion = mounted ? motion : null;\n\n return (\n <div className={className}>\n <div className=\"label-mono text-muted-foreground px-3 pt-3 pb-2\">mode</div>\n <div className=\"grid grid-cols-3 gap-1 px-2 pb-2\">\n {MODES.map(({ id, label, Icon }) => {\n const active = activeMode === id;\n return (\n <button\n key={id}\n type=\"button\"\n role=\"menuitemradio\"\n aria-checked={active}\n onClick={() => setTheme(id)}\n className={cn(\n 'flex flex-col items-center gap-1 rounded-md border py-2 text-[11px] transition-colors',\n active\n ? 'border-primary text-foreground bg-accent'\n : 'border-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground'\n )}\n >\n <Icon className=\"size-4\" aria-hidden />\n {label}\n </button>\n );\n })}\n </div>\n <div className=\"label-mono text-muted-foreground border-t px-3 pt-3 pb-1\">theme</div>\n <ul className=\"pb-1\">\n {themes.map((t) => {\n const active = t.id === skin;\n return (\n <li key={t.id}>\n <button\n type=\"button\"\n role=\"menuitemradio\"\n aria-checked={active}\n onClick={() => setSkin(t.id)}\n className={cn(\n 'hover:bg-accent hover:text-accent-foreground flex w-full items-start gap-2 px-3 py-2 text-left transition-colors',\n active && 'text-foreground'\n )}\n >\n <span className=\"mt-0.5 size-4 shrink-0\">\n {active && <Check className=\"text-primary size-4\" aria-hidden />}\n </span>\n <span className=\"min-w-0\">\n <span className=\"block text-sm font-medium\">{t.label}</span>\n <span className=\"text-muted-foreground block text-xs leading-snug\">\n {t.description}\n </span>\n </span>\n </button>\n </li>\n );\n })}\n </ul>\n <div className=\"label-mono text-muted-foreground border-t px-3 pt-3 pb-2\">\n ambient motion\n </div>\n <div className=\"grid grid-cols-2 gap-1 px-2 pb-3\">\n {(\n [\n { id: 'on', label: 'on', Icon: Waves },\n { id: 'off', label: 'off', Icon: Pause },\n ] as const\n ).map(({ id, label, Icon }) => {\n const active = activeMotion === id;\n return (\n <button\n key={id}\n type=\"button\"\n role=\"menuitemradio\"\n aria-checked={active}\n aria-label={id === 'off' ? 'pause ambient motion' : 'ambient motion on'}\n onClick={() => setMotion(id)}\n className={cn(\n 'flex flex-col items-center gap-1 rounded-md border py-2 text-[11px] transition-colors',\n active\n ? 'border-primary text-foreground bg-accent'\n : 'border-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground'\n )}\n >\n <Icon className=\"size-4\" aria-hidden />\n {label}\n </button>\n );\n })}\n </div>\n </div>\n );\n}\n\nexport function OcAppearanceMenu({\n className,\n triggerClassName,\n popoverClassName,\n}: OcAppearanceMenuProps) {\n const [open, setOpen] = useState(false);\n const rootRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (!open) return;\n function onDown(e: MouseEvent) {\n if (rootRef.current && !rootRef.current.contains(e.target as Node)) setOpen(false);\n }\n function onKey(e: KeyboardEvent) {\n if (e.key === 'Escape') setOpen(false);\n }\n document.addEventListener('mousedown', onDown);\n document.addEventListener('keydown', onKey);\n return () => {\n document.removeEventListener('mousedown', onDown);\n document.removeEventListener('keydown', onKey);\n };\n }, [open]);\n\n return (\n <div ref={rootRef} className={cn('relative', className)}>\n <button\n type=\"button\"\n aria-label=\"appearance settings\"\n aria-haspopup=\"menu\"\n aria-expanded={open}\n title=\"appearance · mode + theme\"\n onClick={() => setOpen((v) => !v)}\n className={cn(\n 'text-muted-foreground hover:text-foreground inline-flex size-9 items-center justify-center rounded-md transition-colors outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50',\n triggerClassName\n )}\n >\n <Palette className=\"size-4\" aria-hidden />\n </button>\n\n {open && (\n <div\n role=\"menu\"\n className={cn(\n 'bg-popover text-popover-foreground absolute right-0 z-50 mt-2 w-64 overflow-hidden rounded-md border shadow-md',\n popoverClassName\n )}\n >\n <AppearanceControls />\n </div>\n )}\n </div>\n );\n}\n","'use client';\n\nimport Link from 'next/link';\nimport { useEffect, useRef, useState, type ReactNode } from 'react';\nimport { Check, Copy, Loader2, Menu, Plus, X } from 'lucide-react';\nimport {\n fetchOcLinkedIdentities,\n useOcSession,\n type DisplayIdentity,\n type DisplayIdentityKind,\n type OcAccountSummary,\n type OcLinkedIdentity,\n type OcSignOutScope,\n} from '@orangecheck/auth-client';\n\nimport { AppearanceControls } from '../tokens/appearance-menu';\nimport { cn } from '../tokens/cn';\nimport type { EcosystemSlug } from './ecosystem-switcher';\nimport { findFamilyProperty, type SiteState } from './family-properties';\n\n/**\n * `<OcAccountMenu>` — the canonical top-right account affordance for\n * every family site. Replaces the older inline-styled `OcAccountChip`\n * from `@orangecheck/auth-client` with a Tailwind-styled, fully\n * configurable, cross-site-aware dropdown.\n *\n * Three explicit visual states:\n *\n * 1. **Pre-hydration / loading** — neutral `sign in` placeholder so\n * the header never goes blank on first paint.\n * 2. **Anonymous / error** — primary-styled `sign in` CTA pointing\n * at the site's local `/signin` (or whatever `signInUrl` you\n * pass).\n * 3. **Authenticated** — pill with a primary-tinted signal dot and\n * shortened did_oc (or display name if set); click → popover\n * with the full did_oc as a one-click copy-to-clipboard row,\n * optional site-specific menu items, family dashboard link,\n * sign-out, and an optional BuildFooter showing site name +\n * version + commit sha → GitHub.\n *\n * Cross-site recognition: the component re-fetches the session on\n * `visibilitychange` and `focus` events, so when a user signs in at a\n * sibling site (ochk.io, attest.ochk.io, etc.) and tabs back, the\n * chip flips from \"sign in\" to \"signed in\" without a hard reload.\n *\n * The component reads `useOcSession()` from `@orangecheck/auth-client`,\n * so the consuming app must mount `<OcSessionProvider>` somewhere in\n * its tree (already standard in every consumer's `_app.tsx`).\n */\n\nexport interface OcAccountMenuItem {\n /** Same-origin path or absolute URL. */\n href: string;\n /** Visible label. */\n label: string;\n /**\n * When `true`, opens in a new tab and renders a ↗ glyph after the\n * label. Use for cross-domain links (e.g. `https://ochk.io/dashboard`).\n */\n external?: boolean;\n}\n\nexport interface OcAccountMenuBuildInfo {\n /** Display version string, e.g. `'0.5.0'` (rendered as `v0.5.0`). */\n version: string;\n /**\n * 7+ character commit SHA. Render as `'dev'` (or omit) for local\n * dev to suppress the GitHub link.\n */\n sha?: string;\n /**\n * GitHub `owner/repo` slug — combined with `sha` to produce the\n * `https://github.com/<repo>/commit/<sha>` link.\n */\n repo?: string;\n}\n\n/**\n * Minimal session shape `<OcAccountMenuView>` needs. Compatible with\n * `useOcSession()`'s return value but explicit so consumers running\n * their own auth context (e.g. oc-www's local `useAuth`) can pass an\n * adapter without depending on `@orangecheck/auth-client`'s exact\n * types.\n */\nexport interface OcAccountMenuSession {\n status: 'loading' | 'authenticated' | 'anonymous' | 'error';\n account: {\n didOc: string;\n displayName: string | null;\n /**\n * The identity the user has promoted as their badge label —\n * `{ kind, value }`, always populated (defaults to the did).\n * Drives the collapsed-trigger label and the active row in the\n * \"show as\" promote list.\n */\n displayIdentity: DisplayIdentity;\n /** The user's Nostr npub, when set — a promotable badge\n * identity that (unlike btc/email) is a profile field, not a\n * linked-identity row, so it is read from the session. */\n nostrNpub?: string | null;\n } | null;\n /**\n * Sign out. Accepts an optional `{ scope }` so the multi-account\n * \"leave this account\" affordance can route through the same hook.\n * Defaults to `'all'` for back-compat.\n */\n signOut: (opts?: { scope?: OcSignOutScope }) => void | Promise<void>;\n refresh: () => void | Promise<void>;\n /**\n * Promote a linked identity to be the badge label across every\n * `.ochk.io` site. The connected `<OcAccountMenu>` wires this to\n * `useOcSession().setDisplayIdentity`; a site running its own auth\n * context passes its own equivalent.\n */\n setDisplayIdentity: (kind: DisplayIdentityKind) => Promise<void>;\n /**\n * Multi-account roster · other accounts in this browser the user\n * can switch to without re-authenticating. Optional: when omitted\n * (or empty), the `§ accounts` section in `<OcAccountMenu>` is\n * suppressed and the menu renders as single-account. Sites that\n * own their auth context (e.g. oc-www's local `useAuth`) can leave\n * this unset until they add multi-account support.\n */\n roster?: OcAccountSummary[];\n /**\n * Multi-account · flip the active session to the given did_oc.\n * Required when `roster` is non-empty (otherwise the picker rows\n * have nowhere to call).\n */\n switchAccount?: (didOc: string) => Promise<void>;\n /**\n * Multi-account · URL for the \"add another account\" entry point.\n * Defaults to `/signin?add=1` when omitted, which works for every\n * `.ochk.io` family site (in-place sign-in supports the query\n * param by default).\n */\n addAccountUrl?: (returnTo?: string) => string;\n /**\n * Per-tab pinning · `true` when this tab holds its own session\n * token and operates as `account` independently of the shared\n * `.ochk.io` cookie (switching accounts in another tab won't\n * change this one). Renders a quiet `· this tab` hint in the\n * signed-in header. Optional — omitted by pre-pinning auth\n * contexts.\n */\n tabPinned?: boolean;\n}\n\nexport interface OcAccountMenuProps {\n /**\n * Which family property this site IS. Used to label the section\n * header (`§ signed in · vault.ochk.io`) and to suppress the\n * family-dashboard menu item when the user is already on `home`.\n */\n current: EcosystemSlug;\n /**\n * Where the anonymous \"sign in\" affordance points. Default `'/signin'`\n * — works with every site's in-place `<OcSignIn>` page. Pass\n * `'https://ochk.io/signin'` if you want to bounce to the auth host\n * instead.\n */\n signInUrl?: string;\n /** Label for the anonymous \"sign in\" affordance. Default `'sign in'`. */\n signInLabel?: string;\n /**\n * Where the browser lands after the user signs out. Default `'/'`\n * — the current site's own home. On sign-out the menu fires\n * `signOut()` (whose logout round-trip is `keepalive`, so it\n * survives the navigation) and *immediately* hard-navigates here.\n *\n * Navigating in the same tick is deliberate: it forecloses the\n * race where an auth-gated page observes the session flip to\n * `anonymous` and runs its own redirect-to-sign-in first. Sign-out\n * means \"leave\", not \"go sign in again\" — so the family default is\n * the site's home, never a sign-in page or the auth host.\n */\n signOutRedirect?: string;\n /**\n * Site-specific menu items, rendered between the section header\n * and the family-dashboard / sign-out rows. Keep this short —\n * 2–6 entries is the sweet spot. Pass `[]` (or omit) for sites\n * with no per-site routes worth surfacing.\n */\n menuItems?: ReadonlyArray<OcAccountMenuItem>;\n /**\n * Centered primary nav links (typically dashboard · docs · spec).\n * Rendered inside the popover at viewport widths below `sm`\n * (640px) — these are the same links the `<OcPrimaryNav>` row\n * shows inline at sm+, but at ultra-small widths the inline row\n * hides and this popover section takes its place. The result: one\n * dropdown surface owns navigation on phones, no separate\n * hamburger drawer required.\n */\n primaryNavLinks?: ReadonlyArray<OcAccountMenuItem>;\n /**\n * Tertiary nav links (about / contact / status / privacy / etc.).\n * Always visible inside the popover. Folds the legacy mobile-only\n * hamburger drawer's contents into the same dropdown as everything\n * else, so there's exactly one nav surface to learn.\n */\n secondaryNavLinks?: ReadonlyArray<OcAccountMenuItem>;\n /**\n * When `true` (default), shows a `family dashboard ↗` link to\n * `https://ochk.io/dashboard`. Set `false` for `home` (already\n * there) or for sites that don't want it.\n */\n showFamilyDashboard?: boolean;\n /**\n * Optional BuildFooter info. When present, renders a tiny mono\n * footer at the bottom of the popover with `site · vX.Y.Z · sha`\n * — the SHA links to the matching GitHub commit when `repo` is\n * also provided. Drive this from your `next.config.ts` via\n * `NEXT_PUBLIC_APP_VERSION` / `NEXT_PUBLIC_BUILD_SHA` env vars.\n */\n build?: OcAccountMenuBuildInfo;\n /**\n * Optional lifecycle chip rendered inside the BuildFooter line\n * (between site and version). Mirrors the chip on the logo so\n * both surfaces agree.\n */\n siteState?: SiteState;\n /** className overrides for layout-level customisation. */\n className?: string;\n triggerClassName?: string;\n popoverClassName?: string;\n}\n\n/**\n * Partially obscure an identity value for display — first 6 characters,\n * an ellipsis, last 4. Applied uniformly to every kind (did, Bitcoin\n * address, email, npub) and at every length, so a rendered label never\n * exposes a full identity at rest; the full value stays one click away\n * via the copy affordance. Short values fall back to a 4/3 split so the\n * middle is always masked.\n */\nfunction obscureIdentity(value: string): string {\n if (value.length <= 12) {\n return `${value.slice(0, 4)}…${value.slice(-3)}`;\n }\n return `${value.slice(0, 6)}…${value.slice(-4)}`;\n}\n\n/** Human label for an identity kind, shown as the trailing tag on each\n * promote row. */\nconst IDENTITY_KIND_LABEL: Record<DisplayIdentityKind, string> = {\n did: 'did:oc',\n btc: 'bitcoin',\n email: 'email',\n nostr: 'nostr',\n};\n\n/**\n * Best-effort clipboard write. Prefers the async Clipboard API (the\n * only thing that works off a user gesture in modern browsers), and\n * falls back to a hidden-`<textarea>` + `execCommand('copy')` for\n * non-secure contexts or older engines. Returns `true` on success so\n * the caller can decide whether to show \"copied\" feedback.\n */\nasync function writeClipboard(text: string): Promise<boolean> {\n try {\n if (navigator.clipboard?.writeText) {\n await navigator.clipboard.writeText(text);\n return true;\n }\n } catch {\n // fall through to the legacy path\n }\n try {\n const ta = document.createElement('textarea');\n ta.value = text;\n ta.setAttribute('readonly', '');\n ta.style.position = 'fixed';\n ta.style.top = '-1000px';\n ta.style.opacity = '0';\n document.body.appendChild(ta);\n ta.select();\n const ok = document.execCommand('copy');\n document.body.removeChild(ta);\n return ok;\n } catch {\n return false;\n }\n}\n\n/**\n * The `did_oc` row inside the popover header, rendered as a single\n * one-click copy affordance. Clicking anywhere on the address copies\n * the full `did_oc` to the clipboard and flips the trailing glyph\n * from a copy icon to a check for ~1.6s. The popover deliberately\n * stays open so the user sees the confirmation. A visually-hidden\n * `aria-live` region announces the result to screen readers.\n *\n * This is the canonical pattern for surfacing a copyable OrangeCheck\n * identity — every family site gets it for free via `<OcAccountMenu>`.\n */\nfunction CopyableDid({ did }: { did: string }) {\n const [copied, setCopied] = useState(false);\n const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n useEffect(\n () => () => {\n if (timerRef.current) clearTimeout(timerRef.current);\n },\n [],\n );\n\n const onCopy = async () => {\n const ok = await writeClipboard(did);\n if (!ok) return;\n setCopied(true);\n if (timerRef.current) clearTimeout(timerRef.current);\n timerRef.current = setTimeout(() => setCopied(false), 1600);\n };\n\n return (\n <button\n type=\"button\"\n onClick={onCopy}\n aria-label={\n copied\n ? 'OrangeCheck identity copied to clipboard'\n : `Copy OrangeCheck identity ${did} to clipboard`\n }\n title=\"Copy identity\"\n data-oc-account-menu-copy-did=\"\"\n data-copied={copied ? '' : undefined}\n className=\"group/did hover:bg-accent focus-visible:ring-ring/60 -mx-1.5 mt-px flex w-[calc(100%+0.75rem)] items-start gap-1.5 rounded px-1.5 py-1 text-left transition-colors focus-visible:ring-2 focus-visible:outline-none\"\n >\n <span className=\"text-foreground/90 min-w-0 flex-1 font-mono text-[11px] leading-tight break-all\">\n {did}\n </span>\n <span\n className={\n 'mt-px shrink-0 transition-colors ' +\n (copied\n ? 'text-primary'\n : 'text-muted-foreground/50 group-hover/did:text-foreground/80')\n }\n aria-hidden\n >\n {copied ? <Check className=\"size-3.5\" /> : <Copy className=\"size-3.5\" />}\n </span>\n <span className=\"sr-only\" aria-live=\"polite\">\n {copied ? 'Copied to clipboard' : ''}\n </span>\n </button>\n );\n}\n\n/**\n * One row in the \"§ show as\" list — a promote control and an\n * independent copy-to-clipboard affordance.\n *\n * The value is always rendered partially obscured (`obscureIdentity`).\n * The row body is a radio that promotes this identity to the badge\n * label; the trailing copy button writes the *full* value to the\n * clipboard via the same `writeClipboard` path as the did row (async\n * Clipboard API, hidden-`<textarea>` fallback — works on touch devices\n * and non-secure contexts). Copy and promote are deliberately separate\n * controls: one selects the identity, the other extracts it.\n */\nfunction PromoteRow({\n kind,\n value,\n active,\n busy,\n disabled,\n onPromote,\n}: {\n kind: DisplayIdentityKind;\n value: string;\n active: boolean;\n busy: boolean;\n disabled: boolean;\n onPromote: () => void;\n}) {\n const [copied, setCopied] = useState(false);\n const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n useEffect(\n () => () => {\n if (timerRef.current) clearTimeout(timerRef.current);\n },\n [],\n );\n\n const onCopy = async () => {\n const ok = await writeClipboard(value);\n if (!ok) return;\n setCopied(true);\n if (timerRef.current) clearTimeout(timerRef.current);\n timerRef.current = setTimeout(() => setCopied(false), 1600);\n };\n\n const kindLabel = IDENTITY_KIND_LABEL[kind];\n\n return (\n <div\n className=\"hover:bg-accent flex items-center gap-1 pr-2 transition-colors\"\n data-oc-account-menu-promote-row={kind}\n data-active={active ? '' : undefined}\n >\n <button\n type=\"button\"\n role=\"menuitemradio\"\n aria-checked={active}\n aria-label={active ? `Showing as ${kindLabel}` : `Show as ${kindLabel}`}\n disabled={disabled || active}\n onClick={onPromote}\n data-oc-account-menu-promote={kind}\n className=\"flex min-w-0 flex-1 items-center gap-2 py-2 pl-3 text-left font-mono text-[11px] tracking-wide disabled:cursor-default\"\n >\n <span\n className={\n 'flex size-3.5 shrink-0 items-center justify-center rounded-full border ' +\n (active ? 'border-primary' : 'border-muted-foreground/40')\n }\n aria-hidden\n >\n {active ? <span className=\"bg-primary size-1.5 rounded-full\" /> : null}\n </span>\n <span className=\"text-foreground/90 min-w-0 flex-1 truncate\">\n {obscureIdentity(value)}\n </span>\n </button>\n <button\n type=\"button\"\n onClick={() => void onCopy()}\n aria-label={\n copied ? `${kindLabel} copied to clipboard` : `Copy ${kindLabel} to clipboard`\n }\n title=\"Copy\"\n data-oc-account-menu-promote-copy={kind}\n data-copied={copied ? '' : undefined}\n className=\"hover:bg-background/70 focus-visible:ring-ring/60 flex size-6 shrink-0 items-center justify-center rounded transition-colors focus-visible:ring-2 focus-visible:outline-none\"\n >\n {copied ? (\n <Check className=\"text-primary size-3.5\" />\n ) : (\n <Copy className=\"text-muted-foreground/50 size-3.5\" />\n )}\n </button>\n <span className=\"text-muted-foreground/50 w-14 shrink-0 text-right text-[9px] tracking-widest uppercase\">\n {busy ? <Loader2 className=\"ml-auto size-3 animate-spin\" /> : kindLabel}\n </span>\n <span className=\"sr-only\" aria-live=\"polite\">\n {copied ? 'Copied to clipboard' : ''}\n </span>\n </div>\n );\n}\n\n/**\n * The \"§ show as\" block inside the popover — lists the user's\n * identities and lets them promote one as the badge label across\n * every `.ochk.io` site.\n *\n * The did is always an option (read from the session); the npub too\n * when set. The Bitcoin address and email are *linked identities*, so\n * they're lazy-fetched from the auth host the first time the popover\n * opens — `fetchOcLinkedIdentities()` is one credentialed request,\n * cached for the menu's lifetime. The section renders only once that\n * resolves and only when there are ≥2 identities worth choosing\n * between; with a single identity there is nothing to promote.\n *\n * Promotion calls `setDisplayIdentity(kind)` — which PATCHes the auth\n * host, re-mints the cross-subdomain cookie, and refreshes the session\n * — so the selected row and the collapsed label update in place and\n * every other family tab picks the choice up on its next focus.\n */\nfunction IdentityPromoteSection({\n didOc,\n nostrNpub,\n current,\n open,\n setDisplayIdentity,\n}: {\n didOc: string;\n nostrNpub: string | null;\n current: DisplayIdentity;\n open: boolean;\n setDisplayIdentity: (kind: DisplayIdentityKind) => Promise<void>;\n}) {\n const [identities, setIdentities] = useState<OcLinkedIdentity[] | null>(null);\n const [loadFailed, setLoadFailed] = useState(false);\n const [promoting, setPromoting] = useState<DisplayIdentityKind | null>(null);\n const [promoteErr, setPromoteErr] = useState<string | null>(null);\n // Track the (open-state, account) we last fetched for. Refetch when\n // didOc changes — multi-account switches swap which account's linked\n // identities should appear here, and stale data manifested as the\n // popover visibly reflowing mid-switch (\"dropdown freaking out\").\n const lastFetchKeyRef = useRef<string | null>(null);\n\n useEffect(() => {\n if (!open) return;\n // Fetch on first open AND whenever the active didOc changes.\n if (lastFetchKeyRef.current === didOc) return;\n lastFetchKeyRef.current = didOc;\n let cancelled = false;\n // Reset so the section briefly returns null (suppresses flash)\n // until the new account's identities resolve.\n setIdentities(null);\n setLoadFailed(false);\n void fetchOcLinkedIdentities()\n .then((rows) => {\n if (!cancelled) setIdentities(rows);\n })\n .catch(() => {\n if (!cancelled) setLoadFailed(true);\n });\n return () => {\n cancelled = true;\n };\n }, [open, didOc]);\n\n // Wait for the fetch to settle before rendering — avoids a section\n // that flashes in then vanishes.\n if (identities === null && !loadFailed) return null;\n\n const btc =\n identities?.find((i) => i.kind === 'btc' && i.is_primary && i.value) ??\n identities?.find((i) => i.kind === 'btc' && i.value);\n const email =\n identities?.find((i) => i.kind === 'email' && i.is_primary && i.value) ??\n identities?.find((i) => i.kind === 'email' && i.value);\n\n const options: Array<{ kind: DisplayIdentityKind; value: string }> = [\n { kind: 'did', value: didOc },\n ];\n if (btc?.value) options.push({ kind: 'btc', value: btc.value });\n if (email?.value) options.push({ kind: 'email', value: email.value });\n if (nostrNpub) options.push({ kind: 'nostr', value: nostrNpub });\n\n // Nothing to choose between → no section.\n if (options.length < 2) return null;\n\n const promote = async (kind: DisplayIdentityKind) => {\n if (promoting || kind === current.kind) return;\n setPromoting(kind);\n setPromoteErr(null);\n try {\n await setDisplayIdentity(kind);\n } catch (e) {\n setPromoteErr(e instanceof Error ? e.message : 'promotion failed');\n } finally {\n setPromoting(null);\n }\n };\n\n return (\n <div className=\"border-border border-b p-1\" data-oc-account-menu-section=\"show-as\">\n <div className=\"text-muted-foreground/60 px-3 pt-2 pb-1 font-mono text-[10px] tracking-widest uppercase\">\n § show as\n </div>\n {options.map((opt) => (\n <PromoteRow\n key={opt.kind}\n kind={opt.kind}\n value={opt.value}\n active={opt.kind === current.kind}\n busy={promoting === opt.kind}\n disabled={promoting !== null}\n onPromote={() => void promote(opt.kind)}\n />\n ))}\n {promoteErr ? (\n <div className=\"text-destructive/80 px-3 pt-1 pb-2 font-mono text-[10px]\">\n {promoteErr}\n </div>\n ) : null}\n </div>\n );\n}\n\n/**\n * Connected variant — pulls the session from `useOcSession()`. This is\n * what every consumer site with `<OcSessionProvider>` mounted should\n * use. For sites running a parallel auth context (e.g. oc-www's local\n * `useAuth`), use `<OcAccountMenuView>` below and pass a session prop\n * directly.\n */\nexport function OcAccountMenu(props: OcAccountMenuProps) {\n const session = useOcSession();\n return (\n <OcAccountMenuView\n {...props}\n session={{\n status: session.status,\n account: session.account\n ? {\n didOc: session.account.didOc,\n displayName: session.account.displayName ?? null,\n displayIdentity: session.account.displayIdentity,\n nostrNpub: session.account.nostrNpub ?? null,\n }\n : null,\n signOut: session.signOut,\n refresh: session.refresh,\n setDisplayIdentity: session.setDisplayIdentity,\n // Multi-account · the connected variant always forwards\n // these from useOcSession(). The View variant accepts\n // them as optional so sites running their own auth\n // context (oc-www) can opt in incrementally.\n roster: session.roster,\n switchAccount: session.switchAccount,\n addAccountUrl: session.addAccountUrl,\n // Structural read keeps the auth-client peer floor at\n // ^2.17.0 — `tabPinned` ships in 2.18.0 and is simply\n // undefined (no hint) on older providers.\n tabPinned: (session as { tabPinned?: boolean }).tabPinned,\n }}\n />\n );\n}\n\nexport interface OcAccountMenuViewProps extends OcAccountMenuProps {\n /**\n * The session to render. When using `<OcAccountMenuView>` directly\n * (rather than the connected `<OcAccountMenu>`), pass an adapter\n * over your local auth context.\n */\n session: OcAccountMenuSession;\n}\n\n/**\n * Presentational variant — takes a session as an explicit prop. Use\n * this when your site runs its own auth context (e.g. ochk.io's\n * local `useAuth`) and you want the family-consistent visual without\n * mounting `<OcSessionProvider>`.\n */\n/**\n * MobileMenu — the `☰` rendered to the LEFT of the identity chip on phones\n * (`md:hidden`). Holds the site's nav links (primary + secondary) and the\n * appearance controls (mode + skin), so the mobile header is just\n * `[☰][identity]` with the theme folded in — no centered hamburger, no\n * standalone palette. Auth-independent: present whether signed in or out.\n */\nfunction MobileMenu({\n primary,\n secondary,\n}: {\n primary?: ReadonlyArray<OcAccountMenuItem>;\n secondary?: ReadonlyArray<OcAccountMenuItem>;\n}) {\n const [open, setOpen] = useState(false);\n const ref = useRef<HTMLDivElement | null>(null);\n\n useEffect(() => {\n if (!open) return;\n const onClick = (e: MouseEvent) => {\n if (ref.current && !ref.current.contains(e.target as Node)) setOpen(false);\n };\n const onKey = (e: KeyboardEvent) => {\n if (e.key === 'Escape') setOpen(false);\n };\n document.addEventListener('mousedown', onClick);\n document.addEventListener('keydown', onKey);\n return () => {\n document.removeEventListener('mousedown', onClick);\n document.removeEventListener('keydown', onKey);\n };\n }, [open]);\n\n const links = [...(primary ?? []), ...(secondary ?? [])];\n const rowCls =\n 'font-display flex items-center gap-2 px-3 py-2 text-[12px] font-semibold tracking-wider uppercase text-muted-foreground hover:text-foreground hover:bg-accent transition-colors';\n\n return (\n <div ref={ref} className=\"relative md:hidden\" data-oc-account-mobile-menu=\"\">\n <button\n type=\"button\"\n onClick={() => setOpen((v) => !v)}\n aria-haspopup=\"menu\"\n aria-expanded={open}\n aria-label=\"menu\"\n className=\"border-input bg-background hover:bg-accent text-muted-foreground inline-flex size-8 items-center justify-center rounded-md border transition-colors\"\n data-oc-account-mobile-toggle=\"\"\n >\n {open ? <X className=\"size-4\" aria-hidden /> : <Menu className=\"size-4\" aria-hidden />}\n </button>\n {open && (\n <div\n role=\"menu\"\n aria-label=\"menu\"\n className=\"border-border bg-popover text-popover-foreground absolute top-[calc(100%+6px)] right-0 z-50 w-[min(16rem,calc(100vw-1rem))] overflow-hidden border shadow-xl\"\n data-oc-account-mobile-popover=\"\"\n >\n {links.length > 0 && (\n <div className=\"border-b p-1\">\n <div className=\"text-muted-foreground/60 px-3 pt-2 pb-1 font-mono text-[10px] tracking-widest uppercase\">\n § navigate\n </div>\n {links.map((l) =>\n l.external ? (\n <a\n key={l.href}\n href={l.href}\n target=\"_blank\"\n rel=\"noreferrer\"\n role=\"menuitem\"\n onClick={() => setOpen(false)}\n className={rowCls}\n >\n <span className=\"text-muted-foreground\" aria-hidden>\n →\n </span>\n <span className=\"flex-1\">{l.label}</span>\n <span className=\"text-muted-foreground/70 text-[10px]\" aria-hidden>\n ↗\n </span>\n </a>\n ) : (\n <Link\n key={l.href}\n href={l.href}\n role=\"menuitem\"\n onClick={() => setOpen(false)}\n className={rowCls}\n >\n <span className=\"text-muted-foreground\" aria-hidden>\n →\n </span>\n <span className=\"flex-1\">{l.label}</span>\n </Link>\n )\n )}\n </div>\n )}\n <AppearanceControls />\n </div>\n )}\n </div>\n );\n}\n\nexport function OcAccountMenuView({\n current,\n signInUrl = '/signin',\n signInLabel = 'sign in',\n signOutRedirect = '/',\n menuItems,\n primaryNavLinks,\n secondaryNavLinks,\n showFamilyDashboard,\n build,\n siteState,\n className,\n triggerClassName,\n popoverClassName,\n session,\n}: OcAccountMenuViewProps) {\n const {\n status,\n account,\n signOut,\n refresh,\n setDisplayIdentity,\n roster,\n switchAccount,\n addAccountUrl,\n tabPinned,\n } = session;\n const [hydrated, setHydrated] = useState(false);\n const [open, setOpen] = useState(false);\n const wrapRef = useRef<HTMLDivElement | null>(null);\n\n const property = findFamilyProperty(current);\n const hostname = property?.hostname ?? `${current}.ochk.io`;\n const isHome = current === 'home';\n const familyDashboardEnabled = showFamilyDashboard ?? !isHome;\n\n useEffect(() => setHydrated(true), []);\n\n // Cross-site sign-in pickup: re-fetch on visibility / focus.\n useEffect(() => {\n const onWake = () => {\n if (document.visibilityState === 'visible') void refresh();\n };\n const onFocus = () => void refresh();\n document.addEventListener('visibilitychange', onWake);\n window.addEventListener('focus', onFocus);\n return () => {\n document.removeEventListener('visibilitychange', onWake);\n window.removeEventListener('focus', onFocus);\n };\n }, [refresh]);\n\n // Outside-click + Escape close.\n useEffect(() => {\n if (!open) return;\n const onClick = (e: MouseEvent) => {\n if (wrapRef.current && !wrapRef.current.contains(e.target as Node)) setOpen(false);\n };\n const onKey = (e: KeyboardEvent) => {\n if (e.key === 'Escape') setOpen(false);\n };\n document.addEventListener('mousedown', onClick);\n document.addEventListener('keydown', onKey);\n return () => {\n document.removeEventListener('mousedown', onClick);\n document.removeEventListener('keydown', onKey);\n };\n }, [open]);\n\n const signInTrigger = (\n <a\n href={signInUrl}\n aria-label={signInLabel}\n data-oc-account-menu-signin=\"\"\n className={\n triggerClassName ??\n 'border-input bg-background hover:bg-accent inline-flex h-8 items-center justify-center rounded-md border px-3 font-mono text-[11px] font-semibold tracking-widest uppercase transition-colors'\n }\n >\n {signInLabel}\n </a>\n );\n\n // The mobile `☰` (nav + appearance) sits to the LEFT of the identity slot\n // on phones; on md+ it's hidden (nav is inline via OcPrimaryNav, appearance\n // is the desktop palette). Only rendered when this site has nav links.\n const hasNav = ((primaryNavLinks?.length ?? 0) + (secondaryNavLinks?.length ?? 0)) > 0;\n const wrap = (identity: ReactNode) => (\n <div className={cn('flex items-center gap-1', className)} data-oc-account-menu=\"\">\n {hasNav ? <MobileMenu primary={primaryNavLinks} secondary={secondaryNavLinks} /> : null}\n {identity}\n </div>\n );\n\n // States 1 + 2: pre-hydration or anonymous — render the same\n // placeholder/CTA so the slot is never empty.\n if (!hydrated || status === 'loading') {\n return wrap(signInTrigger);\n }\n\n if (status !== 'authenticated' || !account) {\n return wrap(signInTrigger);\n }\n\n // Authenticated — pill + popover. The collapsed label is the\n // user's vanity display name if they set one, otherwise the\n // identity they promoted (`displayIdentity` — defaults to their\n // sign-in identity, ultimately the did).\n const displayName = account.displayName ?? null;\n const label = displayName ?? obscureIdentity(account.displayIdentity.value);\n\n return wrap(\n <div ref={wrapRef} className=\"relative inline-block\">\n <button\n type=\"button\"\n onClick={() => setOpen((v) => !v)}\n aria-haspopup=\"menu\"\n aria-expanded={open}\n aria-label={`Signed in as ${account.didOc}. Open account menu.`}\n className={\n triggerClassName ??\n 'border-primary/40 bg-card hover:bg-accent inline-flex h-8 items-center gap-1.5 rounded-md border px-2 font-mono text-[11px] tracking-wide transition-colors sm:px-3'\n }\n data-oc-account-menu-trigger=\"\"\n >\n <span className=\"bg-primary inline-block size-1.5 shrink-0 rounded-full\" aria-hidden />\n {/* Below sm the chip condenses to dot + chevron only — a long\n display name / obscured did otherwise eats a phone header.\n The full label returns from sm up, capped so it can't blow\n out the row. */}\n <span className=\"text-foreground hidden max-w-[16ch] truncate sm:inline\">\n {label}\n </span>\n <svg\n width=\"9\"\n height=\"9\"\n viewBox=\"0 0 10 10\"\n aria-hidden\n className={\n 'opacity-60 transition-transform ' + (open ? 'rotate-180' : 'rotate-0')\n }\n >\n <path\n d=\"M2 4 L5 7 L8 4\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n fill=\"none\"\n strokeLinecap=\"round\"\n />\n </svg>\n </button>\n\n {open && (\n <div\n role=\"menu\"\n aria-label=\"Account menu\"\n className={\n popoverClassName ??\n 'border-border bg-popover text-popover-foreground absolute top-[calc(100%+6px)] right-0 z-50 w-[min(20rem,calc(100vw-1rem))] border shadow-xl'\n }\n data-oc-account-menu-popover=\"\"\n >\n <div className=\"border-border border-b p-3\">\n <div className=\"text-primary mb-1 font-mono text-[10px] tracking-widest uppercase\">\n § signed in · {hostname}\n {tabPinned ? (\n <span\n className=\"text-muted-foreground/70 normal-case\"\n data-oc-account-menu-tab-pin=\"\"\n title=\"This tab keeps this account even if you switch accounts in another tab\"\n >\n {' '}\n · this tab\n </span>\n ) : null}\n </div>\n <CopyableDid did={account.didOc} />\n {/* Which identity this account actually IS (email /\n bitcoin / nostr) — surfaced next to the did so a tab\n signed into a DIFFERENT account than your other tabs\n is obvious at a glance, not buried behind the did.\n The did itself already shows above; skip the\n redundant did kind. */}\n {account.displayIdentity.kind !== 'did' &&\n account.displayIdentity.value ? (\n <div className=\"mt-1 flex items-center gap-1.5 font-mono text-[10px] tracking-wide\">\n <span className=\"text-muted-foreground/50 uppercase\">\n {IDENTITY_KIND_LABEL[account.displayIdentity.kind]}\n </span>\n <span className=\"text-foreground/75\">\n {obscureIdentity(account.displayIdentity.value)}\n </span>\n </div>\n ) : null}\n {displayName ? (\n <div className=\"text-muted-foreground/80 mt-1 font-mono text-[10px] tracking-wide\">\n {displayName}\n </div>\n ) : null}\n </div>\n\n <IdentityPromoteSection\n didOc={account.didOc}\n nostrNpub={account.nostrNpub ?? null}\n current={account.displayIdentity}\n open={open}\n setDisplayIdentity={setDisplayIdentity}\n />\n\n <AccountsSection\n roster={roster ?? []}\n switchAccount={switchAccount}\n addAccountUrl={addAccountUrl}\n signOut={signOut}\n onActionStart={() => setOpen(false)}\n />\n\n {primaryNavLinks && primaryNavLinks.length > 0 ? (\n <PopoverSection\n label=\"navigate\"\n items={primaryNavLinks}\n onItemClick={() => setOpen(false)}\n className=\"hidden md:block\"\n />\n ) : null}\n\n <div className=\"p-1\" data-oc-account-menu-section=\"account\">\n {menuItems?.map((item) => {\n const onClick = () => setOpen(false);\n const cls =\n 'hover:bg-accent flex items-center gap-2 px-3 py-2 font-mono text-[11px] tracking-wide transition-colors';\n const inner = (\n <>\n <span className=\"text-muted-foreground\" aria-hidden>\n →\n </span>\n <span className=\"flex-1\">{item.label}</span>\n {item.external ? (\n <span\n className=\"text-muted-foreground/70 text-[10px]\"\n aria-hidden\n >\n ↗\n </span>\n ) : null}\n </>\n );\n return item.external ? (\n <a\n key={item.href}\n href={item.href}\n target=\"_blank\"\n rel=\"noreferrer\"\n onClick={onClick}\n role=\"menuitem\"\n className={cls}\n data-oc-account-menu-item=\"\"\n >\n {inner}\n </a>\n ) : (\n <Link\n key={item.href}\n href={item.href}\n onClick={onClick}\n role=\"menuitem\"\n className={cls}\n data-oc-account-menu-item=\"\"\n >\n {inner}\n </Link>\n );\n })}\n\n {familyDashboardEnabled ? (\n <a\n href=\"https://ochk.io/dashboard\"\n target=\"_blank\"\n rel=\"noreferrer\"\n onClick={() => setOpen(false)}\n role=\"menuitem\"\n className=\"hover:bg-accent flex items-center gap-2 px-3 py-2 font-mono text-[11px] tracking-wide transition-colors\"\n data-oc-account-menu-item=\"\"\n data-oc-account-menu-family-dashboard=\"\"\n >\n <span className=\"text-muted-foreground\" aria-hidden>\n →\n </span>\n <span className=\"flex-1\">family dashboard</span>\n <span\n className=\"text-muted-foreground/70 text-[10px]\"\n aria-hidden\n >\n ↗\n </span>\n </a>\n ) : null}\n\n <button\n type=\"button\"\n role=\"menuitem\"\n onClick={() => {\n setOpen(false);\n // Await the logout round-trip — its response is\n // what clears the `.ochk.io` cookie — and only\n // THEN hard-navigate home. Navigating first\n // (the old behavior) raced the next page's\n // session check against the still-uncleared\n // cookie, so the account badge stayed \"signed\n // in\" until a second sign-out. The hard\n // navigation is a committed browser navigation,\n // so it still wins over any auth-gated page's\n // redirect-to-sign-in effect.\n void (async () => {\n await signOut();\n if (typeof window !== 'undefined') {\n window.location.assign(signOutRedirect);\n }\n })();\n }}\n className=\"hover:bg-accent flex w-full items-center gap-2 px-3 py-2 text-left font-mono text-[11px] tracking-wide transition-colors\"\n data-oc-account-menu-item=\"\"\n data-oc-account-menu-signout=\"\"\n >\n <span className=\"text-muted-foreground\" aria-hidden>\n →\n </span>\n <span className=\"flex-1\">sign out</span>\n </button>\n </div>\n\n {secondaryNavLinks && secondaryNavLinks.length > 0 ? (\n <PopoverSection\n label=\"more\"\n items={secondaryNavLinks}\n onItemClick={() => setOpen(false)}\n bordered\n className=\"hidden md:block\"\n />\n ) : null}\n\n {build ? <BuildFooter hostname={hostname} build={build} state={siteState} /> : null}\n </div>\n )}\n </div>\n );\n}\n\n/**\n * Multi-account · `§ accounts` section. Lists the other accounts the\n * user has signed into in this browser (the roster), lets them switch\n * with one click, surfaces an \"Add another account\" entry point that\n * routes through `addAccountUrl()` (the auth host preserves the\n * current roster_id when signing in via `?add=1`), and adapts the\n * sign-out affordance to support `scope: 'current'` per row.\n *\n * Gate: the whole section is suppressed when `addAccountUrl` isn't\n * provided. That's the back-compat signal for sites running a parallel\n * auth context (e.g. oc-www's local `useAuth`) — they can adopt\n * multi-account incrementally by wiring the new props on\n * `OcAccountMenuSession` as they build out support.\n */\nfunction AccountsSection({\n roster,\n switchAccount,\n addAccountUrl,\n signOut,\n onActionStart,\n}: {\n roster: OcAccountSummary[];\n switchAccount: ((didOc: string) => Promise<void>) | undefined;\n addAccountUrl: ((returnTo?: string) => string) | undefined;\n signOut: (opts?: { scope?: OcSignOutScope }) => void | Promise<void>;\n onActionStart: () => void;\n}) {\n const [switching, setSwitching] = useState<string | null>(null);\n const [err, setErr] = useState<string | null>(null);\n\n if (!addAccountUrl) return null;\n\n const onSwitch = async (didOc: string) => {\n if (!switchAccount || switching) return;\n setSwitching(didOc);\n setErr(null);\n try {\n await switchAccount(didOc);\n // Keep the menu open just long enough for the active label\n // to flip; the surrounding popover-close-on-outside-click\n // will pick up the user's next interaction.\n } catch (e) {\n setErr(e instanceof Error ? e.message : 'switch failed');\n } finally {\n setSwitching(null);\n }\n };\n\n return (\n <div className=\"border-border border-b p-1\" data-oc-account-menu-section=\"accounts\">\n <div className=\"text-muted-foreground/60 px-3 pt-2 pb-1 font-mono text-[10px] tracking-widest uppercase\">\n § accounts\n </div>\n {roster.map((peer) => (\n <SwitchRow\n key={peer.didOc}\n peer={peer}\n busy={switching === peer.didOc}\n disabled={switching !== null}\n onSwitch={() => void onSwitch(peer.didOc)}\n />\n ))}\n <a\n href={addAccountUrl()}\n onClick={() => onActionStart()}\n role=\"menuitem\"\n data-oc-account-menu-add-account=\"\"\n className=\"hover:bg-accent flex items-center gap-2 px-3 py-2 font-mono text-[11px] tracking-wide transition-colors\"\n >\n <Plus className=\"text-muted-foreground size-3.5 shrink-0\" aria-hidden />\n <span className=\"flex-1\">\n {roster.length === 0 ? 'add another account' : 'add another'}\n </span>\n </a>\n {/* \"leave this account\" only makes sense WITH peers in the\n * roster — without them, scope='current' degrades to scope='all'\n * and the parent menu's bottom \"sign out\" row already covers\n * that case. Rendering both produces two identical sign-out\n * affordances; gate on peer count to suppress the duplicate. */}\n {roster.length > 0 ? (\n <button\n type=\"button\"\n role=\"menuitem\"\n onClick={() => {\n onActionStart();\n void (async () => {\n try {\n await signOut({ scope: 'current' });\n } catch {\n // local state still flips · cookie may not\n }\n // No hard-nav · `scope: 'current'` with peers\n // in the roster keeps the browser signed-in to\n // the next-best account; the refresh() inside\n // signOut updates the badge in place.\n })();\n }}\n data-oc-account-menu-leave-current=\"\"\n className=\"hover:bg-accent flex w-full items-center gap-2 px-3 py-2 text-left font-mono text-[11px] tracking-wide transition-colors\"\n >\n <span className=\"text-muted-foreground\" aria-hidden>\n →\n </span>\n <span className=\"flex-1\">leave this account</span>\n </button>\n ) : null}\n {err ? (\n <div className=\"text-destructive/80 px-3 pt-1 pb-2 font-mono text-[10px]\">\n {err}\n </div>\n ) : null}\n </div>\n );\n}\n\n/**\n * One row in `§ accounts` — a switch-target peer. Clicking the body\n * calls `onSwitch`; while in-flight the row shows a spinner and the\n * other rows in the list are disabled.\n */\nfunction SwitchRow({\n peer,\n busy,\n disabled,\n onSwitch,\n}: {\n peer: OcAccountSummary;\n busy: boolean;\n disabled: boolean;\n onSwitch: () => void;\n}) {\n const label = peer.displayName ?? obscureIdentity(peer.displayIdentity.value);\n const kindLabel = IDENTITY_KIND_LABEL[peer.displayIdentity.kind];\n return (\n <button\n type=\"button\"\n role=\"menuitemradio\"\n aria-checked={false}\n aria-label={`Switch to ${peer.didOc}`}\n disabled={disabled}\n onClick={onSwitch}\n data-oc-account-menu-switch-row=\"\"\n className=\"hover:bg-accent flex w-full items-center gap-2 px-3 py-2 text-left font-mono text-[11px] tracking-wide transition-colors disabled:cursor-default\"\n >\n <span\n className=\"border-muted-foreground/40 flex size-3.5 shrink-0 items-center justify-center rounded-full border\"\n aria-hidden\n />\n <span className=\"text-foreground/90 min-w-0 flex-1 truncate\">{label}</span>\n <span className=\"text-muted-foreground/50 w-14 shrink-0 text-right text-[9px] tracking-widest uppercase\">\n {busy ? <Loader2 className=\"ml-auto size-3 animate-spin\" /> : kindLabel}\n </span>\n </button>\n );\n}\n\n/**\n * Single nav section inside the identity popover (e.g. `§ navigate`, `§ more`).\n * Rendered DESKTOP-ONLY (`hidden md:block`) by callers: on mobile the same\n * links live in the account menu's `☰`, so showing them here too would double\n * up. On desktop it's the nav home for console sites that have no inline\n * OcPrimaryNav.\n */\nfunction PopoverSection({\n label,\n items,\n onItemClick,\n bordered,\n className,\n}: {\n label: string;\n items: ReadonlyArray<OcAccountMenuItem>;\n onItemClick: () => void;\n bordered?: boolean;\n className?: string;\n}) {\n const cls =\n 'hover:bg-accent flex items-center gap-2 px-3 py-2 font-mono text-[11px] tracking-wide transition-colors';\n return (\n <div\n className={cn('p-1', bordered && 'border-border border-t', className)}\n data-oc-account-menu-section={label}\n >\n <div className=\"text-muted-foreground/60 px-3 pt-2 pb-1 font-mono text-[10px] tracking-widest uppercase\">\n § {label}\n </div>\n {items.map((item) =>\n item.external ? (\n <a\n key={item.href}\n href={item.href}\n target=\"_blank\"\n rel=\"noreferrer\"\n onClick={onItemClick}\n role=\"menuitem\"\n className={cls}\n data-oc-account-menu-item=\"\"\n >\n <span className=\"text-muted-foreground\" aria-hidden>\n →\n </span>\n <span className=\"flex-1\">{item.label}</span>\n <span className=\"text-muted-foreground/70 text-[10px]\" aria-hidden>\n ↗\n </span>\n </a>\n ) : (\n <Link\n key={item.href}\n href={item.href}\n onClick={onItemClick}\n role=\"menuitem\"\n className={cls}\n data-oc-account-menu-item=\"\"\n >\n <span className=\"text-muted-foreground\" aria-hidden>\n →\n </span>\n <span className=\"flex-1\">{item.label}</span>\n </Link>\n )\n )}\n </div>\n );\n}\n\nfunction BuildFooter({\n hostname,\n build,\n state,\n}: {\n hostname: string;\n build: OcAccountMenuBuildInfo;\n state?: SiteState;\n}) {\n const sha = build.sha;\n const showSha = !!sha && sha !== 'dev';\n const commitUrl = showSha && build.repo ? `https://github.com/${build.repo}/commit/${sha}` : null;\n return (\n <div\n className=\"text-muted-foreground/60 border-border border-t px-3 py-2 font-mono text-[9.5px] tracking-widest uppercase\"\n data-oc-account-menu-build=\"\"\n >\n {hostname}\n {state && state !== 'live' ? (\n <>\n {' · '}\n <span className=\"text-muted-foreground/80\">{state}</span>\n </>\n ) : null}{' '}\n <span className=\"text-muted-foreground/80\">\n v{build.version}\n {showSha ? (\n <>\n {' · '}\n {commitUrl ? (\n <a\n href={commitUrl}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"hover:text-foreground/90 underline decoration-dotted underline-offset-2\"\n >\n {sha}\n </a>\n ) : (\n sha\n )}\n </>\n ) : null}\n </span>\n </div>\n );\n}\n","\"use client\";\n\nimport Link from \"next/link\";\nimport type { ReactNode } from \"react\";\n\n/**\n * `<OcPrimaryNav>` — the centered link row in every family site's\n * `<LayoutHeader>`. Replaces the per-site bespoke `<nav>` blocks.\n *\n * **Desktop-only.** The inline row shows at `md+`; below that it is hidden,\n * because on mobile the same links live in the account menu's `☰` drawer\n * (`OcAccountMenu`, rendered to the left of the identity chip) — one shared\n * mobile-nav pattern, no centered hamburger, no per-site fork.\n *\n * Active item is `text-primary`; siblings are muted. Active affordance is\n * text-only (no underline / bottom stripe) — deliberately restrained.\n *\n * **Usage:**\n *\n * <OcPrimaryNav\n * activePath={router.pathname}\n * links={[\n * { href: '/dashboard', label: 'dashboard' },\n * { href: 'https://docs.ochk.io/attest', label: 'docs', external: true },\n * ]}\n * />\n */\n\nexport interface OcPrimaryNavLink {\n /** Same-origin path or absolute URL. */\n href: string;\n /** Visible label · lowercase preferred (the chip styling applies tracking + uppercase). */\n label: string;\n /** When true, opens in a new tab and skips the `isActive` check. */\n external?: boolean;\n /** Optional override for the active-match. By default the link is\n * active when `activePath === href` or `activePath.startsWith(href + '/')`. */\n matchExact?: boolean;\n}\n\nexport interface OcPrimaryNavProps {\n /** Current router pathname for active-link highlight. */\n activePath: string;\n /** Link set. Keep to 2–5 entries. */\n links: ReadonlyArray<OcPrimaryNavLink>;\n /** className for the outer container. */\n className?: string;\n}\n\nfunction isActive(pathname: string, link: OcPrimaryNavLink): boolean {\n if (link.external) return false;\n if (link.matchExact) return pathname === link.href;\n if (link.href === \"/\") return pathname === \"/\";\n return pathname === link.href || pathname.startsWith(link.href + \"/\");\n}\n\nexport function OcPrimaryNav({\n activePath,\n links,\n className,\n}: OcPrimaryNavProps) {\n return (\n <nav\n aria-label=\"primary\"\n className={\n \"hidden items-center gap-0.5 sm:gap-1 md:flex \" + (className ?? \"\")\n }\n data-oc-primary-nav=\"\"\n >\n {links.map((link) => {\n const active = isActive(activePath, link);\n const cls =\n \"font-display shrink-0 px-2 py-1 sm:px-3 text-[11px] sm:text-[12px] font-semibold tracking-wider uppercase transition-colors \" +\n (active\n ? \"text-primary\"\n : \"text-muted-foreground hover:text-foreground\");\n const content: ReactNode = (\n <>\n {link.label}\n {link.external ? (\n <span\n aria-hidden\n className=\"text-muted-foreground/60 ml-1 text-[9px]\"\n >\n ↗\n </span>\n ) : null}\n </>\n );\n return link.external ? (\n <a\n key={link.href}\n href={link.href}\n target=\"_blank\"\n rel=\"noreferrer\"\n className={cls}\n data-oc-primary-nav-item=\"\"\n >\n {content}\n </a>\n ) : (\n <Link\n key={link.href}\n href={link.href}\n aria-current={active ? \"page\" : undefined}\n className={cls}\n data-oc-primary-nav-item={active ? \"active\" : \"sibling\"}\n >\n {content}\n </Link>\n );\n })}\n </nav>\n );\n}\n","'use client';\n\nimport Link from 'next/link';\nimport { useEffect, useState, type ReactNode } from 'react';\n\n/**\n * `<OcDashboardShell>` — the canonical demo-app frame for protocol\n * sites. Mirrors the `MeShell` pattern from `me.ochk.io`: persistent\n * left-rail tools on desktop, off-canvas drawer on mobile, page\n * eyebrow + title + description above the children.\n *\n * Drives the unified \"dashboard pattern\" the family rolled out\n * 2026-05-14: every protocol site's `/dashboard` (and the demo pages\n * underneath — `/create`, `/verify`, `/discover`, `/playground`, etc.)\n * wraps in this shell, so visitors crossing protocols experience the\n * same chrome.\n *\n * Layout (desktop):\n *\n * ┌─────────────┬────────────────────────────────────┐\n * │ § dashboard │ eyebrow │\n * │ ── tools ── │ title │\n * │ create ● │ description │\n * │ verify │ │\n * │ discover │ ── children ─────────────────────│\n * │ ... │ │\n * └─────────────┴────────────────────────────────────┘\n *\n * Mobile (<md): sidebar collapses behind a hamburger button at the\n * top of the main column; tapping opens a full-width drawer.\n */\n\nexport interface OcDashboardTool {\n /** Stable identifier · used as `active` key. */\n id: string;\n /** Same-origin path the tool lives at. */\n href: string;\n /** Visible label · lowercase preferred. */\n label: string;\n /** Optional one-line tagline shown under the label in the rail and\n * on the dashboard hub cards. */\n tagline?: string;\n /** Optional ascii / unicode glyph rendered before the label. */\n icon?: ReactNode;\n /** When true, opens in a new tab (e.g. an external explorer). */\n external?: boolean;\n}\n\nexport interface OcDashboardShellProps {\n /**\n * Dashboard root path — the rail header links here (\"§ dashboard\").\n * Default `'/dashboard'`.\n */\n rootHref?: string;\n /**\n * Site display name shown in the rail header above the tools list\n * (e.g. `'oc·attest'`).\n */\n siteLabel?: ReactNode;\n /** Tools to surface in the left rail. */\n tools: ReadonlyArray<OcDashboardTool>;\n /**\n * Which tool is currently active — matched against each tool's\n * `id`. Pass `undefined` on the dashboard hub itself.\n */\n active?: string;\n /** Optional small mono label above the page title. */\n eyebrow?: ReactNode;\n /** Page title — rendered as h1. */\n title?: ReactNode;\n /** Page description — rendered as a paragraph below the title. */\n description?: ReactNode;\n /** Main column content. */\n children: ReactNode;\n /** className for the outer container. */\n className?: string;\n}\n\nexport function OcDashboardShell({\n rootHref = '/dashboard',\n siteLabel,\n tools,\n active,\n eyebrow,\n title,\n description,\n children,\n className,\n}: OcDashboardShellProps) {\n const [drawerOpen, setDrawerOpen] = useState(false);\n\n // Close drawer on Escape, lock body scroll while open.\n useEffect(() => {\n if (!drawerOpen) return;\n function onKey(e: KeyboardEvent) {\n if (e.key === 'Escape') setDrawerOpen(false);\n }\n document.addEventListener('keydown', onKey);\n const prevOverflow = document.body.style.overflow;\n document.body.style.overflow = 'hidden';\n return () => {\n document.removeEventListener('keydown', onKey);\n document.body.style.overflow = prevOverflow;\n };\n }, [drawerOpen]);\n\n const hasHeader = Boolean(title) || Boolean(eyebrow);\n\n return (\n <div\n className={'container ' + (className ?? '')}\n data-oc-dashboard-shell=\"\"\n >\n <div className=\"flex min-h-[calc(100vh-3rem)] flex-col md:flex-row md:gap-8\">\n {/* Desktop sidebar */}\n <Sidebar\n rootHref={rootHref}\n siteLabel={siteLabel}\n tools={tools}\n active={active}\n variant=\"desktop\"\n />\n\n {/* Main column */}\n <div className=\"flex min-w-0 flex-1 flex-col\">\n {/* Mobile bar — hamburger + crumb */}\n <div className=\"border-border flex items-center justify-between border-b py-3 md:hidden\">\n <button\n type=\"button\"\n onClick={() => setDrawerOpen(true)}\n className=\"text-muted-foreground hover:text-foreground inline-flex h-9 items-center gap-2 px-1 font-mono text-[11px] tracking-widest uppercase transition-colors\"\n aria-label=\"open dashboard tools\"\n aria-expanded={drawerOpen}\n data-oc-dashboard-mobile-trigger=\"\"\n >\n <span className=\"text-[14px] leading-none\">≡</span>\n <span>tools</span>\n </button>\n <Link\n href={rootHref}\n className=\"text-primary font-mono text-[11px] tracking-widest uppercase\"\n >\n § dashboard\n </Link>\n </div>\n\n <div className=\"pt-6 md:pt-3\">\n {hasHeader && (\n <div className=\"max-w-3xl\">\n {eyebrow ? (\n <div className=\"label-mono text-primary mb-3 font-mono text-[10px] tracking-widest uppercase\">\n {eyebrow}\n </div>\n ) : null}\n {title ? (\n <h1 className=\"font-display text-2xl font-bold tracking-tight sm:text-3xl\">\n {title}\n </h1>\n ) : null}\n {description ? (\n <p className=\"text-muted-foreground mt-3 max-w-[64ch] text-sm leading-relaxed\">\n {description}\n </p>\n ) : null}\n </div>\n )}\n <div className={hasHeader ? 'mt-8 pb-12' : 'pb-12'}>{children}</div>\n </div>\n </div>\n </div>\n\n {/* Mobile drawer */}\n {drawerOpen ? (\n <div\n className=\"fixed inset-0 z-50 md:hidden\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label=\"dashboard tools\"\n data-oc-dashboard-drawer=\"\"\n >\n <div\n className=\"absolute inset-0 bg-background/80 backdrop-blur-sm\"\n onClick={() => setDrawerOpen(false)}\n aria-hidden\n />\n <div className=\"bg-background absolute top-0 left-0 h-full w-[85vw] max-w-sm border-r shadow-xl\">\n <Sidebar\n rootHref={rootHref}\n siteLabel={siteLabel}\n tools={tools}\n active={active}\n variant=\"drawer\"\n onClose={() => setDrawerOpen(false)}\n />\n </div>\n </div>\n ) : null}\n </div>\n );\n}\n\nfunction Sidebar({\n rootHref,\n siteLabel,\n tools,\n active,\n variant,\n onClose,\n}: {\n rootHref: string;\n siteLabel?: ReactNode;\n tools: ReadonlyArray<OcDashboardTool>;\n active?: string;\n variant: 'desktop' | 'drawer';\n onClose?: () => void;\n}) {\n const isDrawer = variant === 'drawer';\n return (\n <aside\n className={\n isDrawer\n ? 'flex h-full w-full flex-col bg-card'\n : 'hidden md:sticky md:top-4 md:flex md:h-[calc(100vh-2rem)] md:w-56 md:shrink-0 md:flex-col md:self-start md:overflow-y-auto md:rounded md:border md:bg-card/40 lg:w-60'\n }\n aria-label=\"dashboard tools\"\n data-oc-dashboard-sidebar={variant}\n >\n {/* identity strip */}\n <div className=\"border-b px-4 py-3\">\n <div className=\"flex items-center justify-between\">\n <Link\n href={rootHref}\n onClick={onClose}\n className=\"hover:text-foreground font-display text-sm font-bold tracking-tight\"\n >\n § dashboard\n </Link>\n {isDrawer ? (\n <button\n type=\"button\"\n onClick={onClose}\n className=\"text-muted-foreground hover:text-foreground -mr-2 inline-flex h-8 w-8 items-center justify-center rounded font-mono text-lg\"\n aria-label=\"close navigation\"\n >\n ×\n </button>\n ) : null}\n </div>\n {siteLabel ? (\n <div className=\"text-muted-foreground/70 mt-1 font-mono text-[10px] tracking-widest uppercase\">\n {siteLabel}\n </div>\n ) : null}\n </div>\n\n <nav className=\"flex-1 overflow-y-auto px-2 py-3\">\n <div className=\"text-muted-foreground/60 mb-1 px-3 font-mono text-[10px] tracking-widest uppercase\">\n § tools\n </div>\n <ul className=\"space-y-0.5\">\n {tools.map((tool) => {\n const isActive = tool.id === active;\n const innerCls =\n 'flex items-baseline gap-2 rounded px-3 py-1.5 text-[12.5px] transition-colors ' +\n (isActive\n ? 'bg-primary/10 text-primary font-semibold'\n : 'text-muted-foreground hover:text-foreground hover:bg-muted/30');\n const content = (\n <>\n {tool.icon ? (\n <span\n className={\n 'shrink-0 font-mono text-[11px] ' +\n (isActive ? 'text-primary' : 'text-muted-foreground/70')\n }\n aria-hidden\n >\n {tool.icon}\n </span>\n ) : null}\n <span className=\"flex-1 leading-tight\">\n <span>{tool.label}</span>\n {tool.tagline ? (\n <span className=\"text-muted-foreground/60 mt-0.5 block font-mono text-[10px] tracking-wide normal-case\">\n {tool.tagline}\n </span>\n ) : null}\n </span>\n {tool.external ? (\n <span\n className=\"text-muted-foreground/60 text-[10px]\"\n aria-hidden\n >\n ↗\n </span>\n ) : null}\n </>\n );\n return (\n <li key={tool.id}>\n {tool.external ? (\n <a\n href={tool.href}\n target=\"_blank\"\n rel=\"noreferrer\"\n onClick={onClose}\n className={innerCls}\n data-oc-dashboard-tool={isActive ? 'active' : 'sibling'}\n >\n {content}\n </a>\n ) : (\n <Link\n href={tool.href}\n onClick={onClose}\n aria-current={isActive ? 'page' : undefined}\n className={innerCls}\n data-oc-dashboard-tool={isActive ? 'active' : 'sibling'}\n >\n {content}\n </Link>\n )}\n </li>\n );\n })}\n </ul>\n </nav>\n </aside>\n );\n}\n\n/**\n * Convenience: the dashboard hub-page grid. Renders the same set of\n * tools as the sidebar, but as bigger card-style entries — used as\n * the body of `/dashboard/index.tsx` on each protocol site.\n */\nexport interface OcDashboardHubProps {\n tools: ReadonlyArray<OcDashboardTool>;\n className?: string;\n}\n\nexport function OcDashboardHub({ tools, className }: OcDashboardHubProps) {\n return (\n <ul\n className={\n 'grid gap-px border-t border-l sm:grid-cols-2 ' + (className ?? '')\n }\n data-oc-dashboard-hub=\"\"\n >\n {tools.map((tool) => {\n const content = (\n <span className=\"flex h-full flex-col gap-3 p-5 transition-colors\">\n <span className=\"flex items-baseline gap-3\">\n {tool.icon ? (\n <span\n className=\"text-primary font-mono text-[13px]\"\n aria-hidden\n >\n {tool.icon}\n </span>\n ) : null}\n <span className=\"font-display text-foreground text-base font-bold tracking-tight\">\n {tool.label}\n </span>\n {tool.external ? (\n <span\n className=\"text-muted-foreground/60 ml-auto text-xs\"\n aria-hidden\n >\n ↗\n </span>\n ) : (\n <span\n className=\"text-muted-foreground/60 ml-auto text-xs\"\n aria-hidden\n >\n →\n </span>\n )}\n </span>\n {tool.tagline ? (\n <span className=\"text-muted-foreground text-sm leading-relaxed\">\n {tool.tagline}\n </span>\n ) : null}\n </span>\n );\n const cls = 'hover:bg-muted/30 group block border-r border-b transition-colors';\n return (\n <li key={tool.id}>\n {tool.external ? (\n <a\n href={tool.href}\n target=\"_blank\"\n rel=\"noreferrer\"\n className={cls}\n >\n {content}\n </a>\n ) : (\n <Link href={tool.href} className={cls}>\n {content}\n </Link>\n )}\n </li>\n );\n })}\n </ul>\n );\n}\n","import type { ReactNode } from 'react';\n\n/**\n * AppShell — shared page chrome for every authenticated dashboard surface\n * across the OC family (vault, me, fleet, future). Lifted from oc-me-web's\n * `MeShell` and oc-vault-web's `VaultShell` — same eyebrow / title /\n * description / actions header band, no sidebar (sidebars are app-specific\n * and stay in the consuming app).\n *\n * Usage:\n * <AppShell eyebrow=\"§ vault\" title=\"your vault.\" description=\"…\">\n * ...\n * </AppShell>\n *\n * The component is stateless and dependency-free. Tailwind classes assume\n * the consuming site loads the family `globals.css` (which defines\n * `.container`, `.label-mono`, the dark-by-default palette, etc.).\n */\n\nexport interface AppShellProps {\n eyebrow?: ReactNode;\n title?: ReactNode;\n description?: ReactNode;\n /** Right-aligned action node rendered next to the title (e.g. CTA buttons). */\n headerActions?: ReactNode;\n children: ReactNode;\n className?: string;\n}\n\nexport function AppShell({\n eyebrow,\n title,\n description,\n headerActions,\n children,\n className,\n}: AppShellProps) {\n const hasHeader = Boolean(title);\n return (\n <div className={'container ' + (className ?? '')}>\n <div className=\"flex min-h-[calc(100vh-3rem)] flex-col\">\n <div className=\"flex min-w-0 flex-1 flex-col\">\n <div className=\"pt-6 md:pt-8\">\n {hasHeader && (\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between\">\n <div className=\"max-w-3xl\">\n {eyebrow && (\n <div className=\"label-mono text-primary mb-3\">\n {eyebrow}\n </div>\n )}\n <h1 className=\"font-display text-2xl font-bold tracking-tight sm:text-3xl\">\n {title}\n </h1>\n {description && (\n <p className=\"text-muted-foreground mt-3 max-w-[64ch] text-sm leading-relaxed\">\n {description}\n </p>\n )}\n </div>\n {headerActions && (\n <div className=\"flex shrink-0 items-center gap-2\">\n {headerActions}\n </div>\n )}\n </div>\n )}\n <div className={hasHeader ? 'mt-8 pb-12' : 'pb-12'}>{children}</div>\n </div>\n </div>\n </div>\n </div>\n );\n}\n","import { cn } from '../tokens/cn';\n\nexport interface LayoutSubHeaderTag {\n label: string;\n /** Hide this tag below the given breakpoint (progressive disclosure). */\n hideBelow?: 'sm' | 'md' | 'lg';\n}\n\nexport interface LayoutSubHeaderProps {\n /** Product label shown after the status, e.g. \"oc · stamp\". */\n product: string;\n /** Left-side status text. Defaults to \"live · mainnet\". */\n status?: string;\n /**\n * Right-side capability tag(s). Keep it to ONE short phrase per site —\n * the strip reads as quiet supporting context, not a feature list. A\n * second/third tag is supported (spaced, never comma-jammed) for the rare\n * site that needs it, each with its own `hideBelow`.\n */\n tags?: LayoutSubHeaderTag[];\n /** Hide the pulsing heartbeat dot (e.g. on a degraded surface). */\n noHeartbeat?: boolean;\n className?: string;\n}\n\nconst HIDE: Record<NonNullable<LayoutSubHeaderTag['hideBelow']>, string> = {\n sm: 'hidden sm:inline',\n md: 'hidden md:inline',\n lg: 'hidden lg:inline',\n};\n\n/**\n * LayoutSubHeader — the ecosystem status strip below the header. One line,\n * never wraps. Identical shape across every family surface:\n *\n * ● live · mainnet oc · stamp ················· bip-322 · opentimestamps\n *\n * Left cluster (heartbeat + status + product) is the identity; the right\n * cluster is a quiet, low-contrast capability whisper. Below `sm` the strip\n * collapses to just the heartbeat + product so it never wraps or crowds a\n * phone header — the right cluster and the `status` reappear from `sm` up.\n *\n * The band carries a faint skin-tinted translucent shade (`.oc-substrip`) so\n * it has presence on every skin × mode without bleeding the hero/aurora\n * behind it. Pass `product`, optional `status`, and `tags`.\n */\nexport function LayoutSubHeader({\n product,\n status = 'live · mainnet',\n tags = [],\n noHeartbeat = false,\n className,\n}: LayoutSubHeaderProps) {\n return (\n <div className={cn('oc-substrip border-b', className)}>\n <div className=\"container flex items-center justify-between gap-x-6 py-2 font-mono text-[11px]\">\n <div className=\"flex min-w-0 items-center gap-2.5\">\n {!noHeartbeat && (\n <span\n className=\"bg-primary inline-block size-1.5 shrink-0 animate-pulse rounded-full ring-2 ring-[color-mix(in_oklch,var(--primary),transparent_78%)]\"\n aria-hidden\n />\n )}\n <span className=\"text-muted-foreground hidden tracking-widest whitespace-nowrap uppercase sm:inline\">\n {status}\n </span>\n <span className=\"text-foreground truncate\">{product}</span>\n </div>\n {tags.length > 0 && (\n <div className=\"text-muted-foreground/55 hidden shrink-0 items-center gap-x-3 tracking-wider whitespace-nowrap uppercase sm:flex\">\n {tags.map((tag, i) => (\n <span key={i} className={tag.hideBelow ? HIDE[tag.hideBelow] : undefined}>\n {tag.label}\n </span>\n ))}\n </div>\n )}\n </div>\n </div>\n );\n}\n","import type { ReactNode } from 'react';\n\nimport { cn } from '../tokens/cn';\n\nexport interface OcAppBarProps {\n /**\n * `'full'` (default) = edge-to-edge app chrome: a `.app-bar` row (responsive\n * gutters, NO max-width), so the header's left/right edges align with a\n * full-bleed app shell below it. `'contained'` = the same row inside\n * `.container` (max-w-screen-xl), identical to the marketing/content header —\n * an escape hatch, rarely needed.\n */\n variant?: 'full' | 'contained';\n /** Logo slot — pass `<OcLogoDropdown>…</OcLogoDropdown>` with the site wordmark. */\n start?: ReactNode;\n /** Center slot — pass `<OcPrimaryNav … />`. Centered, flex-1, min-w-0. */\n center?: ReactNode;\n /** Trailing actions — pass e.g. `<HeaderAccount /><OcAppearanceMenu />`. */\n end?: ReactNode;\n /** Stick to the top of the viewport. Default `true`. Keeps `h-12` (3rem). */\n sticky?: boolean;\n className?: string;\n}\n\n/**\n * `OcAppBar` — the sanctioned FULL-BLEED application header for full-screen app\n * surfaces (chat `/app`, the analytics cockpit, the forge console, the me\n * operator plane …). It is the app-surface counterpart to the constrained\n * marketing/content header: the SAME primitives (`OcLogoDropdown` /\n * `OcPrimaryNav` / `OcAccountMenu`) mounted in an edge-to-edge `.app-bar` row\n * (gutters only, no `max-w-screen-xl`) instead of a centered `.container`, so a\n * full-bleed app shell underneath lines up edge-to-edge with the chrome above.\n *\n * Marketing / content / protocol pages keep the constrained `.container`\n * header — never use `OcAppBar` over a `.container`-capped body, or you\n * re-introduce the left/right misalignment this composition exists to fix.\n *\n * Auth-free and brand-free by design: all branding + session chrome arrive\n * through the `start` / `center` / `end` slots, so app sites and content sites\n * share one primitive layer and can never visually drift. The fixed `h-12`\n * (3rem) lets a shell below claim `h-[calc(100dvh-3rem)]`.\n */\nexport function OcAppBar({\n variant = 'full',\n start,\n center,\n end,\n sticky = true,\n className,\n}: OcAppBarProps) {\n return (\n <header\n className={cn(\n 'bg-background/90 supports-[backdrop-filter]:bg-background/70 w-full border-b backdrop-blur',\n sticky && 'sticky top-0 z-50',\n className\n )}\n >\n <div\n className={cn(\n variant === 'full' ? 'app-bar' : 'container',\n 'flex h-12 items-center justify-between gap-4'\n )}\n >\n {start}\n <div className=\"flex min-w-0 flex-1 justify-center px-2\">{center}</div>\n <div className=\"flex items-center gap-1\">{end}</div>\n </div>\n </header>\n );\n}\n","import Link from \"next/link\";\nimport type { ReactNode } from \"react\";\n\nimport { cn } from \"../tokens/cn\";\nimport { FAMILY_PROPERTIES, type FamilyCategory } from \"./family-properties\";\n\nexport interface FooterLink {\n href: string;\n label: string;\n /** Render as a cross-origin `<a target=\"_blank\">` with a ↗ affordance. */\n external?: boolean;\n}\n\nexport interface FooterColumn {\n /** Column heading, e.g. `'§ docs'`. */\n label: string;\n links: FooterLink[];\n}\n\nexport interface OcFamilyFooterBrand {\n /** The site's own logo mark (e.g. `<LogoMark size={20} />`). Optional. */\n mark?: ReactNode;\n /** Wordmark, e.g. `'oc·stamp'`. */\n wordmark: ReactNode;\n /** One-paragraph blurb under the wordmark (may contain links). */\n tagline: ReactNode;\n /** Optional license / attribution lines under the blurb. */\n meta?: ReactNode;\n}\n\nexport interface OcFamilyFooterProps {\n brand: OcFamilyFooterBrand;\n /** The site's own `§`-labelled link groups. */\n columns?: FooterColumn[];\n /**\n * Append registry-driven family columns (products / protocols) sourced from\n * `FAMILY_PROPERTIES`, so any footer that lists the family can never drift\n * from the canonical table. `'products'` is the five live products, etc.\n */\n family?: \"products\" | \"protocols\" | \"both\";\n /** Origin the legal-bar links resolve against. Defaults to ochk.io. */\n legalBase?: string;\n /** Override the left copyright line. Defaults to the canonical OC line. */\n legalCopyright?: ReactNode;\n /**\n * Override the centre legal links. Defaults to privacy / terms / security /\n * trademarks / contact (resolved against `legalBase`). Pass your own when a\n * site needs an extra link (e.g. a federation charter) or a shorter set.\n */\n legalLinks?: FooterLink[];\n /** Override the right-hand bitcoin tag (e.g. `'read on bitcoin'`). */\n builtWith?: ReactNode;\n className?: string;\n}\n\n// brand block + N content columns in one grid, mirroring the historical\n// per-site layout (`[1.2fr 1fr 1fr …]`). Keyed by content-column count so the\n// brand block keeps its wider share at every width.\nconst GRID: Record<number, string> = {\n 1: \"md:grid-cols-[1.2fr_1fr]\",\n 2: \"md:grid-cols-[1.2fr_1fr_1fr]\",\n 3: \"md:grid-cols-[1.2fr_1fr_1fr_1fr]\",\n 4: \"md:grid-cols-[1.2fr_1fr_1fr_1fr_1fr]\",\n 5: \"md:grid-cols-[1.2fr_1fr_1fr_1fr_1fr_1fr]\",\n};\n\nconst LINK_CLS =\n \"text-muted-foreground hover:text-foreground font-mono text-xs tracking-wide lowercase transition-colors\";\n\nfunction FooterLinkItem({ link }: { link: FooterLink }) {\n if (link.external) {\n return (\n <a href={link.href} target=\"_blank\" rel=\"noreferrer\" className={LINK_CLS}>\n {\"> \"}\n {link.label} ↗\n </a>\n );\n }\n return (\n <Link href={link.href} className={LINK_CLS}>\n {\"> \"}\n {link.label}\n </Link>\n );\n}\n\nfunction FooterColumnView({ column }: { column: FooterColumn }) {\n return (\n <div>\n <div className=\"label-mono text-primary mb-3\">{column.label}</div>\n <ul className=\"space-y-2\">\n {column.links.map((link) => (\n <li key={`${column.label}:${link.href}`}>\n <FooterLinkItem link={link} />\n </li>\n ))}\n </ul>\n </div>\n );\n}\n\nfunction familyColumn(category: FamilyCategory, label: string): FooterColumn {\n return {\n label,\n links: FAMILY_PROPERTIES.filter((p) => p.category === category).map(\n (p) => ({\n href: p.origin,\n label: p.label,\n external: true,\n }),\n ),\n };\n}\n\n/**\n * `<OcFamilyFooter>` — the one canonical family footer. Brand block on the\n * left, `§`-labelled link columns to the right, a single legal bar beneath.\n * Every `oc-*` site composes this with its own `brand` + `columns`; pass\n * `family` to surface the registry-driven product / protocol columns so any\n * footer listing the family always shows the full, current set.\n */\nexport function OcFamilyFooter({\n brand,\n columns = [],\n family,\n legalBase = \"https://ochk.io\",\n legalCopyright,\n legalLinks,\n builtWith,\n className,\n}: OcFamilyFooterProps) {\n const familyCols: FooterColumn[] = [];\n if (family === \"products\" || family === \"both\") {\n familyCols.push(familyColumn(\"product\", \"§ products\"));\n }\n if (family === \"protocols\" || family === \"both\") {\n familyCols.push(familyColumn(\"protocol\", \"§ protocols\"));\n }\n\n const allColumns = [...familyCols, ...columns];\n const grid = GRID[allColumns.length] ?? GRID[3];\n const year = new Date().getFullYear();\n const legal = (path: string) => `${legalBase}${path}`;\n const links: FooterLink[] = legalLinks ?? [\n { href: legal(\"/privacy\"), label: \"privacy\" },\n { href: legal(\"/terms\"), label: \"terms\" },\n { href: legal(\"/security\"), label: \"security\" },\n { href: legal(\"/trademark\"), label: \"trademarks\" },\n { href: legal(\"/contact\"), label: \"contact\" },\n ];\n\n return (\n <footer className={cn(\"border-t\", className)}>\n <div className=\"container py-10 sm:py-12 md:py-16\">\n <div className={cn(\"grid gap-8 sm:grid-cols-2 sm:gap-10\", grid)}>\n <div>\n <div className=\"flex items-center gap-2\">\n {brand.mark}\n <span className=\"font-display text-sm font-bold tracking-tight\">\n {brand.wordmark}\n </span>\n </div>\n <div className=\"text-muted-foreground mt-3 max-w-[34ch] text-sm leading-relaxed\">\n {brand.tagline}\n </div>\n {brand.meta && <div className=\"mt-4\">{brand.meta}</div>}\n </div>\n {allColumns.map((column) => (\n <FooterColumnView key={column.label} column={column} />\n ))}\n </div>\n\n <div className=\"mt-10 flex flex-col items-start justify-between gap-3 border-t pt-6 font-mono text-[11px] tracking-widest uppercase sm:flex-row sm:items-center\">\n <span className=\"text-muted-foreground\">\n {legalCopyright ?? <>© {year} orangecheck · mit + cc-by-4.0</>}\n </span>\n <div className=\"text-muted-foreground/80 flex flex-wrap items-center gap-x-4 gap-y-1\">\n {links.map((link) => (\n <a\n key={link.label}\n href={link.href}\n {...(link.external\n ? { target: \"_blank\", rel: \"noreferrer\" }\n : {})}\n className=\"hover:text-foreground transition-colors\"\n >\n {link.label}\n </a>\n ))}\n </div>\n <span className=\"text-muted-foreground inline-flex items-center gap-1.5\">\n <span className=\"text-primary text-[13px] leading-none\">₿</span>\n <span>{builtWith ?? \"built with bitcoin\"}</span>\n </span>\n </div>\n </div>\n </footer>\n );\n}\n"]}