/* docs.bidii.ai: the developer docs in the bidi house style, the dark UI of 15 October 2026.
   The tokens are the site's own (site/assets/tokens.css; a test keeps them
   equal), Sora for display, Manrope for the body, IBM Plex Sans Arabic for
   Arabic, hairline cards with the accent-to-signature top rule. Right to left
   through logical properties only. No inline styles anywhere (the docs' CSP). */
[hidden] { display: none !important; }
:root {
  color-scheme: dark;
  /* The reference design's colours and families (site/assets/tokens.css, part 1) and the status
     colours for dark panels (part 2). */
  --ground: #08090A;
  --panel: #0F1011;
  --raised: #16171A;
  --lift: #1C1D21;
  --line: rgba(255,255,255,.08);
  --line-2: rgba(255,255,255,.14);
  --text: #F7F8F8;
  --text-2: #8A8F98;
  --text-3: #62666D;
  --cobalt: #2A5BE0;
  --cobalt-2: #9DB8FF;
  --ok: #4CC38A;
  --orange: #FB8500;
  --pill: #F7F8F8;
  --pill-ink: #08090A;
  --display: "Sora", "Segoe UI", system-ui, sans-serif;
  --body: "Manrope", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --warn: #F5A623;
  --err: #FF8589;
  --ok-soft: #162520;
  --warn-soft: #2B2213;
  --err-soft: #291718;
  --cobalt-soft: #131C32;
  --cobalt-soft-2: #162447;
  /* The names the docs share with the site (tokens.css part 3; a test keeps them equal) */
  --bg: var(--ground);
  --surface: var(--panel);
  --fg: var(--text);
  --muted: var(--text-2);
  --border: var(--line);
  --accent: var(--cobalt-2);
  --signature: var(--orange);
  --font-display: var(--display);
  --font-body: var(--body);
  --font-arabic: "IBM Plex Sans Arabic", "Tahoma", sans-serif;
  --font-mono: var(--mono);
  --ink: var(--text);
  --accent-2: var(--cobalt);
  --accent-3: var(--cobalt-2);
  --tint: var(--cobalt-soft);
  --tint-2: var(--cobalt-soft-2);
  --line-strong: var(--line-2);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 24px 64px -24px rgba(0,0,0,.8);
  --grad-accent: linear-gradient(180deg, #3769E6 0%, #2A5BE0 100%);
  --ok-text: var(--ok);
  --warn-text: var(--warn);
  --err-text: var(--err);
  --ok-fill: var(--ok-soft);
  --warn-fill: var(--warn-soft);
  --err-fill: var(--err-soft);
  --gutter: 28px;
  --header: 72px;
  --focus: 0 0 0 4px rgba(42,91,224,.32);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header) + 20px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; min-width: 320px; min-height: 100vh; overflow-x: hidden;
  background: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-size: 16px; line-height: 1.6;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
html[lang="ar"] body { font-family: var(--font-arabic); line-height: 1.75; }
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
/* The focus ring: the light cobalt (#9DB8FF, 9.7:1 on the page and on every panel). */
a:focus-visible, button:focus-visible, input:focus-visible, pre:focus-visible, main:focus-visible, .docs-table-scroll:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px;
}
main:focus { outline: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 600; color: var(--ink); text-wrap: balance; }
html[lang="ar"] :where(h1, h2, h3, h4, .docs-brand-tag, .docs-eyebrow, .docs-nav-heading) { font-family: var(--font-arabic); letter-spacing: 0; }
p { text-wrap: pretty; }
code, kbd, pre { font-family: var(--font-mono); }

.docs-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.docs-skip { position: absolute; z-index: 100; inset-block-start: 8px; inset-inline-start: 8px; padding: 10px 14px; border-radius: 10px; background: var(--pill); color: var(--pill-ink); font-weight: 700; text-decoration: none; transform: translateY(-160%); }
.docs-skip:focus { transform: none; }

