:root {
  color-scheme: light;
  --bg: var(--ml-background);
  --chrome: var(--ml-chrome);
  --sidebar: var(--ml-sidebar);
  --surface: var(--ml-surface);
  --hover: var(--ml-hover);
  --selected: var(--ml-selected);
  --text: var(--ml-text);
  --bright: var(--ml-bright);
  --muted: var(--ml-muted);
  --line: var(--ml-border);
  --accent: var(--ml-accent);
  --primary: var(--ml-primary);
  --green: var(--ml-positive);
  --gold: var(--ml-warning);
  --mono: ui-monospace,SFMono-Regular,Consolas,monospace;
}
:root[data-theme=dark] {
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: calc(var(--ml-type-body) + 2px)/1.75 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
a {
  color: var(--accent);
  text-underline-offset: 4px;
}
button,input {
  font: inherit;
}
button {
  cursor: pointer;
}
button,a,input,summary {
  outline-offset: 5px;
}
button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible {
  outline: 2px solid var(--accent);
}
::selection {
  background: var(--selected);
  color: var(--bright);
}
[hidden] {
  display: none!important;
}
.skip {
  position: fixed;
  top: -80px;
  left: 20px;
  z-index: 20;
  padding: 12px;
  background: var(--bright);
  color: var(--bg);
}
.skip:focus {
  top: 8px;
}
.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: var(--chrome);
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 5;
}
.wordmark {
  color: var(--bright);
  font-size: calc(var(--ml-type-body) + 2px);
  font-weight: 650;
  letter-spacing: -.5px;
  text-decoration: none;
  white-space: nowrap;
}
.mark {
  font: bold italic 30px Georgia,serif;
  color: var(--accent);
  margin-right: 12px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}
.top-label,.eyebrow {
  font: 14px/1.5 var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}
