/* Urban Ledger developer docs (views/docs/index.ejs, public/js/docs/reference.js).
 * Urban Ledger design bible: Outfit + JetBrains Mono, cobalt #1058FF, white
 * base, hairlines not shadows, cobalt field as the only gradient.
 * Light by default; dark when chosen (html[data-theme="dark"], saved).
 * Breakpoints (bible): sm 480, md 768, lg 1024, xl 1440. */

:root {
  --dx-font: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --dx-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --dx-top-h: 64px;
  --dx-side-w: 280px;
  --dx-r-sm: 8px;
  --dx-r: 12px;
  --dx-r-lg: 16px;
  --dx-r-xl: 22px;
  --dx-pill: 999px;

  --dx-bg: #ffffff;
  --dx-bg-soft: #f7f9ff;
  --dx-surface: #ffffff;
  --dx-line: #e4eaf7;
  --dx-line-soft: #eef2fa;
  --dx-line-strong: #cbd6ee;
  --dx-ink: #0b1633;
  --dx-body: #3c4763;
  --dx-muted: #6a7488;
  --dx-faint: #9aa3b5;
  --dx-brand: #1058ff;
  --dx-brand-strong: #0a34d8;
  --dx-brand-soft: #eef3ff;
  --dx-brand-line: #c7d8ff;
  --dx-on-brand: #ffffff;
  --dx-lime: #c6f24e;
  --dx-lime-ink: #0a2b00;
  --dx-pos: #12965a;
  --dx-pos-soft: #eaf7f0;
  --dx-warn: #b26a00;
  --dx-warn-soft: #fff4e0;
  --dx-warn-line: #f2d9a6;
  --dx-magenta: #ff3d9a;
  --dx-hover: #f4f7ff;
  --dx-glass: rgba(255, 255, 255, 0.82);
  --dx-float: 0 18px 44px -22px rgba(10, 32, 110, 0.45);
  --dx-float-lg: 0 32px 80px -24px rgba(10, 32, 110, 0.45);

  --dx-code-bg: #0b1633;
  --dx-code-head: #0e1c40;
  --dx-code-line: #1c2a52;
  --dx-code-text: #e9eaef;
  --dx-code-muted: #8b95b3;
  --dx-code-str: #c6f24e;
  --dx-code-num: #7fa5ff;
  --dx-code-key: #ffffff;
  --dx-code-bool: #b0c8ff;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --dx-bg: #0a0b0f;
  --dx-bg-soft: #0e1015;
  --dx-surface: #111319;
  --dx-line: #1e212a;
  --dx-line-soft: #171a21;
  --dx-line-strong: #2b2f3b;
  --dx-ink: #f1f2f5;
  --dx-body: #c3c7d2;
  --dx-muted: #8b8f9c;
  --dx-faint: #626774;
  --dx-brand: #5b8bff;
  --dx-brand-strong: #8fb0ff;
  --dx-brand-soft: rgba(91, 139, 255, 0.13);
  --dx-brand-line: rgba(91, 139, 255, 0.34);
  --dx-pos: #7be3a8;
  --dx-pos-soft: rgba(123, 227, 168, 0.12);
  --dx-warn: #ffc978;
  --dx-warn-soft: rgba(255, 201, 120, 0.12);
  --dx-warn-line: rgba(255, 201, 120, 0.32);
  --dx-hover: #151821;
  --dx-glass: rgba(10, 11, 15, 0.78);
  --dx-float: 0 18px 44px -22px rgba(0, 0, 0, 0.9);
  --dx-float-lg: 0 32px 80px -24px rgba(0, 0, 0, 0.9);
  --dx-code-bg: #0d0f15;
  --dx-code-head: #12151d;
  --dx-code-line: #1f232d;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--dx-bg);
  color: var(--dx-body);
  font-family: var(--dx-font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a {
  color: inherit;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
code,
kbd,
pre,
.dx-mono {
  font-family: var(--dx-mono);
}
:focus-visible {
  outline: 2px solid var(--dx-brand);
  outline-offset: 2px;
}
::selection {
  background: var(--dx-brand-soft);
}
.dx-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.dx-skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: var(--dx-r);
  background: var(--dx-brand);
  color: var(--dx-on-brand);
  font-weight: 600;
  text-decoration: none;
}
.dx-skip:focus {
  top: 12px;
}
.dx-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid var(--dx-line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--dx-surface);
  font-family: var(--dx-mono);
  font-size: 11px;
  color: var(--dx-muted);
}

/* ---- top bar --------------------------------------------------------------- */
.dx-top {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--dx-top-h);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  background: var(--dx-glass);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--dx-line);
}
.dx-top > .dx-menu-btn {
  display: none;
}
.dx-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}
.dx-logo {
  display: block;
  height: 28px;
  width: auto;
}
.dx-logo--dark,
:root[data-theme="dark"] .dx-logo--light {
  display: none;
}
:root[data-theme="dark"] .dx-logo--dark {
  display: block;
}
.dx-brand-sub {
  padding: 2px 9px;
  border: 1px solid var(--dx-brand-line);
  border-radius: var(--dx-pill);
  color: var(--dx-brand);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.dx-find {
  justify-self: center;
  width: min(460px, 100%);
  height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 0 14px;
  border: 1px solid var(--dx-line);
  border-radius: var(--dx-pill);
  background: var(--dx-bg-soft);
  color: var(--dx-faint);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.dx-find:hover {
  border-color: var(--dx-line-strong);
  background: var(--dx-surface);
}
.dx-find-text {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dx-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dx-seg {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--dx-pill);
  background: var(--dx-bg-soft);
  border: 1px solid var(--dx-line);
}
.dx-seg button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  height: 32px;
  padding: 0 14px;
  border-radius: var(--dx-pill);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--dx-muted);
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.dx-seg button:hover {
  color: var(--dx-ink);
}
.dx-seg button[aria-pressed="true"] {
  background: var(--dx-surface);
  color: var(--dx-ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(10, 32, 110, 0.08), 0 0 0 1px var(--dx-line);
}
:root[data-theme="dark"] .dx-seg button[aria-pressed="true"] {
  background: #1b1f29;
  box-shadow: none;
}
.dx-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dx-faint);
}
.dx-env [data-env="sandbox"][aria-pressed="true"] .dx-dot {
  background: var(--dx-magenta);
}
.dx-env [data-env="production"][aria-pressed="true"] .dx-dot {
  background: var(--dx-pos);
}
.dx-icon-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid var(--dx-line);
  border-radius: var(--dx-pill);
  background: var(--dx-surface);
  color: var(--dx-ink);
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.dx-icon-btn:hover {
  background: var(--dx-hover);
}
.dx-ico-sun,
:root[data-theme="dark"] .dx-ico-moon {
  display: none;
}
:root[data-theme="dark"] .dx-ico-sun {
  display: block;
}

