:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #ededed;
  background: #141414;
  color-scheme: dark;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  --dark: #141414;
  --panel: #1b1b1b;
  --dark-line: #343434;
  --paper: #e5e5e3;
  --ink: #252525;
  --paper-line: #c9c9c6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 108px; }
body { margin: 0; min-width: 320px; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, summary { cursor: pointer; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
::selection { color: #141414; background: #ddd; }

.skip {
  position: fixed;
  top: -80px;
  left: 18px;
  z-index: 30;
  padding: 12px 16px;
  color: #141414;
  background: #ededed;
}
.skip:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #141414ed;
  border-bottom: 1px solid #ffffff12;
  backdrop-filter: blur(20px);
}
.header-inner {
  width: min(1200px, calc(100% - 96px));
  min-height: 86px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 11px;
  font-size: 18px;
  font-weight: 630;
  letter-spacing: -.5px;
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  color: #202020;
  font-size: 25px;
  font-weight: 400;
  background: linear-gradient(145deg, #efefef, #a4a4a4);
  border: 1px solid #e4e4e4;
  border-radius: 8px;
  box-shadow: inset 0 1px 1px #fff, 0 2px 0 #6b6b6b, 0 4px 9px #0006;
}
.brand-beta {
  align-self: flex-start;
  margin-top: 1px;
  margin-left: -4px;
  padding: 3px 4px;
  border: 1px solid #424242;
  border-radius: 3px;
  color: #b3b3b3;
  font: 8px var(--mono);
  letter-spacing: .5px;
}
.brand-docs {
  margin-left: 3px;
  color: #909090;
  font: 10px var(--mono);
  letter-spacing: 1px;
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: 32px;
  color: #a4a4a4;
  font-size: 12px;
  white-space: nowrap;
}
.site-header nav a { transition: color .2s; }
.site-header nav a:hover,
.site-header nav a[aria-current="page"] { color: #f1f1f1; }
.site-header nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 8px; }
.site-header .nav-console {
  display: inline-flex;
  align-items: center;
  gap: 26px;
  padding: 11px 14px;
  color: #ddd;
  background: linear-gradient(#262626, #1e1e1e);
  border: 1px solid #3f3f3f;
  border-radius: 5px;
  box-shadow: inset 0 1px #ffffff08, 0 2px 3px #0004;
}
.site-header .nav-console:hover { color: #fff; border-color: #676767; }

.layout {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr) 216px;
  width: min(1440px, 100%);
  min-height: calc(100vh - 157px);
  margin-inline: auto;
  border-inline: 1px solid #ffffff0a;
}
.sidebar,
.right-sidebar {
  position: sticky;
  top: 86px;
  align-self: start;
  max-height: calc(100vh - 86px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #505050 transparent;
  scrollbar-width: thin;
  background: var(--panel);
}
.sidebar {
  padding: 31px 18px 44px;
  border-right: 1px solid var(--dark-line);
}
.sidebar-home {
  display: block;
  padding: 0 9px;
  color: #e7e7e7;
  font-size: 15px;
  font-weight: 550;
  letter-spacing: -.2px;
}
.sidebar-home::before {
  content: "◈";
  margin-right: 9px;
  color: #bcbcbc;
  font-size: 13px;
}
.sidebar-home:hover { color: #fff; }
.search-wrap { position: relative; margin: 22px 0 27px; }
.search-wrap label {
  display: block;
  margin: 0 0 8px 2px;
  color: #909090;
  font: 9px var(--mono);
  letter-spacing: .6px;
}
.search-wrap input {
  width: 100%;
  height: 39px;
  padding: 0 12px;
  color: #ededed;
  font-size: 12px;
  background: #242424;
  border: 1px solid #454545;
  border-radius: 5px;
  box-shadow: inset 0 1px #ffffff09;
}
.search-wrap input::placeholder { color: #858585; }
.search-wrap input:focus { border-color: #a0a0a0; outline-color: #c5c5c5; }
.search-results:not(:empty) {
  position: absolute;
  z-index: 12;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  max-height: 350px;
  overflow: auto;
  padding: 6px;
  color: #bdbdbd;
  font-size: 12px;
  background: #252525;
  border: 1px solid #595959;
  border-radius: 6px;
  box-shadow: 0 15px 28px #0009;
}
.search-results a {
  display: block;
  padding: 9px 10px;
  border-radius: 4px;
}
.search-results a:hover,
.search-results a:focus-visible { background: #393939; }
.search-results strong,
.search-results small { display: block; }
.search-results strong { color: #eee; font-size: 12px; font-weight: 550; }
.search-results small { margin-top: 3px; color: #aaa; font-size: 10px; }
.nav-group { margin: 0 0 26px; }
.nav-group h2 {
  margin: 0 0 8px;
  padding: 0 9px;
  color: #8e8e8e;
  font: 9px var(--mono);
  letter-spacing: .8px;
}
.nav-group a {
  display: block;
  padding: 7px 9px;
  color: #b8b8b8;
  font-size: 12px;
  line-height: 1.5;
  border-radius: 5px;
}
.nav-group a:hover { color: #fff; background: #2c2c2c; }
.nav-group a[aria-current="page"] {
  color: #242424;
  font-weight: 600;
  background: linear-gradient(160deg, #f0f0ef, #c9c9c7);
  box-shadow: inset 0 1px #fff, 0 2px 0 #727272, 0 4px 9px #0004;
}

.article {
  min-width: 0;
  padding: 45px clamp(30px, 4.1vw, 62px) 88px;
  color: var(--ink);
  color-scheme: light;
  background: var(--paper);
  border-top: 1px solid #f7f7f5;
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 15px;
  color: #666;
  font-size: 11px;
}
.breadcrumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding-bottom: 22px;
  color: #676767;
  font: 10px var(--mono);
  border-bottom: 1px solid var(--paper-line);
}
.article-meta a { margin-left: auto; white-space: nowrap; }
.article-meta a:hover,
.article-bottom a:hover { color: #111; text-decoration: underline; text-underline-offset: 4px; }

.doc-body {
  max-width: 800px;
  font-size: 14px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.doc-body h1,
.doc-body h2,
.doc-body h3,
.doc-body h4 { color: #202020; }
.doc-body h1 {
  margin: 35px 0 24px;
  font-size: clamp(32px, 3.3vw, 46px);
  font-weight: 560;
  line-height: 1.3;
  letter-spacing: -1.5px;
}
.doc-body h2 {
  margin: 51px 0 17px;
  padding-bottom: 11px;
  font-size: 26px;
  font-weight: 520;
  line-height: 1.4;
  letter-spacing: -.7px;
  border-bottom: 1px solid var(--paper-line);
}
.doc-body h3 {
  margin: 30px 0 12px;
  font-size: 19px;
  font-weight: 570;
  line-height: 1.5;
}
.doc-body h4 { margin: 24px 0 10px; font-size: 15px; }
.doc-body h2,
.doc-body h3,
.doc-body h4 { scroll-margin-top: 108px; }
.doc-body p,
.doc-body ul,
.doc-body ol { margin: 14px 0; }
.doc-body li { margin: 5px 0; }
.doc-body li::marker { color: #747474; }
.doc-body a {
  color: #252525;
  font-weight: 550;
  text-decoration: underline;
  text-decoration-color: #919191;
  text-underline-offset: 4px;
}
.doc-body a:hover { text-decoration-color: #252525; }
.doc-body blockquote {
  margin: 25px 0;
  padding: 5px 18px;
  color: #4b4b4b;
  background: #d9d9d7;
  border-left: 3px solid #636363;
}
.doc-body code { font-family: var(--mono); font-size: .9em; }
.doc-body :not(pre) > code {
  padding: .13em .33em;
  color: #373737;
  background: #d5d5d3;
  border: 1px solid #c4c4c2;
  border-radius: 3px;
  word-break: break-word;
}
.doc-body pre {
  position: relative;
  max-width: 100%;
  margin: 25px 0;
  padding: 54px 20px 20px;
  overflow: auto;
  color: #dedede;
  background: #1d1d1d;
  border: 1px solid #4b4b4b;
  border-radius: 9px;
  box-shadow: 0 3px 0 #333, 0 13px 25px #00000020;
  font: 12px/1.85 var(--mono);
  overflow-wrap: normal;
}
.doc-body pre::before {
  content: "CODE";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 36px;
  padding: 9px 15px;
  color: #aaa;
  font: 9px/18px var(--mono);
  letter-spacing: .8px;
  background: linear-gradient(#303030, #282828);
  border-bottom: 1px solid #3b3b3b;
  border-radius: 8px 8px 0 0;
}
.doc-body pre code { color: inherit; font-size: inherit; white-space: pre; }
.copy-code {
  position: absolute;
  top: 7px;
  right: 8px;
  z-index: 1;
  padding: 3px 8px;
  color: #cfcfcf;
  font: 10px var(--mono);
  background: #383838;
  border: 1px solid #626262;
  border-radius: 4px;
}
.copy-code:hover { color: #fff; border-color: #b6b6b6; }
.doc-body table {
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 24px 0;
  overflow: auto;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.65;
}
.doc-body th,
.doc-body td {
  padding: 9px 11px;
  text-align: left;
  vertical-align: top;
  border: 1px solid #c0c0bd;
}
.doc-body th { background: #d6d6d4; font-weight: 600; }
.doc-body tr:nth-child(even) { background: #dededc; }
.doc-body hr {
  margin: 35px 0;
  border: 0;
  border-top: 1px solid var(--paper-line);
}
.docs-home .doc-body > h1 { margin-top: 43px; font-size: clamp(36px, 4vw, 54px); }
.docs-home .doc-body > h1 + p {
  max-width: 660px;
  margin-bottom: 34px;
  color: #555;
  font-size: 17px;
  line-height: 1.8;
}

.article-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 55px;
  padding: 22px 0;
  color: #555;
  font-size: 11px;
  border-top: 1px solid var(--paper-line);
}
.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.pager a {
  display: block;
  padding: 15px 17px;
  color: #252525;
  background: linear-gradient(#f3f3f2, #d9d9d7);
  border: 1px solid #c3c3c0;
  border-radius: 6px;
  box-shadow: inset 0 1px #fff, 0 2px 0 #adadab, 0 5px 9px #00000010;
}
.pager a:last-child { text-align: right; }
.pager a:hover { border-color: #888; transform: translateY(-1px); }
.pager small,
.pager strong { display: block; }
.pager small { margin-bottom: 4px; color: #777; font: 9px var(--mono); }
.pager strong { font-size: 12px; font-weight: 570; line-height: 1.5; }

.right-sidebar {
  padding: 38px 18px;
  border-left: 1px solid var(--dark-line);
}
.toc { display: grid; gap: 9px; }
.toc p {
  margin: 0 0 12px;
  color: #8e8e8e;
  font: 9px var(--mono);
  letter-spacing: .8px;
}
.toc a {
  color: #b0b0b0;
  font-size: 11px;
  line-height: 1.5;
}
.toc a:hover { color: #fff; }
.toc-level-3 { padding-left: 13px; }
.api-note {
  margin-top: 33px;
  padding-top: 19px;
  color: #999;
  font-size: 11px;
  line-height: 1.9;
  border-top: 1px solid #414141;
}
.api-note a { color: #ddd; text-decoration: underline; text-underline-offset: 3px; }

.site-footer { border-top: 1px solid #333; background: #141414; }
.footer-inner {
  display: flex;
  align-items: center;
  gap: 25px;
  width: min(1200px, calc(100% - 96px));
  min-height: 70px;
  margin-inline: auto;
  color: #939393;
  font-size: 10px;
}
.footer-inner a { color: #b4b4b4; }
.footer-inner a:hover { color: #fff; }
.footer-edition {
  margin-left: auto;
  color: #858585;
  font: 8px var(--mono);
  letter-spacing: 1px;
}
.mobile-nav { display: none; }

@media (max-width: 1210px) {
  .layout { grid-template-columns: 250px minmax(0, 1fr); }
  .right-sidebar { display: none; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 84px; }
  .header-inner { width: calc(100% - 48px); min-height: 74px; gap: 16px; }
  .brand { font-size: 16px; }
  .brand-beta { display: none; }
  .site-header nav { gap: 16px; font-size: 11px; }
  .site-header .nav-console { gap: 12px; padding: 9px 11px; font-size: 11px; }
  .layout { display: block; min-height: calc(100vh - 144px); border: 0; }
  .sidebar { display: none; }
  .mobile-nav {
    display: block;
    background: #1d1d1d;
    border-bottom: 1px solid #3a3a3a;
  }
  .mobile-nav details { padding: 11px 24px; }
  .mobile-nav summary {
    padding: 5px 0;
    color: #d5d5d5;
    font-size: 12px;
    font-weight: 550;
    list-style: none;
  }
  .mobile-nav summary::-webkit-details-marker { display: none; }
  .mobile-nav summary::after { content: "+"; float: right; color: #aaa; font: 17px var(--mono); }
  .mobile-nav details[open] summary::after { content: "−"; }
  .mobile-nav details[open] { padding-bottom: 19px; }
  .mobile-nav .search-wrap { margin: 20px 0; }
  .mobile-nav nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
    max-height: 58vh;
    overflow: auto;
  }
  .mobile-nav .nav-group { margin: 0; }
  .article { padding: 27px 28px 65px; }
  .article-meta a { margin-left: 0; }
  .doc-body { font-size: 14px; }
  .doc-body h1 { margin-top: 28px; }
  .doc-body h2 { font-size: 23px; scroll-margin-top: 83px; }
  .doc-body h3, .doc-body h4 { scroll-margin-top: 83px; }
  .footer-inner { width: calc(100% - 48px); flex-wrap: wrap; gap: 12px 22px; padding-block: 23px; }
}
@media (max-width: 540px) {
  html { scroll-padding-top: 127px; }
  .header-inner { position: relative; flex-wrap: wrap; width: calc(100% - 36px); min-height: 105px; gap: 0; padding-top: 16px; }
  .brand { font-size: 15px; }
  .brand-mark { width: 27px; height: 27px; font-size: 22px; }
  .brand-docs { font-size: 9px; }
  .site-header nav { order: 2; width: 100%; gap: 28px; margin-top: 15px; padding-bottom: 13px; }
  .site-header .nav-console { position: absolute; top: 16px; right: 0; padding: 7px 9px; }
  .mobile-nav details { padding-inline: 18px; }
  .mobile-nav nav { grid-template-columns: 1fr; }
  .article { padding: 25px 18px 57px; }
  .doc-body h1 { font-size: 33px; letter-spacing: -1px; }
  .docs-home .doc-body > h1 { font-size: 37px; }
  .doc-body h2, .doc-body h3, .doc-body h4 { scroll-margin-top: 128px; }
  .doc-body pre { padding-inline: 15px; font-size: 11px; }
  .doc-body table { width: 100%; }
  .doc-body th, .doc-body td { min-width: 125px; }
  .doc-body th:last-child, .doc-body td:last-child { min-width: 220px; }
  .pager { gap: 8px; }
  .pager a { padding: 12px 10px; }
  .pager strong { font-size: 11px; }
  .footer-edition { flex-basis: 100%; margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
