/* shadcn-vue's home page (apps/v4/pages/index.vue at d1bf1b3), its Tailwind classes written out as CSS,
   with shadcn's neutral tokens: the same ones the Rust port paints with. */
@font-face { font-family: "Geist"; src: url("/fonts/Geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/GeistMono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --radius: 0.625rem;
  --background: oklch(1 0 0);
  --foreground: oklch(0.145 0 0);
  --card: oklch(1 0 0);
  --primary: oklch(0.205 0 0);
  --primary-foreground: oklch(0.985 0 0);
  --secondary: oklch(0.97 0 0);
  --secondary-foreground: oklch(0.205 0 0);
  --muted: oklch(0.97 0 0);
  --muted-foreground: oklch(0.556 0 0);
  --accent: oklch(0.97 0 0);
  --accent-foreground: oklch(0.205 0 0);
  --border: oklch(0.922 0 0);
  --ring: oklch(0.708 0 0);
  --header-height: 3.5rem;
  --footer-height: 3.5rem;
  color-scheme: light;
}
.dark {
  --background: oklch(0.145 0 0);
  --foreground: oklch(0.985 0 0);
  --card: oklch(0.205 0 0);
  --primary: oklch(0.922 0 0);
  --primary-foreground: oklch(0.205 0 0);
  --secondary: oklch(0.269 0 0);
  --secondary-foreground: oklch(0.985 0 0);
  --muted: oklch(0.269 0 0);
  --muted-foreground: oklch(0.708 0 0);
  --accent: oklch(0.269 0 0);
  --accent-foreground: oklch(0.985 0 0);
  --border: oklch(1 0 0 / 10%);
  --ring: oklch(0.556 0 0);
  color-scheme: dark;
}

*, ::before, ::after { box-sizing: border-box; border: 0 solid var(--border); margin: 0; padding: 0; }
html { overscroll-behavior-y: none; -webkit-text-size-adjust: 100%; }
body {
  background: var(--background); color: var(--foreground);
  font-family: "Geist", Arial, ui-sans-serif, system-ui, sans-serif; line-height: 1.5;
  font-synthesis-weight: none; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: inherit; }
img, svg { display: block; }
img { max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.only-dark, .dark .only-light { display: none; }
.dark .only-dark { display: block; }

.layout { position: relative; z-index: 10; display: flex; min-height: 100svh; flex-direction: column; background: var(--background); }
main { display: flex; min-height: 0; flex: 1; flex-direction: column; }

/* container-wrapper / container */
.container-wrapper { margin-inline: auto; width: 100%; padding-inline: 0.5rem; }
.container-wrapper.px-6 { padding-inline: 1.5rem; }
.container-wrapper.px-4 { padding-inline: 1rem; }
.container { margin-inline: auto; max-width: 1400px; padding-inline: 1rem; }
@media (min-width: 64rem) { .container { padding-inline: 2rem; } }
@media (min-width: 100rem) { .container { max-width: 96rem; } }

/* Button (new-york-v4) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; white-space: nowrap; flex-shrink: 0;
  border-radius: calc(var(--radius) - 2px); font-size: 0.875rem; line-height: 1.25rem; font-weight: 500;
  transition: all .15s cubic-bezier(.4, 0, .2, 1); outline: none;
}
.btn svg { width: 1rem; height: 1rem; flex-shrink: 0; pointer-events: none; }
.btn:focus-visible { box-shadow: 0 0 0 3px color-mix(in oklch, var(--ring) 50%, transparent); }
.btn-sm { height: 2rem; gap: 0.375rem; padding-inline: 0.75rem; }
.btn-sm:has(> svg) { padding-inline: 0.625rem; }
.btn-icon { width: 2rem; height: 2rem; }
.btn-icon svg { width: 1.125rem; height: 1.125rem; }
.btn-ghost:hover { background: var(--accent); color: var(--accent-foreground); }
.dark .btn-ghost:hover { background: color-mix(in oklch, var(--accent) 50%, transparent); }
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { background: color-mix(in oklch, var(--primary) 90%, transparent); }
.btn-31 { height: 31px; border-radius: calc(var(--radius) + 0px); }
a.btn:active, button.btn:active { opacity: .6; }
@media (min-width: 48rem) { a.btn:active, button.btn:active { opacity: 1; } }

/* SiteHeader */
.site-header { position: sticky; top: 0; z-index: 50; width: 100%; background: var(--background); }
.header-row { display: flex; height: var(--header-height); align-items: center; }
.main-nav { display: flex; align-items: center; gap: 0; }
.main-nav .btn-sm { padding-inline: 0.625rem; }
.main-nav .logo { margin-right: 0.25rem; }
.main-nav .logo svg { width: 1.25rem; height: 1.25rem; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }
.separator { width: 1px; height: 1rem; background: var(--border); flex-shrink: 0; }
.github { height: 2rem; }
.stars { width: 2rem; font-size: 0.75rem; color: var(--muted-foreground); font-variant-numeric: tabular-nums; text-align: left; }
.skeleton { display: block; height: 1rem; width: 2rem; border-radius: calc(var(--radius) - 2px); background: var(--accent); animation: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite; }
@keyframes pulse { 50% { opacity: .5; } }
@media (max-width: 63.99rem) { .main-nav a:not(.logo) { display: none; } }
@media (max-width: 39.99rem) { .hide-sm { display: none; } }

/* PageHeader */
.header-stack {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  padding: 2rem 1.5rem; text-align: center;
}
@media (min-width: 48rem) { .header-stack { padding-block: 4rem 2rem; } }
@media (min-width: 64rem) { .header-stack { padding-block: 5rem 3rem; } }
@media (min-width: 80rem) { .header-stack { gap: 1rem; } }

/* Announcement: Badge variant="secondary" class="bg-muted" */
.badge {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.25rem; width: fit-content; white-space: nowrap;
  border: 1px solid transparent; border-radius: 9999px; padding: 0.125rem 0.5rem; font-size: 0.75rem; line-height: 1rem; font-weight: 500;
  background: var(--muted); color: var(--secondary-foreground); overflow: hidden; transition: color .15s, box-shadow .15s;
}
.badge:hover { background: color-mix(in oklch, var(--secondary) 90%, transparent); }
.badge svg { width: 0.75rem; height: 0.75rem; }
.new-dot { display: flex; width: 0.5rem; height: 0.5rem; border-radius: 9999px; background: oklch(72.3% 0.219 149.579); }

/* PageHeaderHeading class="max-w-4xl" */
h1 {
  max-width: 56rem; font-size: 1.875rem; line-height: 1.2; font-weight: 600; letter-spacing: -0.025em;
  text-wrap: balance; color: var(--foreground);
}
@media (min-width: 64rem) { h1 { line-height: 1.1; } }
@media (min-width: 80rem) { h1 { font-size: 3rem; letter-spacing: -0.05em; } }

/* PageHeaderDescription */
.description { max-width: 56rem; font-size: 1rem; line-height: 1.5rem; text-wrap: balance; color: var(--foreground); }
@media (min-width: 40rem) { .description { font-size: 1.125rem; line-height: 1.75rem; } }

/* PageActions */
.page-actions { display: flex; width: 100%; align-items: center; justify-content: center; gap: 0.5rem; padding-top: 0.5rem; }

/* The demo: the mobile screenshot, then CardsDemo from md up */
.demo-wrapper { flex: 1; padding: 0; }
.demo-container { overflow: hidden; }
@media (min-width: 48rem) { .demo-container { padding-inline: 0; } }
@media (min-width: 64rem) { .demo-container { max-width: none; } }
.mobile-shot { margin-inline: -1rem; width: 160vw; overflow: hidden; border-radius: var(--radius); border: 1px solid color-mix(in oklch, var(--border) 50%, transparent); }
.desktop-demo { display: none; }
@media (min-width: 48rem) {
  .mobile-shot { display: none; }
  .desktop-demo { display: block; }
}

.cards-demo {
  --gap: 2rem;
  position: relative; display: flex; width: 100%; flex-direction: column; gap: var(--gap); overflow: hidden;
  padding: 3rem 3rem 0; background: var(--muted);
}
.dark .cards-demo { background: var(--background); }
@media (min-width: 64rem) { .cards-demo { --gap: 1.5rem; padding: 1.5rem 1.5rem 0; } }
@media (min-width: 100rem) { .cards-demo { --gap: 2rem; } }
@media (min-width: 1900px) { .cards-demo { --gap: 2.5rem; padding: 3rem 3rem 0; } }

.cards-grid { position: relative; z-index: 10; margin-inline: auto; display: grid; gap: var(--gap); width: 100%; }
@media (min-width: 48rem) { .cards-grid { max-width: 48rem; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .cards-grid { max-width: none; grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 80rem) { .cards-grid { max-width: 1600px; } }
@media (min-width: 96rem) { .cards-grid { max-width: 1900px; } }
@media (min-width: 1400px) { .cards-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1900px) { .cards-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.col { display: flex; flex-direction: column; align-items: flex-start; gap: var(--gap); min-width: 0; }
.col-lg, .col-1400, .col-md, .col-1900 { display: none; }
@media (min-width: 48rem) { .col-md { display: flex; } }
@media (min-width: 64rem) { .col-lg { display: flex; } }
@media (min-width: 1400px) { .col-1400 { display: flex; } }
@media (min-width: 1900px) { .col-1900 { display: flex; } }

/* A rendered demo. A demo that is a card already is shown as rendered, its corners clipped to the card's radius; any other
   sits in a Card (bg-card rounded-xl border py-6 shadow-sm), on the page colour its frame was rendered on. */
.cell { width: 100%; }
.cell img { width: 100%; }
.clip img { border-radius: 12px; }
.frame {
  display: flex; justify-content: flex-start; padding: 1.5rem; border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px);
  background: var(--background); box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}
.frame.center { justify-content: center; }

.fade-top {
  position: absolute; inset-inline: 0; top: 0; z-index: 1; height: 30rem; pointer-events: none;
  background: linear-gradient(to bottom, var(--background), var(--muted), transparent);
}
.dark .fade-top { display: none; }
.fade-bottom {
  position: absolute; inset-inline: 0; bottom: 0; z-index: 20; height: 12rem; pointer-events: none;
  background: linear-gradient(to top, var(--background), color-mix(in oklch, var(--muted) 80%, transparent), transparent);
}
.dark .fade-bottom { background: linear-gradient(to top, var(--background), color-mix(in oklch, var(--background) 80%, transparent), transparent); }
@media (min-width: 64rem) { .fade-bottom { height: 20rem; } }
@media (min-width: 80rem) { .fade-bottom { height: 16rem; } }

/* SiteFooter */
.footer-row { display: flex; height: var(--footer-height); align-items: center; justify-content: space-between; }
.footer-text { width: 100%; padding-inline: 0.25rem; text-align: center; font-size: 0.75rem; line-height: 2; color: var(--muted-foreground); }
@media (min-width: 40rem) { .footer-text { font-size: 0.875rem; } }
.footer-text a { font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }
@media (min-width: 80rem) { .site-footer .container-wrapper.px-4 { padding-inline: 1.5rem; } }

/* ---------------------------------------------------------------------------------------------------------------
   Docs (apps/v4/pages/docs.vue, docs/[...slug].vue, DocsSidebar, DocsTableOfContents, ComponentPreviewTabs, Prose*)
   --------------------------------------------------------------------------------------------------------------- */
:root { --surface: oklch(0.98 0 0); --surface-foreground: var(--foreground); --code-highlight: oklch(0.96 0 0); --input: oklch(0.922 0 0); }
.dark { --surface: oklch(0.2 0 0); --surface-foreground: oklch(0.708 0 0); --code-highlight: oklch(0.27 0 0); --input: oklch(1 0 0 / 15%); }
:root { --code: var(--surface); --code-foreground: var(--surface-foreground); }

.main-nav .btn[data-active] { background: var(--accent); }
.mobile-menu-trigger { display: none; }
@media (max-width: 63.99rem) { .mobile-menu-trigger { display: inline-flex; margin-left: -0.5rem; } }
.btn-secondary { background: var(--secondary); color: var(--secondary-foreground); }
.btn-secondary:hover { background: color-mix(in oklch, var(--secondary) 80%, transparent); }
.btn-outline { border: 1px solid var(--border); background: var(--background); box-shadow: 0 1px 2px 0 rgb(0 0 0 / .05); }
.dark .btn-outline { background: color-mix(in oklch, var(--input) 30%, transparent); border-color: var(--input); }
.btn-outline:hover { background: var(--accent); }
.btn-icon-7 { width: 1.75rem; height: 1.75rem; border-radius: calc(var(--radius) - 2px); }
.btn-icon-7 svg { width: 1rem; height: 1rem; }

/* Search: CommandMenu's trigger */
.search-trigger {
  position: relative; display: none; height: 2rem; width: 100%; align-items: center; justify-content: space-between; gap: 0.5rem;
  border-radius: var(--radius); padding: 0 0.375rem 0 0.625rem; font-size: 0.875rem; font-weight: 400; color: var(--foreground);
  background: var(--surface); border: 0; box-shadow: none;
}
.dark .search-trigger { background: var(--card); }
.search-trigger:hover { background: var(--accent); }
@media (min-width: 48rem) { .search-trigger { display: inline-flex; width: 10rem; } }
@media (min-width: 64rem) { .search-trigger { width: 14rem; } }
@media (min-width: 80rem) { .search-trigger { width: 16rem; } }
.search-long { display: none; color: var(--muted-foreground); }
.search-short { color: var(--muted-foreground); }
@media (min-width: 64rem) { .search-long { display: inline-flex; } .search-short { display: none; } }
.kbd-group { display: inline-flex; gap: 0.25rem; }
kbd kbd, .kbd-group kbd {
  display: inline-flex; height: 1.25rem; min-width: 1.25rem; align-items: center; justify-content: center; border-radius: 0.25rem;
  padding: 0 0.25rem; font: 500 0.75rem "Geist", sans-serif; color: var(--muted-foreground); background: var(--background);
  border: 1px solid var(--border);
}
@media (max-width: 47.99rem) { .hide-md { display: none; } }

/* Layout: container-wrapper px-2 > grid [sidebar 18rem | page] */
.docs-wrapper { display: flex; flex: 1; flex-direction: column; padding-inline: 0.5rem; }
.docs-grid { display: flex; flex: 1; align-items: flex-start; --top-spacing: 0px; }
@media (min-width: 64rem) { .docs-grid { display: grid; grid-template-columns: 18rem minmax(0, 1fr); --top-spacing: 1rem; } }
.docs-sidebar {
  position: sticky; top: calc(var(--header-height) + 0.6rem); z-index: 30; display: none; height: calc(100svh - 10rem);
  overflow: hidden; overscroll-behavior: none;
}
@media (min-width: 64rem) { .docs-sidebar { display: flex; } }
.sidebar-content { position: relative; width: 14rem; overflow-x: hidden; overflow-y: auto; padding-left: 0.625rem; scrollbar-width: none; }
.sidebar-content::-webkit-scrollbar { display: none; }
.sidebar-group { display: flex; flex-direction: column; padding: 0.5rem; }
.sidebar-group:first-child { padding-top: 3rem; }
.sidebar-label { display: flex; height: 2rem; align-items: center; padding: 0 0.5rem; font-size: 0.75rem; font-weight: 500; color: var(--muted-foreground); }
.sidebar-menu { list-style: none; display: flex; flex-direction: column; gap: 0.125rem; }
.sidebar-button {
  position: relative; display: flex; width: fit-content; height: 30px; align-items: center; gap: 0.5rem; padding: 0 0.5rem;
  border-radius: calc(var(--radius) - 2px); border: 1px solid transparent; font-size: 0.8rem; font-weight: 500; white-space: nowrap;
}
.sidebar-button:hover { background: var(--accent); }
.sidebar-button[data-active] { border-color: var(--accent); background: var(--accent); }
.sidebar-fade { position: sticky; bottom: -0.25rem; z-index: 10; height: 4rem; flex-shrink: 0; pointer-events: none;
  background: linear-gradient(to top, var(--background), color-mix(in oklch, var(--background) 80%, transparent), color-mix(in oklch, var(--background) 50%, transparent)); filter: blur(4px); }

.docs-page { display: flex; align-items: stretch; padding-bottom: 2rem; font-size: 1.05rem; width: 100%; }
@media (min-width: 40rem) { .docs-page { font-size: 15px; } }
.docs-main { display: flex; min-width: 0; flex: 1; flex-direction: column; padding-top: var(--top-spacing); }
.docs-column { margin-inline: auto; display: flex; width: 100%; max-width: 40rem; min-width: 0; flex: 1; flex-direction: column; gap: 1.5rem; padding: 1.5rem 1rem; }
@media (min-width: 48rem) { .docs-column { padding-inline: 0; } }
@media (min-width: 64rem) { .docs-column { padding-block: 2rem; } }
.docs-title { display: flex; flex-direction: column; gap: 0.5rem; }
.docs-title-row { display: flex; align-items: center; justify-content: space-between; }
@media (min-width: 48rem) { .docs-title-row { align-items: flex-start; } }
.docs-title h1 { font-size: 1.875rem; line-height: 2.25rem; font-weight: 600; letter-spacing: -0.025em; max-width: none; scroll-margin-top: 6rem; }
.docs-nav { display: flex; align-items: center; gap: 0.5rem; margin-left: 1rem; }
.docs-description { color: var(--muted-foreground); font-size: 16px; text-wrap: balance; }
.docs-description code, .prose :not(pre) > code, .stat-label code {
  position: relative; border-radius: calc(var(--radius) - 2px); background: var(--muted); padding: 0.2rem 0.3rem;
  font-family: "Geist Mono", ui-monospace, monospace; font-size: 0.8rem; color: var(--foreground);
}
.docs-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: -0.5rem; }
.badge-secondary { background: var(--secondary); color: var(--secondary-foreground); }
.badge-secondary:hover { background: color-mix(in oklch, var(--secondary) 90%, transparent); }

.docs-toc {
  position: sticky; top: calc(var(--header-height) + 1px); z-index: 30; margin-left: auto; display: none; width: 18rem; flex-direction: column;
  gap: 1rem; height: calc(100svh - var(--header-height) - var(--footer-height)); overflow-y: auto; padding: var(--top-spacing) 0 2rem;
  scrollbar-width: none;
}
@media (min-width: 80rem) { .docs-toc { display: flex; } }
.toc { display: flex; flex-direction: column; gap: 0.5rem; padding: 0 2rem; font-size: 0.875rem; }
.toc-title { height: 1.5rem; font-size: 0.75rem; font-weight: 500; color: var(--muted-foreground); background: var(--background); }
.toc a { font-size: 0.8rem; color: var(--muted-foreground); transition: color .15s; }
.toc a:hover, .toc a[data-active] { color: var(--foreground); }
.toc a[data-active] { font-weight: 500; }
.toc a[data-depth="3"] { padding-left: 1rem; }

.docs-pager { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding-top: 1.5rem; }
.docs-pager .btn { box-shadow: none; }
.pager-right { margin-left: auto; }

/* Prose */
.prose { line-height: 1.625; }
.prose > * + * { margin-top: 1.5rem; }
.prose h2 { margin-top: 2.5rem; scroll-margin-top: 7rem; font-size: 1.25rem; font-weight: 500; letter-spacing: -0.025em; }
@media (min-width: 64rem) { .prose h2 { margin-top: 4rem; } }
.prose h2:first-child { margin-top: 0; }
.prose h2 + p, .prose h3 + p { margin-top: 1rem !important; }
.prose h3 { margin-top: 3rem; scroll-margin-top: 7rem; font-size: 1.125rem; font-weight: 500; letter-spacing: -0.025em; }
.prose a { font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }
.prose ul, .prose ol { margin: 1.5rem 0 1.5rem 1.5rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-top: 0.5rem; }
.prose strong { font-weight: 500; }
.prose-table { margin: 1.5rem 0; width: 100%; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius); scrollbar-width: none; }
.prose table { position: relative; width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.prose th { padding: 0.5rem 1rem; text-align: left; font-weight: 700; }
.prose td { padding: 0.5rem 1rem; text-align: left; vertical-align: top; }
.prose tr { border-bottom: 1px solid var(--border); }
.prose tbody tr:last-child { border-bottom: 0; }
.prose .swatch code { white-space: nowrap; }
.prose td { overflow-wrap: anywhere; }
.prose td .badge { white-space: nowrap; }

/* Code: [data-pretty-code-figure] with Shiki's github-light / github-dark */
figure[data-pretty-code-figure] {
  position: relative; margin: 1.5rem -0.25rem 0; overflow: hidden; border-radius: calc(var(--radius) + 4px);
  background: var(--code); color: var(--code-foreground); font-size: 0.875rem;
}
figure[data-pretty-code-figure] pre {
  min-width: 0; overflow: auto; overscroll-behavior-x: contain; padding: 0.875rem 1rem; background: transparent !important;
  font-family: "Geist Mono", ui-monospace, monospace; font-size: 0.8125rem; line-height: 1.7; scrollbar-width: none;
}
.shiki span { color: var(--shiki-light); }
.dark .shiki span { color: var(--shiki-dark); }
.copy-button {
  position: absolute; top: 0.75rem; right: 0.5rem; z-index: 10; display: grid; place-items: center; width: 1.75rem; height: 1.75rem;
  border-radius: calc(var(--radius) - 2px); background: var(--code); color: var(--muted-foreground); opacity: .7;
}
.copy-button:hover { opacity: 1; background: var(--accent); color: var(--foreground); }
.copy-button svg { width: 0.875rem; height: 0.875rem; }
.copy-button .i-check, .copy-button.copied .i-copy { display: none; }
.copy-button.copied .i-check { display: block; }

/* ComponentPreviewTabs: the preview, then its code below, collapsed until "View Code" */
.demo-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; }
.demo-heading > span:first-child { margin-right: auto; }
.prose .demo-heading .demo-file { order: 3; flex-basis: 100%; background: none; padding: 0; font-size: 0.75rem; color: var(--muted-foreground); font-weight: 400; }
.demo-grades { display: inline-flex; gap: 0.375rem; }
.badge-grade { background: var(--secondary); color: var(--secondary-foreground); font-variant-numeric: tabular-nums; }
.badge-grade[data-grade="WARN"] { background: transparent; border-color: var(--border); }
.badge-grade[data-grade="FAIL"] { background: oklch(0.577 0.245 27.325); color: #fff; }
.component-preview { position: relative; margin: 1rem 0 3rem; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); }
.prose .component-preview { margin-top: 1rem; }
.preview { position: relative; display: flex; min-height: 18rem; width: 100%; align-items: center; justify-content: center; padding: 2.5rem; }
.preview img { max-width: 100%; height: auto; }
.preview-code { position: relative; overflow: hidden; }
.preview-code figure[data-pretty-code-figure] { margin: 0; border-radius: 0; border-top: 1px solid var(--border); }
.preview-code pre { max-height: 18rem; }
.preview-code .copy-button { right: 1rem; display: none; }
.preview-code[data-open] .copy-button { display: grid; }
.preview-code-inner { position: relative; height: 103px; }
.preview-code[data-open] .preview-code-inner { height: auto; }
.view-code { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding-bottom: 1rem; }
.view-code-fade { position: absolute; inset: 0; background: linear-gradient(to top, var(--code), color-mix(in oklab, var(--code) 60%, transparent), transparent); }
.view-code .btn { position: relative; z-index: 10; border-radius: var(--radius); box-shadow: none; }
.preview-code[data-open] .view-code { display: none; }

/* ComponentsList */
.components-list { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 40rem) { .components-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 48rem) { .components-list { grid-template-columns: repeat(3, 1fr); column-gap: 2rem; } }
@media (min-width: 64rem) { .components-list { column-gap: 4rem; row-gap: 1.5rem; } }
.prose .components-list a { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 1.125rem; font-weight: 500; text-decoration: none; }
@media (min-width: 48rem) { .prose .components-list a { font-size: 1rem; } }
.prose .components-list a:hover { text-decoration: underline; }
.prose .components-list + h2 { margin-top: 3rem; }

/* Theming and Fidelity */
.swatch { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0.5rem 0.25rem 0.25rem; border-radius: calc(var(--radius) - 2px); }
.swatch[data-mode="light"] { background: oklch(1 0 0); color: oklch(0.145 0 0); }
.swatch[data-mode="dark"] { background: oklch(0.145 0 0); color: oklch(0.985 0 0); }
.swatch-chip { width: 1.5rem; height: 1.5rem; flex-shrink: 0; border-radius: 0.375rem; box-shadow: inset 0 0 0 1px rgb(128 128 128 / .3); }
.prose .swatch code { background: none; padding: 0; font-size: 0.75rem; color: inherit; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin-top: 1rem !important; }
@media (min-width: 40rem) { .stat-grid { grid-template-columns: repeat(5, 1fr); } }
.stat-card { border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); padding: 1rem; }
.stat-value { font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 0.8rem; color: var(--muted-foreground); }

/* CommandMenu */
.command-dialog { margin: 15vh auto auto; width: calc(100% - 2rem); max-width: 32rem; padding: 0; border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px); background: var(--popover, var(--background)); color: var(--foreground); box-shadow: 0 25px 50px -12px rgb(0 0 0 / .25); }
.command-dialog::backdrop { background: rgb(0 0 0 / .5); }
.command { display: flex; flex-direction: column; }
.command-input { display: flex; height: 3rem; align-items: center; gap: 0.5rem; padding: 0 0.75rem; border-bottom: 1px solid var(--border); }
.command-input svg { width: 1rem; height: 1rem; opacity: .5; flex-shrink: 0; }
.command-input input { flex: 1; height: 100%; border: 0; outline: none; background: transparent; font: inherit; font-size: 0.875rem; color: inherit; }
.command-list { max-height: 60vh; overflow-y: auto; padding: 0.25rem; scroll-padding: 0.25rem; }
.command-group { padding: 0.25rem 0; }
.command-group-heading { padding: 0.375rem 0.5rem; font-size: 0.75rem; font-weight: 500; color: var(--muted-foreground); }
.command-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.375rem 0.5rem; border-radius: calc(var(--radius) - 4px); font-size: 0.875rem; cursor: default; }
.command-item svg { width: 1rem; height: 1rem; color: var(--muted-foreground); }
.command-item[data-selected] { background: var(--accent); }
.command-empty { padding: 1.5rem; text-align: center; font-size: 0.875rem; color: var(--muted-foreground); }

/* Mobile menu: the sidebar, over the page */
body.menu-open .docs-sidebar {
  display: flex; position: fixed; inset: var(--header-height) 0 0 0; height: auto; z-index: 40; background: var(--background);
}
body.menu-open .docs-sidebar .sidebar-content { width: 100%; }
body.menu-open { overflow: hidden; }
