@font-face {
  font-family: "Sahel";
  src: url("/static/fonts/sahel/Sahel.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Sahel";
  src: url("/static/fonts/sahel/Sahel-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --topbar-offset: 62px;
  color-scheme: light;
  direction: rtl;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  --bg: #ffffff;
  --surface: #ffffff;
  --muted-surface: #f6f8fb;
  --text: #111827;
  --muted: #667085;
  --border: #d8dee8;
  --border-soft: #edf0f5;
  --brand: #2563eb;
  --green: #0f766e;
  --amber: #9a5b00;
  --red: #b42318;
  --code-bg: #f5f7fa;
  --code-border: #dce3ee;
  --code-text: #172033;
  --radius: 8px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #11161d;
  --surface: #11161d;
  --muted-surface: #18212b;
  --text: #ecf1f7;
  --muted: #a8b3c2;
  --border: #303b49;
  --border-soft: #232d38;
  --brand: #75a7ff;
  --green: #58d5c9;
  --amber: #f4c56a;
  --red: #ff9b93;
  --code-bg: #0b1119;
  --code-border: #283343;
  --code-text: #e8eef7;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #11161d;
    --surface: #11161d;
    --muted-surface: #18212b;
    --text: #ecf1f7;
    --muted: #a8b3c2;
    --border: #303b49;
    --border-soft: #232d38;
    --brand: #75a7ff;
    --green: #58d5c9;
    --amber: #f4c56a;
    --red: #ff9b93;
    --code-bg: #0b1119;
    --code-border: #283343;
    --code-text: #e8eef7;
  }
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-offset) + 48px);
}

body {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding-top: var(--topbar-offset);
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Sahel", Tahoma, sans-serif;
  line-height: 1.85;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.toc-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--brand);
}

button,
input {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 62px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--border-soft);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 160px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: var(--text);
  color: var(--surface);
  direction: ltr;
  font-weight: 700;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.2;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  direction: rtl;
  text-align: right;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.docs-search {
  position: relative;
  flex: 0 1 332px;
  min-width: 0;
}

.docs-search-shell {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.docs-search.open .docs-search-shell,
.docs-search-shell:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent);
}

.docs-search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.docs-search-button,
.docs-search-shortcut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.docs-search-button {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  margin-inline-start: 3px;
  border-radius: 6px;
}

.docs-search-button svg {
  width: 18px;
  height: 18px;
  display: block;
  overflow: visible;
}

.docs-search-input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 6px 0;
}

.docs-search-input::placeholder {
  color: var(--muted);
}

.docs-search-shortcut {
  gap: 4px;
  min-width: 50px;
  margin: 3px;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 4px 7px;
  font-size: 12px;
  direction: ltr;
}

.docs-search-shortcut span {
  display: inline-block;
  line-height: 1;
}