/* ---- header -------------------------------------------------------------------------------- */
.docs-header { position: sticky; inset-block-start: 0; z-index: 60; border-block-end: 1px solid var(--line); background: color-mix(in oklch, var(--bg) 88%, transparent); backdrop-filter: blur(18px) saturate(130%); -webkit-backdrop-filter: blur(18px) saturate(130%); }
.docs-header-inner { display: flex; align-items: center; gap: 18px; width: min(100%, 1360px); min-height: var(--header); margin-inline: auto; padding-inline: var(--gutter); }
.docs-brand { display: inline-flex; flex: none; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; }
/* The real logo mark, drawn in the text colour as in the site's header. */
.docs-brand-mark { display: block; flex: none; width: calc(20px * 112 / 104); height: 20px; }
.docs-brand-name { font: 600 20px/1 var(--font-display); letter-spacing: -0.045em; }
.docs-brand-tag { padding: 4px 9px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--muted); font: 800 11px/1.2 var(--font-body); letter-spacing: .06em; text-transform: uppercase; }
html[lang="ar"] .docs-brand-tag { text-transform: none; }

.docs-search { position: relative; flex: 1 1 auto; max-width: 560px; margin-inline-start: auto; }
.docs-search::before { position: absolute; inset-block-start: 50%; inset-inline-start: 13px; width: 16px; height: 16px; margin-block-start: -8px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Ccircle cx='8.5' cy='8.5' r='5.5' stroke='%238A8F98' stroke-width='1.8'/%3E%3Cpath d='m13 13 4 4' stroke='%238A8F98' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; content: ''; pointer-events: none; }
.docs-search-input { width: 100%; min-height: 44px; padding-block: 10px; padding-inline: 40px 42px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--raised); color: var(--fg); font: 600 14.5px/1.3 inherit; font-family: inherit; box-shadow: var(--shadow-sm); appearance: none; }
.docs-search-input::-webkit-search-cancel-button { display: none; }
.docs-search-input::placeholder { color: var(--muted); opacity: 1; }
/* A transparent outline, not none: Windows High Contrast draws it where the ring cannot be. */
.docs-search-input:focus-visible { outline: 2px solid transparent; outline-offset: 0; border-color: var(--accent-2); box-shadow: var(--focus); }
.docs-kbd { direction: ltr; unicode-bidi: isolate; position: absolute; inset-block-start: 50%; inset-inline-end: 11px; min-width: 24px; padding: 2px 7px; border: 1px solid var(--line-strong); border-block-end-width: 2px; border-radius: 7px; background: var(--bg); color: var(--muted); font: 700 12px/1.4 var(--font-mono); text-align: center; transform: translateY(-50%); pointer-events: none; }
.docs-search-input:focus + .docs-kbd { display: none; }
.docs-search-list { position: absolute; z-index: 80; inset-block-start: calc(100% + 8px); inset-inline: 0; max-height: min(70vh, 520px); margin: 0; padding: 6px; overflow-y: auto; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-md); list-style: none; }
.docs-search-option { display: grid; gap: 2px; padding: 10px 12px; border-radius: 11px; cursor: pointer; }
.docs-search-option + .docs-search-option { margin-block-start: 2px; }
.docs-search-option:hover { background: var(--raised); }
.docs-search-option[aria-selected="true"] { background: var(--tint); box-shadow: inset 0 0 0 2px var(--accent); }
.docs-search-head { color: var(--ink); font-weight: 800; font-size: 14px; overflow-wrap: anywhere; }
.docs-search-where { color: var(--accent); font-weight: 700; font-size: 12px; }
.docs-search-snippet { color: var(--muted); font-size: 12.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.docs-search-empty { padding: 12px; color: var(--muted); font-size: 14px; }

.docs-lang, .docs-dashboard { display: inline-flex; flex: none; align-items: center; justify-content: center; min-height: 40px; padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap; }
.docs-lang { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); }
.docs-lang:lang(ar) { font-family: var(--font-arabic); }
.docs-lang:lang(en) { font-family: var(--font-body); }
.docs-dashboard { background: var(--pill); color: var(--pill-ink); }
.docs-dashboard:hover { background: #fff; }

/* ---- layout and the Sidebar ------------------------------------------------------------------------ */
.docs-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 48px; width: min(100%, 1360px); margin-inline: auto; padding-inline: var(--gutter); }
.docs-nav { position: sticky; inset-block-start: calc(var(--header) + 1px); align-self: start; max-height: calc(100vh - var(--header) - 1px); padding-block: 26px 40px; overflow-y: auto; overscroll-behavior: contain; }
.docs-nav-toggle { display: none; }
.docs-nav-heading { margin: 22px 0 6px; padding-inline: 12px; color: var(--muted); font: 800 11.5px/1.3 var(--font-body); letter-spacing: .08em; text-transform: uppercase; }
html[lang="ar"] .docs-nav-heading { text-transform: none; font-size: 12.5px; }
.docs-nav-body > .docs-nav-heading:first-child { margin-block-start: 0; }
.docs-nav ul { margin: 0; padding: 0; list-style: none; }
.docs-nav li a { position: relative; display: block; padding: 7px 12px; border-radius: 10px; color: var(--fg); font-size: 14px; font-weight: 600; line-height: 1.4; text-decoration: none; }
.docs-nav li.docs-nav-sub a { padding-inline-start: 26px; font-size: 13.5px; color: var(--muted); }
.docs-nav li a:hover { background: color-mix(in oklch, var(--surface) 70%, transparent); color: var(--ink); }
.docs-nav li a[aria-current="page"] { background: var(--surface); color: var(--ink); font-weight: 800; box-shadow: var(--shadow-sm), inset 0 0 0 1px color-mix(in oklch, var(--accent-2) 35%, transparent); }
.docs-nav li a[aria-current="page"]::before { position: absolute; inset-block: 8px; inset-inline-start: 0; width: 3px; border-radius: 3px; background: var(--accent); content: ''; }

