@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/GeistMono-Variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "CJK Quotes";
  src: local("PingFang SC Regular"), local("PingFang SC"), local("SimHei"), local("Source Han Sans SC");
  unicode-range: U+2018-2019, U+201C-201D;
}

:root {
  color-scheme: light;
  --accent: #f7a41d;
  --link: #986000;
  --link-hover: #744800;
  --paper: #fff;
  --surface: #f6f6f7;
  --ink: #3c3c43;
  --heading: #242429;
  --muted: #67676c;
  --line: #e2e2e3;
  --frame-line: color-mix(in srgb, var(--line) 82%, var(--muted));
  --selected: #f7a41d1a;
  --code-keyword: #8250df;
  --code-string: #0a3069;
  --code-number: #0550ae;
  --code-function: #953800;
  --code-builtin: #8250df;
  --code-type: #116329;
  --code-comment: #6e7781;
  --header-height: 56px;
  --header-gutter: 24px;
  --frame-width: 1152px;
  --sidebar-width: 240px;
  --font-sans: "Geist", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-family: var(--font-sans);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
:root:lang(zh) {
  --font-sans: "CJK Quotes", "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --link: #f7ba58;
  --link-hover: #ffd38d;
  --paper: #1b1b1f;
  --surface: #202127;
  --ink: #dfdfd6;
  --heading: #fffff5;
  --muted: #a4a4ad;
  --line: #2e2e32;
  --selected: #f7a41d12;
  --code-keyword: #c4a7e7;
  --code-string: #a8d5a2;
  --code-number: #f2c97d;
  --code-function: #a6c8ff;
  --code-builtin: #c4a7e7;
  --code-type: #82d2c5;
  --code-comment: #98989f;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --link: #f7ba58;
    --link-hover: #ffd38d;
    --paper: #1b1b1f;
    --surface: #202127;
    --ink: #dfdfd6;
    --heading: #fffff5;
    --muted: #a4a4ad;
    --line: #2e2e32;
    --selected: #f7a41d12;
    --code-keyword: #c4a7e7;
    --code-string: #a8d5a2;
    --code-number: #f2c97d;
    --code-function: #a6c8ff;
    --code-builtin: #c4a7e7;
    --code-type: #82d2c5;
    --code-comment: #98989f;
  }
}
* {
  box-sizing: border-box;
}
html {
  scroll-padding-top: 96px;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.8;
}
a {
  color: var(--link);
  text-decoration: none;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--link-hover);
}
button,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
}
[hidden] {
  display: none !important;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 3px;
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 20;
  padding: 8px 16px;
  background: var(--paper);
  border: 1px solid var(--accent);
}
.skip-link:focus {
  top: 8px;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header-height);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  border-block-end: 1px solid var(--frame-line);
}
.shell,
.home,
.site-footer {
  max-width: var(--frame-width);
  margin-inline: auto;
  border-inline: 1px solid var(--frame-line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
  padding-inline: var(--header-gutter);
}
.brand {
  flex: none;
}
.brand-mark {
  display: block;
}
.top-nav,
.header-tools {
  display: flex;
  align-items: center;
  white-space: nowrap;
  font-size: 14px;
}
.top-nav {
  gap: 20px;
}
.top-nav a {
  color: var(--muted);
}
.top-nav:lang(en) {
  font: 500 12px/1.5 var(--font-sans);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.top-nav a:hover,
.top-nav a[aria-current="location"] {
  color: var(--link);
}
.header-tools {
  gap: 4px;
  margin-inline-start: auto;
}
.header-tools details {
  position: relative;
}
.header-tools :is(summary, .github-link) {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}
.header-tools :is(summary, .github-link):hover,
.header-tools details[open] > summary {
  background: var(--surface);
  color: var(--heading);
}
.ui-icon {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ui-icon-small { width: 14px; height: 14px; }
.github-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.language-menu,
.theme-options,
.mobile-nav > nav {
  position: absolute;
  inset-block-start: calc(100% + 6px);
  inset-inline-end: 0;
  min-width: 144px;
  margin: 0;
  padding: 5px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  box-shadow: 0 8px 24px rgb(0 0 0 / 14%);
}
.mobile-nav > nav { min-width: 176px; }
.mobile-nav nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 7px;
  color: var(--ink);
  line-height: 1.5;
}
.mobile-nav nav a:is(:hover, :focus-visible, :active, [aria-current="location"], [aria-current="page"]) {
  color: var(--heading);
  background: color-mix(in srgb, var(--paper) 92%, var(--ink));
}
.mobile-nav nav a:focus-visible { outline-offset: -2px; }
.theme-current-dark,
[data-theme="dark"] .theme-current-light,
.mobile-nav { display: none; }
[data-theme="dark"] .theme-current-dark { display: inline; }
.language-menu a, .theme-options button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  line-height: 1.5;
  cursor: pointer;
}
:is(.language-menu a, .theme-options button):is(:hover, :focus-visible) { background: var(--surface); }
.language-menu a[aria-current="true"]::after,
.theme-options button[aria-pressed="true"]::after {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  margin-inline-start: auto;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 12 5 5L20 6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  align-items: start;
  min-height: calc(100dvh - var(--header-height));
}
.sidebar {
  position: sticky;
  top: var(--header-height);
  height: calc(100dvh - var(--header-height));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 22px 40px;
  border-inline-end: 1px solid var(--line);
  background: var(--paper);
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.sidebar > details > summary {
  display: none;
}
#chapter-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(20rem, 87vw);
  height: 100dvh;
  max-height: none;
  padding: 0;
  margin: 0;
  border: 0;
  border-inline-end: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}
#chapter-drawer[open] { display: flex; flex-direction: column; }
#chapter-drawer::backdrop { background: rgb(0 0 0 / 46%); }
html:has(#chapter-drawer[open]) { overflow: hidden; }
.drawer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  padding-inline: 20px 10px;
  border-bottom: 1px solid var(--line);
}
.drawer-heading button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
#chapter-drawer nav { overflow-y: auto; overscroll-behavior: contain; padding: 4px 22px 24px; }
@media (prefers-reduced-motion: no-preference) {
  #chapter-drawer[open] { animation: chapter-slide-in 180ms ease-out; }
  @keyframes chapter-slide-in { from { transform: translateX(-100%); } }
}
.nav-group {
  border-top: 1px solid var(--line);
  padding: 16px 0 18px;
}
.nav-group:first-child {
  border-top: 0;
}
.nav-group > summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--heading);
  font-size: 14px;
  font-weight: 650;
  list-style: none;
  cursor: pointer;
}
summary::-webkit-details-marker {
  display: none;
}
.nav-group > summary::after {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background: var(--muted);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.nav-group[open] > summary::after {
  transform: rotate(90deg);
}
.sidebar ul {
  list-style: none;
  padding: 8px 0 0;
  margin: 0;
}
.sidebar li {
  margin: 0;
}
.sidebar a {
  display: block;
  padding: 5px 10px;
  margin: 1px -10px;
  border-radius: 5px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.sidebar a:hover {
  color: var(--link);
}
.sidebar a[aria-current="page"] {
  color: var(--link);
  background: var(--selected);
  font-weight: 600;
}
main {
  width: 100%;
  max-width: 832px;
  min-width: 0;
  margin: 0;
  padding: 52px 40px 40px;
}
.eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
}
h1,
h2,
h3,
h4 {
  line-height: 1.4;
  color: var(--heading);
  font-weight: 650;
}
h1 {
  font-size: 32px;
  letter-spacing: -0.7px;
  margin: 0 0 28px;
}
.prose {
  overflow-wrap: anywhere;
}
.prose h2 {
  margin: 44px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 24px;
  letter-spacing: -0.3px;
}
h1:lang(zh), .prose h2:lang(zh) { letter-spacing: normal; }
.prose h3 {
  margin: 28px 0 12px;
  font-size: 20px;
}
.prose p,
.prose ul,
.prose ol {
  margin: 16px 0;
}
.prose ul,
.prose ol {
  padding-left: 24px;
}
.prose li {
  margin: 6px 0;
}
.prose a {
  text-decoration: underline;
  font-weight: 500;
}
.prose strong {
  color: var(--heading);
  font-weight: 600;
}
code {
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--surface);
  color: var(--link);
  font-family: var(--font-mono);
  font-size: 0.86em;
}
pre {
  padding: 20px 24px;
  margin: 20px 0;
  overflow: auto;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: 8px;
  line-height: 1.65;
  tab-size: 4;
}
pre code {
  padding: 0;
  color: var(--ink);
  background: transparent;
  border-radius: 0;
  font-size: 13px;
  white-space: pre;
  overflow-wrap: normal;
}
.prose pre code {
  font-size: 14px;
}
blockquote {
  margin: 20px 0;
  padding: 4px 20px;
  border-left: 3px solid var(--accent);
  background: var(--selected);
  border-radius: 0 6px 6px 0;
  color: var(--muted);
}

