/* Site layer for the Monsoon docs. Pages are styled with Monsoon utilities
   and components from monsoon.min.css; this file holds the site chrome
   (top bar, side navigation, search), editor frames for highlighted code and
   the landing page demos. Colors come from Monsoon tokens, so everything
   follows --seed and the light and dark schemes. Editor colors use
   light-dark(), which follows the color-scheme Monsoon sets on the root and
   on any .dark or .light section. Class names here never reuse a Monsoon
   class name. */

:root {
  --seed: #3b5bdb;
  --font-mono: "Cascadia Code", "JetBrains Mono", "Fira Code", "SF Mono", Menlo, Consolas, ui-monospace, monospace;
  --line: color-mix(in oklab, var(--border) 75%, transparent);
  --hatch: repeating-linear-gradient(-45deg, color-mix(in oklab, var(--border) 55%, transparent) 0 1px, transparent 1px 7px);
  --dots: radial-gradient(color-mix(in oklab, var(--muted-foreground) 26%, transparent) 1px, transparent 1.3px);
  --top: 60px;
  --ed-bg: light-dark(#ffffff, #1e1e1e);
  --ed-bar: light-dark(#f3f3f3, #252526);
  --ed-tab-bg: light-dark(#ffffff, #1e1e1e);
  --ed-tab-inactive: light-dark(#ececec, #2d2d2d);
  --ed-text: light-dark(#333333, #e8e8e8);
  --ed-muted: light-dark(#6f6f6f, #9a9a9a);
  --ed-border: light-dark(#e5e5e5, #2b2b2b);
  --ed-gutter: light-dark(#237893, #858585);
  --ed-status: #007acc;
  --ed-btn: light-dark(#ffffff, #3c3c3c);
  --ed-btn-border: light-dark(#d4d4d4, #3c3c3c);
  --t-ok: light-dark(#107c10, #23d18b);
  --t-dim: light-dark(#6f6f6f, #8b8b8b);
  --c-tag: light-dark(#800000, #569cd6);
  --c-attr: light-dark(#e50000, #9cdcfe);
  --c-str: light-dark(#0000ff, #ce9178);
  --c-pun: light-dark(#800000, #808080);
  --c-com: light-dark(#008000, #6a9955);
  --c-sel: light-dark(#800000, #d7ba7d);
  --c-prop: light-dark(#e50000, #9cdcfe);
  --c-val: light-dark(#0451a5, #ce9178);
  --c-at: light-dark(#af00db, #c586c0);
  scroll-padding-top: calc(var(--top) + 24px);
}

/* The site paints its own dark scheme in indigo night. */
:root[data-theme=dark] { --background: #11122a; --surface: #17183a; --surface-2: #141533; --surface-3: #1f2147; --muted: #1c1d42; --border: #2a2c5c; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light], .light) { --background: #11122a; --surface: #17183a; --surface-2: #141533; --surface-3: #1f2147; --muted: #1c1d42; --border: #2a2c5c; }
}

[v-cloak] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { text-rendering: optimizeLegibility; min-height: 100vh; }
::selection { background: color-mix(in oklab, var(--primary) 30%, transparent); }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
kbd { font: 500 11px/1 var(--font-mono); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; padding: 3px 5px; background: var(--surface); color: var(--muted-foreground); }
.stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; }

/* Art and mascot images swap with the scheme. */
.art { display: block; }
.art img { display: block; width: 100%; height: auto; }
.art-dark { display: none !important; }
:root[data-theme=dark] .art-dark { display: block !important; }
:root[data-theme=dark] .art-light { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light], .light) .art-dark { display: block !important; }
  :root:not([data-theme=light], .light) .art-light { display: none !important; }
}
.art-missing { color: var(--primary); padding: 10%; }
.art-missing svg { width: 100%; height: 100%; }

/* ---------- Top bar ---------- */

.topbar { position: sticky; top: 0; z-index: 50; height: var(--top); border-bottom: 1px solid var(--line); background: color-mix(in oklab, var(--background) 82%, transparent); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); }
.topbar-in { height: 100%; display: flex; align-items: center; gap: 10px; padding-inline: 12px; max-width: 1600px; margin-inline: auto; }
@media (min-width: 640px) { .topbar-in { padding-inline: 24px; } }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -0.02em; color: var(--foreground); text-decoration: none; }
.ver-badge { display: none; font: 500 11.5px/1 var(--font-mono); color: var(--muted-foreground); border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; text-decoration: none; }
.ver-badge:hover { color: var(--foreground); border-color: var(--border); }
@media (min-width: 480px) { .ver-badge { display: inline-block; } }
.top-nav { display: none; align-items: center; gap: 2px; margin-left: 12px; }
@media (min-width: 1024px) { .top-nav { display: flex; } }
.top-link { padding: 7px 11px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--muted-foreground); text-decoration: none; transition: color .15s, background-color .15s; }
.top-link:hover, .top-link.is-active { color: var(--foreground); background: var(--muted); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--muted-foreground); background: transparent; border: 0; cursor: pointer; transition: color .15s, background-color .15s; flex: none; }
.icon-btn:hover { color: var(--foreground); background: var(--muted); }
.nav-toggle { margin-left: -6px; }
@media (min-width: 1024px) { .nav-toggle { display: none; } }
.search-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted-foreground); font-size: 14px; cursor: pointer; transition: border-color .15s, color .15s; }
.search-btn:hover { border-color: var(--border); color: var(--foreground); }
.search-btn-label, .search-btn .kbd-group { display: none; }
@media (min-width: 768px) { .search-btn { min-width: 220px; padding: 0 8px 0 10px; } .search-btn-label { display: inline; } .search-btn .kbd-group { display: inline-flex; margin-left: auto; } }
.kbd-group { display: inline-flex; gap: 3px; }
.gh-btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 9px; border-radius: 10px; color: var(--muted-foreground); text-decoration: none; font-size: 13px; font-weight: 600; transition: color .15s, background-color .15s; }
.gh-btn:hover { color: var(--foreground); background: var(--muted); }
.gh-stars { display: none; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line); font: 600 12px/1.4 var(--font-mono); }
.gh-star { color: #f5a524; display: inline-flex; }
@media (min-width: 640px) { .gh-stars { display: inline-flex; } }
.theme-btn .ti { display: none; }
:root:not([data-theme]) .theme-btn .ti-system, :root[data-theme=light] .theme-btn .ti-light, :root[data-theme=dark] .theme-btn .ti-dark { display: inline-grid; }

/* ---------- Side navigation and docs layout ---------- */

.docs-layout { display: block; }
@media (min-width: 1024px) { .docs-layout { display: grid; grid-template-columns: 284px minmax(0, 1fr); } }
.site-nav { position: fixed; z-index: 70; inset: 0 auto 0 0; width: min(320px, 86vw); background: var(--background); border-right: 1px solid var(--line); transform: translateX(-102%); transition: transform .25s ease, visibility .25s; display: flex; flex-direction: column; visibility: hidden; }
.site-nav.is-open { transform: none; visibility: visible; box-shadow: 0 0 60px rgb(0 0 0 / .35); }
.site-nav-head { display: flex; align-items: center; justify-content: space-between; height: var(--top); padding-inline: 16px; border-bottom: 1px solid var(--line); flex: none; }
.site-nav-scroll { overflow-y: auto; overscroll-behavior: contain; padding: 14px 12px 40px; flex: 1; scrollbar-width: thin; }
.scrim { position: fixed; inset: 0; z-index: 65; background: rgb(8 9 24 / .55); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.is-open { opacity: 1; pointer-events: auto; }
@media (min-width: 1024px) {
  .layout-docs .site-nav { position: sticky; top: var(--top); height: calc(100vh - var(--top)); width: auto; transform: none; visibility: visible; z-index: 1; background: transparent; box-shadow: none; }
  .layout-docs .site-nav-head, .layout-docs .side-top, .layout-docs .scrim { display: none; }
}
.side-top { list-style: none; margin: 0 0 12px; padding: 0 0 12px; border-bottom: 1px solid var(--line); }
.side-group { margin-bottom: 4px; }
.side-group > summary { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; cursor: pointer; list-style: none; font-size: 13.5px; font-weight: 650; color: var(--foreground); user-select: none; }
.side-group > summary::-webkit-details-marker { display: none; }
.side-group > summary:hover { background: var(--muted); }
.side-ic { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: color-mix(in oklab, var(--primary) 12%, transparent); color: var(--primary); }
.side-label { flex: 1; }
.side-count { font: 500 11px/1 var(--font-mono); color: var(--muted-foreground); }
.side-chev { display: inline-flex; color: var(--muted-foreground); transition: transform .15s; }
.side-group[open] > summary .side-chev { transform: rotate(90deg); }
.side-group ul { list-style: none; margin: 2px 0 6px 19px; padding: 0 0 0 12px; border-left: 1px solid var(--line); }
.side-group.is-sub { margin: 2px 0; }
.side-group.is-sub > summary { font-size: 13px; font-weight: 600; color: var(--muted-foreground); padding: 5px 8px; }
.side-group.is-sub ul { margin-left: 10px; }
.side-link { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 10px; border-radius: 7px; font-size: 13.5px; color: var(--muted-foreground); text-decoration: none; transition: color .12s, background-color .12s; }
.side-link:hover { color: var(--foreground); background: var(--muted); }
.side-link.is-active { color: var(--primary); background: color-mix(in oklab, var(--primary) 11%, transparent); font-weight: 600; }
.side-link.is-active::before { content: ""; position: absolute; left: -13px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--primary); }
.side-link.is-current { color: var(--foreground); font-weight: 600; }
.side-badge { font: 500 10.5px/1 var(--font-mono); color: var(--muted-foreground); opacity: .8; }

.docs-main { min-width: 0; }
.docs-main:focus, main:focus { outline: none; }
.docs-grid { max-width: 1200px; margin-inline: auto; padding: 28px 16px 64px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
@media (min-width: 640px) { .docs-grid { padding: 36px 32px 72px; } }
@media (min-width: 1280px) { .docs-grid { grid-template-columns: minmax(0, 1fr) 224px; } }
.docs-article { min-width: 0; max-width: 820px; }
.docs-aside { display: none; }
@media (min-width: 1280px) { .docs-aside { display: block; position: sticky; top: calc(var(--top) + 28px); align-self: start; max-height: calc(100vh - var(--top) - 48px); overflow-y: auto; scrollbar-width: thin; } }
.doc-toc { font-size: 13px; }
.doc-toc-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted-foreground); margin-bottom: 10px; }
.doc-toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.doc-toc li a { display: block; padding: 4px 0 4px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted-foreground); text-decoration: none; line-height: 1.4; transition: color .15s, border-color .15s; }
.doc-toc li.toc-sub a { padding-left: 26px; font-size: 12.5px; }
.doc-toc li a:hover { color: var(--foreground); }
.doc-toc li a.is-active, .doc-toc li a[aria-current] { color: var(--primary); border-left-color: var(--primary); font-weight: 600; }
.toc-top { display: inline-block; margin-top: 14px; text-decoration: none; font-size: 12.5px; color: var(--muted-foreground); }

.doc-head { padding-bottom: 28px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.doc-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--muted-foreground); }
.crumbs li + li::before { content: "/"; margin-inline: 8px; opacity: .55; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--foreground); }
.crumbs [aria-current] { color: var(--foreground); font-weight: 500; }
.copy-page { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted-foreground); font-size: 12.5px; font-weight: 500; cursor: pointer; }
.copy-page:hover { color: var(--foreground); border-color: var(--border); }
.copy-page.is-done { color: var(--success); border-color: var(--success); }
.kicker { margin-top: 22px; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--primary); }
.doc-title { margin-top: 8px; font-size: clamp(2rem, 1.4rem + 2.2vw, 2.85rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; text-wrap: balance; }
.doc-lead { margin-top: 14px; font-size: 1.13rem; line-height: 1.7; color: var(--muted-foreground); text-wrap: pretty; max-width: 70ch; }
.doc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 16px; font-size: 13px; color: var(--muted-foreground); }
.doc-meta span { display: inline-flex; align-items: center; gap: 6px; }
.doc-meta a { color: var(--foreground); }
.pill { border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; background: var(--surface); color: var(--foreground); font-weight: 500; }

.doc-body { font-size: 16px; line-height: 1.75; }
.doc-body > * + *, .doc-section > * + *, .tabs-panel > * + * { margin-top: 1.1rem; }
.doc-section { margin-top: 2.6rem; }
.doc-h2 { font-size: 1.55rem; font-weight: 750; letter-spacing: -0.02em; line-height: 1.25; scroll-margin-top: calc(var(--top) + 24px); position: relative; }
.doc-h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; margin-top: 1.8rem; scroll-margin-top: calc(var(--top) + 24px); position: relative; }
.anchor { position: absolute; left: -1.1em; color: var(--muted-foreground); opacity: 0; text-decoration: none; font-weight: 400; transition: opacity .15s; }
.doc-h2:hover .anchor, .doc-h3:hover .anchor { opacity: .7; }
.h-count { font: 500 .8rem/1 var(--font-mono); color: var(--muted-foreground); vertical-align: middle; }
.doc-body p { color: color-mix(in oklab, var(--foreground) 88%, var(--muted-foreground)); }
.doc-body :where(p, li, td) a:not([class]) { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.doc-body :where(p, li, td) a:not([class]):hover { text-decoration-thickness: 2px; }
:where(.doc-body, .doc-lead, .sec-lead, .bento-desc, .page-lead, .hero-copy, .faq-a) :where(p, li, td, h3, span, dd) > code,
:where(.doc-lead, .sec-lead, .bento-desc, .page-lead) > code { font-family: var(--font-mono); font-size: .86em; padding: .12em .38em; border-radius: .35rem; background: var(--muted); border: 1px solid var(--line); overflow-wrap: break-word; color: var(--foreground); }
.doc-list { list-style: disc; padding-left: 1.4rem; }
.doc-ol { list-style: decimal; padding-left: 1.5rem; }
.doc-list li + li, .doc-ol li + li { margin-top: .4rem; }
.doc-list li::marker { color: var(--primary); }
.note-box { border: 1px solid color-mix(in oklab, var(--primary) 30%, var(--line)); border-left: 4px solid var(--primary); border-radius: 12px; padding: 14px 18px; background: color-mix(in oklab, var(--primary) 6%, var(--background)); }
.note-warn { border-color: color-mix(in oklab, var(--warning) 45%, var(--line)); border-left-color: var(--warning); background: color-mix(in oklab, var(--warning) 9%, var(--background)); }
.note-box p { margin: 0; }
.tbl-wrap { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.doc-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.55; }
.doc-table th { text-align: left; font-weight: 650; background: var(--surface-2); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.doc-table td { padding: 9px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.doc-table tr:first-child td { border-top: 0; }
.doc-foot { margin-top: 56px; }
.prev-next { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.pn-card { display: flex; flex-direction: column; gap: 3px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--foreground); background: var(--surface); transition: border-color .15s, transform .15s; min-width: 0; }
.pn-card:hover { border-color: var(--primary); transform: translateY(-1px); }
.pn-card.is-next { text-align: right; align-items: flex-end; grid-column: 2; }
.pn-dir { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted-foreground); }
.pn-title { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pn-sec { font-size: 12px; color: var(--muted-foreground); }
.doc-edit { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; font-size: 13px; color: var(--muted-foreground); }
.doc-edit a { color: inherit; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.related-card, .guide-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--foreground); background: var(--surface); transition: border-color .15s, box-shadow .15s, transform .15s; }
.related-card:hover, .guide-card:hover { border-color: color-mix(in oklab, var(--primary) 55%, var(--line)); box-shadow: 0 10px 30px -14px color-mix(in oklab, var(--primary) 45%, transparent); transform: translateY(-2px); }
.related-kicker { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--primary); }
.related-title, .guide-title { font-weight: 650; line-height: 1.35; }
.related-desc { font-size: 13.5px; color: var(--muted-foreground); line-height: 1.55; }
.try-card { margin-top: 3rem; border-radius: 18px; padding: 24px; color: #fff; background: radial-gradient(120% 140% at 0% 0%, #3b5bdb, #6d4ee6 55%, #b13c8e); }
.try-title { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; color: #fff !important; }
.try-card p { color: rgb(255 255 255 / .88) !important; margin: 0; }
.try-card .window { margin-top: 16px; }

/* FAQ with native details */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 2px; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq-q { font-size: 1rem; font-weight: 650; line-height: 1.45; margin: 0; }
.faq-icon { position: relative; flex: none; width: 14px; height: 14px; }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 2px; border-radius: 2px; background: var(--muted-foreground); transition: transform .2s; }
.faq-icon::after { transform: rotate(90deg); }
.faq details[open] .faq-icon::after { transform: rotate(0); }
.faq-a { padding: 0 2px 18px; color: var(--muted-foreground); line-height: 1.7; }

/* Segmented controls and content tabs */
.seg { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 10px; background: var(--muted); border: 1px solid var(--line); flex: none; }
.seg button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 0; border-radius: 7px; background: transparent; color: var(--muted-foreground); font-size: 13px; font-weight: 500; line-height: 1.2; cursor: pointer; transition: color .15s, background-color .15s; white-space: nowrap; }
.seg button:hover { color: var(--foreground); }
.seg button[aria-pressed=true], .seg button[aria-selected=true] { background: var(--background); color: var(--foreground); box-shadow: 0 1px 2px rgb(0 0 0 / .12), 0 0 0 1px var(--line); }
.seg-sm button { padding: 3px 8px; font-size: 12px; }
.seg-icons button { padding: 5px 7px; }
.bar-seg { align-self: center; margin: 0 8px 0 auto; }
.tabs-block { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.tabs-list { display: flex; gap: 2px; padding: 0 8px; border-bottom: 1px solid var(--line); background: var(--surface-2); overflow-x: auto; }
.tabs-btn { position: relative; padding: 11px 14px; border: 0; background: none; font-size: 14px; font-weight: 600; line-height: 1; color: var(--muted-foreground); cursor: pointer; }
.tabs-btn[aria-selected=true] { color: var(--foreground); }
.tabs-btn[aria-selected=true]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--primary); }
.tabs-panel { padding: 16px; }
.tabs-panel > :first-child { margin-top: 0; }

/* Live demo boxes in content */
.demo-box { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.demo-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 8px 7px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.demo-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-foreground); }
.demo-stage { padding: 24px; background-color: var(--background); background-image: var(--dots); background-size: 16px 16px; color: var(--foreground); line-height: 1.5; font-size: 1rem; }
.demo-stage p { color: inherit; }

/* ---------- VS Code style windows ---------- */

.window { border: 1px solid var(--ed-border); border-radius: 14px; overflow: hidden; background: var(--ed-bg); min-width: 0; box-shadow: 0 1px 2px rgb(0 0 0 / .04), 0 16px 40px -18px rgb(0 0 0 / .3); }
.window-bar { display: flex; align-items: stretch; min-height: 40px; background: var(--ed-bar); border-bottom: 1px solid var(--ed-border); font-size: 13px; line-height: 1; }
.dots { display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; flex: none; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }
.ed-tab { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 0 15px; color: var(--ed-muted); background: var(--ed-tab-inactive); border: 0; border-right: 1px solid var(--ed-border); font: inherit; font-size: 13px; white-space: nowrap; min-width: 0; flex: none; }
.ed-tab span { overflow: hidden; text-overflow: ellipsis; }
.ed-tab.active, .ed-tab[aria-selected=true] { background: var(--ed-tab-bg); color: var(--ed-text); margin-bottom: -1px; }
.ed-tab.active::before, .ed-tab[aria-selected=true]::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--ed-status); }
.dots + .ed-tab, .dots + .ed-tabs { border-left: 1px solid var(--ed-border); }
button.ed-tab { cursor: pointer; transition: color .15s, background-color .15s; }
button.ed-tab:hover { color: var(--ed-text); }
.tab-note { font-size: 10.5px; padding: 2px 6px; border-radius: 4px; background: color-mix(in oklab, var(--ed-status) 18%, transparent); color: var(--ed-text); }
.ed-tabs { display: flex; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.ed-tabs::-webkit-scrollbar { display: none; }
.file-icon { width: 16px; height: 16px; flex: none; }
.panel-tab { display: inline-flex; align-items: center; padding: 0 12px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ed-text); box-shadow: inset 0 -1px 0 var(--ed-text); }
.panel-shell { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 0 8px; color: var(--ed-muted); font-size: 12px; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.code-copy { position: relative; align-self: center; display: inline-flex; align-items: center; gap: 6px; margin: 0 8px 0 auto; border: 1px solid var(--ed-btn-border); background: var(--ed-btn); color: var(--ed-text); border-radius: 6px; padding: 5px 9px; font-size: 12px; font-weight: 500; line-height: 1; cursor: pointer; transition: border-color .15s; flex: none; }
.panel-shell + .code-copy { margin-left: 4px; }
.code-copy:hover, .code-copy.is-copied { border-color: var(--ed-status); }
.code-copy.is-copied { color: var(--t-ok); }
.window pre.shiki { margin: 0; padding: 16px 20px 18px 0; overflow-x: auto; font: 13.5px/1.7 var(--font-mono); font-variant-ligatures: none; tab-size: 2; background: var(--ed-bg) !important; }
.shiki, .shiki span { color: light-dark(var(--shiki-light), var(--shiki-dark)); }
.window pre.shiki:focus-visible { outline-offset: -3px; }
.window pre.shiki code { display: block; min-width: max-content; counter-reset: line; }
.window pre.numbered .line::before { counter-increment: line; content: counter(line); display: inline-block; width: 3.4em; padding-right: 1.5em; text-align: right; color: var(--ed-gutter); user-select: none; }
.window pre.term { padding: 14px 20px 16px; }
.window pre.term .line.cmd::before { content: "$ "; color: var(--t-ok); font-weight: 700; user-select: none; }
.term-out { margin: 0; padding: 0 20px 18px; overflow-x: auto; font: 13px/1.65 var(--font-mono); color: var(--ed-text); background: var(--ed-bg); }
.term-out code { display: block; min-width: max-content; white-space: pre; }
.t-ok { color: var(--t-ok); }
.t-dim { color: var(--t-dim); }
@media (max-width: 640px) {
  .window pre.shiki { font-size: 12.5px; }
  .window pre.numbered .line::before { width: 2.6em; padding-right: 1.1em; }
  .ed-tab { padding: 0 11px; }
  .code-copy span { display: none; }
}
.css-out { font: 12.5px/1.6 var(--font-mono); white-space: pre; overflow-x: auto; margin: 0; }

/* ---------- Component previews ---------- */

.pv { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); }
.pv-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.pv-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pv-size { font: 500 12px/1 var(--font-mono); color: var(--muted-foreground); min-width: 4.5ch; text-align: right; }
.pv-open { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--background); color: var(--muted-foreground); cursor: pointer; }
.pv-open:hover { color: var(--foreground); }
.pv-stage { padding: 18px 28px 18px 18px; background-color: var(--surface-2); background-image: var(--dots); background-size: 16px 16px; overflow: hidden; }
.pv-resize { position: relative; width: 100%; max-width: 100%; border-radius: 12px; background: var(--background); transition: width .25s ease; box-shadow: 0 0 0 1px var(--line), 0 10px 30px -18px rgb(0 0 0 / .35); }
.pv-resize.is-drag { transition: none; }
.pv-resize.is-drag iframe { pointer-events: none; }
.pv-frame { display: block; width: 100%; border: 0; border-radius: 12px; background: transparent; }
.pv-handle { position: absolute; top: 50%; right: -18px; width: 12px; height: 56px; margin-top: -28px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); cursor: ew-resize; display: grid; place-items: center; touch-action: none; transition: background-color .15s, border-color .15s; }
.pv-handle span { width: 4px; height: 22px; border-inline: 1px solid var(--muted-foreground); opacity: .7; }
.pv-handle:hover, .pv-handle:focus-visible, .is-drag .pv-handle { background: var(--primary); border-color: var(--primary); }
.pv-handle:hover span, .pv-handle:focus-visible span, .is-drag .pv-handle span { border-color: var(--primary-foreground); opacity: 1; }
.pv-code { border: 0; border-radius: 0; box-shadow: none; }
.pv-code pre.shiki { max-height: 30rem; }