.docs-main { min-width: 0; max-width: 860px; padding-block: 40px 80px; }
.docs-page-head { padding-block-end: 10px; }
.docs-eyebrow { margin: 0 0 12px; color: var(--accent); font: 800 12px/1.3 var(--font-body); letter-spacing: .08em; text-transform: uppercase; }
html[lang="ar"] .docs-eyebrow { text-transform: none; font-size: 13px; }
.docs-page-head h1 { font-size: clamp(32px, 4.2vw, 46px); font-weight: 600; line-height: 1.08; letter-spacing: -0.04em; }
html[lang="ar"] .docs-page-head h1 { line-height: 1.35; }
.docs-lead { max-width: 64ch; margin: 16px 0 0; color: var(--muted); font-size: 17px; line-height: 1.65; }

.docs-toc { margin-block: 26px 8px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in oklch, var(--surface) 80%, transparent); }
.docs-toc-title { margin: 0 0 8px; color: var(--muted); font: 800 11.5px/1.3 var(--font-body); letter-spacing: .08em; text-transform: uppercase; }
html[lang="ar"] .docs-toc-title { font-family: var(--font-arabic); text-transform: none; font-size: 12.5px; letter-spacing: 0; }
.docs-toc ol { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; }
/* An entry can be one long endpoint path with no space to break at (GET /agents/{agent_id}/...):
   it wraps anywhere rather than push the list past the edge of a phone. */