.prose .block {
  --alert-color: var(--accent);
  --alert-border: var(--accent);
  --alert-background: var(--selected);
  margin: 16px 0;
  padding: 16px 16px 8px;
  color: var(--muted);
  background: var(--alert-background);
  border: 1px solid var(--alert-border);
  border-radius: 8px;
}
.prose .block > h2 {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--alert-color);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-transform: uppercase;
}
.prose .block > p,
.prose .block > ul,
.prose .block > ol {
  margin: 8px 0;
}
.prose .block > :last-child {
  margin-bottom: 0;
}
.prose .block.info,
.prose .block.note {
  --alert-color: #2563eb;
  --alert-border: #2563eb;
  --alert-background: rgba(37, 99, 235, 0.1);
}
.prose .block.tip {
  --alert-color: #059669;
  --alert-border: #059669;
  --alert-background: rgba(5, 150, 105, 0.1);
}
.prose .block.important {
  --alert-color: #7c3aed;
  --alert-border: #7c3aed;
  --alert-background: rgba(124, 58, 237, 0.1);
}
.prose .block.warning {
  --alert-color: #e7c000;
  --alert-border: #e7c000;
  --alert-background: #fff8e6;
}
:root[data-theme="dark"] .prose .block.warning {
  --alert-color: #f9da2b;
  --alert-border: #f9da2b;
  --alert-background: rgba(249, 218, 43, 0.16);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .prose .block.warning {
    --alert-color: #f9da2b;
    --alert-border: #f9da2b;
    --alert-background: rgba(249, 218, 43, 0.16);
  }
}
.prose .block.caution,
.prose .block.danger {
  --alert-color: #dc2626;
  --alert-border: #dc2626;
  --alert-background: rgba(220, 38, 38, 0.1);
}

