@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@400;500&display=swap');

:root {
  --background: hsl(201 100% 13%);
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(0, 18, 29, 0.54);
  --foreground: #ffffff;
  --muted: rgba(255, 255, 255, 0.64);
  --faint: rgba(255, 255, 255, 0.42);
  --line: rgba(255, 255, 255, 0.16);
  --display: 'Instrument Serif', 'Songti SC', 'STSong', 'Noto Serif SC', serif;
  --body: 'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--background);
  overflow-y: auto;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--body);
  -webkit-font-smoothing: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.docs-nav {
  display: flex;
  width: min(100%, 1280px);
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin: 0 auto;
  padding: 26px 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

.docs-brand {
  display: inline-flex;
  flex-direction: column;
  line-height: 0.88;
}

.docs-brand > span {
  font-family: var(--display);
  font-size: 1.55rem;
  letter-spacing: -0.045em;
}

.docs-brand sup {
  position: relative;
  top: -0.65em;
  margin-left: 0.1em;
  font-family: var(--body);
  font-size: 0.28em;
}

.docs-brand small {
  margin-top: 8px;
  color: var(--faint);
  font-size: 8px;
  letter-spacing: 0.25em;
}

.docs-nav nav {
  display: flex;
  gap: 28px;
  color: var(--muted);
  font-size: 0.76rem;
}

.docs-nav nav a,
.intro-links a,
.inline-link,
.doc-end a,
.docs-footer a {
  transition: color 180ms ease;
}

.docs-nav nav a:hover,
.docs-nav nav a:focus-visible,
.intro-links a:hover,
.intro-links a:focus-visible,
.inline-link:hover,
.inline-link:focus-visible,
.doc-end a:hover,
.doc-end a:focus-visible,
.docs-footer a:hover,
.docs-footer a:focus-visible {
  color: var(--foreground);
}

.docs-layout {
  display: grid;
  width: min(100%, 1280px);
  grid-template-columns: 190px minmax(0, 820px);
  gap: clamp(42px, 8vw, 120px);
  margin: 0 auto;
  padding: 84px 32px 120px;
}

.docs-aside {
  position: sticky;
  top: 30px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.4;
}

.docs-aside p {
  margin: 0 0 8px;
  color: var(--faint);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
}

.docs-aside a {
  padding-left: 11px;
  border-left: 1px solid transparent;
  transition: color 180ms ease, border-color 180ms ease;
}

.docs-aside a:hover,
.docs-aside a:focus-visible {
  border-color: rgba(255, 255, 255, 0.7);
  color: var(--foreground);
}

.doc-intro {
  padding-bottom: 76px;
  border-bottom: 1px solid var(--line);
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--faint);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  line-height: 1.3;
  text-transform: uppercase;
}

.doc-intro h1 {
  margin: 24px 0 0;
  font-family: var(--body);
  font-size: clamp(2.4rem, 4vw, 3.8rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1;
}

.doc-intro h1 em,
.doc-section h2 em {
  color: rgba(255, 255, 255, 0.53);
  font-weight: 400;
  font-style: normal;
}

.lead {
  max-width: 650px;
  margin: 32px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.9;
}

.intro-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 28px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.78rem;
}

.doc-section {
  padding: 74px 0 0;
  scroll-margin-top: 30px;
}

.doc-section h2 {
  margin: 18px 0 0;
  font-family: var(--body);
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.doc-section > p:not(.section-kicker),
.doc-section > .muted-note {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.9;
}

code {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.88em;
}

.callout {
  margin-top: 28px;
  padding: 20px 22px;
  border-left: 2px solid rgba(255, 255, 255, 0.64);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.8;
}

.callout strong {
  color: var(--foreground);
  font-weight: 500;
}

.code-card,
.command-block {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-strong);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.06);
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
  color: var(--faint);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
}

.copy-button {
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.68rem;
  letter-spacing: 0;
  transition: background-color 180ms ease, color 180ms ease;
}

.copy-button:hover,
.copy-button:focus-visible {
  background: rgba(255, 255, 255, 0.13);
  color: var(--foreground);
}

pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

.muted-note {
  color: var(--faint) !important;
  font-size: 0.8rem !important;
}

.command-block {
  padding: 20px 22px 5px;
}

.command-block h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
}

.command-block pre {
  margin: 12px -22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
}

.number-list,
.plain-list {
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.number-list li {
  display: grid;
  grid-template-columns: 45px 1fr;
  gap: 18px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.number-list li > span {
  color: var(--faint);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
}

.number-list strong {
  font-size: 0.9rem;
  font-weight: 500;
}

.number-list p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.75;
}

.inline-link {
  display: inline-block;
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
}

.style-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 22px;
  margin-top: 30px;
  border-top: 1px solid var(--line);
}

.style-list div {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.style-list strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 500;
}

.style-list span {
  color: var(--muted);
  font-size: 0.76rem;
}

.plain-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
  padding: 12px 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.8;
}

.plain-list p {
  margin: 0;
}

.plain-list > li > span {
  color: rgba(255, 255, 255, 0.5);
}

.doc-end {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.78rem;
}

.docs-footer {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 22px 32px 38px;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
  color: var(--faint);
  font-size: 0.72rem;
}

@media (max-width: 860px) {
  .docs-layout {
    display: block;
    padding-top: 58px;
  }

  .docs-aside {
    position: static;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 11px 16px;
    margin-bottom: 58px;
  }

  .docs-aside p {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  .section-heading-inline {
    display: block;
  }
}

@media (max-width: 620px) {
  .docs-nav {
    align-items: flex-start;
    padding: 20px 18px;
  }

  .docs-nav nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px 16px;
    font-size: 0.68rem;
  }

  .docs-layout {
    padding-right: 18px;
    padding-left: 18px;
  }

  .docs-aside {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .doc-intro {
    padding-bottom: 56px;
  }

  .doc-intro h1 {
    font-size: clamp(2.2rem, 10vw, 3rem);
  }

  .style-list {
    grid-template-columns: 1fr;
  }

  .docs-footer {
    padding-right: 18px;
    padding-left: 18px;
  }
}
