/* ==========================================================================
   VYREX DOCS · styles (loaded only on /docs)
   Uses the tokens from vyrex.css (--vx-*).
   ========================================================================== */
.vxd {
  --vxd-side: 284px;
  --vxd-toc: 236px;
  --vxd-top: calc(var(--vx-nav-h, 80px) + 22px);
  position: relative;
  display: grid;
  grid-template-columns: var(--vxd-side) minmax(0, 1fr) var(--vxd-toc);
  gap: 0 clamp(28px, 3.2vw, 64px);
  max-width: 1680px;
  margin: 0 auto;
  padding: var(--vxd-top) clamp(16px, 3vw, 48px) clamp(64px, 8vw, 120px);
  min-height: 100vh;
  isolation: isolate;
}
html.vxd-lock { overflow: hidden; }

/* ——— Background: warm ambient light + grid + gold seam ——— */
.vxd-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.vxd-bg__light {
  position: absolute; left: 50%; top: -340px; width: min(1500px, 140%); height: 820px; transform: translateX(-50%);
  background:
    radial-gradient(closest-side, rgba(207, 159, 85, 0.16), rgba(207, 159, 85, 0.05) 55%, transparent),
    radial-gradient(40% 60% at 15% 40%, rgba(236, 201, 133, 0.06), transparent 70%);
}
.vxd-bg__grid {
  position: absolute; inset: 0 0 auto; height: 900px;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 0%, #000 20%, transparent 75%);
  mask-image: radial-gradient(70% 70% at 50% 0%, #000 20%, transparent 75%);
}
.vxd::before {
  content: ""; position: absolute; left: 0; right: 0; top: calc(var(--vx-nav-h, 80px) + 2px); height: 1px; z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(236, 201, 133, 0.32) 30%, rgba(236, 201, 133, 0.32) 70%, transparent);
  opacity: .55;
}

/* ——— Sidebar ——— */
.vxd-side {
  position: sticky; top: var(--vxd-top); align-self: start;
  max-height: calc(100vh - var(--vxd-top) - 20px);
  display: flex; flex-direction: column; gap: 14px;
  overflow: hidden;
}
.vxd-brand { display: flex; align-items: center; gap: 12px; padding: 4px 2px; color: var(--vx-text); }
.vxd-brand__ico {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none;
  background: linear-gradient(160deg, rgba(236, 201, 133, .22), rgba(156, 110, 46, .08)); border: 1px solid var(--vx-line-gold);
  color: var(--vx-gold-2); font-size: 19px;
}
.vxd-brand strong { display: block; font: 600 16px/1.1 var(--vx-font-display); letter-spacing: .01em; }
.vxd-brand small { font: 500 11px/1 var(--vx-mono); color: var(--vx-gold-3); }
.vxd-search {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 44px; padding: 0 8px 0 14px;
  background: rgba(255, 255, 255, .025); border: 1px solid var(--vx-line-2); border-radius: 12px;
  color: var(--vx-muted); font: 500 14px var(--vx-font); cursor: pointer; text-align: left;
  transition: border-color .3s, background .3s, color .3s;
}
.vxd-search span { flex: 1; }
.vxd-search:hover { border-color: var(--vx-line-gold); background: rgba(236, 201, 133, .04); color: var(--vx-text); }
.vxd kbd, .vxd-k kbd {
  font: 500 10.5px/1 var(--vx-mono); color: var(--vx-muted); padding: 5px 7px; border-radius: 6px;
  background: var(--vx-key-2, #1a1a1d); border: 1px solid var(--vx-line-2); box-shadow: inset 0 -1px 0 rgba(0,0,0,.5);
}
.vxd-tree { position: relative; flex: 1; overflow-y: auto; overscroll-behavior: contain; margin: 0 -6px; padding: 4px 6px 10px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.1) transparent; }
.vxd-tree ul { list-style: none; margin: 0; padding: 0; }
.vxd-tree__label { display: flex; align-items: center; gap: 8px; margin: 18px 0 8px 10px; font: 600 11px/1 var(--vx-font); letter-spacing: .14em; text-transform: uppercase; color: var(--vx-dim); }
.vxd-tree__label:first-child { margin-top: 6px; }
.vxd-tree__label i { color: var(--vx-gold-3); font-size: 13px; }
.vxd-link {
  position: relative; display: flex; align-items: center; gap: 11px; width: 100%; min-height: 38px; padding: 8px 12px;
  border: 0; border-radius: 10px; background: none; cursor: pointer; text-align: left;
  font: 500 14.5px/1.25 var(--vx-font); color: #c8c3ba; transition: color .25s, background .25s;
}
.vxd-link > i:first-child { font-size: 17px; color: var(--vx-dim); transition: color .25s; flex: none; }
.vxd-link span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vxd-link:hover { color: #fff; background: rgba(255, 255, 255, .035); }
.vxd-link:hover > i:first-child { color: var(--vx-gold-2); }
.vxd-link.is-active { color: var(--vx-gold-1); background: linear-gradient(90deg, rgba(236, 201, 133, .1), rgba(236, 201, 133, .02)); }
.vxd-link.is-active > i:first-child { color: var(--vx-gold-2); }
.vxd-caret { font-size: 12px; color: var(--vx-dim); transition: transform .35s var(--vx-ease-out); }
.vxd-group.is-open > .vxd-link--group { color: #fff; }
.vxd-group.is-open > .vxd-link--group > i:first-child { color: var(--vx-gold-2); }
.vxd-group.is-open .vxd-caret { transform: rotate(90deg); color: var(--vx-gold-2); }
.vxd-sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--vx-ease-out); }
.vxd-sub > ul { overflow: hidden; position: relative; margin-left: 20px; padding-left: 12px; }
.vxd-sub > ul::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 1px; background: var(--vx-line-2); }
.vxd-group.is-open > .vxd-sub { grid-template-rows: 1fr; }
.vxd-link--sub { min-height: 34px; padding: 7px 10px; font-size: 14px; color: var(--vx-muted); }
.vxd-link--sub > i:first-child { font-size: 15px; }
.vxd-tree__mark {
  position: absolute; left: 6px; top: 0; width: 2px; height: 20px; border-radius: 2px; background: var(--vx-gold-grad);
  opacity: 0; transition: transform .45s var(--vx-ease-out), opacity .3s; pointer-events: none;
}
.vxd-side__help {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--vx-line-gold); background: linear-gradient(135deg, rgba(236, 201, 133, .08), rgba(255,255,255,.01));
  color: var(--vx-text); transition: border-color .3s, transform .3s var(--vx-ease-out);
}
.vxd-side__help > i:first-child { font-size: 22px; color: var(--vx-gold-2); }
.vxd-side__help span { flex: 1; }
.vxd-side__help strong { display: block; font-size: 14px; }
.vxd-side__help small { color: var(--vx-muted); font-size: 12.5px; }
.vxd-side__help:hover { border-color: rgba(236, 201, 133, .45); transform: translateY(-2px); }
.vxd-menu-btn, .vxd-scrim { display: none; }