table {
  display: block;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
  line-height: 1.65;
}
th,
td {
  padding: 10px 16px;
  min-width: 100px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th {
  color: var(--heading);
  background: var(--surface);
  font-weight: 600;
}
tr:nth-child(even) td {
  background: var(--surface);
}
img {
  max-width: 100%;
  height: auto;
}
pre
  :is(
    .keyword,
    .keyword_function,
    .keyword_import,
    .keyword_return,
    .keyword_type,
    .keyword_conditional,
    .keyword_exception,
    .keyword_modifier,
    .keyword_repeat,
    .keyword_operator
  ) {
  color: var(--code-keyword);
}
pre :is(.string, .string_escape) {
  color: var(--code-string);
}
pre :is(.number, .number_float, .boolean, .constant_builtin) {
  color: var(--code-number);
}
pre :is(.function, .function_call) {
  color: var(--code-function);
}
pre .function_builtin {
  color: var(--code-builtin);
}
pre :is(.type, .type_builtin) {
  color: var(--code-type);
}
pre :is(.comment, .comment_documentation) {
  color: var(--code-comment);
}
@media (max-width: 1023px) {
  .shell {
    display: flex;
    flex-direction: column;
  }
  .sidebar {
    z-index: 5;
    width: 100%;
    height: auto;
    padding: 0 20px;
    overflow: visible;
    border: 0;
    border-block-end: 1px solid var(--line);
  }
  .sidebar > details > summary {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 43px;
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
    list-style: none;
  }
  .sidebar > details > summary svg { flex: none; }
  .chapter-current {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: var(--heading);
    overflow: hidden;
    white-space: nowrap;
  }
  .chapter-current svg {
    margin-inline-start: 4px;
    color: var(--muted);
  }
  .sidebar > details > nav {
    max-height: min(55dvh, 440px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 10px 16px;
  }
  .sidebar .nav-group { padding: 12px 0; }
  main {
    margin-inline: auto;
    padding: 40px 24px;
  }
  html { scroll-padding-top: 116px; }
}
@media (max-width: 639px) {
  .header-inner { padding-inline: 16px; }
  .brand-mark {
    width: 68px;
    height: auto;
  }
  .top-nav { display: none; }
  .mobile-nav { display: block; }
  main { padding-inline: 16px; }
  h1 { font-size: 28px; }
  .prose h2 { font-size: 22px; }
}
.search-open {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  margin-inline-start: auto;
  width: 224px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 65%, var(--paper));
  color: var(--muted);
  font-weight: 400;
  cursor: pointer;
}
.search-open:hover {
  background: var(--surface);
  color: var(--heading);
}
.search-open svg { flex: none; }
.search-open kbd {
  margin-inline-start: auto;
  padding: 0 4px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 18px;
}
#docs-search {
  width: min(35rem, calc(100% - 2rem));
  max-height: 84dvh;
  margin: 10dvh auto auto;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--paper) 94%, var(--surface));
  color: var(--ink);
  box-shadow: 0 16px 56px rgb(0 0 0 / 24%);
  line-height: 1.5;
}
#docs-search::backdrop {
  background: rgb(0 0 0 / 30%);
  backdrop-filter: blur(4px);
}
.search-field {
  position: relative;
  padding: 8px;
}
.search-field > svg {
  position: absolute;
  inset-block-start: 18px;
  inset-inline-start: 18px;
  pointer-events: none;
  color: var(--muted);
}
.search-field input {
  width: 100%;
  height: 36px;
  padding: 0 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--heading);
  font: inherit;
  font-size: 16px;
}
.search-field input:focus {
  outline: 0;
  border-color: color-mix(in srgb, var(--link) 30%, var(--line));
}
.search-field input::placeholder { color: var(--muted); }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-field form {
  position: absolute;
  inset-block-start: 12px;
  inset-inline-end: 12px;
}
.search-close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.search-close:hover { color: var(--heading); }
#search-results:not(:empty) {
  border-block-start: 1px solid var(--line);
  max-height: min(62dvh, 26rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
}
.search-status {
  margin: 0;
  padding: 24px 12px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}