.docs-search-results {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 40;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 18px 42px color-mix(in srgb, #0f172a 10%, transparent);
}

.docs-search-results-inner {
  display: grid;
  max-height: min(60vh, 460px);
  overflow: auto;
  overscroll-behavior: contain;
}

.docs-search-status {
  padding: 13px 14px;
  color: var(--muted);
  font-size: 14px;
}

.docs-search-result {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border-top: 1px solid var(--border-soft);
}

.docs-search-result:first-child {
  border-top: 0;
}

.docs-search-result:hover,
.docs-search-result.active {
  background: var(--muted-surface);
  color: var(--text);
}

.docs-search-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.docs-search-group {
  color: var(--green);
  font-weight: 700;
}

.docs-search-path {
  direction: ltr;
  unicode-bidi: isolate;
}

.docs-search-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.docs-search-preview {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.docs-search-title mark,
.docs-search-preview mark {
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  color: inherit;
  border-radius: 4px;
  padding: 0 2px;
}

.topnav a,
.theme-toggle,
.nav-toggle,
.button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 7px 11px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.theme-toggle {
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  padding: 0;
}

.theme-toggle-icon {
  position: relative;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-icon {
  position: absolute;
  inset: 0;
  width: 20px;
  height: 20px;
  opacity: 0;
  transform: scale(0.84) rotate(-10deg);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

:root:not([data-theme]) .theme-icon-moon,
:root[data-theme="light"] .theme-icon-moon,
:root[data-theme="dark"] .theme-icon-sun {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-icon-moon {
    opacity: 0;
    transform: scale(0.84) rotate(-10deg);
  }

  :root:not([data-theme]) .theme-icon-sun {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.topnav a:hover,
.theme-toggle:hover,
.nav-toggle:hover,
.button:hover {
  background: var(--muted-surface);
  color: var(--text);
}

.top-actions {
  display: flex;
  gap: 8px;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  padding: 0;
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
}

.docs-shell {
  width: min(1320px, 100%);
  margin: 0 auto;
  display: grid;
  align-items: stretch;
  grid-template-columns: 230px minmax(0, 1fr) 210px;
  gap: 32px;
  padding: 28px 24px 62px;
  direction: rtl;
}

.docs-shell-home {
  grid-template-columns: 230px minmax(0, 920px);
  justify-content: center;
}

.content-main,
.hero-block,
.doc-article,
.method-preview,
.reference-tools,
.endpoint-group,
.quick-card {
  min-width: 0;
  max-width: 100%;
}

.sidebar {
  align-self: stretch;
  position: relative;
}

.sidebar-inner {
  position: relative;
  width: 100%;
  min-width: 0;
  z-index: 5;
  padding-inline-end: 4px;
  border: 0;
  background: transparent;
}

.outline {
  align-self: stretch;
  position: relative;
  border: 0;
  background: transparent;
}

.sidebar-title,
.outline-title {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.sidebar-nav,
.outline nav {
  display: grid;
  gap: 1px;
  min-width: 0;
  overflow-x: hidden;
}

.outline-inner {
  position: relative;
  display: grid;
  gap: 16px;
  width: 100%;
  min-width: 0;
  z-index: 5;
  overflow: visible;
  padding-inline-end: 2px;
}

.outline-section {
  display: grid;
  gap: 6px;
}

.sidebar-group-label {
  margin: 10px 0 4px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.sidebar-divider {
  height: 1px;
  margin: 8px 0 6px;
  background: var(--border-soft);
}

.sidebar-nav a,
.outline nav a {
  display: block;
  border-radius: var(--radius);
  padding: 7px 9px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.sidebar-nav a.active,
.sidebar-nav a:hover,
.outline nav a.active,
.outline nav a:hover {
  background: var(--muted-surface);
  color: var(--text);
}

.sidebar-nav a.active {
  font-weight: 700;
}

.outline nav a.level-1 {
  padding-inline-start: 22px;
}

.doc-article h2,
.doc-article h3,
.doc-article h4,
.endpoint-group,
.bot-method,
.admin-endpoint {
  scroll-margin-top: calc(var(--topbar-offset) + 48px);
}

.toc-fab,
.toc-sheet {
  display: none;
}

.hero-block {
  padding: 22px 0 28px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.hero-block h1,
.article-header h1 {
  margin: 0;
  line-height: 1.35;
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: 0;
}

.hero-block p,
.article-header p {
  margin: 14px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 17px;
  overflow-wrap: anywhere;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.article-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.article-header-body {
  min-width: 0;
}

.button {
  border-color: var(--border);
  color: var(--text);
}

.button.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.quick-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.quick-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: start;
  column-gap: 14px;
  row-gap: 2px;
}

.quick-card span {
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  color: var(--amber);
  direction: ltr;
  text-align: right;
  font-weight: 700;
}

.quick-card strong,
.quick-card small {
  min-width: 0;
}

.quick-card strong {
  display: block;
}

.quick-card small {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.home-band {
  margin: 0 0 26px;
  padding: 20px 0 22px;
  border-top: 1px solid var(--border-soft);
}

.home-two-column {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 24px;
  align-items: start;
}

.home-lead {
  margin: 0 0 14px;
  color: color-mix(in srgb, var(--text) 90%, var(--muted));
  font-size: 16px;
  line-height: 1.95;
}

.home-link-list,
.home-detail-list,
.home-capability-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-link-list {
  display: grid;
  gap: 8px;
}

.home-link-list a {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.home-detail-list,
.home-capability-list {
  display: grid;
  gap: 0 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-detail-list li,
.home-capability-list li {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-top: 1px solid var(--border-soft);
}

.home-detail-list strong,
.home-capability-list strong {
  font-size: 15px;
}

.home-detail-list span,
.home-capability-list span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.home-support-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-support-list a {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.home-step-list {
  margin: 0;
  padding-inline-start: 22px;
  display: grid;
  gap: 10px;
}

.home-step-list li {
  color: color-mix(in srgb, var(--text) 90%, var(--muted));
}

.home-step-list li::marker {
  color: var(--brand);
  font-weight: 700;
}

.home-media-row {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-media-row .doc-shot {
  margin: 0;
}

.doc-article {
  padding: 10px 0;
}

.home-article {
  margin-bottom: 18px;
}

.article-header {
  margin-bottom: 26px;
  padding: 18px 0 24px;
  border-bottom: 1px solid var(--border-soft);
}

.doc-article h2 {
  margin: 34px 0 12px;
  font-size: 25px;
  line-height: 1.45;
  letter-spacing: 0;
}

.doc-article h3 {
  margin: 26px 0 8px;
  font-size: 19px;
  letter-spacing: 0;
}

.doc-article p,
.doc-article li {
  color: color-mix(in srgb, var(--text) 88%, var(--muted));
  overflow-wrap: anywhere;
}

.doc-article a {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.not-found-article {
  padding-top: 18px;
}

.not-found-panel {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--muted-surface) 92%, var(--surface)) 0%, var(--surface) 100%);
}

.not-found-panel h1 {
  margin: 0;
  font-size: clamp(32px, 4.5vw, 52px);
  line-height: 1.2;
}

.not-found-lead {
  margin: 14px 0 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 17px;
}

.not-found-path {
  margin-top: 18px;
  width: fit-content;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--muted-surface);
  color: var(--muted);
  font-size: 13px;
  unicode-bidi: plaintext;
  overflow-wrap: anywhere;
}

.not-found-actions {
  margin-top: 22px;
}

.not-found-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.not-found-link {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.not-found-link strong {
  font-size: 15px;
}

.not-found-link span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.not-found-link:hover {
  border-color: color-mix(in srgb, var(--brand) 30%, var(--border));
  background: color-mix(in srgb, var(--muted-surface) 70%, var(--surface));
}

.topnav a[target="_blank"]::after,
.content-main a[target="_blank"]::after {
  content: "↗";
  display: inline-block;
  margin-inline-start: 0.34em;
  color: var(--muted);
  font-size: 0.88em;
  line-height: 1;
  vertical-align: text-top;
}

.doc-article ul,
.doc-article ol {
  padding-inline-start: 24px;
}

.doc-article table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 16px 0 24px;
}

.doc-article th,
.doc-article td {
  border: 1px solid var(--border);
  padding: 9px 11px;
  text-align: right;
  vertical-align: top;
  white-space: normal;
}

.doc-article th {
  background: var(--muted-surface);
}

code {
  direction: ltr;
  unicode-bidi: isolate;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.92em;
}

:not(pre) > code {
  border: 1px solid var(--code-border);
  border-radius: 6px;
  background: var(--code-bg);
  padding: 2px 6px;
}

.doc-article th code,
.doc-article td code {
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  direction: ltr;
  unicode-bidi: plaintext;
  text-align: left;
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.param-table th code,
.param-table td code {
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  direction: ltr;
  unicode-bidi: plaintext;
  text-align: left;
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.code-block {
  position: relative;
  margin: 16px 0 24px;
}

pre {
  position: relative;
  max-width: 100%;
  overflow: auto;
  margin: 16px 0 24px;
  border: 1px solid var(--code-border);
  border-radius: var(--radius);
  background: var(--code-bg);
  color: var(--code-text);
  direction: ltr;
  text-align: left;
}

.code-block pre {
  margin: 0;
}

pre code {
  display: block;
  padding: 17px;
  color: inherit;
  white-space: pre;
}

.copy-button {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  padding: 4px 9px;
  cursor: pointer;
  font-size: 12px;
}

.copy-button svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.tok-command {
  color: var(--brand);
  font-weight: 700;
}

.tok-url {
  color: var(--green);
}

.tok-flag {
  color: var(--amber);
}

.tok-json-key {
  color: var(--brand);
}

.tok-json-string {
  color: var(--green);
}

.tok-json-number {
  color: var(--amber);
}

.tok-json-boolean {
  color: #c2410c;
}

.tok-json-null {
  color: var(--red);
}

.tok-py-comment {
  color: var(--muted);
}

.tok-py-string {
  color: var(--green);
}

.tok-py-keyword {
  color: var(--brand);
  font-weight: 700;
}

.tok-py-builtin {
  color: #b45309;
}

.tok-py-number {
  color: var(--amber);
}

.tok-py-decorator {
  color: #7c3aed;
}

blockquote {
  margin: 18px 0;
  border-inline-start: 3px solid var(--brand);
  background: var(--muted-surface);
  padding: 12px 15px;
  color: var(--muted);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 23px;
}

.text-link {
  color: var(--brand);
  font-weight: 700;
}

.method-preview {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border-soft);
}

.method-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.method-column {
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}

.method-column h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.method-links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
}

.method-links a {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 8px 0;
  border-top: 1px solid var(--border-soft);
}

.method-links li:first-child a {
  border-top: 0;
}

.method-links span {
  color: var(--muted);
  font-size: 12px;
  direction: ltr;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid var(--border-soft);
  margin: 18px 0 22px;
}

.stats-row div {
  padding: 14px 0;
}

.stats-row strong {
  display: block;
  direction: ltr;
  text-align: right;
  font-size: 24px;
  line-height: 1.2;
}

.stats-row span {
  color: var(--muted);
}

.reference-tools {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-soft);
}

.reference-tools p {
  margin: 0 0 12px;
  color: var(--muted);
}

.reference-tools label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.reference-tools input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 9px 12px;
}

.reference-tools input:focus {
  outline: 3px solid color-mix(in srgb, var(--brand) 18%, transparent);
  border-color: var(--brand);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.filter-chip {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 6px 11px;
  cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
  background: var(--text);
  color: var(--surface);
}

.endpoint-groups {
  display: grid;
  gap: 30px;
}

.endpoint-group {
  border-top: 1px solid var(--border);
}

.endpoint-group-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px 0 12px;
}

.endpoint-group-head h2 {
  margin: 0;
  font-size: 21px;
}

.endpoint-group-head span {
  color: var(--muted);
  font-size: 13px;
}

.endpoint-list {
  display: grid;
}

.bot-method,
.admin-endpoint {
  min-width: 0;
  padding: 16px 0;
  border-top: 1px solid var(--border-soft);
}

.endpoint-list > :first-child {
  border-top: 0;
}

.bot-method h3,
.admin-endpoint h3 {
  margin: 0 0 8px;
  min-width: 0;
  font-size: 18px;
}

.bot-method h3 code {
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.bot-method-path {
  margin-top: 8px;
}

.endpoint-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 160px;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--border-soft);
}

.endpoint-methods,
.endpoint-flags {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 6px;
}

.method-badge,
.endpoint-flags span {
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 12px;
  line-height: 1.7;
  white-space: nowrap;
}

.method-badge {
  direction: ltr;
  color: #fff;
  background: var(--brand);
}

.method-post {
  background: var(--green);
}

.method-delete {
  background: var(--red);
}

.method-patch,
.method-put {
  background: var(--amber);
}

.endpoint-flags span {
  background: var(--muted-surface);
  color: var(--muted);
}

.endpoint-body h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.endpoint-path {
  display: block;
  width: fit-content;
  max-width: 100%;
  direction: ltr;
  unicode-bidi: plaintext;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

.bot-method-path code {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  direction: ltr;
  unicode-bidi: plaintext;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.endpoint-body p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.endpoint-details {
  margin-top: 10px;
}

.endpoint-details-open {
  padding-top: 2px;
}

.endpoint-details-title {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.endpoint-details summary {
  width: fit-content;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 4px 9px;
  cursor: pointer;
  font-size: 13px;
}

.param-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin-top: 10px;
}

.param-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}

.param-table th,
.param-table td {
  border: 1px solid var(--border);
  padding: 7px 9px;
  text-align: right;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.param-table th:nth-child(1),
.param-table td:nth-child(1) {
  width: 18%;
}

.param-table th:nth-child(2),
.param-table td:nth-child(2),
.param-table th:nth-child(3),
.param-table td:nth-child(3) {
  width: 16%;
}

.param-table th:nth-child(4),
.param-table td:nth-child(4) {
  width: 10%;
}

.param-table th {
  background: var(--muted-surface);
}

.page-copy {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  overflow: visible;
  flex: 0 0 auto;
  isolation: isolate;
}

.page-copy-main,
.page-copy-toggle,
.page-copy-item {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.page-copy-main,
.page-copy-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.page-copy-main {
  min-height: 40px;
  padding: 0 14px;
  white-space: nowrap;
  background: var(--surface);
}

.page-copy-main svg,
.page-copy-toggle svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.page-copy-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  border-inline-start: 1px solid var(--border-soft);
  background: var(--muted-surface);
}

.page-copy:hover,
.page-copy-toggle:hover {
  color: var(--text);
}

.page-copy-main:hover {
  background: color-mix(in srgb, var(--muted-surface) 45%, var(--surface));
  color: var(--text);
}

.page-copy-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 250px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  opacity: 1;
  backdrop-filter: none;
  box-shadow: 0 18px 34px color-mix(in srgb, #0f172a 14%, transparent);
}

.page-copy-item {
  justify-content: flex-start;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  text-align: right;
  background: var(--surface);
}

.page-copy-item:hover {
  background: var(--muted-surface);
}

.footer,
.site-footer {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 30px 24px 38px;
  color: var(--muted);
  border-top: 1px solid var(--border-soft);
}

.site-footer {
  margin-top: 64px;
  background: color-mix(in srgb, var(--muted-surface) 84%, var(--bg));
}

.footer-grid,
.site-footer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) repeat(3, minmax(150px, 1fr));
  gap: 28px;
}

.footer-title,
.site-footer-title {
  margin: 0 0 10px;
  color: var(--text);
  font-weight: 700;
}

.site-footer-title {
  font-size: 18px;
}

.footer-text,
.site-footer-text {
  max-width: 420px;
  margin: 0;
  font-size: 14px;
}

.site-footer-text {
  line-height: 1.8;
}

.footer h4,
.site-footer-heading {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 15px;
}

.footer a,
.site-footer-links a,
.site-footer-mini-links a {
  color: var(--muted);
  font-size: 14px;
}

.site-footer-links a {
  display: block;
  width: fit-content;
}

.footer .ltr {
  direction: ltr;
  unicode-bidi: isolate;
}

.site-footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.site-footer-links a:hover,
.site-footer-mini-links a:hover {
  color: var(--text);
}

/* AIDEV-NOTE: Footer contact column with icon glyphs (mirrors backend/static/v2). */
.site-footer-contact-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.site-footer-contact-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 14px;
  color: var(--muted);
}

.site-footer-contact-list .icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--surface) 86%, var(--muted-surface, var(--surface)));
  font-size: 13px;
  line-height: 1;
}

.site-footer-contact-list a {
  color: var(--muted);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

.site-footer-contact-list a:hover {
  color: var(--text);
}

.phone-number {
  unicode-bidi: isolate;
  direction: ltr;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  white-space: nowrap;
}

.contact-icon-mask {
  display: inline-block;
  width: 14px;
  height: 14px;
  background-color: currentColor;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}

.contact-icon-mask.is-telegram { mask-image: url('/static/icons/contact-telegram.svg'); -webkit-mask-image: url('/static/icons/contact-telegram.svg'); }
.contact-icon-mask.is-eitaa { mask-image: url('/static/icons/contact-eitaa.svg'); -webkit-mask-image: url('/static/icons/contact-eitaa.svg'); }
.contact-icon-mask.is-bale { mask-image: url('/static/icons/contact-bale.svg'); -webkit-mask-image: url('/static/icons/contact-bale.svg'); }
.contact-icon-mask.is-instagram { mask-image: url('/static/icons/contact-instagram.svg'); -webkit-mask-image: url('/static/icons/contact-instagram.svg'); }
.contact-icon-mask.is-whatsapp { mask-image: url('/static/icons/contact-whatsapp.svg'); -webkit-mask-image: url('/static/icons/contact-whatsapp.svg'); }

.site-footer-contact-list .icon .contact-icon-mask {
  color: var(--muted);
}

.site-footer-social-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}

.site-footer-social-title {
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  text-align: right;
}

.site-footer-social-links {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.site-footer-social-link {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  display: grid;
  place-items: center;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.site-footer-social-link img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.site-footer-social-link:hover {
  border-color: color-mix(in srgb, var(--brand) 44%, var(--border));
  background: var(--muted-surface);
}

.site-footer-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
}

.site-footer-bottom {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.site-footer-mini-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer-mini-links a {
  font-size: 13px;
}

.sequence-figure {
  margin: 18px 0 24px;
}

.doc-shot {
  margin: 18px 0 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.doc-shot img {
  display: block;
  width: 100%;
  height: auto;
}

.doc-shot figcaption {
  padding: 10px 12px;
  border-top: 1px solid var(--border-soft);
  color: var(--muted);
  font-size: 13px;
}

.sequence-figure svg {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.sequence-figure figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1180px) {
  .docs-shell {
    grid-template-columns: 210px minmax(0, 1fr) 190px;
    gap: 24px;
  }

  .docs-shell-home {
    grid-template-columns: 210px minmax(0, 820px);
  }

  .home-detail-list,
  .home-capability-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 940px) {
  .docs-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .outline {
    display: none;
  }

  .docs-shell-home {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .home-two-column,
  .home-media-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  :root {
    --topbar-offset: 72px;
  }

  .topbar {
    flex-wrap: nowrap;
    gap: 10px;
    padding: 10px 14px;
    direction: rtl;
  }

  .brand {
    min-width: 0;
    flex: 1 1 auto;
  }

  .topnav,
  .topnav {
    display: none;
  }

  .docs-search {
    order: 2;
    flex: 0 0 auto;
    width: 44px;
    overflow: visible;
  }

  .docs-search.open {
    position: absolute;
    top: calc(100% + 8px);
    right: 14px;
    left: 14px;
    width: auto;
    z-index: 65;
  }

  .docs-search-shell {
    width: 44px;
    min-height: 44px;
    grid-template-columns: 1fr;
    justify-items: center;
    border-color: transparent;
    border-radius: 999px;
    overflow: visible;
    background: transparent;
    box-shadow: none;
  }

  .docs-search.open .docs-search-shell,
  .docs-search-shell:focus-within {
    width: 100%;
    grid-template-columns: 34px minmax(0, 1fr);
    justify-items: stretch;
    border-radius: 10px;
  }

  .docs-search-input,
  .docs-search-shortcut {
    display: none;
  }

  .docs-search.open .docs-search-input,
  .docs-search.open .docs-search-shortcut,
  .docs-search-shell:focus-within .docs-search-input,
  .docs-search-shell:focus-within .docs-search-shortcut {
    display: inline-flex;
  }

  .docs-search-button {
    width: 44px;
    height: 44px;
    margin-inline-start: 0;
    margin: 0;
    border-radius: 999px;
  }

  .docs-search:not(.open) .docs-search-shell:hover,
  .docs-search:not(.open) .docs-search-button:hover {
    background: var(--muted-surface);
  }

  .docs-search.open .docs-search-button,
  .docs-search-shell:focus-within .docs-search-button {
    width: 34px;
    height: 34px;
    margin: 3px;
    border-radius: 6px;
  }

  .docs-search.open .docs-search-input,
  .docs-search-shell:focus-within .docs-search-input {
    min-width: 0;
    padding: 6px 0 6px 10px;
  }

  .docs-search.open .docs-search-shortcut,
  .docs-search-shell:focus-within .docs-search-shortcut {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .top-actions {
    order: 3;
    flex: 0 0 auto;
  }

  .docs-shell {
    display: block;
    width: 100%;
    padding: 18px 14px 42px;
    direction: ltr;
  }

  .content-main {
    direction: rtl;
    width: 100%;
    max-width: calc(100vw - 28px);
    overflow: hidden;
  }

  .hero-block,
  .quick-grid,
  .doc-article,
  .method-preview,
  .reference-tools,
  .endpoint-groups {
    width: 100%;
    max-width: calc(100vw - 28px);
    margin-inline: 0;
  }

  .sidebar {
    display: none;
    position: fixed;
    inset: calc(var(--topbar-offset) + 8px) 12px auto 12px;
    z-index: 30;
    max-height: calc(100vh - var(--topbar-offset) - 24px);
    overflow: auto;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    direction: rtl;
  }

  .sidebar.open {
    display: block;
  }

  .toc-fab {
    position: fixed;
    right: 14px;
    bottom: 18px;
    z-index: 25;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    padding: 8px 14px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  }

  .toc-sheet {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    align-items: end;
    background: rgba(15, 23, 42, 0.28);
    padding: 14px;
  }

  .toc-sheet-card {
    max-height: min(72vh, 540px);
    overflow: auto;
    border-radius: 14px;
    background: var(--surface);
    padding: 14px;
  }

  .toc-sheet-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
  }

  .toc-sheet-close {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: transparent;
    color: var(--muted);
    padding: 5px 10px;
  }

  .toc-sheet-nav {
    display: grid;
    gap: 2px;
  }

.toc-sheet-nav a {
  display: block;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: var(--muted);
}

.toc-sheet-nav a.active {
  background: var(--muted-surface);
  color: var(--text);
}

  .toc-sheet-nav a.level-1 {
    padding-inline-start: 22px;
  }

  .stats-row {
    grid-template-columns: 1fr;
  }

  .hero-actions .button {
    flex: 1 1 132px;
    min-width: 0;
  }

  .article-header-top {
    flex-direction: column;
    align-items: stretch;
  }

  .not-found-grid {
    grid-template-columns: 1fr;
  }

  .page-copy {
    width: fit-content;
    max-width: 100%;
    align-self: flex-end;
  }

  .page-copy-main {
    min-height: 38px;
    padding-inline: 12px;
    gap: 8px;
  }

  .page-copy-menu {
    left: 0;
    min-width: 0;
  }

  .reference-tools .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .endpoint-group-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .endpoint-group-head span {
    display: block;
  }

  .endpoint-row {
    grid-template-columns: 1fr;
  }

  .endpoint-flags {
    justify-content: flex-start;
  }

  pre code {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .param-table,
  .param-table thead,
  .param-table tbody,
  .param-table tr,
  .param-table td {
    display: block;
    width: 100%;
  }

  .param-table th:nth-child(1),
  .param-table th:nth-child(2),
  .param-table th:nth-child(3),
  .param-table th:nth-child(4),
  .param-table th:nth-child(5),
  .param-table td:nth-child(1),
  .param-table td:nth-child(2),
  .param-table td:nth-child(3),
  .param-table td:nth-child(4),
  .param-table td:nth-child(5) {
    width: 100%;
  }

  .param-table thead {
    display: none;
  }

  .param-table tr {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    overflow: hidden;
  }

  .param-table td {
    border: 0;
    border-bottom: 1px solid var(--border-soft);
    display: block;
    padding: 10px 12px;
  }

  .param-table td:last-child {
    border-bottom: 0;
  }

  .param-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-weight: 700;
  }

  .param-table td > * {
    min-width: 0;
  }

  .param-table td > code,
  .param-table td > a,
  .param-table td > span {
    display: block;
    width: 100%;
  }

  .param-table td > code {
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .footer {
    direction: rtl;
  }

  .footer-grid,
  .site-footer-grid {
    grid-template-columns: 1fr;
  }

  .site-footer-social-row,
  .site-footer-bottom-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .hero-block h1,
  .article-header h1 {
    font-size: 28px;
  }

  .brand strong {
    font-size: 15px;
  }

  .brand small {
    font-size: 12px;
  }

  .page-copy-main {
    padding-inline: 10px;
  }

  .page-copy-main svg,
  .page-copy-toggle svg {
    width: 17px;
    height: 17px;
    flex-basis: 17px;
  }

  .quick-card {
    padding: 14px;
  }
}
