@font-face {
  font-family: "Figtree";
  src: url("figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --sky: #0099FF;
  --page: #FDFDFE;
  --ink: #0B1F33;
  --ink-2: #2B3E53;
  --muted: #536679;
  --line: #E2E8EF;
  --line-strong: #CAD5E1;
  --soft: #F3F6F9;
  --link: #0067B8;
  --active: #EAF4FE;
  --active-ink: #00579C;
  --note-bg: #F0F7FE;
  --note-border: #BFDDFB;
  --note-bar: #0099FF;
  --note-ink: #00579C;
  --warn-bg: #FEF3EF;
  --warn-border: #F7CDBE;
  --warn-bar: #E9461D;
  --warn-ink: #A8320F;
  --code-bg: #0B1A2B;
  --code-head: #0F2133;
  --code-line: #1B3048;
  --code-ink: #DCE7F3;
  --code-muted: #8EA4BC;
  --tok-key: #7FC8FF;
  --tok-str: #FFA88F;
  --tok-num: #F2CC8F;
  --tok-flag: #B3C6DA;
  --tok-cmd: #FFFFFF;
  --shadow: 0 18px 36px -28px rgb(11 31 51 / .45);
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --top: 56px;
  --r: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #061322;
    --ink: #EAF2FB;
    --ink-2: #C7D5E4;
    --muted: #97ABC0;
    --line: #14293F;
    --line-strong: #1F3B58;
    --soft: #0A1C30;
    --link: #74C4FF;
    --active: #0C2540;
    --active-ink: #A6D9FF;
    --note-bg: #08213A;
    --note-border: #143F66;
    --note-bar: #3AAEFF;
    --note-ink: #A6D9FF;
    --warn-bg: #24120D;
    --warn-border: #5A2617;
    --warn-bar: #E9461D;
    --warn-ink: #FFA88F;
    --code-bg: #030C17;
    --code-head: #06121F;
    --code-line: #14293F;
    --shadow: 0 18px 36px -24px rgb(0 0 0 / .8);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--top) + 20px);
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 1rem/1.65 var(--body);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: rgb(0 153 255 / .18);
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 2px;
  border-radius: 4px;
}

main:focus { outline: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 12px;
  top: 8px;
  z-index: 40;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--page);
  font-weight: 600;
  transform: translateY(-160%);
}

.skip:focus { transform: none; }

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--top);
  background: var(--page);
  border-bottom: 1px solid var(--line);
}

.top-in {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 16px;
}

.logo {
  display: flex;
  flex: none;
  align-items: center;
}

.logo picture, .logo img { display: block; }

.logo img {
  width: auto;
  height: 24px;
}

.top-sep {
  flex: none;
  width: 1px;
  height: 20px;
  background: var(--line-strong);
}

.top-title {
  color: var(--ink);
  font-weight: 600;
  font-size: .9375rem;
  text-decoration: none;
}

.top-title:hover { color: var(--link); }

.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.crumb-sep { color: var(--muted); }

.crumb-here {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--muted);
  font-size: .9375rem;
}

.mnav { margin-left: auto; }

.mnav > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  font-weight: 600;
  font-size: .875rem;
  list-style: none;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
}

.mnav > summary::-webkit-details-marker { display: none; }

.mnav > summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.mnav[open] > summary { background: var(--soft); }

.mnav[open] > summary::after { transform: translateY(1px) rotate(-135deg); }

.mnav > nav {
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  right: 0;
  max-height: calc(100dvh - var(--top) - 1px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 16px 20px;
  background: var(--page);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  display: block;
  padding: 7px 12px;
  border-radius: 6px;
  color: var(--ink-2);
  font-size: .9375rem;
  line-height: 1.4;
  text-decoration: none;
}

.nav-list a:hover {
  background: var(--soft);
  color: var(--ink);
}

.nav-list a[aria-current="page"] {
  background: var(--active);
  color: var(--active-ink);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--sky);
}

.shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 16px;
}

.side, .toc { display: none; }

main {
  min-width: 0;
  padding: 28px 0 40px;
}

.doc, .pager, .foot { max-width: 760px; }

.doc h1, .doc h2, .doc h3, .doc h4 {
  color: var(--ink);
  text-wrap: balance;
}