/* ---- layout ------------------------------------------------------------------- */
.dx-shell {
  display: grid;
  grid-template-columns: var(--dx-side-w) minmax(0, 1fr);
}
.dx-side {
  position: sticky;
  top: var(--dx-top-h);
  height: calc(100vh - var(--dx-top-h));
  overflow-y: auto;
  padding: 24px 14px 48px 20px;
  border-right: 1px solid var(--dx-line);
  scrollbar-width: thin;
  scrollbar-color: var(--dx-line-strong) transparent;
}
.dx-main {
  min-width: 0;
  width: 100%;
  max-width: 1320px;
  padding: 44px 56px 96px;
  outline: none;
  animation: dx-in 0.25s ease;
}
@keyframes dx-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}
.dx-scrim {
  position: fixed;
  inset: var(--dx-top-h) 0 0 0;
  z-index: 29;
  background: rgba(11, 22, 51, 0.35);
  backdrop-filter: blur(2px);
}

/* ---- sidebar nav ---------------------------------------------------------------- */
.dx-nav-group {
  margin-bottom: 22px;
}
.dx-nav-label {
  padding: 0 10px;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--dx-ink);
}
.dx-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: var(--dx-r-sm);
  font-size: 14px;
  line-height: 1.4;
  color: var(--dx-muted);
  text-decoration: none;
  transition: color 0.12s ease, background-color 0.12s ease;
}
.dx-nav a span:first-child {
  flex: 1;
  min-width: 0;
}
.dx-nav a:hover {
  color: var(--dx-ink);
  background: var(--dx-hover);
}
.dx-nav a.on {
  color: var(--dx-brand);
  font-weight: 600;
  background: var(--dx-brand-soft);
}
.dx-nav-empty {
  padding: 8px 10px;
  font-size: 14px;
  color: var(--dx-muted);
}

/* method tags */
.dx-m {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 7px;
  border-radius: var(--dx-pill);
  font-family: var(--dx-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  line-height: 1.6;
}
.dx-m--post {
  background: var(--dx-brand-soft);
  color: var(--dx-brand);
}
.dx-m--get {
  background: var(--dx-pos-soft);
  color: var(--dx-pos);
}
.dx-m--put,
.dx-m--patch {
  background: var(--dx-warn-soft);
  color: var(--dx-warn);
}
.dx-m--delete {
  background: var(--dx-bg-soft);
  color: var(--dx-ink);
  box-shadow: inset 0 0 0 1px var(--dx-line-strong);
}

/* ---- typography ------------------------------------------------------------------ */
.dx-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--dx-brand);
}
.dx-h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -1.2px;
  line-height: 1.08;
  color: var(--dx-ink);
}
.dx-lead {
  margin: 14px 0 0;
  max-width: 680px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--dx-muted);
}
.dx-md {
  color: var(--dx-body);
}
.dx-md h2 {
  margin: 44px 0 12px;
  padding-top: 8px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--dx-ink);
  scroll-margin-top: calc(var(--dx-top-h) + 16px);
}
.dx-md h3 {
  margin: 28px 0 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--dx-ink);
}
.dx-md p {
  margin: 0 0 16px;
}
.dx-md ul,
.dx-md ol {
  margin: 0 0 18px;
  padding-left: 22px;
}
.dx-md li {
  margin: 8px 0;
  padding-left: 4px;
}
.dx-md li::marker {
  color: var(--dx-brand);
}
.dx-md strong,
.dx-pdesc strong,
.dx-desc strong {
  color: var(--dx-ink);
  font-weight: 600;
}
.dx-md a,
.dx-desc a,
.dx-pdesc a {
  color: var(--dx-brand);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--dx-brand-line);
  text-underline-offset: 3px;
}
.dx-md a:hover,
.dx-desc a:hover,
.dx-pdesc a:hover {
  text-decoration-color: currentColor;
}
.dx-md table {
  width: 100%;
  margin: 4px 0 20px;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--dx-line);
  border-radius: var(--dx-r);
  overflow: hidden;
  font-size: 14px;
}
.dx-md th {
  padding: 10px 14px;
  background: var(--dx-bg-soft);
  border-bottom: 1px solid var(--dx-line);
  text-align: left;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--dx-muted);
}
.dx-md td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--dx-line);
  vertical-align: top;
}
.dx-md tr:last-child td {
  border-bottom: 0;
}
.dx-md :not(pre) > code,
.dx-desc code,
.dx-lead code,
.dx-pdesc code,
.dx-auth code,
.dx-try-note code {
  padding: 1px 6px;
  border: 1px solid var(--dx-line);
  border-radius: 6px;
  background: var(--dx-bg-soft);
  font-size: 0.85em;
  color: var(--dx-ink);
  overflow-wrap: anywhere;
}

/* guide layout with "On this page" */
.dx-guide {
  display: grid;
  grid-template-columns: minmax(0, 760px) 220px;
  gap: 64px;
  align-items: start;
}
.dx-guide-body {
  min-width: 0;
}
.dx-guide .dx-md {
  margin-top: 32px;
}
.dx-toc {
  position: sticky;
  top: calc(var(--dx-top-h) + 44px);
  font-size: 13.5px;
}
.dx-toc b {
  display: block;
  margin-bottom: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--dx-ink);
}
.dx-toc a {
  display: block;
  padding: 5px 0 5px 12px;
  border-left: 1px solid var(--dx-line);
  color: var(--dx-muted);
  text-decoration: none;
}
.dx-toc a:hover {
  color: var(--dx-ink);
}
.dx-toc a.on {
  border-left: 2px solid var(--dx-brand);
  padding-left: 11px;
  color: var(--dx-brand);
  font-weight: 500;
}