.docs-toc a { font-size: 14px; font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.docs-toc a:hover { text-decoration: underline; }

/* ---- the content -------------------------------------------------------------------------------------- */
.docs-body h2 { margin-block: 48px 0; font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -.03em; line-height: 1.25; }
.docs-body h3 { margin-block: 30px 0; font-size: 17.5px; letter-spacing: -.015em; line-height: 1.35; }
.docs-body h4 { margin-block: 18px 0; font-size: 15px; }
.docs-body p, .docs-body li { color: var(--fg); font-size: 15.5px; line-height: 1.7; }
.docs-body p { max-width: 72ch; margin: 12px 0 0; }
.docs-body ul.docs-list, .docs-body ol.docs-list { max-width: 72ch; margin: 12px 0 0; padding-inline-start: 22px; }
.docs-body ul.docs-list li + li, .docs-body ol.docs-list li + li { margin-block-start: 6px; }
.docs-note { color: var(--muted) !important; font-size: 14px !important; }
/* The API's own English inside an Arabic page: its own direction, across the whole column. */
html[dir="rtl"] .docs-body [lang="en"][dir="ltr"] { max-width: none; }
.docs-body :not(pre) > code { padding: 1px 6px; border-radius: 6px; background: var(--tint); color: var(--ink); font-size: .86em; font-weight: 700; direction: ltr; unicode-bidi: isolate; overflow-wrap: anywhere; }
.docs-body strong { color: var(--ink); }

.docs-code { margin-block-start: 14px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--raised); overflow: hidden; }
.docs-code-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding-block: 6px 0; padding-inline: 14px 8px; }
.docs-code-label { color: var(--muted); font: 800 11.5px/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.docs-copy { display: none; min-height: 32px; min-width: 64px; padding: 5px 12px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); color: var(--ink); font: 800 12.5px/1.2 var(--font-body); cursor: pointer; }
html[lang="ar"] .docs-copy { font-family: var(--font-arabic); }
.js .docs-copy { display: inline-flex; align-items: center; justify-content: center; }
.docs-copy:hover { background: var(--tint); }
.docs-code pre { margin: 0; padding: 10px 16px 16px; overflow-x: auto; color: var(--ink); font-size: 13px; font-weight: 600; line-height: 1.65; direction: ltr; unicode-bidi: isolate; text-align: start; tab-size: 2; }
.docs-code pre code { font: inherit; }

