@font-face {
  font-family: "Noto Sans Arabic";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/noto-sans-arabic.woff2") format("woff2");
  unicode-range:
    U+0600-06FF, U+0750-077F, U+0870-089F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFC;
}
:root {
  --bg: #111214;
  --sidebar: #141517;
  --surface: #1b1d20;
  --code: #191b1e;
  --border: #303237;
  --hover: #24272b;
  --text: #eeeff1;
  --muted: #aaadb4;
}
:root[data-theme="light"] {
  --bg: #f9fafb;
  --sidebar: #f4f5f7;
  --surface: #fff;
  --code: #f0f2f5;
  --border: #d9dde3;
  --hover: #e9edf2;
  --text: #23262d;
  --muted: #5e6470;
}
body {
  isolation: isolate;
}
.ambient-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 95% 5%, #292b2f55, transparent 55%),
    linear-gradient(135deg, #101113 4%, #1b1d20 48%, #111214 92%);
}
.ambient-background > * {
  position: absolute;
  opacity: 0.2;
  width: 40px;
  height: 64px;
  object-fit: contain;
  animation: ambient-float 12s ease-in-out infinite alternate;
}
.ambient-background > :nth-child(1) {
  top: 15%;
}
.ambient-background > :nth-child(2) {
  top: 65%;
  animation-delay: -7s;
  animation-duration: 15s;
}
.ambient-background > :nth-child(3) {
  top: 82%;
  animation-delay: -14s;
  width: 40px;
}
.ambient-background > :nth-child(4) {
  top: 23%;
  animation-delay: -20s;
  animation-duration: 17s;
}
.ambient-background > :nth-child(5) {
  top: 62%;
  animation-delay: -11s;
  width: 40px;
}
.ambient-background > :nth-child(6) {
  top: 38%;
  animation-delay: -17s;
}
.ambient-background > :nth-child(7) {
  top: 7%;
  width: 40px;
  animation-delay: -5s;
  animation-duration: 14s;
}
.ambient-background > :nth-child(8) {
  top: 91%;
  animation-delay: -9s;
}
.ambient-background > :nth-child(odd) {
  left: 8px;
}
.ambient-background > :nth-child(even) {
  right: 8px;
}
[data-ambient="off"] .ambient-background {
  display: none;
}
[data-theme="light"] .ambient-background {
  background:
    radial-gradient(ellipse at 80% 5%, #d1d5dc, transparent 70%),
    linear-gradient(135deg, #fafafa, #e9ebee 55%, #f8f9fa);
}
[data-theme="light"] .ambient-background > * {
  filter: brightness(0.5);
  opacity: 0.12;
}
@keyframes ambient-float {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(0, -68px, 0);
  }
}
header {
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  gap: 22px;
}
#sidebar {
  background: color-mix(in srgb, var(--sidebar) 93%, transparent);
}
.header-actions {
  margin-left: 0;
  margin-inline-start: auto;
  gap: 16px;
}
.search-trigger {
  margin-left: 0;
  margin-inline-start: 16px;
  width: min(330px, 28vw);
}
.language-menu {
  position: relative;
  font-size: 13px;
  white-space: nowrap;
}
.language-menu summary {
  cursor: pointer;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 6px 10px;
  display: flex;
  gap: 7px;
  align-items: center;
}
.language-menu summary::-webkit-details-marker {
  display: none;
}
.language-menu summary::after {
  content: "⌄";
  opacity: 0.7;
}
.language-options {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 8px);
  width: 148px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: 0 14px 36px #0004;
  z-index: 50;
}
.header-actions .language-options a {
  display: block;
  padding: 8px 10px;
  border-radius: 5px;
  color: var(--text);
}
.language-options a:hover,
.language-options a[aria-current] {
  background: var(--hover);
  text-decoration: none;
}
.header-actions button[data-ambient] {
  font-size: 22px;
}
.header-actions button[data-ambient][aria-pressed="true"] {
  color: var(--accent);
}
#sidebar a[aria-current="page"] {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--accent);
  border-radius: 6px;
  border-inline-start: 3px solid var(--accent);
  font-weight: 650;
}
#sidebar a[aria-current="page"]::after {
  display: none;
}
#sidebar summary {
  direction: inherit;
  text-align: start;
}
.plugin-pages,
.nav-children {
  margin-left: 0;
  margin-inline-start: 13px;
  padding-left: 0;
  padding-inline-start: 9px;
  border-left: 0;
  border-inline-start: 1px solid var(--border);
}
.category-count,
#sidebar .nav-subsection > summary small {
  margin-left: 0;
  margin-inline-start: auto;
}
.plugin-grid {
  gap: 22px;
}
.plugin-card {
  padding: 0 0 20px;
  flex-direction: column;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.plugin-card > div {
  padding: 0 18px;
}
.plugin-card > .plugin-cover-placeholder {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--hover), var(--surface));
  border-bottom: 1px solid var(--border);
}
.plugin-card .plugin-cover-placeholder img {
  width: 48px;
  height: 48px;
  aspect-ratio: auto;
  opacity: 0.3;
  background: transparent;
}
.plugin-card:not(:has(img)) {
  padding-top: 20px;
}
.plugin-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  max-height: none;
  object-fit: contain;
  background: #101113;
}
.plugin-card h3 {
  font-size: 18px;
  padding-inline-end: 18px;
}
.plugin-card p {
  margin-bottom: 12px;
}
.plugin-card .arrow {
  position: absolute;
  inset-inline-end: 15px;
  bottom: 18px;
  margin: 0;
  color: var(--muted);
}
.plugin-card:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
}
.page-pagination {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  border-top: 1px solid var(--border);
  padding-top: 28px;
  margin-top: 42px;
}
.page-pagination a {
  position: relative;
  padding: 17px 42px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  min-width: 0;
}
.page-pagination span,
.page-pagination strong {
  display: block;
}
.page-pagination span {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}
.page-pagination strong {
  font-size: 15px;
  overflow-wrap: anywhere;
}
.page-pagination i {
  position: absolute;
  top: 28px;
  font-style: normal;
  color: var(--accent);
}
.page-previous i {
  inset-inline-start: 16px;
}
.page-next i {
  inset-inline-end: 16px;
}
.page-next {
  text-align: end;
}
.page-pagination a:hover {
  background: var(--surface);
  border-color: var(--accent);
  text-decoration: none;
}
.article-footer {
  color: var(--muted);
  font-size: 12px;
}
[dir="rtl"] {
  font-family: "Noto Sans Arabic", Inter, Arial, sans-serif;
}
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] .nav-label {
  letter-spacing: 0;
}
[dir="rtl"] h1 {
  line-height: 1.5;
}
[dir="rtl"] .prose {
  line-height: 2;
}
[dir="rtl"] #sidebar {
  border-right: 0;
  border-left: 1px solid var(--border);
}
[dir="rtl"] #sidebar summary::before {
  transform: rotate(135deg);
  margin-right: 0;
  margin-left: 4px;
}
[dir="rtl"] #sidebar details[open] > summary::before {
  transform: rotate(45deg);
}
[dir="rtl"] .toc {
  padding-right: 0;
  padding-left: 22px;
}
[dir="rtl"] .toc .h3 {
  padding-left: 0;
  padding-right: 14px;
}
[dir="rtl"] .prose th {
  text-align: right;
}
[dir="rtl"] .step-number {
  margin-right: 0;
  margin-left: 12px;
}
[dir="rtl"] .prose ul,
[dir="rtl"] .prose ol {
  padding-left: 0;
  padding-right: 24px;
}
[dir="rtl"] .search-trigger {
  text-align: right;
}
[dir="rtl"] .page-pagination i {
  transform: scaleX(-1);
}
[dir="rtl"] .annotation-layout {
  direction: ltr;
}
[dir="rtl"] .annotation-notes {
  direction: rtl;
  text-align: right;
}
[dir="rtl"] .annotation-notes .annotations {
  padding: 0;
}
[dir="rtl"] .annotation-notes .annotations li {
  direction: ltr;
}
[dir="rtl"] .annotation-notes .annotations li > div {
  direction: rtl;
}
.file-location,
.folder-path,
.code-header > span {
  direction: ltr;
  text-align: left;
}
pre,
code,
kbd {
  direction: ltr;
  unicode-bidi: isolate;
}
code {
  display: inline-block;
  max-width: 100%;
  vertical-align: baseline;
}
pre code {
  display: block;
}
.code-block pre {
  text-align: left;
}
.code-header button,
.copy-value button {
  font-family: Inter, "Noto Sans Arabic", sans-serif;
}
[dir="rtl"] .code-header {
  direction: ltr;
}
[dir="rtl"] .code-header button {
  direction: rtl;
}
[dir="rtl"] .copy-value {
  direction: ltr;
}
@media (prefers-reduced-motion: reduce) {
  .ambient-background > * {
    animation: none;
  }
}
@media (max-width: 1100px) {
  header {
    gap: 12px;
    padding-inline: 20px;
  }
  .header-actions {
    gap: 9px;
  }
  .search-trigger {
    width: min(220px, 23vw);
    margin-inline-start: 0;
  }
}
@media (max-width: 760px) {
  header {
    gap: 8px;
    padding-inline: 12px;
  }
  .header-actions {
    gap: 5px;
  }
  .header-actions > a {
    display: none;
  }
  .language-menu {
    font-size: 12px;
  }
  .language-menu summary {
    padding: 5px 7px;
  }
  .language-menu summary > span {
    display: none;
  }
  .search-trigger {
    width: 34px;
    padding: 4px;
    min-width: 30px;
    margin: 0;
  }
  .search-trigger > span {
    font-size: 0;
  }
  .search-trigger > span::before {
    content: "⌕";
    font-size: 22px;
  }
  .search-trigger kbd {
    display: none;
  }
  [dir="rtl"] #sidebar {
    left: auto;
    right: 0;
    box-shadow: -15px 0 40px #0004;
  }
  .page-pagination {
    gap: 10px;
  }
  .page-pagination a {
    padding: 14px 28px;
  }
  .page-pagination i {
    top: 25px;
  }
  .page-previous i {
    inset-inline-start: 10px;
  }
  .page-next i {
    inset-inline-end: 10px;
  }
  .plugin-card img {
    max-height: none;
  }
  .ambient-background > :nth-child(n) {
    width: 22px;
    height: 40px;
  }
  .ambient-background > :nth-child(odd) {
    left: 2px;
  }
  .ambient-background > :nth-child(even) {
    right: 2px;
  }
  [dir="rtl"] .toc {
    padding: 18px 22px 0;
  }
}

