/* developer hub, docs, open source */

/* split headings: room for the last glyph with tight tracking */
[data-split] .split-word { padding-right: .08em; margin-right: -.08em; }

/* ---------- developer hub ---------- */
.dv-hero { padding-block: clamp(48px, 7vw, 110px) clamp(64px, 8vw, 120px); }
.dv-hero__grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(36px, 5vw, 80px); align-items: center; }
.dv-hero h1 { font-size: clamp(50px, 8.2vw, 124px); }
.dv-hero__chips { list-style: none; margin: 28px 0 0; padding: 0; }
.dv-hero__chips .chip { font-family: var(--font-mono); font-size: 12px; }

.dv-stage { position: relative; padding: 0 0 56px; }
.dv-ide {
  position: relative; z-index: 1; overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: 0 50px 140px -50px rgba(255,90,0,.45), 0 30px 80px -30px #000;
}
.dv-ide::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(420px 220px at 90% 0%, rgba(255,90,0,.16), transparent 70%);
}
.dv-ide__bar { display: flex; align-items: center; gap: 14px; padding: 13px 18px; border-bottom: 1px solid var(--hair); background: rgba(0,0,0,.35); }
.dv-dots { display: flex; gap: 7px; }
.dv-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.dv-dots i:first-child { background: var(--orange); box-shadow: 0 0 10px var(--glow); }
.dv-ide__file { font: 600 12px/1 var(--font-mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dv-ide__file b { color: var(--text); font-weight: 600; }
.dv-ide__target { margin-left: auto; font-family: var(--font-mono); font-size: 11.5px; transition: color .3s, background-color .3s, border-color .3s; }
.dv-code { display: grid; margin: 0; padding: 20px 22px 18px; font: 400 12.5px/1.65 var(--font-mono); color: #d9d3cc; tab-size: 2; }
.dv-code > * { grid-area: 1 / 1; white-space: pre-wrap; overflow-wrap: anywhere; }
.dv-code__ghost { visibility: hidden; }
.dv-caret { display: inline-block; width: .55em; height: 1.2em; margin-bottom: -.25em; background: var(--orange); box-shadow: 0 0 10px var(--glow); animation: dv-blink 1s steps(1) infinite; }
@keyframes dv-blink { 50% { opacity: 0; } }
.tk-k { color: #ff7a1f; }
.tk-f { color: #ffb000; }
.tk-s { color: #9fd67a; }
.tk-n { color: #7ab8ff; }
.tk-c { color: var(--dim); font-style: italic; }
.tk-p { color: #8d867f; }
.dv-console { border-top: 1px solid var(--hair); background: rgba(0,0,0,.45); }
.dv-console__head { display: flex; align-items: center; gap: 10px; padding: 10px 18px; font: 600 10.5px/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.dv-console__state { margin-left: auto; letter-spacing: .08em; color: var(--muted); }
.dv-console__state.is-ok { color: var(--success); }
.dv-console__state.is-busy { color: var(--amber); }
.dv-log { height: 150px; margin: 0; padding: 0 18px 14px; overflow: hidden; list-style: none; font: 400 11.5px/1.6 var(--font-mono); color: var(--muted); }
.dv-log li { white-space: pre-wrap; overflow-wrap: anywhere; animation: dv-line .35s var(--ease-out) backwards; }
.dv-log .is-step { color: #cfc8c0; }
.dv-log .is-ok { color: var(--success); }
.dv-log .is-warn { color: var(--amber); }
.dv-log .is-err { color: var(--danger); }
@keyframes dv-line { from { opacity: 0; transform: translateX(-6px); } }

/* css watch used for the live preview */
.dv-watch {
  --sw: 168px; --sh: 191px; --sr: 16px;
  position: absolute; z-index: 2; right: -18px; bottom: 0;
  display: grid; justify-items: center; gap: 12px;
}
.dv-watch__case {
  position: relative; display: grid; place-items: center;
  width: calc(var(--sw) + 34px); height: calc(var(--sh) + 40px);
  border-radius: calc(var(--sr) + 14px);
  background: linear-gradient(145deg, #4a4a50, #1b1b1e 45%, #2e2e33 80%, #5b5b62);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.35), inset 0 -2px 4px rgba(0,0,0,.6), 0 30px 60px -20px #000, 0 0 70px -20px var(--glow);
  transition: width .8s var(--ease-out), height .8s var(--ease-out), border-radius .8s var(--ease-out);
}
.dv-watch__case::before, .dv-watch__case::after {
  content: ""; position: absolute; left: 50%; width: 58%; height: 26px; transform: translateX(-50%); z-index: -1;
  background: linear-gradient(90deg, #111, #242424 50%, #111);
}
.dv-watch__case::before { top: -20px; border-radius: 10px 10px 0 0; }
.dv-watch__case::after { bottom: -20px; border-radius: 0 0 10px 10px; }
.dv-watch__btn { position: absolute; width: 5px; border-radius: 3px; background: linear-gradient(90deg, #333, #777, #333); }
.dv-watch__btn--back { left: -4px; top: 34%; height: 26px; }
.dv-watch__btn--up { right: -4px; top: 22%; height: 22px; }
.dv-watch__btn--select { right: -4px; top: 44%; height: 22px; }
.dv-watch__btn--down { right: -4px; top: 66%; height: 22px; }
.dv-watch__screen {
  display: block; width: var(--sw); height: var(--sh); border-radius: var(--sr);
  background: #0b0b0b; image-rendering: pixelated;
  box-shadow: 0 0 0 3px #070707, inset 0 0 0 1px rgba(255,255,255,.05);
  opacity: .12; filter: saturate(0);
  transition: width .8s var(--ease-out), height .8s var(--ease-out), border-radius .8s var(--ease-out), opacity .6s, filter .6s;
}
.dv-watch.is-on .dv-watch__screen { opacity: 1; filter: none; }
.dv-watch.is-round { --sw: 190px; --sh: 190px; --sr: 50%; }
.dv-watch.is-round .dv-watch__case { border-radius: 50%; width: calc(var(--sw) + 30px); height: calc(var(--sw) + 30px); }
.dv-watch__label { font: 600 11px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(5,5,5,.8); }
.dv-watch__label b { color: var(--orange-2); font-weight: 600; }

.dv-marquee { padding-block: 34px; border-bottom: 1px solid var(--line); }
.dv-marquee .marquee__track > * { font-family: var(--font-mono); font-weight: 600; letter-spacing: -.05em; }

.dv-props { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.dv-prop { display: flex; flex-direction: column; gap: 14px; min-height: 320px; }
.dv-prop__ico { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: rgba(255,90,0,.1); border: 1px solid rgba(255,90,0,.25); color: var(--orange-2); transition: transform .5s var(--ease), background-color .3s; }
.dv-prop__ico .ico { width: 26px; height: 26px; }
.dv-prop:hover .dv-prop__ico { transform: rotate(-8deg) scale(1.08); background: rgba(255,90,0,.2); }
.dv-prop h3 { margin: 8px 0 0; }
.dv-prop p { margin: 0; color: var(--muted); }
.dv-prop code { margin-top: auto; align-self: flex-start; font: 500 12px/1 var(--font-mono); color: var(--orange-2); padding: 7px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }

.dv-step p code, .section-head code { font: 500 .88em/1 var(--font-mono); color: var(--orange-2); }
.dv-steps { position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
.dv-steps::before {
  content: ""; position: absolute; left: 6%; right: 6%; top: 58px; height: 1px; z-index: -1;
  background: linear-gradient(90deg, transparent, var(--orange), var(--amber), transparent);
  box-shadow: 0 0 16px var(--glow);
  transform: scaleX(0); transform-origin: left; transition: transform 1.6s var(--ease-out) .2s;
}
.dv-steps.is-in::before { transform: scaleX(1); }
.dv-step { display: flex; flex-direction: column; gap: 14px; }
.dv-step__num {
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
  font: 900 22px/1 var(--font-display); color: #0a0a0a;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 0 0 8px var(--bg), 0 10px 40px -8px var(--glow);
}
.dv-step h3 { margin: 10px 0 0; }
.dv-step p { margin: 0; color: var(--muted); }
.dv-step pre { margin: 4px 0 0; padding: 14px 16px; border-radius: 12px; background: #080808; border: 1px solid var(--line); font: 400 12px/1.6 var(--font-mono); color: #d9d3cc; overflow-x: auto; }
.dv-step .row { margin-top: auto; padding-top: 8px; }
.dv-step__meta { display: flex; flex-wrap: wrap; gap: 8px; }

.dv-plats { gap: 24px; }
.dv-plat { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.dv-plat__stage {
  position: relative; height: clamp(300px, 34vw, 420px);
  background: radial-gradient(60% 60% at 50% 55%, rgba(255,90,0,.22), transparent 70%), linear-gradient(180deg, #0f0f0f, #080808);
  border-bottom: 1px solid var(--line);
}
.dv-plat__stage::after {
  content: attr(data-px); position: absolute; left: 20px; bottom: 16px;
  font: 600 11px/1 var(--font-mono); letter-spacing: .14em; color: var(--dim); pointer-events: none;
}
.dv-plat__body { display: flex; flex-direction: column; gap: 18px; padding: clamp(22px, 3vw, 36px); flex: 1; }
.dv-plat .display-m { font-size: clamp(30px, 3.4vw, 50px); }
.dv-plat__px { margin: 0; font: 900 clamp(38px, 5vw, 64px)/1 var(--font-display); letter-spacing: -.04em; }
.dv-plat__px span { color: var(--orange); }
.dv-plat__px small { font: 600 13px/1 var(--font-mono); letter-spacing: .1em; color: var(--muted); }
.dv-specs { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.dv-specs li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.dv-specs span { color: var(--muted); font: 600 11px/1.9 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; flex: none; }
.dv-specs strong { text-align: right; font-weight: 600; }
.dv-plat .row { margin-top: auto; }

.dv-res__card { display: flex; flex-direction: column; gap: 12px; min-height: 250px; overflow: hidden; }
.dv-res__card .h3 { margin: 12px 0 0; }
.dv-res__card p { margin: 0; color: var(--muted); }
.dv-res__card .link-arrow { margin-top: auto; }
.dv-res__ico { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; color: var(--orange-2); background: var(--surface-2); border: 1px solid var(--line-2); transition: color .3s, background-color .3s, border-color .3s, transform .5s var(--ease); }
.dv-res__ico .ico { width: 24px; height: 24px; }
.dv-res__card:hover .dv-res__ico { color: #0a0a0a; background: var(--orange); border-color: var(--orange); transform: scale(1.06); }
.dv-res__n { position: absolute; right: 18px; top: 8px; font: 900 88px/1 var(--font-display); letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1px var(--line); pointer-events: none; transition: -webkit-text-stroke-color .4s; }
.dv-res__card:hover .dv-res__n { -webkit-text-stroke-color: rgba(255,90,0,.45); }
.dv-res__card .ext { width: 14px; height: 14px; }

.dv-stats { position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 56px); }
.dv-stats .glow-orb { --size: 480px; --o: .35; right: -140px; top: -220px; }
.dv-stats__head { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 36px; }
.dv-stats__head h2 { margin: 12px 0 0; }
.dv-stats__grid { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.dv-stat { padding-top: 22px; border-top: 1px solid var(--line-2); }
.dv-stat .stat__num { color: var(--text); }
.dv-stat:first-child .stat__num { color: var(--orange); text-shadow: 0 0 40px rgba(255,90,0,.35); }
.dv-stat .skeleton { height: 60px; width: 70%; }
.dv-stats__note { position: relative; margin: 28px 0 0; font-size: 13px; color: var(--dim); }

.dv-cta { overflow: clip; text-align: center; }
.dv-cta .glow-orb { --size: min(900px, 140vw); --o: .4; left: 50%; top: 10%; margin-left: calc(min(900px, 140vw) / -2); }
.dv-cta__inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 26px; }
.dv-cta__buy { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-top: 72px; padding: 26px 30px; border-radius: var(--radius-lg); text-align: left; }
.dv-cta__buy p:not(.eyebrow) { margin: 4px 0 0; color: var(--muted); }

/* ---------- docs ---------- */
.docs-shell { display: grid; grid-template-columns: 252px minmax(0, 1fr) 210px; gap: clamp(28px, 3.4vw, 56px); align-items: start; padding-block: 40px 120px; }
.docs-shell.is-landing { grid-template-columns: 252px minmax(0, 1fr); }
.docs-shell.is-landing .docs-toc { display: none; }

.docs-nav {
  position: sticky; top: calc(var(--bar-h) + 20px);
  max-height: calc(100vh - var(--bar-h) - 40px); overflow-y: auto; overscroll-behavior: contain;
  padding: 4px 6px 24px 2px; scrollbar-width: thin;
}
.docs-nav__head { display: none; }
.docs-search { position: relative; display: block; margin-bottom: 22px; }
.docs-search .ico { position: absolute; left: 14px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--dim); pointer-events: none; }
.docs-search .input { height: 46px; padding-left: 40px; padding-right: 44px; border-radius: 999px; font-size: 14.5px; }
.docs-search .kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.docs-group + .docs-group { margin-top: 24px; }
.docs-group__title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding-left: 12px; font: 600 11px/1.2 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.docs-group__title b { font-weight: 600; color: var(--line-2); }
.docs-group ul { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--line); }
.docs-link {
  position: relative; display: block; margin-left: -1px; padding: 7px 12px 7px 14px;
  border-left: 1px solid transparent; font-size: 14.5px; font-weight: 600; color: var(--muted);
  transition: color .2s, border-color .2s, background-color .2s;
}
.docs-link:hover { color: var(--text); border-left-color: var(--line-2); background: rgba(255,255,255,.02); }
.docs-link.is-active { color: var(--orange-2); border-left-color: var(--orange); background: linear-gradient(90deg, rgba(255,90,0,.1), transparent); }
.docs-link small { display: block; font: 500 11.5px/1.4 var(--font-mono); color: var(--dim); margin-top: 2px; }
.docs-link mark { background: rgba(255,176,0,.22); color: var(--text); border-radius: 3px; padding: 0 1px; }
.docs-empty { margin: 0; padding: 12px; font-size: 14px; color: var(--muted); border: 1px dashed var(--line-2); border-radius: 12px; }
.docs-nav__foot { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.docs-nav__foot .link-arrow { font-size: 14px; }
.docs-nav .skeleton--text { width: 80%; margin-left: 14px; }

.docs-content { min-width: 0; }
.docs-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 22px; font: 600 11.5px/1.4 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.docs-crumbs a { color: var(--muted); transition: color .2s; }
.docs-crumbs a:hover { color: var(--orange-2); }
.docs-crumbs [aria-current] { color: var(--orange-2); }
.docs-title { margin: 0; font: 900 clamp(34px, 5vw, 64px)/1 var(--font-display); letter-spacing: -.035em; }
.docs-meta { margin: 22px 0 40px; padding-bottom: 26px; border-bottom: 1px solid var(--line); gap: 10px 16px; font-size: 14px; }
.docs-meta .mono { font-size: 12px; color: var(--dim); letter-spacing: .06em; }
.docs-meta .link-arrow { margin-left: auto; font-size: 14px; }
.docs-prose { max-width: 74ch; font-size: 17px; }
.docs-prose h2, .docs-prose h3 { scroll-margin-top: calc(var(--bar-h) + 28px); }
.docs-prose h2 { position: relative; }
.docs-prose h2::before { content: "#"; position: absolute; left: -1em; color: var(--line-2); opacity: 0; transition: opacity .2s; }
.docs-prose h2:hover::before { opacity: 1; }
.docs-prose ol { padding-left: 1.5em; }
.docs-prose li > code, .docs-prose p > code { white-space: nowrap; }
.docs-code { position: relative; margin-top: 1.4em; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(180deg, #0d0d0d, #080808); overflow: hidden; transition: border-color .3s, box-shadow .3s; }
.docs-code:hover { border-color: var(--line-2); box-shadow: 0 20px 50px -30px var(--glow); }
.docs-code__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.015); }
.docs-code__lang { font: 600 10.5px/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.docs-copy { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); font: 600 12px/1 var(--font-body); color: var(--muted); transition: color .2s, border-color .2s, background-color .2s; }
.docs-copy .ico { width: 14px; height: 14px; }
.docs-copy:hover { color: var(--text); border-color: var(--orange); background: rgba(255,90,0,.08); }
.docs-copy.is-done { color: var(--success); border-color: rgba(74,222,128,.4); }
.prose .docs-code pre { margin: 0; border: 0; border-radius: 0; background: none; }
.prose .docs-code pre[data-lang]::before { display: none; }

.docs-pn { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 64px; }
.docs-pn a { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; }
.docs-pn small { font: 600 11px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.docs-pn strong { font: 700 18px/1.25 var(--font-display); letter-spacing: -.01em; transition: color .2s; }
.docs-pn a:hover strong { color: var(--orange-2); }
.docs-pn .is-next { text-align: right; grid-column: 2; }
.docs-buy { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin-top: 24px; overflow: hidden; }
.docs-buy h2 { margin: 0; font: 800 22px/1.2 var(--font-display); letter-spacing: -.02em; }
.docs-buy p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.docs-state { padding: 48px 0; }
.docs-state h1 { margin: 16px 0; }

.docs-toc { position: sticky; top: calc(var(--bar-h) + 20px); max-height: calc(100vh - var(--bar-h) - 40px); overflow-y: auto; padding-bottom: 20px; }
.docs-toc__title { margin: 0 0 14px; font: 600 11px/1.2 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.docs-toc ol { position: relative; margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--line); }
.docs-toc a { display: block; margin-left: -1px; padding: 5px 0 5px 14px; border-left: 1px solid transparent; font-size: 13.5px; line-height: 1.4; color: var(--muted); transition: color .2s, border-color .2s; }
.docs-toc a:hover { color: var(--text); }
.docs-toc a.is-active { color: var(--orange-2); border-left-color: var(--orange); }
.docs-toc .is-sub a { padding-left: 26px; font-size: 13px; }
.docs-toc__extra { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; }
.docs-toc__extra a { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; transition: color .2s; }
.docs-toc__extra a:hover { color: var(--orange-2); }
.docs-toc__extra .ico { width: 14px; height: 14px; }

.docs-land__hero { position: relative; padding: 18px 0 44px; }
.docs-land__hero .lead { margin-top: 22px; }
.docs-land__hero h1 { margin-top: 20px; }
.docs-start { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; margin-bottom: 20px; }
.docs-start__main { display: flex; flex-direction: column; gap: 14px; min-height: 260px; background: radial-gradient(500px 260px at 100% 0%, rgba(255,90,0,.2), transparent 70%), linear-gradient(180deg, #151515, #0e0e0e); }
.docs-start__main .h3 { font-size: clamp(24px, 2.6vw, 34px); margin: 6px 0 0; }
.docs-start__main p { margin: 0; color: var(--muted); max-width: 44ch; }
.docs-start__main .link-arrow { margin-top: auto; }
.docs-start__side { display: flex; flex-direction: column; gap: 12px; }
.docs-start__side a { display: flex; align-items: center; gap: 14px; padding: 18px 20px; }
.docs-start__side strong { display: block; font-weight: 800; }
.docs-start__side small { display: block; color: var(--muted); font-size: 13.5px; }
.docs-start__side .ico { width: 20px; height: 20px; color: var(--orange-2); flex: none; }
.docs-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.docs-sec { display: flex; flex-direction: column; gap: 10px; }
.docs-sec__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.docs-sec__head .h3 { margin: 0; }
.docs-sec__n { font: 600 11px/1 var(--font-mono); letter-spacing: .12em; color: var(--dim); }
.docs-sec ul { margin: 6px 0 0; padding: 0; list-style: none; }
.docs-sec li + li { border-top: 1px solid var(--line); }
.docs-sec li a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; font-weight: 600; color: var(--muted); transition: color .2s, padding .3s var(--ease); }
.docs-sec li a .ico { width: 16px; height: 16px; opacity: 0; transform: translateX(-6px); transition: opacity .2s, transform .3s var(--ease); }
.docs-sec li a:hover { color: var(--text); padding-left: 6px; }
.docs-sec li a:hover .ico { opacity: 1; transform: none; color: var(--orange); }

.docs-swap > * { animation: rv-up .6s var(--ease-out) backwards; }
.docs-swap > :nth-child(2) { animation-delay: .05s; }
.docs-swap > :nth-child(3) { animation-delay: .1s; }
.docs-swap > :nth-child(n+4) { animation-delay: .15s; }
.docs-content:focus { outline: none; }

.docs-mbar { display: none; }
.docs-scrim { display: none; }

@media (max-width: 1180px) {
  .docs-shell, .docs-shell.is-landing { grid-template-columns: 232px minmax(0, 1fr); }
  .docs-toc { display: none; }
}
@media (max-width: 900px) {
  .docs-shell, .docs-shell.is-landing { grid-template-columns: minmax(0, 1fr); padding-top: 28px; }
  .docs-mbar {
    position: sticky; top: var(--bar-h); z-index: 60;
    display: flex; align-items: center; gap: 12px;
    padding: 10px var(--gutter); border-bottom: 1px solid var(--line);
    background: rgba(5,5,5,.86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  }
  .docs-mbar__btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); font: 700 13.5px/1 var(--font-body); color: var(--text); flex: none; transition: border-color .2s; }
  .docs-mbar__btn:hover { border-color: var(--orange); }
  .docs-mbar__btn .ico { width: 16px; height: 16px; }
  .docs-mbar__cur { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 12px/1 var(--font-mono); color: var(--muted); letter-spacing: .04em; }
  .docs-nav {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 190;
    width: min(330px, 88vw); max-height: none; padding: 18px 18px 40px;
    background: var(--bg-2); border-right: 1px solid var(--line);
    box-shadow: 30px 0 80px -30px #000;
    transform: translateX(-104%); visibility: hidden;
    transition: transform .45s var(--ease-out), visibility 0s .45s;
  }
  .docs-nav.is-open { transform: none; visibility: visible; transition: transform .45s var(--ease-out), visibility 0s; }
  .docs-nav__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
  .docs-nav__head .icon-btn { width: 40px; height: 40px; }
  html.docs-lock { overflow: hidden; }
  .docs-scrim { display: block; position: fixed; inset: 0; z-index: 185; background: rgba(0,0,0,.6); opacity: 0; pointer-events: none; transition: opacity .35s; }
  .docs-scrim.is-open { opacity: 1; pointer-events: auto; }
  .docs-meta .link-arrow { margin-left: 0; }
  .docs-prose h2, .docs-prose h3 { scroll-margin-top: calc(var(--bar-h) + 84px); }
  .docs-start, .docs-sections { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .docs-pn { grid-template-columns: minmax(0, 1fr); }
  .docs-pn .is-next { grid-column: 1; }
  .docs-prose { font-size: 16px; }
  .prose .docs-code pre { font-size: 12.5px; padding: 16px; }
  .docs-prose li > code, .docs-prose p > code { white-space: normal; }
}

/* ---------- open source ---------- */
.os-hero { padding-block: clamp(64px, 9vw, 140px) clamp(64px, 8vw, 120px); }
.os-hero h1 { max-width: 11ch; }
.os-hero__inner { position: relative; z-index: 1; }
.os-hero__chips { list-style: none; margin: 30px 0 0; padding: 0; }
.os-hero__chips .chip { font-family: var(--font-mono); font-size: 12px; }
.os-rain {
  position: absolute; inset: 0 0 0 auto; width: min(52%, 640px); z-index: -1; overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%), linear-gradient(transparent, #000 20%, #000 70%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 40%), linear-gradient(transparent, #000 20%, #000 70%, transparent);
  mask-composite: intersect;
}
.os-rain__col { position: absolute; top: 0; margin: 0; font: 400 12px/1.9 var(--font-mono); color: rgba(255,122,31,.2); white-space: pre; animation: os-rain var(--d, 40s) linear infinite; }
.os-rain__col:nth-child(2) { left: 34%; color: rgba(255,255,255,.08); --d: 55s; animation-delay: -20s; }
.os-rain__col:nth-child(3) { left: 66%; --d: 48s; animation-delay: -8s; }
@keyframes os-rain { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, -50%, 0); } }

.os-arch { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.os-arch__fig { padding: clamp(12px, 2vw, 28px); background: radial-gradient(70% 60% at 40% 60%, rgba(255,90,0,.14), transparent 70%), linear-gradient(180deg, #111, #0a0a0a); }
.os-arch__fig:hover { transform: none; }
.os-arch svg { display: block; width: 100%; height: auto; overflow: visible; }
.os-slab { cursor: pointer; transition: transform .6s var(--ease-out), opacity .4s; }
.os-slab .t { fill: #171717; stroke: rgba(255,255,255,.14); stroke-width: 1; transition: fill .45s, stroke .45s; }
.os-slab .l { fill: #0e0e0e; stroke: rgba(255,255,255,.06); transition: fill .45s; }
.os-slab .r { fill: #0a0a0a; stroke: rgba(255,255,255,.06); transition: fill .45s; }
.os-slab .d { fill: none; stroke: rgba(255,255,255,.08); stroke-dasharray: 3 5; transition: stroke .45s; }
.os-slab:hover .t { stroke: rgba(255,122,31,.6); }
.os-slab.is-active { transform: translateY(-12px); }
.os-slab.is-active .t { fill: url(#os-hot); stroke: #ffb000; }
.os-slab.is-active .l { fill: #b33400; }
.os-slab.is-active .r { fill: #7a2400; }
.os-slab.is-active .d { stroke: rgba(10,10,10,.45); }
.os-arch svg.has-active .os-slab:not(.is-active) { opacity: .55; }
.os-lab { transition: opacity .4s; }
.os-lab line { stroke: var(--line-2); stroke-dasharray: 2 4; transition: stroke .4s; }
.os-lab .n { font: 700 19px var(--font-display); fill: var(--muted); letter-spacing: -.01em; transition: fill .4s; }
.os-lab .s { font: 500 11px var(--font-mono); fill: var(--dim); letter-spacing: .12em; text-transform: uppercase; }
.os-lab.is-active line { stroke: var(--orange); }
.os-lab.is-active .n { fill: var(--text); }
.os-pulse { fill: var(--amber); filter: drop-shadow(0 0 4px var(--orange)); transform-box: fill-box; animation: os-rise 2.2s var(--ease) infinite; }
@keyframes os-rise { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(-46px); opacity: 0; } }
.os-arch__list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.os-layer {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  width: 100%; padding: 14px 18px; border-radius: 16px; border: 1px solid var(--line); text-align: left;
  background: rgba(255,255,255,.015); color: var(--text);
  transition: border-color .3s, background-color .3s, transform .4s var(--ease);
}
.os-layer:hover { border-color: var(--line-2); transform: translateX(4px); }
.os-layer__n { font: 600 12px/1 var(--font-mono); color: var(--dim); }
.os-layer strong { display: block; font: 700 17px/1.2 var(--font-display); letter-spacing: -.01em; }
.os-layer small { display: block; margin-top: 3px; font-size: 13px; color: var(--muted); }
.os-layer .ico { width: 18px; height: 18px; color: var(--dim); transition: transform .3s var(--ease), color .3s; }
.os-layer[aria-pressed="true"] { border-color: rgba(255,90,0,.5); background: linear-gradient(90deg, rgba(255,90,0,.14), rgba(255,90,0,.02)); box-shadow: 0 16px 50px -30px var(--glow); }
.os-layer[aria-pressed="true"] .os-layer__n, .os-layer[aria-pressed="true"] .ico { color: var(--orange); }
.os-layer[aria-pressed="true"] .ico { transform: translateX(3px); }
.os-arch__detail { margin-top: 18px; padding: 24px; min-height: 196px; }
.os-arch__detail h3 { margin: 10px 0 8px; }
.os-arch__detail p { margin: 0; color: var(--muted); }
.os-arch__detail .row { margin-top: 16px; gap: 8px; }
.os-arch__detail .chip { font-family: var(--font-mono); font-size: 12px; }
.os-arch__detail.is-swap > * { animation: rv-up .5s var(--ease-out) backwards; }

.os-tl { position: relative; margin: 0; padding: 0; list-style: none; --p: 0; }
.os-tl::before, .os-tl::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; border-radius: 2px; }
.os-tl::before { background: var(--line); }
.os-tl::after { background: linear-gradient(var(--amber), var(--orange)); box-shadow: 0 0 18px var(--glow); transform-origin: top; transform: scaleY(var(--p)); }
.os-tl__item { position: relative; width: 50%; padding: 0 56px 56px 0; }
.os-tl__item:nth-child(even) { margin-left: 50%; padding: 0 0 56px 56px; }
.os-tl__item + .os-tl__item { margin-top: -72px; }
.os-tl__dot { position: absolute; top: 20px; right: -9px; z-index: 1; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line-2); transition: border-color .4s, box-shadow .4s, background-color .4s; }
.os-tl__item:nth-child(even) .os-tl__dot { right: auto; left: -9px; }
.os-tl__item.is-lit .os-tl__dot { border-color: var(--orange); background: var(--orange); box-shadow: 0 0 0 6px rgba(255,90,0,.15), 0 0 24px var(--glow); }
.os-tl__card { display: flex; flex-direction: column; gap: 10px; }
.os-tl__date { font: 600 12px/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--orange); }
.os-tl__card .h3 { margin: 0; }
.os-tl__card p { margin: 0; color: var(--muted); }
.os-tl__press { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.02); transition: border-color .25s, background-color .25s; }
.os-tl__press:hover { border-color: rgba(255,90,0,.45); background: rgba(255,90,0,.05); }
.os-tl__press small { font: 600 10.5px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.os-tl__press span { font-weight: 700; font-size: 14.5px; line-height: 1.4; }
.os-tl__item--now .os-tl__card { border-color: rgba(255,90,0,.35); background: radial-gradient(360px 200px at 0% 0%, rgba(255,90,0,.18), transparent 70%), linear-gradient(180deg, #151515, #0e0e0e); }

.os-steps { counter-reset: none; margin: 0; padding: 0; list-style: none; }
.os-step { display: flex; flex-direction: column; gap: 12px; min-height: 280px; }
.os-step__n { font: 900 64px/1 var(--font-display); letter-spacing: -.05em; color: transparent; -webkit-text-stroke: 1px rgba(255,122,31,.6); transition: color .4s, -webkit-text-stroke-color .4s; }
.os-step:hover .os-step__n { color: var(--orange); -webkit-text-stroke-color: var(--orange); }
.os-step .h3 { margin: 6px 0 0; }
.os-step p { margin: 0; color: var(--muted); }

.os-repos .grid-3 { margin-bottom: 20px; }
.os-repo { display: flex; flex-direction: column; gap: 12px; min-height: 280px; }
.os-repo__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.os-repo__ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--orange-2); transition: background-color .3s, color .3s, border-color .3s; }
.os-repo__ico .ico { width: 24px; height: 24px; }
.os-repo:hover .os-repo__ico { background: var(--orange); border-color: var(--orange); color: #0a0a0a; }
.os-repo .h3 { margin: 8px 0 0; }
.os-repo p { margin: 0; color: var(--muted); }
.os-repo .link-arrow { margin-top: auto; }
.os-org { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: clamp(22px, 3vw, 34px); }
.os-org__url { margin: 0; font: 600 clamp(18px, 2.6vw, 30px)/1.2 var(--font-mono); letter-spacing: -.02em; overflow-wrap: anywhere; }
.os-org__url span { color: var(--orange); }
.os-org p:not(.os-org__url) { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; }

.os-license { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 64px); align-items: center; padding: clamp(28px, 4vw, 56px); overflow: hidden; }
.os-license__big { margin: 0; font: 900 clamp(44px, 6vw, 92px)/.9 var(--font-display); letter-spacing: -.05em; }
.os-license__big span { display: block; }
.os-license__big span + span { color: transparent; -webkit-text-stroke: 1.5px var(--orange); }
.os-license ul { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.os-license li { display: flex; gap: 10px; align-items: flex-start; color: #d9d3cc; }
.os-license li .ico { flex: none; width: 18px; height: 18px; margin-top: 3px; color: var(--orange); }
.os-license .fine { margin: 18px 0 0; font-size: 13px; color: var(--dim); }

.os-cta__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.os-cta__stage { position: relative; height: clamp(340px, 40vw, 520px); }
.os-cta__stage > [id] { -webkit-mask-image: linear-gradient(#000 78%, transparent); mask-image: linear-gradient(#000 78%, transparent); }
.os-cta__stage .glow-orb { --size: 420px; --o: .45; left: 50%; top: 50%; margin: -210px 0 0 -210px; }
.os-cta__buy { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .dv-props { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dv-stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .dv-hero__grid { grid-template-columns: minmax(0, 1fr); }
  .dv-stage { max-width: 640px; }
  .dv-steps { grid-template-columns: minmax(0, 1fr); }
  .dv-steps::before { left: 31px; right: auto; top: 40px; bottom: 40px; width: 1px; height: auto; background: linear-gradient(var(--orange), var(--amber), transparent); transform: scaleY(0); transform-origin: top; }
  .dv-steps.is-in::before { transform: scaleY(1); }
  .os-arch, .os-license, .os-cta__grid { grid-template-columns: minmax(0, 1fr); }
  .os-arch__fig { max-width: 640px; }
  .os-rain { width: 100%; opacity: .5; }
}
@media (max-width: 760px) {
  .os-tl::before, .os-tl::after { left: 9px; }
  .os-tl__item, .os-tl__item:nth-child(even), .os-tl__item + .os-tl__item { width: auto; margin: 0; padding: 0 0 36px 44px; }
  .os-tl__dot, .os-tl__item:nth-child(even) .os-tl__dot { left: 0; right: auto; }
}
@media (max-width: 640px) {
  .dv-stage { padding-bottom: 0; }
  .dv-watch { position: relative; right: auto; bottom: auto; margin: -40px auto 0; --sw: 140px; --sh: 160px; }
  .dv-watch.is-round { --sw: 160px; --sh: 160px; }
  .dv-code { padding: 16px; font-size: 11px; overflow-x: auto; scrollbar-width: none; }
  .dv-code > * { white-space: pre; overflow-wrap: normal; }
  .dv-ide__file span { display: none; }
  .dv-log { height: 132px; padding-inline: 16px; font-size: 10.5px; }
  .dv-props { grid-template-columns: minmax(0, 1fr); }
  .dv-prop { min-height: 0; }
  .dv-specs li { flex-direction: column; gap: 2px; }
  .dv-specs strong { text-align: left; }
  .dv-stats__grid { gap: 20px 16px; }
  .dv-stat .stat__num { font-size: 36px; }
  .dv-cta__buy { padding: 22px; }
  .os-lab .s { display: none; }
  .os-arch__detail { min-height: 0; }
  .os-step, .os-repo { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .dv-caret, .os-rain__col, .os-pulse { animation: none !important; }
  .dv-steps::before { transition: none; }
}