/* ---- code ----------------------------------------------------------------------- */
.dx-code {
  position: relative;
  margin: 0 0 16px;
  border: 1px solid var(--dx-code-line);
  border-radius: var(--dx-r-lg);
  background: var(--dx-code-bg);
  color: var(--dx-code-text);
  overflow: hidden;
  box-shadow: var(--dx-float);
}
.dx-code:last-child {
  margin-bottom: 0;
}
.dx-code-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 8px 0 10px;
  background: var(--dx-code-head);
  border-bottom: 1px solid var(--dx-code-line);
}
.dx-code-title {
  padding: 0 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--dx-code-muted);
  white-space: nowrap;
}
.dx-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.dx-tabs::-webkit-scrollbar {
  display: none;
}
.dx-tab,
.dx-st {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 11px;
  border: 0;
  border-radius: var(--dx-pill);
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--dx-code-muted);
  cursor: pointer;
  transition: color 0.12s ease, background-color 0.12s ease;
}
.dx-st {
  font-family: var(--dx-mono);
  font-size: 12px;
}
.dx-tab:hover,
.dx-st:hover {
  color: #ffffff;
}
.dx-tab[aria-selected="true"],
.dx-st[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}
.dx-copy {
  flex: 0 0 auto;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border: 0;
  border-radius: var(--dx-pill);
  background: rgba(255, 255, 255, 0.06);
  color: var(--dx-code-text);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}
.dx-copy:hover {
  background: rgba(255, 255, 255, 0.12);
}
.dx-copy.done {
  background: rgba(123, 227, 168, 0.16);
  color: #7be3a8;
}
/* code with a line-number gutter; one scroll box for both */
.dx-code-scroll {
  display: flex;
  max-height: 460px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--dx-code-line) transparent;
}
.dx-gutter {
  position: sticky;
  left: 0;
  z-index: 1;
  flex: 0 0 auto;
  min-width: 44px;
  padding: 16px 10px 16px 0;
  background: var(--dx-code-bg);
  border-right: 1px solid var(--dx-code-line);
  color: rgba(139, 149, 179, 0.55);
  font-family: var(--dx-mono);
  font-size: 12px;
  line-height: 22px; /* same fixed line box as the code, so numbers line up */
  text-align: right;
  white-space: pre;
  user-select: none;
}
.dx-code pre {
  flex: 1;
  margin: 0;
  padding: 16px 20px 16px 16px;
  overflow: visible;
  font-size: 12.8px;
  line-height: 22px;
  tab-size: 2;
}
.dx-code-url {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 14px;
  border-bottom: 1px solid var(--dx-code-line);
  background: rgba(255, 255, 255, 0.02);
}
.dx-code-url .dx-m {
  padding: 2px 8px;
  font-size: 10.5px;
}
.dx-code .dx-code-url .dx-m--post {
  background: rgba(127, 165, 255, 0.16);
  color: #b0c8ff;
}
.dx-code .dx-code-url .dx-m--get {
  background: rgba(123, 227, 168, 0.14);
  color: #7be3a8;
}
.dx-code-url code {
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  font-size: 12.5px;
  color: var(--dx-code-text);
}
.dx-code-url code::-webkit-scrollbar {
  display: none;
}
.dx-code pre code {
  white-space: pre;
}
.dx-code-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--dx-code-line);
  font-size: 12.5px;
  color: var(--dx-code-muted);
}
.dx-select {
  min-width: 0;
  max-width: 100%;
  height: 30px;
  padding: 0 30px 0 12px;
  border: 1px solid var(--dx-code-line);
  border-radius: var(--dx-pill);
  background: transparent
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%238b95b3' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")
    right 11px center no-repeat;
  color: var(--dx-code-text);
  font-size: 12.5px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.dx-select option {
  background: var(--dx-code-bg);
}
.dx-code-desc {
  padding: 14px 20px 0;
  font-size: 12.5px;
  color: var(--dx-code-muted);
}
/* status badges (no red: errors use the warning tone) */
.dx-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: var(--dx-pill);
  font-family: var(--dx-mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
}
.dx-badge--2 {
  background: var(--dx-pos-soft);
  color: var(--dx-pos);
}
.dx-badge--3 {
  background: var(--dx-brand-soft);
  color: var(--dx-brand);
}
.dx-badge--4,
.dx-badge--5,
.dx-badge--0 {
  background: var(--dx-warn-soft);
  color: var(--dx-warn);
}
.dx-code .dx-badge--2 {
  background: rgba(123, 227, 168, 0.14);
  color: #7be3a8;
}
.dx-code .dx-badge--3 {
  background: rgba(127, 165, 255, 0.16);
  color: #b0c8ff;
}
.dx-code .dx-badge--4,
.dx-code .dx-badge--5,
.dx-code .dx-badge--0 {
  background: rgba(255, 201, 120, 0.14);
  color: #ffc978;
}
.t-key {
  color: var(--dx-code-key);
}
.t-str {
  color: var(--dx-code-str);
}
.t-num {
  color: var(--dx-code-num);
}
.t-bool {
  color: var(--dx-code-bool);
}
.t-com {
  color: var(--dx-code-muted);
  font-style: italic;
}
.t-kw {
  color: var(--dx-code-num);
}
.t-flag {
  color: var(--dx-code-bool);
}

/* ---- reference: hero + overview ------------------------------------------------- */
.dx-hero {
  position: relative;
  overflow: hidden;
  padding: 40px 40px 36px;
  border-radius: var(--dx-r-xl);
  background: radial-gradient(120% 140% at 100% 0%, #4b80ff 0%, rgba(75, 128, 255, 0) 55%),
    linear-gradient(135deg, #1058ff 0%, #0a34d8 100%);
  color: #ffffff;
}
.dx-hero::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -90px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 40px rgba(255, 255, 255, 0.04), 0 0 0 80px rgba(255, 255, 255, 0.03);
  pointer-events: none;
}
.dx-hero .dx-eyebrow {
  color: #d7e4ff;
}
.dx-hero .dx-h1 {
  color: #ffffff;
}
.dx-hero .dx-lead {
  color: #d7e4ff;
}
.dx-hero .dx-lead code {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}
.dx-hero-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: 26px;
}
.dx-base {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 5px 5px 5px 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--dx-pill);
  background: rgba(255, 255, 255, 0.1);
}
.dx-base span {
  flex: 0 0 auto;
  font-size: 13px;
  white-space: nowrap;
  color: #d7e4ff;
}
.dx-base code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: #ffffff;
}
.dx-base .dx-mini-btn {
  border: 0;
  background: var(--dx-lime);
  color: var(--dx-lime-ink);
}
.dx-base .dx-mini-btn:hover {
  background: #d4f774;
  color: var(--dx-lime-ink);
}
.dx-stats {
  display: flex;
  gap: 22px;
  font-size: 13.5px;
  color: #d7e4ff;
}
.dx-stats b {
  margin-right: 4px;
  font-size: 15px;
  color: #ffffff;
}
.dx-mini-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--dx-line);
  border-radius: var(--dx-pill);
  background: var(--dx-surface);
  color: var(--dx-body);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease;
}
.dx-mini-btn:hover {
  border-color: var(--dx-brand-line);
  color: var(--dx-brand);
}
.dx-overview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  align-items: start;
  gap: 16px;
  margin-top: 28px;
}
.dx-ov {
  padding: 20px;
  border: 1px solid var(--dx-line);
  border-radius: var(--dx-r-lg);
  background: var(--dx-surface);
  transition: border-color 0.15s ease;
}
.dx-ov:hover {
  border-color: var(--dx-brand-line);
}
.dx-ov-ico {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border-radius: var(--dx-r);
  background: var(--dx-brand-soft);
  color: var(--dx-brand);
}
.dx-ov h2 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--dx-ink);
}
.dx-ov a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid var(--dx-line-soft);
  font-size: 14px;
  color: var(--dx-body);
  text-decoration: none;
}
.dx-ov a:hover {
  color: var(--dx-brand);
}

