:root {
  color-scheme: light dark;
  --bg: #f9fafb;
  --paper: #fff;
  --ink: #172139;
  --muted: #59647a;
  --line: #e2e6ee;
  --accent: #5345d8;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    'PingFang SC',
    sans-serif;
  line-height: 1.75;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
header {
  height: 74px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 3;
}
.brand {
  font-size: 22px;
  font-weight: 750;
  color: var(--ink);
}
.brand span {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 12px;
}
header nav {
  display: flex;
  gap: 24px;
  font-size: 14px;
}
.layout {
  display: grid;
  grid-template-columns: 256px minmax(0, 850px);
  max-width: 1260px;
  margin: auto;
  gap: 48px;
  padding: 36px 32px;
}
aside {
  position: sticky;
  top: 110px;
  height: calc(100vh - 130px);
  overflow: auto;
  font-size: 14px;
}
aside label {
  font-size: 12px;
  color: var(--muted);
}
input {
  font: inherit;
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  margin: 5px 0 22px;
}
aside nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
aside nav a {
  padding: 8px 12px;
  color: var(--muted);
  border-radius: 8px;
}
aside nav a[aria-current] {
  background: #5345d812;
  color: var(--accent);
  font-weight: 650;
}
.download {
  display: block;
  margin-top: 30px;
}
article {
  min-width: 0;
}
h1 {
  font-size: 36px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-top: 0;
}
h2 {
  font-size: 23px;
  margin-top: 40px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
p,
li {
  max-width: 780px;
}
pre {
  position: relative;
  padding: 22px;
  background: #192236;
  color: #eef2ff;
  border-radius: 12px;
  overflow: auto;
  line-height: 1.6;
  font-size: 13px;
}
code {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 0.9em;
}
p code,
td code,
li code {
  padding: 2px 5px;
  background: #5345d812;
  border-radius: 4px;
}
pre button {
  position: absolute;
  right: 10px;
  top: 8px;
  border: 1px solid #7784a4;
  background: #192236;
  color: #eef2ff;
  border-radius: 5px;
  padding: 3px 8px;
  cursor: pointer;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  display: block;
  overflow: auto;
}
th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 12px;
  vertical-align: top;
}
footer {
  border-top: 1px solid var(--line);
  margin-top: 50px;
  padding: 20px 0;
  font-size: 12px;
  color: var(--muted);
}
#menu {
  display: none;
}
#search-results a {
  display: block;
  padding: 7px;
}
#search-results p {
  font-size: 12px;
  color: var(--muted);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111623;
    --paper: #151c2c;
    --ink: #e6ebf5;
    --muted: #a2aec5;
    --line: #30384b;
    --accent: #afa3ff;
  }
}
@media (max-width: 800px) {
  header {
    padding: 0 18px;
  }
  .brand span {
    display: none;
  }
  header nav {
    gap: 14px;
  }
  header nav a {
    font-size: 12px;
  }
  .layout {
    display: block;
    padding: 25px 20px;
  }
  aside {
    display: none;
    height: auto;
    position: static;
    padding-bottom: 25px;
  }
  aside.open {
    display: block;
  }
  #menu {
    display: block;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-size: 20px;
  }
  h1 {
    font-size: 28px;
  }
  h2 {
    font-size: 21px;
  }
  pre {
    padding: 20px 14px;
  }
}