.top-label {
  margin-left: 22px;
  padding-left: 22px;
  border-left: 1px solid var(--line);
  font: 500 14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  text-transform: none;
  letter-spacing: 0;
}
.top-actions a {
  color: var(--muted);
  font-size: var(--ml-type-label);
  text-decoration: none;
}
.icon-button {
  min-height: 44px;
  min-width: 44px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
  line-height: 1.4;
}
.menu-toggle {
  display: none;
}
.layout {
  display: grid;
  grid-template-columns: 250px minmax(0,1fr);
  min-height: calc(100vh - 76px);
}
.sidebar {
  padding: 27px 17px 20px;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  position: sticky;
  top: 76px;
  height: calc(100vh - 76px);
  display: flex;
  flex-direction: column;
  overflow: auto;
}
.nav-section {
  font: 600 11.5px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color: var(--muted);
  letter-spacing: .07em;
  margin: 24px 12px 8px;
}
.sidebar nav>a {
  display: flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  color: var(--muted);
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 2px;
  transition: background .15s,color .15s;
}
.sidebar nav>a:hover {
  background: var(--hover);
  color: var(--bright);
}
.sidebar nav>a[aria-current=page] {
  background: var(--selected);
  color: var(--accent);
  font-weight: 600;
}
.nav-symbol {
  width: 17px;
  height: 17px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .75;
}
.sidebar nav>a:hover .nav-symbol,.sidebar nav>a[aria-current=page] .nav-symbol {
  opacity: 1;
}
.side-bottom {
  margin-top: auto;
  padding: 32px 12px 0;
}
.local-tag {
  font: 14px var(--mono);
  color: var(--green);
  letter-spacing: .08em;
}
.side-note {
  font-size: var(--ml-type-label);
  line-height: 1.6;
  color: var(--muted);
  margin-top: 12px;
}
.search-trigger {
  min-height: 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: var(--ml-type-label);
}
.search-trigger kbd {
  font: 14px var(--mono);
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
}
main {
  min-width: 0;
}
.content {
  max-width: 1232px;
  margin: auto;
  padding: 52px 58px 0;
}
.home-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}
.home-links a {
  color: var(--text);
  font-size: 15px;
  text-decoration: none;
}
.home-links a:hover {
  color: var(--accent);
}
.home-layout {
  display: block;
}
.home-layout > .sidebar {
  display: none;
}
.button {
  min-height: 48px;
  display: inline-flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  padding: 12px 20px;
  border: 1px solid transparent;
}
.button:hover {
  background: var(--ml-primary-hover);
}
.text-link {
  font-size: 15px;
  color: var(--accent);
  text-underline-offset: 5px;
}
.smallprint {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 32px 0;
  font-size: 14px;
  color: var(--muted);
}
footer a {
  color: var(--muted);
  text-decoration: none;
}
.doc-content {
  max-width: 1140px;
  padding-top: 35px;
}
.breadcrumbs {
  font: 500 14px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color: var(--muted);
  margin-bottom: 28px;
}
.breadcrumbs a {
  text-decoration: none;
  color: var(--muted);
}
.article-layout {
  display: grid;
  grid-template-columns: minmax(0,760px) 155px;
  gap: 42px;
}
.article {
  min-width: 0;
  padding-bottom: 40px;
}
.article h1 {
  text-wrap: balance;
  font-size: 37px;
  letter-spacing: -1.3px;
  line-height: 1.25;
  font-weight: 600;
  color: var(--bright);
  margin: 0 0 24px;
}
.article h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--bright);
  letter-spacing: -.6px;
  margin: 42px 0 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.article h3 {
  font-size: 18px;
  margin-top: 28px;
}
.article p,.article li {
  max-width: 72ch;
  font-size: calc(var(--ml-type-body) + 2px);
  line-height: 1.8;
}
.article li {
  margin-bottom: 7px;
}
.article code {
  font-family: var(--mono);
  font-size: .9em;
  background: var(--hover);
  border-radius: 3px;
  padding: 2px 5px;
}
.article pre {
  position: relative;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--chrome);
  padding: 16px 18px;
  margin: 22px 0;
}
.article pre code {
  padding: 0;
  background: none;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--bright);
}
.article pre[data-language]::after {
  content: attr(data-language);
  position: absolute;
  left: 18px;
  bottom: 6px;
  font: 600 10.5px var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  transition: opacity .15s;
}
.article pre[data-language]:hover::after {
  opacity: .7;
}
.tok-k {
  color: var(--primary);
  font-weight: 600;
}
.tok-s {
  color: var(--green);
}
.tok-c {
  color: var(--muted);
  font-style: italic;
}
.tok-n {
  color: var(--gold);
}
.tok-f {
  color: var(--accent);
}
.copy-code {
  font: 500 12.5px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  cursor: pointer;
  float: right;
  position: sticky;
  right: 0;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 3px 7px;
  margin-left: 10px;
}
.article img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.article table {
  line-height: 1.6;
  display: block;
  border-collapse: collapse;
  width: 100%;
  overflow: auto;
  font-size: var(--ml-type-label);
  margin: 20px 0;
}
.article th,.article td {
  padding: 11px 14px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.article th {
  background: var(--surface);
  color: var(--bright);
}
.article blockquote {
  margin: 20px 0;
  padding: 2px 20px;
  border-left: 2px solid var(--accent);
  color: var(--muted);
}
.headerlink {
  font: 14px var(--mono);
  color: var(--muted);
  opacity: 0;
  margin-left: 8px;
  text-decoration: none;
}
h2:hover .headerlink,h3:hover .headerlink,.headerlink:focus {
  opacity: 1;
}
.toc {
  position: sticky;
  top: 98px;
  align-self: start;
  font-size: var(--ml-type-label);
  max-height: calc(100vh - 130px);
  overflow: auto;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}
.toc>p {
  font: 600 11.5px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  letter-spacing: .07em;
  color: var(--muted);
  margin: 0 0 12px;
}
/* The page title is already the heading above; list only its sections. */
.toc>ul>li>a {
  display: none;
}
.toc>ul>li>ul {
  padding-left: 0;
}
.toc ul {
  list-style: none;
  padding: 0;
}
.toc ul ul {
  padding-left: 10px;
}
.toc li {
  margin: 9px 0;
}
.toc a {
  text-decoration: none;
  color: var(--muted);
  line-height: 1.5;
}
.toc a:hover {
  color: var(--accent);
}
.toc a[aria-current=true] {
  color: var(--accent);
  font-weight: 600;
}
.source-note {
  font-size: var(--ml-type-label);
  color: var(--muted);
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.source-code {
  font-size: var(--ml-type-label);
  line-height: 1.75;
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--chrome);
}
.source-code span {
  display: block;
  scroll-margin-top: 90px;
}
.source-code span:target {
  background: var(--selected);
}
.source-code a {
  user-select: none;
  color: var(--muted);
  text-decoration: none;
  display: inline-block;
  min-width: 42px;
}
.search-dialog {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  width: min(680px,calc(100% - 30px));
  max-height: 75vh;
  padding: 0;
  margin: 12vh auto;
}
.search-dialog::backdrop {
  background: #0009;
  backdrop-filter: blur(4px);
}
.search-top {
  display: flex;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}
.search-top input {
  width: 100%;
  background: none;
  border: 0;
  color: var(--bright);
  font-size: 16px;
}
.search-top input::placeholder {
  color: var(--muted);
  opacity: 1;
}
.search-results {
  scrollbar-gutter: stable;
  overflow: auto;
  max-height: 52vh;
  padding: 9px 18px;
}
.search-results a {
  display: block;
  text-decoration: none;
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--bright);
}
.search-results small {
  display: block;
  color: var(--muted);
  font-size: var(--ml-type-label);
  margin-top: 3px;
}
.search-results p {
  font-size: var(--ml-type-label);
  color: var(--muted);
}
.search-footer {
  padding: 12px 24px;
  color: var(--muted);
  font-size: var(--ml-type-label);
  border-top: 1px solid var(--line);
}
.search-status {
  color: var(--muted);
  font-size: 14px;
  padding: 12px 18px 0;
  margin: 0;
}
@media(max-width:1150px) {
  .content {
    padding: 38px 30px 0;
  }
  .article-layout {
    grid-template-columns: minmax(0,1fr);
  }
  .toc,.top-label {
    display: none;
  }
}
@media(max-width:900px) {
  .home-links {
    display: none;
  }
  body[data-page=home] .menu-toggle {
    display: inline-block;
  }
  .home-layout > .sidebar {
    position: fixed;
    top: 76px;
    left: 0;
    width: 280px;
    height: calc(100vh - 76px);
    z-index: 6;
    box-shadow: 20px 0 60px #0002;
  }
  .home-layout > .sidebar[data-open=true] {
    display: flex;
  }
}
@media(max-width:760px) {
  html {
    scroll-padding-top: 84px;
  }
  .topbar {
    padding: 0 18px;
    height: 60px;
  }
  .top-actions {
    gap: 8px;
  }
  .top-actions>a {
    display: none;
  }
  .layout {
    grid-template-columns: minmax(0,1fr);
  }
  .sidebar,.home-layout > .sidebar {
    display: none;
    position: fixed;
    z-index: 6;
    top: 60px;
    left: 0;
    width: 280px;
    height: calc(100vh - 60px);
    box-shadow: 20px 0 60px #0002;
  }
  .sidebar[data-open=true] {
    display: flex;
  }
  .menu-toggle {
    display: inline-block;
    font-size: 14px;
  }
  .content {
    padding: 32px 22px 0;
  }
  .article h1 {
    text-wrap: balance;
    font-size: 32px;
  }
  .article h2 {
    font-size: 24px;
  }
  .article-layout {
    display: block;
  }
}
@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }
  *,*::before,*::after {
    animation: none!important;
    transition: none!important;
  }
}