/* ——— Main ——— */
.vxd-main { min-width: 0; }
.vxd-anim { animation: vxdIn .55s var(--vx-ease-out) both; }
@keyframes vxdIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .vxd-anim { animation-duration: .55s !important; animation-iteration-count: 1 !important; } }

.vxd-article { max-width: 860px; }
.vxd-article__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.vxd-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; color: var(--vx-dim); min-width: 0; }
.vxd-crumbs a { color: var(--vx-muted); transition: color .25s; }
.vxd-crumbs a:hover { color: var(--vx-gold-1); }
.vxd-crumbs i { font-size: 10px; opacity: .6; }
.vxd-crumbs strong { color: var(--vx-gold-2); font-weight: 600; }
.vxd-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; flex: none;
  border-radius: 10px; border: 1px solid var(--vx-line-2); background: var(--vx-key-2, #18181b); box-shadow: var(--vx-key-shadow-2, none);
  color: var(--vx-text); font: 500 13px var(--vx-font); cursor: pointer; transition: border-color .3s, transform .2s;
}
.vxd-pill:hover { border-color: var(--vx-line-gold); }
.vxd-pill:active { transform: translateY(1px); }
.vxd-article__head { display: flex; align-items: center; gap: 16px; }
.vxd-article__ico {
  width: 54px; height: 54px; flex: none; border-radius: 15px; display: grid; place-items: center; font-size: 27px; color: var(--vx-gold-2);
  background: linear-gradient(160deg, rgba(236, 201, 133, .18), rgba(156, 110, 46, .05)); border: 1px solid var(--vx-line-gold);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.vxd-article__head h1 { margin: 0; font: 600 clamp(32px, 3.6vw, 52px)/1.04 var(--vx-font-display); letter-spacing: -.025em; color: #fff; }
.vxd-lead { margin: 18px 0 0; max-width: 760px; font-size: 18px; line-height: 1.65; color: #b9b4ab; }
.vxd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 22px 0 6px; padding-bottom: 26px; border-bottom: 1px solid var(--vx-line); font-size: 13px; color: var(--vx-muted); }
.vxd-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.vxd-meta i { color: var(--vx-gold-3); font-size: 15px; }
.vxd-meta code { font: 500 12px var(--vx-mono); color: var(--vx-gold-1); }
.vxd-meta__fw { gap: 6px !important; }
.vxd-meta__fw b, .vxd-script__meta b {
  font: 600 11px/1 var(--vx-font); letter-spacing: .04em; padding: 6px 9px; border-radius: 7px;
  color: var(--vx-gold-1); background: rgba(236, 201, 133, .08); border: 1px solid var(--vx-line-gold);
}

/* ——— Prose ——— */
.vxd-prose { margin-top: 30px; font-size: 16px; line-height: 1.78; color: #cbc6bd; overflow-wrap: anywhere; }
.vxd-prose > :first-child { margin-top: 0; }
.vxd-prose p { margin: 0 0 16px; }
.vxd-prose strong { color: #fff; font-weight: 700; }
.vxd-prose a:not(.vxd-card):not(.vxd-anchor) { color: var(--vx-gold-1); text-decoration: underline; text-decoration-color: rgba(236, 201, 133, .4); text-underline-offset: 4px; transition: text-decoration-color .25s; }
.vxd-prose a:not(.vxd-card):not(.vxd-anchor):hover { text-decoration-color: var(--vx-gold-2); }
.vxd-prose h2 { position: relative; margin: 54px 0 16px; padding-top: 6px; font: 600 clamp(24px, 2.2vw, 30px)/1.2 var(--vx-font-display); letter-spacing: -.015em; color: #fff; scroll-margin-top: 120px; }
.vxd-prose h2::before { content: ""; display: block; width: 34px; height: 2px; margin-bottom: 16px; border-radius: 2px; background: var(--vx-gold-grad); }
.vxd-prose h3 { position: relative; margin: 30px 0 10px; font: 600 20px/1.3 var(--vx-font-display); color: #fff; }
.vxd-anchor { margin-left: 10px; font-size: .7em; color: var(--vx-dim); opacity: 0; transition: opacity .2s, color .2s; vertical-align: middle; }
.vxd-prose h2:hover .vxd-anchor, .vxd-prose h3:hover .vxd-anchor { opacity: 1; }
.vxd-anchor:hover { color: var(--vx-gold-2); }
.vxd-prose ul, .vxd-prose ol { margin: 6px 0 18px; padding-left: 22px; }
.vxd-prose ul { list-style: none; padding-left: 0; }
.vxd-prose ul > li { position: relative; padding-left: 22px; margin: 6px 0; }
.vxd-prose ul > li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 6px; height: 6px; border-radius: 2px; transform: rotate(45deg); background: var(--vx-gold-2); }
.vxd-prose ol:not(.vxd-steps) { counter-reset: vxo; list-style: none; padding-left: 0; }
.vxd-prose ol:not(.vxd-steps) > li { counter-increment: vxo; position: relative; padding-left: 34px; margin: 8px 0; }
.vxd-prose ol:not(.vxd-steps) > li::before { content: counter(vxo) "."; position: absolute; left: 4px; top: 0; font: 700 15px/1.78 var(--vx-font); color: var(--vx-gold-2); }
.vxd-prose code {
  font: 500 .86em var(--vx-mono); padding: 3px 7px; border-radius: 6px; color: #f3dfb5;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--vx-line-2); white-space: break-spaces;
}
.vxd-prose kbd { font-size: 12px; }
.vxd-prose mark.vxd-hit { background: rgba(236, 201, 133, .3); color: #fff; border-radius: 3px; box-shadow: 0 0 0 2px rgba(236, 201, 133, .3); }

/* tables */
.vxd-table { margin: 18px 0 26px; overflow-x: auto; border: 1px solid var(--vx-line-2); border-radius: 14px; background: rgba(255,255,255,.015); }
.vxd-table table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.55; }
.vxd-table th { text-align: left; padding: 14px 18px; font: 600 12.5px/1.2 var(--vx-font); letter-spacing: .06em; text-transform: uppercase; color: var(--vx-gold-2); background: rgba(236, 201, 133, .045); border-bottom: 1px solid var(--vx-line-2); white-space: nowrap; }
.vxd-table td { padding: 14px 18px; border-bottom: 1px solid var(--vx-line); vertical-align: top; color: #d2cdc4; }
.vxd-table tr:last-child td { border-bottom: 0; }
.vxd-table tbody tr { transition: background .2s; }
.vxd-table tbody tr:hover { background: rgba(255,255,255,.02); }
.vxd-table td:first-child { color: #fff; font-weight: 500; }

/* callouts */
.vxd-call {
  --c: 120, 170, 255; position: relative; display: flex; gap: 14px; margin: 20px 0 24px; padding: 16px 18px 16px 16px;
  border-radius: 14px; border: 1px solid rgba(var(--c), .25); background: linear-gradient(135deg, rgba(var(--c), .09), rgba(var(--c), .02));
}
.vxd-call > i.vxd-call__ico { font-size: 20px; line-height: 1.5; color: rgb(var(--c)); flex: none; }
.vxd-call > div { min-width: 0; }
.vxd-call p { margin: 0; }
.vxd-call p + p { margin-top: 8px; }
.vxd-call--info { --c: 130, 170, 255; }
.vxd-call--tip { --c: 236, 201, 133; }
.vxd-call--warn { --c: 245, 166, 80; }
.vxd-call--danger { --c: 240, 100, 100; }
.vxd-call--success { --c: 110, 210, 140; }

/* steps */
.vxd-steps { list-style: none; counter-reset: vxs; margin: 26px 0; padding: 0 !important; }
.vxd-steps > li { counter-increment: vxs; position: relative; padding: 0 0 18px 64px !important; margin: 0 !important; }
.vxd-steps > li::before {
  content: counter(vxs); position: absolute; left: 0; top: -4px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; font: 700 16px/1 var(--vx-font-display); color: #1b1407;
  background: var(--vx-gold-grad); box-shadow: 0 0 0 6px var(--vx-bg), 0 0 0 7px var(--vx-line-gold);
  transform: none !important; border-radius: 50% !important;
}
.vxd-steps > li::after { content: ""; position: absolute; left: 19.5px; top: 44px; bottom: 2px; width: 1px; background: linear-gradient(var(--vx-line-gold), var(--vx-line)); }
.vxd-steps > li:last-child::after { display: none; }
.vxd-steps > li > h3 { margin: 2px 0 10px; font-size: clamp(20px, 1.8vw, 24px); scroll-margin-top: 120px; }

/* code */
.vxd-code { margin: 16px 0 24px; border-radius: 14px; border: 1px solid var(--vx-line-2); background: #0b0b0d; overflow: hidden; box-shadow: 0 24px 50px -30px rgba(0,0,0,.8); }
.vxd-code__head { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 8px 0 14px; border-bottom: 1px solid var(--vx-line); background: rgba(255,255,255,.02); }
.vxd-code__dots { display: flex; gap: 6px; }
.vxd-code__dots i { width: 9px; height: 9px; border-radius: 50%; background: #2a2a2e; }
.vxd-code__dots i:first-child { background: rgba(236, 201, 133, .55); }
.vxd-code__file { flex: 1; display: inline-flex; align-items: center; gap: 7px; min-width: 0; font: 500 12.5px var(--vx-mono); color: #cfcac1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.vxd-code__file i { color: var(--vx-gold-3); font-size: 14px; }
.vxd-code__lang { font: 600 10.5px var(--vx-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--vx-dim); }
.vxd-copy {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--vx-line-2); background: rgba(255,255,255,.03); color: var(--vx-muted); font: 500 12px var(--vx-font); cursor: pointer; transition: color .2s, border-color .2s;
}
.vxd-copy:hover { color: #fff; border-color: var(--vx-line-gold); }
.vxd-copy.is-done { color: #8fe0a8; border-color: rgba(110, 210, 140, .4); }
.vxd-code__pre { margin: 0; padding: 16px 0; overflow-x: auto; font: 400 13.5px/1.75 var(--vx-mono); color: #e6e1d8; tab-size: 4; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.12) transparent; }
.vxd-code__pre code { display: block; min-width: max-content; padding: 0; border: 0; background: none; font: inherit; color: inherit; white-space: pre; }
.vxd-ln { display: flex; padding-right: 20px; }
.vxd-ln:hover { background: rgba(255,255,255,.025); }
.vxd-ln__n { width: 48px; flex: none; padding-right: 16px; text-align: right; color: #45423d; user-select: none; }
.vxd-ln__c { flex: 1; }
.t-c { color: #6d6a64; font-style: italic; }
.t-s { color: #e8c789; }
.t-n { color: #f0a868; }
.t-k { color: #c9a0ff; }
.t-f { color: #8cc7ff; }
.t-g { color: #fff2d6; }

/* tabs */
.vxd-tabs { margin: 16px 0 24px; }
.vxd-tabs__bar { position: relative; display: inline-flex; gap: 2px; padding: 4px; margin-bottom: -4px; border-radius: 12px; border: 1px solid var(--vx-line-2); background: rgba(255,255,255,.02); max-width: 100%; overflow-x: auto; }
.vxd-tabs__btn { position: relative; z-index: 1; height: 32px; padding: 0 14px; border: 0; border-radius: 8px; background: none; color: var(--vx-muted); font: 500 13px var(--vx-font); cursor: pointer; white-space: nowrap; transition: color .25s; }
.vxd-tabs__btn:hover { color: #fff; }
.vxd-tabs__btn.is-on { color: #1b1407; }
.vxd-tabs__ind { position: absolute; left: 0; top: 4px; height: 32px; border-radius: 8px; background: var(--vx-gold-grad); transition: transform .4s var(--vx-ease-out), width .4s var(--vx-ease-out); }
.vxd-tabs__pane { display: none; }
.vxd-tabs__pane.is-on { display: block; animation: vxdIn .4s var(--vx-ease-out) both; }

/* feature grid / tiers / cards */
.vxd-feats { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 18px 0 26px; }
.vxd-feats > div { display: grid; gap: 4px; padding: 18px; border-radius: 14px; border: 1px solid var(--vx-line-2); background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.005)); transition: border-color .3s, transform .3s var(--vx-ease-out); }
.vxd-feats > div:hover { border-color: var(--vx-line-gold); transform: translateY(-2px); }
.vxd-feats i { font-size: 26px; color: var(--vx-gold-2); margin-bottom: 8px; }
.vxd-feats strong { font-size: 15.5px; }
.vxd-feats span { font-size: 14px; line-height: 1.55; color: var(--vx-muted); }
.vxd-tiers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 18px 0 26px; }
.vxd-tiers > div { position: relative; display: grid; gap: 2px; padding: 16px 14px; border-radius: 12px; border: 1px solid var(--vx-line-2); background: rgba(255,255,255,.02); overflow: hidden; }
.vxd-tiers > div::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--vx-gold-grad); transform-origin: left; }
.vxd-tiers > div:nth-child(1)::after { transform: scaleX(.2); }
.vxd-tiers > div:nth-child(2)::after { transform: scaleX(.4); }
.vxd-tiers > div:nth-child(3)::after { transform: scaleX(.6); }
.vxd-tiers > div:nth-child(4)::after { transform: scaleX(.8); }
.vxd-tiers b { font: 500 12px var(--vx-mono); color: var(--vx-gold-3); }
.vxd-tiers strong { font: 600 16px/1.3 var(--vx-font-display); }
.vxd-tiers span { font-size: 12.5px; line-height: 1.45; color: var(--vx-muted); }
.vxd-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 18px 0 26px; }
.vxd-card {
  position: relative; display: grid; gap: 4px; padding: 18px 44px 18px 18px; border-radius: 14px; border: 1px solid var(--vx-line-2);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.005)); color: var(--vx-text); text-decoration: none !important;
  transition: border-color .3s, transform .35s var(--vx-ease-out), background .3s;
}
.vxd-card > i.vxd-card__go { position: absolute; right: 16px; top: 18px; margin: 0; font-size: 16px; color: var(--vx-dim); transition: color .3s, transform .35s var(--vx-ease-out); }
.vxd-card i { font-size: 24px; color: var(--vx-gold-2); margin-bottom: 8px; }
.vxd-card strong { font-size: 15.5px; color: #fff; }
.vxd-card span { font-size: 13.5px; line-height: 1.55; color: var(--vx-muted); }
.vxd-card:hover { border-color: var(--vx-line-gold); transform: translateY(-3px); background: linear-gradient(180deg, rgba(236,201,133,.06), rgba(255,255,255,.005)); }
.vxd-card:hover > i.vxd-card__go { color: var(--vx-gold-2); transform: translate(2px, -2px); }

/* faq */
.vxd-faq { margin: 10px 0; border: 1px solid var(--vx-line-2); border-radius: 14px; background: rgba(255,255,255,.015); transition: border-color .3s, background .3s; }
.vxd-faq[open] { border-color: var(--vx-line-gold); background: rgba(236, 201, 133, .03); }
.vxd-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; cursor: pointer; list-style: none; font-weight: 600; color: #fff; }
.vxd-faq summary::-webkit-details-marker { display: none; }
.vxd-faq summary i { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--vx-line-2); color: var(--vx-gold-2); transition: transform .35s var(--vx-ease-out); }
.vxd-faq[open] summary i { transform: rotate(45deg); }
.vxd-faq > div { padding: 0 18px 4px; animation: vxdIn .35s var(--vx-ease-out) both; }

/* helpful + prev/next */
.vxd-help { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 56px 0 18px; padding: 16px 18px; border-radius: 14px; border: 1px dashed var(--vx-line-2); color: var(--vx-muted); font-size: 14px; }
.vxd-help > span { margin-right: auto; }
.vxd-help button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--vx-line-2); background: rgba(255,255,255,.03); color: var(--vx-text); font: 500 13px var(--vx-font); cursor: pointer; transition: border-color .25s, color .25s; }
.vxd-help button:hover { border-color: var(--vx-line-gold); color: var(--vx-gold-1); }
.vxd-help.is-done { border-style: solid; border-color: rgba(110, 210, 140, .3); color: #b6ecc6; }
.vxd-help.is-done i { color: #8fe0a8; font-size: 18px; }
.vxd-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vxd-pn__a { display: grid; gap: 4px; padding: 18px 20px; border-radius: 14px; border: 1px solid var(--vx-line-2); background: rgba(255,255,255,.02); transition: border-color .3s, transform .35s var(--vx-ease-out); }
.vxd-pn__a small { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--vx-muted); }
.vxd-pn__a strong { font: 600 18px/1.3 var(--vx-font-display); color: #fff; }
.vxd-pn__a span { font-size: 12.5px; color: var(--vx-gold-3); }
.vxd-pn__a--next { text-align: right; }
.vxd-pn__a--next small { justify-content: flex-end; }
.vxd-pn__a:hover { border-color: var(--vx-line-gold); transform: translateY(-2px); }

/* ——— Table of contents ——— */
.vxd-toc { position: sticky; top: var(--vxd-top); align-self: start; max-height: calc(100vh - var(--vxd-top) - 20px); overflow-y: auto; scrollbar-width: none; }
.vxd-toc:empty { display: block; }
.vxd-toc__search { display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--vx-line-2); background: rgba(255,255,255,.02); color: var(--vx-muted); transition: border-color .3s; }
.vxd-toc__search:focus-within { border-color: var(--vx-line-gold); }
.vxd-toc__search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--vx-text); font: 500 13.5px var(--vx-font); }
.vxd-toc__search input::placeholder { color: var(--vx-dim); }
.vxd-toc__label { display: flex; align-items: center; gap: 8px; margin: 22px 0 12px; font: 600 11px/1 var(--vx-font); letter-spacing: .14em; text-transform: uppercase; color: var(--vx-dim); }
.vxd-toc__label i { font-size: 14px; color: var(--vx-gold-3); }
.vxd-toc__list { position: relative; display: grid; padding-left: 14px; }
.vxd-toc__rail { position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--vx-line-2); }
.vxd-toc__mark { position: absolute; left: 0; top: 0; width: 2px; margin-left: -.5px; border-radius: 2px; background: var(--vx-gold-grad); transition: transform .4s var(--vx-ease-out), height .4s var(--vx-ease-out); }
.vxd-toc__list a { padding: 6px 0; font-size: 13.5px; line-height: 1.4; color: var(--vx-muted); transition: color .25s, opacity .25s; }
.vxd-toc__list a.is-sub { padding-left: 0; }
.vxd-toc__list a:hover { color: #fff; }
.vxd-toc__list a.is-on { color: var(--vx-gold-1); }
.vxd-toc__list a.is-dim { opacity: .3; }
.vxd-toc__foot { display: grid; gap: 2px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--vx-line); }
.vxd-toc__foot a, .vxd-toc__foot button { display: flex; align-items: center; gap: 8px; padding: 6px 0; border: 0; background: none; text-align: left; color: var(--vx-muted); font: 500 13px var(--vx-font); cursor: pointer; transition: color .25s; }
.vxd-toc__foot i { color: var(--vx-gold-3); font-size: 15px; }
.vxd-toc__foot a:hover, .vxd-toc__foot button:hover { color: var(--vx-gold-1); }

/* ——— Home ——— */
.vxd.is-home { grid-template-columns: var(--vxd-side) minmax(0, 1fr); }
.vxd.is-home .vxd-toc { display: none; }
.vxd-home .vx-eyebrow { margin-bottom: 16px; }
.vxd-home__title { display: flex; align-items: center; flex-wrap: wrap; gap: 0 .28em; margin: 0; font: 600 clamp(38px, 4.6vw, 70px)/1 var(--vx-font-display); letter-spacing: -.03em; color: #fff; }
.vxd-home__title > i { margin-right: .12em; font-size: .8em; color: var(--vx-gold-2); transform-origin: 70% 80%; animation: vxdWave 2.6s ease-in-out .6s 2; }
@keyframes vxdWave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20%, 40% { transform: rotate(-8deg); } }
.vxd-home__lead { max-width: 760px; margin: 20px 0 0; font-size: 18px; line-height: 1.65; color: #b9b4ab; }
.vxd-home__row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.vxd-home__search {
  display: flex; align-items: center; gap: 12px; flex: 1 1 340px; max-width: 520px; height: 52px; padding: 0 10px 0 18px;
  border-radius: 14px; border: 1px solid var(--vx-line-2); background: rgba(255,255,255,.03); color: var(--vx-muted); font: 500 15px var(--vx-font); cursor: pointer; text-align: left;
  transition: border-color .3s, background .3s;
}
.vxd-home__search i { font-size: 19px; color: var(--vx-gold-2); }
.vxd-home__search span { flex: 1; }
.vxd-home__search:hover { border-color: var(--vx-line-gold); background: rgba(236, 201, 133, .04); }
.vxd-home__row .vx-btn { height: 52px; }
.vxd-support {
  position: relative; display: flex; align-items: center; gap: 18px; max-width: 760px; margin-top: 26px; padding: 20px 22px;
  border-radius: 18px; border: 1px solid var(--vx-line-gold); background: linear-gradient(120deg, rgba(236, 201, 133, .1), rgba(236, 201, 133, .02) 60%), rgba(255,255,255,.01);
  color: var(--vx-text); overflow: hidden; transition: border-color .3s, transform .35s var(--vx-ease-out);
}
.vxd-support::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 0 3px 3px 0; background: var(--vx-gold-grad); }
.vxd-support__ico { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 13px; background: rgba(236, 201, 133, .12); border: 1px solid var(--vx-line-gold); font-size: 24px; color: var(--vx-gold-1); }
.vxd-support > span:nth-child(2) { flex: 1; }
.vxd-support strong { display: block; font-size: 16.5px; margin-bottom: 3px; }
.vxd-support small { font-size: 14px; line-height: 1.5; color: var(--vx-muted); }
.vxd-support > i { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; border: 1px solid var(--vx-line-2); color: var(--vx-gold-1); transition: transform .35s var(--vx-ease-out); }
a.vxd-support:hover { border-color: rgba(236, 201, 133, .45); transform: translateY(-2px); }
a.vxd-support:hover > i { transform: translateX(3px); }
.vxd-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 34px; border: 1px solid var(--vx-line); border-radius: 16px; background: rgba(255,255,255,.015); }
.vxd-stats > div { display: grid; gap: 4px; padding: 18px 20px; border-left: 1px solid var(--vx-line); }
.vxd-stats > div:first-child { border-left: 0; }
.vxd-stats b { font: 600 24px/1.1 var(--vx-font-display); background: var(--vx-gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.vxd-stats span { font-size: 13px; color: var(--vx-muted); }
.vxd-home__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 54px 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--vx-line); }
.vxd-home__head h2 { margin: 0; font: 600 clamp(24px, 2.4vw, 32px)/1.1 var(--vx-font-display); letter-spacing: -.015em; }
.vxd-home__head span { font-size: 13px; color: var(--vx-dim); }
.vxd-scripts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.vxd-script {
  position: relative; display: flex; flex-direction: column; border-radius: 18px; border: 1px solid var(--vx-line-2); background: var(--vx-surface);
  overflow: hidden; color: var(--vx-text); transition: border-color .35s, transform .45s var(--vx-ease-out), box-shadow .45s;
  animation: vxdIn .6s var(--vx-ease-out) both; animation-delay: calc(var(--i, 0) * 70ms + 120ms);
}
.vxd-script:hover { border-color: var(--vx-line-gold); transform: translateY(-4px); box-shadow: 0 30px 60px -36px rgba(0,0,0,.9); }
.vxd-cover { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #0d0c0a; }
.vxd-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: sepia(.55) saturate(.8) brightness(.55) contrast(1.05); transform: scale(1.04); transition: transform .9s var(--vx-ease-out), filter .6s; }
.vxd-script:hover .vxd-cover img { transform: scale(1.1); filter: sepia(.4) saturate(.9) brightness(.62) contrast(1.05); }
.vxd-cover__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,8,10,.1), rgba(8,8,10,.25) 50%, rgba(8,8,10,.92)), radial-gradient(80% 80% at 80% 10%, rgba(236,201,133,.2), transparent 60%); }
.vxd-cover__grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 28px 28px; -webkit-mask-image: linear-gradient(90deg, #000, transparent 70%); mask-image: linear-gradient(90deg, #000, transparent 70%); }
.vxd-cover__logo { position: absolute; right: 16px; top: 16px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: rgba(8,8,10,.55); border: 1px solid var(--vx-line-gold); color: var(--vx-gold-1); font-size: 20px; backdrop-filter: blur(6px); }
.vxd-cover__title { position: absolute; left: 20px; bottom: 16px; display: grid; font: 700 clamp(34px, 3.4vw, 48px)/.92 var(--vx-font-display); letter-spacing: -.02em; text-transform: uppercase; color: #fff; }
.vxd-cover__title .is-gold { background: var(--vx-gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.vxd-cover__res { position: absolute; right: 16px; bottom: 18px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 7px; background: rgba(8,8,10,.6); border: 1px solid var(--vx-line-2); font: 500 11px var(--vx-mono); color: #d8d3ca; }
.vxd-script__tags { display: flex; gap: 6px; padding: 12px 16px; overflow: hidden; border-bottom: 1px solid var(--vx-line); background: rgba(255,255,255,.015); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.vxd-script__tags em { flex: none; font: 600 11px/1 var(--vx-font); font-style: normal; padding: 6px 9px; border-radius: 6px; background: rgba(255,255,255,.04); border: 1px solid var(--vx-line-2); color: #ddd8cf; white-space: nowrap; }
.vxd-script__body { display: grid; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.vxd-script__body > strong { font: 600 19px/1.25 var(--vx-font-display); color: #fff; }
.vxd-script__link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--vx-gold-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(236,201,133,.35); }
.vxd-script__body p { margin: 4px 0 0; font-size: 14px; line-height: 1.55; color: var(--vx-muted); }
.vxd-script__meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--vx-line); }
.vxd-script__meta > span { display: flex; gap: 5px; flex-wrap: wrap; }
.vxd-script__meta small { font: 500 11.5px var(--vx-mono); color: var(--vx-dim); white-space: nowrap; }
.vxd-script__go { position: absolute; right: 16px; top: calc(56.25% + 60px); display: none; }

/* ——— Ctrl K palette ——— */
.vxd-k { position: fixed; inset: 0; z-index: 9000; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; background: rgba(5,5,6,.6); backdrop-filter: blur(8px); opacity: 0; transition: opacity .22s; }
.vxd-k[hidden] { display: none; }
.vxd-k.is-open { opacity: 1; }
.vxd-k__box { width: min(640px, 100%); border-radius: 18px; border: 1px solid var(--vx-line-2); background: #101012; box-shadow: 0 40px 100px -30px rgba(0,0,0,.9), 0 0 0 1px rgba(236,201,133,.06); overflow: hidden; transform: translateY(-10px) scale(.98); transition: transform .3s var(--vx-ease-out); }
.vxd-k.is-open .vxd-k__box { transform: none; }
.vxd-k__field { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 16px 0 20px; border-bottom: 1px solid var(--vx-line); }
.vxd-k__field > i { font-size: 20px; color: var(--vx-gold-2); }
.vxd-k__field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: #fff; font: 500 16px var(--vx-font); }
.vxd-k__field input::placeholder { color: var(--vx-dim); }
.vxd-k__list { max-height: min(56vh, 460px); overflow-y: auto; padding: 8px; scrollbar-width: thin; }
.vxd-k__group { margin: 8px 12px 6px; font: 600 11px/1 var(--vx-font); letter-spacing: .14em; text-transform: uppercase; color: var(--vx-dim); }
.vxd-k__item { display: flex; align-items: center; gap: 14px; padding: 11px 12px; border-radius: 11px; color: var(--vx-text); }
.vxd-k__item > i:first-child { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 9px; background: rgba(255,255,255,.04); border: 1px solid var(--vx-line); color: var(--vx-gold-2); font-size: 17px; }
.vxd-k__item > span { flex: 1; min-width: 0; display: grid; }
.vxd-k__item strong { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vxd-k__item small { font-size: 12.5px; color: var(--vx-muted); }
.vxd-k__item mark { background: none; color: var(--vx-gold-1); text-decoration: underline; text-underline-offset: 3px; }
.vxd-k__enter { color: var(--vx-dim); opacity: 0; transition: opacity .15s; }
.vxd-k__item.is-sel { background: rgba(236, 201, 133, .08); }
.vxd-k__item.is-sel > i:first-child { border-color: var(--vx-line-gold); }
.vxd-k__item.is-sel .vxd-k__enter { opacity: 1; }
.vxd-k__empty { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px 16px; color: var(--vx-muted); }
.vxd-k__foot { display: flex; gap: 18px; padding: 12px 18px; border-top: 1px solid var(--vx-line); font-size: 12px; color: var(--vx-dim); }
.vxd-k__foot kbd { margin-right: 4px; padding: 3px 6px; }

/* toast */
.vxd-toast { position: fixed; left: 50%; bottom: 28px; z-index: 9100; display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 12px; background: #141416; border: 1px solid var(--vx-line-gold); color: #fff; font-size: 14px; box-shadow: 0 20px 50px -20px rgba(0,0,0,.9); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: transform .35s var(--vx-ease-out), opacity .25s; }
.vxd-toast i { color: var(--vx-gold-2); font-size: 18px; }
.vxd-toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* ——— Responsive ——— */
@media (max-width: 1280px) {
  .vxd { grid-template-columns: var(--vxd-side) minmax(0, 1fr); }
  .vxd-toc { display: none; }
}
@media (max-width: 960px) {
  .vxd, .vxd.is-home { grid-template-columns: minmax(0, 1fr); padding-top: calc(var(--vx-nav-h, 66px) + 14px); }
  .vxd-menu-btn {
    position: sticky; top: calc(var(--vx-nav-h, 66px) + 8px); z-index: 30; display: flex; align-items: center; gap: 10px; height: 44px; margin-bottom: 20px; padding: 0 14px;
    border-radius: 12px; border: 1px solid var(--vx-line-2); background: rgba(16,16,18,.88); backdrop-filter: blur(12px); color: var(--vx-text); font: 600 14px var(--vx-font); cursor: pointer;
  }
  .vxd-menu-btn i { font-size: 18px; color: var(--vx-gold-2); }
  .vxd-menu-btn em { margin-left: auto; font-style: normal; font-weight: 500; color: var(--vx-muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .vxd-side {
    position: fixed; top: var(--vx-nav-h, 66px); left: 0; bottom: 0; z-index: 8000; width: min(320px, 86vw); max-height: none; padding: 20px 16px;
    background: #0d0d0f; border-right: 1px solid var(--vx-line-2); transform: translateX(-102%); transition: transform .45s var(--vx-ease-out);
  }
  .vxd.side-open .vxd-side { transform: none; }
  .vxd-scrim { display: block; position: fixed; inset: var(--vx-nav-h, 66px) 0 0 0; z-index: 7999; background: rgba(0,0,0,.55); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .3s; }
  .vxd.side-open .vxd-scrim { opacity: 1; pointer-events: auto; }
  .vxd-stats { grid-template-columns: 1fr 1fr; }
  .vxd-stats > div:nth-child(3) { border-left: 0; }
  .vxd-stats > div:nth-child(n+3) { border-top: 1px solid var(--vx-line); }
  .vxd-tiers { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .vxd-article__top { flex-direction: column; align-items: flex-start; }
  .vxd-article__ico { width: 46px; height: 46px; font-size: 23px; border-radius: 13px; }
  .vxd-lead, .vxd-home__lead { font-size: 16.5px; }
  .vxd-pn { grid-template-columns: 1fr; }
  .vxd-steps > li { padding-left: 52px !important; }
  .vxd-steps > li::before { width: 34px; height: 34px; font-size: 14px; }
  .vxd-steps > li::after { left: 16.5px; top: 38px; }
  .vxd-support { flex-wrap: wrap; }
  .vxd-support > i { display: none; }
  .vxd-k__foot { display: none; }
  .vxd-code__lang { display: none; }
}