/* Reserve decoration gutters so the full icon stays outside the reading area. */
body:has(.ambient-background) .layout {
  width: calc(100% - 112px);
}
.guide-media {
  width: min(100%, 720px);
  margin: 0 0 28px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}
.guide-media iframe,
.guide-media img {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  height: auto;
  border: 0;
  object-fit: contain;
  background: #101113;
}
.guide-cover-link {
  display: block;
}
.guide-cover-link:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}
.media-caption {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--muted);
}
.guide-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}
.guide-shortcuts a {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-size: 13px;
}
.guide-shortcuts a:hover {
  background: var(--hover);
  border-color: var(--accent);
}
@media (max-width: 1100px) and (min-width: 761px) {
  body:has(.ambient-background) .layout {
    width: calc(100% - 88px);
  }
  .ambient-background > :nth-child(n) {
    width: 32px;
  }
  .ambient-background > :nth-child(odd) {
    left: 4px;
  }
  .ambient-background > :nth-child(even) {
    right: 4px;
  }
}
@media (max-width: 760px) {
  body:has(.ambient-background) .layout {
    width: calc(100% - 48px);
  }
  .guide-shortcuts {
    gap: 6px;
  }
  .guide-shortcuts a {
    gap: 8px;
    padding: 8px 10px;
  }
  .media-caption {
    font-size: 12px;
    padding: 8px 10px;
  }
}
