# Files changed · PR \#36 · screen/col

[View on GitCafe](https://git.cafe/screen/col/pull/36/diffs)

Repository: [screen/col](https://git.cafe/screen/col)

Visibility: public

[Redesign the app shell, sidebar, and library directory](https://git.cafe/screen/col/pull/36.md)

Version: 0

Head commit: 357f8e1b0400527fa84228fd2498f2a4f63e528b

Base commit: c8b1320173965c37adaeb930d629bdc332d2a8a6

Comparison base: c8b1320173965c37adaeb930d629bdc332d2a8a6

Showing up to 20 entries from this revision. If the pull request changes, reopen the first page before continuing.

## app/contributors/page.tsx

Status: modified; +3; −5

```diff
@@ -1,6 +1,5 @@
 import type { Metadata } from "next";
 import { ArrowUpRight } from "lucide-react";
-import { Header } from "@/components/Header";
 import { SiteFooter } from "@/components/SiteFooter";
 import { getContributors } from "@/lib/github-contributors";
 import styles from "./page.module.css";
@@ -17,9 +16,8 @@
 
   return (
     <>
-      <Header />
-      <main className={`contributors-page w-full max-w-full overflow-x-hidden ${styles.page}`}>
-        <div className="mx-auto min-h-screen max-w-7xl px-5 pt-36 pb-28 sm:px-8 sm:pt-44">
+      <div className={`contributors-page w-full max-w-full overflow-x-hidden ${styles.page}`}>
+        <div className="mx-auto max-w-7xl px-5 pt-12 pb-24 sm:px-8 sm:pt-16">
         <div className={styles.intro}>
           <div>
             <p className={styles.eyebrow}>The people behind Col</p>
@@ -58,7 +56,7 @@
           </div>
         )}
         </div>
-      </main>
+      </div>
       <SiteFooter />
     </>
   );
```

## app/docs/layout.tsx

Status: modified; +5; −11

```diff
@@ -1,19 +1,13 @@
 import { DocsPageNavigation, DocsSidebar } from "@/components/DocsSidebar";
-import { Header } from "@/components/Header";
-import styles from "./docs.module.css";
+import { SidebarSlot } from "@/components/SidebarSlot";
 
 export default function DocsLayout({ children }: { children: React.ReactNode }) {
   return (
     <>
-      <Header />
-      <main className="docs-page-shell grid min-h-screen gap-10 px-5 pt-24 pb-20 sm:px-8 lg:grid-cols-[14rem_minmax(0,1fr)] lg:gap-10">
-        <aside className={`${styles.sidebarColumn} min-w-0`}>
-          <div className={styles.sidebarFixed}>
-            <DocsSidebar />
-          </div>
-        </aside>
-        <div className="docs-copy mx-auto w-full min-w-0 max-w-[76ch]">{children}<DocsPageNavigation /></div>
-      </main>
+      <SidebarSlot>
+        <DocsSidebar />
+      </SidebarSlot>
+      <div className="docs-copy mx-auto w-full min-w-0 max-w-[76ch] px-5 py-10 sm:px-8">{children}<DocsPageNavigation /></div>
     </>
   );
 }
```

## app/globals.css

Status: modified; +1218; −2

```diff
@@ -4,8 +4,8 @@
 @custom-variant dark (&:is(.dark *));
 
 @theme {
+  --font-sans: "SF Pro Rounded", ui-rounded, var(--font-nunito), ui-sans-serif, system-ui, sans-serif;
+  --font-display: "SF Pro Rounded", ui-rounded, var(--font-nunito), ui-sans-serif, system-ui, sans-serif;
-  --font-sans: var(--font-inter), ui-sans-serif, system-ui, sans-serif;
-  --font-display: var(--font-inter), ui-sans-serif, system-ui, sans-serif;
   --font-pixel: var(--font-pixelify-sans), ui-monospace, monospace;
   --font-mono: var(--font-geist-mono), ui-monospace, monospace;
 }
@@ -1025,3 +1025,1219 @@
     100% { transform: translateZ(0) rotate(360deg); }
   }
 }
+
+/* ---- App shell: slim sidebar + content panel flush to the right and bottom edges ---- */
+:root { --app-sidebar-width: 12rem; --app-panel-bg: #19191c; --app-pill-bg: #262629; }
+html.light { --app-panel-bg: #f0f0ed; --app-pill-bg: #e4e4e0; }
+.app-shell {
+  display: grid;
+  grid-template-columns: var(--app-sidebar-width) minmax(0, 1fr);
+  min-height: 100dvh;
+  padding-top: var(--site-header-height);
+  background: #10181a;
+}
+html.light .app-shell { background: #f7f7f5; }
+.app-shell-sidebar {
+  position: sticky;
+  top: var(--site-header-height);
+  height: calc(100dvh - var(--site-header-height));
+  overflow-y: auto;
+  padding: .25rem .5rem 1rem .5rem;
+  scrollbar-width: none;
+}
+.app-shell-panel {
+  min-height: calc(100dvh - var(--site-header-height));
+  border: 1px solid rgba(255,255,255,.08);
+  border-right: 0;
+  border-bottom: 0;
+  border-top-left-radius: 16px;
+  background: var(--app-panel-bg);
+}
+html.light .app-shell-panel { border-color: rgba(17,17,17,.1); }
+@media (max-width: 1023px) {
+  .app-shell { grid-template-columns: minmax(0, 1fr); }
+  .app-shell-sidebar { position: relative; top: auto; height: auto; padding: 0 .75rem .5rem; }
+  .app-shell-panel { border-left: 0; border-radius: 0; }
+}
+
+/* Pill items, matching the reference: dark rounded pill, icon + label. */
+.app-nav { display: grid; gap: 2px; }
+.app-nav-link {
+  display: flex; align-items: center; gap: .625rem;
+  min-height: 34px; padding: 0 .625rem;
+  border: 1px solid transparent; border-radius: 10px;
+  color: rgba(255,255,255,.7); font-size: 13px; font-weight: 500;
+  text-decoration: none; transition: color 160ms ease, background-color 160ms ease;
+}
+.app-nav-link:hover, .app-nav-link:focus-visible { color: #fff; background: rgba(255,255,255,.05); }
+.app-nav-link[aria-current="page"] { color: #fff; background: var(--app-pill-bg); border-color: rgba(255,255,255,.06); }
+html.light .app-nav-link { color: #555; }
+html.light .app-nav-link:hover, html.light .app-nav-link:focus-visible { color: #111; background: rgba(17,17,17,.05); }
+html.light .app-nav-link[aria-current="page"] { color: #111; border-color: rgba(17,17,17,.08); }
+
+.site-header-link { gap: 7px; }
+.docs-sidebar-link { min-height: 34px; font-size: 13px; }
+.docs-sidebar-link[aria-current="page"], html.light .docs-sidebar-link[aria-current="page"] { color: #fff; font-weight: 500; }
+html.light .docs-sidebar-link[aria-current="page"] { color: #111; }
+.docs-sidebar-link-highlight, html.light .docs-sidebar-link-highlight {
+  border: 1px solid rgba(255,255,255,.06); border-radius: 10px; background: var(--app-pill-bg);
+}
+html.light .docs-sidebar-link-highlight { border-color: rgba(17,17,17,.08); }
+.docs-sidebar-heading { padding-left: .625rem; }
+
+/* Library directory: smaller sidebar, panel connects to right + bottom edges. */
+.directory-sidebar { --sidebar-width: 13.5rem; }
+.library-page-shell .directory-results-pane {
+  margin: 0;
+  border-right: 0;
+  border-bottom: 0;
+  border-radius: 16px 0 0 0;
+}
+.library-page-shell .directory-facet-group { padding: .25rem .5rem; }
+.directory-facet-options-single .directory-facet-option { padding-left: .625rem; }
+.directory-facet-option[data-state="on"], .directory-facet-option[data-state="on"]:hover {
+  background: var(--app-pill-bg);
+  color: #fff;
+  border: 1px solid rgba(255,255,255,.06);
+}
+html.light .directory-facet-option[data-state="on"], html.light .directory-facet-option[data-state="on"]:hover { color: #111; border-color: rgba(17,17,17,.08); }
+@media (max-width: 760px) {
+  .library-page-shell .directory-results-pane { margin: 0; border-radius: 0; }
+}
+
+/* ---- Neutral (no teal tint) chrome + pill matching the reference ---- */
+:root { --app-chrome-bg: #151517; --app-panel-bg: #1c1c1f; --app-pill-bg: #2a2a2e; --app-pill-border: rgba(255,255,255,.1); }
+html.light { --app-chrome-bg: #f4f4f5; --app-panel-bg: #fbfbfb; --app-pill-bg: #e6e6e8; --app-pill-border: rgba(0,0,0,.08); }
+.app-shell, .library-page-shell, .docs-page-shell,
+html.light .app-shell, html.light .library-page-shell, html.light .docs-page-shell { background: var(--app-chrome-bg); }
+.site-header-solid .site-header-inner, html.light .site-header-solid .site-header-inner { background: var(--app-chrome-bg); }
+.library-page-shell .directory-results-pane, html.light .library-page-shell .directory-results-pane { background: var(--app-panel-bg); }
+
+.app-nav-link[aria-current="page"],
+.docs-sidebar-link-highlight, html.light .docs-sidebar-link-highlight,
+.directory-facet-option[data-state="on"], .directory-facet-option[data-state="on"]:hover,
+html.light .directory-facet-option[data-state="on"], html.light .directory-facet-option[data-state="on"]:hover {
+  background: var(--app-pill-bg);
+  border: 1px solid var(--app-pill-border);
+  border-radius: 10px;
+  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
+}
+.app-nav-link[aria-current="page"],
+.docs-sidebar-link[aria-current="page"],
+.directory-facet-option[data-state="on"] { color: #fff; font-weight: 600; }
+html.light .app-nav-link[aria-current="page"],
+html.light .docs-sidebar-link[aria-current="page"],
+html.light .directory-facet-option[data-state="on"] { color: #111; }
+.app-nav-link, .directory-facet-option { border-radius: 10px; }
+.app-nav-link { color: rgba(255,255,255,.62); }
+.site-header-link-highlight { border-radius: 10px; border-color: var(--app-pill-border); background: var(--app-pill-bg); backdrop-filter: none; box-shadow: none; }
+
+/* ---- No outlines: flat fills only ---- */
+.app-shell-panel, html.light .app-shell-panel,
+.library-page-shell .directory-results-pane, html.light .library-page-shell .directory-results-pane { border: 0; }
+.app-nav-link, .app-nav-link[aria-current="page"],
+.docs-sidebar-link-highlight, html.light .docs-sidebar-link-highlight,
+.directory-facet-option, .directory-facet-option[data-state="on"], .directory-facet-option[data-state="on"]:hover,
+html.light .directory-facet-option[data-state="on"], html.light .directory-facet-option[data-state="on"]:hover,
+.site-header-link-highlight { border: 0; box-shadow: none; }
+
+/* ---- Pixel-matched to reference: #1b1b1b chrome, #343434 pill, hairline edge + drop shadow ---- */
+:root { --app-chrome-bg: #1b1b1b; --app-panel-bg: #222222; --app-pill-bg: #343434; }
+.app-nav { gap: 4px; }
+.app-nav-link,
+.directory-facet-option { min-height: 30px; padding: 0 .5rem; gap: .5rem; border-radius: 8px; }
+.app-nav-link[aria-current="page"],
+.docs-sidebar-link-highlight, html.light .docs-sidebar-link-highlight,
+.directory-facet-option[data-state="on"], .directory-facet-option[data-state="on"]:hover,
+.site-header-link-highlight {
+  background: #343434;
+  border: 0;
+  border-radius: 8px;
+  box-shadow: inset 0 0 0 1px rgba(255,255,255,.035), 0 1px 0 rgba(0,0,0,.35);
+}
+.app-nav-link[aria-current="page"],
+.docs-sidebar-link[aria-current="page"],
+.directory-facet-option[data-state="on"] { color: #ebebeb; font-weight: 600; }
+.app-nav-link:hover:not([aria-current="page"]), .directory-facet-option:hover:not([data-state="on"]) { background: rgba(255,255,255,.04); }
+.app-shell-sidebar { padding: .25rem .25rem 1rem; }
+.library-page-shell .directory-facet-group { padding: .25rem .25rem; }
+html.light { --app-chrome-bg: #f2f2f2; --app-panel-bg: #fafafa; }
+html.light .app-nav-link[aria-current="page"],
+html.light .docs-sidebar-link-highlight,
+html.light .directory-facet-option[data-state="on"], html.light .directory-facet-option[data-state="on"]:hover {
+  background: #e2e2e2; box-shadow: inset 0 0 0 1px rgba(0,0,0,.04), 0 1px 0 rgba(0,0,0,.06); color: #111;
+}
+
+/* ---- Reference measurements: 28px tall, 10px radius, 1px #393939 edge, faint 1px drop ---- */
+.app-nav-link, .directory-facet-option { min-height: 28px; border-radius: 10px; padding: 0 8px; gap: 6px; }
+.app-nav-link svg { width: 15px; height: 15px; }
+.app-nav-link[aria-current="page"],
+.docs-sidebar-link-highlight,
+.directory-facet-option[data-state="on"], .directory-facet-option[data-state="on"]:hover,
+.site-header-link-highlight {
+  background: #343434;
+  border-radius: 10px;
+  box-shadow: inset 0 0 0 1px #393939, 0 1px 0 rgba(0,0,0,.15);
+}
+.docs-sidebar-link { border-radius: 10px; }
+
+/* ---- Filter sidebar v2: sectioned list, sliding active pill, hover follower ---- */
+.facet-group { padding: 0 .25rem; margin-bottom: .875rem; }
+.facet-heading-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .375rem .5rem .25rem; }
+.facet-heading {
+  display: inline-flex; align-items: center; gap: .25rem;
+  color: rgba(255,255,255,.42); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
+  border-radius: 6px; transition: color 160ms ease;
+}
+.facet-heading:hover, .facet-heading:focus-visible { color: rgba(255,255,255,.75); }
+.facet-heading:focus-visible { outline: 2px solid var(--sidebar-ring); outline-offset: 2px; }
+.facet-heading-icon { width: 12px; height: 12px; opacity: 0; transition: transform 240ms cubic-bezier(.32,.72,0,1), opacity 160ms ease; }
+.facet-heading-row:hover .facet-heading-icon, .facet-heading:focus-visible .facet-heading-icon, .facet-heading[aria-expanded="false"] .facet-heading-icon { opacity: 1; }
+.facet-heading[aria-expanded="false"] .facet-heading-icon { transform: rotate(-90deg); }
+.facet-clear { color: rgba(255,255,255,.45); font-size: 11px; font-weight: 500; border-radius: 6px; padding: 0 .25rem; transition: color 160ms ease; animation: facet-fade-in 200ms ease; }
+.facet-clear:hover, .facet-clear:focus-visible { color: #fff; }
+@keyframes facet-fade-in { from { opacity: 0; transform: translateX(4px); } }
+
+.facet-collapse { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 320ms cubic-bezier(.32,.72,0,1), opacity 200ms ease; }
+.facet-collapse[data-expanded="true"] { grid-template-rows: 1fr; opacity: 1; }
+.facet-collapse-inner { min-height: 0; overflow: hidden; }
+.facet-options { position: relative; display: grid; gap: 2px; padding: 1px 0 2px; }
+
+.facet-active-pill, .facet-hover-pill {
+  position: absolute; top: 0; left: 0; right: 0; z-index: 0;
+  border-radius: 10px; opacity: 0; pointer-events: none;
+}
+.facet-hover-pill { background: rgba(255,255,255,.04); transition: transform 260ms cubic-bezier(.32,.72,0,1), height 260ms cubic-bezier(.32,.72,0,1), opacity 180ms ease; }
+.facet-active-pill { background: #343434; box-shadow: inset 0 0 0 1px #393939, 0 1px 0 rgba(0,0,0,.15); z-index: 1; }
+.facet-active-pill[data-ready="true"] { transition: transform 460ms cubic-bezier(.32,.72,0,1), height 460ms cubic-bezier(.32,.72,0,1), opacity 200ms ease; }
+
+.facet-option {
+  position: relative; z-index: 2;
+  display: flex; align-items: center; gap: 8px; width: 100%;
+  min-height: 28px; padding: 0 8px; border-radius: 10px;
+  color: rgba(255,255,255,.62); font-size: 13px; font-weight: 500; text-align: left;
+  transition: color 200ms ease, background-color 200ms ease, box-shadow 200ms ease;
+}
+.facet-option:hover:not(:disabled), .facet-option:focus-visible { color: #fff; }
+.facet-option:focus-visible { outline: 2px solid var(--sidebar-ring); outline-offset: -2px; }
+.facet-option[data-active="true"] { color: #ebebeb; font-weight: 600; }
+.facet-option:disabled { color: rgba(255,255,255,.26); cursor: default; }
+.facet-option-icon { width: 15px; height: 15px; flex: 0 0 auto; opacity: .7; transition: opacity 200ms ease, transform 300ms cubic-bezier(.32,.72,0,1); }
+.facet-option[data-active="true"] .facet-option-icon { opacity: 1; }
+.facet-option:active:not(:disabled) .facet-option-icon { transform: scale(.88); }
+.facet-option-label { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
+.facet-option-count { flex: 0 0 auto; min-width: 1.25rem; color: rgba(255,255,255,.34); font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; transition: color 200ms ease; }
+.facet-option[data-active="true"] .facet-option-count { color: rgba(255,255,255,.6); }
+
+/* Multi-select rows carry their own pill + animated check. */
+.facet-option[role="checkbox"][data-active="true"] { background: #343434; box-shadow: inset 0 0 0 1px #393939, 0 1px 0 rgba(0,0,0,.15); }
+.facet-check {
+  display: grid; place-items: center; width: 15px; height: 15px; flex: 0 0 auto;
+  border-radius: 5px; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.22);
+  transition: background-color 220ms ease, box-shadow 220ms ease;
+}
+.facet-check svg { width: 11px; height: 11px; stroke-width: 3; color: #111; opacity: 0; transform: scale(.4) rotate(-12deg); transition: opacity 160ms ease, transform 320ms cubic-bezier(.34,1.56,.64,1); }
+.facet-option[data-active="true"] .facet-check { background: #ebebeb; box-shadow: none; }
+.facet-option[data-active="true"] .facet-check svg { opacity: 1; transform: none; }
+
+.facet-reset {
+  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 32px;
+  border-radius: 10px; color: rgba(255,255,255,.7); font-size: 12.5px; font-weight: 500;
+  background: rgba(255,255,255,.04); transition: background-color 160ms ease, color 160ms ease;
+}
+.facet-reset svg { width: 13px; height: 13px; transition: transform 400ms cubic-bezier(.32,.72,0,1); }
+.facet-reset:hover { background: rgba(255,255,255,.08); color: #fff; }
+.facet-reset:hover svg { transform: rotate(-180deg); }
+.directory-filter-panel [data-slot="sidebar-content"] { padding-top: .25rem; }
+
+.directory-gallery-item { will-change: transform; }
+.directory-gallery-item > * { height: 100%; }
+
+html.light .facet-heading { color: rgba(0,0,0,.45); }
+html.light .facet-heading:hover { color: rgba(0,0,0,.8); }
+html.light .facet-clear { color: rgba(0,0,0,.45); }
+html.light .facet-clear:hover { color: #111; }
+html.light .facet-option { color: rgba(0,0,0,.62); }
+html.light .facet-option:hover:not(:disabled) { color: #111; }
+html.light .facet-option[data-active="true"] { color: #111; }
+html.light .facet-option:disabled { color: rgba(0,0,0,.28); }
+html.light .facet-option-count { color: rgba(0,0,0,.38); }
+html.light .facet-hover-pill { background: rgba(0,0,0,.04); }
+html.light .facet-active-pill,
+html.light .facet-option[role="checkbox"][data-active="true"] { background: #e2e2e2; box-shadow: inset 0 0 0 1px rgba(0,0,0,.05), 0 1px 0 rgba(0,0,0,.06); }
+html.light .facet-check { box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.25); }
+html.light .facet-option[data-active="true"] .facet-check { background: #111; }
+html.light .facet-check svg { color: #fff; }
+html.light .facet-reset { color: rgba(0,0,0,.7); background: rgba(0,0,0,.04); }
+@media (prefers-reduced-motion: reduce) {
+  .facet-active-pill[data-ready="true"], .facet-hover-pill, .facet-collapse, .facet-check svg, .facet-heading-icon, .facet-reset svg { transition: none; }
+}
+
+/* ---- Quieter section labels: sentence case, no tracking ---- */
+.facet-heading { font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; color: rgba(255,255,255,.4); }
+.facet-heading-row { padding: .75rem .5rem .25rem; }
+.docs-sidebar-heading { font-size: 12px !important; font-weight: 500 !important; letter-spacing: 0; text-transform: none; color: rgba(255,255,255,.4); }
+html.light .docs-sidebar-heading { color: rgba(0,0,0,.45); }
+@media (min-width: 1024px) {
+  .docs-sidebar [class*="mobileBar"] { display: none; }
+}
+
+/* ---- Navigation lives in the sidebar on app routes ---- */
+.app-nav-block { padding: .25rem .25rem .5rem; margin-bottom: .25rem; border-bottom: 1px solid rgba(255,255,255,.06); }
+html.light .app-nav-block { border-color: rgba(0,0,0,.06); }
+.app-shell-sidebar .app-nav-block { padding: 0 0 .5rem; }
+.app-shell-sidebar .app-nav-block + .docs-sidebar { padding-top: 0; }
+@media (min-width: 1024px) {
+  .site-header-app .site-header-divider,
+  .site-header-app .site-header-links { display: none; }
+}
+@media (max-width: 1023px) {
+  .site-header-app .site-header-divider,
+  .site-header-app .site-header-links { display: none; }
+  .site-header-app .site-header-menu { display: flex; }
+  .site-header-app .site-header-mobile-menu {
+    position: absolute; top: calc(100% + 6px); right: .75rem; left: .75rem;
+    display: grid; gap: 2px; padding: 4px; border-radius: 14px;
+    background: #232323; box-shadow: inset 0 0 0 1px #2e2e2e, 0 16px 40px rgba(0,0,0,.4);
+  }
+  .site-header-app .site-header-mobile-menu a { display: flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 10px; color: rgba(255,255,255,.75); font-size: 14px; text-decoration: none; }
+  .site-header-app .site-header-mobile-menu a[aria-current="page"] { background: #343434; color: #fff; font-weight: 600; }
+}
+
+/* ---- Directory toolbar v2 ---- */
+.dir-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; padding-bottom: .25rem; }
+.dir-toolbar-title { display: flex; align-items: baseline; gap: .5rem; min-width: 0; }
+.dir-toolbar-title h1 { color: #f2f2f2; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
+.dir-count { color: rgba(255,255,255,.4); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
+.dir-count span:not(.sr-only) { color: rgba(255,255,255,.25); }
+.dir-toolbar-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
+
+.dir-search {
+  position: relative; display: flex; align-items: center; gap: 8px;
+  width: 260px; height: 34px; padding: 0 8px 0 11px; border-radius: 10px;
+  background: rgba(255,255,255,.05); color: rgba(255,255,255,.5);
+  transition: background-color 180ms ease, box-shadow 180ms ease, width 320ms cubic-bezier(.32,.72,0,1);
+}
+.dir-search:hover { background: rgba(255,255,255,.07); }
+.dir-search:focus-within { width: 300px; background: #2a2a2a; box-shadow: inset 0 0 0 1px #3a3a3a; color: rgba(255,255,255,.8); }
+.dir-search svg { width: 15px; height: 15px; flex: 0 0 auto; }
+.dir-search input { min-width: 0; flex: 1 1 auto; background: transparent; color: #f2f2f2; font-size: 13px; outline: none; }
+.dir-search input::placeholder { color: rgba(255,255,255,.4); }
+.dir-search kbd { display: grid; place-items: center; min-width: 18px; height: 18px; border-radius: 5px; background: rgba(255,255,255,.07); color: rgba(255,255,255,.45); font-family: inherit; font-size: 11px; }
+.dir-search:focus-within kbd { opacity: 0; }
+
+.dir-control {
+  display: inline-flex; align-items: center; gap: 6px; height: 34px; min-height: 34px; padding: 0 10px;
+  border: 0; border-radius: 10px; background: transparent; box-shadow: none;
+  color: rgba(255,255,255,.65); font-size: 13px; font-weight: 600;
+  transition: background-color 160ms ease, color 160ms ease;
+}
+.dir-control:hover, .dir-control[data-state="open"] { background: rgba(255,255,255,.06); color: #fff; }
+.dir-control svg { width: 15px; height: 15px; }
+.dir-sort { width: auto; }
+.dir-sort .coss-chevron { transition: transform 240ms cubic-bezier(.32,.72,0,1); }
+.dir-sort[data-state="open"] .coss-chevron { transform: rotate(180deg); }
+
+.dir-segment { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; height: 34px; padding: 3px; border-radius: 11px; background: rgba(255,255,255,.05); }
+.dir-segment button { position: relative; z-index: 1; display: grid; place-items: center; width: 32px; border-radius: 8px; color: rgba(255,255,255,.45); transition: color 200ms ease; }
+.dir-segment button:hover { color: rgba(255,255,255,.8); }
+.dir-segment button[aria-checked="true"] { color: #fff; }
+.dir-segment button:focus-visible { outline: 2px solid var(--sidebar-ring); outline-offset: 1px; }
+.dir-segment button svg { width: 15px; height: 15px; }
+.dir-segment-pill {
+  position: absolute; top: 3px; bottom: 3px; left: 3px; width: 32px; border-radius: 8px;
+  background: #343434; box-shadow: inset 0 0 0 1px #393939, 0 1px 0 rgba(0,0,0,.15);
+  transition: transform 380ms cubic-bezier(.32,.72,0,1);
+}
+.dir-segment[data-value="line"] .dir-segment-pill { transform: translateX(32px); }
+
+.dir-saved span { min-width: .75rem; font-variant-numeric: tabular-nums; }
+.dir-saved[aria-pressed="true"] { background: #343434; box-shadow: inset 0 0 0 1px #393939, 0 1px 0 rgba(0,0,0,.15); color: #fff; }
+.dir-saved svg { transition: transform 300ms cubic-bezier(.34,1.56,.64,1); }
+.dir-saved:active svg { transform: scale(.8); }
+
+.library-page-shell .directory-results-pane { padding-top: 1rem; }
+.directory-filter-trigger { border: 0 !important; background: rgba(255,255,255,.05) !important; border-radius: 10px !important; }
+
+html.light .dir-toolbar-title h1 { color: #111; }
+html.light .dir-count { color: rgba(0,0,0,.4); }
+html.light .dir-count span:not(.sr-only) { color: rgba(0,0,0,.25); }
+html.light .dir-search, html.light .dir-segment { background: rgba(0,0,0,.05); color: rgba(0,0,0,.5); }
+html.light .dir-search:focus-within { background: #fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
+html.light .dir-search input { color: #111; }
+html.light .dir-search input::placeholder { color: rgba(0,0,0,.4); }
+html.light .dir-search kbd { background: rgba(0,0,0,.06); color: rgba(0,0,0,.45); }
+html.light .dir-control { color: rgba(0,0,0,.6); }
+html.light .dir-control:hover, html.light .dir-control[data-state="open"] { background: rgba(0,0,0,.05); color: #111; }
+html.light .dir-segment button { color: rgba(0,0,0,.45); }
+html.light .dir-segment button[aria-checked="true"] { color: #111; }
+html.light .dir-segment-pill, html.light .dir-saved[aria-pressed="true"] { background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.08); color: #111; }
+@media (max-width: 760px) {
+  .dir-search, .dir-search:focus-within { width: 100%; order: -1; }
+  .dir-toolbar-controls { width: 100%; }
+}
+@media (prefers-reduced-motion: reduce) {
+  .dir-segment-pill, .dir-search, .dir-sort .coss-chevron, .dir-saved svg { transition: none; }
+}
+
+.app-shell-sidebar .docs-sidebar { padding-top: .25rem; }
+.docs-sidebar-link { min-height: 28px; padding: 0 8px !important; gap: 8px !important; }
+.docs-sidebar-link svg { width: 15px; height: 15px; }
+.docs-sidebar-heading { padding-left: 8px !important; margin-top: .5rem; }
+
+/* ---- Mask icons (monochrome PNGs tinted by currentColor) ---- */
+.mask-icon {
+  display: inline-block; flex: 0 0 auto; width: 16px; height: 16px;
+  background-color: currentColor;
+  -webkit-mask: var(--icon-src) center / contain no-repeat;
+  mask: var(--icon-src) center / contain no-repeat;
+}
+.nav-icon, .facet-option-icon { width: 16px; height: 16px; }
+.facet-option-icon { opacity: .75; }
+
+/* ---- One gutter for every sidebar: pill inset 12px, icons land on x=20 (the logo column) ---- */
+:root { --rail-gutter: 12px; }
+.app-shell-sidebar { padding: 4px var(--rail-gutter) 16px; }
+.app-shell-sidebar .app-nav-block { padding: 0 0 10px; }
+.directory-sidebar .app-nav-block { padding: 4px var(--rail-gutter) 10px; }
+.library-page-shell .facet-group { padding: 0 var(--rail-gutter); }
+.facet-heading-row { padding-left: 8px; padding-right: 8px; }
+.app-shell-sidebar .docs-sidebar-heading { padding-left: 8px !important; }
+.app-shell-sidebar .docs-sidebar-link-highlight { left: 0; }
+
+/* ---- Separator: inset from both edges, engraved (dark line + light catch) ---- */
+.app-nav-block, html.light .app-nav-block { position: relative; border-bottom: 0; margin-bottom: 6px; }
+.app-nav-block::after {
+  content: ""; position: absolute; left: calc(var(--rail-gutter) + 8px); right: calc(var(--rail-gutter) + 8px); bottom: 0;
+  height: 1px; border-radius: 1px;
+  background: rgba(0,0,0,.55);
+  box-shadow: 0 1px 0 rgba(255,255,255,.06);
+}
+.app-shell-sidebar .app-nav-block::after { left: 8px; right: 8px; }
+html.light .app-nav-block::after { background: rgba(0,0,0,.1); box-shadow: 0 1px 0 rgba(255,255,255,.9); }
+
+.app-nav-block::after { background: rgba(0,0,0,.7); box-shadow: 0 1px 0 rgba(255,255,255,.08); }
+
+/* =====================================================================
+   Library directory — token-based theme (dark + light), no brand blue.
+   Scoped to /libraries: .library-page-shell, its header, menus and notice.
+   ===================================================================== */
+:root {
+  --lib-bg: #161616;
+  --lib-panel: #1c1c1c;
+  --lib-surface: #232323;
+  --lib-surface-hover: #272727;
+  --lib-field: #242424;
+  --lib-field-hover: #292929;
+  --lib-pill: #343434;
+  --lib-pill-edge: #3b3b3b;
+  --lib-media: #1a1a1a;
+  --lib-text: #ededed;
+  --lib-text-2: rgba(255,255,255,.64);
+  --lib-text-3: rgba(255,255,255,.4);
+  --lib-line: rgba(255,255,255,.06);
+  --lib-edge: rgba(255,255,255,.07);
+  --lib-highlight: rgba(255,255,255,.045);
+  --lib-hover: rgba(255,255,255,.045);
+  --lib-focus: rgba(255,255,255,.55);
+  /* Depth: a hairline top highlight plus a soft, short drop. */
+  --lib-depth-1: inset 0 1px 0 var(--lib-highlight), 0 1px 2px rgba(0,0,0,.28);
+  --lib-depth-2: inset 0 1px 0 var(--lib-highlight), 0 0 0 1px var(--lib-edge), 0 2px 6px rgba(0,0,0,.22);
+  --lib-depth-3: inset 0 1px 0 var(--lib-highlight), 0 0 0 1px var(--lib-edge), 0 10px 30px rgba(0,0,0,.4);
+  --lib-pill-depth: inset 0 0 0 1px var(--lib-pill-edge), inset 0 1px 0 rgba(255,255,255,.04), 0 1px 1px rgba(0,0,0,.25);
+}
+html.light {
+  --lib-bg: #f1f1f0;
+  --lib-panel: #f9f9f8;
+  --lib-surface: #ffffff;
+  --lib-surface-hover: #ffffff;
+  --lib-field: #ececeb;
+  --lib-field-hover: #e6e6e5;
+  --lib-pill: #ffffff;
+  --lib-pill-edge: rgba(0,0,0,.07);
+  --lib-media: #f3f3f2;
+  --lib-text: #161616;
+  --lib-text-2: rgba(0,0,0,.6);
+  --lib-text-3: rgba(0,0,0,.42);
+  --lib-line: rgba(0,0,0,.07);
+  --lib-edge: rgba(0,0,0,.07);
+  --lib-highlight: rgba(255,255,255,.9);
+  --lib-hover: rgba(0,0,0,.04);
+  --lib-focus: rgba(0,0,0,.5);
+  --lib-depth-1: 0 0 0 1px rgba(0,0,0,.05), 0 1px 2px rgba(0,0,0,.05);
+  --lib-depth-2: 0 0 0 1px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04), 0 2px 8px rgba(0,0,0,.035);
+  --lib-depth-3: 0 0 0 1px rgba(0,0,0,.07), 0 12px 32px rgba(0,0,0,.12);
+  --lib-pill-depth: 0 0 0 1px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.07);
+}
+
+/* ---- Shell ---- */
+body:has(.library-page-shell) { background: var(--lib-bg); }
+body:has(.library-page-shell) ::selection { background: var(--lib-text); color: var(--lib-bg); }
+html .library-page-shell,
+html.light .library-page-shell { background: var(--lib-bg); color: var(--lib-text); }
+html .library-page-shell .directory-results-pane,
+html.light .library-page-shell .directory-results-pane {
+  margin: 0; padding: 20px 24px 160px;
+  border: 0; border-radius: 16px 0 0 0;
+  background: var(--lib-panel);
+  box-shadow: inset 1px 1px 0 var(--lib-edge);
+}
+
+/* ---- Header on the directory ---- */
+.site-header-directory .site-header-inner,
+html.light .site-header-directory .site-header-inner { background: var(--lib-bg); color: var(--lib-text); }
+.site-header-directory .site-header-brand { color: var(--lib-text); }
+.site-header-directory .site-header-search { display: none; }
+.site-header-directory .site-header-actions { gap: 6px; }
+.site-header-directory .site-header-github,
+.site-header-directory .site-header-menu,
+.site-header-directory [data-slot="button"][aria-label*="theme" i],
+.site-header-directory .site-header-actions > button:not(.site-header-menu) {
+  height: 32px; min-height: 32px; border: 0; border-radius: 10px;
+  background: var(--lib-field); color: var(--lib-text-2);
+  box-shadow: var(--lib-depth-1);
+  transition: background-color 160ms ease, color 160ms ease;
+}
+.site-header-directory .site-header-actions > button:not(.site-header-menu) { width: 32px; min-width: 32px; padding: 0; display: grid; place-items: center; }
+.site-header-directory .site-header-github:hover,
+.site-header-directory .site-header-actions > button:hover { background: var(--lib-field-hover); color: var(--lib-text); }
+.site-header-directory .site-header-github { gap: 7px; padding: 0 10px; font-size: 12.5px; font-weight: 600; }
+.site-header-github-divider { width: 1px; height: 14px; background: currentColor; opacity: .18; }
+.site-header-github-star { width: 13px; height: 13px; fill: #e8b33c; color: #e8b33c; }
+
+/* ---- Sidebar ---- */
+html .library-page-shell .directory-sidebar { background: transparent; }
+html .library-page-shell .app-nav-link,
+html .library-page-shell .facet-option { color: var(--lib-text-2); }
+html .library-page-shell .app-nav-link:hover:not([aria-current="page"]),
+html .library-page-shell .facet-option:hover:not(:disabled):not([data-active="true"]) { color: var(--lib-text); background: transparent; }
+html .library-page-shell .app-nav-link[aria-current="page"],
+html .library-page-shell .facet-option[data-active="true"],
+html.light .library-page-shell .app-nav-link[aria-current="page"],
+html.light .library-page-shell .facet-option[data-active="true"] { color: var(--lib-text); }
+html .library-page-shell .app-nav-link[aria-current="page"],
+html .library-page-shell .facet-active-pill,
+html .library-page-shell .facet-option[role="checkbox"][data-active="true"],
+html.light .library-page-shell .app-nav-link[aria-current="page"],
+html.light .library-page-shell .facet-active-pill,
+html.light .library-page-shell .facet-option[role="checkbox"][data-active="true"] {
+  background: var(--lib-pill); box-shadow: var(--lib-pill-depth); border: 0;
+}
+html .library-page-shell .facet-hover-pill,
+html.light .library-page-shell .facet-hover-pill { background: var(--lib-hover); }
+html .library-page-shell .facet-option:disabled { color: var(--lib-text-3); opacity: .6; }
+html .library-page-shell .facet-option-count,
+html.light .library-page-shell .facet-option-count { color: var(--lib-text-3); }
+html .library-page-shell .facet-heading,
+html.light .library-page-shell .facet-heading { color: var(--lib-text-3); }
+html .library-page-shell .facet-heading:hover { color: var(--lib-text-2); }
+html .library-page-shell .facet-clear { color: var(--lib-text-3); }
+html .library-page-shell .facet-clear:hover { color: var(--lib-text); }
+html .library-page-shell .facet-check { box-shadow: inset 0 0 0 1.5px var(--lib-text-3); }
+html .library-page-shell .facet-option[data-active="true"] .facet-check { background: var(--lib-text); box-shadow: none; }
+html .library-page-shell .facet-check svg { color: var(--lib-panel); }
+html .library-page-shell .facet-reset { background: var(--lib-field); color: var(--lib-text-2); box-shadow: var(--lib-depth-1); }
+html .library-page-shell .facet-reset:hover { background: var(--lib-field-hover); color: var(--lib-text); }
+html .library-page-shell .app-nav-block::after { background: var(--lib-line); box-shadow: 0 1px 0 var(--lib-highlight); }
+html.light .library-page-shell .app-nav-block::after { background: rgba(0,0,0,.08); box-shadow: 0 1px 0 #fff; }
+
+/* Tight, even rhythm between filter sections. */
+html .library-page-shell .directory-filter-panel [data-slot="sidebar-content"] { gap: 0; padding-top: 2px; }
+html .library-page-shell .facet-group { margin: 0; }
+html .library-page-shell .facet-heading-row { padding-top: 10px; padding-bottom: 4px; min-height: 0; }
+html .library-page-shell .facet-group:first-child .facet-heading-row { padding-top: 6px; }
+html .library-page-shell .facet-collapse[data-expanded="false"] { margin-bottom: -2px; }
+html .library-page-shell .facet-heading { min-height: 20px; }
+
+/* ---- Toolbar ---- */
+html .library-page-shell .dir-toolbar { min-height: 32px; margin-bottom: 16px; padding: 0; }
+html .library-page-shell .dir-toolbar-title h1 { color: var(--lib-text); font-size: 18px; font-weight: 700; line-height: 32px; }
+html .library-page-shell .dir-count { color: var(--lib-text-3); font-size: 13px; }
+html .library-page-shell .dir-count span:not(.sr-only) { color: var(--lib-text-3); opacity: .7; }
+html .library-page-shell .dir-toolbar-controls { gap: 8px; }
+
+html .library-page-shell .dir-search,
+html.light .library-page-shell .dir-search {
+  width: 280px; height: 32px; padding: 0 6px 0 10px; border-radius: 10px;
+  background: var(--lib-field); color: var(--lib-text-3); box-shadow: var(--lib-depth-1);
+}
+html .library-page-shell .dir-search:hover { background: var(--lib-field-hover); }
+html .library-page-shell .dir-search:focus-within,
+html.light .library-page-shell .dir-search:focus-within {
+  width: 280px; background: var(--lib-surface); color: var(--lib-text-2);
+  box-shadow: 0 0 0 1px var(--lib-pill-edge), 0 0 0 4px var(--lib-hover), 0 1px 2px rgba(0,0,0,.2);
+}
+html .library-page-shell .dir-search input,
+html.light .library-page-shell .dir-search input { color: var(--lib-text); font-size: 13px; }
+html .library-page-shell .dir-search input::placeholder,
+html.light .library-page-shell .dir-search input::placeholder { color: var(--lib-text-3); }
+html .library-page-shell .dir-search input::-webkit-search-cancel-button { display: none; }
+html .library-page-shell .dir-search kbd,
+html.light .library-page-shell .dir-search kbd {
+  min-width: 20px; height: 20px; border-radius: 6px;
+  background: var(--lib-bg); color: var(--lib-text-3); box-shadow: inset 0 -1px 0 var(--lib-edge), 0 0 0 1px var(--lib-edge);
+  font-size: 11px; font-weight: 600;
+}
+
+html .library-page-shell .dir-control,
+html.light .library-page-shell .dir-control {
+  height: 32px; min-height: 32px; padding: 0 10px; gap: 6px; border-radius: 10px;
+  background: var(--lib-field); color: var(--lib-text-2); box-shadow: var(--lib-depth-1);
+}
+html .library-page-shell .dir-control:hover,
+html .library-page-shell .dir-control[data-state="open"],
+html.light .library-page-shell .dir-control:hover,
+html.light .library-page-shell .dir-control[data-state="open"] { background: var(--lib-field-hover); color: var(--lib-text); }
+html .library-page-shell .dir-control svg { width: 15px; height: 15px; }
+.dir-sort-chevron { width: 13px !important; height: 13px !important; margin-left: 1px; opacity: .6; transition: transform 240ms cubic-bezier(.32,.72,0,1); }
+.dir-sort[data-state="open"] .dir-sort-chevron { transform: rotate(180deg); }
+
+html .library-page-shell .dir-segment,
+html.light .library-page-shell .dir-segment { height: 32px; padding: 2px; border-radius: 10px; background: var(--lib-field); box-shadow: var(--lib-depth-1); }
+html .library-page-shell .dir-segment button { width: 30px; border-radius: 8px; color: var(--lib-text-3); }
+html .library-page-shell .dir-segment button:hover { color: var(--lib-text-2); }
+html .library-page-shell .dir-segment button[aria-checked="true"] { color: var(--lib-text); }
+html .library-page-shell .dir-segment-pill,
+html.light .library-page-shell .dir-segment-pill { top: 2px; bottom: 2px; left: 2px; width: 30px; border-radius: 8px; background: var(--lib-pill); box-shadow: var(--lib-pill-depth); }
+html .library-page-shell .dir-segment[data-value="line"] .dir-segment-pill { transform: translateX(30px); }
+
+html .library-page-shell .dir-saved[aria-pressed="true"],
+html.light .library-page-shell .dir-saved[aria-pressed="true"] { background: var(--lib-pill); color: var(--lib-text); box-shadow: var(--lib-pill-depth); }
+html .library-page-shell .dir-saved[aria-pressed="true"] svg { color: #e5484d; }
+
+/* ---- Sort menu (portaled) ---- */
+.lib-menu {
+  min-width: 220px; padding: 4px; border: 0 !important; border-radius: 12px;
+  background: var(--lib-surface); color: var(--lib-text); box-shadow: var(--lib-depth-3);
+}
+.lib-menu-label { padding: 6px 8px 4px; color: var(--lib-text-3); font-size: 11.5px; font-weight: 500; }
+.lib-menu-item {
+  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 8px; border-radius: 8px;
+  color: var(--lib-text-2); cursor: pointer;
+}
+.lib-menu-item[data-highlighted] { background: var(--lib-hover); color: var(--lib-text); }
+.lib-menu-item[data-selected="true"] { color: var(--lib-text); }
+.lib-menu-item-icon { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 auto; border-radius: 8px; background: var(--lib-field); box-shadow: var(--lib-depth-1); }
+.lib-menu-item-icon svg { width: 15px; height: 15px; }
+.lib-menu-item-text { display: grid; flex: 1 1 auto; line-height: 1.25; }
+.lib-menu-item-text span { font-size: 13px; font-weight: 600; }
+.lib-menu-item-text small { color: var(--lib-text-3); font-size: 11.5px; }
+.lib-menu-item-check { width: 15px; height: 15px; color: var(--lib-text); }
+
+/* ---- Cards (grid) ---- */
+html .library-page-shell .directory-gallery { gap: 16px; margin-top: 0; }
+html .library-page-shell .library-grid-card,
+html.light .library-page-shell .library-grid-card {
+  padding: 6px 6px 12px; border: 0; border-radius: 16px;
+  background: var(--lib-surface); color: var(--lib-text); box-shadow: var(--lib-depth-2);
+  transition: box-shadow 220ms ease, background-color 220ms ease, transform 220ms cubic-bezier(.32,.72,0,1);
+}
+html .library-page-shell .library-grid-card:hover,
+html.light .library-page-shell .library-grid-card:hover { background: var(--lib-surface-hover); box-shadow: var(--lib-depth-3); transform: translateY(-1px); }
+html .library-page-shell .library-grid-card .library-card-image,
+html.light .library-page-shell .library-grid-card .library-card-image {
+  margin-bottom: 10px; border: 0; border-radius: 11px; overflow: hidden;
+  background: var(--lib-media); box-shadow: inset 0 0 0 1px var(--lib-edge);
+}
+html .library-page-shell .library-card-fallback,
+html.light .library-page-shell .library-card-fallback { background: var(--lib-media); color: var(--lib-text-2); }
+html .library-page-shell .library-grid-card .library-card-heading { padding: 0 6px; }
+html .library-page-shell .library-grid-card [data-slot], html .library-page-shell .library-grid-card h3 { color: var(--lib-text); }
+html .library-page-shell .library-grid-card .library-card-category,
+html.light .library-page-shell .library-grid-card .library-card-category { color: var(--lib-text-3); font-size: 11px; }
+html .library-page-shell .library-grid-card .library-card-category-dot { background: var(--lib-text-3); }
+html .library-page-shell .library-grid-card .library-grid-description,
+html.light .library-page-shell .library-grid-card .library-grid-description { padding: 0 6px; color: var(--lib-text-2); }
+html .library-page-shell .library-chip,
+html.light .library-page-shell .library-chip { border: 0; background: var(--lib-field); color: var(--lib-text-2); box-shadow: none; }
+
+/* Save button floating on the preview. */
+html .library-page-shell .directory-section .library-grid-save,
+html.light .library-page-shell .directory-section .library-grid-save {
+  top: 14px; right: 14px; width: 30px; height: 30px; min-width: 30px; min-height: 30px;
+  border: 0; border-radius: 9px;
+  background: rgba(22,22,22,.62); color: #fff;
+  box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 2px 8px rgba(0,0,0,.25);
+  backdrop-filter: blur(10px) saturate(1.4); -webkit-backdrop-filter: blur(10px) saturate(1.4);
+  opacity: 0; transform: scale(.92);
+  transition: opacity 180ms ease, transform 220ms cubic-bezier(.32,.72,0,1), background-color 160ms ease;
+}
+html .library-page-shell .library-grid-card:hover .library-grid-save,
+html .library-page-shell .library-grid-save:focus-visible,
+html .library-page-shell .directory-section .library-grid-save[aria-pressed="true"] { opacity: 1; transform: none; }
+html .library-page-shell .directory-section .library-grid-save:hover { background: rgba(22,22,22,.8); }
+html .library-page-shell .directory-section .library-grid-save[aria-pressed="true"],
+html.light .library-page-shell .directory-section .library-grid-save[aria-pressed="true"] { background: rgba(22,22,22,.72); color: #ff6b70; border: 0; }
+@media (hover: none) { .library-page-shell .directory-section .library-grid-save { opacity: 1; transform: none; } }
+
+/* ---- Cards (line) ---- */
+html .library-page-shell .library-card,
+html.light .library-page-shell .library-card {
+  border: 0; border-radius: 14px; background: var(--lib-surface); color: var(--lib-text); box-shadow: var(--lib-depth-2);
+  transition: box-shadow 220ms ease;
+}
+html .library-page-shell .library-card:hover { box-shadow: var(--lib-depth-3); }
+html .library-page-shell .library-card .theme-border { border: 0; background: var(--lib-field); box-shadow: var(--lib-depth-1); }
+html .library-page-shell .library-card .library-subtle { color: var(--lib-text-3); }
+html .library-page-shell .library-card .library-muted { color: var(--lib-text-2); }
+html .library-page-shell .library-save,
+html.light .library-page-shell .library-save { color: var(--lib-text-3); }
+html .library-page-shell .library-save[aria-pressed="true"],
+html.light .library-page-shell .library-save[aria-pressed="true"],
+html:not(.light) .library-page-shell .directory-section .library-save:not(.library-grid-save)[aria-pressed="true"] { color: #e5484d; }
+
+/* ---- Empty state ---- */
+html .library-page-shell .directory-results-pane > .border-dashed { border: 0; border-radius: 16px; background: var(--lib-surface); box-shadow: var(--lib-depth-2); }
+
+/* ---- Focus: neutral rings, never blue ---- */
+html .library-page-shell, .lib-menu { --ring: var(--lib-focus); --sidebar-ring: var(--lib-focus); }
+html .library-page-shell :focus-visible { outline-color: var(--lib-focus) !important; }
+
+/* ---- Notice on the directory: neutral, lifted card ---- */
+body:has(.library-page-shell) .site-notice {
+  left: auto; right: 16px; bottom: 16px; max-width: 420px; padding: 14px 16px;
+  border: 0; border-radius: 14px; background: var(--lib-surface); color: var(--lib-text); box-shadow: var(--lib-depth-3);
+}
+body:has(.library-page-shell) .site-notice > div { flex-direction: column; align-items: flex-start; gap: 12px; }
+body:has(.library-page-shell) .site-notice h2 { font-size: 14px; }
+body:has(.library-page-shell) .site-notice p { color: var(--lib-text-2); font-size: 13px; line-height: 1.45; }
+body:has(.library-page-shell) .site-notice-cta {
+  min-height: 32px; height: 32px; padding: 0 12px; border-radius: 9px;
+  background: var(--lib-text) !important; color: var(--lib-bg) !important; font-size: 12.5px;
+}
+body:has(.library-page-shell) .site-notice-close { min-height: 32px; color: var(--lib-text-2); font-size: 12.5px; text-decoration: none; }
+body:has(.library-page-shell) .site-notice-close:hover { color: var(--lib-text); }
+
+@media (max-width: 760px) {
+  .library-page-shell .directory-results-pane { padding: 16px 16px 120px; border-radius: 0; box-shadow: none; }
+  .library-page-shell .dir-search, html .library-page-shell .dir-search:focus-within { width: 100%; }
+}
+@media (prefers-reduced-motion: reduce) {
+  .library-page-shell .library-grid-card, html .library-page-shell .library-grid-save, .dir-sort-chevron { transition: none; }
+  .library-page-shell .library-grid-card:hover { transform: none; }
+}
+
+/* ---- Segmented controls (sort + view): equal cells, one sliding pill ---- */
+html .library-page-shell .dir-segment { --seg-w: 30px; grid-template-columns: repeat(2, var(--seg-w)); }
+html .library-page-shell .dir-segment-text { --seg-w: 66px; }
+html .library-page-shell .dir-segment button { width: var(--seg-w); font-size: 12.5px; font-weight: 600; }
+html .library-page-shell .dir-segment-pill,
+html.light .library-page-shell .dir-segment-pill { width: var(--seg-w); }
+html .library-page-shell .dir-segment[data-value="0"] .dir-segment-pill { transform: none; }
+html .library-page-shell .dir-segment[data-value="1"] .dir-segment-pill { transform: translateX(var(--seg-w)); }
+.dir-view-icon { width: 15px; height: 15px; }
+
+/* ---- List rows: one centred line, columns that line up row to row ---- */
+.lib-row {
+  position: relative;
+  display: grid;
+  grid-template-columns: 36px minmax(140px, 200px) minmax(0, 1fr) auto auto;
+  align-items: center;
+  column-gap: 16px;
+  min-height: 64px;
+  padding: 12px 12px 12px 14px;
+  border-radius: 14px;
+  background: var(--lib-surface);
+  color: var(--lib-text);
+  box-shadow: var(--lib-depth-2);
+  transition: transform 260ms cubic-bezier(.32,.72,0,1), box-shadow 260ms ease;
+}
+.lib-row-logo { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--lib-field); box-shadow: var(--lib-depth-1); }
+.lib-row-id { display: grid; min-width: 0; line-height: 1.25; }
+.lib-row-name { overflow: hidden; color: var(--lib-text); font-size: 14px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; outline: none; }
+/* The name link covers the whole row, so the row is one click target. */
+.lib-row-name::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
+.lib-row-host { overflow: hidden; color: var(--lib-text-3); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
+.lib-row-desc { min-width: 0; overflow: hidden; color: var(--lib-text-2); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
+.lib-row-tags { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
+.lib-tag { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 8px; border-radius: 7px; background: var(--lib-field); color: var(--lib-text-2); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
+.lib-tag-link { position: relative; z-index: 1; text-decoration: none; }
+.lib-tag-link:hover { color: var(--lib-text); background: var(--lib-field-hover); }
+.lib-tag-link svg { width: 11px; height: 11px; }
+.lib-tag-more { color: var(--lib-text-3); }
+.lib-row-actions { position: relative; z-index: 1; display: flex; align-items: center; gap: 2px; }
+.lib-row-action { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: var(--lib-text-3); transition: background-color 160ms ease, color 160ms ease; }
+.lib-row-action:hover { background: var(--lib-hover); color: var(--lib-text); }
+.lib-row-action svg { width: 16px; height: 16px; }
+.lib-row-action.library-save[aria-pressed="true"] { color: #e5484d; }
+html .library-page-shell .directory-gallery:has(.lib-row) { gap: 8px; }
+@media (max-width: 1023px) {
+  .lib-row { grid-template-columns: 36px minmax(0, 1fr) auto; row-gap: 8px; }
+  .lib-row-desc { grid-column: 2 / 4; white-space: normal; }
+  .lib-row-tags { grid-column: 2 / 4; justify-content: flex-start; }
+  .lib-row-actions { grid-column: 3; grid-row: 1; }
+}
+
+/* ---- Hover: cards come toward you (scale), not up ---- */
+html .library-page-shell .library-grid-card:hover,
+html.light .library-page-shell .library-grid-card:hover { transform: scale(1.015); }
+.lib-row:hover { transform: scale(1.006); box-shadow: var(--lib-depth-3); }
+html .library-page-shell .library-grid-card { transform-origin: center; will-change: transform; }
+
+/* ---- No click artefacts: no press-shrink, no focus box on mouse click, no tap flash ---- */
+html .library-page-shell .facet-option:active .facet-option-icon,
+html .library-page-shell .dir-saved:active svg { transform: none; }
+html .library-page-shell a, html .library-page-shell button { -webkit-tap-highlight-color: transparent; }
+html .library-page-shell :focus:not(:focus-visible) { outline: none !important; }
+html .library-page-shell .library-grid-card a:focus-visible,
+.lib-row-name:focus-visible { outline: none !important; }
+html .library-page-shell .library-grid-card:has(a:focus-visible),
+.lib-row:has(.lib-row-name:focus-visible) { box-shadow: 0 0 0 2px var(--lib-focus); }
+html .library-page-shell .library-grid-card, .lib-row { -webkit-user-select: none; user-select: none; }
+
+@media (prefers-reduced-motion: reduce) {
+  .lib-row, .lib-row:hover { transition: none; transform: none; }
+  html .library-page-shell .library-grid-card:hover { transform: none; }
+}
+
+@media (min-width: 1024px) {
+  .lib-row { grid-template-columns: 36px minmax(140px, 200px) minmax(0, 1fr) 250px auto; }
+  .lib-row-tags { overflow: hidden; }
+}
+
+/* =====================================================================
+   Library directory — polish pass
+   ===================================================================== */
+
+/* ---- Icon/label alignment: trim labels to cap height so flex centring
+        puts the icon on the middle of the capitals, not the line box. ---- */
+.cap { text-box: trim-both cap alphabetic; }
+html .library-page-shell .facet-option-label,
+.lib-row-name, .lib-row-desc, .lib-row-host { overflow-x: clip; overflow-y: visible; }
+.nav-icon, .facet-option-icon { width: 15px; height: 15px; }
+/* Inputs can't be trimmed. With line-height: normal the input box is exactly the font's
+   content area, so flex centring lands the capitals on the icon's centre line. */
+html .library-page-shell .dir-search input { height: auto; line-height: normal; }
+
+/* ---- Sidebar lists ---- */
+html .library-page-shell .facet-options { grid-template-columns: minmax(0, 1fr); }
+html .library-page-shell .facet-option { width: 100%; min-width: 0; }
+html .library-page-shell .directory-filter-panel [data-slot="sidebar-content"] { scrollbar-width: none; }
+html .library-page-shell .directory-filter-panel [data-slot="sidebar-content"]::-webkit-scrollbar { display: none; }
+html .library-page-shell .directory-sidebar,
+html .library-page-shell .dir-toolbar { -webkit-user-select: none; user-select: none; }
+.facet-selected-count {
+  display: grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 5px;
+  background: var(--lib-field); color: var(--lib-text-2); font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums;
+}
+
+/* Crisp checkboxes: whole-pixel box, 1px ring. */
+html .library-page-shell .facet-check {
+  width: 14px; height: 14px; border-radius: 4px;
+  background: transparent; box-shadow: inset 0 0 0 1px var(--lib-text-3);
+  transition: background-color 160ms ease, box-shadow 160ms ease;
+}
+html .library-page-shell .facet-option:hover .facet-check { box-shadow: inset 0 0 0 1px var(--lib-text-2); }
+html .library-page-shell .facet-option[data-active="true"] .facet-check { background: var(--lib-text); box-shadow: none; }
+html .library-page-shell .facet-check svg { width: 10px; height: 10px; stroke-width: 3.2; color: var(--lib-panel); transform: scale(.6); transition: opacity 140ms ease, transform 200ms cubic-bezier(.32,.72,0,1); }
+html .library-page-shell .facet-option[data-active="true"] .facet-check svg { transform: none; }
+
+/* Selection: quiet, never a white slab. */
+body:has(.library-page-shell) ::selection { background: rgba(255,255,255,.18); color: inherit; }
+html.light body:has(.library-page-shell) ::selection { background: rgba(0,0,0,.12); color: inherit; }
+
+/* ---- Separator: inset, engraved ---- */
+html .library-page-shell .app-nav-block::after {
+  height: 1px; background: rgba(0,0,0,.55); box-shadow: 0 1px 0 rgba(255,255,255,.07);
+}
+html.light .library-page-shell .app-nav-block::after { background: rgba(0,0,0,.09); box-shadow: 0 1px 0 #fff; }
+
+/* ---- Cards: surface grows toward you; text never scales ---- */
+html .library-page-shell .directory-gallery-item { will-change: auto; }
+html .library-page-shell .library-grid-card,
+html.light .library-page-shell .library-grid-card,
+html .library-page-shell .library-grid-card:hover,
+html.light .library-page-shell .library-grid-card:hover {
+  position: relative; isolation: isolate;
+  background: transparent !important; box-shadow: none !important;
+  transform: none !important; will-change: auto;
+}
+html .library-page-shell .library-grid-card::before,
+.lib-row::before {
+  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
+  background: var(--lib-surface); box-shadow: var(--lib-depth-2);
+  transition: transform 340ms cubic-bezier(.32,.72,0,1), background-color 200ms ease;
+}
+html .library-page-shell .library-grid-card:hover::before { transform: scale(1.025); background: var(--lib-surface-hover); }
+html .library-page-shell .library-card-image img { transition: transform 460ms cubic-bezier(.32,.72,0,1); }
+html .library-page-shell .library-grid-card:hover .library-card-image img { transform: scale(1.04); }
+
+.lib-row, .lib-row:hover { isolation: isolate; background: transparent; box-shadow: none; transform: none; }
+.lib-row:hover::before { transform: scale(1.012, 1.04); background: var(--lib-surface-hover); }
+
+/* ---- Save heart: calm fade, no pop, no frosted glass ---- */
+html .library-page-shell .directory-section .library-grid-save,
+html.light .library-page-shell .directory-section .library-grid-save {
+  background: rgba(18,18,18,.78); color: #fff;
+  box-shadow: 0 0 0 1px rgba(255,255,255,.08);
+  backdrop-filter: none; -webkit-backdrop-filter: none;
+  transform: none; transition: opacity 160ms ease, background-color 160ms ease, color 160ms ease;
+}
+html .library-page-shell .directory-section .library-grid-save:hover { background: rgba(18,18,18,.92); }
+html .library-page-shell .library-save svg { animation: none !important; transition: color 160ms ease, fill 160ms ease; }
+
+/* ---- No heavy hover shadows anywhere on the page ---- */
+html .library-page-shell .dir-search:focus-within,
+html.light .library-page-shell .dir-search:focus-within { box-shadow: 0 0 0 1px var(--lib-pill-edge); }
+
+@media (prefers-reduced-motion: reduce) {
+  html .library-page-shell .library-grid-card::before, .lib-row::before, html .library-page-shell .library-card-image img { transition: none; }
+  html .library-page-shell .library-grid-card:hover::before, .lib-row:hover::before, html .library-page-shell .library-grid-card:hover .library-card-image img { transform: none; }
+}
+
+/* =====================================================================
+   App frame: one top bar, one sidebar, one content card, every route.
+   Spacing scale used below: 4 / 8 / 12 / 16 / 24.
+   ===================================================================== */
+:root { --frame-sidebar: 216px; --frame-rail: 56px; --frame-gutter: 12px; --frame-radius: 16px; }
+
+body:has(.app-frame) { overflow: hidden; overscroll-behavior: none; background: var(--lib-bg); }
+html .app-frame.library-page-shell {
+  display: grid;
+  grid-template-columns: var(--frame-sidebar) minmax(0, 1fr);
+  grid-template-rows: var(--site-header-height) minmax(0, 1fr);
+  width: 100%; height: 100dvh; overflow: hidden;
+  flex-direction: initial;
+  background: var(--lib-bg); color: var(--lib-text);
+  transition: grid-template-columns 360ms cubic-bezier(.32,.72,0,1);
+}
+html .app-frame.library-page-shell[data-rail] { grid-template-columns: calc(var(--frame-rail) + var(--frame-sidebar)) minmax(0, 1fr); }
+
+/* Top bar */
+.app-frame > .site-header { position: relative; inset: auto; z-index: 50; grid-column: 1 / -1; grid-row: 1; height: var(--site-header-height); }
+.app-frame .site-header-inner,
+html.light .app-frame .site-header-inner { background: var(--lib-bg); color: var(--lib-text); border: 0; box-shadow: none; }
+.app-frame .site-header-brand { color: var(--lib-text); }
+.app-frame .site-header-actions { gap: 6px; }
+.app-frame .site-header-github,
+.app-frame .site-header-menu,
+.app-frame .site-header-actions > button:not(.site-header-menu),
+html.light .app-frame .site-header-github,
+html.light .app-frame .site-header-menu {
+  height: 32px; min-height: 32px; border: 0; border-radius: 10px;
+  background: var(--lib-field); color: var(--lib-text-2); box-shadow: var(--lib-depth-1);
+}
+.app-frame .site-header-actions > button:not(.site-header-menu) { display: grid; place-items: center; width: 32px; min-width: 32px; padding: 0; }
+.app-frame .site-header-github { gap: 7px; padding: 0 10px; font-size: 12.5px; font-weight: 600; }
+.app-frame .site-header-github:hover, .app-frame .site-header-actions > button:hover { background: var(--lib-field-hover); color: var(--lib-text); }
+.app-frame .site-header-search,
+html.light .app-frame .site-header-search {
+  width: 240px; height: 32px; min-height: 32px; padding: 0 6px 0 10px; border: 0; border-radius: 10px;
+  background: var(--lib-field); color: var(--lib-text-3); box-shadow: var(--lib-depth-1);
+}
+.app-frame .site-header-search input { height: auto; line-height: normal; color: var(--lib-text); font-size: 13px; }
+.app-frame .site-header-search input::placeholder { color: var(--lib-text-3); opacity: 1; }
+.app-frame .site-header-search kbd { min-width: 20px; height: 20px; border: 0; border-radius: 6px; background: var(--lib-bg); color: var(--lib-text-3); box-shadow: 0 0 0 1px var(--lib-edge); font-family: inherit; font-size: 11px; font-weight: 600; }
+.app-frame .site-header-search-results { border: 0; border-radius: 12px; background: var(--lib-surface); color: var(--lib-text); box-shadow: var(--lib-depth-3); }
+.site-header-directory .site-header-search { display: none; }
+
+/* Sidebar */
+.app-frame-sidebar {
+  grid-column: 1; grid-row: 2; min-width: 0; min-height: 0;
+  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
+  overflow: hidden;
+}
+.app-frame-nav { position: relative; padding: 4px var(--frame-gutter) 12px; }
+.app-frame-nav::after {
+  content: ""; position: absolute; left: calc(var(--frame-gutter) + 8px); right: calc(var(--frame-gutter) + 8px); bottom: 0;
+  height: 1px; background: rgba(0,0,0,.55); box-shadow: 0 1px 0 rgba(255,255,255,.07);
+}
+html.light .app-frame-nav::after { background: rgba(0,0,0,.09); box-shadow: 0 1px 0 #fff; }
+.app-frame-sidebar:has(.app-frame-slot:empty) .app-frame-nav::after { display: none; }
+.app-frame-slot { min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; padding-top: 4px; }
+.app-frame-slot::-webkit-scrollbar { display: none; }
+
+.app-nav { display: grid; gap: 2px; }
+.app-nav-link { position: relative; overflow: hidden; white-space: nowrap; }
+.app-nav-label { transition: opacity 200ms ease; }
+
+/* Docs: main navigation collapses to a rail, docs navigation becomes a second column. */
+.app-frame[data-rail] .app-frame-sidebar { grid-template-columns: var(--frame-rail) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
+.app-frame[data-rail] .app-frame-nav { padding: 4px var(--frame-gutter); }
+.app-frame[data-rail] .app-frame-nav::after { display: none; }
+.app-frame[data-rail] .app-nav-link { width: 32px; }
+.app-frame[data-rail] .app-nav-label { opacity: 0; pointer-events: none; }
+.app-frame[data-rail] .app-frame-slot { padding: 4px var(--frame-gutter) 16px; box-shadow: inset 1px 0 0 rgba(0,0,0,.45), inset 2px 0 0 rgba(255,255,255,.04); }
+html.light .app-frame[data-rail] .app-frame-slot { box-shadow: inset 1px 0 0 rgba(0,0,0,.08), inset 2px 0 0 #fff; }
+
+/* Content card */
+.app-frame-panel {
+  grid-column: 2; grid-row: 2; min-width: 0; min-height: 0;
+  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
+  border-top-left-radius: var(--frame-radius);
+  background: var(--lib-panel);
+  box-shadow: inset 1px 1px 0 var(--lib-edge);
+}
+
+/* Page sidebar content rendered inline before it moves into the frame (or on mobile). */
+.sidebar-slot-inline[data-mobile="hidden"] { display: none; }
+@media (min-width: 1024px) { .sidebar-slot-inline { display: none; } }
+
+@media (max-width: 1023px) {
+  html .app-frame.library-page-shell,
+  html .app-frame.library-page-shell[data-rail] { grid-template-columns: minmax(0, 1fr); }
+  .app-frame-sidebar { display: none; }
+  .app-frame-panel { grid-column: 1; border-radius: 0; box-shadow: none; }
+  .app-frame .site-header-menu { display: flex; }
+}
+@media (prefers-reduced-motion: reduce) { html .app-frame.library-page-shell, .app-nav-label { transition: none; } }
+
+/* ---- Directory inside the frame: no nested scrolling, no second card ---- */
+html .app-frame .directory-section { height: auto; min-height: 0; overflow: visible; }
+html .app-frame .directory-layout { height: auto; min-height: 0 !important; display: block; }
+html .app-frame .directory-results-pane,
+html.light .app-frame .directory-results-pane {
+  margin: 0; padding: 24px 24px 96px; overflow: visible;
+  border-radius: 0; background: transparent; box-shadow: none;
+}
+html .app-frame .directory-sidebar {
+  position: static; top: auto; width: 100%; height: auto; min-height: 0; overflow: visible;
+  flex: none; border: 0; background: transparent;
+}
+html .app-frame .directory-filter-panel [data-slot="sidebar-content"] { overflow: visible; flex: none; min-height: 0; padding: 0; gap: 0; }
+html .app-frame .directory-filter-panel [data-slot="sidebar-footer"] { padding: 12px var(--frame-gutter) 16px; }
+html .app-frame .directory-filter-trigger { margin: 16px 16px 0; }
+@media (max-width: 760px) { html .app-frame .directory-results-pane { padding: 16px 16px 96px; } }
+
+/* ---- Filter sections: full-width headers, even rhythm ---- */
+html .app-frame .facet-group { padding: 0 var(--frame-gutter); margin: 0; }
+html .app-frame .facet-group + .facet-group { margin-top: 8px; }
+html .app-frame .facet-heading-row {
+  display: flex; align-items: center; gap: 6px; width: 100%; min-height: 28px;
+  padding: 0 8px; border-radius: 10px; color: var(--lib-text-3); text-align: left;
+  transition: color 160ms ease, background-color 160ms ease;
+}
+html .app-frame .facet-group:first-child .facet-heading-row { padding-top: 0; }
+html .app-frame .facet-heading-row:hover { color: var(--lib-text-2); background: var(--lib-hover); }
+html .app-frame .facet-heading-row:focus-visible { outline: 2px solid var(--lib-focus); outline-offset: -2px; }
+html .app-frame .facet-heading { flex: 1 1 auto; min-height: 0; color: inherit; font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; }
+html .app-frame .facet-heading-icon { width: 13px; height: 13px; opacity: .7; transition: transform 240ms cubic-bezier(.32,.72,0,1); }
+html .app-frame .facet-heading-row[aria-expanded="false"] .facet-heading-icon { transform: rotate(-90deg); }
+html .app-frame .facet-options { padding: 2px 0 0; }
+
+/* ---- Library cards (grid) ---- */
+html .app-frame .directory-gallery { gap: 16px; }
+.lib-card {
+  position: relative; display: flex; flex-direction: column; min-width: 0; height: 100%;
+  border-radius: var(--frame-radius); overflow: hidden;
+  background: var(--lib-surface); color: var(--lib-text); box-shadow: var(--lib-depth-2);
+  transition: background-color 180ms ease, box-shadow 180ms ease;
+  -webkit-user-select: none; user-select: none;
+}
+.lib-card:hover { background: var(--lib-surface-hover); box-shadow: inset 0 1px 0 var(--lib-highlight), 0 0 0 1px var(--lib-pill-edge), 0 2px 6px rgba(0,0,0,.22); }
+html.light .lib-card:hover { box-shadow: 0 0 0 1px rgba(0,0,0,.1), 0 2px 8px rgba(0,0,0,.05); }
+.lib-card:has(.lib-card-name:focus-visible) { box-shadow: 0 0 0 2px var(--lib-focus); }
+/* The image is the whole upper section; only its lower corners round off. */
+html .app-frame .lib-card .lib-card-media {
+  position: relative; width: 100%; height: auto; aspect-ratio: 16 / 10; margin: 0; flex: none;
+  border-radius: 0 0 12px 12px; overflow: hidden;
+  background: var(--lib-media); box-shadow: inset 0 -1px 0 var(--lib-edge);
+}
+html .app-frame .lib-card .lib-card-media img { border-radius: 0; }
+.lib-card-fallback { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 8px; color: var(--lib-text-3); }
+.lib-card-fallback-host { font-size: 12px; }
+.lib-card-body { display: flex; flex: 1 1 auto; flex-direction: column; padding: 12px 14px 14px; }
+.lib-card-name { color: var(--lib-text); font-size: 15px; font-weight: 700; line-height: 1.25; text-decoration: none; outline: none; }
+.lib-card-name::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
+.lib-card-desc {
+  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
+  min-height: calc(2 * 1.45em); margin-top: 4px;
+  color: var(--lib-text-2); font-size: 13px; line-height: 1.45;
+}
+.lib-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: auto; padding-top: 12px; }
+.lib-card-category {
+  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px 0 7px; border-radius: 8px;
+  background: var(--lib-field); color: var(--lib-text-2); font-size: 11.5px; font-weight: 600; white-space: nowrap;
+}
+.lib-card-category-icon { width: 13px; height: 13px; opacity: .85; }
+.lib-card .lib-tag-link { position: relative; z-index: 1; }
+.lib-card-save {
+  position: absolute; top: 10px; right: 10px; z-index: 2;
+  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
+  background: rgba(18,18,18,.78); color: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.08);
+  opacity: 0; transition: opacity 160ms ease, background-color 160ms ease, color 160ms ease;
+}
+.lib-card-save svg { width: 15px; height: 15px; }
+.lib-card:hover .lib-card-save, .lib-card-save:focus-visible, .lib-card-save[aria-pressed="true"] { opacity: 1; }
+.lib-card-save:hover { background: rgba(18,18,18,.92); }
+.lib-card-save[aria-pressed="true"] { color: #ff6b70; }
+@media (hover: none) { .lib-card-save { opacity: 1; } }
+
+/* List rows: plain hover, no scaling. */
+.lib-row, .lib-row:hover { transform: none; }
+.lib-row::before { transition: background-color 180ms ease, box-shadow 180ms ease; }
+.lib-row:hover::before { transform: none; box-shadow: inset 0 1px 0 var(--lib-highlight), 0 0 0 1px var(--lib-pill-edge), 0 2px 6px rgba(0,0,0,.22); }
+
+/* ---- Docs inside the frame ---- */
+.app-frame .docs-sidebar { padding: 0; background: transparent; }
+.app-frame .docs-sidebar-heading { margin: 12px 0 4px; padding-left: 8px !important; color: var(--lib-text-3); font-size: 12px !important; font-weight: 500 !important; }
+.app-frame .docs-sidebar-content > div > div:first-of-type .docs-sidebar-heading { margin-top: 0; }
+.app-frame .docs-sidebar-link { color: var(--lib-text-2); }
+.app-frame .docs-sidebar-link:hover { color: var(--lib-text); }
+.app-frame .docs-sidebar-link[aria-current="page"], html.light .app-frame .docs-sidebar-link[aria-current="page"] { color: var(--lib-text); font-weight: 600; }
+.app-frame .docs-sidebar-link-highlight, html.light .app-frame .docs-sidebar-link-highlight { border: 0; background: var(--lib-pill); box-shadow: var(--lib-pill-depth); }
+.app-frame .docs-page-shell { background: transparent; }
+
+/* Checkbox ring as a real border: borders snap to device pixels, inset shadows
+   anti-alias at fractional display scales and leave stray corner pixels. */
+html .app-frame .facet-check {
+  box-sizing: border-box; width: 14px; height: 14px; border: 1px solid var(--lib-text-3); border-radius: 4px;
+  background: transparent; box-shadow: none;
+}
+html .app-frame .facet-option:hover .facet-check { border-color: var(--lib-text-2); box-shadow: none; }
+html .app-frame .facet-option[data-active="true"] .facet-check { border-color: var(--lib-text); background: var(--lib-text); box-shadow: none; }
+html .app-frame .contributors-page { background: transparent; }
+
+/* =====================================================================
+   Frame v2: no top bar on desktop. The sidebar carries brand, search,
+   navigation, page content and repo links; the card gets the full height.
+   Sidebar sizes: narrow by default, wide on the directory, rail + docs column
+   on docs. Outer and inner columns animate on the same curve so the sidebar
+   reshapes as one motion.
+   ===================================================================== */
+:root {
+  --sb-narrow: 184px; --sb-wide: 216px; --sb-rail: 56px; --sb-docs: 216px;
+  --sb-brand-h: 52px;
+  --frame-ease: cubic-bezier(.32, .72, 0, 1);
+  --frame-dur: 460ms;
+  --lib-chip: rgba(255,255,255,.075);
+}
+html.light { --lib-chip: rgba(0,0,0,.055); }
+
+html .app-frame.library-page-shell[data-sidebar] {
+  --sb: var(--sb-narrow);
+  grid-template-columns: var(--sb) minmax(0, 1fr);
+  grid-template-rows: minmax(0, 1fr);
+  transition: grid-template-columns var(--frame-dur) var(--frame-ease);
+}
+html .app-frame.library-page-shell[data-sidebar="wide"] { --sb: var(--sb-wide); }
+html .app-frame.library-page-shell[data-sidebar="rail"] { --sb: calc(var(--sb-rail) + var(--sb-docs)); }
+
+@media (min-width: 1024px) { html .app-frame > .site-header { display: none; } }
+
+html .app-frame .app-frame-sidebar {
+  position: relative; z-index: 2;
+  grid-column: 1; grid-row: 1; min-width: 0; min-height: 0; overflow: visible;
+  display: grid;
+  grid-template-columns: var(--sb) 0px;
+  grid-template-rows: var(--sb-brand-h) auto auto minmax(0, 1fr) auto;
+  grid-template-areas: "brand docs" "search docs" "nav docs" "slot docs" "footer docs";
+  transition: grid-template-columns var(--frame-dur) var(--frame-ease);
+}
+html .app-frame[data-sidebar="rail"] .app-frame-sidebar {
+  grid-template-columns: var(--sb-rail) var(--sb-docs);
+  grid-template-areas: "brand slot" "search slot" "nav slot" ". slot" "footer slot";
+}
+
+/* Brand */
+.app-frame-brand { grid-area: brand; display: flex; align-items: center; min-width: 0; padding: 0 12px 0 18px; }
+.site-brand { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--lib-text); font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
+.site-brand-mark { width: 20px; height: 20px; flex: 0 0 auto; object-fit: contain; }
+html.light .site-brand-mark { filter: invert(1); }
+.site-brand-name, .app-nav-label { transition: opacity 160ms ease; }
+.app-frame:not([data-rail]) .site-brand-name,
+.app-frame:not([data-rail]) .app-nav-label { transition-delay: 140ms; }
+.app-frame[data-rail] .app-frame-brand .site-brand-name { opacity: 0; }
+
+/* Search */
+.app-frame-search { grid-area: search; min-width: 0; padding: 0 12px 10px; }
+.site-search {
+  position: relative; display: flex; align-items: center; gap: 8px; width: 100%; height: 32px;
+  padding: 0 6px 0 8px; border-radius: 10px;
+  background: var(--lib-field); color: var(--lib-text-3); box-shadow: var(--lib-depth-1);
+  transition: background-color 160ms ease, box-shadow 160ms ease;
+}
+.site-search:hover { background: var(--lib-field-hover); }
+.site-search:focus-within { background: var(--lib-surface); box-shadow: 0 0 0 1px var(--lib-pill-edge); color: var(--lib-text-2); }
+.site-search > svg { width: 15px; height: 15px; flex: 0 0 auto; }
+.site-search input { min-width: 0; flex: 1 1 auto; height: auto; line-height: normal; background: transparent; color: var(--lib-text); font-size: 13px; outline: none; }
+.site-search input::placeholder { color: var(--lib-text-3); opacity: 1; }
+.site-search input::-webkit-search-cancel-button { display: none; }
+.site-search kbd { display: grid; place-items: center; min-width: 20px; height: 20px; border-radius: 6px; background: var(--lib-bg); color: var(--lib-text-3); box-shadow: 0 0 0 1px var(--lib-edge); font-family: inherit; font-size: 11px; font-weight: 600; }
+.site-search:focus-within kbd { opacity: 0; }
+.site-search-results {
+  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; width: 280px; padding: 4px;
+  border-radius: 12px; background: var(--lib-surface); color: var(--lib-text); box-shadow: var(--lib-depth-3);
+}
+.site-search-results ul { display: grid; gap: 2px; }
+.site-search-results a { display: grid; gap: 1px; padding: 7px 8px; border-radius: 8px; color: inherit; text-decoration: none; font-size: 13px; font-weight: 600; }
+.site-search-results small { color: var(--lib-text-3); font-size: 11.5px; font-weight: 500; }
+.site-search-results a:hover, .site-search-results a:focus-visible { background: var(--lib-hover); }
+.site-search-results p { padding: 8px; color: var(--lib-text-3); font-size: 13px; }
+.site-search-results button { width: 100%; margin-top: 4px; padding: 8px; border-top: 1px solid var(--lib-line); color: var(--lib-text-2); font-size: 12.5px; font-weight: 600; text-align: left; }
+.site-search-results button:hover { color: var(--lib-text); }
+.site-search-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--lib-field); color: var(--lib-text-3); box-shadow: var(--lib-depth-1); }
+.site-search-icon:hover { background: var(--lib-field-hover); color: var(--lib-text); }
+.site-search-icon svg { width: 15px; height: 15px; }
+
+/* Navigation: the column narrowing is what shrinks the pills; no width snapping. */
+html .app-frame .app-frame-nav { grid-area: nav; min-width: 0; padding: 0 12px 12px; }
+html .app-frame[data-rail] .app-nav-link { width: auto; }
+html .app-frame[data-rail] .app-frame-nav { padding: 0 12px; }
+
+/* Page content (filters, docs navigation) */
+html .app-frame .app-frame-slot { grid-area: slot; min-width: 0; min-height: 0; padding-top: 4px; overflow-x: hidden; overflow-y: auto; }
+html .app-frame[data-rail] .app-frame-slot {
+  padding: calc(var(--sb-brand-h) - 4px) 12px 16px;
+  box-shadow: inset 1px 0 0 rgba(0,0,0,.45), inset 2px 0 0 rgba(255,255,255,.035);
+}
+html.light .app-frame[data-rail] .app-frame-slot { box-shadow: inset 1px 0 0 rgba(0,0,0,.07), inset 2px 0 0 #fff; }
+/* Docs navigation keeps its final width while its column opens, so it is revealed, not squeezed. */
+html .app-frame[data-rail] .app-frame-slot > * { width: calc(var(--sb-docs) - 24px); }
+.app-frame-slot > * { animation: frame-slot-in 420ms var(--frame-ease) 80ms both; }
+@keyframes frame-slot-in { from { opacity: 0; transform: translateX(-6px); } }
+
+/* Repo links */
+.app-frame-footer { grid-area: footer; display: flex; align-items: center; gap: 6px; min-width: 0; padding: 10px 12px 12px; }
+.site-github {
+  display: inline-flex; align-items: center; gap: 8px; min-width: 0; height: 32px; padding: 0 10px; border-radius: 10px;
+  background: var(--lib-field); color: var(--lib-text-2); box-shadow: var(--lib-depth-1);
+  font-size: 12.5px; font-weight: 600; text-decoration: none; white-space: nowrap; overflow: hidden;
+  transition: background-color 160ms ease, color 160ms ease;
+}
+.site-github:hover { background: var(--lib-field-hover); color: var(--lib-text); }
+.site-github svg:first-child { flex: 0 0 auto; }
+.site-github-count { display: inline-flex; align-items: center; gap: 4px; }
+.site-github-star { width: 12px; height: 12px; fill: #e8b33c; color: #e8b33c; }
+.app-frame-footer .site-github { flex: 1 1 auto; }
+.app-frame-footer .theme-toggle,
+html.light .app-frame-footer .theme-toggle {
+  display: grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px; min-width: 32px; padding: 0;
+  border: 0; border-radius: 10px; background: var(--lib-field); color: var(--lib-text-2); box-shadow: var(--lib-depth-1);
+}
+.app-frame-footer .theme-toggle:hover { background: var(--lib-field-hover); color: var(--lib-text); }
+.app-frame[data-rail] .app-frame-footer { flex-direction: column-reverse; align-items: stretch; }
+.app-frame[data-rail] .site-github { justify-content: center; padding: 0; }
+.app-frame[data-rail] .site-github-count { display: none; }
+
+/* Content card: full height, small gap above. */
+html .app-frame .app-frame-panel { grid-column: 2; grid-row: 1; margin-top: 8px; }
+
+@media (max-width: 1023px) {
+  html .app-frame.library-page-shell[data-sidebar] { grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--site-header-height) minmax(0, 1fr); }
+  html .app-frame .app-frame-sidebar { display: none; }
+  html .app-frame .app-frame-panel { grid-column: 1; grid-row: 2; margin-top: 0; }
+  .app-frame .site-header-inner .site-brand-mark { width: 22px; height: 22px; }
+}
+@media (prefers-reduced-motion: reduce) {
+  html .app-frame.library-page-shell[data-sidebar], html .app-frame .app-frame-sidebar { transition: none; }
+  .app-frame-slot > * { animation: none; }
+}
+
+/* ---- Cards: category chip beside the name, previews at their real 1.9:1 shape ---- */
+html .app-frame .lib-card .lib-card-media { aspect-ratio: 1200 / 630; }
+.lib-card-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
+.lib-card .lib-card-category {
+  height: 20px; gap: 5px; padding: 0 7px 0 5px; border-radius: 6px;
+  background: var(--lib-chip); color: var(--lib-text-2); font-size: 11px; font-weight: 600;
+}
+.lib-card .lib-card-category-icon { width: 12px; height: 12px; opacity: .8; }
+.lib-card-desc { margin-top: 6px; }
+.lib-card-meta { margin-top: 10px; padding-top: 0; }
+.lib-tag, .lib-row-logo, .facet-selected-count { background: var(--lib-chip); }
+.lib-tag-link:hover { background: var(--lib-field-hover); }
+/* The slot spans rows in rail mode; its content must not size those rows. */
+html .app-frame .app-frame-slot { contain: size; }
+html .app-frame[data-sidebar] .app-frame-sidebar { grid-template-rows: var(--sb-brand-h) auto auto minmax(0, 1fr) auto; }
+/* Phone top bar: keep it to brand, search, theme and menu. */
+@media (max-width: 760px) { .app-frame .site-header .site-github { display: none; } }
```

## app/layout.tsx

Status: modified; +11; −4

```diff
@@ -1,6 +1,7 @@
 import type { Metadata } from "next";
-import { Geist_Mono, Geist_Pixel, Inter, Pixelify_Sans } from "next/font/google";
+import { Geist_Mono, Geist_Pixel, Inter, Nunito, Pixelify_Sans } from "next/font/google";
 import { siteUrl, socialImage } from "@/lib/site";
+import { AppFrame } from "@/components/AppFrame";
 import { SiteNotice } from "@/components/SiteNotice";
 import "./globals.css";
 
@@ -9,6 +10,12 @@
   subsets: ["latin"],
 });
 
+// Web-safe stand-in for SF Pro Rounded, which Apple does not license for web embedding.
+const nunito = Nunito({
+  variable: "--font-nunito",
+  subsets: ["latin"],
+});
+
 const pixelifySans = Pixelify_Sans({
   variable: "--font-pixelify-sans",
   subsets: ["latin"],
@@ -53,14 +60,14 @@
   children: React.ReactNode;
 }>) {
   return (
-    <html lang="en" className="dark" suppressHydrationWarning>
+    <html lang="en" className={`dark ${inter.variable} ${nunito.variable} ${pixelifySans.variable} ${geistPixel.variable} ${geistMono.variable}`} suppressHydrationWarning>
       <head>
         <script dangerouslySetInnerHTML={{ __html: `try{const t=localStorage.getItem('col:theme');const l=t==='light'||(!t&&matchMedia('(prefers-color-scheme: light)').matches);document.documentElement.classList.toggle('light',l);document.documentElement.classList.toggle('dark',!l)}catch{}` }} />
       </head>
       <body
+        className="min-h-screen font-sans"
-        className={`${inter.variable} ${pixelifySans.variable} ${geistPixel.variable} ${geistMono.variable} min-h-screen font-sans`}
       >
+        <AppFrame>{children}</AppFrame>
-        {children}
         <SiteNotice />
       </body>
     </html>
```

## app/libraries/\[slug\]/page.tsx

Status: modified; +1; −5

```diff
@@ -1,6 +1,5 @@
 import type { Metadata } from "next";
 import { notFound } from "next/navigation";
-import { Header } from "@/components/Header";
 import { SiteFooter } from "@/components/SiteFooter";
 import { LibraryDetail } from "@/components/LibraryDetail";
 import { libraries } from "@/data/libraries";
@@ -47,10 +46,7 @@
 
   return (
     <>
-      <Header />
-      <main className="docs-page-shell w-full max-w-full min-h-screen overflow-x-hidden">
-        <LibraryDetail library={library} details={details} />
+      <LibraryDetail library={library} details={details} />
-      </main>
       <SiteFooter />
     </>
   );
```

## app/libraries/page.tsx

Status: modified; +1; −9

```diff
@@ -1,15 +1,7 @@
 import { DirectoryExplorer } from "@/components/DirectoryExplorer";
-import { Header } from "@/components/Header";
 
 export default async function LibrariesPage({ searchParams }: { searchParams: Promise<{ q?: string }> }) {
   const { q = "" } = await searchParams;
 
-  return (
-    <div className="library-page-shell">
-      <Header variant="library" />
-      <main className="library-page-main w-full max-w-full overflow-x-clip">
-        <DirectoryExplorer initialQuery={q} />
+  return <DirectoryExplorer initialQuery={q} />;
-      </main>
-    </div>
-  );
 }
```

## app/not-found.tsx

Status: modified; +2; −4

```diff
@@ -1,17 +1,15 @@
 import Link from "next/link";
-import { Header } from "@/components/Header";
 import { SiteFooter } from "@/components/SiteFooter";
 
 export default function NotFound() {
   return (
     <>
-      <Header />
-      <main className="docs-page-shell flex min-h-screen flex-col items-center justify-center px-5 text-center">
+      <div className="flex min-h-[70vh] flex-col items-center justify-center px-5 text-center">
         <p className="docs-accent text-sm font-semibold">404</p>
         <h1 className="theme-text mt-3 text-4xl font-semibold tracking-tight sm:text-5xl">Page not found</h1>
         <p className="theme-muted mt-4">The page you requested does not exist.</p>
         <Link href="/" className="hero-cta hero-cta-primary mt-8 min-h-11">Back to home</Link>
+      </div>
-      </main>
       <SiteFooter />
     </>
   );
```

## app/page.tsx

Status: modified; +5; −9

```diff
@@ -1,5 +1,4 @@
 import { LibraryExplorer } from "@/components/LibraryExplorer";
-import { Header } from "@/components/Header";
 import { RoadmapSection } from "@/components/RoadmapSection";
 import { SiteFooter } from "@/components/SiteFooter";
 import { WhatsInsideSection } from "@/components/WhatsInsideSection";
@@ -8,14 +7,11 @@
 
 export default function Home() {
   return (
-    <>
-      <Header />
-      <main className="w-full max-w-full overflow-x-hidden">
-        <LibraryExplorer />
-        <WhatsInsideSection />
-        <RoadmapSection />
+    <div className="w-full max-w-full overflow-x-hidden">
+      <LibraryExplorer />
+      <WhatsInsideSection />
+      <RoadmapSection />
-      </main>
       <SiteFooter />
+    </div>
-    </>
   );
 }
```

## app/sponsors/page.tsx

Status: modified; +2; −4

```diff
@@ -1,5 +1,4 @@
 import type { Metadata } from "next";
-import { Header } from "@/components/Header";
 import { SiteFooter } from "@/components/SiteFooter";
 import { SponsorsSection } from "@/components/SponsorsSection";
 
@@ -11,10 +10,9 @@
 export default function SponsorsPage() {
   return (
     <>
-      <Header />
-      <main className="contributors-page min-h-screen pt-(--site-header-height)">
+      <div className="contributors-page">
         <SponsorsSection />
+      </div>
-      </main>
       <SiteFooter />
     </>
   );
```

## components/AppFrame.tsx

Status: added; +76; −0

```diff
@@ -1,0 +1,76 @@
+"use client";
+
+import { useEffect, useRef, type ReactNode } from "react";
+import { usePathname } from "next/navigation";
+import { AppSidebar } from "./AppSidebar";
+import { Header } from "./Header";
+import { BrandLink, GitHubStars, SiteSearch, useGitHubStars } from "./SiteChrome";
+import { SIDEBAR_SLOT_ID } from "./SidebarSlot";
+import { ThemeToggle } from "./ThemeToggle";
+
+type SidebarMode = "narrow" | "wide" | "rail";
+
+function sidebarModeFor(pathname: string): SidebarMode {
+  if (pathname === "/docs" || pathname.startsWith("/docs/")) return "rail";
+  if (pathname === "/libraries") return "wide";
+  return "narrow";
+}
+
+/**
+ * The one layout every route shares: a sidebar (brand, search, navigation,
+ * page-specific content, repo links) and the content card. The sidebar is
+ * narrow by default, widens on the directory to fit its filters, and on docs
+ * collapses the navigation to an icon rail with the docs navigation beside it.
+ * Small screens get a compact top bar instead.
+ */
+export function AppFrame({ children }: { children: ReactNode }) {
+  const pathname = usePathname();
+  const mode = sidebarModeFor(pathname);
+  const rail = mode === "rail";
+  const stars = useGitHubStars();
+  const panelRef = useRef<HTMLElement>(null);
+
+  // The content card is the scroll container, so reset it on navigation the way
+  // the browser would reset the window.
+  useEffect(() => {
+    panelRef.current?.scrollTo({ top: 0 });
+  }, [pathname]);
+
+  useEffect(() => {
+    const handleShortcut = (event: KeyboardEvent) => {
+      if (event.defaultPrevented) return;
+      const target = event.target;
+      if (target instanceof HTMLElement && (target.isContentEditable || ["INPUT", "TEXTAREA", "SELECT"].includes(target.tagName))) return;
+      const slash = event.key === "/" && !event.altKey && !event.ctrlKey && !event.metaKey && !event.shiftKey;
+      const command = (event.ctrlKey || event.metaKey) && !event.altKey && !event.shiftKey && event.key.toLowerCase() === "k";
+      if (!slash && !command) return;
+      // The directory owns its search; elsewhere focus whichever site search is on screen.
+      const visibleSearch = [...document.querySelectorAll<HTMLInputElement>("[data-site-search]")].find((input) => input.offsetParent !== null);
+      const field = document.getElementById("library-search") ?? visibleSearch;
+      if (!field) return;
+      event.preventDefault();
+      field.focus();
+    };
+    window.addEventListener("keydown", handleShortcut);
+    return () => window.removeEventListener("keydown", handleShortcut);
+  }, []);
+
+  return (
+    <div className="app-frame library-page-shell" data-sidebar={mode} data-rail={rail ? "" : undefined}>
+      <Header />
+      <aside className="app-frame-sidebar" aria-label="Sidebar">
+        <div className="app-frame-brand"><BrandLink /></div>
+        <div className="app-frame-search"><SiteSearch collapsed={rail} /></div>
+        <div className="app-frame-nav"><AppSidebar collapsed={rail} /></div>
+        <div id={SIDEBAR_SLOT_ID} className="app-frame-slot" />
+        <div className="app-frame-footer">
+          <GitHubStars stars={stars} />
+          <ThemeToggle />
+        </div>
+      </aside>
+      <main ref={panelRef} className="app-frame-panel">
+        {children}
+      </main>
+    </div>
+  );
+}
```

## components/AppSidebar.tsx

Status: added; +37; −0

```diff
@@ -1,0 +1,37 @@
+"use client";
+
+import Link from "next/link";
+import { usePathname } from "next/navigation";
+import { Icons, type IconComponent } from "./MaskIcon";
+
+const items: readonly (readonly [string, string, IconComponent])[] = [
+  ["Home", "/", Icons.home],
+  ["Libraries", "/libraries", Icons.libraries],
+  ["Docs", "/docs", Icons.docs],
+  ["Contributors", "/contributors", Icons.contributors],
+  ["Sponsors", "/sponsors", Icons.sponsors],
+];
+
+export function AppSidebar({ collapsed = false }: { collapsed?: boolean }) {
+  const pathname = usePathname();
+  return (
+    <nav aria-label="Site" className="app-nav" data-collapsed={collapsed || undefined}>
+      {items.map(([label, href, Icon]) => {
+        const active = href === "/" ? pathname === "/" : pathname === href || pathname.startsWith(`${href}/`);
+        return (
+          <Link
+            key={href}
+            href={href}
+            aria-current={active ? "page" : undefined}
+            aria-label={collapsed ? label : undefined}
+            title={collapsed ? label : undefined}
+            className="app-nav-link"
+          >
+            <Icon className="nav-icon" />
+            <span className="app-nav-label cap">{label}</span>
+          </Link>
+        );
+      })}
+    </nav>
+  );
+}
```

## components/DirectoryExplorer.tsx

Status: modified; +92; −45

```diff
@@ -1,7 +1,8 @@
 "use client";
 
+import { useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
+import { Heart, Search, SearchX } from "lucide-react";
+import { Icons } from "./MaskIcon";
-import { useEffect, useMemo, useState } from "react";
-import { Heart, LayoutGrid, List, Search, SearchX } from "lucide-react";
 import {
   libraries,
   type Category,
@@ -12,8 +13,7 @@
 import { createDirectorySearch, toggleStackSelection } from "@/lib/directory";
 import { Button } from "@/components/ui/button";
 import { SidebarProvider } from "@/components/ui/sidebar";
-import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group";
-import { FilterBar, FilterDropdown } from "./FilterBar";
+import { FilterBar } from "./FilterBar";
 import { LibraryCard } from "./LibraryCard";
 
 const SAVED_LIBRARIES_KEY = "col:saved-libraries";
@@ -57,6 +57,56 @@
     ? results.filter(({ library }) => saved.has(library.slug))
     : results;
 
+  // FLIP: cards that stay glide from their old slot to the new one; new cards rise in.
+  const galleryRef = useRef<HTMLDivElement>(null);
+  const cardPositionsRef = useRef(new Map<string, { x: number; y: number }>());
+  const hasLaidOutRef = useRef(false);
+  const resultKey = visibleResults.map(({ library }) => library.slug).join(",");
+
+  useLayoutEffect(() => {
+    const gallery = galleryRef.current;
+    const previous = cardPositionsRef.current;
+    const next = new Map<string, { x: number; y: number }>();
+    cardPositionsRef.current = next;
+    if (!gallery) return;
+
+    const animate = hasLaidOutRef.current && !window.matchMedia("(prefers-reduced-motion: reduce)").matches;
+    hasLaidOutRef.current = true;
+    const origin = gallery.getBoundingClientRect();
+    let entering = 0;
+
+    for (const element of Array.from(gallery.children) as HTMLElement[]) {
+      const slug = element.dataset.slug;
+      if (!slug) continue;
+      const rect = element.getBoundingClientRect();
+      const position = { x: rect.left - origin.left, y: rect.top - origin.top };
+      next.set(slug, position);
+      if (!animate) continue;
+
+      element.getAnimations().forEach((animation) => animation.cancel());
+      const before = previous.get(slug);
+      if (before) {
+        // Whole pixels only, so text lands on the same pixel grid it started on.
+        const dx = Math.round(before.x - position.x);
+        const dy = Math.round(before.y - position.y);
+        if (dx || dy) {
+          element.animate(
+            [{ transform: `translate(${dx}px, ${dy}px)` }, { transform: "translate(0, 0)" }],
+            { duration: 560, easing: "cubic-bezier(.32, .72, 0, 1)" },
+          );
+        }
+      } else if (rect.top < window.innerHeight + 200) {
+        element.animate(
+          [
+            { opacity: 0, transform: "translateY(12px)" },
+            { opacity: 1, transform: "none" },
+          ],
+          { duration: 520, delay: Math.min(entering++, 12) * 35, easing: "cubic-bezier(.32, .72, 0, 1)", fill: "backwards" },
+        );
+      }
+    }
+  }, [resultKey, layout]);
+
   const toggleSaved = (slug: string) => {
     setSaved((current) => {
       const next = new Set(current);
@@ -104,55 +154,52 @@
         />
 
         <div className={`directory-results-pane min-w-0 flex-1 px-5 py-4 sm:px-8 lg:px-8 lg:py-6 ${visibleResults.length ? "pb-40" : ""}`}>
+          <div className="dir-toolbar">
+            <div className="dir-toolbar-title">
+              <h1>{query || category || stacks.length || useCases.length ? "Results" : "All libraries"}</h1>
+              <p role="status" className="dir-count">
+                {visibleResults.length}
+                {visibleResults.length !== libraries.length && <span> / {libraries.length}</span>}
+                <span className="sr-only"> libraries shown</span>
+              </p>
+            </div>
+            <div className="dir-toolbar-controls">
+              <label className="dir-search">
-          <div className="directory-toolbar theme-border space-y-3 border-b pb-4">
-            <label className="directory-search-label relative block w-full max-w-xl">
-              <Search className="pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2" aria-hidden />
-              <input
-                id="library-search"
-                data-library-search="true"
-                value={query}
-                onChange={(event) => setQuery(event.target.value)}
-                placeholder="Libraries or components..."
-                aria-label="Search libraries or components"
-                className="directory-search theme-control h-11 w-full rounded-md border bg-transparent pr-4 pl-10 text-sm outline-none placeholder:text-current/50 focus-visible:ring-2"
-              />
-              <kbd className="search-key-hint pointer-events-none absolute top-1/2 right-2 -translate-y-1/2 rounded border px-2 py-1 text-[10px]">/</kbd>
-            </label>
-            <div className="directory-toolbar-row flex flex-wrap items-center justify-between gap-3">
-              <h1 className="theme-text text-xl font-semibold tracking-tight">{query || category || stacks.length || useCases.length ? "Results" : "All libraries"}</h1>
-              <div className="flex flex-wrap items-center gap-2">
+                <Search aria-hidden />
+                <input
+                  id="library-search"
+                  data-library-search="true"
+                  value={query}
-                <p role="status" className="theme-muted whitespace-nowrap text-sm tabular-nums">{visibleResults.length} of {libraries.length}</p>
+                  onChange={(event) => setQuery(event.target.value)}
+                  placeholder="Search libraries or components"
+                  aria-label="Search libraries or components"
-                <FilterDropdown
-                  label={sort === "curated" ? "Curated order" : "Name A–Z"}
-                  value={sort}
-                  items={[{ label: "Curated order", value: "curated" }, { label: "Name A–Z", value: "name" }]}
-                  onValueChange={(value) => setSort(value as "curated" | "name")}
-                  className="w-40"
                 />
-                {visibleResults.length > 0 && (
-                  <ToggleGroup
+                <kbd aria-hidden>/</kbd>
+              </label>
+              <div role="radiogroup" aria-label="Sort libraries" className="dir-segment dir-segment-text" data-value={sort === "curated" ? "0" : "1"}>
-                    type="single"
+                <span className="dir-segment-pill" aria-hidden />
-                    value={layout}
-                    onValueChange={(value) => { if (value === "grid" || value === "line") setLayout(value); }}
-                    aria-label="Library layout"
-                    className="theme-control h-11 gap-1 rounded-md border p-1"
-                  >
-                    <ToggleGroupItem value="grid" aria-label="Grid view" className="h-9 min-h-0 flex-none gap-2 px-3 text-sm text-muted-foreground data-[state=on]:bg-secondary data-[state=on]:text-foreground"><LayoutGrid className="size-4" aria-hidden /> Grid</ToggleGroupItem>
-                    <ToggleGroupItem value="line" aria-label="Line view" className="h-9 min-h-0 flex-none gap-2 px-3 text-sm text-muted-foreground data-[state=on]:bg-secondary data-[state=on]:text-foreground"><List className="size-4" aria-hidden /> Line</ToggleGroupItem>
-                  </ToggleGroup>
-                )}
-                <Button type="button" variant="outline" onClick={() => setShowSaved((current) => !current)} aria-pressed={showSaved} className="theme-control min-h-11 hover:opacity-80">
-                  <Heart fill={showSaved ? "currentColor" : "none"} aria-hidden /> Saved {saved.size}
-                </Button>
+                <button type="button" role="radio" aria-checked={sort === "curated"} onClick={() => setSort("curated")}><span className="cap">Curated</span></button>
+                <button type="button" role="radio" aria-checked={sort === "name"} onClick={() => setSort("name")}><span className="cap">A–Z</span></button>
               </div>
+              <div role="radiogroup" aria-label="Library layout" className="dir-segment dir-segment-icon" data-value={layout === "grid" ? "0" : "1"}>
+                <span className="dir-segment-pill" aria-hidden />
+                <button type="button" role="radio" aria-checked={layout === "grid"} aria-label="Grid view" title="Grid" onClick={() => setLayout("grid")}><Icons.allLibraries className="dir-view-icon" /></button>
+                <button type="button" role="radio" aria-checked={layout === "line"} aria-label="List view" title="List" onClick={() => setLayout("line")}><Icons.list className="dir-view-icon" /></button>
+              </div>
+              <button type="button" className="dir-control dir-saved" onClick={() => setShowSaved((current) => !current)} aria-pressed={showSaved} aria-label={`Saved libraries, ${saved.size}`}>
+                <Heart fill={showSaved ? "currentColor" : "none"} aria-hidden />
+                <span className="cap">{saved.size}</span>
+              </button>
             </div>
           </div>
           {query.trim() && <p className="theme-muted mt-3 text-xs leading-5">Component coverage is partial. Links below are verified matches, not a complete inventory.</p>}
 
           {visibleResults.length ? (
-            <div className={`directory-gallery mt-5 grid grid-cols-1 ${layout === "grid" ? "gap-4 sm:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4" : "gap-3"}`}>
+            <div ref={galleryRef} className={`directory-gallery mt-5 grid grid-cols-1 ${layout === "grid" ? "gap-4 sm:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4" : "gap-3"}`}>
               {visibleResults.map(({ library, components }) => (
-                <LibraryCard key={library.slug} layout={layout} library={library} matches={components} saved={saved.has(library.slug)} onToggleSaved={() => toggleSaved(library.slug)} />
+                <div key={library.slug} data-slug={library.slug} className="directory-gallery-item">
+                  <LibraryCard layout={layout} library={library} matches={components} saved={saved.has(library.slug)} onToggleSaved={() => toggleSaved(library.slug)} />
+                </div>
               ))}
             </div>
           ) : (
```

## components/DocsSidebar.tsx

Status: modified; +14; −14

```diff
@@ -3,20 +3,20 @@
 import { useCallback, useEffect, useRef, useState } from "react";
 import { usePathname } from "next/navigation";
 import Link from "next/link";
-import { ArrowLeft, ArrowRight, ChevronDown } from "lucide-react";
+import { ArrowLeft, ArrowRight, BookOpen, ChevronDown, FilePlus, GitPullRequest, Search, Bug, type LucideIcon } from "lucide-react";
 import { Button } from "@/components/ui/button";
 import styles from "./DocsSidebar.module.css";
 
-const getStarted = [
+const getStarted: readonly (readonly [string, string, LucideIcon])[] = [
-  ["/docs", "Overview"],
-  ["/docs/find-a-library", "Find a library"],
-] as const;
+  ["/docs", "Overview", BookOpen],
+  ["/docs/find-a-library", "Find a library", Search],
+];
 
-const contribute = [
-  ["/docs/request-a-library", "Request a library"],
-  ["/docs/report-issues", "Report issues"],
-  ["/docs/pull-requests", "Open a pull request"],
+const contribute: readonly (readonly [string, string, LucideIcon])[] = [
+  ["/docs/request-a-library", "Request a library", FilePlus],
+  ["/docs/report-issues", "Report issues", Bug],
+  ["/docs/pull-requests", "Open a pull request", GitPullRequest],
-] as const;
+];
 
 const pages = [...getStarted, ...contribute];
 
@@ -101,15 +101,15 @@
       >
         <span ref={highlightRef} className="docs-sidebar-link-highlight" aria-hidden="true" />
         <div className={styles.section}>
-          <p className="docs-sidebar-heading mb-2 px-3 text-xs font-semibold"><span className={styles.sectionIndex}>01</span> Get started</p>
+          <p className="docs-sidebar-heading mb-1.5 px-2.5 text-xs font-semibold">Get started</p>
           <ul className="space-y-0.5 text-sm">
-            {getStarted.map(([href, label]) => <li key={href}><Link href={href} aria-current={pathname === href ? "page" : undefined} className="docs-sidebar-link relative z-10 block rounded-md px-3 py-2" onMouseEnter={(event) => positionHighlight(event.currentTarget)} onFocus={(event) => positionHighlight(event.currentTarget)} onClick={(event) => { pendingLinkRef.current = event.currentTarget; positionHighlight(event.currentTarget); }}>{label}</Link></li>)}
+            {getStarted.map(([href, label, Icon]) => <li key={href}><Link href={href} aria-current={pathname === href ? "page" : undefined} className="docs-sidebar-link relative z-10 flex items-center gap-2.5 rounded-[10px] px-2.5 py-2" onMouseEnter={(event) => positionHighlight(event.currentTarget)} onFocus={(event) => positionHighlight(event.currentTarget)} onClick={(event) => { pendingLinkRef.current = event.currentTarget; positionHighlight(event.currentTarget); }}><Icon className="size-4 shrink-0" aria-hidden />{label}</Link></li>)}
           </ul>
         </div>
         <div className={styles.section}>
+          <p className="docs-sidebar-heading mb-1.5 px-2.5 text-xs font-semibold">Contribute</p>
-          <p className="docs-sidebar-heading mb-2 px-3 text-xs font-semibold"><span className={styles.sectionIndex}>02</span> Contribute</p>
           <ul className="space-y-0.5 text-sm">
+            {contribute.map(([href, label, Icon]) => <li key={href}><Link href={href} aria-current={pathname === href ? "page" : undefined} className="docs-sidebar-link relative z-10 flex items-center gap-2.5 rounded-[10px] px-2.5 py-2" onMouseEnter={(event) => positionHighlight(event.currentTarget)} onFocus={(event) => positionHighlight(event.currentTarget)} onClick={(event) => { pendingLinkRef.current = event.currentTarget; positionHighlight(event.currentTarget); }}><Icon className="size-4 shrink-0" aria-hidden />{label}</Link></li>)}
-            {contribute.map(([href, label]) => <li key={href}><Link href={href} aria-current={pathname === href ? "page" : undefined} className="docs-sidebar-link relative z-10 block rounded-md px-3 py-2" onMouseEnter={(event) => positionHighlight(event.currentTarget)} onFocus={(event) => positionHighlight(event.currentTarget)} onClick={(event) => { pendingLinkRef.current = event.currentTarget; positionHighlight(event.currentTarget); }}>{label}</Link></li>)}
           </ul>
         </div>
       </div>
```

## components/FilterBar.tsx

Status: modified; +107; −68

```diff
@@ -1,11 +1,12 @@
 "use client";
 
-import { useRef, useState, type ReactNode } from "react";
+import { useCallback, useEffect, useLayoutEffect, useRef, useState, type FocusEvent, type MouseEvent, type ReactNode } from "react";
-import { ChevronDown, RotateCcw, SlidersHorizontal } from "lucide-react";
+import { Check, ChevronDown, RotateCcw, SlidersHorizontal } from "lucide-react";
+import { categoryIcons, Icons, type IconComponent } from "./MaskIcon";
 import { CATEGORIES, STACKS, USE_CASES, type Category, type Stack, type UseCase } from "@/data/libraries";
 import type { DirectoryFacetCounts } from "@/lib/directory";
+import { SidebarSlot } from "./SidebarSlot";
 import { Button } from "@/components/ui/button";
-import { Checkbox } from "@/components/ui/checkbox";
 import {
   DropdownMenu,
   DropdownMenuContent,
@@ -14,9 +15,7 @@
   DropdownMenuTrigger,
 } from "@/components/ui/dropdown-menu";
 import { Sheet, SheetContent, SheetTitle } from "@/components/ui/sheet";
-import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group";
 import {
-  Sidebar,
   SidebarContent,
   SidebarFooter,
   SidebarGroup,
@@ -53,6 +52,8 @@
     </DropdownMenu>
   );
 }
+
+const CATEGORY_ICONS = categoryIcons;
 
 interface FacetGroupProps<T extends string> {
   label: string;
@@ -67,73 +68,108 @@
   expanded: boolean;
   onExpandedChange: () => void;
   selectionMode: "single" | "multiple";
+  icons?: Partial<Record<T, IconComponent>>;
 }
 
+/** Moves an absolutely positioned pill onto `target`, relative to `container`. */
+function placePill(pill: HTMLElement | null, target: HTMLElement | null) {
+  if (!pill) return;
+  if (!target) {
+    pill.style.opacity = "0";
+    return;
+  }
+  pill.style.transform = `translateY(${target.offsetTop}px)`;
-function FacetGroup<T extends string>({ label, allLabel, total, id, options, selected, counts, onSelect, onClear, expanded, onExpandedChange, selectionMode }: FacetGroupProps<T>) {
-  const allValue = "__all__";
+  pill.style.height = `${target.offsetHeight}px`;
+  pill.style.opacity = "1";
+}
 
+function FacetGroup<T extends string>({ label, allLabel, total, id, options, selected, counts, onSelect, onClear, expanded, onExpandedChange, selectionMode, icons }: FacetGroupProps<T>) {
+  const listRef = useRef<HTMLDivElement>(null);
+  const activePillRef = useRef<HTMLSpanElement>(null);
+  const hoverPillRef = useRef<HTMLSpanElement>(null);
+  const single = selectionMode === "single";
+  const selectedKey = selected.join("|");
-  return (
-    <SidebarGroup className="directory-facet-group">
+
+  const syncActivePill = useCallback(() => {
+    if (!single) return;
+    placePill(activePillRef.current, listRef.current?.querySelector<HTMLElement>('[aria-pressed="true"]') ?? null);
+  }, [single]);
+
+  useLayoutEffect(() => {
+    syncActivePill();
+    const frame = requestAnimationFrame(() => {
+      if (activePillRef.current) activePillRef.current.dataset.ready = "true";
+    });
+    return () => cancelAnimationFrame(frame);
+  }, [selectedKey, expanded, syncActivePill]);
+
+  useEffect(() => {
+    const list = listRef.current;
+    if (!list || typeof ResizeObserver === "undefined") return;
+    const observer = new ResizeObserver(syncActivePill);
+    observer.observe(list);
+    return () => observer.disconnect();
+  }, [syncActivePill]);
+
+  const hoverHandlers = {
+    onMouseEnter: (event: MouseEvent<HTMLButtonElement>) => placePill(hoverPillRef.current, event.currentTarget),
+    onFocus: (event: FocusEvent<HTMLButtonElement>) => placePill(hoverPillRef.current, event.currentTarget),
+  };
+
+  const renderOption = (value: T | null, optionLabel: string, count: number) => {
+    const isActive = value === null ? selected.length === 0 : selected.includes(value);
+    const disabled = value !== null && count === 0 && !isActive;
+    const Icon: IconComponent | undefined = value === null ? Icons.allLibraries : icons?.[value];
+    return (
       <button
+        key={value ?? "__all__"}
         type="button"
+        role={single ? undefined : "checkbox"}
+        aria-pressed={single ? isActive : undefined}
+        aria-checked={single ? undefined : isActive}
+        disabled={disabled}
+        data-active={isActive}
+        className="facet-option"
-        className="directory-facet-heading"
+        onClick={() => (value === null ? onClear() : onSelect(value))}
-        aria-expanded={expanded}
-        aria-controls={id}
-        onClick={onExpandedChange}
+        {...hoverHandlers}
       >
+        {single ? (
+          Icon && <Icon className="facet-option-icon" />
+        ) : (
+          <span className="facet-check" aria-hidden><Check /></span>
+        )}
+        <span className="facet-option-label cap">{optionLabel}</span>
+        <span className="facet-option-count cap">{count}</span>
+      </button>
+    );
+  };
-        <span className="flex min-w-0 items-center gap-2">
+
-          <ChevronDown className="directory-facet-heading-icon" aria-hidden />
+  return (
+    <SidebarGroup className="facet-group">
+      <button type="button" className="facet-heading-row" aria-expanded={expanded} aria-controls={id} onClick={onExpandedChange}>
-          <span className="truncate">{label}</span>
-        </span>
-        <span className="directory-facet-summary" aria-live="polite">
-          {selected.length > 0 ? `${selected.length} selected` : "All"}
-        </span>
+        <span className="facet-heading cap">{label}</span>
+        {!single && selected.length > 0 && <span className="facet-selected-count" aria-label={`${selected.length} selected`}><span className="cap">{selected.length}</span></span>}
+        <ChevronDown className="facet-heading-icon" aria-hidden />
       </button>
-      <SidebarGroupContent id={id} className="directory-facet-collapse" data-expanded={expanded} aria-hidden={!expanded} inert={!expanded}>
-        <div className="directory-facet-collapse-inner">
-        {selectionMode === "single" ? (
-          <ToggleGroup
-            type="single"
-            value={selected[0] ?? allValue}
-            onValueChange={(value) => value === allValue || value === "" ? onClear() : onSelect(value as T)}
-            className="directory-facet-options directory-facet-options-single"
+      <SidebarGroupContent id={id} className="facet-collapse" data-expanded={expanded} aria-hidden={!expanded} inert={!expanded}>
+        <div className="facet-collapse-inner">
+          <div
+            ref={listRef}
+            className="facet-options"
+            role="group"
             aria-label={`${label} options`}
+            onMouseLeave={() => { if (hoverPillRef.current) hoverPillRef.current.style.opacity = "0"; }}
+            onBlur={(event) => {
+              if (!(event.relatedTarget instanceof Node) || !event.currentTarget.contains(event.relatedTarget)) {
+                if (hoverPillRef.current) hoverPillRef.current.style.opacity = "0";
+              }
+            }}
           >
+            <span ref={hoverPillRef} className="facet-hover-pill" aria-hidden />
-            <ToggleGroupItem value={allValue} className="directory-facet-option">
+            {single && <span ref={activePillRef} className="facet-active-pill" aria-hidden />}
+            {single && renderOption(null, allLabel, total)}
+            {options.map((option) => renderOption(option, option, counts.get(option) ?? 0))}
-              <span className="directory-facet-option-label">{allLabel}</span>
-              <span className="directory-facet-count">{total}</span>
-            </ToggleGroupItem>
-            {options.map((option) => {
-              const count = counts.get(option) ?? 0;
-              return (
-                <ToggleGroupItem key={option} value={option} disabled={count === 0 && selected[0] !== option} className={`directory-facet-option${count === 0 && selected[0] !== option ? " directory-facet-option-disabled" : ""}`}>
-                  <span className="directory-facet-option-label">{option}</span>
-                  <span className="directory-facet-count">{count}</span>
-                </ToggleGroupItem>
-              );
-            })}
-          </ToggleGroup>
-        ) : (
-          <div className="directory-facet-options" aria-label={`${label} options`}>
-            <label htmlFor={`${id}-all`} className="directory-facet-option">
-              <Checkbox id={`${id}-all`} checked={selected.length === 0} onCheckedChange={onClear} />
-              <span className="directory-facet-option-label">{allLabel}</span>
-              <span className="directory-facet-count">{total}</span>
-            </label>
-            {options.map((option) => {
-              const isActive = selected.includes(option);
-              const count = counts.get(option) ?? 0;
-              const optionId = `${id}-${option.toLowerCase().replaceAll(" ", "-")}`;
-              return (
-                <label key={option} htmlFor={optionId} className={`directory-facet-option${count === 0 && !isActive ? " directory-facet-option-disabled" : ""}`}>
-                  <Checkbox id={optionId} checked={isActive} disabled={count === 0 && !isActive} onCheckedChange={() => onSelect(option)} />
-                  <span className="directory-facet-option-label">{option}</span>
-                  <span className="directory-facet-count">{count}</span>
-                </label>
-              );
-            })}
           </div>
-        )}
         </div>
       </SidebarGroupContent>
     </SidebarGroup>
@@ -183,6 +219,7 @@
           onSelect={(value) => onCategoryChange(activeCategory === value ? null : value)}
           onClear={() => onCategoryChange(null)}
           selectionMode="single"
+          icons={CATEGORY_ICONS}
           expanded={expandedGroups.category}
           onExpandedChange={() => setExpandedGroups((current) => ({ ...current, category: !current.category }))}
         />
@@ -217,9 +254,9 @@
       </SidebarContent>
 
       {hasFilters && (footer ?? <SidebarFooter>
+        <button type="button" onClick={onClearAll} className="facet-reset">
+          <RotateCcw aria-hidden /> <span className="cap">Reset all filters</span>
-        <Button type="button" variant="outline" onClick={onClearAll} className="min-h-11 w-full">
+        </button>
-          <RotateCcw aria-hidden /> Clear filters
-        </Button>
       </SidebarFooter>)}
     </>
   );
@@ -276,9 +313,11 @@
         <SlidersHorizontal aria-hidden /> Filters{hasFilters ? " · Active" : ""}
       </Button>
 
-      <Sidebar collapsible="none" className="directory-sidebar directory-filter-panel hidden lg:flex" aria-label="Library filters">
-        <FilterPanel {...panelProps} idSuffix="" />
-      </Sidebar>
+      <SidebarSlot mobile="hidden">
+        <div className="directory-sidebar directory-filter-panel" role="region" aria-label="Library filters">
+          <FilterPanel {...panelProps} idSuffix="" />
+        </div>
+      </SidebarSlot>
 
       <Sheet open={openMobile} onOpenChange={handleMobileOpenChange}>
         <SheetContent side="left" className="w-[16rem] gap-0 bg-sidebar p-0 lg:hidden">
```

## components/Header.tsx

Status: modified; +16; −215

```diff
@@ -1,245 +1,43 @@
 "use client";
 
-import { useCallback, useEffect, useRef, useState, type CSSProperties } from "react";
-import Image from "next/image";
-import Link from "next/link";
+import { useEffect, useState } from "react";
 import { usePathname } from "next/navigation";
-import { Menu, Search, X } from "lucide-react";
+import { Menu, X } from "lucide-react";
 import { Button } from "@/components/ui/button";
-import { libraries } from "@/data/libraries";
+import { BrandLink, GitHubStars, SiteSearch, useGitHubStars } from "./SiteChrome";
-import { componentIndex } from "@/data/components";
-import { createDirectorySearch } from "@/lib/directory";
-import { libraryPath } from "@/lib/site";
 import { ThemeToggle } from "./ThemeToggle";
 
-const compactNumber = new Intl.NumberFormat("en", { notation: "compact", maximumFractionDigits: 1 });
-const searchDirectory = createDirectorySearch(libraries, componentIndex);
 const links = [
+  ["Home", "/"],
   ["Libraries", "/libraries"],
   ["Docs", "/docs"],
   ["Contributors", "/contributors"],
   ["Sponsors", "/sponsors"],
 ] as const;
 
+/** Compact top bar for small screens. On desktop the sidebar carries all of this. */
-// Adapted from reactbits.dev/animations/gradual-blur, fitted to the header.
-const headerBlurLayers = Array.from({ length: 5 }, (_, index): CSSProperties => {
-  const start = index * 20;
-  const stops = [`transparent ${start}%`, `black ${start + 20}%`];
-  if (start + 40 <= 100) stops.push(`black ${start + 40}%`);
-  if (start + 60 <= 100) stops.push(`transparent ${start + 60}%`);
-  const mask = `linear-gradient(to top, ${stops.join(", ")})`;
-  const blur = `blur(${0.25 + index * 0.125}rem)`;
-  return { maskImage: mask, WebkitMaskImage: mask, backdropFilter: blur, WebkitBackdropFilter: blur };
-});
+export function Header() {
-
-export function Header({ variant = "default" }: { variant?: "default" | "library" }) {
   const pathname = usePathname();
   const [menuOpen, setMenuOpen] = useState(false);
-  const [stars, setStars] = useState<number | null>(null);
-  const [searchQuery, setSearchQuery] = useState("");
-  const [searchOpen, setSearchOpen] = useState(false);
-  const [scrolled, setScrolled] = useState(false);
-  const linksRef = useRef<HTMLElement>(null);
-  const highlightRef = useRef<HTMLSpanElement>(null);
-  const pendingLinkRef = useRef<HTMLAnchorElement>(null);
-  const searchRef = useRef<HTMLInputElement>(null);
+  const stars = useGitHubStars();
-  // Only the home page header reacts to scrolling; other routes keep a solid header.
-  const isHome = pathname === "/";
 
   useEffect(() => {
     setMenuOpen(false);
-    setSearchOpen(false);
-    setSearchQuery("");
   }, [pathname]);
 
-  useEffect(() => {
-    if (!isHome) {
-      setScrolled(false);
-      return;
-    }
-    const syncScrollState = () => setScrolled(window.scrollY > 8);
-    syncScrollState();
-    window.addEventListener("scroll", syncScrollState, { passive: true });
-    return () => window.removeEventListener("scroll", syncScrollState);
-  }, [isHome]);
-
-  useEffect(() => {
-    const handleShortcut = (event: KeyboardEvent) => {
-      if (event.defaultPrevented) return;
-      const target = event.target;
-      const isEditableTarget = target instanceof HTMLElement && (target.isContentEditable || ["INPUT", "TEXTAREA", "SELECT"].includes(target.tagName));
-      if (isEditableTarget) return;
-      const slashShortcut = event.key === "/" && !event.altKey && !event.ctrlKey && !event.metaKey && !event.shiftKey;
-      const commandShortcut = (event.ctrlKey || event.metaKey) && !event.altKey && !event.shiftKey && event.key.toLowerCase() === "k";
-      if (!slashShortcut && !commandShortcut) return;
-
-      event.preventDefault();
-      searchRef.current?.focus();
-    };
-    window.addEventListener("keydown", handleShortcut);
-    return () => window.removeEventListener("keydown", handleShortcut);
-  }, []);
-
-  useEffect(() => {
-    const controller = new AbortController();
-    fetch("https://api.github.com/repos/screen-gd/Col", { signal: controller.signal })
-      .then((response) => (response.ok ? response.json() : Promise.reject()))
-      .then((repository: { stargazers_count?: number }) => {
-        if (typeof repository.stargazers_count === "number") setStars(repository.stargazers_count);
-      })
-      .catch(() => {});
-    return () => controller.abort();
-  }, []);
-
-  const positionHighlight = useCallback((link: HTMLAnchorElement | null) => {
-    const container = linksRef.current;
-    const highlight = highlightRef.current;
-    if (!container || !highlight || !link) return;
-
-    const linkRect = link.getBoundingClientRect();
-    const containerRect = container.getBoundingClientRect();
-    highlight.style.width = `${linkRect.width}px`;
-    highlight.style.height = `${linkRect.height}px`;
-    highlight.style.transform = `translateX(${linkRect.left - containerRect.left}px)`;
-    highlight.style.opacity = "1";
-  }, []);
+  const headerClass = `site-header site-header-solid site-header-app${pathname === "/libraries" ? " site-header-directory" : ""}`;
 
-  const getActiveLink = useCallback(
-    () => linksRef.current?.querySelector<HTMLAnchorElement>('[aria-current="page"]') ?? null,
-    [],
-  );
-
-  const restoreActiveHighlight = useCallback(() => {
-    if (pendingLinkRef.current && linksRef.current?.contains(pendingLinkRef.current)) {
-      positionHighlight(pendingLinkRef.current);
-      return;
-    }
-    const activeLink = getActiveLink();
-    if (activeLink) positionHighlight(activeLink);
-    else if (highlightRef.current) highlightRef.current.style.opacity = "0";
-  }, [getActiveLink, positionHighlight]);
-
-  useEffect(() => {
-    pendingLinkRef.current = null;
-    let readyFrame = 0;
-    const frame = requestAnimationFrame(() => {
-      restoreActiveHighlight();
-      readyFrame = requestAnimationFrame(() => {
-        if (highlightRef.current) highlightRef.current.dataset.ready = "true";
-      });
-    });
-    window.addEventListener("resize", restoreActiveHighlight);
-    return () => {
-      cancelAnimationFrame(frame);
-      cancelAnimationFrame(readyFrame);
-      window.removeEventListener("resize", restoreActiveHighlight);
-    };
-  }, [pathname, restoreActiveHighlight]);
-
-  const headerClass = `site-header${variant === "library" ? " site-header-library" : ""}${isHome ? "" : " site-header-solid"}`;
-  const searchResults = searchQuery.trim()
-    ? searchDirectory({ query: searchQuery, category: null, stacks: [], useCases: [], sort: "curated" }).slice(0, 5)
-    : [];
-
   return (
+    <header className={headerClass}>
-    <header className={`${headerClass}${scrolled ? " site-header-scrolled" : ""}`} data-scrolled={scrolled}>
-      <div className="site-header-blur" aria-hidden="true">
-        {headerBlurLayers.map((style, index) => <span key={index} style={style} />)}
-      </div>
       <div className="site-header-inner">
         <div className="site-header-left">
-          <a href="/" aria-label="Col, Collection of Libraries" className="site-header-brand">
-            <Image src="/brand/col-mark.png" alt="" width={24} height={24} className="brand-mark" priority />
-            <span>Col</span>
-          </a>
-          <span className="site-header-divider" aria-hidden="true">/</span>
-          <nav
-            ref={linksRef}
-            aria-label="Primary"
-            className="site-header-links"
-            onMouseLeave={restoreActiveHighlight}
-            onBlur={(event) => {
-              if (!(event.relatedTarget instanceof Node) || !event.currentTarget.contains(event.relatedTarget)) {
-                restoreActiveHighlight();
-              }
-            }}
-          >
-            <span ref={highlightRef} className="site-header-link-highlight" aria-hidden="true" />
+          <BrandLink />
-            {links.map(([label, href]) => {
-              const active = !href.includes("#") && (pathname === href || pathname.startsWith(`${href}/`));
-              return (
-                <Link
-                  key={href}
-                  href={href}
-                  aria-current={active ? "page" : undefined}
-                  className="site-header-link"
-                  onMouseEnter={(event) => positionHighlight(event.currentTarget)}
-                  onFocus={(event) => positionHighlight(event.currentTarget)}
-                  onClick={(event) => {
-                    if (!href.includes("#")) pendingLinkRef.current = event.currentTarget;
-                    positionHighlight(event.currentTarget);
-                  }}
-                >
-                  {label}
-                </Link>
-              );
-            })}
-          </nav>
         </div>
 
         <div className="site-header-actions">
+          <SiteSearch className="site-header-search" />
-          <form
-            role="search"
-            className="site-header-search"
-            onSubmit={(event) => {
-              event.preventDefault();
-              const query = searchQuery.trim();
-              if (query) window.location.assign(`/libraries?q=${encodeURIComponent(query)}`);
-            }}
-            onBlur={(event) => {
-              if (!(event.relatedTarget instanceof Node) || !event.currentTarget.contains(event.relatedTarget)) setSearchOpen(false);
-            }}
-          >
-            <Search size={14} aria-hidden="true" />
-            <input
-              ref={searchRef}
-              type="search"
-              value={searchQuery}
-              onChange={(event) => setSearchQuery(event.target.value)}
-              onFocus={() => setSearchOpen(true)}
-              onKeyDown={(event) => {
-                if (event.key === "Escape") {
-                  setSearchOpen(false);
-                  event.currentTarget.blur();
-                }
-              }}
-              placeholder="Search libraries"
-              aria-label="Search libraries or components"
-            />
-            <kbd>/</kbd>
-            {searchOpen && searchQuery.trim() && (
-              <div className="site-header-search-results" aria-label="Library search results">
-                {searchResults.length ? (
-                  <ul>
-                    {searchResults.map(({ library, components }) => (
-                      <li key={library.slug}>
-                        <Link href={libraryPath(library.slug)} onClick={() => setSearchOpen(false)}>
-                          <span>{library.name}</span>
-                          <small>{components[0]?.name ?? library.category}</small>
-                        </Link>
-                      </li>
-                    ))}
-                  </ul>
-                ) : <p>No matching libraries</p>}
-                <button type="submit">View all results</button>
-              </div>
-            )}
-          </form>
           <ThemeToggle />
-          <a href="https://github.com/screen-gd/Col" target="_blank" rel="noopener noreferrer" className="site-header-github" aria-label={`Col on GitHub${stars === null ? "" : `, ${stars} stars`}`}>
-            <svg viewBox="0 0 16 16" width="15" height="15" aria-hidden="true"><path fill="currentColor" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82a7.65 7.65 0 0 1 2-.27c.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z" /></svg>
-            <span>{stars === null ? "..." : compactNumber.format(stars)}</span>
-          </a>
+          <GitHubStars stars={stars} className="site-header-github" />
           <Button
             type="button"
             variant="ghost"
@@ -255,7 +53,10 @@
 
         {menuOpen && (
           <nav id="site-header-mobile-menu" aria-label="Mobile primary" className="site-header-mobile-menu">
+            {links.map(([label, href]) => {
+              const active = href === "/" ? pathname === "/" : pathname === href || pathname.startsWith(`${href}/`);
+              return <a key={href} href={href} onClick={() => setMenuOpen(false)} aria-current={active ? "page" : undefined}>{label}</a>;
+            })}
-            {links.map(([label, href]) => <a key={href} href={href} onClick={() => setMenuOpen(false)} aria-current={!href.includes("#") && (pathname === href || pathname.startsWith(`${href}/`)) ? "page" : undefined}>{label}</a>)}
           </nav>
         )}
       </div>
```

## components/LibraryCard.tsx

Status: modified; +61; −87

```diff
@@ -1,12 +1,10 @@
-import { ArrowUpRight, Heart, Layers3, Target } from "lucide-react";
+import { ArrowUpRight, Heart } from "lucide-react";
 import Link from "next/link";
 import type { MouseEvent } from "react";
 import type { Library } from "@/data/libraries";
 import type { LibraryComponent } from "@/data/components";
-import { Badge } from "@/components/ui/badge";
-import { Button } from "@/components/ui/button";
-import { Card } from "@/components/ui/card";
+import { MinimalCardImage } from "@/components/ui/minimal-card";
+import { categoryIcons } from "./MaskIcon";
-import { MinimalCard, MinimalCardDescription, MinimalCardImage, MinimalCardTitle } from "@/components/ui/minimal-card";
 import { LibraryLogo } from "./LibraryLogo";
 import { hostname } from "@/lib/utils";
 import { libraryPath } from "@/lib/site";
@@ -30,9 +28,10 @@
   if (layout === "grid") {
     const preview = libraryPreviews[library.slug];
     const previewRatio = preview ? preview.width / preview.height : 0;
+    const CategoryIcon = categoryIcons[library.category];
 
     return (
+      <article className="lib-card">
-      <MinimalCard className="library-grid-card group relative flex min-w-0 flex-col">
         <MinimalCardImage
           src={preview?.src}
           alt={`${library.name} website preview`}
@@ -41,101 +40,76 @@
             padding: previewRatio >= 1.4 ? 0 : "1.5rem",
           }}
           fallback={
+            <span role="img" aria-label={`Preview unavailable for ${library.name}`} className="lib-card-fallback">
+              <LibraryLogo url={library.url} name={library.name} size={28} />
-            <span role="img" aria-label={`Preview unavailable for ${library.name}`} className="library-card-fallback absolute inset-0 flex flex-col justify-end rounded-xl p-5">
+              <span className="lib-card-fallback-host">{hostname(library.url)}</span>
-              <span className="text-lg font-semibold tracking-tight">{library.name}</span>
-              <span className="mt-1 text-xs opacity-70">{hostname(library.url)}</span>
             </span>
           }
-          className="library-card-image mb-3 h-40 2xl:h-48"
+          className="lib-card-media"
         />
-        <Button type="button" size="icon-sm" variant="ghost" onClick={handleToggleSaved} aria-label={saved ? `Remove ${library.name} from saved` : `Save ${library.name}`} aria-pressed={saved} className="library-save library-grid-save absolute right-4 top-4 z-10 size-8 min-h-8 min-w-8 p-0">
-          <Heart className="size-3.5" fill={saved ? "currentColor" : "none"} aria-hidden />
-        </Button>
-        <div className="library-card-heading flex flex-wrap items-center gap-1.5 px-1">
-          <Link href={libraryPath(library.slug)} className="after:absolute after:inset-0 focus-visible:outline-2 focus-visible:outline-offset-2">
-            <MinimalCardTitle className="mt-0 px-0">{library.name}</MinimalCardTitle>
-          </Link>
-          <span className="library-card-category" aria-label={`Category: ${library.category}`}>
-            <span className="library-card-category-dot" aria-hidden />
-            {library.category}
+        <button type="button" onClick={handleToggleSaved} aria-label={saved ? `Remove ${library.name} from saved` : `Save ${library.name}`} aria-pressed={saved} className="library-save lib-card-save">
-          </span>
-          {matches.slice(0, 2).map((component) => (
-            <a key={component.url} href={component.url} target="_blank" rel="noopener noreferrer" className="library-chip relative z-10 max-w-full rounded-md border px-1.5 py-0.5 text-[10px] break-words hover:opacity-80 focus-visible:outline-2 focus-visible:outline-offset-2">
-              {component.name}
-            </a>
-          ))}
-          {matches.length > 2 && <span className="library-subtle text-[10px]">+{matches.length - 2}</span>}
+          <Heart fill={saved ? "currentColor" : "none"} aria-hidden />
+        </button>
+        <div className="lib-card-body">
+          <div className="lib-card-title">
+            <Link href={libraryPath(library.slug)} className="lib-card-name">{library.name}</Link>
+            <span className="lib-card-category" aria-label={`Category: ${library.category}`}>
+              <CategoryIcon className="lib-card-category-icon" />
+              <span className="cap">{library.category}</span>
+            </span>
+          </div>
+          <p className="lib-card-desc">{library.description}</p>
+          {matches.length > 0 && <div className="lib-card-meta">
+            {matches.slice(0, 2).map((component) => (
+              <a key={component.url} href={component.url} target="_blank" rel="noopener noreferrer" className="lib-tag lib-tag-link">
+                <span className="cap">{component.name}</span>
+                <ArrowUpRight aria-hidden />
+              </a>
+            ))}
+            {matches.length > 2 && <span className="lib-tag lib-tag-more"><span className="cap">+{matches.length - 2}</span></span>}
+          </div>}
         </div>
+      </article>
-        <MinimalCardDescription className="library-grid-description mt-1 leading-5">
-          {library.description}
-        </MinimalCardDescription>
-      </MinimalCard>
     );
   }
 
+  const tags = matches.length > 0 ? null : library.stacks;
   return (
-    <Card className="library-card group relative grid min-h-0 grid-cols-1 gap-x-5 gap-y-3 rounded-xl p-4 shadow-none transition-colors lg:grid-cols-[minmax(12rem,0.85fr)_minmax(0,2fr)_auto] lg:items-center">
-      <div className="min-w-0">
-        <Link href={libraryPath(library.slug)} className="flex min-w-0 items-center gap-3 after:absolute after:inset-0 focus-visible:outline-2 focus-visible:outline-offset-2">
-          <span className="theme-border grid size-9 shrink-0 place-items-center rounded-lg border bg-white/[0.035]">
-            <LibraryLogo url={library.url} name={library.name} size={24} />
-          </span>
-          <span className="truncate text-[15px] tracking-[-0.01em]">{library.name}</span>
-        </Link>
-        <p className="library-subtle mt-1.5 truncate pl-12 text-[11px]">{hostname(library.url)}</p>
-        <div className="library-subtle mt-2 flex flex-wrap items-center gap-x-4 gap-y-1 text-[10px]">
-          {library.stacks.length > 0 && <span className="flex items-center gap-1.5"><Layers3 className="size-3" aria-hidden />{library.stacks.length} {library.stacks.length === 1 ? "stack" : "stacks"}</span>}
+    <article className="lib-row group">
+      <span className="lib-row-logo" aria-hidden>
+        <LibraryLogo url={library.url} name={library.name} size={20} />
-          <span className="flex items-center gap-1.5"><Target className="size-3" aria-hidden />{library.useCases.length} {library.useCases.length === 1 ? "use" : "uses"}</span>
-        </div>
+      </span>
+      <div className="lib-row-id">
+        <Link href={libraryPath(library.slug)} className="lib-row-name">{library.name}</Link>
+        <span className="lib-row-host">{hostname(library.url)}</span>
       </div>
+      <p className="lib-row-desc">{library.description}</p>
-
+      <div className="lib-row-tags">
-      <div className="min-w-0">
-        <p className="library-muted line-clamp-2 text-[13px] leading-5">{library.description}</p>
         {matches.length > 0 ? (
+          <>
-          <div className="mt-2 flex flex-wrap items-center gap-1.5">
             {matches.slice(0, 3).map((component) => (
+              <a key={component.url} href={component.url} target="_blank" rel="noopener noreferrer" className="lib-tag lib-tag-link">
+                <span className="cap">{component.name}</span>
+                <ArrowUpRight aria-hidden />
-              <a
-                key={component.url}
-                href={component.url}
-                target="_blank"
-                rel="noopener noreferrer"
-                className="library-chip focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 relative z-10 inline-flex items-center gap-1 rounded-md border px-2 py-1 text-xs hover:opacity-80"
-              >
-                {component.name}
-                <ArrowUpRight className="size-2.5" aria-hidden />
               </a>
             ))}
-            {matches.length > 3 && (
-              <details className="relative z-10">
-                <summary className="library-subtle w-fit cursor-pointer rounded py-2 text-xs focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2">{matches.length - 3} more matches</summary>
-                <div className="flex flex-wrap gap-1.5 pt-1">
-                  {matches.slice(3).map((component) => (
-                    <a key={component.url} href={component.url} target="_blank" rel="noopener noreferrer" className="library-chip inline-flex items-center gap-1 rounded-md border px-2 py-1 text-xs hover:opacity-80 focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2">
-                      {component.name}<ArrowUpRight className="size-2.5" aria-hidden />
-                    </a>
-                  ))}
+            {matches.length > 3 && <span className="lib-tag lib-tag-more"><span className="cap">+{matches.length - 3}</span></span>}
+          </>
+        ) : (
-                </div>
-              </details>
+          <>
+            {tags!.slice(0, 3).map((stack) => <span key={stack} className="lib-tag"><span className="cap">{stack}</span></span>)}
+            {tags!.length > 3 && <span className="lib-tag lib-tag-more"><span className="cap">+{tags!.length - 3}</span></span>}
+          </>
+        )}
-            )}
-          </div>
-        ) : library.stacks.length > 0 ? (
-          <div className="mt-2 flex flex-wrap gap-1.5">
-            {library.stacks.slice(0, 3).map((stack) => (
-              <Badge key={stack} variant="outline" className="library-chip px-2 py-0.5 text-[10px]">{stack}</Badge>
-            ))}
-            {library.stacks.length > 3 && <Badge variant="outline" className="library-chip px-2 py-0.5 text-[10px]">+{library.stacks.length - 3}</Badge>}
-          </div>
-        ) : null}
       </div>
-
-      <div className="relative z-10 flex items-center justify-end gap-1 lg:justify-self-end">
-        <Button type="button" size="icon-sm" variant="ghost" onClick={handleToggleSaved} aria-label={saved ? `Remove ${library.name} from saved` : `Save ${library.name}`} aria-pressed={saved} className="library-save size-9 min-h-9 min-w-9 rounded-lg p-0 hover:opacity-80">
-          <Heart className="size-4" fill={saved ? "currentColor" : "none"} aria-hidden />
-        </Button>
-        <Button asChild size="icon-sm" variant="ghost" className="library-subtle min-h-11 min-w-11 rounded-lg hover:opacity-80">
-          <a href={library.url} target="_blank" rel="noopener noreferrer" aria-label={`Visit ${library.name} website`}><ArrowUpRight aria-hidden /></a>
-        </Button>
+      <div className="lib-row-actions">
+        <button type="button" onClick={handleToggleSaved} aria-label={saved ? `Remove ${library.name} from saved` : `Save ${library.name}`} aria-pressed={saved} className="library-save lib-row-action">
+          <Heart fill={saved ? "currentColor" : "none"} aria-hidden />
+        </button>
+        <a href={library.url} target="_blank" rel="noopener noreferrer" aria-label={`Visit ${library.name} website`} className="lib-row-action">
+          <ArrowUpRight aria-hidden />
+        </a>
       </div>
-    </Card>
+    </article>
   );
 }
```

## components/LibraryDetail.tsx

Status: modified; +1; −7

```diff
@@ -18,13 +18,7 @@
   const gettingStarted = details.gettingStarted;
 
   return (
-    <article className={`relative isolate mx-auto w-full px-5 pt-28 pb-28 sm:px-8 sm:pt-32 ${details.preview ? "max-w-6xl" : "max-w-4xl"}`}>
-      {details.preview && (
-        <div className="library-detail-backdrop" aria-hidden="true">
-          {/* eslint-disable-next-line @next/next/no-img-element */}
-          <img src={details.preview.src} alt="" />
-        </div>
-      )}
+    <article className={`relative isolate mx-auto w-full px-5 pt-6 pb-20 sm:px-8 ${details.preview ? "max-w-6xl" : "max-w-4xl"}`}>
       <Link
         href="/libraries"
         className="docs-text-link theme-muted inline-flex min-h-11 w-fit items-center gap-2 text-sm font-medium"
```

## components/MaskIcon.tsx

Status: added; +43; −0

```diff
@@ -1,0 +1,43 @@
+import type { CSSProperties } from "react";
+import type { Category } from "@/data/libraries";
+
+export type IconComponent = (props: { className?: string }) => React.JSX.Element;
+
+/** Renders a monochrome PNG from /public/icons as a mask, so it takes the current text color. */
+export function maskIcon(name: string): IconComponent {
+  const style = { "--icon-src": `url("/icons/${name}.png")` } as CSSProperties;
+  function MaskedIcon({ className = "" }: { className?: string }) {
+    return <span aria-hidden="true" className={`mask-icon ${className}`} style={style} />;
+  }
+  MaskedIcon.displayName = `MaskIcon(${name})`;
+  return MaskedIcon;
+}
+
+export const Icons = {
+  home: maskIcon("home"),
+  libraries: maskIcon("folder"),
+  docs: maskIcon("book-open"),
+  contributors: maskIcon("profile-2user"),
+  sponsors: maskIcon("lovely"),
+  allLibraries: maskIcon("category"),
+  componentLibrary: maskIcon("main-component"),
+  animation: maskIcon("colorfilter"),
+  templates: maskIcon("grid-edit"),
+  icons: maskIcon("smileys"),
+  charts: maskIcon("chart"),
+  threeD: maskIcon("3d-rotate"),
+  css: maskIcon("color-swatch"),
+  inspiration: maskIcon("lamp-on"),
+  list: maskIcon("row-vertical"),
+} satisfies Record<string, IconComponent>;
+
+export const categoryIcons: Record<Category, IconComponent> = {
+  "Component Library": Icons.componentLibrary,
+  "Animation & Motion": Icons.animation,
+  "Templates & Blocks": Icons.templates,
+  Icons: Icons.icons,
+  "Charts & Data Viz": Icons.charts,
+  "3D & WebGL": Icons.threeD,
+  "CSS Framework": Icons.css,
+  "Design Inspiration": Icons.inspiration,
+};
```

## components/SidebarSlot.tsx

Status: added; +28; −0

```diff
@@ -1,0 +1,28 @@
+"use client";
+
+import { useEffect, useState, type ReactNode } from "react";
+import { createPortal } from "react-dom";
+
+export const SIDEBAR_SLOT_ID = "app-sidebar-slot";
+
+/**
+ * Renders page-specific sidebar content (filters, docs navigation) inside the
+ * app frame's sidebar on desktop. Below the desktop breakpoint the frame has no
+ * sidebar, so the content renders inline instead, or not at all.
+ */
+export function SidebarSlot({ children, mobile = "inline" }: { children: ReactNode; mobile?: "inline" | "hidden" }) {
+  const [target, setTarget] = useState<HTMLElement | null>(null);
+  const [desktop, setDesktop] = useState(false);
+
+  useEffect(() => {
+    setTarget(document.getElementById(SIDEBAR_SLOT_ID));
+    const query = window.matchMedia("(min-width: 1024px)");
+    const sync = () => setDesktop(query.matches);
+    sync();
+    query.addEventListener("change", sync);
+    return () => query.removeEventListener("change", sync);
+  }, []);
+
+  if (desktop && target) return createPortal(children, target);
+  return <div className="sidebar-slot-inline" data-mobile={mobile}>{children}</div>;
+}
```

## components/SiteChrome.tsx

Status: added; +138; −0

```diff
@@ -1,0 +1,138 @@
+"use client";
+
+import { useEffect, useRef, useState } from "react";
+import Image from "next/image";
+import Link from "next/link";
+import { usePathname } from "next/navigation";
+import { Search, Star } from "lucide-react";
+import { libraries } from "@/data/libraries";
+import { componentIndex } from "@/data/components";
+import { createDirectorySearch } from "@/lib/directory";
+import { libraryPath } from "@/lib/site";
+
+const compactNumber = new Intl.NumberFormat("en", { notation: "compact", maximumFractionDigits: 1 });
+const searchDirectory = createDirectorySearch(libraries, componentIndex);
+
+let starsRequest: Promise<number | null> | null = null;
+
+/** Star count for the repo, fetched once per page load and shared by every caller. */
+export function useGitHubStars() {
+  const [stars, setStars] = useState<number | null>(null);
+  useEffect(() => {
+    let active = true;
+    starsRequest ??= fetch("https://api.github.com/repos/screen-gd/Col")
+      .then((response) => (response.ok ? response.json() : null))
+      .then((repository: { stargazers_count?: number } | null) => (typeof repository?.stargazers_count === "number" ? repository.stargazers_count : null))
+      .catch(() => null);
+    starsRequest.then((count) => { if (active) setStars(count); });
+    return () => { active = false; };
+  }, []);
+  return stars;
+}
+
+export function BrandLink({ className = "" }: { className?: string }) {
+  return (
+    <a href="/" aria-label="Col, Collection of Libraries" className={`site-brand ${className}`}>
+      <Image src="/brand/col-mark.png" alt="" width={20} height={20} className="site-brand-mark" priority />
+      <span className="site-brand-name cap">Col</span>
+    </a>
+  );
+}
+
+export function GitHubStars({ stars, className = "" }: { stars: number | null; className?: string }) {
+  return (
+    <a
+      href="https://github.com/screen-gd/Col"
+      target="_blank"
+      rel="noopener noreferrer"
+      className={`site-github ${className}`}
+      aria-label={`Col on GitHub${stars === null ? "" : `, ${stars} stars`}`}
+      title="Col on GitHub"
+    >
+      <svg viewBox="0 0 16 16" width="15" height="15" aria-hidden="true"><path fill="currentColor" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82a7.65 7.65 0 0 1 2-.27c.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z" /></svg>
+      <span className="site-github-count">
+        <Star className="site-github-star" aria-hidden="true" />
+        <span className="cap">{stars === null ? "–" : compactNumber.format(stars)}</span>
+      </span>
+    </a>
+  );
+}
+
+/**
+ * Library search with a quick-results dropdown. `collapsed` renders only an icon
+ * that opens the directory with its search focused (used by the docs rail).
+ */
+export function SiteSearch({ className = "", collapsed = false }: { className?: string; collapsed?: boolean }) {
+  const pathname = usePathname();
+  const [query, setQuery] = useState("");
+  const [open, setOpen] = useState(false);
+  const inputRef = useRef<HTMLInputElement>(null);
+
+  useEffect(() => {
+    setOpen(false);
+    setQuery("");
+  }, [pathname]);
+
+  if (collapsed) {
+    return (
+      <Link href="/libraries#library-search" className={`site-search-icon ${className}`} aria-label="Search libraries" title="Search libraries">
+        <Search aria-hidden="true" />
+      </Link>
+    );
+  }
+
+  const results = query.trim()
+    ? searchDirectory({ query, category: null, stacks: [], useCases: [], sort: "curated" }).slice(0, 5)
+    : [];
+
+  return (
+    <form
+      role="search"
+      className={`site-search ${className}`}
+      onSubmit={(event) => {
+        event.preventDefault();
+        const trimmed = query.trim();
+        if (trimmed) window.location.assign(`/libraries?q=${encodeURIComponent(trimmed)}`);
+      }}
+      onBlur={(event) => {
+        if (!(event.relatedTarget instanceof Node) || !event.currentTarget.contains(event.relatedTarget)) setOpen(false);
+      }}
+    >
+      <Search aria-hidden="true" />
+      <input
+        ref={inputRef}
+        data-site-search=""
+        type="search"
+        value={query}
+        onChange={(event) => setQuery(event.target.value)}
+        onFocus={() => setOpen(true)}
+        onKeyDown={(event) => {
+          if (event.key === "Escape") {
+            setOpen(false);
+            event.currentTarget.blur();
+          }
+        }}
+        placeholder="Search"
+        aria-label="Search libraries or components"
+      />
+      <kbd aria-hidden="true">/</kbd>
+      {open && query.trim() && (
+        <div className="site-search-results" aria-label="Library search results">
+          {results.length ? (
+            <ul>
+              {results.map(({ library, components }) => (
+                <li key={library.slug}>
+                  <Link href={libraryPath(library.slug)} onClick={() => setOpen(false)}>
+                    <span>{library.name}</span>
+                    <small>{components[0]?.name ?? library.category}</small>
+                  </Link>
+                </li>
+              ))}
+            </ul>
+          ) : <p>No matching libraries</p>}
+          <button type="submit">View all results</button>
+        </div>
+      )}
+    </form>
+  );
+}
```

[Next page](https://git.cafe/screen/col/pull/36/diffs?after=ImNvbXBvbmVudHMvU2l0ZUNocm9tZS50c3gi&expectedVersion=0&format=markdown)