/* Classes table on component pages */
.cls-table td:first-child { white-space: nowrap; }
.cls-copy { border: 0; background: none; padding: 0; cursor: pointer; }
.cls-copy code { font: 600 13px/1.4 var(--font-mono); color: var(--primary); }
.cls-copy.is-copied code { color: var(--success); }
.role { display: inline-block; font-size: 11.5px; font-weight: 650; padding: 2px 8px; border-radius: 999px; background: var(--muted); color: var(--muted-foreground); }
.role-base { background: color-mix(in oklab, var(--primary) 16%, transparent); color: var(--primary); }
.role-tone { background: color-mix(in oklab, var(--accent) 22%, transparent); color: var(--foreground); }
.role-size { background: color-mix(in oklab, var(--info) 16%, transparent); color: var(--foreground); }
.role-state { background: color-mix(in oklab, var(--warning) 22%, transparent); color: var(--foreground); }
.cls-desc { color: var(--muted-foreground); }
.cls-css { margin-top: 6px; }
.cls-css summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--muted-foreground); }
.cls-css .css-out { margin-top: 6px; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); color: var(--foreground); max-height: 18rem; overflow: auto; }
.a11y-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.a11y-list li { position: relative; padding: 12px 14px 12px 42px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); line-height: 1.6; font-size: 15px; }
.a11y-list li::before { content: ""; position: absolute; left: 14px; top: 15px; width: 16px; height: 16px; border-radius: 50%; background: color-mix(in oklab, var(--success) 85%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center/10px no-repeat; }

/* Components index */
.comp-filter { position: sticky; top: calc(var(--top) + 8px); z-index: 5; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in oklab, var(--background) 88%, transparent); backdrop-filter: blur(10px); }
.filter-input { display: flex; align-items: center; gap: 8px; flex: 1 1 260px; min-width: 0; padding: 0 12px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted-foreground); }
.filter-input:focus-within { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 22%, transparent); }
.filter-input input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--foreground); font-size: 14.5px; outline: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 500; color: var(--muted-foreground); cursor: pointer; }
.fchip[aria-pressed=true] { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.comp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-top: 1rem; }
.comp-card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); transition: border-color .15s, box-shadow .2s, transform .2s; }
.comp-card:hover { border-color: color-mix(in oklab, var(--primary) 50%, var(--line)); transform: translateY(-2px); box-shadow: 0 14px 34px -18px color-mix(in oklab, var(--primary) 55%, transparent); }
.thumb { position: relative; height: 150px; overflow: hidden; border-bottom: 1px solid var(--line); background-color: var(--background); background-image: var(--dots); background-size: 14px 14px; }
.thumb-in { position: absolute; top: 0; left: 0; width: 143%; padding: 20px; transform: scale(.7); transform-origin: 0 0; pointer-events: none; user-select: none; }
.thumb::after { content: ""; position: absolute; inset: auto 0 0; height: 36px; background: linear-gradient(transparent, var(--background)); }
.comp-meta { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.comp-name { font-weight: 650; color: var(--foreground); text-decoration: none; }
.comp-desc { font-size: 13px; line-height: 1.5; color: var(--muted-foreground); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.comp-count { font: 500 11.5px/1 var(--font-mono); color: var(--muted-foreground); margin-top: 4px; }

/* Utility pages */
.util-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.util-stats > div { padding: 14px 16px; display: flex; flex-direction: column; }
.util-stats > div + div { border-left: 1px solid var(--line); }
.stat-n { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-l { font-size: 12.5px; color: var(--muted-foreground); }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; position: sticky; top: calc(var(--top) + 8px); z-index: 5; padding: 8px; border-radius: 14px; background: color-mix(in oklab, var(--background) 88%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--line); }
.btn-soft-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--primary); text-decoration: none; padding: 0 6px; }
.util-vars { font-size: 13px; color: var(--muted-foreground); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.vchip { display: inline-block; font: 500 11.5px/1.5 var(--font-mono); padding: 0 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); color: var(--foreground); margin: 1px; }
.util-table .doc-table td { padding: 6px 14px; }
.util-table .cls-name code { font: 600 13px/1.5 var(--font-mono); color: var(--primary); }
.cls-css-cell code { font: 12.5px/1.55 var(--font-mono); color: var(--muted-foreground); }
.cls-var { font: 11.5px/1.5 var(--font-mono); color: var(--muted-foreground); }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 8px; border: 1px solid var(--line); }
.util-sec[hidden], .util-table tr[hidden] { display: none; }

