:root {
  /* 使用文档的文字、边界、强调色和版心尺寸。 */
  color-scheme: light;
  --docs-ink: #172033;
  --docs-muted: #657187;
  --docs-line: #e4e9f0;
  --docs-soft: #f5f7fa;
  --docs-yellow: #ffd84d;
  --docs-yellow-soft: #fff8d9;
  --docs-blue: #3168f4;
  --docs-width: min(1480px, calc(100vw - 40px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--docs-ink);
  background: #ffffff;
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  color: var(--docs-ink);
  background: var(--docs-yellow);
  border-radius: 10px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.docs-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 70px;
  color: #f8fafc;
  background: rgba(12, 18, 30, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.docs-header__inner {
  width: var(--docs-width);
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 26px;
}

.docs-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
}

.docs-brand img {
  border-radius: 10px;
}

.docs-brand small {
  padding-left: 12px;
  color: #8e9aad;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.78rem;
  font-weight: 600;
}

.docs-header nav {
  margin-left: auto;
  display: flex;
  gap: 22px;
  color: #aab4c4;
  font-size: 0.86rem;
}

.docs-header nav a:hover,
.docs-header nav a:focus-visible {
  color: var(--docs-yellow);
}

.docs-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
}

.docs-layout {
  /* 桌面端由文档目录、正文和页内目录组成。 */
  width: var(--docs-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px minmax(0, 820px) 210px;
  justify-content: space-between;
  gap: clamp(28px, 4vw, 60px);
}

.docs-sidebar,
.docs-toc {
  position: sticky;
  top: 94px;
  height: calc(100vh - 118px);
  padding: 28px 0;
  overflow-y: auto;
}

.docs-sidebar__label,
.docs-toc__label {
  margin: 0 0 12px;
  color: #9aa5b5;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.docs-sidebar nav {
  display: grid;
  gap: 5px;
}

.docs-sidebar a {
  padding: 10px 12px;
  color: #5f6b7d;
  border-radius: 9px;
  font-size: 0.88rem;
}

.docs-sidebar a:hover,
.docs-sidebar a:focus-visible {
  color: var(--docs-ink);
  background: var(--docs-soft);
}

.docs-sidebar a[aria-current="page"] {
  color: var(--docs-ink);
  background: var(--docs-yellow-soft);
  font-weight: 800;
}

.docs-sidebar__support {
  margin-top: 26px;
  padding: 16px;
  color: #655928;
  background: var(--docs-yellow-soft);
  border-radius: 12px;
  font-size: 0.78rem;
  line-height: 1.65;
}

.docs-sidebar__support a {
  padding: 0;
  color: #705800;
  font-weight: 800;
}

.docs-main {
  min-width: 0;
  padding: clamp(42px, 6vw, 82px) 0 100px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  color: #8a96a8;
  font-size: 0.78rem;
}

.breadcrumb span {
  color: #bdc4ce;
}

.article-header {
  margin-top: 28px;
  padding-bottom: 38px;
  border-bottom: 1px solid var(--docs-line);
}

.article-header__tag {
  margin: 0 0 14px;
  color: #a57f00;
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.1em;
}

.article-header h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.article-header > p {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--docs-muted);
  font-size: 1.05rem;
  line-height: 1.85;
}

.article-meta {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: #8b96a6;
  font-size: 0.76rem;
}

.article-body {
  /* 正文保持适合持续阅读的字号、行距和段落节奏。 */
  padding-top: 18px;
}

.article-body section {
  scroll-margin-top: 100px;
  padding-top: 40px;
}

.article-body h2 {
  margin: 0 0 18px;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  letter-spacing: -0.035em;
}

.article-body h3 {
  margin: 30px 0 12px;
  font-size: 1.12rem;
}

.article-body p,
.article-body li {
  color: #4e5a6c;
  font-size: 0.96rem;
  line-height: 1.9;
}

.article-body ul,
.article-body ol {
  padding-left: 22px;
}

.article-body strong {
  color: var(--docs-ink);
}

.doc-image {
  margin: 26px 0 0;
  overflow: hidden;
  background: #eef2f7;
  border: 1px solid #dfe5ed;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.doc-image img {
  width: 100%;
  display: block;
}

.doc-image figcaption {
  padding: 13px 16px;
  color: #7c8798;
  background: #ffffff;
  font-size: 0.75rem;
}

.doc-image--phone {
  max-width: 360px;
}

.doc-image--phone img {
  aspect-ratio: 941 / 1672;
  object-fit: cover;
  object-position: top;
}

.note {
  margin-top: 22px;
  padding: 18px 20px;
  color: #5d5124;
  background: var(--docs-yellow-soft);
  border-left: 4px solid var(--docs-yellow);
  border-radius: 4px 12px 12px 4px;
  line-height: 1.8;
}

.note--neutral {
  color: #536075;
  background: #f2f5f9;
  border-left-color: #9ba7b8;
}

.steps {
  margin: 26px 0 0;
  padding: 0;
  counter-reset: documentation-step;
  list-style: none;
}

.steps > li {
  position: relative;
  min-height: 88px;
  padding: 4px 0 26px 62px;
  counter-increment: documentation-step;
}

.steps > li::before {
  content: counter(documentation-step);
  position: absolute;
  top: 0;
  left: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--docs-ink);
  background: var(--docs-yellow);
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 900;
}

