{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "navbar-simple",
  "type": "registry:block",
  "title": "Navbar, simple",
  "description": "Brand on the left, up to eight links, an optional search trigger, secondary link, language link and theme toggle, and one call to action. An optional Products disclosure holds short descriptions and status labels. Collapses to a menu in narrow containers.",
  "categories": [
    "navbar"
  ],
  "dependencies": [
    "lucide-react@^1.49.0",
    "zod@^4.6.5"
  ],
  "registryDependencies": [
    "https://ui.klarhimmel.com/r/block-kit.json",
    "https://ui.klarhimmel.com/r/button.json",
    "https://ui.klarhimmel.com/r/editing.json",
    "https://ui.klarhimmel.com/r/kit-d-chrome.json",
    "https://ui.klarhimmel.com/r/utils.json"
  ],
  "files": [
    {
      "path": "src/blocks/navbar-simple/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/navbar-simple/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, link, logo, media, t, req, mark, wordmark } from '../_shared/schema';\n\nconst schema = z.object({\n  brand: req(40),\n  /** Their logo in place of the brand name; the name stays for screen readers. Not drawn without a src. */\n  wordmark,\n  /** The brand mark before the wordmark: SVG paths in currentColor (or an image src), cap-height tall, aria-hidden. */\n  mark,\n  /** A brand mark before the wordmark (e.g. /favicon.svg). Not drawn without a src. */\n  logo,\n  /** Brand link target; default \"/\". */\n  brandHref: t(300).optional(),\n  links: z.array(link).max(12) // KB-178: raised from 8 for sites with nine to twelve menu links\n,\n  /** Where the links sit on a wide bar, in the room between brand and actions: unset or 'start' beside the brand, 'center' in the middle (a three-zone bar: logo, links, button), 'end' grouped with the actions on the right. A phone draws the menu either way. */\n  linksAlign: z.enum(['start', 'center', 'end']).optional(),\n  /** The links as plain links (unset or 'plain') or, on a wide bar, in one pill-shaped track with the current page's link filled ('segmented'); native anchors, no script. Pair with linksAlign 'center'. A phone's menu stays a plain list. */\n  linksStyle: z.enum(['plain', 'segmented']).optional(),\n  /** A detached bar: inset in the page gutter as a rounded, bordered card with a shadow, in place of the full-width bar with a bottom rule. Unset draws the full-width bar. */\n  floating: z.boolean().optional(),\n  /** An optional navigation disclosure, kept native so product links work without JavaScript. */\n  products: z.object({\n    label: t(24).default(''),\n    layout: z.enum(['list', 'mega']).optional(),\n    items: z.array(link.extend({ description: t(100), status: t(24).optional(), media: media.optional() })).max(8).default([]),\n  }).optional(),\n  dropdowns: z.array(z.object({\n    label: t(24).default(''),\n    layout: z.enum(['list', 'mega']).optional(),\n    items: z.array(link.extend({ description: t(100), status: t(24).optional(), media: media.optional() })).max(8).default([]),\n  })).max(4).optional(),\n  /** The href of the current page's link: that link gets aria-current=\"page\". */\n  current: t(300).optional(),\n  cta: link,\n  /** A trail of up to six pages in a row under the bar, ending at the current page (the last entry, drawn as text; an entry with no href is text too). Unset draws no row. */\n  breadcrumb: z.array(z.object({ label: t(40), href: t(300).optional() })).max(6).optional(),\n  /** Where the call to action sits on a phone with a menu: unset moves it into the menu when brand and button run past about 22 characters, false keeps it in the bar (a site that measured its header fits), true always moves it. */\n  ctaInMenu: z.boolean().optional(),\n  /** A second button beside the primary action; moves into the mobile menu in narrow containers. */\n  secondaryCta: link.extend({ label: t(40).default(''), href: t(300).default('') }).optional(),\n  search: z.object({ label: t(24).default(''), hint: t(12) }).optional(),\n  secondary: link.optional(),\n  /** The same page in another language, beside the theme toggle with a globe: label as the visitor reads it (\"SV\", \"Svenska\"), href, and that page's language code (hreflang, e.g. \"sv\"). */\n  lang: z.object({ label: t(24).default(''), href: t(300).default(''), hreflang: t(16).default('') }).optional(),\n  themeToggle: z.boolean().optional(),\n  /** Sticks to the top of the viewport, on the solid canvas with a hairline. */\n  sticky: z.boolean().optional(),\n  /** Over a hero: transparent and without the hairline while the header has data-kh-at-top (set at scroll 0, by the block when it runs, or by a static page's own script). Without it, solid. The open menu is always solid. Use with sticky. */\n  overlay: z.boolean().optional(),\n});\n\nexport const spec = defineSpec({\n  type: 'navbar-simple',\n  aliases: ['navigation/simple', 'header/simple'],\n  sourceRuns: ['rmwj1v8d44b99a3', 'rmwj1vm8ib3ee62', 'rmwj3el8b02bdd3', 'rmwj3esr47662f6', 'rmwj3dnnk93b9ec', 'rmwj1vj86289573', 'rmwj3dtugb0c706', 'rmwj3e32i50aa2a'],\n  name: 'Navbar, simple',\n  category: 'navbar',\n  role: 'nav',\n  description: 'Brand on the left, up to eight links, an optional search trigger, secondary link, language link and theme toggle, and one call to action. An optional Products disclosure holds short descriptions and status labels. Collapses to a menu in narrow containers.',\n  schema,\n  // Without script the search trigger draws nothing (it opens a dialog) and the theme toggle does nothing: a library row offers neither.\n  rowOmit: ['search', 'themeToggle'],\n  defaults: {\n    brand: 'Brand name',\n    links: [\n      { label: 'First page', href: '#product' },\n      { label: 'Second page', href: '#pricing' },\n      { label: 'Third page', href: '#docs' },\n      { label: 'Fourth page', href: '#about' },\n    ],\n    cta: { label: 'Main action', href: '#start' },\n    search: { label: 'Search', hint: '⌘K' },\n    secondary: { label: 'GitHub', href: '#github' },\n    themeToggle: true,\n  },\n});\n"
    },
    {
      "path": "src/blocks/navbar-simple/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/navbar-simple/index.tsx",
      "content": "// navbar-simple as the registry and the block contract know it: the component and its spec (props schema in zod, default content).\n// A page that only renders the header imports the component alone, '@klarhimmel/ui/blocks/navbar-simple/component': no zod in its bundle.\nexport { default } from './component';\nexport { spec } from './spec';\n"
    },
    {
      "path": "src/blocks/navbar-simple/component.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/navbar-simple/component.tsx",
      "content": "/// <reference path=\"../../css.d.ts\" />\nimport './mega-menu.css';\nimport { useEffect } from 'react';\nimport { ArrowUpRight, ChevronDown, ChevronRight, Globe } from 'lucide-react';\nimport { Text, Media, withHeadingLevel } from '../../editing';\nimport { safeHref } from '../../ui/button';\nimport { ActionLink, BrandMark, brandName, Container, ctaInMenu as ctaMoves, useEditing, Gate, Named, Mark } from '../_shared/kit';\nimport { FOCUS, MenuDetails, SearchTrigger, ThemeToggle, navLinkClass, useMenu } from '../_shared/d-chrome-kit';\nimport { cn } from '../../lib/utils';\n// Type only: the component never runs the schema, so a page that renders the header (./component) ships no zod.\nimport type { spec } from './spec';\nimport type { BlockProps } from '../types';\nimport type { z } from 'zod';\n\ntype Props = z.infer<typeof spec.schema>;\n\n// Many links plus the extras need more room before they sit inline. Class strings are spelled out so Tailwind sees them.\nconst WIDE = {\n  light: {\n    brand: 'mr-auto @3xl:mr-4',\n    secondaryInline: 'hidden @3xl:inline-flex',\n    secondaryMobile: '@3xl:hidden',\n    productPanel: '@3xl:absolute @3xl:end-0 @3xl:top-full @3xl:mt-2 @3xl:w-80 @3xl:border @3xl:shadow-kh-2',\n    details: '@3xl:order-1 @3xl:flex @3xl:flex-1 @3xl:details-content:contents @3xl:details-content:content-visible',\n    panel: '@3xl:static @3xl:order-1 @3xl:flex @3xl:max-h-none @3xl:flex-1 @3xl:basis-auto @3xl:flex-row @3xl:items-center @3xl:justify-between @3xl:gap-3 @3xl:overflow-visible @3xl:border-0 @3xl:bg-transparent @3xl:p-0',\n    list: '@3xl:mx-0 @3xl:flex-row @3xl:gap-1',\n    link: '@3xl:w-auto @3xl:px-2.5 @3xl:text-kh-small',\n    tools: '@3xl:w-auto @3xl:flex-nowrap @3xl:border-0 @3xl:pt-0',\n    full: '@3xl:w-auto',\n    compact: '',\n    button: '@3xl:hidden',\n    toggle: '@3xl:ml-0',\n    row: '@3xl:flex-nowrap',\n    arrow: '',\n    cta: '@3xl:order-2',\n    /** The actions row twice, one per width, so the DOM order is the visual order: before the menu button when it shows, after the navigation when the links sit inline. */\n    actionsNarrow: '@3xl:hidden',\n    actionsWide: 'hidden @3xl:flex',\n    link2: '@3xl:mx-0',\n    /** linksAlign: where the inline links sit in the room between brand and actions (the study's three-zone bar and Linear-style grouped right). */\n    navCenter: '@3xl:mx-auto',\n    navEnd: '@3xl:ml-auto',\n    /** linksStyle 'segmented': the inline links in one pill track, the current one filled. */\n    segList: '@3xl:items-center @3xl:rounded-kh-pill @3xl:bg-kh-surface-2 @3xl:p-1 @3xl:gap-1',\n    segLink: '@3xl:min-h-0 @3xl:rounded-kh-pill @3xl:px-4 @3xl:py-1.5 @3xl:text-kh-muted @3xl:hover:bg-transparent @3xl:aria-[current=page]:bg-kh-surface @3xl:aria-[current=page]:text-kh-ink @3xl:aria-[current=page]:shadow-kh-1 @3xl:aria-[current=page]:no-underline',\n  },\n  products: {\n    brand: 'mr-auto @5xl:mr-4',\n    secondaryInline: 'hidden @5xl:inline-flex',\n    secondaryMobile: '@5xl:hidden',\n    productPanel: '@5xl:absolute @5xl:end-0 @5xl:top-full @5xl:mt-2 @5xl:w-80 @5xl:border @5xl:shadow-kh-2',\n    details: '@5xl:order-1 @5xl:flex @5xl:flex-1 @5xl:details-content:contents @5xl:details-content:content-visible',\n    panel: '@5xl:static @5xl:order-1 @5xl:flex @5xl:max-h-none @5xl:flex-1 @5xl:basis-auto @5xl:flex-row @5xl:items-center @5xl:justify-between @5xl:gap-3 @5xl:overflow-visible @5xl:border-0 @5xl:bg-transparent @5xl:p-0',\n    list: '@5xl:mx-0 @5xl:flex-row @5xl:gap-1',\n    link: '@5xl:w-auto @5xl:px-2.5 @5xl:text-kh-small',\n    tools: '@5xl:w-auto @5xl:flex-nowrap @5xl:border-0 @5xl:pt-0',\n    full: '@5xl:w-auto',\n    compact: '',\n    button: '@5xl:hidden',\n    toggle: '@5xl:ml-0',\n    row: '@5xl:flex-nowrap',\n    arrow: '',\n    cta: '@5xl:order-2',\n    /** The actions row twice, one per width, so the DOM order is the visual order: before the menu button when it shows, after the navigation when the links sit inline. */\n    actionsNarrow: '@5xl:hidden',\n    actionsWide: 'hidden @5xl:flex',\n    link2: '@5xl:mx-0',\n    /** linksAlign: where the inline links sit in the room between brand and actions (the study's three-zone bar and Linear-style grouped right). */\n    navCenter: '@5xl:mx-auto',\n    navEnd: '@5xl:ml-auto',\n    /** linksStyle 'segmented': the inline links in one pill track, the current one filled. */\n    segList: '@5xl:items-center @5xl:rounded-kh-pill @5xl:bg-kh-surface-2 @5xl:p-1 @5xl:gap-1',\n    segLink: '@5xl:min-h-0 @5xl:rounded-kh-pill @5xl:px-4 @5xl:py-1.5 @5xl:text-kh-muted @5xl:hover:bg-transparent @5xl:aria-[current=page]:bg-kh-surface @5xl:aria-[current=page]:text-kh-ink @5xl:aria-[current=page]:shadow-kh-1 @5xl:aria-[current=page]:no-underline',\n  },\n  heavy: {\n    brand: 'mr-auto @6xl:mr-3',\n    secondaryInline: 'hidden @6xl:inline-flex',\n    secondaryMobile: '@6xl:hidden',\n    productPanel: '@6xl:absolute @6xl:end-0 @6xl:top-full @6xl:mt-2 @6xl:w-80 @6xl:border @6xl:shadow-kh-2',\n    details: '@6xl:order-1 @6xl:flex @6xl:flex-1 @6xl:details-content:contents @6xl:details-content:content-visible',\n    panel: '@6xl:static @6xl:order-1 @6xl:flex @6xl:max-h-none @6xl:flex-1 @6xl:basis-auto @6xl:flex-row @6xl:items-center @6xl:justify-between @6xl:gap-3 @6xl:overflow-visible @6xl:border-0 @6xl:bg-transparent @6xl:p-0',\n    list: '@6xl:mx-0 @6xl:flex-row @6xl:gap-1',\n    link: '@6xl:w-auto @6xl:px-2.5 @6xl:text-kh-small',\n    tools: '@6xl:w-auto @6xl:flex-nowrap @6xl:border-0 @6xl:pt-0',\n    full: '@6xl:w-auto',\n    compact: '@6xl:sr-only',\n    button: '@6xl:hidden',\n    toggle: '@6xl:ml-0',\n    row: '@6xl:flex-nowrap',\n    arrow: '@6xl:hidden',\n    cta: '@6xl:order-2',\n    /** The actions row twice, one per width, so the DOM order is the visual order: before the menu button when it shows, after the navigation when the links sit inline. */\n    actionsNarrow: '@6xl:hidden',\n    actionsWide: 'hidden @6xl:flex',\n    link2: '@6xl:mx-0',\n    /** linksAlign: where the inline links sit in the room between brand and actions (the study's three-zone bar and Linear-style grouped right). */\n    navCenter: '@6xl:mx-auto',\n    navEnd: '@6xl:ml-auto',\n    /** linksStyle 'segmented': the inline links in one pill track, the current one filled. */\n    segList: '@6xl:items-center @6xl:rounded-kh-pill @6xl:bg-kh-surface-2 @6xl:p-1 @6xl:gap-1',\n    segLink: '@6xl:min-h-0 @6xl:rounded-kh-pill @6xl:px-4 @6xl:py-1.5 @6xl:text-kh-muted @6xl:hover:bg-transparent @6xl:aria-[current=page]:bg-kh-surface @6xl:aria-[current=page]:text-kh-ink @6xl:aria-[current=page]:shadow-kh-1 @6xl:aria-[current=page]:no-underline',\n  },\n} as const;\n\nfunction ProductLinks({ products, panelClass, linkClass, current, onPick, path = ['products'] }: {\n  products: NonNullable<Props['products']>; panelClass: string; linkClass: string; current?: string; onPick: () => void; path?: (string | number)[];\n}) {\n  const { shown, setOpen, rootRef, rootProps, detailsRef, summaryRef } = useMenu();\n  return <Gate label={products.label}>\n    <li ref={el => { rootRef.current = el; }} {...rootProps} className=\"relative\" onKeyDown={e => {\n      if (e.key === 'Escape' && (shown || detailsRef.current?.open)) {\n        e.preventDefault(); e.stopPropagation();\n        if (detailsRef.current) detailsRef.current.open = false;\n        setOpen(false); summaryRef.current?.focus();\n      }\n    }}>\n      <details name=\"kh-nav-dropdowns\" ref={detailsRef} open={shown} onToggle={e => setOpen(e.currentTarget.open)} className={cn(\"group/products\", products.layout === \"mega\" && \"kh-mega-menu\")}>\n        <summary ref={summaryRef} className={cn(navLinkClass, 'w-full cursor-pointer list-none gap-1.5 whitespace-nowrap px-3 text-kh-body [&::-webkit-details-marker]:hidden', linkClass)}>\n          <Text path={[...path, 'label']} value={products.label} as=\"span\" />\n          <ChevronDown aria-hidden className=\"size-4 transition-transform group-open/products:rotate-180\" />\n        </summary>\n        <ul className={cn('z-30 w-full max-w-[calc(100cqw-2rem)] rounded-kh-lg border-kh-line bg-kh-canvas p-2', products.layout !== 'mega' && 'space-y-1', panelClass)}>\n          {(products.items ?? []).map((p,i) => <Gate key={i} label={p.label}><li>\n            <a href={safeHref(p.href)} aria-current={current === p.href ? 'page' : undefined} onClick={() => { setOpen(false); onPick(); }} className={cn('flex min-h-11 flex-col gap-1 rounded-kh px-3 py-3 text-kh-small text-kh-ink hover:bg-kh-surface-2', FOCUS)}>\n              {/* decorative: the label and description beside it name the link, so the picture has no alt of its own */}\n              {p.media && <Media path={[...path,'items',i,'media']} value={{ ...p.media, alt: '' }} ratio=\"16 / 10\" />}\n              <span className=\"kh-dropdown-text flex min-w-0 flex-col gap-1\">\n              <span className=\"flex flex-wrap items-center gap-2 font-medium\"><Text path={[...path,'items',i,'label']} value={p.label} as=\"span\" />{p.status && <Text path={[...path,'items',i,'status']} value={p.status} as=\"span\" className=\"rounded-kh-pill border border-kh-line px-2 py-0.5 text-kh-caption font-normal text-kh-muted\" />}</span>\n              <Text path={[...path,'items',i,'description']} value={p.description} as=\"span\" className=\"whitespace-normal text-kh-caption font-normal text-kh-muted\" />\n              </span>\n            </a>\n          </li></Gate>)}\n        </ul>\n      </details>\n    </li>\n  </Gate>;\n}\n\nfunction NavbarSimple({ props }: BlockProps<Props>) {\n  const { shown, setOpen, menuId, summaryRef, detailsRef, rootRef, rootProps } = useMenu();\n  const editing = useEditing();\n  const { search, secondary, secondaryCta, themeToggle, current, lang } = props;\n  const w = (props.links.length + (props.products ? 1 : 0) + (props.dropdowns?.length ?? 0)) > 5 || search || secondary ? WIDE.heavy : props.products || props.dropdowns?.length ? WIDE.products : WIDE.light;\n  // A long brand and call to action: the button moves into the menu below @md (UI-48, see ctaInMenu in kit).\n  const ctaInMenu = ctaMoves({ ...props, editing });\n  const hasTools = !!(ctaInMenu || (secondary && (secondary.label || editing)) || secondaryCta?.label || search || themeToggle || (lang && (lang.label || editing)));\n  // Overlay: the header says when it sits at the top (a static page that never runs this sets the attribute itself).\n  useEffect(() => {\n    const header = rootRef.current;\n    if (!props.overlay || !header) return;\n    const sync = () => header.toggleAttribute('data-kh-at-top', window.scrollY <= 8);\n    sync();\n    window.addEventListener('scroll', sync, { passive: true });\n    return () => window.removeEventListener('scroll', sync);\n  }, [props.overlay, rootRef]);\n  // The mobile sheet (the Menu summary is showing): while it is open, Tab and Shift+Tab cycle inside the header, focus that lands\n  // outside comes back to the Menu button, and the page behind does not scroll. Inline (wide) nothing of this applies.\n  const isSheet = () => !!summaryRef.current && getComputedStyle(summaryRef.current).display !== 'none';\n  useEffect(() => {\n    const header = rootRef.current;\n    if (!shown || editing || !header) return;\n    const root = document.documentElement;\n    const lock = () => root.classList.toggle('kh-menu-open', isSheet());\n    lock();\n    const focusables = () => [...header.querySelectorAll<HTMLElement>('a[href], button:not([disabled]), summary, input:not([disabled]), select, textarea, [tabindex]:not([tabindex=\"-1\"])')]\n      .filter((el) => {\n        if (!el.getClientRects().length || el.closest('[inert]')) return false;\n        const shut = el.closest('details:not([open])'); // inside a closed disclosure only its own summary can be reached\n        return !shut || (el.tagName === 'SUMMARY' && el.parentElement === shut && !shut.parentElement?.closest('details:not([open])'));\n      });\n    const tab = (e: globalThis.KeyboardEvent) => {\n      if (e.key !== 'Tab' || !isSheet()) return;\n      const all = focusables();\n      if (!all.length) return;\n      // Every press is moved here, not only at the ends: browsers differ in what Tab reaches (Safari skips links by default),\n      // and a native step out of the header would pass through the page first.\n      e.preventDefault();\n      const i = all.indexOf(document.activeElement as HTMLElement);\n      const next = i < 0 ? (e.shiftKey ? all.length - 1 : 0) : (i + (e.shiftKey ? -1 : 1) + all.length) % all.length;\n      all[next]!.focus();\n    };\n    const back = (e: FocusEvent) => { if (isSheet() && e.target instanceof Node && !header.contains(e.target)) summaryRef.current?.focus(); };\n    document.addEventListener('keydown', tab);\n    document.addEventListener('focusin', back);\n    window.addEventListener('resize', lock);\n    return () => {\n      root.classList.remove('kh-menu-open');\n      document.removeEventListener('keydown', tab);\n      document.removeEventListener('focusin', back);\n      window.removeEventListener('resize', lock);\n    };\n  }, [shown, editing, rootRef, summaryRef]); // eslint-disable-line react-hooks/exhaustive-deps\n  // In the sheet, focus leaving the header is brought back (above), so blur does not close it; inline it closes as before.\n  const onBlur = (e: React.FocusEvent) => { if (!isSheet()) rootProps.onBlur(e); };\n  const actions = (className: string, narrow = false) => (\n    <div className={cn('flex shrink-0 items-center gap-2', className)}>\n      {secondaryCta && <ActionLink path={['secondaryCta']} value={secondaryCta} variant=\"secondary\" size=\"md\" className={w.secondaryInline} />}\n      <ActionLink path={['cta']} value={props.cta} size=\"md\" className={narrow && ctaInMenu ? '@max-md:hidden' : undefined} />\n    </div>\n  );\n  return (\n    <header ref={rootRef} onBlur={onBlur} data-kh-sticky={props.sticky ? '' : undefined} data-kh-overlay={props.overlay ? '' : undefined} className={props.floating ? 'kh-navbar-simple relative bg-kh-canvas px-kh-gutter py-4' : 'kh-navbar-simple relative border-b border-kh-line bg-kh-canvas'}>\n      {/* One row at any width (portal c-20261016-1348: a long business name pushed the menu onto its own row at 390): the brand\n          shrinks and its name breaks onto at most two lines; the editor still wraps, for its full-width menu row. */}\n      <Container className={cn('kh-navbar-container flex min-h-16 items-center gap-2 py-2', props.floating && 'rounded-kh-xl border border-kh-line bg-kh-surface px-4 shadow-kh-2', editing ? 'flex-wrap' : 'flex-nowrap', w.row)}>\n        <Named as=\"a\" href={safeHref(props.brandHref ?? '/')} className={cn('inline-flex min-w-0 items-center gap-(--kh-mark-gap) rounded-kh-sm text-kh-heading font-semibold tracking-tight text-kh-ink', FOCUS, w.brand)}>\n          {!props.wordmark?.src && <Mark mark={props.mark} />}\n          {!props.wordmark?.src && <BrandMark path={['logo']} logo={props.logo} />}\n          {brandName({ brand: props.brand, wordmark: props.wordmark, className: 'line-clamp-2 min-w-0 leading-tight hyphens-auto [overflow-wrap:anywhere]' })}\n        </Named>\n        {actions(w.actionsNarrow, true)}\n        <MenuDetails shown={shown} onToggle={setOpen} summaryRef={summaryRef} detailsRef={detailsRef} className={w.button} detailsClass={cn(w.details, editing && 'order-last basis-full')}>\n        <div\n          id={menuId}\n          onClick={(e) => { if ((e.target as Element).closest('a[href]')) setOpen(false); }}\n          className={cn(\n            'flex flex-col gap-4 border-b border-kh-line bg-kh-canvas pb-5 pt-2',\n            editing ? 'order-last basis-full' : 'absolute inset-x-0 top-full z-10 max-h-[calc(100dvh-4rem)] overflow-y-auto px-kh-gutter',\n            w.panel,\n          )}\n        >\n          <nav aria-label=\"Main\" className={props.linksAlign === 'center' ? w.navCenter : props.linksAlign === 'end' ? w.navEnd : undefined}>\n            <ul className={cn('-mx-3 flex flex-col gap-0.5', w.list, props.linksStyle === 'segmented' && w.segList)}>\n              {props.dropdowns?.map((dropdown, i) => <ProductLinks key={i} products={dropdown} path={['dropdowns', i]} panelClass={w.productPanel} linkClass={w.link} current={current} onPick={() => setOpen(false)} />)}\n              {props.links.map((l, i) => (\n                <Gate key={i} label={l.label}>\n                <li>\n                  <a href={safeHref(l.href)} aria-current={current && l.href === current ? 'page' : undefined} onClick={() => setOpen(false)} className={cn(navLinkClass, 'w-full whitespace-nowrap px-3 text-kh-body', w.link, props.linksStyle === 'segmented' && w.segLink)}>\n                    <Text path={['links', i, 'label']} value={l.label} as=\"span\" />\n                  </a>\n                </li>\n                </Gate>\n              ))}\n              {props.products && <ProductLinks products={props.products} panelClass={w.productPanel} linkClass={w.link} current={current} onPick={() => setOpen(false)} />}\n            </ul>\n          </nav>\n          {hasTools && (\n            <div className={cn('flex flex-wrap items-center gap-2 border-t border-kh-line pt-4', w.tools)}>\n              {ctaInMenu && <ActionLink path={['cta']} value={props.cta} size=\"md\" className=\"w-full @md:hidden\" />}\n              {secondaryCta && <ActionLink path={['secondaryCta']} value={secondaryCta} variant=\"secondary\" size=\"md\" className={cn('w-full', w.secondaryMobile)} />}\n              {search && <SearchTrigger path={['search']} label={search.label} hint={search.hint} compactLabel={w.compact} className={cn('w-full', w.full)} />}\n              {secondary && (\n                <Gate label={secondary.label}>\n                <a href={safeHref(secondary.href)} className={cn(navLinkClass, '-mx-3 gap-1 whitespace-nowrap', w.link2)}>\n                  <Text path={['secondary', 'label']} value={secondary.label} as=\"span\" />\n                  <ArrowUpRight aria-hidden strokeWidth={1.75} className={cn('size-4 text-kh-muted', w.arrow)} />\n                </a>\n                </Gate>\n              )}\n              {lang && (\n                <Gate label={lang.label}>\n                <a href={safeHref(lang.href)} hrefLang={lang.hreflang || undefined} lang={lang.hreflang || undefined} className={cn(navLinkClass, '-mx-3 gap-1.5 whitespace-nowrap', w.link2)}>\n                  <Globe aria-hidden strokeWidth={1.75} className=\"size-4 text-kh-muted\" />\n                  <Text path={['lang', 'label']} value={lang.label} as=\"span\" />\n                </a>\n                </Gate>\n              )}\n              {themeToggle && <ThemeToggle className={cn('ml-auto', w.toggle)} />}\n            </div>\n          )}\n        </div>\n        </MenuDetails>\n        {actions(cn(w.actionsWide, w.cta))}\n      </Container>\n      {!!props.breadcrumb?.length && (\n        <nav aria-label=\"Breadcrumb\" className=\"border-t border-kh-line\">\n          <Container className=\"py-2\">\n            <ol className=\"flex flex-wrap items-center gap-x-2 gap-y-1 text-kh-small text-kh-muted\">\n              {props.breadcrumb.map((b, i, all) => {\n                const last = i === all.length - 1;\n                return (\n                  <li key={i} className=\"flex items-center gap-2\">\n                    {i > 0 && <ChevronRight aria-hidden strokeWidth={1.75} className=\"size-3.5 shrink-0\" />}\n                    {b.href && !last ? (\n                      <a href={safeHref(b.href)} className={cn('rounded-kh-sm hover:text-kh-ink', FOCUS)}><Text path={['breadcrumb', i, 'label']} value={b.label} as=\"span\" /></a>\n                    ) : (\n                      <span aria-current={last ? 'page' : undefined} className={last ? 'text-kh-ink' : undefined}><Text path={['breadcrumb', i, 'label']} value={b.label} as=\"span\" /></span>\n                    )}\n                  </li>\n                );\n              })}\n            </ol>\n          </Container>\n        </nav>\n      )}\n    </header>\n  );\n}\n\nexport default withHeadingLevel(NavbarSimple);\n"
    },
    {
      "path": "src/blocks/navbar-simple/mega-menu.css",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/navbar-simple/mega-menu.css",
      "content": ".kh-mega-menu > ul { display:grid; grid-template-columns:minmax(0,1fr); gap:.25rem; }\n.kh-mega-menu > ul > li > a { flex-direction:row; align-items:start; gap:.75rem; padding:.625rem; }\n.kh-navbar-simple { --kh-nav-container-width:var(--container-kh-page,72rem); }\n.kh-navbar-simple > .kh-navbar-container { max-width:var(--kh-nav-container-width); }\n.kh-mega-menu .kh-media { width:8rem; aspect-ratio:16 / 10; flex-shrink:0; border-radius:var(--kh-radius,8px); overflow:hidden; }\n.kh-mega-menu .kh-dropdown-text { flex:1; }\n@container (min-width:64rem) {\n  li:has(> .kh-mega-menu) { position:static; }\n  .kh-mega-menu > ul {\n    position:absolute; top:100%; inset-inline:0; width:100%; max-width:none;\n    grid-template-columns:repeat(3,minmax(0,1fr)); column-gap:2rem;\n    /* the links keep their .625rem padding (room for the hover tile); the panel pads that much less, so the text sits on the page grid */\n    padding-block:1rem; padding-inline:calc(max(var(--kh-gutter),calc((100% - var(--kh-nav-container-width)) / 2 + var(--kh-gutter))) - .625rem);\n    margin:0; border:0; border-bottom:1px solid var(--kh-line); border-radius:0; box-shadow:var(--kh-shadow-2);\n  }\n  /* four items: one row of four, with a smaller picture */\n  .kh-mega-menu > ul:has(> li:nth-child(4):last-child) { grid-template-columns:repeat(4,minmax(0,1fr)); column-gap:1.5rem; }\n  .kh-mega-menu > ul:has(> li:nth-child(4):last-child) .kh-media { width:6rem; }\n  /* seven or eight items: two rows of four (three columns would leave one alone) */\n  .kh-mega-menu > ul:has(> li:nth-child(7)) { grid-template-columns:repeat(4,minmax(0,1fr)); column-gap:1.5rem; }\n  .kh-mega-menu > ul:has(> li:nth-child(7)) .kh-media { width:6rem; }\n}\n@container (min-width:48rem) and (max-width:63.999rem) {\n  .kh-mega-menu > ul { grid-template-columns:repeat(2,minmax(0,1fr)); }\n}\n/* sticky: the block (its .kh-block wrapper) sticks, so the header stays on the page's own scroll; solid canvas with a hairline. */\n.kh-block:has(> .kh-navbar-simple[data-kh-sticky]) { position:sticky; top:0; z-index:50; background:transparent; }\n/* overlay: transparent only while it sits at the top over a hero (data-kh-at-top); never glass, and the open menu is solid. */\n.kh-navbar-simple[data-kh-overlay] { transition:background-color 180ms ease, border-color 180ms ease; }\n.kh-navbar-simple[data-kh-overlay][data-kh-at-top]:not(:has(details[open])) { background:transparent; border-bottom-color:transparent; }\n.kh-block:has(> .kh-navbar-simple[data-kh-overlay]) { background:transparent; }\n@media (prefers-reduced-motion:reduce) { .kh-navbar-simple[data-kh-overlay] { transition:none; } }\n/* the mobile sheet is open: the page behind it does not scroll (navbar-simple sets the class on <html> while it is open) */\nhtml.kh-menu-open { overflow:hidden; }\n"
    }
  ]
}