/* Class reference */
.ref-bar { display: flex; flex-wrap: wrap; gap: 10px; position: sticky; top: calc(var(--top) + 8px); z-index: 5; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in oklab, var(--background) 88%, transparent); backdrop-filter: blur(10px); }
.ref-select { height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--foreground); font-size: 14px; }
.ref-count { font-size: 13.5px; color: var(--muted-foreground); }
.ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.ref-card { min-width: 0; border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--surface); }
.ref-card-head { display: flex; justify-content: space-between; gap: 10px; }
.ref-name { font: 650 14.5px/1.4 var(--font-mono); word-break: break-all; }
.ref-cat { font-size: 12px; color: var(--muted-foreground); text-transform: capitalize; }
.ref-copy { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--background); color: var(--muted-foreground); cursor: pointer; }
.ref-copy:hover { color: var(--foreground); }
.ref-css { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.ref-vars { margin-top: 10px; font-size: 12px; }
.btn-outline-site, .btn-mini { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--foreground); font-weight: 600; text-decoration: none; cursor: pointer; transition: border-color .15s, background-color .15s; }
.btn-outline-site { padding: 10px 18px; }
.btn-mini { padding: 6px 11px; font-size: 13px; }
.btn-outline-site:hover, .btn-mini:hover { border-color: var(--primary); }
.btn-mini-ghost { background: transparent; }

