body {
  height: 100vh;
  --border-api: 1px solid rgba(141, 141, 141, 0.286);
}
body.api {
  --api-font-size-heading: 24px;
  --api-font-size-subheading: 20px;
  --api-font-size-body: 16px;
  --api-font-size-small: 14px;
  --api-line-height-body: 1.75;
  --api-line-height-tight: 1.6;
  --api-line-height-heading: 1.2;
  --api-panel-border: 1px solid rgba(15, 23, 42, 0.08);
  --api-divider: rgba(15, 23, 42, 0.08);
  --api-muted: #7a8794;
  --api-text: #243241;
  --api-accent: #1677ff;
  background: #fff;
}
.container {
  max-width: calc(100% - 32px);
}
/*  */
.header li.menu-item:not(.active) {
  display: none;
}
/* 04-17 */
@media screen and (max-width: 768px) {
  .api-section .middle {
    width: 100% !important;
  }
  .right {
    display: none;
  }
}
/*  */
.api-section {
  display: flex;
  padding: 0;
  border-top: var(--border-api);
  height: calc(100vh - var(--header-height));
  background: #fff;
}
.api-section .container {
  height: 100%;
  max-width: 100%;
  gap: 0;
  align-items: stretch;
}
.api-section .left {
  width: 288px;
  height: 100%;
  background: #fff;
  border-right: 1px solid var(--api-divider);
  color: var(--bg-color);
  overflow-y: auto;
  padding: 18px 18px 28px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.api-section .left[data-left-menu] {
  display: block;
}
.api-mobile-fab,
.api-mobile-drawer-backdrop,
.api-mobile-drawer-header,
.api-mobile-right-drawer-header {
  display: none;
  max-width: 100vw;
}
.api-section .left::-webkit-scrollbar {
  width: 0;
  height: 0;
}
.api-section .middle {
  width: calc(100% - 572px);
  height: 100%;
  overflow-y: scroll;
  padding: 28px 36px 56px;
  background: #fff;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.api-section .middle::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.api-section .right {
  width: 280px;
  height: 100%;
  padding: 24px 24px 24px 28px;
  background: #fff;
  border-left: 1px solid var(--api-divider);
  position: relative;
  position: sticky;
  top: var(--header-height);
  align-self: flex-start;
  max-height: calc(100vh - var(--header-height));
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 16px;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.api-section .right::-webkit-scrollbar {
  width: 0;
  height: 0;
}
/* left */

.api-section .left h1 {
  padding: 0;
  font-size: var(--api-font-size-small);
  line-height: 1.5;
  font-weight: 700;
  margin-top: 4px;
}
.api-section .left p {
  padding: 0;
  font-size: var(--api-font-size-small);
  line-height: 1.45;
  font-weight: 500;
  cursor: pointer;
}
.api-section .left .level-1 {
  padding-left: 28px;
}
.api-section .left .level-1 + .level-1 {
  margin-top: 10px;
}
.api-section .left .level-1 > .item {
  min-height: 32px;
  cursor: pointer;
}
.api-section .left .level-1 > .item > h3.text {
  font-size: var(--api-font-size-body);
  font-weight: 600;
  letter-spacing: 0;
  color: #111827;
}
.api-section .left .level-1 > .item > i {
  width: 0;
  margin-right: 0 !important;
  color: transparent;
  font-size: 0;
  text-align: center;
}
.api-section .left .level-1 .items {
  margin-top: 4px;
  padding-left: 8px;
  border-left: 1px solid rgba(15, 23, 42, 0.1);
}
.api-section .left .item.level-2 .link {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 4px;
  transition:
    background-color 0.2s ease,
    color 0.25s ease,
    transform 0.2s ease;
}
.api-section .left .item.level-2 .indicator {
  left: -9px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  border-radius: 999px;
  background: transparent;
  opacity: 0;
  transition:
    background-color 0.2s ease,
    opacity 0.2s ease;
}
.api-section .left .item.level-2 .text {
  color: #4b5563;
  font-size: var(--api-font-size-small);
  line-height: 1.35;
}
.api-section .left .item.level-2:hover .link {
  background: linear-gradient(90deg, rgba(22, 119, 255, 0.09), rgba(22, 119, 255, 0.02));
  transform: none;
}
.api-section .left .item.level-2:hover .text {
  color: #1f2937;
}
.api-section .left .item.level-2.is-active .link {
  background: rgba(22, 119, 255, 0.09);
}
.api-section .left .item.level-2.is-active .text {
  color: var(--api-accent);
  font-weight: 600;
}
.api-section .left .item.level-2.is-active .indicator {
  background: var(--api-accent);
  opacity: 1;
}
.api-section .left .caret {
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}
.api-section .left .caret:hover {
  background: rgba(15, 23, 42, 0.06);
}
.api-section .left .caret-icon {
  color: var(--api-muted);
  font-size: var(--api-font-size-small);
}

.api-section .left p.active {
  background-color: var(--primary-color);
  color: var(--bg-color);
}
.api-section .left p:not(.active):hover {
  background-color: var(--main-background-neutral);
}
/* middle */
.api-section .middle .middle-content {
  /* border: var(--border-api); */
  padding: 16px;
  border-radius: 8px;
  display: none;
}
.api-section .middle .middle-content.active {
  display: block;
}
.api-section .middle > div {
  max-width: 980px;
  margin: 0 auto;
}
.api-section .middle h1 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: var(--api-font-size-heading);
  line-height: var(--api-line-height-heading);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-top: 42px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  color: #0f172a;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  scroll-margin-top: calc(var(--header-height) + 20px);
}
.api-section .middle h1::before {
  content: attr(data-number);
  flex: 0 0 auto;
  color: rgba(22, 119, 255, 0.92);
  font-size: var(--api-font-size-heading);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
}
.api-section .middle h2 {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: var(--api-font-size-subheading);
  line-height: 1.35;
  font-weight: 600;
  margin-top: 26px;
  margin-bottom: 12px;
  padding: 6px 10px 6px 10px;
  color: #172033;
  /* border-left: 2px solid rgba(22, 119, 255, 0.6); */
  background: linear-gradient(90deg, rgba(22, 119, 255, 0.09), rgba(22, 119, 255, 0.01));
  border-radius: 4px;
  scroll-margin-top: calc(var(--header-height) + 20px);
}
.api-section .middle h2::before {
  content: attr(data-number);
  flex: 0 0 auto;
  min-width: auto;
  padding: 0;
  background: transparent;
  color: rgba(22, 119, 255, 0.95);
  font-size: var(--api-font-size-subheading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-align: center;
}
.api-section .middle h3,
.api-section .middle h4,
.api-section .middle h5,
.api-section .middle h6 {
  font-size: var(--api-font-size-body);
  line-height: 1.45;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 12px;
  color: #172033;
  scroll-margin-top: calc(var(--header-height) + 20px);
}
.api-section .middle-content h1:first-child {
  margin-top: 0px;
}
.api-section .middle ol {
  margin-left: 18px;
}
.api-section .middle li {
  list-style: decimal;
  margin: 10px 0;
  font-size: var(--api-font-size-body);
  line-height: 1.45;
  font-weight: 600;
  color: #172033;
}
.api-section .middle ol.desc li {
  font-weight: normal;
  line-height: var(--api-line-height-body);
}
.api-section .middle p {
  list-style: decimal;
  margin: 8px 0 14px;
  font-size: var(--api-font-size-body);
  line-height: var(--api-line-height-body);
  color: var(--api-text);
}
.api-section .middle > div > p:first-child,
.api-section .middle #middleTop {
  margin: 0;
}
.api-section .middle img {
  margin: 12px 0;
}
.api-section .middle table {
  margin: 18px 0 10px;
  font-size: var(--api-font-size-small);
  line-height: var(--api-line-height-tight);
  border-collapse: separate;
  border-spacing: 0;
  overflow: visible;
  border: none;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}
.api-section .middle th,
.api-section .middle td {
  padding: 13px 20px;
  line-height: var(--api-line-height-tight);
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
.api-section .middle th {
  font-size: var(--api-font-size-body);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #0f172a;
  background: #edf2f7;
  white-space: nowrap;
}
.api-section .middle td {
  font-size: var(--api-font-size-small);
  color: #334155;
}
.api-section .middle td:first-child {
  font-weight: 600;
  color: #1f2937;
}
.api-section .middle tbody tr:last-child td {
  border-bottom: none;
}
.api-section .middle tbody tr:hover td {
  background: rgba(15, 23, 42, 0.02);
}
.api-section .middle pre[class*='language-'] {
  margin: 16px 0 22px;
  padding: 16px 18px;
  border: 1px solid rgba(22, 119, 255, 0.14);
  border-radius: 10px;
  background:
    radial-gradient(circle at top right, rgba(127, 241, 247, 0.08), transparent 26%),
    linear-gradient(180deg, #162235 0%, #0f172a 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 24px rgba(15, 23, 42, 0.08);
  overflow: auto;
}
.api-section .middle :not(pre) > code[class*='language-'] {
  border-radius: 6px;
}
.api-section .middle pre[class*='language-'] code[class*='language-'] {
  font-size: var(--api-font-size-small);
  line-height: 1.7;
}
.api-section .middle pre[class*='language-'],
.api-section .middle code,
.api-section .middle code[class*='language-'],
.api-section .middle .line-numbers .line-numbers-rows,
.api-section .middle div.code-toolbar > .toolbar > .toolbar-item > a,
.api-section .middle div.code-toolbar > .toolbar > .toolbar-item > button,
.api-section .middle div.code-toolbar > .toolbar > .toolbar-item > span {
  font-size: var(--api-font-size-small);
}
.api-section .middle .line-numbers .line-numbers-rows {
  border-right-color: rgba(255, 255, 255, 0.16);
}
.api-section .middle .line-numbers-rows > span:before {
  color: rgba(255, 255, 255, 0.4);
}
.api-section .middle div.code-toolbar > .toolbar {
  top: 10px;
  right: 10px;
  /* opacity: 1; */
}
.api-section .middle div.code-toolbar > .toolbar > .toolbar-item > a,
.api-section .middle div.code-toolbar > .toolbar > .toolbar-item > button,
.api-section .middle div.code-toolbar > .toolbar > .toolbar-item > span {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
  box-shadow: none;
  border-radius: 999px;
  padding: 2px 8px;
}
.api-section .middle div.code-toolbar > .toolbar > .toolbar-item > a:hover,
.api-section .middle div.code-toolbar > .toolbar > .toolbar-item > button:hover,
.api-section .middle div.code-toolbar > .toolbar > .toolbar-item > span:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}
/* right */
.api-section .right div {
  color: var(--api-muted);
}
.api-section .right #left2 {
  position: static;
  top: auto;
  padding: 0;
  max-height: none;
  overflow: visible;
}
.api-section .right > .menu-1:first-child,
.api-section .right > #left2 > .menu-1:first-child {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  padding-bottom: 8px;
}
.api-section .right .menu-1 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 500;
  margin-top: 0;
  font-size: var(--api-font-size-small);
  line-height: 1.4;
  color: #9aa4af;
  letter-spacing: 0;
  text-transform: none;
  word-break: keep-all;
  overflow-wrap: break-word;
  padding: 0 0 4px;
}
.api-section .right .menu-1[data-number]::before {
  content: attr(data-number);
  flex: 0 0 auto;
  color: rgba(22, 119, 255, 0.82);
  font-size: var(--api-font-size-small);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
}
.api-section .right .menu-1:not(:first-child) {
  margin-top: 8px;
  margin-bottom: 4px;
  color: #1a1a1a;
  font-weight: 600;
}
.api-section .right .menu-2 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 2px;
  font-size: var(--api-font-size-small);
  line-height: 1.45;
  padding: 4px 8px 4px 12px;
  border-left: 2px solid transparent;
  background: transparent;
  border-radius: 0;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    border-left-color 0.2s ease;
  word-break: keep-all;
  overflow-wrap: break-word;
  white-space: normal;
}
.api-section .right .menu-2::before {
  content: attr(data-number);
  flex: 0 0 auto;
  color: rgba(22, 119, 255, 0.82);
  font-size: var(--api-font-size-small);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
}
.api-section .right .menu-2:hover {
  background: rgba(15, 23, 42, 0.03);
  color: #0f172a;
  border-left-color: rgba(15, 23, 42, 0.18);
  transform: translateX(1px);
}
.api-section .right .menu-2.is-active {
  color: #0f172a;
  background: rgba(22, 119, 255, 0.035);
  border-left-color: var(--api-accent);
  font-weight: 600;
}
.api-section .right .menu-1 + .menu-2 {
  margin-top: 3px;
}
.api-section .right .menu-2 + .menu-2 {
  margin-top: 1px;
}