/* overview page */
.dx-ov-intro {
  max-width: 780px;
  margin-top: 36px;
}
.dx-ov-intro h2 {
  margin-top: 32px;
}
.dx-block-title {
  margin: 48px 0 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--dx-ink);
}
.dx-block-title + .dx-overview,
.dx-block-title + .dx-steps {
  margin-top: 18px;
}
.dx-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.dx-step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 20px 18px;
  border: 1px solid var(--dx-line);
  border-radius: var(--dx-r-lg);
  background: var(--dx-surface);
  color: var(--dx-body);
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.dx-step:hover {
  border-color: var(--dx-brand-line);
}
.dx-step-n {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  border-radius: 50%;
  background: var(--dx-brand);
  color: var(--dx-on-brand);
  font-size: 14px;
  font-weight: 700;
}
.dx-step b {
  font-size: 16px;
  font-weight: 700;
  color: var(--dx-ink);
}
.dx-step span {
  font-size: 14px;
  line-height: 1.55;
}
.dx-step-go {
  position: absolute;
  top: 20px;
  right: 18px;
  color: var(--dx-faint);
  transition: color 0.15s ease, transform 0.15s ease;
}
.dx-step:hover .dx-step-go {
  color: var(--dx-brand);
  transform: translateX(2px);
}
/* All endpoints header */
.dx-ref-head {
  padding-bottom: 8px;
}
.dx-ref-head .dx-base--light {
  margin-top: 20px;
}
.dx-base--light {
  border-color: var(--dx-line);
  background: var(--dx-bg-soft);
}
.dx-base--light span {
  color: var(--dx-muted);
}
.dx-base--light code {
  color: var(--dx-ink);
}

/* ---- endpoints ------------------------------------------------------------------- */
.dx-group {
  margin-top: 72px;
  scroll-margin-top: calc(var(--dx-top-h) + 16px);
}
.dx-group-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--dx-line);
}
.dx-group-head .dx-ov-ico {
  margin: 0;
}
.dx-group-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--dx-ink);
}
.dx-group-count {
  margin-left: auto;
  font-size: 13px;
  color: var(--dx-muted);
}
.dx-op {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 500px);
  gap: 48px;
  padding: 48px 0;
  border-bottom: 1px solid var(--dx-line);
  scroll-margin-top: var(--dx-top-h);
}
.dx-group .dx-op:last-child {
  border-bottom: 0;
}
.dx-op-main,
.dx-op-side {
  min-width: 0;
}
.dx-op-sticky {
  position: sticky;
  top: calc(var(--dx-top-h) + 24px);
  /* taller than the screen (Try it): scroll inside, Send stays reachable */
  max-height: calc(100vh - var(--dx-top-h) - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  margin-right: -8px;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--dx-line-strong) transparent;
}
.dx-endpoint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 6px 6px 6px 8px;
  border: 1px solid var(--dx-line);
  border-radius: var(--dx-pill);
  background: var(--dx-bg-soft);
}
.dx-endpoint .dx-m {
  padding: 3px 10px;
  font-size: 11px;
}
.dx-path {
  min-width: 0;
  font-family: var(--dx-mono);
  font-size: 13.5px;
  color: var(--dx-ink);
}
.dx-path-var {
  color: var(--dx-brand);
  white-space: nowrap;
}
.dx-endpoint .dx-mini-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  justify-content: center;
}
.dx-h2 {
  margin: 18px 0 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.6px;
  line-height: 1.2;
  color: var(--dx-ink);
}
.dx-h2 a {
  text-decoration: none;
}
.dx-h2 a:hover {
  color: var(--dx-brand);
}
.dx-desc {
  margin-top: 10px;
  font-size: 15.5px;
  color: var(--dx-body);
}
.dx-desc p {
  margin: 0 0 10px;
}
.dx-auth {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--dx-muted);
}
.dx-auth svg {
  color: var(--dx-pos);
}
.dx-sec-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 34px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--dx-ink);
}
.dx-sec-title small {
  font-size: 13px;
  font-weight: 400;
  color: var(--dx-muted);
}