.steps > li::after {
  content: "";
  position: absolute;
  top: 43px;
  bottom: 4px;
  left: 18px;
  width: 1px;
  background: var(--docs-line);
}

.steps > li:last-child::after {
  display: none;
}

.steps h3 {
  margin: 4px 0 7px;
}

.steps p {
  margin: 0;
}

.field-table {
  width: 100%;
  margin-top: 22px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--docs-line);
  border-radius: 14px;
  font-size: 0.86rem;
}

.field-table th,
.field-table td {
  padding: 14px 16px;
  border-right: 1px solid var(--docs-line);
  border-bottom: 1px solid var(--docs-line);
  text-align: left;
  vertical-align: middle;
}

.field-table th:last-child,
.field-table td:last-child {
  border-right: 0;
}

.field-table tr:last-child td {
  border-bottom: 0;
}

.field-table th {
  color: #364154;
  background: #f2f5f8;
}

.field-table td {
  color: #5e697b;
}

.doc-cards {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.doc-card {
  min-height: 164px;
  padding: 22px;
  border: 1px solid var(--docs-line);
  border-radius: 15px;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

a.doc-card:hover,
a.doc-card:focus-visible {
  transform: translateY(-3px);
  border-color: #e3c348;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.07);
}

.doc-card span {
  color: #a98000;
  font-size: 0.7rem;
  font-weight: 900;
}

.doc-card h2,
.doc-card h3 {
  margin: 16px 0 8px;
  font-size: 1.12rem;
}

.doc-card p {
  margin: 0;
  color: #6b7687;
  font-size: 0.84rem;
  line-height: 1.7;
}

.status-list {
  margin-top: 24px;
  display: grid;
  gap: 10px;
}

.status-list div {
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 18px;
  border: 1px solid var(--docs-line);
  border-radius: 12px;
}

.status-list strong {
  font-size: 0.88rem;
}

.status-list span {
  color: #687488;
  font-size: 0.86rem;
  line-height: 1.7;
}

.docs-toc nav {
  display: grid;
  gap: 8px;
  border-left: 1px solid var(--docs-line);
}

.docs-toc a {
  margin-left: -1px;
  padding: 5px 0 5px 15px;
  color: #8994a4;
  border-left: 2px solid transparent;
  font-size: 0.76rem;
  line-height: 1.5;
}

.docs-toc a:hover,
.docs-toc a:focus-visible {
  color: var(--docs-ink);
  border-left-color: var(--docs-yellow);
}

.next-doc {
  margin-top: 58px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #101827;
  border-radius: 16px;
  color: #f8fafc;
}

.next-doc small {
  display: block;
  color: #8c98aa;
  font-size: 0.72rem;
}

.next-doc b {
  margin-top: 6px;
  display: block;
}

.next-doc span {
  color: var(--docs-yellow);
  font-size: 1.3rem;
}

.docs-footer {
  padding: 28px 0 48px;
  color: #8b96a6;
  border-top: 1px solid var(--docs-line);
  font-size: 0.76rem;
}

@media (max-width: 1160px) {
  .docs-layout {
    grid-template-columns: 220px minmax(0, 820px);
  }

  .docs-toc {
    display: none;
  }
}

@media (max-width: 800px) {
  :root {
    --docs-width: calc(100% - 28px);
  }

  .docs-header__inner {
    min-height: 64px;
  }

  .docs-header nav {
    display: none;
  }

  .docs-brand small {
    display: none;
  }

  .docs-menu-button {
    display: inline-grid;
    place-items: center;
  }

  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: fixed;
    inset: 64px 0 auto 0;
    z-index: 20;
    height: auto;
    max-height: calc(100vh - 64px);
    padding: 20px 24px 28px;
    display: none;
    background: #ffffff;
    border-bottom: 1px solid var(--docs-line);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  }

  .docs-sidebar.is-open {
    display: block;
  }

  .docs-main {
    padding-top: 46px;
  }

  .article-header h1 {
    font-size: clamp(2.3rem, 12vw, 3.7rem);
  }

  .doc-cards {
    grid-template-columns: 1fr;
  }

  .field-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .status-list div {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
