:root {
  color-scheme: dark;
  --bg: #0d0e12;
  --panel: #17181e;
  --text: #f1f1f3;
  --muted: #a5a6ad;
  --line: #2b2c34;
  --accent: #f34f2b;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    15px/1.75 Inter,
    'Segoe UI',
    Arial,
    sans-serif;
}
a {
  color: inherit;
  text-decoration: none;
}
header {
  height: 76px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1280px) / 2));
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 5;
}
header nav {
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.6px;
}
.brand span {
  background: var(--accent);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  text-align: center;
  font: 800 22px/30px Arial;
}
.brand small {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
}
.layout {
  max-width: 1280px;
  margin: auto;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  gap: 72px;
  padding: 0 24px;
}
aside {
  position: sticky;
  top: 76px;
  height: calc(100vh - 76px);
  overflow: auto;
  padding: 35px 18px 28px 0;
  border-right: 1px solid var(--line);
}
aside label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
kbd {
  border: 1px solid var(--line);
  padding: 0 6px;
  border-radius: 4px;
}
input {
  width: 100%;
  margin: 8px 0 20px;
  padding: 11px 12px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
  font-size: 13px;
}
.nav-label,
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.7px;
  font-weight: 700;
  color: var(--muted);
}
#topics {
  display: grid;
  gap: 3px;
}
#topics a {
  padding: 6px 10px;
  color: var(--muted);
  font-size: 13px;
  border-radius: 5px;
}
#topics a:hover,
#topics a[aria-current] {
  color: var(--text);
  background: var(--panel);
}
#topics a[aria-current] {
  box-shadow: inset 2px 0 var(--accent);
}
.sidebar-note {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 30px;
  font-size: 12px;
  color: var(--muted);
}
main {
  min-width: 0;
  max-width: 850px;
  padding: 52px 0 0;
}
.eyebrow {
  color: var(--accent);
}
h1 {
  font-size: clamp(36px, 5vw, 52px);
  letter-spacing: -2px;
  line-height: 1.15;
  margin: 14px 0 20px;
}
h2 {
  font-size: 27px;
  letter-spacing: -0.7px;
  line-height: 1.4;
  margin: 0 0 20px;
}
p {
  color: var(--muted);
  margin: 12px 0;
}
.lead {
  font-size: 18px;
  max-width: 630px;
  margin-bottom: 30px;
}
.notice {
  padding: 18px 22px;
  border: 1px solid #62402f;
  background: #211a17;
  border-radius: 9px;
}
.notice p {
  margin: 5px 0 0;
  font-size: 13px;
}
.notice strong {
  font-size: 13px;
  color: #ffae90;
}
.badge {
  display: inline-block;
  vertical-align: middle;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
  color: #ffae90;
  border: 1px solid #644332;
  border-radius: 5px;
  padding: 2px 7px;
  white-space: nowrap;
  margin-left: 5px;
}
section {
  padding: 42px 0;
  border-bottom: 1px solid var(--line);
}
section a {
  color: #ff997b;
  text-decoration: underline;
  text-underline-offset: 3px;
}
code {
  font:
    12px/1.7 Consolas,
    'SFMono-Regular',
    monospace;
  background: #202128;
  padding: 2px 5px;
  border-radius: 4px;
  overflow-wrap: anywhere;
  color: #e6e6eb;
}
pre {
  position: relative;
  background: #15161b;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 44px 22px 22px;
  overflow: auto;
  margin: 20px 0;
}
pre code {
  background: none;
  padding: 0;
  overflow-wrap: normal;
  white-space: pre;
  font-size: 12px;
  color: #dedee6;
}
.copy {
  position: absolute;
  right: 10px;
  top: 10px;
  background: #25262d;
  border: 1px solid #3a3b45;
  color: #c8c9d0;
  font-size: 10px;
  border-radius: 4px;
  padding: 5px 8px;
  cursor: pointer;
}
.code-language {
  position: absolute;
  top: 12px;
  left: 22px;
  color: var(--muted);
  font:
    11px/1.5 'Segoe UI',
    Arial,
    sans-serif;
  letter-spacing: 0.4px;
}
.syntax-comment {
  color: #a0a5b5;
  font-style: italic;
}
.syntax-string {
  color: #a5d6a7;
}
.syntax-keyword {
  color: #c9a7ff;
}
.syntax-literal,
.syntax-number {
  color: #ffbb86;
}
.syntax-function {
  color: #82cfff;
}
.syntax-property,
.syntax-variable {
  color: #ffd98e;
}
.syntax-operator {
  color: #ffad9b;
}
.syntax-punctuation {
  color: #bfc4d1;
}
.flow {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 25px 0;
}
.flow span {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 12px 16px;
  border-radius: 7px;
  font-size: 12px;
}
.flow b {
  color: var(--accent);
}
ol {
  padding-left: 22px;
  color: var(--muted);
}
li {
  margin: 8px 0;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 22px 0;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  min-width: 400px;
  text-align: left;
}
th {
  background: var(--panel);
  font-weight: 500;
}
th,
td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
td {
  color: var(--muted);
}
tr:last-child td {
  border: 0;
}
td code {
  font-size: 11px;
}
details {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 15px 18px;
  margin: 10px 0;
}
summary {
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
}
details p {
  font-size: 13px;
}
footer {
  padding: 30px 0 50px;
  color: var(--muted);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
}
.skip {
  position: fixed;
  top: -100px;
  left: 12px;
  z-index: 10;
  background: white;
  color: black;
  padding: 12px;
}
.skip:focus {
  top: 10px;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
#search-status {
  font-size: 12px;
}
button,
input {
  font-family: inherit;
}
@media (max-width: 850px) {
  .layout {
    gap: 30px;
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .flow {
    flex-wrap: wrap;
  }
  h2 {
    font-size: 23px;
  }
}
@media (max-width: 620px) {
  header {
    height: 64px;
    padding: 0 18px;
  }
  header nav {
    gap: 15px;
    font-size: 12px;
  }
  .layout {
    display: block;
    padding: 0 20px;
  }
  aside {
    position: static;
    height: auto;
    border: 0;
    border-bottom: 1px solid var(--line);
    padding: 20px 0;
  }
  #topics {
    display: flex;
    overflow: auto;
    gap: 5px;
    padding-bottom: 8px;
  }
  #topics a {
    white-space: nowrap;
  }
  .nav-label,
  .sidebar-note {
    display: none;
  }
  input {
    margin-bottom: 10px;
  }
  main {
    padding-top: 30px;
  }
  h1 {
    letter-spacing: -1.5px;
  }
  section {
    padding: 32px 0;
  }
  .badge {
    font-size: 9px;
  }
  pre {
    padding: 40px 16px 16px;
  }
  footer {
    gap: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