/* request / response tables */
.dx-table-wrap {
  border: 1px solid var(--dx-line);
  border-radius: var(--dx-r);
  overflow: hidden;
  background: var(--dx-surface);
}
.dx-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 14px;
}
.dx-table th {
  padding: 11px 16px;
  background: var(--dx-bg-soft);
  border-bottom: 1px solid var(--dx-line);
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--dx-muted);
}
.dx-table th:nth-child(1) {
  width: 36%;
}
.dx-table th:nth-child(2) {
  width: 112px;
}
.dx-table--status th:nth-child(1) {
  width: 230px;
}
.dx-table--status td:first-child {
  white-space: nowrap;
}
.dx-table--status th:nth-child(2) {
  width: auto;
}
.dx-table td {
  padding: 14px 16px;
  border-top: 1px solid var(--dx-line-soft);
  vertical-align: top;
  color: var(--dx-body);
  overflow-wrap: break-word;
}
.dx-table tbody tr:first-child td {
  border-top: 0;
}
.dx-table tbody tr:hover td {
  background: var(--dx-hover);
}
.dx-td-name {
  display: table-cell;
}
.dx-pname {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--dx-ink);
  overflow-wrap: break-word;
}
.dx-pname .dx-parent {
  font-weight: 400;
  color: var(--dx-faint);
}
.dx-req,
.dx-opt {
  display: inline-block;
  margin-top: 6px;
  padding: 0 8px;
  border-radius: var(--dx-pill);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.75;
}
.dx-req {
  background: var(--dx-warn-soft);
  color: var(--dx-warn);
}
.dx-opt {
  background: var(--dx-bg-soft);
  color: var(--dx-faint);
}
.dx-ptype {
  font-family: var(--dx-mono);
  font-size: 12.5px;
  color: var(--dx-brand);
}
.dx-table .dx-td-type {
  overflow-wrap: normal;
  word-break: normal;
}
.dx-td-desc p {
  margin: 0 0 6px;
}
.dx-td-desc p:last-child {
  margin-bottom: 0;
}
.dx-td-desc strong {
  color: var(--dx-ink);
  font-weight: 600;
}
.dx-td-desc a {
  color: var(--dx-brand);
}
.dx-td-desc code {
  padding: 1px 6px;
  border: 1px solid var(--dx-line);
  border-radius: 6px;
  background: var(--dx-bg-soft);
  font-size: 0.85em;
  color: var(--dx-ink);
}
.dx-none {
  color: var(--dx-faint);
}
.dx-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--dx-muted);
}
.dx-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 9px;
  border-radius: var(--dx-pill);
  background: var(--dx-bg-soft);
  border: 1px solid var(--dx-line-soft);
}
.dx-meta code {
  font-size: 12px;
  color: var(--dx-ink);
}
/* nested fields: indented under their parent, with a guide line */
.dx-tr-child td {
  background: var(--dx-bg-soft);
}
.dx-tr-child .dx-td-name {
  position: relative;
}
.dx-tr-child .dx-td-name::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  width: 2px;
  border-radius: 2px;
  background: var(--dx-brand-line);
}
.dx-d1 .dx-td-name {
  padding-left: 34px;
}
.dx-d1 .dx-td-name::before {
  left: 20px;
}
.dx-d2 .dx-td-name {
  padding-left: 52px;
}
.dx-d2 .dx-td-name::before {
  left: 38px;
}
.dx-d3 .dx-td-name,
.dx-d4 .dx-td-name,
.dx-d5 .dx-td-name,
.dx-d6 .dx-td-name {
  padding-left: 70px;
}
.dx-d3 .dx-td-name::before,
.dx-d4 .dx-td-name::before,
.dx-d5 .dx-td-name::before,
.dx-d6 .dx-td-name::before {
  left: 56px;
}
.dx-status-text {
  margin-left: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--dx-ink);
}
.dx-empty {
  padding: 14px 16px;
  border: 1px dashed var(--dx-line);
  border-radius: var(--dx-r);
  font-size: 14px;
  color: var(--dx-muted);
}
.dx-sec-title + .dx-table-wrap,
.dx-sec-title + .dx-empty {
  margin-top: 12px;
}

/* right column switch */
.dx-side-tabs {
  display: flex;
  margin-bottom: 14px;
}
.dx-side-tabs .dx-seg {
  width: 100%;
}
.dx-side-tabs .dx-seg button {
  flex: 1;
  justify-content: center;
}