@media screen and (max-width: 768px) {
  body.api {
    --api-font-size-heading: 30px;
    --api-font-size-subheading: 18px;
    --api-font-size-body: 14px;
    --api-font-size-small: 12px;
  }

  .api-section {
    padding: 0;
    height: auto;
    min-height: calc(100vh - var(--header-height));
  }

  .api-section .container {
    display: block;
    gap: 0;
    height: auto;
  }

  .api-mobile-drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1998;
    border: none;
    background: rgba(15, 23, 42, 0.46);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
  }

  .api-mobile-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1001;
    width: 100%;
    padding: 10px 12px calc(env(safe-area-inset-bottom, 0px) + 10px);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(15, 23, 42, 0.08);
  }

  .api-mobile-fab__button {
    flex: 1 1 0;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    background: #fff;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  }

  .api-mobile-fab__button.is-directory {
    background: linear-gradient(90deg, rgba(22, 119, 255, 0.16), rgba(22, 119, 255, 0.05));
    color: #0f172a;
  }

  .api-mobile-fab__icon {
    font-size: 13px;
    color: var(--api-accent);
  }

  .api-mobile-fab__label {
    line-height: 1;
  }

  .api-section .left {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    padding: 0 16px 24px;
    border-right: none;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1999;
    background: #fff;
    overflow-x: hidden;
    overflow-y: auto;
    white-space: normal;
    transform: translateX(-102%);
    transition: transform 0.28s ease;
    box-shadow: none;
    -webkit-overflow-scrolling: touch;
  }

  .api-section .right {
    display: block;
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    padding: 0 18px calc(env(safe-area-inset-bottom, 0px) + 30px);
    border-left: none;
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 1999;
    background: #fff;
    overflow-x: hidden;
    overflow-y: auto;
    transform: translateX(102%);
    transition: transform 0.28s ease;
    box-shadow: none;
    -webkit-overflow-scrolling: touch;
  }

  .api-section .left[data-left-menu] {
    display: block;
  }

  .api-mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 2;
    margin: 0 -16px 14px;
    padding: 14px 16px 12px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  }

  .api-mobile-right-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 2;
    margin: 0 -18px 18px;
    padding: 16px 18px 14px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  }

  .api-mobile-drawer-title {
    color: #0f172a;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
  }

  .api-mobile-drawer-close {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
  }

  .api-section .right > .menu-1:first-child,
  .api-section .right > #left2 > .menu-1:first-child {
    position: static;
    top: auto;
    z-index: auto;
    background: transparent;
    padding-bottom: 6px;
  }

  .api-section .left .level-1 {
    padding-left: 0;
  }

  .api-section .left .level-1 + .level-1 {
    margin-top: 14px;
  }

  .api-section .left .level-1 > .item {
    min-height: auto;
    gap: 8px;
    align-items: center;
    padding: 0 0 4px;
  }

  .api-section .left .level-1 > .item > h3.text {
    font-size: 14px;
    line-height: 1.35;
  }

  .api-section .left .level-1 .items {
    margin-top: 8px;
    padding-left: 10px;
    border-left: 1px solid rgba(15, 23, 42, 0.08);
  }

  .api-section .left .item.level-2 .link {
    min-height: 0;
    padding: 7px 8px;
    border-radius: 8px;
  }

  .api-section .left .item.level-2 .text {
    font-size: 12px;
    line-height: 1.4;
    white-space: normal;
  }

  .api-section .left .item.level-2 .indicator {
    display: none;
  }

  .api-section .left .caret {
    width: 20px;
    height: 20px;
    margin-left: auto;
  }

  .api-section .left .caret-icon {
    font-size: 12px;
  }

  html.is-api-drawer-open,
  body.is-api-drawer-open {
    overflow: hidden;
    touch-action: none;
  }

  body.is-api-drawer-open .api-section .left {
    transform: translateX(0);
  }

  body.is-api-drawer-open .api-mobile-drawer-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  body.is-api-drawer-open .api-mobile-fab {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(100%);
  }

  body.is-api-right-drawer-open .api-section .right {
    display: block;
    transform: translateX(0);
  }

  body.is-api-right-drawer-open .api-mobile-drawer-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  body.is-api-right-drawer-open .api-mobile-fab {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(100%);
  }

  .api-section .middle {
    width: 100% !important;
    height: auto;
    overflow: visible;
    padding: 18px 14px 108px;
  }

  .api-section .middle h2 {
    gap: 8px;
    padding-left: 10px;
  }

  .api-section .middle h1 {
    gap: 10px;
  }

  .api-section .middle h2::before {
    margin-top: 0;
  }

  .api-section .right .menu-2 {
    gap: 8px;
    margin-top: 4px;
    padding: 8px 10px 8px 14px;
    border-radius: 10px;
    line-height: 1.55;
  }

  .api-section .right .menu-1 {
    gap: 8px;
    padding-bottom: 8px;
  }

  .api-section .right .menu-1:not(:first-child) {
    margin-top: 14px;
    margin-bottom: 8px;
  }

  .api-section .right .menu-2 + .menu-2 {
    margin-top: 6px;
  }
}

