{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"page-header","type":"registry:block","title":"Page header","description":"A project page header that folds into a compact bar as you scroll, with tabs whose counts roll.","categories":["blocks"],"dependencies":["@radix-ui/react-dropdown-menu","@radix-ui/react-tabs","lucide-react","motion"],"registryDependencies":["https://uiarc.dev/r/arc-motion-tokens.json","https://uiarc.dev/r/animated-counter.json","https://uiarc.dev/r/avatar-group.json","https://uiarc.dev/r/avatar.json","https://uiarc.dev/r/badge.json","https://uiarc.dev/r/button.json","https://uiarc.dev/r/progress.json"],"files":[{"path":"registry/blocks/page-header/page-header.tsx","type":"registry:component","target":"@components/arc/blocks/page-header/page-header.tsx","content":"\"use client\";\n\nimport { Fragment, useEffect, useId, useRef, useState } from \"react\";\nimport type { FocusEvent, ReactNode, UIEvent } from \"react\";\nimport * as DropdownPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\";\nimport { AnimatePresence, LayoutGroup, motion, useReducedMotion, type Transition, type Variants } from \"motion/react\";\nimport { Archive, ArchiveRestore, Bell, BellOff, BellRing, CalendarDays, Check, ChevronRight, Circle, CircleAlert, CircleCheck, CircleDashed, Ellipsis, FileSpreadsheet, FileText, Film, Link2, Megaphone, PenTool, Plus, Presentation, type LucideIcon } from \"lucide-react\";\nimport { AnimatedCounter } from \"../../animated-counter/animated-counter\";\nimport { Avatar } from \"../../avatar/avatar\";\nimport { AvatarGroup } from \"../../avatar-group/avatar-group\";\nimport { Badge } from \"../../badge/badge\";\nimport { Button } from \"../../button/button\";\nimport { Progress } from \"../../progress/progress\";\nimport { motionTokens } from \"../../lib/motion-tokens\";\nimport styles from \"./page-header.module.css\";\nimport { writeClipboard } from \"../../lib/use-copy-feedback\";\n\n/** The header condenses past CONDENSE_AT and only opens again near the top, so it never flickers at the threshold. */\nconst CONDENSE_AT = 16;\nconst EXPAND_AT = 4;\n/** Secondary actions fold into the overflow menu when the breadcrumbs would get less room than this, and return with a little slack. */\nconst LEAD_MIN = 240;\nconst LEAD_RETURN = 272;\nconst DONE_AT_START = 31;\nconst PROJECT_URL = \"https://northline.example/projects/checkout-redesign\";\n\ntype PersonId = \"emma\" | \"marcus\" | \"ava\" | \"sofia\" | \"jasmine\";\nconst people: Record<PersonId, { name: string; src: string }> = {\n  emma: { name: \"Emma Collins\", src: \"/media/people/emma-collins.svg\" },\n  marcus: { name: \"Marcus Johnson\", src: \"/media/people/marcus-johnson.svg\" },\n  ava: { name: \"Ava Mitchell\", src: \"/media/people/ava-mitchell.svg\" },\n  sofia: { name: \"Sofia Ramirez\", src: \"/media/people/sofia-ramirez.svg\" },\n  jasmine: { name: \"Jasmine Brooks\", src: \"/media/people/jasmine-brooks.svg\" },\n};\nconst members = ([\"emma\", \"marcus\", \"ava\", \"sofia\", \"jasmine\"] as const).map(key => people[key]);\n\ntype Section = \"overview\" | \"issues\" | \"updates\" | \"files\";\nconst sections: { value: Section; label: string }[] = [{ value: \"overview\", label: \"Overview\" }, { value: \"issues\", label: \"Issues\" }, { value: \"updates\", label: \"Updates\" }, { value: \"files\", label: \"Files\" }];\nconst order = (section: Section) => sections.findIndex(item => item.value === section);\n\ntype Issue = { id: string; title: string; owner: PersonId; label: string; fresh?: boolean };\nconst startingIssues: Issue[] = [\n  { id: \"CHK-138\", title: \"Saved card list clips the expiry date on small screens\", owner: \"sofia\", label: \"Bug\" },\n  { id: \"CHK-136\", title: \"Add an edit link beside each section of the review step\", owner: \"emma\", label: \"Design\" },\n  { id: \"CHK-135\", title: \"Wallet sheet opens twice after a failed card check\", owner: \"marcus\", label: \"Bug\" },\n  { id: \"CHK-133\", title: \"Show the delivery estimate before payment\", owner: \"ava\", label: \"Research\" },\n  { id: \"CHK-131\", title: \"Promo code field loses focus after an invalid code\", owner: \"sofia\", label: \"Bug\" },\n  { id: \"CHK-129\", title: \"Track drop-off between review and pay\", owner: \"ava\", label: \"Analytics\" },\n  { id: \"CHK-127\", title: \"Preselect the last used card for returning customers\", owner: \"marcus\", label: \"Feature\" },\n  { id: \"CHK-124\", title: \"Write clearer copy for declined cards\", owner: \"emma\", label: \"Content\" },\n  { id: \"CHK-122\", title: \"Address autocomplete drops apartment numbers\", owner: \"sofia\", label: \"Bug\" },\n];\nconst draftIssues = [\"Keyboard focus skips the save card checkbox\", \"Recalculate tax when the shipping country changes\", \"Pay button needs a pressed and loading state\", \"Review totals wrap awkwardly at large text sizes\"];\n\ntype Update = { id: string; author: PersonId; date: string; tone: \"success\" | \"warning\"; status: string; body: string; fresh?: boolean };\nconst startingUpdates: Update[] = [\n  { id: \"u4\", author: \"emma\", date: \"Sep 19\", tone: \"success\", status: \"On track\", body: \"Saved payment methods reached every iOS customer on Thursday. Returning customers now finish checkout 3.1 points more often. The review step is next.\" },\n  { id: \"u3\", author: \"ava\", date: \"Sep 12\", tone: \"success\", status: \"On track\", body: \"Five usability sessions are done. People trust a single review step as long as the total stays visible while they edit.\" },\n  { id: \"u2\", author: \"marcus\", date: \"Sep 5\", tone: \"warning\", status: \"At risk\", body: \"Card tokenization is waiting on the payments team. We moved the review step ahead so the October date can hold.\" },\n  { id: \"u1\", author: \"emma\", date: \"Aug 29\", tone: \"success\", status: \"On track\", body: \"Kickoff. Scope is saved cards, one review step, and a staged rollout starting October 14.\" },\n];\nconst draftUpdates = [\"The review step is in staging behind a flag. If error rates hold through Friday, we open it to 10% of traffic on Monday.\", \"Declined card copy is final and with support for review. No change to the October 14 rollout.\"];\n\nconst files: { name: string; kind: string; size: string; owner: PersonId; date: string; icon: LucideIcon }[] = [\n  { name: \"Checkout flows v3\", kind: \"Design file\", size: \"18.4 MB\", owner: \"emma\", date: \"Sep 20\", icon: PenTool },\n  { name: \"Review step walkthrough\", kind: \"Video\", size: \"46 MB\", owner: \"emma\", date: \"Sep 18\", icon: Film },\n  { name: \"Payments API notes\", kind: \"Document\", size: \"96 KB\", owner: \"marcus\", date: \"Sep 16\", icon: FileText },\n  { name: \"Usability findings, round two\", kind: \"PDF\", size: \"2.1 MB\", owner: \"ava\", date: \"Sep 13\", icon: FileText },\n  { name: \"Rollout plan\", kind: \"Slides\", size: \"4.8 MB\", owner: \"sofia\", date: \"Sep 11\", icon: Presentation },\n  { name: \"Conversion baseline\", kind: \"Spreadsheet\", size: \"640 KB\", owner: \"ava\", date: \"Sep 9\", icon: FileSpreadsheet },\n  { name: \"Empty and error states\", kind: \"Design file\", size: \"9.2 MB\", owner: \"emma\", date: \"Sep 6\", icon: PenTool },\n  { name: \"Launch checklist\", kind: \"Document\", size: \"54 KB\", owner: \"sofia\", date: \"Sep 2\", icon: FileText },\n];\n\nconst milestoneIcons = { done: CircleCheck, active: CircleDashed, planned: Circle };\nconst milestones: { name: string; note: string; state: keyof typeof milestoneIcons }[] = [\n  { name: \"Saved payment methods\", note: \"Shipped Sep 18\", state: \"done\" },\n  { name: \"Single review step\", note: \"In progress, due Oct 1\", state: \"active\" },\n  { name: \"Staged rollout\", note: \"Planned for Oct 14\", state: \"planned\" },\n];\nconst activity: { who: PersonId; text: string; time: string }[] = [\n  { who: \"ava\", text: \"moved CHK-131 to review\", time: \"1h ago\" },\n  { who: \"marcus\", text: \"merged the saved cards endpoint\", time: \"3h ago\" },\n  { who: \"emma\", text: \"shared Checkout flows v3\", time: \"Yesterday\" },\n  { who: \"sofia\", text: \"closed CHK-119, a double charge on retry\", time: \"Yesterday\" },\n  { who: \"jasmine\", text: \"set the rollout date to October 14\", time: \"Sep 17\" },\n];\n\ntype Notice = { key: number; text: string; tone: \"success\" | \"error\" | \"neutral\" };\ntype MenuAction = { key: string; label: string; icon: ReactNode; onSelect: () => void; disabled?: boolean; separatorBefore?: boolean };\n\nconst still: Transition = { duration: 0 };\nconst quick: Transition = { duration: motionTokens.duration.fast, ease: [...motionTokens.ease.standard] };\nconst blur = (px: number) => `blur(${px}px)`;\nconst icon = { size: 16, strokeWidth: 1.75, \"aria-hidden\": true } as const;\n\n/** Panels slide a few pixels in the direction of the tab that was chosen. */\nconst panelSlide: Variants = {\n  enter: (direction: number) => ({ opacity: 0, x: direction * 12 }),\n  center: { opacity: 1, x: 0, transition: { x: motionTokens.spring.smooth, opacity: { duration: motionTokens.duration.standard, ease: [...motionTokens.ease.enter] } } },\n  exit: (direction: number) => ({ opacity: 0, x: direction * -8, transition: { duration: motionTokens.duration.instant, ease: [...motionTokens.ease.standard] } }),\n};\nconst panelFade: Variants = { enter: { opacity: 0, x: 0 }, center: { opacity: 1, x: 0, transition: { duration: motionTokens.duration.instant } }, exit: { opacity: 0, x: 0, transition: { duration: motionTokens.duration.instant } } };\n\n/** Rows open and close their own height, so the list closes the gap instead of jumping. */\nfunction rowMotion(reduce: boolean) {\n  return reduce\n    ? { initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: { duration: motionTokens.duration.instant } }\n    : { initial: { opacity: 0, height: 0 }, animate: { opacity: 1, height: \"auto\" }, exit: { opacity: 0, height: 0 }, transition: { height: motionTokens.spring.smooth, opacity: { duration: motionTokens.duration.standard, ease: [...motionTokens.ease.standard] } } };\n}\n\n/** The overflow button never scales: it anchors the menu. A shared highlight glides between items under the pointer. */\nfunction OverflowMenu({ actions, reduce }: { actions: MenuAction[]; reduce: boolean }) {\n  const [highlight, setHighlight] = useState<{ top: number; height: number; glide: boolean } | null>(null);\n  const pointer = useRef(false);\n  const clearTimer = useRef(0);\n  useEffect(() => () => window.clearTimeout(clearTimer.current), []);\n  function onFocus(event: FocusEvent<HTMLDivElement>) {\n    const item = event.target instanceof HTMLElement ? event.target.closest<HTMLElement>('[role=\"menuitem\"]') : null;\n    window.clearTimeout(clearTimer.current);\n    if (!item) { clearTimer.current = window.setTimeout(() => setHighlight(null), pointer.current ? 70 : 0); return; }\n    const glide = pointer.current;\n    setHighlight(current => ({ top: item.offsetTop, height: item.offsetHeight, glide: glide && current !== null }));\n  }\n  return <DropdownPrimitive.Root onOpenChange={open => { if (open) { window.clearTimeout(clearTimer.current); setHighlight(null); } }}>\n    <DropdownPrimitive.Trigger asChild><Button variant=\"secondary\" size=\"sm\" className={styles.iconButton} aria-label=\"More actions\"><Ellipsis size={17} strokeWidth={1.75} aria-hidden=\"true\" /></Button></DropdownPrimitive.Trigger>\n    <DropdownPrimitive.Portal>\n      <DropdownPrimitive.Content className={styles.menu} align=\"end\" sideOffset={6} collisionPadding={12} loop onFocus={onFocus} onPointerMoveCapture={() => { pointer.current = true; }} onKeyDownCapture={() => { pointer.current = false; }}>\n        <motion.span className={styles.highlight} aria-hidden=\"true\" initial={false} animate={highlight ? { y: highlight.top, height: highlight.height, opacity: 1 } : { opacity: 0 }} transition={{ default: highlight?.glide && !reduce ? motionTokens.spring.snappy : still, opacity: { duration: reduce ? 0 : .08 } }} />\n        {actions.map(action => <Fragment key={action.key}>\n          {action.separatorBefore && <DropdownPrimitive.Separator className={styles.separator} />}\n          <DropdownPrimitive.Item className={styles.item} disabled={action.disabled} onSelect={action.onSelect}>{action.icon}{action.label}</DropdownPrimitive.Item>\n        </Fragment>)}\n      </DropdownPrimitive.Content>\n    </DropdownPrimitive.Portal>\n  </DropdownPrimitive.Root>;\n}\n\nfunction OverviewPanel({ done, open }: { done: number; open: number }) {\n  const total = done + open;\n  return <div className={styles.overview}>\n    <div className={styles.progress}><Progress value={done} max={total} label={`${done} of ${total} issues done`} showValue /></div>\n    <div>\n      <h3 className={styles.sectionTitle}>Milestones</h3>\n      <ol className={styles.milestones}>{milestones.map(item => {\n        const Icon = milestoneIcons[item.state];\n        return <li key={item.name} data-state={item.state}><Icon size={16} strokeWidth={1.75} aria-hidden=\"true\" /><span className={styles.milestoneName}>{item.name}</span><span className={styles.note}>{item.note}</span></li>;\n      })}</ol>\n    </div>\n    <div>\n      <h3 className={styles.sectionTitle}>Recent activity</h3>\n      <ul className={styles.activity}>{activity.map(item => <li key={`${item.who}-${item.text}`}><Avatar name={people[item.who].name} src={people[item.who].src} size=\"sm\" /><p><strong>{people[item.who].name}</strong> {item.text}</p><span className={styles.note}>{item.time}</span></li>)}</ul>\n    </div>\n  </div>;\n}\n\nfunction IssuesPanel({ issues, closing, reduce, onComplete, onReset, register }: { issues: Issue[]; closing: string[]; reduce: boolean; onComplete: (issue: Issue) => void; onReset: () => void; register: (id: string, node: HTMLButtonElement | null) => void }) {\n  const row = rowMotion(reduce);\n  return <>\n    <ul className={styles.issues} aria-label=\"Open issues\">\n      <AnimatePresence initial={false}>\n        {issues.map(issue => {\n          const isClosing = closing.includes(issue.id);\n          const owner = people[issue.owner];\n          return <motion.li key={issue.id} className={styles.issue} data-fresh={issue.fresh || undefined} data-closing={isClosing || undefined} {...row}>\n            <div className={styles.issueInner}>\n              <button ref={node => register(issue.id, node)} type=\"button\" className={styles.check} aria-label={`Mark ${issue.id} done`} aria-disabled={isClosing || undefined} onClick={() => onComplete(issue)}>\n                <AnimatePresence initial={false} mode=\"popLayout\">\n                  <motion.span key={isClosing ? \"done\" : \"open\"} className={styles.checkGlyph} initial={reduce ? { opacity: 0 } : { opacity: 0, scale: .5 }} animate={{ opacity: 1, scale: 1 }} exit={{ opacity: 0, scale: reduce ? 1 : .5, transition: quick }} transition={reduce ? still : motionTokens.spring.snappy}>\n                    {isClosing ? <CircleCheck size={18} strokeWidth={1.75} aria-hidden=\"true\" /> : <Circle size={18} strokeWidth={1.75} aria-hidden=\"true\" />}\n                  </motion.span>\n                </AnimatePresence>\n              </button>\n              <span className={styles.issueText}><span className={styles.issueId}>{issue.id}</span><span className={styles.issueTitle}>{issue.title}</span></span>\n              <span className={styles.issueLabel}>{issue.label}</span>\n              <Avatar name={owner.name} src={owner.src} size=\"sm\" />\n            </div>\n          </motion.li>;\n        })}\n      </AnimatePresence>\n    </ul>\n    {issues.length === 0 && <motion.div className={styles.empty} initial={{ opacity: 0, y: reduce ? 0 : 6 }} animate={{ opacity: 1, y: 0 }} transition={reduce ? { duration: motionTokens.duration.instant } : motionTokens.spring.smooth}>\n      <CircleCheck size={24} strokeWidth={1.75} aria-hidden=\"true\" />\n      <p>No open issues</p>\n      <span>Everything in this project is done.</span>\n      <Button variant=\"secondary\" size=\"sm\" onClick={onReset}>Restore sample issues</Button>\n    </motion.div>}\n  </>;\n}\n\nfunction UpdatesPanel({ updates, reduce }: { updates: Update[]; reduce: boolean }) {\n  const row = rowMotion(reduce);\n  return <ol className={styles.updates} aria-label=\"Project updates\">\n    <AnimatePresence initial={false}>\n      {updates.map(update => {\n        const author = people[update.author];\n        return <motion.li key={update.id} className={styles.update} data-fresh={update.fresh || undefined} {...row}>\n          <article className={styles.updateInner}>\n            <Avatar name={author.name} src={author.src} size=\"md\" />\n            <div>\n              <div className={styles.updateHead}><span className={styles.author}>{author.name}</span><span className={styles.note}>{update.date}</span><Badge size=\"sm\" tone={update.tone} dot>{update.status}</Badge></div>\n              <p>{update.body}</p>\n            </div>\n          </article>\n        </motion.li>;\n      })}\n    </AnimatePresence>\n  </ol>;\n}\n\nfunction FilesPanel() {\n  return <ul className={styles.files} aria-label=\"Project files\">{files.map(file => {\n    const Icon = file.icon;\n    const owner = people[file.owner];\n    return <li key={file.name}><Icon size={16} strokeWidth={1.75} aria-hidden=\"true\" /><span className={styles.fileName}><span>{file.name}</span><span className={styles.note}>{file.kind}, {file.size}</span></span><Avatar name={owner.name} src={owner.src} size=\"sm\" /><span className={styles.fileDate}>{file.date}</span></li>;\n  })}</ul>;\n}\n\nexport function PageHeader() {\n  const id = useId();\n  const reduce = useReducedMotion() ?? false;\n  const bar = useRef<HTMLDivElement>(null);\n  const secondary = useRef<HTMLDivElement>(null);\n  const trailing = useRef<HTMLDivElement>(null);\n  const scroller = useRef<HTMLDivElement>(null);\n  const tabList = useRef<HTMLDivElement>(null);\n  const titleRef = useRef<HTMLHeadingElement>(null);\n  const toggles = useRef(new Map<string, HTMLButtonElement>());\n  const timers = useRef(new Set<number>());\n  const counters = useRef({ issue: 0, update: 0, notice: 0 });\n  const [view, setView] = useState<{ section: Section; direction: number }>({ section: \"overview\", direction: 1 });\n  const [condensed, setCondensed] = useState(false);\n  const [layout, setLayout] = useState({ measured: false, collapsed: false, animate: false });\n  const [following, setFollowing] = useState(false);\n  const [archived, setArchived] = useState(false);\n  const [sharing, setSharing] = useState<\"idle\" | \"sending\" | \"sent\">(\"idle\");\n  const [issues, setIssues] = useState(startingIssues);\n  const [closing, setClosing] = useState<string[]>([]);\n  const [done, setDone] = useState(DONE_AT_START);\n  const [updates, setUpdates] = useState(startingUpdates);\n  const [notice, setNotice] = useState<Notice | null>(null);\n\n  // Only the header width is observed, so a label that grows (Follow to Following) never folds the button you just pressed.\n  // The first measurement applies at once; later width changes fold the actions with a spring.\n  useEffect(() => {\n    const row = bar.current, folded = secondary.current, fixed = trailing.current;\n    if (!row || !folded || !fixed || typeof ResizeObserver === \"undefined\") return;\n    const observer = new ResizeObserver(() => {\n      const room = row.clientWidth - folded.offsetWidth - fixed.offsetWidth - 16;\n      setLayout(current => {\n        const collapsed = current.measured && current.collapsed ? room < LEAD_RETURN : room < LEAD_MIN;\n        return current.measured && current.collapsed === collapsed ? current : { measured: true, collapsed, animate: current.measured };\n      });\n    });\n    observer.observe(row);\n    return () => observer.disconnect();\n  }, []);\n\n  useEffect(() => {\n    const pending = timers.current;\n    return () => pending.forEach(handle => window.clearTimeout(handle));\n  }, []);\n\n  useEffect(() => {\n    if (!notice) return;\n    const handle = window.setTimeout(() => setNotice(null), 3200);\n    return () => window.clearTimeout(handle);\n  }, [notice]);\n\n  // Keep the chosen tab in view when the list scrolls sideways on narrow screens.\n  useEffect(() => {\n    const list = tabList.current;\n    const tab = list?.querySelector<HTMLElement>('[role=\"tab\"][data-state=\"active\"]');\n    if (!list || !tab) return;\n    const start = tab.offsetLeft - 12;\n    const end = tab.offsetLeft + tab.offsetWidth + 12 - list.clientWidth;\n    const behavior = reduce ? \"auto\" : \"smooth\";\n    if (list.scrollLeft > start) list.scrollTo({ left: start, behavior });\n    else if (list.scrollLeft < end) list.scrollTo({ left: end, behavior });\n  }, [view.section, reduce]);\n\n  function later(run: () => void, delay: number) {\n    const handle = window.setTimeout(() => { timers.current.delete(handle); run(); }, delay);\n    timers.current.add(handle);\n  }\n\n  function notify(text: string, tone: Notice[\"tone\"] = \"success\") {\n    counters.current.notice += 1;\n    setNotice({ key: counters.current.notice, text, tone });\n  }\n\n  /** Switching sections while condensed shows the top of the new panel and keeps the compact bar. */\n  function selectSection(next: Section, reveal = false) {\n    setView(current => current.section === next ? current : { section: next, direction: order(next) > order(current.section) ? 1 : -1 });\n    const node = scroller.current;\n    if (node && (reveal || next !== view.section) && node.scrollTop > CONDENSE_AT + 1) node.scrollTop = CONDENSE_AT + 1;\n  }\n\n  function onScroll(event: UIEvent<HTMLDivElement>) {\n    const top = event.currentTarget.scrollTop;\n    setCondensed(current => (current ? top > EXPAND_AT : top > CONDENSE_AT));\n  }\n\n  function backToTop() {\n    scroller.current?.scrollTo({ top: 0, behavior: reduce ? \"auto\" : \"smooth\" });\n    titleRef.current?.focus({ preventScroll: true });\n  }\n\n  function toggleFollow() {\n    const next = !following;\n    setFollowing(next);\n    notify(next ? \"Following Checkout redesign\" : \"Stopped following Checkout redesign\", next ? \"success\" : \"neutral\");\n  }\n\n  function shareUpdate() {\n    if (archived || sharing !== \"idle\") return;\n    setSharing(\"sending\");\n    later(() => {\n      const index = counters.current.update++;\n      const key = `draft-${index}`;\n      setUpdates(list => [{ id: key, author: \"jasmine\", date: \"Just now\", tone: \"success\", status: \"On track\", body: draftUpdates[index % draftUpdates.length]!, fresh: true }, ...list]);\n      setSharing(\"sent\");\n      selectSection(\"updates\", true);\n      notify(\"Update shared with the project team\");\n      later(() => setSharing(\"idle\"), 1800);\n      later(() => setUpdates(list => list.map(item => item.id === key ? { ...item, fresh: false } : item)), 1800);\n    }, 700);\n  }\n\n  function createIssue() {\n    if (archived) return;\n    const index = counters.current.issue++;\n    const issue: Issue = { id: `CHK-${139 + index}`, title: draftIssues[index % draftIssues.length]!, owner: \"jasmine\", label: \"Triage\", fresh: true };\n    setIssues(list => [issue, ...list]);\n    selectSection(\"issues\", true);\n    notify(`${issue.id} created and assigned to you`);\n    later(() => setIssues(list => list.map(item => item.id === issue.id ? { ...item, fresh: false } : item)), 1800);\n  }\n\n  function completeIssue(issue: Issue) {\n    if (closing.includes(issue.id)) return;\n    const index = issues.findIndex(item => item.id === issue.id);\n    const remaining = issues.filter(item => item.id !== issue.id && !closing.includes(item.id));\n    const neighbor = remaining[Math.min(index, remaining.length - 1)];\n    setClosing(list => [...list, issue.id]);\n    later(() => {\n      const hadFocus = document.activeElement === toggles.current.get(issue.id);\n      setIssues(list => list.filter(item => item.id !== issue.id));\n      setClosing(list => list.filter(item => item !== issue.id));\n      setDone(count => count + 1);\n      notify(`${issue.id} marked done`);\n      if (hadFocus) (neighbor ? toggles.current.get(neighbor.id) : scroller.current?.querySelector<HTMLElement>('[role=\"tabpanel\"][data-state=\"active\"]'))?.focus();\n    }, 380);\n  }\n\n  function resetIssues() {\n    setIssues(startingIssues);\n    setDone(DONE_AT_START);\n    notify(\"Sample issues restored\", \"neutral\");\n  }\n\n  function toggleArchive() {\n    const next = !archived;\n    setArchived(next);\n    notify(next ? \"Project archived. New issues and updates are paused.\" : \"Project restored\", \"neutral\");\n  }\n\n  async function copyLink() {\n    try {\n      await writeClipboard(PROJECT_URL);\n      notify(\"Link copied\");\n    } catch {\n      notify(\"Couldn't copy the link. Try again from the address bar.\", \"error\");\n    }\n  }\n\n  function openCrumb(label: string) {\n    notify(`${label} would open here.`, \"neutral\");\n  }\n\n  const status = archived ? { tone: \"neutral\" as const, label: \"Archived\" } : { tone: \"success\" as const, label: \"On track\" };\n  const menuActions: MenuAction[] = [\n    ...(layout.collapsed ? [\n      { key: \"follow\", label: following ? \"Unfollow\" : \"Follow\", icon: following ? <BellOff {...icon} /> : <Bell {...icon} />, onSelect: toggleFollow },\n      { key: \"share\", label: \"Share update\", icon: <Megaphone {...icon} />, onSelect: shareUpdate, disabled: archived || sharing !== \"idle\" },\n    ] : []),\n    { key: \"copy\", label: \"Copy link\", icon: <Link2 {...icon} />, onSelect: copyLink, separatorBefore: layout.collapsed },\n    { key: \"archive\", label: archived ? \"Restore project\" : \"Archive project\", icon: archived ? <ArchiveRestore {...icon} /> : <Archive {...icon} />, onSelect: toggleArchive },\n  ];\n\n  /** Leaving copy fades fast; arriving copy settles on the smooth spring with a short blur. */\n  const swap = (entering: boolean): Transition => reduce ? still : { ...motionTokens.spring.smooth, opacity: { duration: entering ? motionTokens.duration.standard : motionTokens.duration.fast, ease: [...motionTokens.ease.standard], delay: entering ? .05 : 0 }, filter: { duration: entering ? motionTokens.duration.standard : motionTokens.duration.fast, ease: [...motionTokens.ease.standard] } };\n  const shown = { opacity: 1, y: 0, scale: 1, filter: blur(0) };\n\n  return (\n    <TabsPrimitive.Root asChild value={view.section} onValueChange={value => selectSection(value as Section)}>\n      <section className={styles.frame} aria-labelledby={`${id}-title`} data-measured={layout.measured || undefined}>\n        <header className={styles.header}>\n          <div ref={bar} className={styles.bar}>\n            <div className={styles.lead}>\n              <motion.nav className={styles.crumbs} aria-label=\"Breadcrumb\" inert={condensed} initial={false} animate={condensed ? { opacity: 0, y: -8, filter: blur(motionTokens.blur.subtle) } : shown} transition={swap(!condensed)}>\n                <ol>\n                  <li className={styles.rootCrumb}><button type=\"button\" className={styles.crumb} onClick={() => openCrumb(\"Northline\")}>Northline</button><ChevronRight size={14} strokeWidth={1.75} aria-hidden=\"true\" /></li>\n                  <li><button type=\"button\" className={styles.crumb} onClick={() => openCrumb(\"Projects\")}>Projects</button><ChevronRight size={14} strokeWidth={1.75} aria-hidden=\"true\" /></li>\n                  <li><span className={styles.current} aria-current=\"page\">Checkout redesign</span></li>\n                </ol>\n              </motion.nav>\n              <motion.button type=\"button\" className={styles.compact} inert={!condensed} aria-label=\"Checkout redesign, back to top\" onClick={backToTop} initial={false} animate={condensed ? shown : { opacity: 0, y: 14, filter: blur(motionTokens.blur.soft) }} transition={swap(condensed)}>\n                <span className={styles.compactTitle}>Checkout redesign</span>\n                <Badge className={styles.compactBadge} size=\"sm\" tone={status.tone} dot>{status.label}</Badge>\n              </motion.button>\n            </div>\n\n            <div className={styles.actions}>\n              <motion.div className={styles.secondary} inert={layout.collapsed} initial={false} animate={layout.collapsed ? { width: 0, opacity: 0 } : { width: \"auto\", opacity: 1 }} transition={layout.animate && !reduce ? { width: motionTokens.spring.smooth, opacity: { duration: layout.collapsed ? motionTokens.duration.fast : motionTokens.duration.standard, ease: [...motionTokens.ease.standard], delay: layout.collapsed ? .04 : .08 } } : still}>\n                <div ref={secondary} className={styles.secondaryInner}>\n                  <Button variant=\"secondary\" size=\"sm\" onClick={toggleFollow}>{following ? <><BellRing {...icon} /> Following</> : <><Bell {...icon} /> Follow</>}</Button>\n                  <Button variant=\"secondary\" size=\"sm\" loading={sharing === \"sending\"} disabled={archived} onClick={shareUpdate}>{sharing === \"sent\" ? <><Check {...icon} /> Shared</> : <><Megaphone {...icon} /> Share update</>}</Button>\n                </div>\n              </motion.div>\n              <div ref={trailing} className={styles.trailing}>\n                <OverflowMenu actions={menuActions} reduce={reduce} />\n                <Button className={styles.create} size=\"sm\" aria-label=\"New issue\" disabled={archived} onClick={createIssue}><Plus {...icon} /><span className={styles.createText}>New issue</span></Button>\n              </div>\n            </div>\n          </div>\n\n          <motion.div className={styles.intro} initial={false} animate={{ height: condensed ? 0 : \"auto\" }} transition={reduce ? still : motionTokens.spring.smooth}>\n            <div className={styles.introInner}>\n              <motion.div className={styles.titleRow} initial={false} animate={condensed ? { opacity: 0, y: -10, scale: .62, filter: blur(motionTokens.blur.subtle) } : shown} transition={swap(!condensed)}>\n                <h2 ref={titleRef} id={`${id}-title`} className={styles.title} tabIndex={-1}>Checkout redesign</h2>\n                <Badge tone={status.tone} dot>{status.label}</Badge>\n              </motion.div>\n              <motion.div className={styles.details} initial={false} animate={condensed ? { opacity: 0, y: -6 } : { opacity: 1, y: 0 }} transition={swap(!condensed)}>\n                <p className={styles.description}>Rebuilding mobile checkout around saved payment methods and a single review step, then rolling it out in stages from October 14.</p>\n                <div className={styles.meta}>\n                  <AvatarGroup members={members} max={4} size=\"sm\" label=\"Project members\" />\n                  <span>Led by <strong>Emma Collins</strong></span>\n                  <span className={styles.metaIcon}><CalendarDays size={14} strokeWidth={1.75} aria-hidden=\"true\" />Target Oct 14</span>\n                </div>\n              </motion.div>\n            </div>\n          </motion.div>\n\n          <LayoutGroup id={id}>\n            <TabsPrimitive.List asChild aria-label=\"Project sections\">\n              <motion.div ref={tabList} layoutScroll className={styles.tabs}>\n                {sections.map(item => {\n                  const count = item.value === \"issues\" ? issues.length : item.value === \"updates\" ? updates.length : item.value === \"files\" ? files.length : null;\n                  return <TabsPrimitive.Trigger key={item.value} value={item.value} className={styles.tab}>\n                    <span className={styles.tabLabel}>{item.label}</span>\n                    {count !== null && <span className={styles.count}><AnimatedCounter value={count} /></span>}\n                    {view.section === item.value && <motion.span className={styles.indicator} layoutId=\"indicator\" layoutDependency={view.section} transition={reduce ? still : motionTokens.spring.morph} aria-hidden=\"true\" />}\n                  </TabsPrimitive.Trigger>;\n                })}\n              </motion.div>\n            </TabsPrimitive.List>\n          </LayoutGroup>\n        </header>\n\n        <div ref={scroller} className={styles.scroller} onScroll={onScroll}>\n          <AnimatePresence initial={false} mode=\"popLayout\" custom={view.direction}>\n            <TabsPrimitive.Content key={view.section} value={view.section} forceMount asChild>\n              <motion.div className={styles.panel} custom={view.direction} variants={reduce ? panelFade : panelSlide} initial=\"enter\" animate=\"center\" exit=\"exit\">\n                {view.section === \"overview\" && <OverviewPanel done={done} open={issues.length} />}\n                {view.section === \"issues\" && <IssuesPanel issues={issues} closing={closing} reduce={reduce} onComplete={completeIssue} onReset={resetIssues} register={(key, node) => { if (node) toggles.current.set(key, node); else toggles.current.delete(key); }} />}\n                {view.section === \"updates\" && <UpdatesPanel updates={updates} reduce={reduce} />}\n                {view.section === \"files\" && <FilesPanel />}\n              </motion.div>\n            </TabsPrimitive.Content>\n          </AnimatePresence>\n        </div>\n\n        <div className={styles.toastLayer} aria-hidden=\"true\">\n          <AnimatePresence initial={false} mode=\"popLayout\">\n            {notice && <motion.div key={notice.key} className={styles.toast} data-tone={notice.tone} initial={reduce ? { opacity: 0 } : { opacity: 0, y: 14, filter: blur(motionTokens.blur.soft) }} animate={{ opacity: 1, y: 0, filter: blur(0) }} exit={reduce ? { opacity: 0, transition: still } : { opacity: 0, y: 8, filter: blur(motionTokens.blur.subtle), transition: quick }} transition={reduce ? { duration: motionTokens.duration.instant } : { ...motionTokens.spring.snappy, opacity: { duration: motionTokens.duration.fast, ease: [...motionTokens.ease.standard] }, filter: { duration: motionTokens.duration.fast, ease: [...motionTokens.ease.standard] } }}>\n              {notice.tone === \"success\" ? <Check {...icon} /> : notice.tone === \"error\" ? <CircleAlert {...icon} /> : null}\n              <span>{notice.text}</span>\n            </motion.div>}\n          </AnimatePresence>\n        </div>\n        <p className={styles.srOnly} role=\"status\" aria-live=\"polite\">{notice?.text}</p>\n      </section>\n    </TabsPrimitive.Root>\n  );\n}\n\nexport default PageHeader;\n"},{"path":"lib/use-copy-feedback.ts","type":"registry:lib","target":"@components/arc/lib/use-copy-feedback.ts","content":"\"use client\";\n\nimport { useCallback, useEffect, useRef, useState } from \"react\";\n\nexport type CopyFeedbackState = \"idle\" | \"copied\" | \"error\";\n\n/**\n * Writes text to the clipboard. Uses the async Clipboard API and falls back to a hidden textarea with\n * document.execCommand(\"copy\") when the API is missing or refused (sandboxed or cross-origin iframes, Safari\n * inside embedded previews, insecure contexts). Must be called from a user gesture. Rejects only when both fail.\n */\nexport async function writeClipboard(text: string): Promise<void> {\n  try {\n    if (navigator.clipboard?.writeText) {\n      await navigator.clipboard.writeText(text);\n      return;\n    }\n  } catch {\n    // Fall through to the legacy path below.\n  }\n  const active = document.activeElement as HTMLElement | null;\n  const selection = document.getSelection();\n  const ranges = selection ? Array.from({ length: selection.rangeCount }, (_, index) => selection.getRangeAt(index)) : [];\n  const area = document.createElement(\"textarea\");\n  area.value = text;\n  // Off screen but rendered (iOS will not select inside an invisible or pointer-less node), at the current scroll\n  // position so nothing jumps, and 16px so iOS never zooms.\n  area.style.cssText = `position:absolute;left:-9999px;top:${window.scrollY || document.documentElement.scrollTop}px;width:1px;height:1px;font-size:16px;border:0;padding:0;margin:0;`;\n  document.body.appendChild(area);\n  // iOS Safari ignores select() on a textarea, so it gets a range selection over an editable node instead; while the\n  // node is editable only for this instant, the keyboard never opens. Other browsers take select() as usual.\n  area.contentEditable = \"true\";\n  area.readOnly = false;\n  const range = document.createRange();\n  range.selectNodeContents(area);\n  selection?.removeAllRanges();\n  selection?.addRange(range);\n  area.select();\n  area.setSelectionRange(0, text.length);\n  area.contentEditable = \"false\";\n  area.readOnly = true;\n  let ok = false;\n  try { ok = document.execCommand(\"copy\"); } catch { ok = false; }\n  area.remove();\n  if (selection) { selection.removeAllRanges(); ranges.forEach(range => selection.addRange(range)); }\n  active?.focus?.({ preventScroll: true });\n  if (!ok) throw new Error(\"Copy failed\");\n}\n\n/** Shared clipboard state for actions that render their own button or menu. */\nexport function useCopyFeedback(duration = 1900) {\n  const [state, setState] = useState<CopyFeedbackState>(\"idle\");\n  const [activeKey, setActiveKey] = useState<string | null>(null);\n  const timeout = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n  const reset = useCallback(() => {\n    if (timeout.current) clearTimeout(timeout.current);\n    timeout.current = null;\n    setState(\"idle\");\n    setActiveKey(null);\n  }, []);\n\n  useEffect(() => () => {\n    if (timeout.current) clearTimeout(timeout.current);\n  }, []);\n\n  const copy = useCallback(async (value: string, key = \"default\") => {\n    if (timeout.current) clearTimeout(timeout.current);\n    setActiveKey(key);\n    try {\n      await writeClipboard(value);\n      setState(\"copied\");\n      timeout.current = setTimeout(reset, duration);\n      return true;\n    } catch {\n      setState(\"error\");\n      timeout.current = setTimeout(reset, duration);\n      return false;\n    }\n  }, [duration, reset]);\n\n  return { state, activeKey, copy, reset };\n}\n"},{"path":"registry/blocks/page-header/page-header.module.css","type":"registry:component","target":"@components/arc/blocks/page-header/page-header.module.css","content":"/* The frame is the page: a fixed header over a scrolling body. Breakpoints follow the frame width, not the viewport. */\n.frame { --pad: 28px; position: relative; display: flex; width: min(100%, 980px); height: 640px; min-width: 0; flex-direction: column; margin-inline: auto; overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--foreground); font-family: var(--font-body); font-size: var(--text-sm); letter-spacing: var(--tracking-body); line-height: var(--leading-body); container: page-header / inline-size; }\n\n.header { position: relative; z-index: 1; flex: none; padding: 16px var(--pad) 0; background: var(--surface); box-shadow: inset 0 -1px 0 var(--border); }\n.bar { display: grid; min-height: var(--control-height-sm); grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; }\n/* Breadcrumbs and the compact title share one cell and trade places when the header condenses. */\n.lead { display: grid; min-width: 0; align-items: center; }\n.lead > * { grid-area: 1 / 1; min-width: 0; }\n\n.crumbs ol { display: flex; min-width: 0; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }\n.crumbs li { display: inline-flex; flex: none; align-items: center; gap: 6px; color: var(--text-muted); white-space: nowrap; }\n.crumbs li:last-child { flex: 0 1 auto; min-width: 0; }\n.crumbs li > svg { flex: none; color: var(--border-strong); }\n.crumb { margin: 0; border: 0; border-radius: 8px; padding: 4px 2px; background: none; color: var(--text-muted); font: inherit; letter-spacing: inherit; cursor: pointer; transition: color var(--duration-fast) var(--ease-standard); }\n.current { display: block; min-width: 0; overflow: hidden; color: var(--text-secondary); text-overflow: ellipsis; }\n\n.compact { display: inline-flex; max-width: calc(100% + 8px); justify-self: start; align-items: center; gap: 10px; margin-left: -8px; border: 0; border-radius: 8px; padding: 5px 8px; background: transparent; color: var(--foreground); font: inherit; letter-spacing: inherit; text-align: left; cursor: pointer; transition: background-color var(--duration-fast) var(--ease-standard); }\n.compactTitle { min-width: 0; overflow: hidden; font-size: var(--text-base); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }\n.compactBadge { flex: none; }\n\n/* Secondary actions fold to the right, under the overflow button, as their slot narrows. Only the right edge clips. */\n.actions { display: flex; align-items: center; justify-content: flex-end; }\n.secondary { display: flex; flex: none; clip-path: inset(-8px 0 -8px -8px); }\n.secondaryInner { display: flex; flex: none; gap: 8px; padding-right: 8px; }\n.trailing { display: flex; flex: none; align-items: center; gap: 8px; }\n.actions .iconButton { width: var(--control-height-sm); padding-inline: 0; }\n\n.intro { overflow: clip; }\n.introInner { display: grid; justify-items: start; gap: 10px; padding: 18px 0 20px; }\n.titleRow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; transform-origin: 0 0; }\n.title { margin: 0; font-family: var(--font-display); font-size: var(--text-3xl); font-weight: 500; letter-spacing: var(--tracking-display); line-height: var(--leading-display); }\n.title:focus { outline: none; }\n.details { display: grid; justify-items: start; gap: 14px; }\n.description { max-width: 60ch; margin: 0; color: var(--text-secondary); text-wrap: pretty; }\n.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; color: var(--text-muted); font-size: var(--text-xs); }\n.metaIcon { display: inline-flex; align-items: center; gap: 6px; }\n.meta strong { color: var(--text-secondary); font-weight: 500; }\n\n/* Tabs bleed to the frame edges so the rule under them spans the page; the first label lines up with the title. */\n.tabs { position: relative; display: flex; gap: 2px; margin: 2px calc(var(--pad) * -1) 0; padding: 0 calc(var(--pad) - 10px); overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }\n.tabs::-webkit-scrollbar { display: none; }\n.tab { position: relative; display: inline-flex; height: 44px; flex: none; align-items: center; gap: 6px; border: 0; padding: 0 10px; background: none; color: var(--text-secondary); font: inherit; font-weight: 500; letter-spacing: inherit; white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: color var(--duration-fast) var(--ease-standard); }\n.tab::before { position: absolute; inset: 8px 0; border-radius: 8px; background: color-mix(in oklab, var(--foreground) 4.5%, transparent); content: \"\"; opacity: 0; transition: opacity var(--duration-fast) var(--ease-standard); }\n.tab[data-state=\"active\"] { color: var(--foreground); }\n.tabLabel, .count { position: relative; }\n.count { color: var(--text-muted); font-variant-numeric: tabular-nums; }\n.tab[data-state=\"active\"] .count { color: var(--text-secondary); }\n/* The shared counter renders at display size by default; here it takes the tab's type. */\n.count > span { color: inherit; font-family: inherit; font-size: inherit; font-weight: inherit; letter-spacing: inherit; line-height: inherit; }\n.indicator { position: absolute; right: 10px; bottom: 0; left: 10px; height: 2px; border-radius: 2px 2px 0 0; background: var(--accent); }\n\n.scroller { position: relative; flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 28px var(--pad) 84px; scrollbar-color: var(--border-strong) transparent; scrollbar-width: thin; }\n/* Every panel is taller than the condensed viewport, so condensing never clamps the scroll back to the top. */\n.panel { min-height: 600px; }\n.sectionTitle { margin: 0 0 8px; font-size: var(--text-sm); font-weight: 500; }\n.note { color: var(--text-muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; white-space: nowrap; }\n\n.overview { display: grid; gap: 36px; }\n.progress { max-width: 480px; }\n.milestones, .activity, .issues, .updates, .files { margin: 0; padding: 0; list-style: none; }\n.milestones li { display: grid; min-height: 48px; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; border-bottom: 1px solid var(--border-subtle); }\n.milestones li:last-child, .activity li:last-child, .files li:last-child { border-bottom: 0; }\n.milestones li > svg { color: var(--text-muted); }\n.milestones li[data-state=\"done\"] > svg { color: var(--success); }\n.milestones li[data-state=\"active\"] > svg { color: var(--accent); }\n.activity li { display: grid; min-height: 52px; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; border-bottom: 1px solid var(--border-subtle); }\n.activity p { margin: 0; color: var(--text-secondary); }\n.activity strong { color: var(--foreground); font-weight: 500; }\n\n.issue, .update { overflow-x: visible; overflow-y: clip; border-bottom: 1px solid var(--border-subtle); }\n.issue:last-child, .update:last-child { border-bottom-color: transparent; }\n.issueInner { position: relative; isolation: isolate; display: grid; min-height: 52px; grid-template-columns: 32px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; margin-inline: -10px; padding: 4px 10px; }\n.check { position: relative; display: grid; width: 32px; height: 32px; place-items: center; margin-left: -7px; border: 0; border-radius: 50%; padding: 0; background: none; color: var(--text-muted); cursor: pointer; transition: color var(--duration-fast) var(--ease-standard), background-color var(--duration-fast) var(--ease-standard); }\n.checkGlyph { display: grid; place-items: center; }\n.issue[data-closing] .check { color: var(--success); cursor: default; }\n.issueText { display: flex; min-width: 0; align-items: baseline; gap: 12px; }\n.issueId { flex: none; min-width: 60px; color: var(--text-muted); font-size: var(--text-xs); }\n.issueTitle { min-width: 0; overflow: hidden; text-decoration: line-through transparent; text-overflow: ellipsis; white-space: nowrap; transition: color var(--duration-standard) var(--ease-standard), text-decoration-color var(--duration-standard) var(--ease-standard); }\n.issue[data-closing] .issueTitle { color: var(--text-muted); text-decoration-color: currentColor; }\n.issueLabel { color: var(--text-muted); font-size: var(--text-xs); }\n/* A new row arrives lit and settles to the page, so it is easy to find without a lasting marker. */\n.issue[data-fresh] .issueInner::before, .update[data-fresh] .updateInner::before { position: absolute; z-index: -1; inset: 3px 0; border-radius: 10px; background: color-mix(in oklab, var(--foreground) 6%, transparent); content: \"\"; animation: arrived 1.8s var(--ease-standard) both; }\n@keyframes arrived { 0%, 35% { opacity: 1; } 100% { opacity: 0; } }\n\n.updateInner { position: relative; isolation: isolate; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; margin-inline: -10px; padding: 18px 10px; }\n.updateHead { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-height: 22px; }\n.author { font-weight: 500; }\n.updateInner p { max-width: 64ch; margin: 6px 0 0; color: var(--text-secondary); text-wrap: pretty; }\n\n.files li { display: grid; min-height: 56px; grid-template-columns: 16px minmax(0, 1fr) auto 52px; align-items: center; gap: 14px; border-bottom: 1px solid var(--border-subtle); }\n.files li > svg { color: var(--text-secondary); }\n.fileName { display: grid; min-width: 0; }\n.fileName > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.fileDate { color: var(--text-muted); font-size: var(--text-xs); text-align: right; white-space: nowrap; }\n\n.empty { display: grid; justify-items: center; gap: 4px; padding: 72px 16px; text-align: center; }\n.empty > svg { margin-bottom: 8px; color: var(--success); }\n.empty p { margin: 0; font-size: var(--text-base); font-weight: 500; }\n.empty span { color: var(--text-muted); }\n.empty button { margin-top: 14px; }\n\n.toastLayer { position: absolute; z-index: 3; right: 16px; bottom: 16px; left: 16px; display: flex; justify-content: center; pointer-events: none; }\n.toast { display: inline-flex; max-width: 100%; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: var(--radius-control); padding: 9px 14px; background: var(--surface-raised); box-shadow: var(--shadow-floating); color: var(--foreground); font-size: var(--text-sm); }\n.toast > svg { flex: none; color: var(--text-secondary); }\n.toast[data-tone=\"success\"] > svg { color: var(--success); }\n.toast[data-tone=\"error\"] > svg { color: var(--danger); }\n.srOnly { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }\n\n/* The menu grows from the overflow button. Transitions, not keyframes, so a quick reopen reverses from where it is. */\n.menu { --menu-y: -5px; position: relative; z-index: 60; min-width: 13rem; border: 1px solid var(--border); border-radius: var(--radius-panel); padding: 5px; background: var(--surface-raised); box-shadow: var(--shadow-floating); color: var(--foreground); font-family: var(--font-body); font-size: var(--text-sm); letter-spacing: var(--tracking-body); transform-origin: var(--radix-dropdown-menu-content-transform-origin); transition: opacity var(--duration-fast) var(--ease-enter), transform var(--duration-spring) var(--ease-spring); }\n.menu[data-side=\"top\"] { --menu-y: 5px; }\n@starting-style { .menu[data-state=\"open\"] { opacity: 0; transform: translateY(var(--menu-y)) scale(.97); } }\n.menu[data-state=\"closed\"] { opacity: 0; transform: translateY(calc(var(--menu-y) * .5)) scale(.985); transition: opacity var(--duration-instant) var(--ease-standard), transform var(--duration-instant) var(--ease-standard); animation: menu-exit var(--duration-instant) linear both; pointer-events: none; }\n@keyframes menu-exit { to { --menu-exit: 1; } }\n.highlight { position: absolute; top: 0; right: 5px; left: 5px; border-radius: calc(var(--radius-panel) - 6px); background: var(--surface-muted); opacity: 0; pointer-events: none; }\n.item { position: relative; display: flex; min-height: 36px; align-items: center; gap: 10px; border-radius: calc(var(--radius-panel) - 6px); padding: 0 11px; outline: none; cursor: pointer; user-select: none; }\n.item > svg { flex: none; color: var(--text-secondary); }\n.item[data-disabled] { opacity: .45; cursor: default; }\n.separator { height: 1px; margin: 4px -5px; background: var(--border-subtle); }\n\n@media (hover: hover) and (pointer: fine) {\n  .crumb:hover { color: var(--foreground); }\n  .compact:hover { background: color-mix(in oklab, var(--foreground) 4.5%, transparent); }\n  .tab:hover { color: var(--foreground); }\n  .tab:hover::before { opacity: 1; }\n  .check:hover { background: color-mix(in oklab, var(--foreground) 5%, transparent); color: var(--foreground); }\n  .issue[data-closing] .check:hover { background: none; color: var(--success); }\n}\n\n/* Before the first measurement, narrow frames already hide the actions that will fold, so nothing flashes on load. */\n@container page-header (max-width: 719px) { .frame:not([data-measured]) .secondary { width: 0 !important; opacity: 0 !important; } }\n@container page-header (max-width: 559px) {\n  .header, .scroller { --pad: 18px; }\n  .crumbs .rootCrumb, .compact .compactBadge { display: none; }\n  /* The tab row scrolls sideways here; its far edge fades so the next tab reads as more to come. */\n  .tabs { padding-right: calc(var(--pad) + 14px); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }\n  .milestones li { grid-template-columns: 16px minmax(0, 1fr); padding-block: 10px; }\n  .milestones li > .note { grid-column: 2; }\n  .title { font-size: var(--text-2xl); }\n  .introInner { padding-top: 16px; }\n  .issueInner { grid-template-columns: 32px minmax(0, 1fr) auto; align-items: start; padding-block: 10px; }\n  .issueInner .check { margin-top: -6px; }\n  .issueText { display: grid; gap: 2px; }\n  .issueTitle { overflow: visible; white-space: normal; }\n  .issueLabel, .fileDate { display: none; }\n  .files li { grid-template-columns: 16px minmax(0, 1fr) auto; }\n  .activity li { grid-template-columns: auto minmax(0, 1fr); padding-block: 10px; }\n  .activity li > .note { grid-column: 2; margin-top: -8px; }\n}\n@container page-header (max-width: 459px) {\n  .createText { display: none; }\n  .actions .create { width: var(--control-height-sm); padding-inline: 0; }\n}\n/* On a phone the frame is the screen, so it takes most of it rather than stopping short with the body cut mid list. */\n@media (max-width: 560px) { .frame { height: clamp(560px, calc(100svh - 48px), 760px); border-radius: 14px; } }\n\n@media (prefers-reduced-motion: reduce) {\n  .crumb, .compact, .tab, .tab::before, .check, .issueTitle { transition: none; }\n  .menu, .menu[data-state=\"closed\"] { transform: none; transition: opacity var(--duration-instant) linear; }\n}\n"}],"docs":"Use this at the top of a project, repository, or record page. Connect breadcrumbs to your router, tab counts and status to your data, and Follow, Share update, New issue, and Archive to your API; every action in the preview is simulated.","meta":{"tier":"free","kind":"block","builtFrom":["Button","Badge","Animated counter","Avatar group","Avatar","Progress"],"docs":"https://uiarc.dev/components/blocks/page-header"}}