.search-result-group + .search-result-group { margin-top: 8px; }
.search-result-group h2 {
  margin: 0;
  padding: 6px 8px 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.search-result {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--heading);
  font-size: 14px;
}
.search-result:hover,
.search-result:focus-visible,
#docs-search:has(input:focus) #search-results:not(:hover) > .search-result:first-child,
#docs-search:has(input:focus) #search-results:not(:hover) > .search-result-group:first-child > .search-result:first-of-type {
  color: var(--heading);
  background: var(--surface);
}
.search-result:focus-visible { outline-offset: -2px; }
.search-result + .search-result { margin-top: 3px; }
.search-result-icon {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  background: currentColor;
  color: var(--muted);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h8l4 4v14H6zM14 3v5h4M9 12h6m-6 4h6'/%3E%3C/svg%3E") center / contain;
}
.search-result-icon.is-section {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8h15M4 16h15M10 3 7 21M17 3l-3 18'/%3E%3C/svg%3E");
}
.search-result-title { font-weight: 550; }
.search-result-excerpt {
  display: -webkit-box;
  margin-top: 2px;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--muted);
  font-size: 13px;
}
#docs-search mark {
  border-radius: 2px;
  background: var(--selected);
  color: var(--link);
}
@media (max-width: 1023px) {
  .search-open {
    justify-content: center;
    width: 32px;
    padding: 0;
    border-color: transparent;
    background: transparent;
  }
  .search-open .search-label,
  .search-open kbd { display: none; }
}
@media (max-width: 599px) {
  #docs-search { margin-top: max(12px, 6dvh); }
}
@media print {
  :root,
  :root[data-theme] {
    color-scheme: light;
    --paper: #fff;
    --ink: #000;
    --heading: #222;
    --link: #754800;
    --surface: #f6f6f7;
    --line: #ddd;
    --muted: #555;
  }
  .site-header,
  .sidebar,
    .shell {
    display: block;
  }
  main {
    max-width: none;
    padding: 0;
  }
  pre,
  pre code {
    white-space: pre-wrap;
  }
  pre span {
    color: #333 !important;
  }
}

@media (min-width: 1024px) {
  :root { --frame-width: min(1152px, calc(100% - 48px)); }
  .header-inner { padding-inline-start: calc((100% - var(--frame-width)) / 2 + var(--header-gutter)); }
  /* Keep the native chapter menu visible on desktop. */
  .sidebar > details::details-content { display: block; content-visibility: visible; }
  .sidebar > details > nav { display: block; }
}