@media screen and (max-width: 480px) {
  body.api {
    --api-font-size-heading: 26px;
    --api-font-size-subheading: 17px;
    --api-font-size-body: 14px;
    --api-font-size-small: 12px;
  }

  .api-mobile-fab {
    gap: 10px;
    padding: 8px 10px calc(env(safe-area-inset-bottom, 0px) + 8px);
  }

  .api-mobile-fab__button {
    min-height: 42px;
    padding: 0 10px;
    font-size: 12px;
  }

  .api-section .middle h2 {
    align-items: baseline;
    gap: 7px;
    padding-left: 10px;
  }

  .api-section .middle h1 {
    gap: 8px;
  }

  .api-section .middle h2::before {
    margin-top: 0;
  }

  .api-section .left {
    padding: 0 12px 22px;
  }

  .api-section .right {
    padding: 0 14px calc(env(safe-area-inset-bottom, 0px) + 26px);
  }

  .api-mobile-drawer-header {
    margin: 0 -12px 12px;
    padding: 12px 12px 10px;
  }

  .api-mobile-right-drawer-header {
    margin: 0 -14px 14px;
    padding: 14px 14px 12px;
  }

  .api-section .right .menu-2 {
    gap: 7px;
    padding: 8px 8px 8px 12px;
  }

  .api-section .right .menu-1 {
    gap: 6px;
  }
}