/* ---- Try it ------------------------------------------------------------------------ */
.dx-try {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dx-try-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--dx-line);
  border-radius: var(--dx-r);
  background: var(--dx-surface);
}
.dx-try-bar .dx-m {
  padding: 3px 9px;
  font-size: 11px;
}
.dx-try-url {
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  font-size: 12.5px;
  color: var(--dx-ink);
}
.dx-try-url::-webkit-scrollbar {
  display: none;
}
.dx-try-safe {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
  font-size: 12.5px;
  color: var(--dx-muted);
}
.dx-try-safe svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  color: var(--dx-pos);
}
.dx-try-card {
  border: 1px solid var(--dx-line);
  border-radius: var(--dx-r);
  background: var(--dx-surface);
  overflow: hidden;
}
.dx-try-card > summary,
.dx-try-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 0 14px;
  list-style: none;
}
.dx-try-card > summary {
  cursor: pointer;
}
.dx-try-card > summary::-webkit-details-marker {
  display: none;
}
.dx-try-card > summary::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: 2px;
  border-right: 1.7px solid var(--dx-muted);
  border-bottom: 1.7px solid var(--dx-muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.15s ease;
}
.dx-try-card[open] > summary::after {
  transform: rotate(225deg) translateY(-2px);
}
.dx-try-card[open] > summary,
.dx-try-card-head {
  border-bottom: 1px solid var(--dx-line-soft);
}
.dx-try-card-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--dx-ink);
}
.dx-try-card-title svg {
  color: var(--dx-muted);
}
.dx-try-card-title small {
  font-family: var(--dx-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--dx-faint);
}
.dx-try-card-body {
  padding: 14px;
}
.dx-keys-state {
  margin-left: auto;
  padding: 1px 9px;
  border-radius: var(--dx-pill);
  background: var(--dx-warn-soft);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--dx-warn);
}
.dx-keys-state.ok {
  background: var(--dx-pos-soft);
  color: var(--dx-pos);
}
.dx-keys-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--dx-faint);
}
.dx-keys-foot button,
.dx-link-btn {
  border: 0;
  background: none;
  padding: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--dx-brand);
  cursor: pointer;
}
.dx-try-card--code {
  border-color: var(--dx-code-line);
  background: var(--dx-code-bg);
}
.dx-try-card--code .dx-try-card-head {
  background: var(--dx-code-head);
  border-bottom-color: var(--dx-code-line);
}
.dx-try-card--code .dx-try-card-title {
  color: #ffffff;
}
.dx-try-card--code .dx-link-btn {
  color: #b0c8ff;
}
.dx-editor {
  display: block;
  width: 100%;
  min-height: 240px;
  margin: 0;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  color: var(--dx-code-text);
  caret-color: var(--dx-lime);
  font-family: var(--dx-mono);
  font-size: 12.5px;
  line-height: 1.7;
  white-space: pre;
  overflow-wrap: normal;
  overflow: auto;
  resize: vertical;
  tab-size: 2;
  outline: none;
}
.dx-editor.bad {
  box-shadow: inset 0 0 0 2px var(--dx-warn);
}
.dx-try-card--code .dx-help {
  margin: 0;
  padding: 9px 16px 11px;
  border-top: 1px solid var(--dx-code-line);
  color: var(--dx-code-muted);
}
.dx-try-card--code .dx-help.bad {
  color: #ffc978;
}
.dx-field {
  margin-bottom: 12px;
}
.dx-field label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--dx-body);
}
.dx-field label code {
  font-size: 12px;
}
.dx-field .dx-req {
  margin-top: 0;
}
.dx-input-wrap {
  position: relative;
}
.dx-input {
  width: 100%;
  height: 42px;
  padding: 0 44px 0 12px;
  border: 1px solid var(--dx-line-strong);
  border-radius: 10px;
  background: var(--dx-bg);
  color: var(--dx-ink);
  font-family: var(--dx-mono);
  font-size: 13px;
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.dx-input::placeholder,
.dx-fill-in::placeholder {
  color: var(--dx-faint);
}
.dx-input:focus,
.dx-fill-in:focus {
  border-color: var(--dx-brand);
  box-shadow: 0 0 0 4px var(--dx-brand-soft);
}
.dx-input.bad,
.dx-fill-in.bad {
  border-color: var(--dx-warn);
  box-shadow: 0 0 0 4px var(--dx-warn-soft);
}
.dx-eye {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--dx-pill);
  background: none;
  color: var(--dx-muted);
  cursor: pointer;
}
.dx-eye:hover {
  color: var(--dx-ink);
  background: var(--dx-hover);
}
.dx-help {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--dx-muted);
}
.dx-help.bad {
  color: var(--dx-warn);
}
.dx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--dx-pill);
  background: var(--dx-brand);
  color: var(--dx-on-brand);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
}
.dx-btn:hover {
  background: var(--dx-brand-strong);
}
.dx-btn:active {
  transform: scale(0.99);
}
:root[data-theme="dark"] .dx-btn {
  background: #1058ff;
}
:root[data-theme="dark"] .dx-btn:hover {
  background: #2a68ff;
}
.dx-btn[disabled] {
  opacity: 0.65;
  cursor: progress;
}
.dx-btn--block {
  width: 100%;
}
.dx-kbd--btn {
  margin-left: 4px;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}
.dx-try-result:empty {
  display: none;
}
.dx-btn .dx-spinner {
  width: 16px;
  height: 16px;
  border-color: rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
}
.dx-try-note {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--dx-r);
  background: var(--dx-brand-soft);
  font-size: 13px;
  line-height: 1.55;
  color: var(--dx-body);
}
.dx-try-note svg {
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--dx-brand);
}
.dx-try-note--warn {
  background: var(--dx-warn-soft);
}
.dx-try-note--warn svg {
  color: var(--dx-warn);
}
.dx-try--off {
  align-items: center;
  gap: 10px;
  padding: 32px 24px;
  border: 1px dashed var(--dx-line-strong);
  border-radius: var(--dx-r-lg);
  text-align: center;
}
.dx-try--off b {
  font-size: 16px;
  color: var(--dx-ink);
}
.dx-try--off p {
  margin: 0 0 6px;
  max-width: 320px;
  font-size: 14px;
  color: var(--dx-muted);
}
.dx-try-off-ico {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--dx-brand-soft);
  color: var(--dx-brand);
}

