{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"ternary-systems","type":"registry:block","title":"Ternary Systems","description":"A site for a test runner with three answers: pass, fail and unsure. Scroll scrubs a slow push across a graphite keyboard while the sidebar compiles one file per chapter, and each code sample runs as it lands. Press ⌘K for a working command palette that jumps to any section or copies the install command.","categories":["saas"],"dependencies":["@fontsource/azeret-mono@^5.3.0","@fontsource/hubot-sans@^5.3.0"],"files":[{"path":"components/nightmarquee/ternary-systems/lib/drop-media.ts","type":"registry:component","target":"components/nightmarquee/ternary-systems/lib/drop-media.ts","content":"/**\n * Which encode of a drop's video a screen should load. Every drop video has a 1920 wide file;\n * shots encoded since the phone files have a 1280 `-m` file, and upscaled shots a 2560 `-xl`.\n * The scaffold writes each demo's `media.ts` with these entries (scripts/drop/lib/scaffold.mjs).\n */\nexport interface ShotFiles {\n  readonly desktop: string;\n  readonly mobile?: string;\n  readonly xl?: string;\n}\n/* NightMarquee design \"Ternary Systems\". Free for personal, portfolio, educational and non-commercial use; no republishing: nightmarquee.com/license */\n\n/** A share of the frame, 0 to 1, from the cut-out's alpha (scripts/drop/lib/cutout.mjs). */\nexport interface Box {\n  readonly x: number;\n  readonly y: number;\n  readonly width: number;\n  readonly height: number;\n}\n\n/** A journey keyframe: its 1920 still and the second it lands on in the hero film. */\nexport interface Keyframe {\n  readonly src: string;\n  readonly t: number;\n}\n\n/** A chapter's start and end on the hero film, in seconds. */\nexport interface Chapter {\n  readonly start: number;\n  readonly end: number;\n}\n\n/** A cut-out and where it sits in its keyframe, so it lines up with the film at any size. */\nexport interface Cutout {\n  readonly src: string;\n  readonly box: Box;\n}\n\nexport interface Viewport {\n  /** True when PHONE_QUERY matches. */\n  phone: boolean;\n  /** CSS pixels, `window.innerWidth`. */\n  width: number;\n  /** `window.devicePixelRatio`. */\n  dpr: number;\n}\n\nexport const PHONE_QUERY = \"(max-width: 767px)\";\n/** Device pixels across the viewport above which the 2560 file is worth its bytes. */\nexport const XL_MIN_DEVICE_PX = 2200;\n\n/** The `-m` file on a phone, else the `-xl` file on a large or dense screen, else the 1920 file. */\nexport function chooseVideo(shot: ShotFiles, view: Viewport): string {\n  if (view.phone) return shot.mobile ?? shot.desktop;\n  if (shot.xl && view.width * view.dpr > XL_MIN_DEVICE_PX) return shot.xl;\n  return shot.desktop;\n}\n\n/** The current window's viewport. Browser only: call it in an effect, never during render. */\nexport function currentViewport(): Viewport {\n  return {\n    phone: window.matchMedia(PHONE_QUERY).matches,\n    width: window.innerWidth,\n    dpr: window.devicePixelRatio || 1,\n  };\n}\n\n/** The file this screen should load. Call it in an effect and set the video's src from it. */\nexport function pickVideo(shot: ShotFiles): string {\n  return chooseVideo(shot, currentViewport());\n}\n"},{"path":"components/nightmarquee/ternary-systems/lib/media-manifest.json","type":"registry:component","target":"components/nightmarquee/ternary-systems/lib/media-manifest.json","content":"{\n  \"base\": \"https://media.nightmarquee.com\",\n  \"files\": {\n    \"/drops/ternary-systems/ambient-m.mp4\": \"drops/ternary-systems/ambient-m.d3e16ff9f5.mp4\",\n    \"/drops/ternary-systems/ambient-xl.mp4\": \"drops/ternary-systems/ambient-xl.b377c6e84e.mp4\",\n    \"/drops/ternary-systems/ambient.mp4\": \"drops/ternary-systems/ambient.d3b0802622.mp4\",\n    \"/drops/ternary-systems/hero-m.mp4\": \"drops/ternary-systems/hero-m.809f07f2b7.mp4\",\n    \"/drops/ternary-systems/hero-xl.mp4\": \"drops/ternary-systems/hero-xl.7531f5be93.mp4\",\n    \"/drops/ternary-systems/hero.mp4\": \"drops/ternary-systems/hero.114349b91b.mp4\",\n    \"/drops/ternary-systems/preview.mp4\": \"drops/ternary-systems/preview.4f4b5105b6.mp4\",\n    \"/drops/ternary-systems/site-hover.mp4\": \"drops/ternary-systems/site-hover.edd3f10710.mp4\",\n    \"/drops/ternary-systems/site-preview.mp4\": \"drops/ternary-systems/site-preview.a9ec1b6154.mp4\"\n  }\n}\n"},{"path":"components/nightmarquee/ternary-systems/lib/media.ts","type":"registry:component","target":"components/nightmarquee/ternary-systems/lib/media.ts","content":"import manifest from \"./media-manifest.json\";\n/* NightMarquee design \"Ternary Systems\". Free for personal, portfolio, educational and non-commercial use; no republishing: nightmarquee.com/license */\n\nconst files: Record<string, string> = manifest.files;\nconst ORIGIN = \"https://media.nightmarquee.com\";\n\n/**\n * Where a drop's file is served from. Video plays from the content-hashed copy\n * named in the manifest, any other drop file from media.nightmarquee.com. Set\n * NEXT_PUBLIC_FOOTAGE_LOCAL=1 once the footage pack is in public/drops/<slug>/\n * and every path resolves to the local copy instead.\n */\nexport function mediaUrl(path: string): string {\n  // A design that builds paths from a folder constant hands over the origin's absolute address.\n  const drop = path.startsWith(`${ORIGIN}/drops/`) ? path.slice(ORIGIN.length) : path;\n  if (process.env.NEXT_PUBLIC_FOOTAGE_LOCAL) return drop;\n  const key = files[drop];\n  if (key) return `${manifest.base}/${key}`;\n  return drop.startsWith(\"/drops/\") ? `${ORIGIN}${drop}` : drop;\n}\n"},{"path":"components/nightmarquee/ternary-systems/ternary-systems/demo.tsx","type":"registry:component","target":"components/nightmarquee/ternary-systems/ternary-systems/demo.tsx","content":"\"use client\";\n/* NightMarquee design \"Ternary Systems\". Free for personal, portfolio, educational and non-commercial use; no republishing: nightmarquee.com/license */\n\n/* Self-hosted through @fontsource: no request to Google at build or run time. */\nimport \"@fontsource/hubot-sans/600.css\";\nimport \"@fontsource/hubot-sans/800.css\";\nimport \"@fontsource/azeret-mono/400.css\";\nimport \"@fontsource/azeret-mono/500.css\";\nimport \"@fontsource/azeret-mono/600.css\";\n\n/* Ternary Systems, a test runner with three answers. One rAF loop: the keyboard\n   film is scrubbed against chapter anchors (each chapter names the film second it\n   lands on), the sidebar compiles one file per chapter from the same film time,\n   the reveals and counters ride the same tick. A real command palette (⌘K or\n   Ctrl K) drives navigation; each chapter's code sample runs as it enters. */\n\nimport { useEffect, useRef, useState, type CSSProperties, type KeyboardEvent as ReactKeyboardEvent } from \"react\";\nimport { POSTER, SHOTS, pickVideo } from \"./media\";\n\nconst DUR = 10;\nconst CMD = \"npx ternary init\";\nconst FILES = [\n  { name: \"install.sh\", t: 0 },\n  { name: \"unsure.test.ts\", t: 2.8 },\n  { name: \"ternary.toml\", t: 5.4 },\n  { name: \"report.json\", t: 8.2 },\n];\n\nconst RUN = [\n  { suite: \"checkout\", name: \"applies coupon\", final: \"pass\", time: \"212ms\", at: 1 },\n  { suite: \"checkout\", name: \"rejects expired card\", final: \"pass\", time: \"98ms\", at: 2 },\n  { suite: \"cart\", name: \"merges guest cart\", final: \"fail\", time: \"1.4s\", at: 3 },\n  { suite: \"search\", name: \"debounces input\", final: \"unsure\", time: \"3 reruns\", at: 7 },\n];\nconst RUN_END = 7;\nconst RERUNS = [\"pass\", \"fail\", \"pass\"];\nconst MARKS: Record<string, string> = { pass: \"✓\", fail: \"✗\", unsure: \"?\", rerun: \"↻\", queued: \"·\", running: \"›\" };\n\nconst runState = (i: number, k: number) => {\n  const r = RUN[i];\n  if (i === 3 && k >= 4 && k < RUN_END) return { kind: \"rerun\", label: `rerun ${k - 3}/3`, time: RERUNS[k - 4] };\n  if (k < r.at - 1) return { kind: \"queued\", label: \"queued\", time: \"\" };\n  if (k < r.at) return { kind: \"running\", label: \"running\", time: \"\" };\n  return { kind: r.final, label: r.final, time: r.time };\n};\n\ntype Item = { id: string; label: string; hint: string; target?: string; centre?: boolean };\nconst ITEMS: Item[] = [\n  { id: \"install\", label: \"Install\", hint: CMD, target: \"install\" },\n  { id: \"unsure\", label: \"Unsure tests\", hint: \"01 unsure.test.ts\", target: \"unsure\", centre: true },\n  { id: \"quarantine\", label: \"Quarantine\", hint: \"02 ternary.toml\", target: \"quarantine\", centre: true },\n  { id: \"report\", label: \"Reports\", hint: \"03 report.json\", target: \"report\", centre: true },\n  { id: \"capabilities\", label: \"Capabilities\", hint: \"6 tools\", target: \"capabilities\" },\n  { id: \"changelog\", label: \"Changelog\", hint: \"v2.14.0\", target: \"changelog\" },\n  { id: \"copy\", label: \"Copy install command\", hint: \"to clipboard\" },\n];\n\nconst SKIPPED = [3, 8, 14, 15, 22, 27, 31, 35, 38];\nconst WEEKS = Array.from({ length: 40 }, (_, i) => !SKIPPED.includes(i + 1));\n\nconst CHANGES = [\n  { v: \"v2.14.0\", date: \"6 Oct 2026\", kind: \"added\", text: \"Unsure results carry the seed that last flipped them.\" },\n  { v: \"v2.13.2\", date: \"29 Sep 2026\", kind: \"fixed\", text: \"Quarantine release no longer counts skipped runs as passes.\" },\n  { v: \"v2.13.0\", date: \"22 Sep 2026\", kind: \"added\", text: \"ternary blame bisects to the first commit where a test went unsure.\" },\n  { v: \"v2.12.1\", date: \"15 Sep 2026\", kind: \"fixed\", text: \"Playwright shards keep their trace files on rerun.\" },\n];\n\nconst TILES = [\n  { k: \"violet\", label: \"replay\", title: \"Seeds, not screenshots\", body: \"Every unsure result stores its seed, worker and clock offset, so the exact run plays again on your laptop.\", code: \"ternary replay 7731\" },\n  { k: \"amber\", label: \"blame\", title: \"Blame the commit\", body: \"Bisects history to the commit where a test first went unsure, in 6 runs on a 300-commit branch.\", code: \"ternary blame search\" },\n  { k: \"cyan\", label: \"shards\", title: \"Shards by history\", body: \"Splits the suite by last week's timings, so shards land within 8 seconds of each other.\", code: \"--shards auto\" },\n  { k: \"green\", label: \"watch\", title: \"Local first\", body: \"The same three answers on your machine, rerunning only what your diff touched.\", code: \"ternary watch\" },\n  { k: \"violet\", label: \"runners\", title: \"Any runner\", body: \"Vitest, Jest, Playwright, pytest and go test. Ternary reads their output; your tests stay as they are.\", code: \"runner = \\\"auto\\\"\" },\n  { k: \"cyan\", label: \"report\", title: \"Plain JSON out\", body: \"One report.json per run. Pipe it into the dashboard you already have, or into nothing.\", code: \"--report report.json\" },\n];\n\nexport function Demo() {\n  const rootRef = useRef<HTMLDivElement>(null);\n  const triggerRef = useRef<HTMLButtonElement>(null);\n  const inputRef = useRef<HTMLInputElement>(null);\n  const [step, setStep] = useState(RUN_END);\n  const [copied, setCopied] = useState(\"\");\n  const [open, setOpen] = useState(false);\n  const [q, setQ] = useState(\"\");\n  const [active, setActive] = useState(0);\n\n  const list = ITEMS.filter((it) => `${it.label} ${it.hint}`.toLowerCase().includes(q.trim().toLowerCase()));\n\n  const copy = (where: string) => {\n    const done = () => setCopied(where);\n    if (navigator.clipboard) navigator.clipboard.writeText(CMD).then(done, done);\n    else done();\n  };\n\n  const openPalette = () => {\n    setQ(\"\");\n    setActive(0);\n    setOpen(true);\n  };\n  const closePalette = () => {\n    setOpen(false);\n    triggerRef.current?.focus();\n  };\n  const runItem = (it: Item) => {\n    closePalette();\n    if (!it.target) {\n      copy(\"palette\");\n      return;\n    }\n    const el = document.getElementById(it.target);\n    const reduce = window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n    el?.scrollIntoView({ behavior: reduce ? \"auto\" : \"smooth\", block: it.centre ? \"center\" : \"start\" });\n  };\n\n  useEffect(() => {\n    /* capture phase: this page's palette answers ⌘K before the site-wide search sees it */\n    const onKey = (e: KeyboardEvent) => {\n      if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === \"k\") {\n        e.preventDefault();\n        e.stopPropagation();\n        setQ(\"\");\n        setActive(0);\n        setOpen((o) => !o);\n      }\n    };\n    window.addEventListener(\"keydown\", onKey, { capture: true });\n    return () => window.removeEventListener(\"keydown\", onKey, { capture: true });\n  }, []);\n\n  useEffect(() => {\n    if (open) inputRef.current?.focus();\n  }, [open]);\n\n  useEffect(() => {\n    const root = rootRef.current;\n    if (!root) return;\n    const reduce = window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n    root.classList.add(\"js\");\n\n    let pending = Array.from(root.querySelectorAll<HTMLElement>(\"[data-reveal],[data-reveal-line]\"));\n    pending.forEach((el) => {\n      const g = el.closest(\"[data-stagger]\");\n      if (g) {\n        const s = Array.from(g.querySelectorAll(\"[data-reveal],[data-reveal-line]\"));\n        el.style.setProperty(\"--d\", `${s.indexOf(el) * 60}ms`);\n      }\n    });\n    let counters = Array.from(root.querySelectorAll<HTMLElement>(\"[data-count]\"));\n    const runCount = (el: HTMLElement) => {\n      const to = parseFloat(el.dataset.count || \"0\");\n      let t0: number | null = null;\n      const tick = (ts: number) => {\n        if (t0 === null) t0 = ts;\n        const k = Math.min(1, (ts - t0) / 1400);\n        el.textContent = Math.round(to * (1 - Math.pow(1 - k, 4))).toLocaleString(\"en-GB\");\n        if (k < 1) requestAnimationFrame(tick);\n      };\n      requestAnimationFrame(tick);\n    };\n\n    let timer = 0;\n    const startRun = () => {\n      setStep(0);\n      let k = 0;\n      timer = window.setInterval(() => {\n        k += 1;\n        setStep(k);\n        if (k >= RUN_END) window.clearInterval(timer);\n      }, 420);\n    };\n\n    const sweep = () => {\n      const vh = window.innerHeight;\n      for (let i = pending.length - 1; i >= 0; i--) {\n        const r = (pending[i].closest(\"[data-card]\") ?? pending[i]).getBoundingClientRect();\n        if (r.top < vh * 0.92 && r.bottom > 0) {\n          pending[i].classList.add(\"in\");\n          if (pending[i].hasAttribute(\"data-run\")) startRun();\n          pending.splice(i, 1);\n        }\n      }\n      for (let i = counters.length - 1; i >= 0; i--) {\n        const r = counters[i].getBoundingClientRect();\n        if (r.top < vh * 0.85 && r.bottom > 0) {\n          runCount(counters[i]);\n          counters.splice(i, 1);\n        }\n      }\n    };\n\n    const film = root.querySelector<HTMLElement>(\"[data-film]\")!;\n    const wrap = root.querySelector<HTMLElement>(\"[data-chapters]\")!;\n    const video = root.querySelector<HTMLVideoElement>(\"[data-scrub-video]\")!;\n    const heroCopy = root.querySelector<HTMLElement>(\"[data-hero-copy]\")!;\n    const nav = root.querySelector<HTMLElement>(\"[data-nav]\")!;\n    const railItems = Array.from(root.querySelectorAll<HTMLElement>(\"[data-file]\"));\n    const railNow = root.querySelector<HTMLElement>(\"[data-rail-now]\")!;\n    const railCount = root.querySelector<HTMLElement>(\"[data-rail-count]\")!;\n    const railT = root.querySelector<HTMLElement>(\"[data-rail-t]\")!;\n    const railBar = root.querySelector<HTMLElement>(\"[data-rail-bar]\")!;\n    const chapters = Array.from(root.querySelectorAll<HTMLElement>(\"[data-t]\"));\n\n    let ax: number[] = [0];\n    let at: number[] = [0];\n    let span = 1;\n    const measure = () => {\n      const vh = window.innerHeight;\n      span = Math.max(1, film.offsetHeight - vh);\n      const pts = chapters\n        .map((ch) => ({ y: ch.offsetTop + ch.offsetHeight / 2 - vh / 2, t: parseFloat(ch.dataset.t || \"0\") }))\n        .map((p) => ({ y: Math.min(span, Math.max(0, p.y)), t: p.t }));\n      pts.push({ y: 0, t: 0 }, { y: span, t: DUR });\n      pts.sort((a, b) => a.y - b.y || a.t - b.t);\n      ax = pts.map((p) => p.y);\n      at = pts.map((p) => p.t);\n    };\n    const lookup = (y: number) => {\n      if (y <= ax[0]) return at[0];\n      for (let i = 1; i < ax.length; i++) {\n        if (y <= ax[i]) return at[i - 1] + (at[i] - at[i - 1]) * ((y - ax[i - 1]) / (ax[i] - ax[i - 1] || 1));\n      }\n      return at[at.length - 1];\n    };\n    measure();\n    const ro = new ResizeObserver(measure);\n    ro.observe(wrap);\n    window.addEventListener(\"resize\", measure);\n\n    video.src = pickVideo(SHOTS.hero);\n    const mark = () => video.classList.add(\"ready\");\n    video.addEventListener(\"canplaythrough\", mark, { once: true });\n    video.addEventListener(\"loadeddata\", mark, { once: true });\n    const kick = () => {\n      video.preload = \"auto\";\n      video.load();\n    };\n    if (!reduce) {\n      if (document.readyState === \"complete\") kick();\n      else window.addEventListener(\"load\", kick, { once: true });\n    }\n\n    let lastIdx = -1;\n    let lastT = \"\";\n    const paintRail = (st: number) => {\n      let idx = 0;\n      FILES.forEach((f, i) => {\n        if (st >= f.t - 0.4) idx = i;\n      });\n      const done = st >= DUR - 0.3;\n      const key = done ? FILES.length : idx;\n      if (key !== lastIdx) {\n        lastIdx = key;\n        railItems.forEach((el, i) => {\n          el.dataset.state = done || i < idx ? \"done\" : i === idx ? \"active\" : \"queued\";\n        });\n        railNow.textContent = done ? \"all files compiled\" : `compiling ${FILES[idx].name}`;\n        railCount.textContent = `${done ? FILES.length : idx} of ${FILES.length}`;\n      }\n      const t = `${st.toFixed(2)}s`;\n      if (t !== lastT) {\n        lastT = t;\n        railT.textContent = t;\n        railBar.style.transform = `scaleX(${(st / DUR).toFixed(4)})`;\n      }\n    };\n\n    /* the ambient loop under the install section: src chosen in JS, played only on screen */\n    const loop = root.querySelector<HTMLVideoElement>(\"[data-loop]\")!;\n    let loopSet = false;\n    const io = new IntersectionObserver(\n      ([e]) => {\n        if (e.isIntersecting && !loopSet) {\n          loopSet = true;\n          loop.src = pickVideo(SHOTS.ambient);\n          if (reduce) loop.addEventListener(\"loadedmetadata\", () => (loop.currentTime = 2.5), { once: true });\n        }\n        if (reduce) return;\n        if (e.isIntersecting) loop.play().catch(() => {});\n        else loop.pause();\n      },\n      { rootMargin: \"200px 0px\" },\n    );\n    io.observe(loop);\n\n    if (reduce) {\n      const still = () => {\n        video.currentTime = 5;\n      };\n      if (video.readyState >= 1) still();\n      video.addEventListener(\"loadedmetadata\", still);\n      pending.forEach((el) => el.classList.add(\"in\"));\n      pending = [];\n      counters = [];\n      paintRail(5);\n      const onScroll = () => nav.classList.toggle(\"solid\", -film.getBoundingClientRect().top > span);\n      window.addEventListener(\"scroll\", onScroll, { passive: true });\n      return () => {\n        window.removeEventListener(\"scroll\", onScroll);\n        video.removeEventListener(\"loadedmetadata\", still);\n        window.removeEventListener(\"resize\", measure);\n        ro.disconnect();\n        io.disconnect();\n      };\n    }\n\n    let st = 0;\n    let raf = 0;\n    const loopTick = () => {\n      if (pending.length || counters.length) sweep();\n      const vh = window.innerHeight;\n      const fr = film.getBoundingClientRect();\n      const s = -fr.top;\n      const target = lookup(Math.min(span, Math.max(0, s)));\n      st += (target - st) * 0.1;\n      if (Math.abs(target - st) < 0.0005) st = target;\n      if (video.duration && video.classList.contains(\"ready\") && !video.seeking) {\n        const vt = Math.min(video.duration - 0.04, st);\n        if (Math.abs(video.currentTime - vt) > 0.01) video.currentTime = vt;\n      }\n      if (fr.bottom > 0) {\n        const ho = Math.min(1, Math.max(0, s / (vh * 0.8)));\n        heroCopy.style.transform = `translate3d(0,${(Math.max(0, s) * 0.3).toFixed(1)}px,0) scale(${(1 - ho * 0.05).toFixed(4)})`;\n        paintRail(st);\n      }\n      nav.classList.toggle(\"solid\", s > span + vh * 0.2);\n      raf = requestAnimationFrame(loopTick);\n    };\n    raf = requestAnimationFrame(loopTick);\n    return () => {\n      cancelAnimationFrame(raf);\n      window.clearInterval(timer);\n      ro.disconnect();\n      io.disconnect();\n      window.removeEventListener(\"resize\", measure);\n      window.removeEventListener(\"load\", kick);\n    };\n  }, []);\n\n  const onPaletteKey = (e: ReactKeyboardEvent<HTMLInputElement>) => {\n    if (e.key === \"ArrowDown\") {\n      e.preventDefault();\n      setActive((a) => (list.length ? (a + 1) % list.length : 0));\n    } else if (e.key === \"ArrowUp\") {\n      e.preventDefault();\n      setActive((a) => (list.length ? (a - 1 + list.length) % list.length : 0));\n    } else if (e.key === \"Enter\") {\n      e.preventDefault();\n      if (list[active]) runItem(list[active]);\n    } else if (e.key === \"Escape\") {\n      e.preventDefault();\n      closePalette();\n    } else if (e.key === \"Tab\") {\n      e.preventDefault();\n    }\n  };\n\n  const summary = step >= RUN_END ? \"2 pass, 1 fail, 1 unsure. Seed 7731 saved.\" : `running, ${Math.min(step, 4)} of 4 resolved`;\n\n  return (\n    <div className=\"ts-page\" ref={rootRef}>\n      <style>{`\n        .ts-page{\n          --bg:#0b0d10;--bg-2:#111419;--bg-3:#171b21;--pad:rgba(12,14,18,.94);--line:rgba(201,206,216,.13);\n          --text:#e7e9ee;--text-2:#aab0bb;--violet:#b9a0ff;--cyan:#72d9e8;--amber:#f1ba6a;--green:#9edba2;--red:#ff8f80;\n          --ease:cubic-bezier(.16,1,.3,1);--mono:'Azeret Mono',ui-monospace,monospace;--display:'Hubot Sans',system-ui,sans-serif;\n          background:var(--bg);color:var(--text);font-family:var(--mono);font-size:.94rem;overflow-x:clip;\n          -webkit-font-smoothing:antialiased;\n        }\n        .ts-page ::selection{background:var(--violet);color:var(--bg)}\n        .ts-page :focus-visible{outline:2px solid var(--cyan);outline-offset:3px}\n        .ts-vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}\n        .ts-page [id]{scroll-margin-top:5rem}\n\n        [data-reveal-line]{display:block;overflow:hidden;padding-bottom:.08em}\n        .js [data-reveal]{transform:translateY(22px);transition:transform .9s var(--ease) var(--d,0ms)}\n        .js [data-reveal].in{transform:none}\n        .js [data-reveal-line]>span{display:block;transform:translateY(108%);transition:transform 1s var(--ease) var(--d,0ms)}\n        .js [data-reveal-line].in>span{transform:none}\n\n        .ts-nav{position:fixed;inset:0 0 auto 0;z-index:50;display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem clamp(1rem,3.5vw,3rem);background:linear-gradient(rgba(11,13,16,.8),rgba(11,13,16,0));transition:background .5s}\n        .ts-nav.solid{background:rgba(11,13,16,.94);box-shadow:0 1px 0 var(--line)}\n        .ts-mark{display:flex;align-items:center;gap:.6rem;color:var(--text);text-decoration:none;font:800 1.2rem/1 var(--display);letter-spacing:-.01em}\n        .ts-mark svg{width:26px;height:10px}\n        .ts-links{display:flex;gap:1.8rem;list-style:none;margin:0;padding:0}\n        .ts-links a{color:var(--text-2);text-decoration:none;font-size:.8rem;padding:.3rem 0;transition:color .3s}\n        .ts-links a:hover,.ts-links a:focus-visible{color:var(--text)}\n        .ts-navr{display:flex;align-items:center;gap:.6rem}\n        .ts-k{display:inline-flex;align-items:center;gap:.7rem;background:rgba(23,27,33,.9);border:1px solid var(--line);color:var(--text-2);font:400 .8rem/1 var(--mono);padding:.6rem .7rem .6rem .85rem;border-radius:8px;cursor:pointer;transition:border-color .3s,color .3s}\n        .ts-k:hover{border-color:rgba(185,160,255,.5);color:var(--text)}\n        .ts-k kbd,.ts-pal kbd{font:500 .75rem/1 var(--mono);color:var(--text);background:var(--bg-3);border:1px solid var(--line);border-radius:5px;padding:.3rem .4rem}\n        .ts-btn{display:inline-flex;align-items:center;gap:.5rem;background:var(--violet);color:#14101f;text-decoration:none;font:600 .8rem/1 var(--mono);padding:.7rem 1rem;border-radius:8px;border:0;cursor:pointer;transition:transform .4s var(--ease),background .3s}\n        .ts-btn:hover{background:#cbb8ff;transform:translateY(-1px)}\n        @media(max-width:900px){.ts-links{display:none}}\n        @media(max-width:480px){.ts-nav .ts-btn{display:none}.ts-k span{display:none}}\n\n        .ts-film{position:relative;background:var(--bg)}\n        .ts-stage{position:sticky;top:0;height:100vh;height:100svh;overflow:hidden;z-index:0;background:var(--bg) center/cover no-repeat}\n        .ts-stage video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;opacity:0;transition:opacity .8s ease}\n        .ts-stage video.ready{opacity:1}\n        .ts-scrim{position:absolute;inset:0;pointer-events:none;background:\n          linear-gradient(90deg,rgba(8,9,12,.7),rgba(8,9,12,.25) 45%,transparent 70%),\n          linear-gradient(rgba(8,9,12,.55),transparent 24%,transparent 60%,rgba(8,9,12,.8))}\n        .ts-grid{position:absolute;inset:0;pointer-events:none;opacity:.35;background-image:linear-gradient(rgba(201,206,216,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(201,206,216,.05) 1px,transparent 1px);background-size:56px 56px}\n\n        .ts-rail{position:absolute;right:clamp(1rem,3.5vw,3rem);top:50%;transform:translateY(-50%);z-index:3;width:270px;background:var(--pad);border:1px solid var(--line);border-radius:10px;padding:1rem 1.1rem;font-size:.8rem}\n        .ts-rail-h{display:flex;justify-content:space-between;color:var(--text-2);margin:0 0 .8rem;font-size:.75rem}\n        .ts-rail ol{list-style:none;margin:0;padding:0;display:grid;gap:.15rem}\n        .ts-rail li{display:grid;grid-template-columns:1.2rem 1fr auto;gap:.4rem;align-items:center;padding:.45rem .5rem;border-radius:6px;color:var(--text-2);transition:background .4s,color .4s}\n        .ts-rail li i{font-style:normal;text-align:center}\n        .ts-rail li b{font-weight:400;font-size:.75rem}\n        .ts-rail li[data-state=\"active\"]{background:rgba(185,160,255,.12);color:var(--text)}\n        .ts-rail li[data-state=\"active\"] i,.ts-rail li[data-state=\"active\"] b{color:var(--violet)}\n        .ts-rail li[data-state=\"done\"] i,.ts-rail li[data-state=\"done\"] b{color:var(--green)}\n        .ts-rail li i::before{content:\"·\"}\n        .ts-rail li[data-state=\"active\"] i::before{content:\"›\"}\n        .ts-rail li[data-state=\"done\"] i::before{content:\"✓\"}\n        .ts-rail li b::before{content:\"queued\"}\n        .ts-rail li[data-state=\"active\"] b::before{content:\"compiling\"}\n        .ts-rail li[data-state=\"done\"] b::before{content:\"done\"}\n        .ts-rail-foot{margin-top:.9rem;padding-top:.8rem;border-top:1px solid var(--line);display:grid;gap:.5rem;color:var(--text-2);font-size:.75rem}\n        .ts-rail-foot div{display:flex;justify-content:space-between;gap:1rem}\n        .ts-rail-foot span:last-child{color:var(--text);font-variant-numeric:tabular-nums}\n        .ts-bar{height:2px;background:rgba(201,206,216,.14);overflow:hidden;border-radius:2px}\n        .ts-bar i{display:block;height:100%;background:var(--violet);transform-origin:left;transform:scaleX(0)}\n        .ts-rail-now{display:none}\n        @media(max-width:900px){\n          .ts-rail{top:4.4rem;left:1rem;right:1rem;width:auto;transform:none;padding:.7rem .85rem}\n          .ts-rail ol,.ts-rail-h{display:none}\n          .ts-rail-foot{margin:0;padding:0;border:0}\n          .ts-rail-now{display:inline;color:var(--violet)}\n          .ts-rail-label{display:none}\n        }\n\n        .ts-chapters{position:relative;z-index:2;margin-top:-100vh;margin-top:-100svh}\n        .ts-ch{position:relative;min-height:125vh;display:flex;align-items:center;padding:0 clamp(1rem,4vw,3.5rem)}\n        .ts-hero{min-height:100vh;min-height:100svh;align-items:flex-end;padding-bottom:clamp(3rem,9vh,6rem)}\n        .ts-herocopy{max-width:720px;will-change:transform;background:var(--pad);border:1px solid var(--line);border-radius:12px;padding:clamp(1.3rem,3vw,2.2rem);box-shadow:0 40px 80px -40px rgba(0,0,0,.8)}\n        .ts-h1{font:800 clamp(2.5rem,6.2vw,5.4rem)/.95 var(--display);letter-spacing:-.035em;margin:0}\n        .ts-h1 em{font-style:normal;color:var(--violet)}\n        .ts-lede{max-width:56ch;margin:1.2rem 0 0;line-height:1.7;color:var(--text-2)}\n        .ts-meta{margin:1.1rem 0 0;font-size:.8rem;color:var(--text-2);display:flex;flex-wrap:wrap;gap:.4rem 1.2rem}\n        .ts-meta span::before{content:\"\";display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--green);margin-right:.5rem;vertical-align:middle}\n        .ts-meta kbd{font:500 .75rem/1 var(--mono);color:var(--text);border:1px solid var(--line);border-radius:4px;padding:.15rem .35rem}\n\n        .ts-term{position:relative;margin-top:1.4rem;background:#08090c;border:1px solid var(--line);border-radius:10px;overflow:hidden}\n        .ts-term-bar{display:flex;align-items:center;gap:.4rem;padding:.6rem .8rem;border-bottom:1px solid var(--line);color:var(--text-2);font-size:.75rem}\n        .ts-term-bar i{width:9px;height:9px;border-radius:50%;background:#2a2f37}\n        .ts-term-bar span{margin-left:.5rem}\n        .ts-term-body{padding:1rem 1.1rem 1.1rem;display:grid;gap:.4rem;font-size:.86rem}\n        .ts-term-body p{margin:0;white-space:nowrap}\n        .ts-prompt{color:var(--green)}\n        .ts-type{display:inline-block;vertical-align:bottom;overflow:hidden;white-space:nowrap;color:var(--text)}\n        .js .ts-type{width:0;animation:ts-type 1s steps(16,end) .5s forwards}\n        @keyframes ts-type{to{width:16ch}}\n        .ts-caret{display:inline-block;width:.55em;height:1.05em;background:var(--violet);vertical-align:text-bottom;margin-left:.15em}\n        .ts-out{color:var(--text-2)}\n        .ts-out b{font-weight:500;color:var(--cyan)}\n        .ts-out .ok{color:var(--green)}\n        .js .ts-out{clip-path:inset(0 100% 0 0);animation:ts-wipe .5s var(--ease) forwards;animation-delay:calc(1.7s + var(--i) * .35s)}\n        @keyframes ts-wipe{to{clip-path:inset(0)}}\n        .ts-copy{position:absolute;top:.4rem;right:.45rem;background:var(--bg-3);border:1px solid var(--line);color:var(--text);font:500 .75rem/1 var(--mono);padding:.4rem .6rem;border-radius:6px;cursor:pointer;transition:border-color .3s}\n        .ts-copy:hover{border-color:var(--cyan)}\n\n        .ts-card{position:relative;width:min(500px,100%);background:var(--pad);border:1px solid var(--line);border-radius:12px;padding:clamp(1.3rem,2.6vw,2rem);box-shadow:0 50px 90px -40px rgba(0,0,0,.8)}\n        .ts-kicker{display:flex;justify-content:space-between;gap:1rem;font-size:.75rem;color:var(--text-2);margin:0 0 1.1rem}\n        .ts-kicker span:first-child{color:var(--text)}\n        .ts-kicker span:first-child::before{content:\"\";display:inline-block;width:8px;height:8px;border-radius:2px;margin-right:.55rem;background:var(--tok,var(--violet))}\n        .ts-h2{font:800 clamp(1.8rem,3vw,2.5rem)/1.02 var(--display);letter-spacing:-.025em;margin:0 0 .9rem}\n        .ts-h2 em{font-style:normal;color:var(--tok,var(--violet))}\n        .ts-p{margin:0;color:var(--text-2);line-height:1.7}\n\n        .ts-run{list-style:none;margin:1.3rem 0 0;padding:.4rem;background:#08090c;border:1px solid var(--line);border-radius:8px;font-size:.8rem}\n        .ts-run li{display:grid;grid-template-columns:6.4rem 1fr auto;gap:.6rem;align-items:center;padding:.5rem .45rem;border-radius:5px;transition:background .35s}\n        .ts-run li+li{border-top:1px solid rgba(201,206,216,.06)}\n        .ts-st{display:inline-flex;gap:.4rem;color:var(--text-2)}\n        .ts-run [data-state=\"pass\"] .ts-st{color:var(--green)}\n        .ts-run [data-state=\"fail\"] .ts-st{color:var(--red)}\n        .ts-run [data-state=\"unsure\"] .ts-st{color:var(--violet)}\n        .ts-run [data-state=\"rerun\"] .ts-st,.ts-run [data-state=\"running\"] .ts-st{color:var(--amber)}\n        .ts-run [data-state=\"rerun\"],.ts-run [data-state=\"running\"]{background:rgba(241,186,106,.08)}\n        .ts-run [data-state=\"unsure\"]{background:rgba(185,160,255,.09)}\n        .ts-tn{color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n        .ts-tn i{font-style:normal;color:var(--text-2)}\n        .ts-ms{color:var(--text-2);font-variant-numeric:tabular-nums}\n        .ts-sum{margin:.8rem 0 0;font-size:.8rem;color:var(--text-2);min-height:1.4em}\n\n        .ts-code{margin:1.3rem 0 0;padding:.8rem 0;background:#08090c;border:1px solid var(--line);border-radius:8px;font:400 .8rem/1.75 var(--mono);overflow:hidden}\n        .ts-ln{display:grid;grid-template-columns:2.6rem 1fr;border-left:2px solid transparent;transition:border-color .4s,background .4s;transition-delay:calc(var(--i) * 110ms)}\n        .ts-ln>span:first-child{color:#7d8491;text-align:right;padding-right:.9rem;font-variant-numeric:tabular-nums}\n        .ts-code.in .ts-ln{border-left-color:var(--cyan);background:rgba(114,217,232,.05)}\n        .ts-code.in .ts-ln.dim{border-left-color:transparent;background:transparent}\n        .t-k{color:var(--violet)}.t-s{color:var(--green)}.t-n{color:var(--amber)}.t-c{color:#8d94a1}.t-h{color:var(--cyan)}\n        .ts-outline{margin:.9rem 0 0;font-size:.8rem;color:var(--text-2)}\n        .ts-outline b{font-weight:500;color:var(--green)}\n\n        .ts-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem;margin-top:1.5rem;padding-top:1.3rem;border-top:1px solid var(--line)}\n        .ts-stat b{display:block;font:800 clamp(1.9rem,3vw,2.5rem)/1 var(--display);letter-spacing:-.02em;font-variant-numeric:tabular-nums}\n        .ts-stat span{font-size:.75rem;color:var(--text-2)}\n        .ts-json{margin:1.3rem 0 0;padding:.9rem 1rem;background:#08090c;border:1px solid var(--line);border-radius:8px;font-size:.8rem;line-height:1.7;white-space:pre;overflow:hidden}\n\n        .ts-after{position:relative;z-index:3;background:var(--bg);border-top:1px solid var(--line)}\n        .ts-wrap{max-width:1240px;margin:0 auto;padding:clamp(5rem,12vh,8rem) clamp(1rem,4vw,3.5rem)}\n        .ts-sec-h{font:800 clamp(2.2rem,5vw,4.2rem)/.98 var(--display);letter-spacing:-.03em;margin:0 0 1.1rem;max-width:16ch}\n        .ts-sec-h em{font-style:normal;color:var(--cyan)}\n        .ts-sec-p{max-width:58ch;color:var(--text-2);line-height:1.7;margin:0}\n        .ts-bento{display:grid;grid-template-columns:repeat(3,1fr);gap:.9rem;margin-top:3rem}\n        .ts-tile{position:relative;background:var(--bg-2);border:1px solid var(--line);border-radius:12px;padding:1.4rem;display:flex;flex-direction:column;gap:.8rem;transition:border-color .4s,transform .5s var(--ease)}\n        .ts-tile:hover{border-color:var(--tok);transform:translateY(-3px)}\n        .ts-tile:first-child{grid-column:span 2}\n        .ts-tile small{font-size:.75rem;color:var(--tok)}\n        .ts-tile h3{font:600 1.35rem/1.15 var(--display);letter-spacing:-.01em;margin:0}\n        .ts-tile p{margin:0;color:var(--text-2);line-height:1.65;font-size:.86rem}\n        .ts-tile code{margin-top:auto;align-self:flex-start;font:500 .8rem/1 var(--mono);color:var(--text);background:#08090c;border:1px solid var(--line);border-radius:6px;padding:.55rem .7rem}\n        .ts-tile code::before{content:\"$ \";color:var(--green)}\n\n        .ts-log{display:grid;grid-template-columns:1fr 1.25fr;gap:clamp(2rem,6vw,5rem);align-items:start}\n        .ts-weeks{display:grid;grid-template-columns:repeat(40,1fr);gap:3px;height:56px;margin-top:2rem;align-items:end}\n        .ts-weeks i{display:block;height:100%;border-radius:2px;background:rgba(201,206,216,.1);transform-origin:bottom}\n        .ts-weeks i.on{background:var(--violet)}\n        .js .ts-weeks i{transform:scaleY(.08);transition:transform .7s var(--ease);transition-delay:calc(var(--w) * 18ms)}\n        .js .ts-weeks.in i{transform:none}\n        .ts-weeks-l{display:flex;justify-content:space-between;margin-top:.6rem;font-size:.75rem;color:var(--text-2)}\n        .ts-changes{list-style:none;margin:0;padding:0}\n        .ts-changes li{display:grid;grid-template-columns:6.5rem 1fr;gap:1rem;padding:1.1rem 0;border-top:1px solid var(--line)}\n        .ts-changes li:last-child{border-bottom:1px solid var(--line)}\n        .ts-changes b{display:block;font-weight:600;color:var(--text)}\n        .ts-changes time{font-size:.75rem;color:var(--text-2)}\n        .ts-changes p{margin:0;color:var(--text-2);line-height:1.65}\n        .ts-tag{display:inline-block;font-size:.75rem;margin-right:.6rem;color:var(--green)}\n        .ts-tag.fixed{color:var(--amber)}\n\n        .ts-cta{position:relative;overflow:hidden;min-height:100vh;min-height:100svh;display:flex;align-items:center;background:var(--bg) center/cover no-repeat}\n        .ts-cta video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}\n        .ts-cta::after{content:\"\";position:absolute;inset:0;background:linear-gradient(90deg,rgba(8,9,12,.75),rgba(8,9,12,.2) 60%,rgba(8,9,12,.4))}\n        .ts-cta-pad{position:relative;z-index:2;width:min(600px,100%);background:var(--pad);border:1px solid var(--line);border-radius:12px;padding:clamp(1.4rem,3vw,2.4rem)}\n        .ts-cta-pad .ts-sec-h em{color:var(--violet)}\n        .ts-cta-row{display:flex;flex-wrap:wrap;align-items:center;gap:1rem 1.4rem;margin-top:1.4rem}\n        .ts-cta-row a:not(.ts-btn){color:var(--text);font-size:.85rem;text-decoration:none;border-bottom:1px solid rgba(114,217,232,.5);padding-bottom:2px}\n        .ts-cta-row a:not(.ts-btn):hover{color:var(--cyan)}\n        .ts-live{margin:.9rem 0 0;font-size:.8rem;color:var(--green);min-height:1.3em}\n\n        .ts-foot{max-width:1240px;margin:0 auto;padding:clamp(3rem,8vh,5rem) clamp(1rem,4vw,3.5rem) clamp(4rem,10vh,6rem);display:grid;gap:2rem}\n        .ts-foot-mark{font:800 clamp(3.5rem,16vw,15rem)/.8 var(--display);letter-spacing:-.05em;margin:0;color:var(--text)}\n        .ts-foot-mark span{color:var(--violet)}\n        .ts-foot-row{display:flex;flex-wrap:wrap;justify-content:space-between;gap:1rem 2rem;font-size:.8rem;color:var(--text-2)}\n\n        .ts-pal-back{position:fixed;inset:0;z-index:80;background:rgba(5,6,8,.72);backdrop-filter:blur(6px);display:flex;justify-content:center;align-items:flex-start;padding:14vh 1rem 1rem}\n        .ts-pal{width:min(600px,100%);background:var(--bg-2);border:1px solid rgba(185,160,255,.35);border-radius:12px;box-shadow:0 40px 100px -30px rgba(0,0,0,.9);overflow:hidden;animation:ts-pop .35s var(--ease)}\n        @keyframes ts-pop{from{transform:translateY(-8px) scale(.98)}}\n        .ts-pal-in{display:flex;align-items:center;gap:.7rem;padding:.9rem 1rem;border-bottom:1px solid var(--line)}\n        .ts-pal-in>span{color:var(--violet)}\n        .ts-pal input{flex:1;min-width:0;background:transparent;border:0;color:var(--text);font:400 .95rem/1.4 var(--mono)}\n        .ts-pal input:focus-visible{outline:none}\n        .ts-pal input::placeholder{color:var(--text-2)}\n        .ts-pal ul{list-style:none;margin:0;padding:.4rem;max-height:50vh;overflow:auto}\n        .ts-pal li{display:flex;justify-content:space-between;gap:1rem;padding:.7rem .75rem;border-radius:7px;cursor:pointer;color:var(--text)}\n        .ts-pal li span:last-child{color:var(--text-2);font-size:.8rem}\n        .ts-pal li[aria-selected=\"true\"]{background:rgba(185,160,255,.14)}\n        .ts-pal li[aria-selected=\"true\"] span:first-child::before{content:\"› \";color:var(--violet)}\n        .ts-pal-empty{margin:0;padding:1rem;color:var(--text-2);font-size:.85rem}\n\n        @media(max-width:900px){\n          .ts-ch{justify-content:center;padding-top:8rem;padding-bottom:10vh}\n          .ts-hero{padding-top:0;padding-bottom:2.2rem}\n          .ts-scrim{background:linear-gradient(rgba(8,9,12,.6),transparent 26%,rgba(8,9,12,.45) 52%,rgba(8,9,12,.85))}\n          .ts-bento{grid-template-columns:1fr}\n          .ts-tile:first-child{grid-column:auto}\n          .ts-log{grid-template-columns:1fr}\n        }\n        @media(max-width:560px){\n          .ts-run li{grid-template-columns:5.6rem 1fr;row-gap:.1rem}\n          .ts-ms{grid-column:2}\n          .ts-stats{gap:.6rem}\n          .ts-changes li{grid-template-columns:1fr;gap:.3rem}\n          .ts-term-body{font-size:.8rem}\n          .ts-weeks{gap:2px}\n        }\n        @media(prefers-reduced-motion:reduce){\n          .ts-page *{animation:none!important;transition:none!important}\n          .js [data-reveal],.js [data-reveal-line]>span,.js .ts-weeks i{transform:none!important}\n          .js .ts-type{width:auto}\n          .js .ts-out{clip-path:none}\n        }\n      `}</style>\n\n      <nav className=\"ts-nav\" data-nav aria-label=\"Ternary Systems\">\n        <a className=\"ts-mark\" href=\"#top\">\n          <svg viewBox=\"0 0 26 10\" aria-hidden=\"true\">\n            <circle cx=\"5\" cy=\"5\" r=\"4\" fill=\"#9edba2\" />\n            <circle cx=\"13\" cy=\"5\" r=\"4\" fill=\"#ff8f80\" />\n            <circle cx=\"21\" cy=\"5\" r=\"4\" fill=\"#b9a0ff\" />\n          </svg>\n          ternary\n        </a>\n        <ul className=\"ts-links\">\n          <li><a href=\"#unsure\">Docs</a></li>\n          <li><a href=\"#capabilities\">Capabilities</a></li>\n          <li><a href=\"#changelog\">Changelog</a></li>\n        </ul>\n        <div className=\"ts-navr\">\n          <button type=\"button\" className=\"ts-k\" ref={triggerRef} onClick={openPalette} aria-haspopup=\"dialog\" aria-label=\"Search, command or control K\">\n            <span>Search</span>\n            <kbd>⌘K</kbd>\n          </button>\n          <a className=\"ts-btn\" href=\"#install\">Install</a>\n        </div>\n      </nav>\n\n      <section className=\"ts-film\" data-film aria-label=\"Three answers\">\n        <div className=\"ts-stage\" style={{ backgroundImage: `url(${POSTER})` }}>\n          <video data-scrub-video muted playsInline preload=\"metadata\" poster={POSTER} aria-hidden=\"true\" />\n          <div className=\"ts-grid\" aria-hidden=\"true\" />\n          <div className=\"ts-scrim\" aria-hidden=\"true\" />\n          <div className=\"ts-rail\" aria-hidden=\"true\">\n            <p className=\"ts-rail-h\"><span>sidebar.ts</span><span>scroll → build</span></p>\n            <ol>\n              {FILES.map((f, i) => (\n                <li key={f.name} data-file data-state={i === 0 ? \"active\" : \"queued\"}>\n                  <i />\n                  <span>{f.name}</span>\n                  <b />\n                </li>\n              ))}\n            </ol>\n            <div className=\"ts-rail-foot\">\n              <div>\n                <span><span className=\"ts-rail-label\">compiled</span><span className=\"ts-rail-now\" data-rail-now>compiling install.sh</span></span>\n                <span data-rail-count>0 of 4</span>\n              </div>\n              <div className=\"ts-bar\"><i data-rail-bar /></div>\n              <div><span>film time</span><span data-rail-t>0.00s</span></div>\n            </div>\n          </div>\n        </div>\n\n        <div className=\"ts-chapters\" data-chapters>\n          <div className=\"ts-ch ts-hero\" id=\"top\" data-t=\"0\">\n            <div className=\"ts-herocopy\" data-hero-copy>\n              <h1 className=\"ts-h1\">Every test has <em>a third answer.</em></h1>\n              <p className=\"ts-lede\">Ternary runs your suite and sorts each test into pass, fail or unsure. Unsure tests rerun on a clean worker until they pick a side. The ones that never do go to quarantine with the seed that broke them.</p>\n              <div className=\"ts-term\">\n                <div className=\"ts-term-bar\" aria-hidden=\"true\"><i /><i /><i /><span>zsh · ~/shop</span></div>\n                <div className=\"ts-term-body\">\n                  <p><span className=\"ts-prompt\" aria-hidden=\"true\">$ </span><code className=\"ts-type\">{CMD}</code><span className=\"ts-caret\" aria-hidden=\"true\" /></p>\n                  <p className=\"ts-out\" style={{ \"--i\": 0 } as CSSProperties}><span className=\"ok\">✓</span> found vitest.config.ts, 1,184 tests</p>\n                  <p className=\"ts-out\" style={{ \"--i\": 1 } as CSSProperties}><span className=\"ok\">✓</span> wrote ternary.toml</p>\n                  <p className=\"ts-out\" style={{ \"--i\": 2 } as CSSProperties}>next: <b>npx ternary run</b></p>\n                </div>\n                <button type=\"button\" className=\"ts-copy\" onClick={() => copy(\"hero\")}>\n                  {copied === \"hero\" ? \"Copied\" : \"Copy\"}<span className=\"ts-vh\"> install command</span>\n                </button>\n              </div>\n              <p className=\"ts-meta\">\n                <span>v2.14.0, for Vitest, Jest, Playwright and pytest</span>\n                <em style={{ fontStyle: \"normal\" }}>Press <kbd>⌘K</kbd> to jump anywhere</em>\n              </p>\n            </div>\n          </div>\n\n          <div className=\"ts-ch\" id=\"unsure\" data-t=\"2.8\">\n            <article className=\"ts-card\" data-card data-stagger>\n              <p className=\"ts-kicker\" data-reveal><span>01 · unsure.test.ts</span><span>runs as it lands</span></p>\n              <h2 className=\"ts-h2\" data-reveal-line><span>Unsure is a result, <em>not a retry.</em></span></h2>\n              <p className=\"ts-p\" data-reveal>A test that passes on its second try did not pass. Ternary marks it unsure, reruns it 3 times in isolation and records which seed flipped it.</p>\n              <div data-reveal data-run>\n                <ol className=\"ts-run\" aria-label=\"Test run\">\n                  {RUN.map((r, i) => {\n                    const s = runState(i, step);\n                    return (\n                      <li key={r.name} data-state={s.kind}>\n                        <span className=\"ts-st\"><span aria-hidden=\"true\">{MARKS[s.kind]}</span>{s.label}</span>\n                        <span className=\"ts-tn\"><i>{r.suite} › </i>{r.name}</span>\n                        <span className=\"ts-ms\">{s.time}</span>\n                      </li>\n                    );\n                  })}\n                </ol>\n                <p className=\"ts-sum\">{summary}</p>\n              </div>\n            </article>\n          </div>\n\n          <div className=\"ts-ch\" id=\"quarantine\" data-t=\"5.4\">\n            <article className=\"ts-card\" data-card data-stagger style={{ \"--tok\": \"var(--cyan)\" } as CSSProperties}>\n              <p className=\"ts-kicker\" data-reveal><span>02 · ternary.toml</span><span>8 lines</span></p>\n              <h2 className=\"ts-h2\" data-reveal-line><span>Quarantine <em>without a ticket.</em></span></h2>\n              <p className=\"ts-p\" data-reveal>A test that stays unsure for 5 runs leaves the blocking suite by itself. It keeps running, it stops failing your merges, and it comes back after 20 clean passes in a row.</p>\n              <pre className=\"ts-code\" data-reveal aria-label=\"ternary.toml\">\n                <code>\n                  <span className=\"ts-ln\" style={{ \"--i\": 0 } as CSSProperties}><span>1</span><span><span className=\"t-h\">[unsure]</span></span></span>\n                  <span className=\"ts-ln\" style={{ \"--i\": 1 } as CSSProperties}><span>2</span><span><span className=\"t-k\">reruns</span> = <span className=\"t-n\">3</span></span></span>\n                  <span className=\"ts-ln\" style={{ \"--i\": 2 } as CSSProperties}><span>3</span><span><span className=\"t-k\">isolate</span> = <span className=\"t-s\">&quot;worker&quot;</span></span></span>\n                  <span className=\"ts-ln dim\" style={{ \"--i\": 3 } as CSSProperties}><span>4</span><span> </span></span>\n                  <span className=\"ts-ln\" style={{ \"--i\": 4 } as CSSProperties}><span>5</span><span><span className=\"t-h\">[quarantine]</span></span></span>\n                  <span className=\"ts-ln\" style={{ \"--i\": 5 } as CSSProperties}><span>6</span><span><span className=\"t-k\">after</span> = <span className=\"t-n\">5</span>    <span className=\"t-c\"># unsure runs</span></span></span>\n                  <span className=\"ts-ln\" style={{ \"--i\": 6 } as CSSProperties}><span>7</span><span><span className=\"t-k\">release</span> = <span className=\"t-n\">20</span> <span className=\"t-c\"># clean passes</span></span></span>\n                  <span className=\"ts-ln\" style={{ \"--i\": 7 } as CSSProperties}><span>8</span><span><span className=\"t-k\">notify</span> = <span className=\"t-s\">&quot;#ci-flakes&quot;</span></span></span>\n                </code>\n              </pre>\n              <p className=\"ts-outline\" data-reveal><b>✓</b> 3 tests quarantined, main is green, 0 tickets opened</p>\n            </article>\n          </div>\n\n          <div className=\"ts-ch\" id=\"report\" data-t=\"8.2\">\n            <article className=\"ts-card\" data-card data-stagger style={{ \"--tok\": \"var(--amber)\" } as CSSProperties}>\n              <p className=\"ts-kicker\" data-reveal><span>03 · report.json</span><span>per branch</span></p>\n              <h2 className=\"ts-h2\" data-reveal-line><span>One number <em>per branch.</em></span></h2>\n              <p className=\"ts-p\" data-reveal>Every run ends in a single file. The number to watch is unsure tests on main; everything else is detail you can open when you need it.</p>\n              <div className=\"ts-stats\" data-reveal>\n                <div className=\"ts-stat\"><b data-count=\"1184\">1,184</b><span>tests run</span></div>\n                <div className=\"ts-stat\"><b data-count=\"3\">3</b><span>unsure on main</span></div>\n                <div className=\"ts-stat\"><b data-count=\"11\">11</b><span>minutes saved per run</span></div>\n              </div>\n              <pre className=\"ts-json\" data-reveal aria-label=\"report.json excerpt\"><code>{\"{ \"}<span className=\"t-k\">&quot;branch&quot;</span>: <span className=\"t-s\">&quot;main&quot;</span>, <span className=\"t-k\">&quot;unsure&quot;</span>: <span className=\"t-n\">3</span>,{\"\\n  \"}<span className=\"t-k\">&quot;seed&quot;</span>: <span className=\"t-n\">7731</span>{\" }\"}</code></pre>\n            </article>\n          </div>\n        </div>\n      </section>\n\n      <section className=\"ts-after\" aria-labelledby=\"ts-cap-h\">\n        <div className=\"ts-wrap\" id=\"capabilities\">\n          <h2 className=\"ts-sec-h\" id=\"ts-cap-h\" data-reveal-line><span>Six tools for <em>the third answer.</em></span></h2>\n          <p className=\"ts-sec-p\" data-reveal>Each one is a subcommand or a flag. None of them needs a dashboard, an account or a change to your tests.</p>\n          <div className=\"ts-bento\" data-stagger>\n            {TILES.map((t) => (\n              <article key={t.title} className=\"ts-tile\" data-reveal style={{ \"--tok\": `var(--${t.k})` } as CSSProperties}>\n                <small>{t.label}</small>\n                <h3>{t.title}</h3>\n                <p>{t.body}</p>\n                <code>{t.code}</code>\n              </article>\n            ))}\n          </div>\n        </div>\n\n        <div className=\"ts-wrap ts-log\" id=\"changelog\" style={{ paddingTop: 0 }}>\n          <div>\n            <h2 className=\"ts-sec-h\" data-reveal-line><span>Shipped <em>on Mondays.</em></span></h2>\n            <p className=\"ts-sec-p\" data-reveal>31 releases in the first 40 weeks of 2026. Every one has a migration note, even when the note says none.</p>\n            <div className=\"ts-weeks\" data-reveal aria-hidden=\"true\">\n              {WEEKS.map((on, i) => (\n                <i key={i} className={on ? \"on\" : undefined} style={{ \"--w\": i } as CSSProperties} />\n              ))}\n            </div>\n            <div className=\"ts-weeks-l\" aria-hidden=\"true\"><span>week 1</span><span>week 40</span></div>\n          </div>\n          <ol className=\"ts-changes\" data-stagger>\n            {CHANGES.map((c) => (\n              <li key={c.v} data-reveal>\n                <div><b>{c.v}</b><time>{c.date}</time></div>\n                <p><span className={`ts-tag ${c.kind}`}>{c.kind}</span>{c.text}</p>\n              </li>\n            ))}\n          </ol>\n        </div>\n\n        <div className=\"ts-cta\" id=\"install\" style={{ backgroundImage: `url(${POSTER})` }}>\n          <video data-loop muted loop playsInline preload=\"metadata\" poster={POSTER} aria-hidden=\"true\" />\n          <div className=\"ts-wrap\" style={{ width: \"100%\" }}>\n            <div className=\"ts-cta-pad\">\n              <h2 className=\"ts-sec-h\" data-reveal-line><span>Run it on <em>your slowest suite.</em></span></h2>\n              <p className=\"ts-sec-p\" data-reveal>Free for public repos and teams of up to 5. Unlimited workers from $12 a seat a month.</p>\n              <div className=\"ts-term\" data-reveal>\n                <div className=\"ts-term-body\">\n                  <p><span className=\"ts-prompt\" aria-hidden=\"true\">$ </span><code>{CMD}</code></p>\n                </div>\n                <button type=\"button\" className=\"ts-copy\" onClick={() => copy(\"cta\")}>\n                  {copied === \"cta\" ? \"Copied\" : \"Copy\"}<span className=\"ts-vh\"> install command</span>\n                </button>\n              </div>\n              <div className=\"ts-cta-row\" data-reveal>\n                <a className=\"ts-btn\" href=\"#unsure\">Read the docs</a>\n                <a href=\"#changelog\">See what changed this week</a>\n              </div>\n              <p className=\"ts-live\" aria-live=\"polite\">{copied ? `Copied ${CMD} to your clipboard.` : \"\"}</p>\n            </div>\n          </div>\n        </div>\n\n        <footer className=\"ts-foot\">\n          <p className=\"ts-foot-mark\" aria-hidden=\"true\">ternary<span>?:</span></p>\n          <div className=\"ts-foot-row\">\n            <span>Ternary Systems, Tallinn</span>\n            <span>All systems pass</span>\n            <span>MIT core, 2026</span>\n          </div>\n        </footer>\n      </section>\n\n      {open && (\n        <div className=\"ts-pal-back\" onMouseDown={closePalette}>\n          <div className=\"ts-pal\" role=\"dialog\" aria-modal=\"true\" aria-label=\"Command palette\" onMouseDown={(e) => e.stopPropagation()}>\n            <div className=\"ts-pal-in\">\n              <span aria-hidden=\"true\">›</span>\n              <input\n                ref={inputRef}\n                role=\"combobox\"\n                aria-expanded=\"true\"\n                aria-controls=\"ts-pal-list\"\n                aria-autocomplete=\"list\"\n                aria-activedescendant={list[active] ? `ts-opt-${list[active].id}` : undefined}\n                aria-label=\"Jump to a section or run a command\"\n                placeholder=\"Jump to a section or run a command\"\n                value={q}\n                onChange={(e) => {\n                  setQ(e.target.value);\n                  setActive(0);\n                }}\n                onKeyDown={onPaletteKey}\n              />\n              <kbd>esc</kbd>\n            </div>\n            <ul id=\"ts-pal-list\" role=\"listbox\" aria-label=\"Results\">\n              {list.map((it, i) => (\n                <li key={it.id} id={`ts-opt-${it.id}`} role=\"option\" aria-selected={i === active} onMouseMove={() => setActive(i)} onClick={() => runItem(it)}>\n                  <span>{it.label}</span>\n                  <span>{it.hint}</span>\n                </li>\n              ))}\n            </ul>\n            {list.length === 0 && <p className=\"ts-pal-empty\">No match. Try quarantine or install.</p>}\n          </div>\n        </div>\n      )}\n    </div>\n  );\n}\n"},{"path":"components/nightmarquee/ternary-systems/ternary-systems/media.ts","type":"registry:component","target":"components/nightmarquee/ternary-systems/ternary-systems/media.ts","content":"// Generated by scripts/drop/scaffold.mjs from drops/ternary-systems/drop.json. Do not edit; run the scaffold again.\nimport { mediaUrl } from \"../lib/media\";\n/* NightMarquee design \"Ternary Systems\". Free for personal, portfolio, educational and non-commercial use; no republishing: nightmarquee.com/license */\nimport type { ShotFiles } from \"../lib/drop-media\";\n\nexport { pickVideo } from \"../lib/drop-media\";\n\n/** The 1920 poster frame, taken from the ambient loop. */\nexport const POSTER = \"https://media.nightmarquee.com/drops/ternary-systems/poster.jpg\";\n\n/**\n * Each video: `desktop` is the 1920 file, `mobile` the 1280 `-m` file and `xl` the 2560 `-xl`\n * file when the shot has them. In an effect, set a video's src to `pickVideo(SHOTS.<name>)`.\n */\nexport const SHOTS = {\n  hero: {\n    desktop: mediaUrl(\"/drops/ternary-systems/hero.mp4\"),\n    mobile: mediaUrl(\"/drops/ternary-systems/hero-m.mp4\"),\n    xl: mediaUrl(\"/drops/ternary-systems/hero-xl.mp4\"),\n  },\n  ambient: {\n    desktop: mediaUrl(\"/drops/ternary-systems/ambient.mp4\"),\n    mobile: mediaUrl(\"/drops/ternary-systems/ambient-m.mp4\"),\n    xl: mediaUrl(\"/drops/ternary-systems/ambient-xl.mp4\"),\n  },\n} satisfies Record<string, ShotFiles>;\n"},{"path":"app/ternary-systems/page.tsx","type":"registry:page","target":"app/ternary-systems/page.tsx","content":"import type { Metadata } from \"next\";\n/* NightMarquee design \"Ternary Systems\". Free for personal, portfolio, educational and non-commercial use; no republishing: nightmarquee.com/license */\nimport { Demo } from \"../../components/nightmarquee/ternary-systems/ternary-systems/demo\";\n\nexport const metadata: Metadata = {\n  title: \"Ternary Systems\",\n  description: \"A site for a test runner with three answers: pass, fail and unsure. Scroll scrubs a slow push across a graphite keyboard while the sidebar compiles one file per chapter, and each code sample runs as it lands. Press ⌘K for a working command palette that jumps to any section or copies the install command.\",\n};\n\nexport default function Page() {\n  return <Demo />;\n}\n"}],"docs":"The page is at app/ternary-systems/page.tsx.\nIts footage streams from media.nightmarquee.com.\nUse is covered by the NightMarquee licence: nightmarquee.com/license","meta":{"mappingVersion":3}}