.docs-table-scroll { margin-block-start: 16px; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.docs-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.docs-table th, .docs-table td { padding: 11px 14px; border-block-end: 1px solid var(--line); text-align: start; vertical-align: top; line-height: 1.55; }
.docs-table tr:last-child > * { border-block-end: 0; }
.docs-table thead th { color: var(--muted); background: var(--raised); font: 800 11.5px/1.3 var(--font-body); letter-spacing: .06em; text-transform: uppercase; }
html[lang="ar"] .docs-table thead th { font-family: var(--font-arabic); text-transform: none; font-size: 12.5px; letter-spacing: 0; }
.docs-table th[scope="row"] { font-weight: 600; white-space: nowrap; }
.docs-table code { font-size: 12.5px; font-weight: 700; color: var(--ink); direction: ltr; unicode-bidi: isolate; }

.docs-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-block-start: 18px; }
.docs-card { position: relative; padding: 20px 20px 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
/* Notion notes 4 (kit rule, docs/UI-PATTERNS.md Hairline): the hairline runs edge to edge along the card's top, follows its rounded corners (a 2px top border masked to the card's shape) and never fades. */
.docs-card::before { position: absolute; inset: 0; z-index: 1; width: auto; height: auto; border: 0; border-block-start: 2px solid transparent; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--signature)) border-box; -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) padding-box exclude, linear-gradient(#000 0 0); filter: none; opacity: 1; content: ''; pointer-events: none; }
.docs-card:dir(rtl)::before { background: linear-gradient(270deg, var(--accent), var(--signature)) border-box; }
.docs-card h3 { margin: 0; font-size: 16.5px; }
.docs-card h3 a { color: var(--ink); text-decoration: none; }
.docs-card h3 a:hover { color: var(--accent); text-decoration: underline; }
.docs-card p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.docs-card-group { margin: 0 0 6px !important; color: var(--accent) !important; font: 800 11px/1.3 var(--font-body) !important; letter-spacing: .07em; text-transform: uppercase; }
html[lang="ar"] .docs-card-group { font-family: var(--font-arabic) !important; text-transform: none; font-size: 12px !important; letter-spacing: 0; }
.docs-op-list { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.docs-op-list a { display: flex; align-items: center; gap: 8px; font-size: 13px; text-decoration: none; color: var(--fg); }
.docs-op-list a:hover code { color: var(--accent); text-decoration: underline; }
.docs-op-list code { font-size: 12.5px; font-weight: 700; overflow-wrap: anywhere; }

.docs-callout { display: flex; gap: 12px; max-width: 72ch; margin-block-start: 18px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--tint); }
.docs-callout[data-kind="warn"] { border-color: color-mix(in oklch, var(--warn-text) 30%, transparent); background: var(--warn-fill); }
.docs-callout-icon { flex: none; width: 20px; height: 20px; margin-block-start: 3px; color: var(--warn-text); }
.docs-callout-title { margin: 0 !important; color: var(--ink) !important; font-weight: 800; }
.docs-callout p { margin: 4px 0 0; font-size: 14.5px; }

.docs-facts { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.docs-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 12.5px; font-weight: 700; }

/* ---- the API reference ---------------------------------------------------------------------------------- */
.docs-ref-note { margin: 18px 0 0; font-size: 14px; }
.docs-op { margin-block-start: 34px; padding: 22px 22px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); }
.docs-body .docs-op-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; font-size: 17px; }
.docs-method { display: inline-flex; justify-content: center; min-width: 60px; padding: 5px 8px; border-radius: 8px; font: 800 11.5px/1.2 var(--font-mono); letter-spacing: .06em; }
.docs-method[data-method="get"] { background: var(--ok-fill); color: var(--ok-text); }
.docs-method[data-method="post"] { background: var(--tint-2); color: var(--accent); }
.docs-method[data-method="patch"], .docs-method[data-method="put"] { background: var(--warn-fill); color: var(--warn-text); }
.docs-method[data-method="delete"] { background: var(--err-fill); color: var(--err-text); }
.docs-op-path { color: var(--ink); font: 700 15px/1.4 var(--font-mono); overflow-wrap: anywhere; direction: ltr; unicode-bidi: isolate; }
.docs-body .docs-op-summary { margin-block-start: 10px; color: var(--ink); font-weight: 800; }
.docs-body .docs-op-desc { font-size: 14.5px; }
.docs-op-scope { margin: 12px 0 0 !important; }
.docs-body .docs-op-label { margin-block: 20px 6px; color: var(--muted); font: 800 11.5px/1.3 var(--font-body); letter-spacing: .07em; text-transform: uppercase; }
html[lang="ar"] .docs-body .docs-op-label { font-family: var(--font-arabic); text-transform: none; font-size: 13px; letter-spacing: 0; }
.docs-fields, .docs-responses { margin: 0; padding: 0; list-style: none; }
.docs-fields li { padding-block: 9px; border-block-start: 1px solid var(--line); font-size: 14px; }
.docs-fields li:first-child { border-block-start: 0; }
.docs-fields p { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }
.docs-field-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.docs-field-head > code { color: var(--ink); font-weight: 800; font-size: 13.5px; }
.docs-req { color: var(--err-text); font-size: 12px; font-weight: 800; }
.docs-opt { color: var(--muted); font-size: 12px; font-weight: 700; }
.docs-type { color: var(--muted); font-size: 12.5px; }
.docs-type code { background: none !important; padding: 0 !important; color: var(--muted) !important; font-weight: 600 !important; }
.docs-responses li { display: flex; gap: 10px; padding-block: 4px; font-size: 13.5px; }
.docs-responses li > code { flex: none; min-width: 38px; background: none !important; padding: 0 !important; font-weight: 800; }