/* ---------- Search dialog ---------- */

.search-dlg { width: calc(100% - 24px); max-width: 660px; margin: 9vh auto auto; padding: 0; border: 1px solid var(--border); border-radius: 18px; background: var(--background); color: var(--foreground); box-shadow: 0 30px 80px -20px rgb(0 0 0 / .55), 0 0 0 1px var(--line); overflow: hidden; }
.search-dlg::backdrop { background: rgb(9 10 28 / .5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.search-dlg[open] { animation: dlg-in .16s ease-out; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.search-panel { display: flex; flex-direction: column; max-height: min(78vh, 640px); }
.sd-field { display: flex; align-items: center; gap: 12px; padding: 0 14px 0 18px; height: 60px; border-bottom: 1px solid var(--line); color: var(--muted-foreground); flex: none; }
.sd-field input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--foreground); font-size: 17px; outline: none; }
.sd-field input::placeholder { color: var(--muted-foreground); }
.esc-key { font: 600 11px/1 var(--font-mono); padding: 5px 7px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; background: var(--surface); color: var(--muted-foreground); cursor: pointer; }
.search-body { overflow-y: auto; overscroll-behavior: contain; padding: 6px 10px 12px; flex: 1; min-height: 120px; }
.search-group { display: flex; align-items: center; justify-content: space-between; padding: 12px 8px 6px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted-foreground); }
.search-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 11px; color: var(--foreground); text-decoration: none; scroll-margin: 8px; }
.search-item:hover, .search-item.is-sel { background: var(--primary); color: var(--primary-foreground); }
.si-icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--muted-foreground); }
.search-item.is-sel .si-icon, .search-item:hover .si-icon { background: color-mix(in oklab, var(--primary-foreground) 16%, transparent); border-color: transparent; color: inherit; }
.si-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.si-title { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.si-sub { font-size: 12.5px; color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-item.is-sel .si-sub, .search-item:hover .si-sub { color: inherit; opacity: .85; }
.si-title mark { background: transparent; color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.search-item.is-sel mark, .search-item:hover mark { color: inherit; }
.si-enter { opacity: 0; font-size: 15px; }
.search-item.is-sel .si-enter { opacity: .9; }
.search-empty { padding: 40px 16px; text-align: center; color: var(--muted-foreground); }
.link-btn { border: 0; background: none; padding: 0; color: var(--primary); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.search-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted-foreground); background: var(--surface-2); flex: none; }
.search-foot span { display: inline-flex; align-items: center; gap: 4px; }
.search-foot-brand { margin-left: auto; font-weight: 600; }
@media (max-width: 520px) { .search-foot-brand { display: none !important; } .search-dlg { margin-top: 12px; } }

/* ---------- Footer ---------- */

.site-foot { border-top: 1px solid var(--line); background: var(--surface-2); }
.foot-in { max-width: 1216px; margin-inline: auto; padding: 56px 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 24px; }
@media (min-width: 640px) { .foot-in { padding-inline: 32px; } }
@media (min-width: 1024px) { .foot-in { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.foot-brand { grid-column: span 2; display: flex; flex-direction: column; gap: 14px; }
.foot-title { font-size: 13px; font-weight: 700; }
.foot-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 9px; font-size: 13.5px; }
.foot-link { color: var(--muted-foreground); text-decoration: none; }
.foot-link:hover { color: var(--foreground); }
.mascot-foot { width: 84px; height: auto; }
.foot-bottom { border-top: 1px solid var(--line); }
.foot-bottom-in { max-width: 1216px; margin-inline: auto; padding: 20px 16px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: 13px; color: var(--muted-foreground); }
@media (min-width: 640px) { .foot-bottom-in { padding-inline: 32px; } }
.foot-bottom-in a { color: inherit; }

/* ---------- Landing ---------- */

.band { position: relative; border-bottom: 1px solid var(--line); background-image: var(--hatch); }
.frame { position: relative; max-width: 1216px; margin-inline: auto; padding: 64px 16px; background: var(--background); border-inline: 1px solid var(--line); }
@media (min-width: 640px) { .frame { padding: 88px 32px; } }
.band-stats .frame { padding-block: 0; }
.band-hero-sm .frame { padding-block: 56px 48px; }
.gutter-label { position: absolute; top: 88px; right: calc(100% + 18px); writing-mode: vertical-rl; transform: rotate(180deg); font: 600 11px/1 var(--font-mono); letter-spacing: .28em; color: var(--muted-foreground); white-space: nowrap; display: none; }
@media (min-width: 1320px) { .gutter-label { display: block; } }
.cap { margin: 0 0 10px; font: 500 11.5px/1 var(--font-mono); color: var(--muted-foreground); display: flex; align-items: center; gap: 8px; min-width: 0; }
.cap span { display: inline-block; padding: 4px 8px; border: 1px dashed color-mix(in oklab, var(--primary) 45%, var(--line)); border-radius: 6px; background: color-mix(in oklab, var(--primary) 5%, var(--background)); color: color-mix(in oklab, var(--primary) 70%, var(--foreground)); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cap::before { content: ""; width: 14px; height: 1px; flex: none; background: color-mix(in oklab, var(--primary) 45%, var(--line)); }
.cap-mini { font: 500 11px/1.4 var(--font-mono); color: var(--muted-foreground); }
.text-gradient { background-image: linear-gradient(100deg, #3b5bdb, #8b5cf6 45%, #f43f5e 75%, #f59e0b); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme=dark] .text-gradient { background-image: linear-gradient(100deg, #22d3ee, #8b9cff 30%, #b794ff 55%, #fb7185 85%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light], .light) .text-gradient { background-image: linear-gradient(100deg, #22d3ee, #8b9cff 30%, #b794ff 55%, #fb7185 85%); } }

.band-hero { overflow: hidden; }
.band-hero .frame { padding-block: 56px 72px; }
@media (min-width: 1024px) { .band-hero .frame { padding-block: 88px 104px; } }
.lp-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: center; }
@media (min-width: 1024px) { .lp-hero { grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); } }
.hero-bg { position: absolute; inset: -88px -32px -104px; pointer-events: none; background-image: linear-gradient(to right, color-mix(in oklab, var(--border) 45%, transparent) 1px, transparent 1px), linear-gradient(to bottom, color-mix(in oklab, var(--border) 45%, transparent) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse 70% 60% at 30% 30%, #000 25%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 70% 60% at 30% 30%, #000 25%, transparent 75%); }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(40rem 22rem at 15% 10%, color-mix(in oklab, #3b5bdb 22%, transparent), transparent 70%), radial-gradient(30rem 20rem at 85% 30%, color-mix(in oklab, #8b5cf6 18%, transparent), transparent 70%); }
.hero-copy { position: relative; min-width: 0; }
.hero-copy h1 { margin-bottom: 28px; line-height: 1.02; }
.hero-copy p:not(.cap) { margin-bottom: 32px; line-height: 1.65; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 30px; padding: 4px 12px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in oklab, var(--surface) 80%, transparent); font-size: 13px; color: var(--muted-foreground); text-decoration: none; max-width: 100%; }
.hero-badge:hover { color: var(--foreground); border-color: var(--border); }
.hero-badge-new { padding: 3px 9px; border-radius: 999px; background: var(--primary); color: var(--primary-foreground); font-weight: 700; font-size: 12px; flex: none; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-cta.is-center { justify-content: center; }
.cta-primary, .cta-secondary, .cta-search { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 20px; border-radius: 12px; font-weight: 650; font-size: 15px; text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .2s, background-color .15s, border-color .15s; }
.cta-primary { border: 0; background: var(--primary); color: var(--primary-foreground); box-shadow: 0 10px 30px -10px color-mix(in oklab, var(--primary) 70%, transparent), inset 0 1px 0 rgb(255 255 255 / .18); }
.cta-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 36px -10px color-mix(in oklab, var(--primary) 80%, transparent); }
.cta-secondary, .cta-search { border: 1px solid var(--border); background: var(--surface); color: var(--foreground); }
.cta-secondary:hover, .cta-search:hover { border-color: var(--primary); }
.cta-search { color: var(--muted-foreground); font-weight: 500; }
.cta-search .kbd-group { margin-left: 8px; }
.hero-install { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; padding: 5px 5px 5px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--ed-bg); }
.hero-install code { font: 500 13.5px/1 var(--font-mono); color: var(--ed-text); }
.hero-install .code-copy { margin: 0; }
.prompt { color: var(--t-ok); margin-right: 8px; font-weight: 700; }
.hero-art { position: relative; display: grid; place-items: center; }
.hero-art-glow { position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, color-mix(in oklab, #22d3ee 35%, transparent), color-mix(in oklab, #8b5cf6 25%, transparent) 50%, transparent 70%); filter: blur(30px); }
.mascot { position: relative; width: min(100%, 400px); height: auto; animation: bob 7s ease-in-out infinite; }
@keyframes bob { 50% { translate: 0 -12px; } }
@media (max-width: 1023px) { .hero-art { max-width: 280px; margin-inline: auto; } }

.lp-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
@media (min-width: 1024px) { .lp-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.lp-stats > div { padding: 26px 20px; border-top: 1px solid var(--line); min-width: 0; }
.lp-stats > div:nth-child(-n+2) { border-top: 0; }
.lp-stats > div:nth-child(2n) { border-left: 1px solid var(--line); }
@media (min-width: 1024px) { .lp-stats > div { border-top: 0; } .lp-stats > div + div { border-left: 1px solid var(--line); } }
.lp-stats dt { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted-foreground); }
.lp-stats dd { margin: 6px 0 0; font-size: clamp(1.8rem, 1.2rem + 2vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.lp-stats dd.stat-sub { margin-top: 4px; font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--muted-foreground); }

.sec-head { max-width: 760px; margin-bottom: 40px; }
.sec-art { width: 112px; margin-bottom: 14px; }
.sec-head .kicker { margin-top: 0; }
.sec-title { margin-top: 10px; font-size: clamp(2rem, 1.3rem + 2.6vw, 3.1rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; text-wrap: balance; }
.sec-lead { margin-top: 16px; font-size: 1.125rem; line-height: 1.65; color: var(--muted-foreground); text-wrap: pretty; }
.center-cta { margin-top: 32px; text-align: center; }

/* Live editor */
.live-grid { display: grid; gap: 16px; }
@media (min-width: 1024px) { .live-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.live-ed, .live-out { display: flex; flex-direction: column; }
.ed { position: relative; display: grid; overflow: auto; background: var(--ed-bg); min-height: 400px; max-height: 480px; flex: 1; scrollbar-width: thin; }
.ed-hl, .ed-ta { grid-area: 1 / 1; margin: 0; padding: 16px 18px 16px 52px; border: 0; font: 13.5px/1.7 var(--font-mono); font-variant-ligatures: none; tab-size: 2; white-space: pre; overflow: hidden; letter-spacing: 0; word-spacing: 0; }
.ed-hl { position: relative; color: var(--ed-text); pointer-events: none; counter-reset: ln; min-width: max-content; }
.ed-hl .ln::before { counter-increment: ln; content: counter(ln); position: absolute; left: 0; width: 36px; text-align: right; color: var(--ed-gutter); }
.ed-ta { resize: none; background: transparent; color: transparent; caret-color: var(--ed-text); outline: none; min-height: 100%; }
.ed-ta::selection { background: color-mix(in oklab, #264f78 55%, transparent); color: transparent; }
.ed:focus-within { box-shadow: inset 0 0 0 1px var(--ed-status); }
.h-tag { color: var(--c-tag); }
.h-attr { color: var(--c-attr); }
.h-str { color: var(--c-str); }
.h-pun { color: var(--c-pun); }
.h-com { color: var(--c-com); font-style: italic; }
.ed-status { display: flex; gap: 16px; padding: 4px 12px; background: var(--ed-status); color: #fff; font-size: 12px; line-height: 1.4; }
.ed-status :last-child { margin-left: auto; }
.live-frame { display: block; width: 100%; min-height: 440px; height: 100%; flex: 1; border: 0; background: var(--background); }

/* Responsive demo */
.resp-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.resp-width { font: 700 15px/1 var(--font-mono); font-variant-numeric: tabular-nums; min-width: 6ch; }
.resp-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bp-chip { font: 600 12px/1 var(--font-mono); padding: 6px 9px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted-foreground); background: var(--surface); transition: background-color .2s, color .2s, border-color .2s, box-shadow .2s; }
.bp-chip.is-c { border-style: dashed; }
.bp-chip.is-on { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); box-shadow: 0 6px 18px -8px var(--primary); }
.bp-chip.is-c.is-on { background: #0e7490; border-color: #0e7490; color: #fff; box-shadow: 0 6px 18px -8px #22d3ee; }
.bp-sep { width: 1px; height: 20px; background: var(--line); margin-inline: 4px; }
.resp-stage { position: relative; padding: 18px 30px 18px 18px; border: 1px solid var(--line); border-radius: 16px; background-color: var(--surface-2); background-image: var(--dots); background-size: 16px 16px; overflow: hidden; }
.resp-frame iframe { transform-origin: 0 0; }
.resp-code { margin-top: 16px; }
.resp-code pre.shiki { max-height: 26rem; }
.tk { border-radius: 4px; transition: background-color .2s, box-shadow .2s; }
.on-sm .tk-sm, .on-md .tk-md, .on-lg .tk-lg, .on-xl .tk-xl, .on-2xl .tk-2xl { background: color-mix(in oklab, #3b5bdb 30%, transparent); box-shadow: 0 0 0 1px color-mix(in oklab, #5c7cfa 80%, transparent); }
.on-csm .tk-csm, .on-cmd .tk-cmd, .on-clg .tk-clg, .on-cxl .tk-cxl, .on-cxs .tk-cxs { background: color-mix(in oklab, #22d3ee 28%, transparent); box-shadow: 0 0 0 1px color-mix(in oklab, #22d3ee 80%, transparent); }

/* How it works */
.hiw-body { display: grid; }
@media (min-width: 900px) { .hiw-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.hiw-src { padding: 18px 20px; min-width: 0; }
.hiw-code { margin: 0; font: 13.5px/1.7 var(--font-mono); color: var(--ed-text); white-space: pre-wrap; word-break: break-all; }
.hiw-line { display: block; margin: 2px 0 2px 16px; }
.hiw-input { width: 100%; padding: 8px 10px; border: 1px dashed var(--ed-status); border-radius: 8px; background: color-mix(in oklab, var(--ed-status) 8%, var(--ed-bg)); color: var(--c-str); font: 13.5px/1.5 var(--font-mono); outline: none; }
.hiw-input:focus { border-style: solid; box-shadow: 0 0 0 3px color-mix(in oklab, var(--ed-status) 25%, transparent); }
.hiw-result { margin-top: 18px; padding: 18px; border: 1px dashed var(--ed-border); border-radius: 12px; background: var(--background); color: var(--foreground); }
.hiw-label { font: 600 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ed-muted); margin-bottom: 12px; }
.hiw-help { margin-top: 10px; font-size: 12.5px; color: var(--ed-muted); }
.hiw-out { min-width: 0; padding: 18px 20px; border-top: 1px solid var(--ed-border); background: color-mix(in oklab, var(--ed-bar) 50%, var(--ed-bg)); }
@media (min-width: 900px) { .hiw-out { border-top: 0; border-left: 1px solid var(--ed-border); } }
.hiw-css { margin: 0; font: 12.8px/1.65 var(--font-mono); color: var(--ed-text); white-space: pre; overflow: auto; max-height: 420px; scrollbar-width: thin; }
.c-sel { color: var(--c-sel); }
.c-prop { color: var(--c-prop); }
.c-val { color: var(--c-val); }
.c-at { color: var(--c-at); }
.c-com { color: var(--c-com); font-style: italic; }
.c-pun { color: var(--ed-muted); }
.c-miss { color: #e5534b; }
.hiw-term { padding: 18px 20px; min-height: 260px; }
.term-anim { margin: 0; font: 13px/1.75 var(--font-mono); color: var(--ed-text); white-space: pre-wrap; }
.term-anim .tl { display: block; opacity: 0; }
.term-anim.is-run .tl { animation: tl-in .35s ease-out forwards; animation-delay: calc(var(--i) * .55s); }
@keyframes tl-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Bento */
.bento { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
@media (min-width: 768px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .bento { grid-template-columns: repeat(3, minmax(0, 1fr)); } .bento .span-2 { grid-column: span 2; } }
.bento-card { display: flex; flex-direction: column; min-width: 0; background: var(--background); }
.bento-demo { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 22px; min-height: 230px; background-image: var(--dots); background-size: 15px 15px; min-width: 0; }
.bento-demo .window { box-shadow: 0 10px 30px -18px rgb(0 0 0 / .4); }
.bento-demo .window pre.shiki { font-size: 12.5px; padding-block: 12px; }
.bento-text { display: flex; gap: 14px; align-items: flex-start; padding: 18px 22px 22px; border-top: 1px solid var(--line); }
.bento-art { width: 64px; flex: none; }
.bento-title { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.bento-desc { margin-top: 4px; font-size: 14px; line-height: 1.55; color: var(--muted-foreground); }
.split { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); --split: 50%; }
.split-layer { padding: 34px 18px 18px; }
.split-dark { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--split)); }
.split-line { position: absolute; top: 0; bottom: 0; left: var(--split); width: 2px; margin-left: -1px; background: var(--primary); pointer-events: none; }
.split-knob { position: absolute; top: 50%; left: 50%; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: var(--primary); color: var(--primary-foreground); box-shadow: 0 6px 18px -4px rgb(0 0 0 / .4), 0 0 0 4px color-mix(in oklab, var(--primary) 25%, transparent); }
.split-knob svg { width: 12px; height: 12px; }
.split-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.split:has(.split-range:focus-visible) { outline: 2px solid var(--ring); outline-offset: 3px; }
.split-tag { position: absolute; top: 8px; font: 600 10.5px/1 var(--font-mono); padding: 4px 6px; border-radius: 6px; pointer-events: none; }
.split-tag-l { left: 8px; background: #ffffff; color: #1e2240; border: 1px solid #d3d8f0; }
.split-tag-r { right: 8px; background: #1e2240; color: #e8eaff; }
.pal { overflow-x: auto; scrollbar-width: thin; }
.pal-grid { display: grid; grid-template-columns: 30px repeat(var(--cols), minmax(14px, 1fr)); gap: 3px; min-width: 480px; align-items: center; }
.pal-hue { writing-mode: vertical-rl; transform: rotate(180deg); justify-self: center; font: 500 9.5px/1 var(--font-mono); color: var(--muted-foreground); height: 52px; text-align: left; }
.pal-step { font: 500 9.5px/1 var(--font-mono); color: var(--muted-foreground); text-align: right; padding-right: 4px; }
.pal-sw { aspect-ratio: 1; border-radius: 3px; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .06); transition: transform .12s; }
.pal-sw:hover { transform: scale(1.35); position: relative; z-index: 1; }
.mosaic-a, .mosaic-b, .mosaic-c, .mosaic-d { position: relative; overflow: hidden; }
.mosaic-a::after, .mosaic-b::after, .mosaic-c::after, .mosaic-d::after { content: ""; position: absolute; inset: 0; }
.mosaic-a::after { background: radial-gradient(circle at 30% 70%, rgb(255 255 255 / .35) 0 18%, transparent 19%), radial-gradient(rgb(255 255 255 / .25) 1px, transparent 1.5px) 0 0 / 10px 10px; }
.mosaic-b::after { background: repeating-linear-gradient(45deg, rgb(255 255 255 / .18) 0 2px, transparent 2px 9px); }
.mosaic-c::after { background: radial-gradient(circle at 50% 120%, rgb(255 255 255 / .4) 0 40%, transparent 41%); }
.mosaic-d::after { background: linear-gradient(transparent 60%, rgb(255 255 255 / .12) 60%) 0 0 / 100% 12px; }
.ease-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 96px; gap: 12px; align-items: center; }
.ease-curve { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); padding: 2px; }
.ease-curve path { fill: none; stroke: var(--primary); stroke-width: 2; stroke-linecap: round; }
.ease-track { position: relative; height: 24px; border-radius: 7px; background: var(--muted); border: 1px solid var(--line); }
.ease-sq { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 5px; background: linear-gradient(135deg, #3b5bdb, #8b5cf6); animation: ease-slide 2.4s infinite alternate; }
.sq-out { background: linear-gradient(135deg, #22d3ee, #3b5bdb); }
.sq-in-out { background: linear-gradient(135deg, #8b5cf6, #f43f5e); }
.sq-in { background: linear-gradient(135deg, #f43f5e, #f59e0b); }
@keyframes ease-slide { to { left: calc(100% - 19px); } }
.tilt-stage { perspective: 900px; padding: 16px 0; }
.tilt { transform-style: preserve-3d; }
.group:hover .tilt { transform: rotateX(10deg) rotateY(-14deg); }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--swatch); cursor: pointer; box-shadow: 0 0 0 2px var(--background), 0 0 0 3px transparent; transition: transform .15s, box-shadow .15s; }
.swatch:hover { transform: scale(1.1); }
.swatch[aria-pressed=true] { box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--foreground); }
.swatch-lg { width: 34px; height: 34px; }
.swatch-input { inline-size: 40px; block-size: 40px; padding: 0; border: 0; background: none; cursor: pointer; }
.swatch-input-lg { inline-size: 48px; block-size: 48px; }
.swatch-input::-webkit-color-swatch-wrapper { padding: 0; }
.swatch-input::-webkit-color-swatch { border: 1px solid var(--border); border-radius: 12px; }
.swatch-input::-moz-color-swatch { border: 1px solid var(--border); border-radius: 12px; }

/* Seed section */
.seed-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.seed-text { width: 9.5rem; margin-top: 2px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--background); color: var(--foreground); font: 14px/1.2 var(--font-mono); }
.seed-code { margin-left: auto; padding: 8px 12px; border-radius: 10px; background: var(--muted); font: 12px/1.6 var(--font-mono); color: var(--muted-foreground); }
.seed-panel { display: flex; flex-direction: column; gap: 14px; padding: 20px; border: 1px solid var(--border); border-radius: 18px; background: var(--background); color: var(--foreground); min-width: 0; }
.ratio-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted-foreground); }
.ratio-pill b { font: 600 12px/1 var(--font-mono); color: var(--foreground); }

/* Dark tree */
.split-sec { display: grid; gap: 32px; align-items: center; }
@media (min-width: 1024px) { .split-sec { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; } }
.split-sec .sec-head { margin-bottom: 24px; }
.dt-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.dt-switch { position: relative; width: 54px; height: 30px; border: 0; border-radius: 999px; background: var(--muted); cursor: pointer; transition: background-color .2s; box-shadow: inset 0 0 0 1px var(--border); flex: none; }
.dt-switch[aria-checked=true] { background: var(--primary); }
.dt-knob { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgb(0 0 0 / .3); transition: transform .2s; }
.dt-switch[aria-checked=true] .dt-knob { transform: translateX(24px); }
.dt-tree { padding: 20px; border: 1px solid var(--border); border-radius: 18px; background: var(--background); color: var(--foreground); transition: background-color .3s, color .3s; box-shadow: 0 24px 60px -30px rgb(0 0 0 / .5); }

/* Why cards */
.why-grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
@media (min-width: 640px) { .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .why-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.why-card { display: flex; flex-direction: column; gap: 6px; padding: 24px; background: var(--background); color: var(--foreground); text-decoration: none; transition: background-color .15s; }
.why-card:hover { background: var(--surface-2); }
.why-art { width: 96px; margin-bottom: 10px; }
.why-title { font-size: 17px; font-weight: 700; }
.why-desc { font-size: 14.5px; line-height: 1.6; color: var(--muted-foreground); }
.why-more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 8px; font-size: 13.5px; font-weight: 600; color: var(--primary); }
.purge-anim { margin-top: 24px; }

/* Component teaser, showcase, categories, guides */
.teaser-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 768px) { .teaser-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .teaser-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.teaser { position: relative; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); transition: border-color .15s, transform .15s; }
.teaser:hover { border-color: var(--primary); transform: translateY(-2px); }
.teaser .thumb { height: 130px; }
.teaser-name { display: block; padding: 10px 12px; font-size: 14px; font-weight: 650; color: var(--foreground); text-decoration: none; }
.show-grid { display: grid; gap: 18px; }
@media (min-width: 720px) { .show-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .show-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .show-grid-lg { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.show-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--surface); transition: border-color .15s, box-shadow .2s; }
.show-card:hover { border-color: color-mix(in oklab, var(--primary) 50%, var(--line)); box-shadow: 0 20px 50px -26px color-mix(in oklab, var(--primary) 60%, transparent); }
.show-thumb { position: relative; display: block; height: 230px; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--muted); }
.show-grid-lg .show-thumb { height: 320px; }
.show-thumb-in { position: absolute; inset: 0; }
.show-thumb iframe { position: absolute; top: 0; left: 0; width: calc(100% / .3); height: calc(100% / .3); border: 0; transform: scale(.3); transform-origin: 0 0; pointer-events: none; background: var(--background); }
.show-grid-lg .show-thumb iframe { width: calc(100% / .45); height: calc(100% / .45); transform: scale(.45); }
.show-meta { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.show-title { font-size: 17px; font-weight: 700; }
.show-title a { color: var(--foreground); text-decoration: none; }
.show-desc { font-size: 14px; line-height: 1.55; color: var(--muted-foreground); }
.show-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.show-tags span { font: 500 11px/1 var(--font-mono); padding: 4px 7px; border-radius: 6px; background: var(--muted); color: var(--muted-foreground); }
.show-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }
.show-src { border-radius: 0; border-inline: 0; border-bottom: 0; box-shadow: none; }
.show-src-body { max-height: 440px; overflow: auto; }
.show-src-body pre.shiki { margin: 0; padding: 14px 18px 16px 0; font: 12.5px/1.65 var(--font-mono); min-width: max-content; background: var(--ed-bg) !important; }
.show-src-body pre.shiki code { counter-reset: line; display: block; }
.show-src-body pre.numbered .line::before { counter-increment: line; content: counter(line); display: inline-block; width: 3.4em; padding-right: 1.5em; text-align: right; color: var(--ed-gutter); }
.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
@media (min-width: 768px) { .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .cat-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.cat-card { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; background: var(--background); color: var(--foreground); text-decoration: none; transition: background-color .15s; }
.cat-card:hover { background: var(--surface-2); }
.cat-all { background: color-mix(in oklab, var(--primary) 9%, var(--background)); }
.cat-all .cat-n { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); }
.cat-name { font-weight: 650; }
.cat-n { font: 500 12.5px/1.4 var(--font-mono); color: var(--muted-foreground); }
.guide-grid { display: grid; gap: 14px; }
@media (min-width: 768px) { .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.guide-card { padding: 20px; }
.faq-wrap { max-width: 780px; margin-inline: auto; }
.band-final .frame { padding-block: 88px; }
.final-cta { position: relative; text-align: center; max-width: 760px; margin-inline: auto; }
.final-mo { width: 130px; height: auto; margin: 0 auto 12px; animation: bob 7s ease-in-out infinite; }
.final-title { font-size: clamp(2.2rem, 1.4rem + 3vw, 3.6rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; }
.final-lead { margin-top: 12px; font-size: 1.1rem; color: var(--muted-foreground); }
.final-code { margin: 28px auto; max-width: 640px; text-align: left; }

/* Other pages */
.page-hero { max-width: 820px; }
.page-title { margin-top: 10px; font-size: clamp(2.2rem, 1.4rem + 3vw, 3.4rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; text-wrap: balance; }
.page-lead { margin-top: 16px; font-size: 1.15rem; line-height: 1.65; color: var(--muted-foreground); }
.pg { padding: 16px; }
@media (min-width: 640px) { .pg { padding: 20px 24px 28px; } }
.pg-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.pg-title { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; margin-right: 8px; }
.pg-seed { display: inline-flex; align-items: center; gap: 6px; font: 500 12px/1 var(--font-mono); color: var(--muted-foreground); }
.pg-seed .swatch-input { inline-size: 32px; block-size: 32px; }
.pg-grid { display: grid; gap: 16px; }
@media (min-width: 1024px) { .pg-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); height: calc(100vh - var(--top) - 110px); min-height: 560px; } }
.pg-ed { display: flex; flex-direction: column; min-height: 420px; }
.pg-ed .ed { max-height: none; }
.pg-out { position: relative; display: flex; flex-direction: column; padding: 16px 30px 16px 16px; border: 1px solid var(--line); border-radius: 16px; background-color: var(--surface-2); background-image: var(--dots); background-size: 16px 16px; min-height: 480px; overflow: auto; }
.pg-frame { flex: 1; display: flex; }
.pg-frame .live-frame { border-radius: 12px; min-height: 100%; }
.pg-size { margin-top: 8px; font: 500 12px/1 var(--font-mono); color: var(--muted-foreground); }
.nf { text-align: center; max-width: 640px; margin-inline: auto; }
.nf-mo { width: 240px; height: auto; margin: 0 auto 8px; animation: bob 7s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .term-anim .tl { opacity: 1; }
}
@media print {
  .topbar, .site-nav, .docs-aside, .site-foot, .search-dlg, .copy-page, .prev-next { display: none !important; }
}

/* Utility tables: plain code cells, highlighted anchor targets. */
.util-table td > code, .cls-table td code { background: none; border: 0; padding: 0; }
.doc-table tr[id] { scroll-margin-top: calc(var(--top) + 90px); }
.doc-table tr:target td { background: color-mix(in oklab, var(--primary) 14%, transparent); }
@media (max-width: 767px) {
  .filter-row, .ref-bar, .comp-filter { position: static; }
  .cls-css-cell code { word-break: break-word; }
}
@media (max-width: 639px) {
  .pv-tools .seg-icons, .pv-size, .pv-handle { display: none; }
  .pv-stage { padding: 12px; }
  .resp-stage { padding-right: 26px; }
}
.hero-badge-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.show-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.show-badge { position: absolute; top: 10px; left: 10px; padding: 3px 9px; border-radius: 999px; background: var(--primary); color: var(--primary-foreground); font-size: 11.5px; font-weight: 700; letter-spacing: .04em; }
.author-top { display: none; align-items: center; gap: 6px; margin-right: 6px; font-size: 12.5px; color: var(--muted-foreground); white-space: nowrap; }
.author-top a { color: var(--foreground); text-decoration: none; font-weight: 600; }
.author-top a:hover { color: var(--primary); }
.author-top .author-ic { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; color: var(--muted-foreground); }
.author-top .author-ic:hover { background: var(--muted); color: var(--foreground); }
.author-top .author-ic svg { width: 15px; height: 15px; }
@media (min-width: 1360px) { .author-top { display: inline-flex; } }
.author-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.author-foot a { display: inline-flex; align-items: center; gap: 6px; color: var(--foreground); text-decoration: none; font-weight: 600; }
.author-foot a:hover { color: var(--primary); }
.author-foot svg { width: 15px; height: 15px; }
.badge-js { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; background: color-mix(in oklab, #f59e0b 22%, transparent); color: var(--foreground); border: 1px solid color-mix(in oklab, #f59e0b 50%, transparent); font-size: 12px; font-weight: 650; }
.comp-js { position: absolute; top: 8px; right: 8px; z-index: 2; font: 700 10.5px/1 var(--font-mono); padding: 4px 6px; border-radius: 6px; background: #f59e0b; color: #1e1300; }
.api-block + .api-block { margin-top: 1.4rem; }
.api-title { font-size: 1rem; font-weight: 700; margin-bottom: .6rem; }
code, kbd, pre, .cap, .cap-mini, .vchip { font-variant-ligatures: none; }
/* Single column grids must never grow past the viewport on phones. */
.split-sec, .live-grid, .hiw-body, .show-grid, .why-grid, .bento, .guide-grid, .pg-grid, .docs-grid, .lp-hero { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 720px) { .show-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 768px) { .bento, .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .hiw-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (min-width: 1024px) { .split-sec, .live-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .why-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .lp-hero { grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); } .pg-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); } }
@media (min-width: 1100px) { .bento, .show-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .show-grid-lg { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .docs-grid { grid-template-columns: minmax(0, 1fr) 224px; } }
.bento .tk { background: color-mix(in oklab, #22d3ee 22%, transparent); box-shadow: 0 0 0 1px color-mix(in oklab, #22d3ee 60%, transparent); }
