@import url("/assets/screenshot_edges.css");
/* Deer docs. Dark only, on the waitlist page's dashboard tokens. */
:root {
  --ground: #131313; --background: #171717; --raised: #1B1B1B; --foreground: #FAFAFA; --text: #D4D4D4; --muted-foreground: #A3A3A3; --faint: #737373;
  --muted: #202020; --field: #FFFFFF0A; --hover: #FFFFFF0D; --border: #262626; --strong-border: #404040; --ring: #737373;
  --primary: #FFFFFF; --primary-hover: #E5E5E5; --primary-foreground: #000000; --blue: #266DF0; --guide: #383838; --hatch: #FFFFFF14;
  --note: #5B8DEF; --tip: #4CB782; --important: #9D8CF2; --warning: #E2A33C;
  --ease: cubic-bezier(0.22, 1, 0.36, 1); --reveal: 1s;
  --topbar: 56px; --sidebar: 272px; --toc: 232px; --measure: 744px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; }
html { background: var(--ground); scroll-padding-top: calc(var(--topbar) + 24px); -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body {
  min-height: 100vh; background: transparent; color: var(--text);
  font: 400 14px/22px "Inter", "IBM Plex Sans Arabic", ui-sans-serif, system-ui, sans-serif;
  font-feature-settings: 'cv11', 'ss03'; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
html:lang(ar) body { font-family: var(--font-ar); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
::selection { background: #266DF055; color: var(--foreground); }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 4px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* One language at a time. prefs.js sets <html lang> before the first paint. */
html:lang(ar) [data-locale="en"], html:lang(en) [data-locale="ar"] { display: none !important; }

.i { width: 18px; height: 18px; flex: none; }
.i--sm { width: 16px; height: 16px; }
.i--xs { width: 14px; height: 14px; }
[dir="rtl"] .flip, html[dir="rtl"] .flip { transform: scaleX(-1); }
.flip-back { transform: scaleX(-1); }
html[dir="rtl"] .flip-back { transform: none; }

.skip-link { position: fixed; inset-block-start: 8px; inset-inline-start: 8px; z-index: 100; padding: 8px 12px; border-radius: 8px; background: var(--primary); color: var(--primary-foreground); transform: translateY(-200%); transition: transform .2s var(--ease); }
.skip-link:focus { transform: none; }

/* The waitlist's dot grid, fading from the top of the window. */
.dots { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: radial-gradient(circle, #333 .9px, transparent 1px); background-size: 16px 16px;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 0, transparent 70%); -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 0, transparent 70%); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 500; white-space: nowrap; border: 1px solid transparent; transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease); }
.btn--solid { background: var(--primary); color: var(--primary-foreground); box-shadow: 0 1px 2px #0000000D; }
.btn--solid:hover { background: var(--primary-hover); }
.btn--ghost { color: var(--muted-foreground); border-color: var(--border); background: var(--field); }
.btn--ghost:hover { color: var(--foreground); border-color: var(--strong-border); }
.btn--lg { height: 40px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted-foreground); cursor: pointer; transition: background .15s var(--ease), color .15s var(--ease); }
.icon-btn:hover { background: var(--hover); color: var(--foreground); }
kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; background: var(--muted); color: var(--muted-foreground); font: 500 11px/1 "Inter", ui-sans-serif, system-ui, sans-serif; direction: ltr; }
.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; margin-inline: 2px; border: 1px solid var(--strong-border); border-radius: 999px; color: var(--foreground); background: var(--muted); font-size: 11px; font-weight: 500; line-height: 1; vertical-align: 2px; letter-spacing: .01em; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px #266DF02E; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 40; height: var(--topbar); border-bottom: 1px solid var(--border); background: #131313D9; backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px); }
.topbar__inner { display: flex; align-items: center; gap: 16px; height: 100%; max-width: 1560px; margin: 0 auto; padding: 0 20px; }
.topbar__menu, .topbar__search { display: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--foreground); font-size: 15px; font-weight: 600; flex: none; }
.brand__mark { position: relative; display: block; width: 17px; height: 22px; }
.brand__mark img { position: absolute; inset: 0; width: 100%; height: 100%; transition: clip-path var(--reveal) var(--ease); }
.brand__outline { clip-path: inset(0 0 0 0); opacity: .7; }
.brand__fill { clip-path: inset(0 0 0 100%); }
.brand:hover .brand__fill, body.filled .brand__fill { clip-path: inset(0 0 0 0); }
.brand:hover .brand__outline, body.filled .brand__outline { clip-path: inset(0 100% 0 0); }
.brand__rule { width: 1px; height: 16px; background: var(--strong-border); transform: skewX(-14deg); }
.brand__docs { color: var(--muted-foreground); font-weight: 500; }
.search-trigger { display: flex; align-items: center; gap: 8px; width: min(340px, 34vw); height: 34px; margin-inline-start: 24px; padding: 0 6px 0 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--field); color: var(--faint); cursor: pointer; text-align: start; transition: border-color .15s var(--ease), color .15s var(--ease); }
html[dir="rtl"] .search-trigger { padding: 0 10px 0 6px; }
.search-trigger:hover { border-color: var(--strong-border); color: var(--muted-foreground); }
.search-trigger__text { flex: 1; font-size: 13px; }
.search-trigger__keys { display: inline-flex; gap: 3px; direction: ltr; }
.topbar__links { display: flex; gap: 4px; margin-inline-start: auto; }
.topbar__links a { padding: 6px 10px; border-radius: 7px; color: var(--muted-foreground); font-size: 13px; transition: color .15s var(--ease), background .15s var(--ease); }
.topbar__links a:hover { color: var(--foreground); background: var(--hover); }
.topbar__end { display: flex; align-items: center; gap: 6px; }

/* Shell */
.shell { position: relative; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr) var(--toc); max-width: 1560px; margin: 0 auto; }
.shell--home { grid-template-columns: var(--sidebar) minmax(0, 1fr); }

/* Sidebar */
.sidebar { position: sticky; top: var(--topbar); display: flex; flex-direction: column; height: calc(100vh - var(--topbar)); border-inline-end: 1px solid var(--border); }
.sidebar__head { display: none; }
.sidebar__scroll { flex: 1; overflow-y: auto; padding: 20px 12px 24px; scrollbar-width: thin; scrollbar-color: #2A2A2A transparent; }
.sidebar__home { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; margin-bottom: 14px; border-radius: 8px; color: var(--muted-foreground); font-size: 13px; transition: background .15s var(--ease), color .15s var(--ease); }
.sidebar__home:hover { background: var(--hover); color: var(--foreground); }
.sidebar__home[aria-current="page"] { background: var(--muted); color: var(--foreground); }
.sidebar__group + .sidebar__group { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--border); }
.sidebar__label { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 8px; color: var(--muted-foreground); font-size: 13px; font-weight: 500; cursor: pointer; list-style: none; user-select: none; transition: background .15s var(--ease), color .15s var(--ease); }
.sidebar__label::-webkit-details-marker { display: none; }
.sidebar__label:hover { background: var(--hover); color: var(--foreground); }
.sidebar__group[open] > .sidebar__label, .sidebar__group.is-current > .sidebar__label { color: var(--foreground); }
.sidebar__label .i { color: var(--faint); }
.sidebar__label > span { flex: 1; }
.sidebar__chevron { transition: transform .2s var(--ease); }
.sidebar__group:not([open]) .sidebar__chevron { transform: rotate(-90deg); }
html[dir="rtl"] .sidebar__group:not([open]) .sidebar__chevron { transform: rotate(90deg); }
.sidebar ul { list-style: none; padding: 0; position: relative; margin: 4px 0 8px; margin-inline-start: 18px; border-inline-start: 1px solid var(--border); }
/* Open and close smoothly where the browser can animate details content. */
@supports (interpolate-size: allow-keywords) {
  .sidebar { interpolate-size: allow-keywords; }
  .sidebar__group::details-content { height: 0; overflow: clip; transition: height .25s var(--ease), content-visibility .25s allow-discrete; }
  .sidebar__group[open]::details-content { height: auto; }
}
.sidebar li a { position: relative; display: block; padding: 5px 12px; margin-inline-start: -1px; border-inline-start: 1px solid transparent; color: var(--muted-foreground); font-size: 13px; line-height: 20px; transition: color .15s var(--ease), border-color .15s var(--ease); }
.sidebar li a:hover { color: var(--foreground); border-inline-start-color: var(--strong-border); }
.sidebar li a[aria-current="page"] { color: var(--foreground); font-weight: 500; border-inline-start-color: var(--foreground); }
.sidebar li a[aria-current="page"]::before { content: ""; position: absolute; inset-block: 3px; inset-inline: 4px 0; z-index: -1; border-radius: 6px; background: var(--hover); }
.sidebar__version { display: flex; align-items: center; gap: 10px; padding: 12px 22px; border-top: 1px solid var(--border); color: var(--faint); font-size: 11px; }

/* Article column with construction guides running down its edges. */
.doc { position: relative; min-width: 0; padding: 40px 56px 0; overflow-x: clip; }
.guide { position: absolute; inset-block: 0; width: 0; border-inline-start: 1px dashed var(--border); pointer-events: none;
  mask-image: linear-gradient(to bottom, transparent, #000 160px, #000 70%, transparent); -webkit-mask-image: linear-gradient(to bottom, transparent, #000 160px, #000 70%, transparent); }
.guide--a { inset-inline-start: 24px; } .guide--b { inset-inline-end: 24px; }
.article { max-width: var(--measure); margin: 0 auto; }
.article__head { position: relative; padding-bottom: 28px; margin-bottom: 32px; }
.article__rule { position: absolute; bottom: 0; left: 50%; width: 200vw; transform: translateX(-50%); border-top: 1px solid var(--guide);
  mask-image: linear-gradient(to right, transparent 25%, #000 42%, #000 58%, transparent 75%); -webkit-mask-image: linear-gradient(to right, transparent 25%, #000 42%, #000 58%, transparent 75%); }
.crumbs { display: flex; align-items: center; gap: 6px; margin-bottom: 18px; color: var(--faint); font-size: 12px; }
.crumbs a:hover { color: var(--foreground); }
.crumbs .i { opacity: .7; }
.article__title { display: flex; align-items: center; gap: 14px; }
.article__icon, .card__icon, .starter__icon, .section-card__icon, .help-band__icon { position: relative; display: grid; place-items: center; flex: none; width: 40px; height: 40px; border: 1px solid var(--strong-border); border-radius: 10px; color: var(--foreground);
  background: var(--ground) repeating-linear-gradient(45deg, var(--hatch) 0 1px, transparent 1px 6px); }
.article__icon::after, .section-card__icon::after { content: ""; position: absolute; inset: -5px; border: 1px dashed var(--border); border-radius: 13px; pointer-events: none; }
.article h1 { color: var(--foreground); font-size: 32px; line-height: 40px; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
.article:lang(ar) h1 { letter-spacing: 0; line-height: 46px; }
.article__lead { margin-top: 14px; color: var(--muted-foreground); font-size: 16px; line-height: 26px; text-wrap: pretty; }
.article:lang(ar) .article__lead { font-size: 17px; line-height: 30px; }

/* Prose */
.prose { font-size: 15px; line-height: 26px; }
.prose:lang(ar), .article:lang(ar) .prose { font-size: 16px; line-height: 30px; }
.prose > * + * { margin-top: 16px; }
.prose p { text-wrap: pretty; }
.prose strong { color: var(--foreground); font-weight: 600; }
.prose a:not(.card):not(.anchor) { color: var(--foreground); text-decoration: underline; text-decoration-color: var(--strong-border); text-underline-offset: 4px; text-decoration-thickness: 1px; transition: text-decoration-color .15s var(--ease); }
.prose a:not(.card):not(.anchor):hover { text-decoration-color: var(--foreground); }
.i--ext { width: 12px; height: 12px; margin-inline-start: 2px; vertical-align: -1px; color: var(--faint); }
html[dir="rtl"] .i--ext { transform: scaleX(-1); }
.prose h2, .prose h3 { position: relative; color: var(--foreground); scroll-margin-top: calc(var(--topbar) + 24px); }
.prose h2 { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--border); font-size: 22px; line-height: 30px; font-weight: 600; letter-spacing: -0.01em; }
.prose h2::before { content: ""; position: absolute; top: -1px; inset-inline-start: 0; width: 48px; border-top: 1px solid var(--foreground); }
.prose:lang(ar) h2, .article:lang(ar) .prose h2 { letter-spacing: 0; line-height: 36px; }
.prose > h2:first-child { margin-top: 8px; }
.prose h3 { margin-top: 36px; font-size: 17px; line-height: 26px; font-weight: 600; }
.prose h2 + *, .prose h3 + * { margin-top: 12px; }
.anchor { position: absolute; inset-inline-start: -28px; bottom: 4px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; color: var(--faint); opacity: 0; transition: opacity .15s var(--ease), color .15s var(--ease); }
.prose h2 .anchor { bottom: 4px; }
.prose h2:hover .anchor, .prose h3:hover .anchor, .anchor:focus-visible { opacity: 1; }
.anchor:hover { color: var(--foreground); }
.prose ul, .prose ol:not(.steps) { padding-inline-start: 22px; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--faint); }
.prose ol:not(.steps) > li::marker { font-variant-numeric: tabular-nums; font-size: .92em; }
.prose code { padding: 1px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--muted); color: var(--foreground); font: 400 .86em/1 var(--mono); unicode-bidi: isolate; direction: ltr; white-space: break-spaces; }
.prose hr { height: 0; margin: 40px 0; border: 0; border-top: 1px dashed var(--border); }
.prose blockquote { padding-inline-start: 16px; border-inline-start: 2px solid var(--strong-border); color: var(--muted-foreground); }

/* Code */
.code { overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: var(--background); text-align: left; }
.code__bar { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 8px 0 14px; border-bottom: 1px solid var(--border);
  background: var(--ground) repeating-linear-gradient(45deg, #FFFFFF07 0 1px, transparent 1px 6px); }
.code__title { display: flex; align-items: center; gap: 8px; color: var(--muted-foreground); font: 500 12px/1 "Inter", system-ui, sans-serif; }
.code__copy { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--faint); cursor: pointer; transition: background .15s var(--ease), color .15s var(--ease); }
.code__copy:hover { background: var(--hover); color: var(--foreground); }
.code__copy .i--done { display: none; color: var(--tip); }
.code__copy.is-done .i--done { display: block; } .code__copy.is-done .i:not(.i--done) { display: none; }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; font: 400 13px/22px var(--mono); color: #E5E5E5; tab-size: 2; scrollbar-width: thin; scrollbar-color: #2A2A2A transparent; }
.prose .code code { padding: 0; border: 0; border-radius: 0; background: none; font: inherit; white-space: pre; color: inherit; }
.t-key { color: #9CC2FF; } .t-str { color: #A8D8B0; } .t-num { color: #F3C77B; } .t-kw { color: #C9A7FF; } .t-punc { color: #8A8A8A; }
.t-cmt { color: #6B6B6B; font-style: italic; } .t-fn { color: #FAFAFA; font-weight: 500; } .t-flag { color: #9CC2FF; } .t-var { color: #F3C77B; } .t-ph { color: #F59E9E; }

/* Callouts */
.callout { --tone: var(--note); position: relative; padding: 14px 16px 14px 18px; border: 1px solid var(--border); border-radius: 12px; background: linear-gradient(to right, color-mix(in srgb, var(--tone) 7%, transparent), transparent 60%), var(--background); }
html[dir="rtl"] .callout { background: linear-gradient(to left, color-mix(in srgb, var(--tone) 7%, transparent), transparent 60%), var(--background); }
.callout::before { content: ""; position: absolute; inset-block: 12px; inset-inline-start: -1px; width: 2px; border-radius: 2px; background: var(--tone); }
.callout--tip { --tone: var(--tip); } .callout--important { --tone: var(--important); } .callout--warning, .callout--caution { --tone: var(--warning); }
.callout__head { display: flex; align-items: center; gap: 8px; color: var(--tone); font-size: 13px; font-weight: 600; line-height: 20px; }
.callout__body { margin-top: 6px; font-size: .94em; }
.callout__body > * + * { margin-top: 10px; }

/* Steps: numbered on a dashed construction line. */
.steps { list-style: none; padding: 0; counter-reset: step; }
.step { position: relative; padding-inline-start: 48px; padding-bottom: 28px; counter-increment: step; }
.step::before { content: counter(step); position: absolute; inset-inline-start: 0; top: 0; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--strong-border); border-radius: 50%; background: var(--ground); color: var(--foreground); font: 600 13px/1 "Inter", sans-serif; z-index: 1; }
.step::after { content: ""; position: absolute; inset-inline-start: 15px; top: 34px; bottom: 4px; border-inline-start: 1px dashed var(--strong-border); }
.step:last-child { padding-bottom: 0; } .step:last-child::after { display: none; }
.step__title { color: var(--foreground); font-size: 16px; line-height: 30px; font-weight: 600; }
.step__body { margin-top: 4px; }
.step__body > * + * { margin-top: 12px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card { position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--background); transition: border-color .2s var(--ease), background .2s var(--ease); overflow: hidden; }
.card::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, #FFFFFF08 0 1px, transparent 1px 7px); opacity: 0; transition: opacity .3s var(--ease); pointer-events: none; }
.card:hover { border-color: var(--strong-border); background: var(--raised); }
.card:hover::before { opacity: 1; }
.card__icon { width: 34px; height: 34px; border-radius: 9px; }
.card__icon .i { width: 16px; height: 16px; }
.card__text { position: relative; display: grid; gap: 3px; flex: 1; font-size: 13px; line-height: 20px; color: var(--muted-foreground); }
.card__text strong { color: var(--foreground); font-size: 14px; font-weight: 600; }
.card__arrow { position: relative; margin-top: 2px; color: var(--faint); transition: transform .2s var(--ease), color .2s var(--ease); }
.card:hover .card__arrow { color: var(--foreground); transform: translateX(3px); }
html[dir="rtl"] .card:hover .card__arrow { transform: scaleX(-1) translateX(3px); }

/* Tabs */
.tabs { border: 1px solid var(--border); border-radius: 12px; background: var(--background); overflow: hidden; }
.tabs__list { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--border); overflow-x: auto; background: var(--ground); }
.tabs__list button { height: 30px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: var(--muted-foreground); font-size: 13px; cursor: pointer; white-space: nowrap; transition: background .15s var(--ease), color .15s var(--ease); }
.tabs__list button:hover { color: var(--foreground); }
.tabs__list button[aria-selected="true"] { background: var(--muted); color: var(--foreground); box-shadow: inset 0 0 0 1px var(--border); }
.tabs [role="tabpanel"] { padding: 16px; }
.tabs [role="tabpanel"] > * + * { margin-top: 12px; }
.tabs .code { border-radius: 10px; }

/* Tables */
.table { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; scrollbar-width: thin; }
.table table { width: 100%; border-collapse: collapse; font-size: 13.5px; line-height: 21px; }
.table th { padding: 10px 14px; background: var(--background); color: var(--foreground); font-weight: 600; text-align: start; white-space: nowrap; border-bottom: 1px solid var(--border); }
.table td { padding: 10px 14px; border-top: 1px solid var(--border); vertical-align: top; }
.table tr:first-child td { border-top: 0; }
.table tbody tr:hover td { background: #FFFFFF04; }
.table code { white-space: nowrap; }

/* Screenshots sit in the logo's hatched construction frame. */
.shot { margin-top: 24px; }
.shot__frame { position: relative; display: block; padding: 12px; border: 1px dashed var(--strong-border); border-radius: 16px; background: repeating-linear-gradient(45deg, var(--hatch) 0 1px, transparent 1px 8px); }
.shot__frame img { display: block; width: 100%; height: auto; border-radius: 8px; background: var(--background); }
.shot figcaption { margin-top: 10px; color: var(--faint); font-size: 12px; text-align: center; }

/* Article footer */
.article__meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--faint); }
.article__meta a { display: inline-flex; align-items: center; gap: 6px; transition: color .15s var(--ease); }
.article__meta a:hover { color: var(--foreground); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.pager__link { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--background); transition: border-color .2s var(--ease), background .2s var(--ease); }
.pager__link:hover { border-color: var(--strong-border); background: var(--raised); }
.pager__link--next { text-align: end; }
.pager__dir { display: inline-flex; align-items: center; gap: 6px; color: var(--faint); font-size: 12px; }
.pager__link--next .pager__dir { justify-content: flex-end; }
.pager__link strong { color: var(--foreground); font-size: 14px; font-weight: 500; }

/* Table of contents */
.toc { position: sticky; top: var(--topbar); height: calc(100vh - var(--topbar)); overflow-y: auto; padding: 40px 20px 24px 8px; scrollbar-width: none; }
html[dir="rtl"] .toc { padding: 40px 8px 24px 20px; }
.toc__label { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--foreground); font-size: 12px; font-weight: 600; }
.toc__label .i { color: var(--faint); }
.toc ul { list-style: none; padding: 0; border-inline-start: 1px dashed var(--strong-border); }
.toc__item a { display: block; margin-inline-start: -1px; padding: 4px 12px; border-inline-start: 1px solid transparent; color: var(--faint); font-size: 12.5px; line-height: 18px; transition: color .15s var(--ease), border-color .15s var(--ease); }
.toc__item--3 a { padding-inline-start: 24px; }
.toc__item a:hover { color: var(--foreground); }
.toc__item a.is-active { color: var(--foreground); border-inline-start-color: var(--foreground); }

/* Footer */
.docs-footer { max-width: var(--measure); margin: 64px auto 0; padding: 24px 0 40px; border-top: 1px dashed var(--border); }
.home .docs-footer { max-width: none; }
.docs-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; color: var(--faint); font-size: 12px; }
.docs-footer__brand { display: inline-flex; align-items: center; gap: 8px; }
.docs-footer__brand img { opacity: .7; }
.docs-footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.docs-footer nav a:hover, .docs-footer__brand:hover { color: var(--foreground); }

/* Home */
.home { position: relative; min-width: 0; padding: 0 48px; overflow: clip; }
.hero { position: relative; padding: 72px 0 64px; text-align: center; }
.stage { position: relative; margin: 0 auto 44px; width: min(300px, 64vw); direction: ltr; }
.stage::before, .stage::after { content: ""; position: absolute; left: 50%; width: 200vw; transform: translateX(-50%); border-top: 1px solid var(--guide); transition: border-color .6s var(--ease);
  mask-image: linear-gradient(to right, transparent 20%, #000 40%, #000 60%, transparent 80%); -webkit-mask-image: linear-gradient(to right, transparent 20%, #000 40%, #000 60%, transparent 80%); }
.stage::before { top: 14.34%; } .stage::after { bottom: 14.34%; }
.stage .v { position: absolute; bottom: -36px; height: calc(100vh + 36px); border-left: 1px dashed var(--guide); transition: border-color .6s var(--ease);
  mask-image: linear-gradient(to top, transparent 0, #000 120px, #000 60%, transparent); -webkit-mask-image: linear-gradient(to top, transparent 0, #000 120px, #000 60%, transparent); }
.stage .v.a { left: 6.97%; } .stage .v.b { right: 6.97%; }
.mark { position: relative; display: block; width: 100%; height: auto; overflow: visible; }
.hatch { stroke: #6B6B6B; stroke-width: 3.7; }
.frame { stroke: #5C5C5C; stroke-width: 3; stroke-dasharray: 9 12; transition: stroke .6s var(--ease); }
.outline, .fill { transition: clip-path var(--reveal) var(--ease); }
.outline { clip-path: inset(0 0 0 0); opacity: .7; }
.fill { clip-path: inset(0 0 0 100%); }
.stage:hover .fill, body.filled .fill { clip-path: inset(0 0 0 0); }
.stage:hover .outline, body.filled .outline { clip-path: inset(0 100% 0 0); }
.stage:hover::before, .stage:hover::after, .stage:hover .v { border-color: #525252; }
.stage:hover .frame { stroke: #737373; }
.hero > :not(.stage) { position: relative; z-index: 1; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; height: 28px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--ground); color: var(--muted-foreground); font-size: 12px; }
.hero h1 { margin-top: 20px; color: var(--foreground); font-size: 44px; line-height: 52px; font-weight: 600; letter-spacing: -0.03em; }
html:lang(ar) .hero h1 { letter-spacing: 0; line-height: 62px; }
.hero__lead { max-width: 36em; margin: 14px auto 0; color: var(--muted-foreground); font-size: 16px; line-height: 26px; text-wrap: balance; }
html:lang(ar) .hero__lead { font-size: 17px; line-height: 30px; }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; margin-top: 32px; }
.hero__search { display: flex; align-items: center; gap: 10px; width: min(420px, 100%); height: 40px; padding: 0 8px 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--background); color: var(--faint); font-size: 14px; cursor: pointer; transition: border-color .15s var(--ease), color .15s var(--ease); }
html[dir="rtl"] .hero__search { padding: 0 12px 0 8px; }
.hero__search > span:first-of-type { flex: 1; text-align: start; }
.hero__search:hover { border-color: var(--strong-border); color: var(--muted-foreground); }
.home__block { position: relative; z-index: 1; margin-top: 24px; }
.home__block + .home__block { margin-top: 56px; }
.block-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.block-head h2 { color: var(--foreground); font-size: 13px; font-weight: 600; white-space: nowrap; }
.block-head__rule { flex: 1; border-top: 1px dashed var(--border); }
.starters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.starter { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--background); overflow: hidden; transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease); }
.starter::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, #FFFFFF08 0 1px, transparent 1px 7px); opacity: 0; transition: opacity .3s var(--ease); pointer-events: none;
  mask-image: linear-gradient(to bottom, #000, transparent 70%); -webkit-mask-image: linear-gradient(to bottom, #000, transparent 70%); }
.starter:hover { border-color: var(--strong-border); background: var(--raised); }
.starter:hover::before { opacity: 1; }
.starter__icon { width: 36px; height: 36px; margin-bottom: 6px; border-radius: 10px; }
.starter strong { color: var(--foreground); font-size: 15px; font-weight: 600; }
.starter__text { color: var(--muted-foreground); font-size: 13px; line-height: 20px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.starter__go { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 6px; color: var(--faint); font-size: 12px; }
.starter:hover .starter__go { color: var(--foreground); }
.section-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.section-card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 14px; background: var(--background); overflow: hidden; }
.section-card__head { position: relative; display: grid; grid-template-columns: auto 1fr auto; column-gap: 14px; row-gap: 4px; padding: 20px; border-bottom: 1px dashed var(--border); transition: background .2s var(--ease); }
.section-card__head:hover { background: var(--raised); }
.section-card__icon { grid-row: span 2; }
.section-card__index { grid-column: 3; grid-row: 1; color: var(--faint); font: 500 11px/20px var(--mono); }
.section-card h3 { grid-column: 2; grid-row: 1; color: var(--foreground); font-size: 15px; font-weight: 600; line-height: 22px; }
.section-card p { grid-column: 2 / 4; color: var(--muted-foreground); font-size: 13px; line-height: 20px; }
.section-card ul { list-style: none; padding: 8px; }
.section-card li a { display: flex; align-items: center; justify-content: space-between; height: 32px; padding: 0 12px; border-radius: 8px; color: var(--muted-foreground); font-size: 13px; transition: background .15s var(--ease), color .15s var(--ease); }
.section-card li a .i { opacity: 0; transition: opacity .15s var(--ease); }
.section-card li a:hover { background: var(--hover); color: var(--foreground); }
.section-card li a:hover .i { opacity: 1; }
.section-card__more { margin: 0 8px 10px; padding: 0 12px; color: var(--faint); font-size: 12px; line-height: 24px; }
.section-card__more:hover { color: var(--foreground); }
.help-band { position: relative; z-index: 1; display: flex; align-items: center; gap: 16px; margin: 56px auto 0; padding: 20px; border: 1px dashed var(--strong-border); border-radius: 14px; background: repeating-linear-gradient(45deg, #FFFFFF05 0 1px, transparent 1px 8px); }
.help-band > div { flex: 1; }
.help-band h2 { color: var(--foreground); font-size: 15px; font-weight: 600; }
.help-band p { color: var(--muted-foreground); font-size: 13px; }

/* Search */
.search { position: fixed; inset: 0; z-index: 80; display: grid; justify-items: center; align-items: start; padding: 12vh 16px 16px; }
.search[hidden] { display: none; }
.search__backdrop { position: absolute; inset: 0; background: #0A0A0AB3; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade .18s var(--ease); }
.search__panel { position: relative; display: flex; flex-direction: column; width: min(640px, 100%); max-height: 72vh; border: 1px solid var(--strong-border); border-radius: 16px; background: var(--background); box-shadow: 0 24px 80px #000000A6, 0 0 0 1px #FFFFFF05 inset; overflow: hidden; animation: rise .22s var(--ease); }
.search__field, .search__foot { flex: none; }
.search__field { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 16px; border-bottom: 1px solid var(--border); color: var(--faint); }
.search__field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--foreground); font: inherit; font-size: 15px; }
.search__field input::placeholder { color: var(--faint); }
.search__field input::-webkit-search-cancel-button { display: none; }
.search__results { flex: 1; overflow-y: auto; padding: 8px; scrollbar-width: thin; }
.search__group { padding: 10px 10px 6px; color: var(--faint); font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.search__item { display: flex; align-items: flex-start; gap: 12px; padding: 10px; border-radius: 10px; color: var(--muted-foreground); cursor: pointer; }
.search__item[aria-selected="true"] { background: var(--muted); color: var(--foreground); }
.search__item .search__icon { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 8px; background: var(--ground); color: var(--muted-foreground); }
.search__item[aria-selected="true"] .search__icon { border-color: var(--strong-border); color: var(--foreground); }
.search__text { display: grid; gap: 2px; min-width: 0; }
.search__title { color: var(--foreground); font-size: 13.5px; font-weight: 500; line-height: 20px; }
.search__title span { color: var(--faint); font-weight: 400; }
.search__snippet { font-size: 12.5px; line-height: 19px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.search mark { background: #266DF033; color: var(--foreground); border-radius: 3px; padding: 0 1px; }
.search__empty { padding: 36px 16px; color: var(--faint); font-size: 13px; text-align: center; }
.search__foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--border); color: var(--faint); font-size: 11.5px; background: var(--ground); }
.search__foot span { display: inline-flex; align-items: center; gap: 4px; }
.search__foot span > span { margin-inline-start: 4px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px) scale(.985); } }

/* Responsive */
@media (max-width: 1240px) {
  .shell { grid-template-columns: var(--sidebar) minmax(0, 1fr); }
  .toc { display: none; }
  .topbar__links { display: none; }
  .topbar__end { margin-inline-start: auto; }
}
@media (max-width: 920px) {
  :root { --topbar: 52px; }
  .shell, .shell--home { display: block; }
  .topbar__inner { gap: 8px; padding: 0 12px; }
  .topbar__menu, .topbar__search { display: inline-grid; }
  .search-trigger, .topbar__signin { display: none; }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 60; width: min(320px, 86vw); height: 100%; background: var(--ground); border-inline-end: 1px solid var(--strong-border); transform: translateX(-100%); visibility: hidden; transition: transform .28s var(--ease), visibility 0s linear .28s; box-shadow: 0 0 60px #000000B3; }
  html[dir="rtl"] .sidebar { transform: translateX(100%); }
  body.sidebar-open .sidebar { transform: none; visibility: visible; transition: transform .28s var(--ease); }
  body.sidebar-open::after { content: ""; position: fixed; inset: 0; z-index: 50; background: #0A0A0A99; }
  .sidebar__head { display: flex; align-items: center; justify-content: space-between; height: var(--topbar); padding: 0 8px 0 20px; border-bottom: 1px solid var(--border); color: var(--foreground); font-weight: 600; font-size: 13px; }
  html[dir="rtl"] .sidebar__head { padding: 0 20px 0 8px; }
  .doc { padding: 28px 20px 0; }
  .guide { display: none; }
  .home { padding: 0 20px; }
  .starters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .article h1 { font-size: 26px; line-height: 34px; }
  .article:lang(ar) h1 { line-height: 40px; }
  .article__icon { display: none; }
  .cards, .section-grid, .starters, .pager { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 32px; line-height: 40px; }
  html:lang(ar) .hero h1 { line-height: 48px; }
  .anchor { display: none; }
  .search { padding: 0; }
  .search__panel { max-height: 100vh; height: 100%; border-radius: 0; }
  .search__foot { display: none; }
  .help-band { flex-direction: column; align-items: flex-start; }
  .brand__name, .brand__rule { display: none; }
}
@media (hover: none) { .stage .fill { clip-path: inset(0 0 0 0); } .stage .outline { clip-path: inset(0 100% 0 0); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
