/* Developer documentation page (/docs/api). Loaded after styles.css; uses the site tokens (--bg-elev, --border, --accent-1/2, --text-dim).
   Both languages live in the HTML: .l-ar / .l-en spans, shown by html[lang] (assets/app.js sets it, and the inline script in <head> sets it before paint). */

html[lang="en"] .l-ar { display: none; }
html:not([lang="en"]) .l-en { display: none; }

.dx section { padding: 0; }
.dx-hero { padding: 56px 0 18px; }
.dx-hero h1 { font-size: clamp(28px, 4.2vw, 44px); line-height: 1.25; margin: 10px 0 12px; }
.dx-hero .lead { max-width: 760px; color: var(--text-dim); font-size: 16.5px; line-height: 1.85; }
.dx-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.dx-pill { padding: 7px 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-elev); color: var(--text); font-size: 13.5px; font-weight: 700; }
.dx-pill:hover { border-color: var(--accent-1); color: var(--accent-1); }

.dx-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 36px; align-items: start; padding-top: 28px; padding-bottom: 80px; }
.dx-toc { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 2px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-elev); font-size: 13.5px; }
.dx-toc b { color: var(--text-dimmer); font-size: 12px; letter-spacing: .04em; padding: 2px 8px 8px; }
.dx-toc a { padding: 6px 8px; border-radius: 8px; color: var(--text-dim); overflow-wrap: anywhere; }
.dx-toc a:hover { background: rgba(255, 255, 255, .05); color: var(--accent-1); }

.dx-main { min-width: 0; }
.dx-main section { padding: 34px 0; border-top: 1px solid var(--border-soft); scroll-margin-top: 92px; }
.dx-main section:first-child { border-top: 0; padding-top: 0; }
.dx-main h2 { font-size: 26px; line-height: 1.35; margin-bottom: 14px; overflow-wrap: anywhere; }
.dx-main h3 { font-size: 18px; margin: 26px 0 10px; }
.dx-main h4 { font-size: 15.5px; margin: 20px 0 8px; color: var(--text); }
.dx-main p, .dx-main li { color: var(--text-dim); line-height: 1.9; font-size: 15px; }
.dx-main p { margin-bottom: 12px; }
.dx-main ul, .dx-main ol { margin: 0 0 14px; padding-inline-start: 22px; }
.dx-main ul { list-style: disc; }
.dx-main ol { list-style: decimal; }
.dx-main li { margin-bottom: 6px; }
.dx-main li::marker { color: var(--accent-1); }
.dx-main b { color: var(--text); }
.dx-main a { color: var(--accent-1); }
.dx-main a:hover { text-decoration: underline; }
.dx-main a.btn { color: #06101c; text-decoration: none; }

.dx-main code { font-family: Consolas, 'SFMono-Regular', Menlo, monospace; font-size: .88em; direction: ltr; unicode-bidi: isolate; padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, .07); color: #cfe8ff; overflow-wrap: anywhere; }
.dx-main pre { direction: ltr; text-align: left; margin: 10px 0 16px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #060a14; overflow-x: auto; }
.dx-main pre code { padding: 0; background: none; color: #d6e2f5; font-size: 13px; line-height: 1.7; white-space: pre; overflow-wrap: normal; }

.dx-tablewrap { overflow-x: auto; margin: 10px 0 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.dx-main table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
.dx-main th, .dx-main td { padding: 10px 14px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--border-soft); color: var(--text-dim); line-height: 1.75; }
.dx-main th { background: var(--bg-elev-2); color: var(--text); font-size: 13px; }
.dx-main tr:last-child td { border-bottom: 0; }
.dx-main td:first-child { white-space: nowrap; }

.dx-note { margin: 16px 0; padding: 12px 16px; border-inline-start: 3px solid var(--accent-1); border-radius: 10px; background: rgba(34, 211, 238, .06); }
.dx-note p { margin: 0; }
.dx-warn { border-inline-start-color: #f5b301; background: rgba(245, 179, 1, .07); }

.dx-plugin { margin: 22px 0; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); }
.dx-plugin-head { display: flex; gap: 16px; align-items: flex-start; }
.dx-plugin-head h3 { margin: 0 0 6px; }
.dx-plugin-head p { margin: 0; }
.dx-logos { display: flex; gap: 8px; flex: none; }
.dx-logos img { width: 44px; height: 44px; }
.dx-actions { margin: 18px 0 6px; }
.dx-hash { font-size: 12.5px; margin-bottom: 6px; }
.dx-hash code { font-size: 12px; user-select: all; }
.dx-foot { margin-top: 22px; }

@media (max-width: 900px) {
  .dx-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .dx-toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .dx-toc b { flex-basis: 100%; padding-bottom: 2px; }
  .dx-toc a { background: rgba(255, 255, 255, .04); }
  .dx-main td:first-child { white-space: normal; }
}
@media (max-width: 520px) {
  .dx-plugin { padding: 16px; }
  .dx-plugin-head { flex-direction: column; }
  .dx-hero { padding-top: 36px; }
}

.weby-inline { width: 18px; height: 18px; border-radius: 5px; vertical-align: -3px; margin-inline-end: 4px; }