/* ---- footer and 404 --------------------------------------------------------------------------------------- */
.docs-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; width: min(100%, 1360px); margin-inline: auto; padding: 28px var(--gutter) 40px; border-block-start: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.docs-footer p { margin: 0; }
.docs-footer ul { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; list-style: none; }
.docs-footer a { color: var(--fg); font-weight: 700; text-decoration: none; }
.docs-footer a:hover { text-decoration: underline; }

.docs-404 { display: grid; gap: 22px; width: min(100%, 720px); margin-inline: auto; padding: 64px var(--gutter); }
.docs-404-part { padding: 26px 26px 22px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-sm); }
.docs-404-part h1, .docs-404-title { margin: 0; color: var(--ink); font: 600 28px/1.25 var(--font-display); letter-spacing: -.03em; }
.docs-404-part:lang(ar), .docs-404-part:lang(ar) .docs-404-title { font-family: var(--font-arabic); letter-spacing: 0; }
.docs-404-part p { margin: 12px 0 0; color: var(--muted); }
.docs-button { display: inline-flex; align-items: center; min-height: 42px; padding: 9px 16px; border-radius: 999px; background: var(--pill); color: var(--pill-ink); font-weight: 700; text-decoration: none; }

/* ---- smaller screens ------------------------------------------------------------------------------------- */
@media (max-width: 979px) {
  .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .docs-nav { position: static; max-height: none; padding-block: 14px 0; overflow: visible; }
  .js .docs-nav-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); color: var(--ink); font: 800 14px/1.3 var(--font-body); box-shadow: var(--shadow-sm); cursor: pointer; }
  html[lang="ar"].js .docs-nav-toggle { font-family: var(--font-arabic); }
  .docs-nav-toggle::after { width: 9px; height: 9px; border-block-end: 2px solid currentColor; border-inline-end: 2px solid currentColor; content: ''; transform: rotate(45deg); transition: transform 160ms ease; }
  .docs-nav-toggle[aria-expanded="true"]::after { transform: rotate(225deg); }
  .docs-nav-current { margin-inline-start: auto; color: var(--muted); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .js .docs-nav-body:not([data-open]) { display: none; }
  .js .docs-nav-body[data-open] { margin-block-start: 8px; padding: 12px 6px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-md); }
  .docs-main { padding-block-start: 26px; }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; --header: 116px; }
  .docs-header-inner { flex-wrap: wrap; gap: 10px 10px; padding-block: 10px; }
  .docs-search { order: 3; flex-basis: 100%; max-width: none; margin-inline-start: 0; }
  .docs-lang { margin-inline-start: auto; }
  .docs-dashboard { padding-inline: 12px; }
  .docs-kbd { display: none; }
  .docs-op { padding: 18px 14px 16px; }
  .docs-code pre { font-size: 12.5px; }
  .docs-table th[scope="row"] { white-space: normal; }
}
@media (max-width: 380px) {
  .docs-brand-tag { display: none; }
}
/* On a phone, at high zoom or in a short window the header wraps onto rows: it scrolls away with
   the page instead of covering it (WCAG 1.4.10, 2.4.11), and anchors land at the top. */
@media (max-width: 760px), (max-height: 520px) {
  .docs-header { position: static; }
  html { scroll-padding-top: 16px; }
  .docs-nav { inset-block-start: 0; max-height: 100vh; }
}

/* ---- Windows High Contrast (forced colors) ------------------------------------------------------------ */
@media (forced-colors: active) {
  .docs-search-option[aria-selected="true"] { outline: 2px solid Highlight; outline-offset: -2px; }
  .docs-nav li a[aria-current="page"] { outline: 2px solid CanvasText; outline-offset: -2px; font-weight: 800; }
  .docs-nav li a[aria-current="page"]::before { background: Highlight; forced-color-adjust: none; }
  .docs-method, .docs-tag { border: 1px solid CanvasText; }
  .docs-copy, .docs-lang, .docs-dashboard, .docs-nav-toggle, .docs-button { border: 1px solid ButtonText; }
}