.doc h1 {
  margin: 0 0 12px;
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.doc h1 + p {
  color: var(--ink-2);
  font-size: 1.0625rem;
}

.doc h2 {
  margin: 48px 0 12px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 1.375rem;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -.012em;
}

.doc h3 {
  margin: 36px 0 8px;
  font-size: 1.125rem;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -.006em;
}

.doc h2 + h3 { margin-top: 20px; }

.doc h4 {
  margin: 26px 0 8px;
  color: var(--ink-2);
  font-size: .875rem;
  font-weight: 650;
  line-height: 1.4;
}

.doc p, .doc li { text-wrap: pretty; }

.doc p { margin: 0 0 16px; }

.doc ul, .doc ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

.doc li { margin: 6px 0; }

.doc li::marker { color: var(--muted); }

.doc strong { font-weight: 650; }

.doc hr {
  margin: 32px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.doc code {
  padding: .08em .36em;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--soft);
  font-family: var(--mono);
  font-size: .85em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.doc h3 + p > code:only-child {
  display: inline-block;
  padding: 4px 10px;
  border-color: var(--line-strong);
  font-size: .875rem;
  font-weight: 500;
}

.doc blockquote {
  margin: 16px 0 24px;
  padding: 2px 0 2px 16px;
  border-left: 2px solid var(--line-strong);
  color: var(--ink-2);
}

.doc blockquote p:last-child { margin-bottom: 0; }

.table {
  margin: 14px 0 24px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

th, td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

tbody tr:last-child td { border-bottom: 0; }

th {
  background: var(--soft);
  color: var(--ink-2);
  font-weight: 600;
  white-space: nowrap;
}

td:first-child code { white-space: nowrap; }

.doc td code { font-size: .8125rem; }

.code {
  margin: 14px 0 24px;
  overflow: hidden;
  border: 1px solid var(--code-line);
  border-radius: 10px;
  background: var(--code-bg);
  color-scheme: dark;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 0 8px 0 14px;
  border-bottom: 1px solid var(--code-line);
  background: var(--code-head);
}

.code-lang {
  color: var(--code-muted);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .02em;
}

.code pre {
  margin: 0;
  padding: 14px 16px 16px;
  overflow-x: auto;
  color: var(--code-ink);
  font: 400 .8125rem/1.7 var(--mono);
  tab-size: 4;
}

.doc .code pre code {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
}

.code pre:focus-visible {
  outline-offset: -2px;
  border-radius: 0 0 10px 10px;
}

.tok-key { color: var(--tok-key); }
.tok-str { color: var(--tok-str); }
.tok-num { color: var(--tok-num); }
.tok-flag { color: var(--tok-flag); }
.tok-cmd { color: var(--tok-cmd); font-weight: 600; }
.tok-dim { color: var(--code-muted); }

.copy {
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--code-line);
  border-radius: 6px;
  background: transparent;
  color: var(--code-ink);
  font: 600 .75rem/1 var(--body);
  cursor: pointer;
  touch-action: manipulation;
}

.copy:hover { background: rgb(255 255 255 / .07); }

.copy:active { transform: translateY(1px); }

.copy[data-state="done"] { color: var(--tok-key); }

.callout {
  margin: 16px 0 24px;
  padding: 12px 16px 12px 15px;
  border: 1px solid var(--note-border);
  border-left: 3px solid var(--note-bar);
  border-radius: var(--r);
  background: var(--note-bg);
}

.doc .callout-title {
  margin: 0 0 2px;
  color: var(--note-ink);
  font-size: .875rem;
  font-weight: 700;
}

.callout-warning {
  border-color: var(--warn-border);
  border-left-color: var(--warn-bar);
  background: var(--warn-bg);
}

.callout-warning .callout-title { color: var(--warn-ink); }

.doc .callout > :last-child { margin-bottom: 0; }

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 56px;
}

.pager a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  text-decoration: none;
}

.pager a:hover { border-color: var(--link); }

.pager-next {
  grid-column: 2;
  text-align: right;
}

.pager-dir {
  color: var(--muted);
  font-size: .8125rem;
}

.pager-name {
  color: var(--link);
  font-weight: 600;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .8125rem;
}

.foot p { margin: 0; }

.foot a { color: var(--muted); }

.foot a:hover { color: var(--link); }

.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.tools span {
  color: var(--ink-2);
  font-weight: 600;
}

.toc-title {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: .8125rem;
  font-weight: 650;
}

.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line);
}

.toc a {
  display: block;
  margin-left: -1px;
  padding: 4px 0 4px 12px;
  border-left: 1px solid transparent;
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.4;
  text-decoration: none;
}

.toc a:hover {
  border-left-color: var(--line-strong);
  color: var(--ink);
}

.toc .l3 a { padding-left: 24px; }

.nav-list a:focus-visible, .toc a:focus-visible { outline-offset: -2px; }

.toc code {
  font-family: var(--mono);
  font-size: .9em;
}

@media (prefers-reduced-motion: no-preference) {
  .nav-list a, .toc a, .pager a, .copy, .top-title {
    transition: color .15s ease, background-color .15s ease, border-color .15s ease;
  }
}

@media (max-width: 520px) {
  .pager { grid-template-columns: 1fr; }
  .pager-next { grid-column: 1; }
  .doc h1 { font-size: 1.625rem; }
}

@media (min-width: 960px) {
  .mnav { display: none; }

  .top-in { padding: 0 32px; }

  .shell {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    gap: 48px;
    padding: 0 32px;
  }

  .side {
    display: block;
    position: sticky;
    top: var(--top);
    height: calc(100dvh - var(--top));
    overflow-y: auto;
    padding: 28px 16px 32px 0;
    border-right: 1px solid var(--line);
  }

  main { padding: 40px 0 48px; }

  .doc h1 { font-size: 2rem; }
}

@media (min-width: 1280px) {
  .shell { grid-template-columns: 232px minmax(0, 1fr) 216px; }

  .toc {
    display: block;
    position: sticky;
    top: var(--top);
    max-height: calc(100dvh - var(--top));
    overflow-y: auto;
    padding: 44px 0 32px;
  }
}

@media print {
  .top, .side, .toc, .pager, .copy { display: none; }
  .shell { display: block; }
}
