@font-face {
  font-family: Manrope;
  src: url("/assets/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #1b1730;
  --muted: #5d5671;
  --accent: #663bd9;
  --accent-dark: #5429c6;
  --line: #e9e4f2;
  --paper: #fff;
  --soft: #f9f7ff;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  --header: 72px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: calc(var(--header) + 22px); }
body { margin: 0; color: var(--ink); background: var(--paper); font: 500 16px/1.65 Manrope, system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid #926aff; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.04em; }
svg { flex: none; vertical-align: middle; }
.shell { width: min(1184px, calc(100% - 72px)); margin-inline: auto; }
.skip { position: fixed; inset: 8px auto auto 8px; z-index: 5; translate: 0 -150%; padding: 8px 12px; background: white; }
.skip:focus { translate: none; }

.site-header { position: sticky; top: 0; z-index: 2; background: rgb(255 255 255 / 96%); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 34px; min-height: calc(var(--header) - 1px); }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 19px; font-weight: 800; letter-spacing: -.06em; white-space: nowrap; }
.brand span span { color: var(--accent); }
.header-inner nav { display: flex; gap: 28px; margin-left: auto; font-size: 13px; font-weight: 750; }
.header-inner nav a:hover, .header-inner nav a[aria-current] { color: var(--accent); }
.search-trigger { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 9px; background: #faf9fd; color: var(--muted); padding: 7px 9px; font-size: 12px; }
.search-trigger:hover { border-color: #b9a2f4; }
.search-trigger svg { width: 16px; }
kbd { margin-left: 6px; border: 1px solid var(--line); background: white; border-radius: 5px; padding: 0 5px; font: 10px/1.8 var(--mono); }

.hero { position: relative; overflow: clip; border-bottom: 1px solid var(--line); background: radial-gradient(ellipse at 79% 46%, #e9dcff 0%, transparent 53%), linear-gradient(145deg, #fcfbff, #f7f3ff); }
.hero-inner { display: grid; grid-template-columns: 1fr 1.03fr; gap: clamp(30px, 5vw, 79px); align-items: center; padding-block: 85px 82px; }
.hero-copy { position: relative; z-index: 1; }
.version { display: inline-flex; gap: 8px; align-items: center; padding: 6px 11px; background: #efe8fc; border: 1px solid #e5d9fd; border-radius: 99px; color: #5d37b2; font: 700 10px/1.4 var(--mono); letter-spacing: .065em; }
.version span, .eyebrow span { width: 7px; height: 7px; border-radius: 50%; background: #8a58ef; }
.version b { color: #7458a4; }
.hero h1 { margin: 24px 0; font-size: clamp(64px, 7.8vw, 114px); letter-spacing: -.087em; line-height: .96; font-weight: 800; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero-copy > p { color: var(--muted); max-width: 460px; font-size: clamp(17px, 1.6vw, 20px); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: fit-content; padding: 11px 17px; border: 1px solid transparent; border-radius: 9px; font-size: 14px; font-weight: 800; }
.button svg { width: 18px; }
.primary { background: var(--accent); color: white; box-shadow: 0 5px 11px #6337d831; }
.primary:hover { background: var(--accent-dark); }
.secondary { background: white; border-color: #e3d9f3; }
.secondary:hover { border-color: #ad90f2; color: var(--accent); }
.hero-code { position: relative; min-width: 0; }
.code-decoration { position: absolute; inset: -36px -30px -24px; background-image: radial-gradient(#a883ec 1px, transparent 1px); background-size: 16px 16px; opacity: .53; mask-image: radial-gradient(ellipse, #000 48%, transparent 76%); pointer-events: none; }
.code-box { position: relative; min-width: 0; overflow: hidden; background: #1b172c; border: 1px solid #352b4b; border-radius: 12px; color: #f0eaf9; }
.hero-code .code-box { box-shadow: 0 24px 45px #32215a32, 0 2px 6px #2514392d; border-radius: 15px; }
.code-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 39px; padding: 5px 14px; background: #241d37; border-bottom: 1px solid #3b3151; color: #d0c2e4; font: 12px/1.4 var(--mono); }
.hero-code .code-bar { justify-content: initial; min-height: 48px; padding-inline: 18px; }
.hero-code .code-bar::before { content: ""; width: 8px; height: 8px; border-radius: 50%; margin-right: 25px; background: #f388a8; box-shadow: 13px 0 #ecc27b, 26px 0 #84dbbb; }
.hero-code .copy { margin-left: auto; }
.copy { display: inline-flex; align-items: center; gap: 5px; padding: 3px 6px; border: 1px solid transparent; border-radius: 5px; color: inherit; background: transparent; }
.copy:hover { border-color: #756490; color: white; }
.copy svg { width: 14px; height: 14px; }
pre { overflow: auto; margin: 0; padding: 16px 18px; font: 13px/1.68 var(--mono); }
.hero-code pre { padding: 23px 20px; font-size: clamp(11px, 1.05vw, 14px); line-height: 1.85; }
pre:focus-visible { outline-offset: -3px; }
code { font-family: var(--mono); }
.hljs-keyword, .hljs-type { color: #cdb3ff; }
.hljs-string, .hljs-doctag { color: #a4ebcb; }
.hljs-built_in, .hljs-number, .hljs-literal { color: #ffcb96; }
.hljs-title, .hljs-function { color: #c5d7ff; }
.hljs-comment { color: #b5a8c8; }
.example-link { position: relative; display: flex; align-items: center; gap: 5px; width: fit-content; margin: 15px 0 0 auto; color: #56329f; font-size: 13px; font-weight: 800; }
.example-link:hover { text-decoration: underline; }
.example-link svg { width: 17px; }

.section { padding-block: 67px 74px; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: #5d37b2; font: 700 11px/1.5 var(--mono); letter-spacing: .1em; }
.section h2 { margin-top: 10px; font-size: clamp(30px, 4vw, 47px); font-weight: 800; }
.section-intro { max-width: 670px; margin-top: 10px; color: var(--muted); }
.modes, .guide-cards { display: grid; gap: 15px; margin-top: 30px; }
.modes { grid-template-columns: repeat(4, 1fr); }
.mode-card { display: flex; flex-direction: column; padding: 19px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.mode-card:hover, .guide-cards a:hover { border-color: #b69df0; background: #fcfaff; }
.card-top { display: flex; align-items: center; justify-content: space-between; color: #66578b; font: 12px var(--mono); }
.tile-icon { display: grid; place-items: center; width: 41px; height: 41px; flex: none; border-radius: 10px; color: #6237c6; background: #f0e9fc; }
.mode-card h3, .guide-cards h3 { margin-top: 17px; font-size: 18px; font-weight: 800; }
.mode-card p, .guide-cards p { margin-top: 8px; color: var(--muted); font-size: 14px; }
.card-arrow { margin-top: auto; padding-top: 13px; color: var(--accent); }
.journey { background: var(--soft); border-top: 1px solid var(--line); }
.guide-cards { grid-template-columns: repeat(3, 1fr); }
.guide-cards a { display: flex; align-items: center; gap: 12px; padding: 15px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.guide-cards a > svg { margin-left: auto; color: var(--accent); }
.guide-cards h3, .guide-cards p { margin-top: 0; }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding-block: 25px; color: var(--muted); font-size: 13px; }
.footer-inner .brand { color: var(--ink); }
.footer-inner > a:last-child { margin-left: auto; font-weight: 800; }
.footer-inner > a:last-child:hover { color: var(--accent); }
.footer-inner > a:last-child svg { width: 16px; margin-left: 4px; }
.missing { min-height: 60vh; }
.missing h1 { margin: 12px 0; font-size: clamp(36px, 6vw, 68px); }
.missing .button { margin-top: 22px; }

.docs-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr) 173px; gap: clamp(22px, 3vw, 42px); min-height: 78vh; padding-block: 34px 70px; }
.docs-sidebar, .toc { align-self: start; position: sticky; top: calc(var(--header) + 30px); max-height: calc(100vh - var(--header) - 45px); overflow: auto; }
.docs-sidebar { border-right: 1px solid var(--line); padding: 1px 14px 4px 3px; }
.nav-group + .nav-group { margin-top: 17px; }
.nav-group p, .toc p { margin-bottom: 5px; color: var(--ink); font-size: 12px; font-weight: 800; }
.nav-group p { padding-left: 9px; }
.nav-group a, .toc a { display: block; padding: 4px 9px; border-radius: 6px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.nav-group a:hover, .toc a:hover { background: var(--soft); color: var(--accent-dark); }
.nav-group a[aria-current] { color: var(--accent-dark); background: #efe8ff; font-weight: 800; }
.toc { border-left: 1px solid var(--line); padding: 4px 4px 4px 13px; }
.toc a { padding-inline: 0; }
.mobile-nav { display: none; }
.breadcrumbs { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.breadcrumbs a { color: var(--accent-dark); font-weight: 800; }
.breadcrumbs a:hover { text-decoration: underline; }
.docs-main h1 { overflow-wrap: anywhere; font-size: clamp(35px, 4vw, 54px); font-weight: 800; }
.lead { margin: 12px 0 25px; color: var(--muted); font-size: 18px; }
article { overflow-wrap: anywhere; border-top: 1px solid var(--line); padding-top: 20px; }
article h2 { margin: 33px 0 12px; font-size: clamp(24px, 3vw, 30px); }
article h2:first-child { margin-top: 0; }
article h3 { margin: 24px 0 9px; font-size: 20px; }
article p, article ul, article ol, article .code-box, article blockquote, article table { margin: 0 0 16px; }
article a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
article li + li { margin-top: 4px; }
article ul, article ol { padding-left: 23px; }
article :not(pre) > code { border-radius: 4px; padding: .12em .3em; color: #522694; background: #f1ebfa; font-size: .86em; }
article blockquote { border-left: 3px solid #8853e6; padding: 11px 13px; background: var(--soft); color: var(--muted); }
article blockquote > :last-child { margin-bottom: 0; }
article table { display: block; overflow: auto; border-collapse: collapse; font-size: 14px; }
article td, article th { padding: 7px 11px; border: 1px solid var(--line); text-align: left; }
article th { background: var(--soft); }
.pager { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.pager a { flex: 1 1 185px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; }
.pager a:hover { border-color: #b79af0; color: var(--accent-dark); }
.pager small { display: block; color: var(--muted); }
.pager span { display: flex; align-items: center; gap: 6px; font-weight: 800; }
.pager svg { width: 16px; }

dialog { max-height: min(75vh, 620px); width: min(580px, calc(100% - 32px)); margin: 11vh auto auto; padding: 17px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); box-shadow: 0 20px 90px #180d3b5c; }
dialog::backdrop { background: #21153670; }
.search-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.search-heading h2 { font-size: 19px; }
.search-close { border: 0; border-radius: 6px; padding: 4px; color: var(--muted); background: var(--soft); }
#search-input { width: 100%; border: 1px solid #c5b0ec; border-radius: 8px; padding: 8px 12px; color: var(--ink); background: white; }
#search-status { margin-top: 10px; color: var(--muted); font-size: 13px; }
#search-results { padding: 0; margin: 8px 0 0; list-style: none; }
#search-results a { display: block; padding: 7px 10px; border-radius: 8px; }
#search-results a:hover, #search-results a:focus { background: var(--soft); }
#search-results span { display: block; color: var(--muted); font-size: 13px; }

@media (max-width: 1000px) {
  .docs-layout { grid-template-columns: 190px minmax(0, 1fr); }
  .toc { display: none; }
  .modes { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 740px) {
  :root { --header: 62px; }
  .shell { width: calc(100% - 34px); }
  .header-inner { gap: 14px; }
  .header-inner nav { gap: 0; }
  .header-inner nav a:first-child, .search-trigger span, kbd { display: none; }
  .search-trigger { padding: 6px 8px; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 27px; padding-block: 45px 35px; }
  .hero h1 { margin-block: 18px; }
  .hero-code { width: min(100%, 570px); }
  .section { padding-block: 45px; }
  .guide-cards { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; padding-top: 18px; }
  .docs-sidebar { position: static; border: 0; max-height: none; padding: 0; }
  .desktop-nav { display: none; }
  .mobile-nav { display: block; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
  .mobile-nav summary { cursor: pointer; font-size: 14px; font-weight: 800; }
  .mobile-nav .nav-group { margin-top: 12px; }
}
@media (max-width: 375px) {
  .brand { font-size: 16px; gap: 6px; }
  .brand img { width: 27px; height: 27px; }
  .modes { grid-template-columns: 1fr; }
}