/* fill from the left (Try it on) */
.dx-fill-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  padding: 11px 14px;
  border: 1px solid var(--dx-brand-line);
  border-radius: var(--dx-r);
  background: var(--dx-brand-soft);
  font-size: 13.5px;
  color: var(--dx-body);
}
.dx-fill-banner svg {
  flex: 0 0 auto;
  color: var(--dx-brand);
}
.dx-fill-banner b {
  color: var(--dx-ink);
}
.dx-table-wrap--fill {
  border-color: var(--dx-brand-line);
}
.dx-fill {
  margin-top: 10px;
}
.dx-fill-in {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--dx-line-strong);
  border-radius: 10px;
  background: var(--dx-bg);
  color: var(--dx-ink);
  font-family: var(--dx-mono);
  font-size: 12.5px;
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
/* "number or a named value" fields (e.g. limit): select + number box for Set */
.dx-enumnum {
  display: flex;
  gap: 8px;
  min-width: 0;
}
.dx-enumnum select.dx-fill-in {
  flex: 1 1 auto;
  min-width: 0;
}
.dx-enumnum .dx-enumnum-n {
  flex: 0 0 96px;
  width: 96px;
}
.dx-enumnum .dx-enumnum-n[hidden] {
  display: none;
}
select.dx-fill-in {
  padding-right: 32px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--dx-bg)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236a7488' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")
    right 12px center no-repeat;
  cursor: pointer;
}
.dx-fill-note {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--dx-faint);
}
/* list / item / key-value editors (Try it) */
.dx-arr {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dx-arr-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dx-arr-row > .dx-fill-in {
  flex: 1;
  min-width: 0;
}
.dx-arr-i {
  flex: 0 0 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--dx-brand-soft);
  color: var(--dx-brand);
  font-family: var(--dx-mono);
  font-size: 11px;
  font-weight: 700;
}
.dx-arr-del {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--dx-line);
  border-radius: 50%;
  background: var(--dx-surface);
  color: var(--dx-muted);
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease, background-color 0.12s ease;
}
.dx-arr-del:hover {
  border-color: var(--dx-warn-line);
  background: var(--dx-warn-soft);
  color: var(--dx-warn);
}
.dx-arr-add {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border: 1px dashed var(--dx-brand-line);
  border-radius: var(--dx-pill);
  background: transparent;
  color: var(--dx-brand);
  font-size: 13px;
  font-weight: 600;
  text-transform: none;
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}
.dx-arr-add:hover {
  border-style: solid;
  background: var(--dx-brand-soft);
}
.dx-arr-card {
  padding: 12px 14px 14px;
  border: 1px solid var(--dx-line);
  border-radius: var(--dx-r);
  background: var(--dx-surface);
}
.dx-arr-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.dx-arr-card-head b {
  font-size: 13px;
  font-weight: 700;
  color: var(--dx-ink);
  text-transform: capitalize;
}
.dx-arr-card-head .dx-arr-del {
  width: 28px;
  height: 28px;
}
.dx-arr-card-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px 14px;
}
.dx-arr-field {
  min-width: 0;
}
.dx-arr-field--wide {
  grid-column: 1 / -1;
}
/* full-width editor row under a list / key-value field */
.dx-table .dx-tr-has-editor td {
  border-bottom: 0;
}
.dx-table .dx-tr-editor td {
  padding: 0 16px 16px;
  border-top: 0;
}
.dx-table tbody tr.dx-tr-editor:hover td,
.dx-table tbody tr.dx-tr-has-editor:hover td {
  background: transparent;
}
.dx-table tbody tr.dx-tr-child.dx-tr-editor td,
.dx-table tbody tr.dx-tr-child.dx-tr-has-editor:hover td {
  background: var(--dx-bg-soft);
}
.dx-fill--block {
  margin-top: 0;
  padding: 14px;
  border: 1px dashed var(--dx-brand-line);
  border-radius: var(--dx-r);
  background: var(--dx-bg-soft);
}
.dx-fill--block .dx-arr-card {
  background: var(--dx-surface);
}
.dx-arr-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-bottom: 6px;
}
.dx-arr-label code {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--dx-ink);
}
.dx-arr-label .dx-ptype {
  font-size: 11.5px;
}
.dx-arr-label .dx-req {
  margin-top: 0;
}
.dx-arr-sub {
  padding-left: 12px;
  border-left: 2px solid var(--dx-brand-line);
}
.dx-map-row .dx-map-k {
  flex: 0 0 38%;
}
.dx-tr-child .dx-arr-card {
  background: var(--dx-bg);
}

/* ---- command palette ------------------------------------------------------------ */
.dx-palette {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px 16px;
  background: rgba(11, 22, 51, 0.38);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.dx-palette[hidden] {
  display: none;
}
.dx-palette-box {
  width: min(620px, 100%);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--dx-line);
  border-radius: var(--dx-r-xl);
  background: var(--dx-surface);
  box-shadow: var(--dx-float-lg);
  overflow: hidden;
  animation: dx-pop 0.16s ease;
}
@keyframes dx-pop {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.99);
  }
}
.dx-palette-in {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: 58px;
  border-bottom: 1px solid var(--dx-line);
  color: var(--dx-faint);
}
.dx-palette-q {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--dx-ink);
  font-size: 16px;
  outline: none;
}
.dx-palette-q::placeholder {
  color: var(--dx-faint);
}
.dx-palette-list {
  list-style: none;
  margin: 0;
  padding: 8px;
  overflow-y: auto;
}
.dx-palette-group {
  padding: 10px 10px 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--dx-faint);
}
.dx-palette-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--dx-r);
  cursor: pointer;
  color: var(--dx-body);
}
.dx-palette-item[aria-selected="true"] {
  background: var(--dx-brand-soft);
  color: var(--dx-ink);
}
.dx-palette-item .dx-pi-main {
  flex: 1;
  min-width: 0;
}
.dx-palette-item b {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--dx-ink);
}
.dx-palette-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--dx-mono);
  font-size: 12px;
  color: var(--dx-muted);
}
.dx-palette-item .dx-pi-ico {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--dx-r-sm);
  background: var(--dx-bg-soft);
  color: var(--dx-muted);
}
.dx-palette-empty {
  padding: 28px 12px;
  text-align: center;
  color: var(--dx-muted);
}
.dx-palette-foot {
  display: flex;
  gap: 18px;
  padding: 10px 16px;
  border-top: 1px solid var(--dx-line);
  font-size: 12px;
  color: var(--dx-muted);
}
.dx-palette-foot span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ---- footer, toast, loading ------------------------------------------------------ */
.dx-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-left: var(--dx-side-w);
  padding: 22px 56px 28px;
  border-top: 1px solid var(--dx-line);
  font-size: 13px;
  color: var(--dx-muted);
}
.dx-foot a {
  text-decoration: none;
}
.dx-foot a:hover {
  color: var(--dx-brand);
}
.dx-foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.dx-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 80;
  transform: translate(-50%, 16px);
  padding: 10px 18px;
  border-radius: var(--dx-pill);
  background: var(--dx-ink);
  color: var(--dx-bg);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--dx-float);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.dx-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.dx-loading,
.dx-error {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 40px 0;
  font-size: 15px;
  color: var(--dx-muted);
}
.dx-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--dx-line-strong);
  border-top-color: var(--dx-brand);
  border-radius: 50%;
  animation: dx-spin 0.8s linear infinite;
}
@keyframes dx-spin {
  to {
    transform: rotate(360deg);
  }
}
.dx-pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--dx-line);
}
.dx-pager a {
  flex: 1;
  max-width: 50%;
  padding: 16px 18px;
  border: 1px solid var(--dx-line);
  border-radius: var(--dx-r-lg);
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.dx-pager a:hover {
  border-color: var(--dx-brand-line);
}
.dx-pager small {
  display: block;
  font-size: 12.5px;
  color: var(--dx-muted);
}
.dx-pager b {
  font-size: 16px;
  font-weight: 600;
  color: var(--dx-ink);
}
.dx-pager .next {
  margin-left: auto;
  text-align: right;
}

/* ---- responsive -------------------------------------------------------------------- */
@media (max-width: 1439.98px) {
  .dx-main {
    padding: 40px 44px 88px;
  }
  .dx-op {
    gap: 40px;
  }
}
/* laptops (1280-1599): the code panel takes a share instead of a fixed
   500px, so the fields on the left keep a readable width */
@media (min-width: 1280px) and (max-width: 1599.98px) {
  .dx-op {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.72fr);
    gap: 32px;
  }
}
@media (min-width: 1280px) and (max-width: 1439.98px) {
  :root {
    --dx-side-w: 252px;
  }
  .dx-main {
    padding: 36px 36px 80px;
  }
  .dx-side {
    padding-left: 16px;
  }
}
@media (max-width: 1279.98px) {
  .dx-op {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .dx-op-sticky {
    position: static;
    max-height: none;
    overflow: visible;
    margin-right: 0;
    padding-right: 0;
  }
  .dx-main {
    max-width: 960px;
  }
  .dx-guide {
    grid-template-columns: minmax(0, 1fr);
  }
  .dx-toc {
    display: none;
  }
  .dx-ov-intro {
    max-width: none;
  }
}
/* md and below: sidebar becomes a drawer */
@media (max-width: 1023.98px) {
  .dx-top {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    gap: 12px;
    padding: 0 20px;
  }
  .dx-top > .dx-menu-btn {
    display: inline-flex;
  }
  .dx-find {
    justify-self: end;
    width: min(320px, 100%);
  }
  .dx-shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .dx-side {
    position: fixed;
    left: 0;
    top: var(--dx-top-h);
    bottom: 0;
    z-index: 30;
    width: min(320px, 86vw);
    height: auto;
    background: var(--dx-bg);
    box-shadow: var(--dx-float-lg);
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    visibility: hidden;
  }
  body.dx-nav-open .dx-side {
    transform: none;
    visibility: visible;
  }
  .dx-main {
    margin: 0 auto;
    padding: 32px 32px 64px;
  }
  .dx-foot {
    margin-left: 0;
    padding: 20px 32px;
  }
}
/* sm */
@media (max-width: 767.98px) {
  .dx-top {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    padding: 0 14px;
    gap: 8px;
  }
  .dx-brand-sub,
  .dx-find-text,
  .dx-find .dx-kbd {
    display: none;
  }
  .dx-find {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
    background: var(--dx-surface);
  }
  /* one compact pill for the current environment; a tap switches it */
  .dx-env button:not([aria-pressed="true"]) {
    display: none;
  }
  .dx-env button[aria-pressed="true"] {
    box-shadow: none;
    background: transparent;
  }
  .dx-brand {
    overflow: hidden;
  }
  .dx-main {
    padding: 24px 20px 52px;
  }
  .dx-hero {
    padding: 28px 22px 26px;
    border-radius: var(--dx-r-lg);
  }
  .dx-op {
    padding: 36px 0;
  }
  .dx-h2 {
    font-size: 23px;
  }
  .dx-group {
    margin-top: 52px;
  }
  .dx-steps {
    grid-template-columns: minmax(0, 1fr);
  }
  .dx-map-row {
    flex-wrap: wrap;
    padding: 10px;
    border: 1px solid var(--dx-line);
    border-radius: var(--dx-r);
    background: var(--dx-surface);
  }
  .dx-map-row .dx-map-k {
    flex: 1 1 100%;
  }
  .dx-map-row .dx-map-v {
    flex: 1;
  }
  /* tables stack: one block per field */
  .dx-table,
  .dx-table tbody,
  .dx-table tr,
  .dx-table td {
    display: block;
    width: 100%;
  }
  .dx-table thead {
    display: none;
  }
  .dx-table tr {
    padding: 14px 16px;
    border-top: 1px solid var(--dx-line-soft);
  }
  .dx-table tbody tr:first-child {
    border-top: 0;
  }
  .dx-table td {
    padding: 0;
    border: 0;
    background: none !important;
  }
  .dx-table .dx-td-name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
  }
  .dx-table .dx-td-name .dx-pname {
    display: inline;
  }
  .dx-table .dx-req,
  .dx-table .dx-opt {
    margin-top: 0;
  }
  .dx-table .dx-td-type {
    margin-top: 2px;
  }
  .dx-table .dx-td-desc {
    margin-top: 6px;
  }
  .dx-table--status td + td {
    margin-top: 4px;
  }
  .dx-table tr.dx-tr-editor {
    padding-top: 0;
    border-top: 0;
  }
  .dx-table .dx-tr-editor td {
    padding: 0;
  }
  .dx-tr-child {
    background: var(--dx-bg-soft);
  }
  .dx-d1,
  .dx-d2,
  .dx-d3,
  .dx-d4,
  .dx-d5,
  .dx-d6 {
    padding-left: 30px !important;
    position: relative;
  }
  .dx-tr-child .dx-td-name {
    padding-left: 0 !important;
  }
  .dx-tr-child .dx-td-name::before {
    display: none;
  }
  .dx-tr-child::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 14px;
    bottom: 14px;
    width: 2px;
    border-radius: 2px;
    background: var(--dx-brand-line);
  }
  .dx-foot {
    padding: 20px;
  }
  .dx-palette {
    padding: 0;
    align-items: stretch;
  }
  .dx-palette-box {
    /* full-screen sheet: without this the desktop min(620px, 100%) width
       left gaps at the sides between ~640 and 768 px */
    width: 100%;
    max-height: none;
    border-radius: 0;
    border: 0;
  }
  .dx-palette-foot {
    display: none;
  }
}
/* xs */
@media (max-width: 479.98px) {
  :root {
    --dx-top-h: 58px;
  }
  .dx-logo {
    height: 22px;
  }
  .dx-seg button {
    height: 30px;
    padding: 0 10px;
    font-size: 12.5px;
    gap: 5px;
  }
  .dx-top .dx-icon-btn,
  .dx-find {
    width: 36px;
    height: 36px;
  }
  .dx-main {
    padding: 20px 16px 44px;
  }
  .dx-endpoint {
    border-radius: var(--dx-r);
    flex-wrap: wrap;
  }
  .dx-stats {
    gap: 14px;
  }
  .dx-try {
    padding: 16px;
  }
  .dx-pager {
    flex-direction: column;
  }
  .dx-pager a {
    max-width: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
