.docs-hero {
  padding: 76px 0 44px;
  border-bottom: 1px solid var(--line);
}

.docs-hero > *,
.docs-layout {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
}

.docs-hero h1 {
  max-width: 760px;
  margin: 0 auto 16px;
  font-size: 52px;
  line-height: 1.12;
}

.docs-hero .lead {
  max-width: 780px;
  margin: 0 auto 26px;
}

.docs-hero .eyebrow,
.docs-hero .button-row {
  margin-left: auto;
  margin-right: auto;
}

.docs-layout {
  padding: 58px 0 96px;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

.docs-nav {
  position: sticky;
  top: 98px;
  padding: 8px;
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.docs-nav a {
  padding: 10px 11px;
  border-radius: 6px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
}

.docs-nav a:hover {
  color: var(--blue);
  background: #edf3ff;
}

.docs-content {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.docs-card {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  scroll-margin-top: 96px;
}

.docs-card h2 {
  margin: 0 0 11px;
  font-size: 26px;
  line-height: 1.3;
}

.docs-card p {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.docs-card code {
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--blue-dark);
  background: #edf3ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: .92em;
}

.docs-code-wrap {
  position: relative;
  margin: 18px 0;
}

.docs-card pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  border-radius: 8px;
  color: #d0d5dd;
  background: #0b1220;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.docs-card pre code {
  padding: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
  font-size: inherit;
}

.docs-card .copy-code {
  top: 10px;
  right: 10px;
}

.docs-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.docs-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.docs-table th,
.docs-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}

.docs-table th {
  color: var(--ink);
  background: #f2f4f7;
  font-weight: 850;
}

.docs-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 11px;
  list-style: none;
}

.docs-list li {
  position: relative;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

.docs-list li::before {
  position: absolute;
  top: .72em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  content: "";
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-list div {
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.faq-list strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 14px;
}

.faq-list p {
  margin: 0;
}

@media (max-width: 900px) {
  .docs-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .docs-nav {
    position: static;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 6px;
  }

  .docs-nav a {
    min-height: 38px;
    padding: 8px 10px;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .docs-hero > *,
  .docs-layout {
    width: calc(100% - 28px);
  }

  .docs-hero {
    padding: 42px 0 30px;
  }

  .docs-hero h1 {
    font-size: 34px;
    line-height: 1.18;
  }

  .docs-card {
    padding: 18px;
  }

  .docs-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: 8px;
    box-shadow: none;
  }

  .docs-nav a {
    font-size: 12px;
  }

  .docs-table-wrap {
    overflow: visible;
  }

  .docs-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 10px;
  }

  .docs-table thead {
    display: none;
  }

  .docs-table tbody,
  .docs-table tr,
  .docs-table td {
    display: block;
    width: 100%;
  }

  .docs-table tr {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
  }

  .docs-table td {
    padding: 8px 0;
    border-bottom: 0;
  }

  .docs-table td::before {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
  }

  .docs-table td:nth-child(1)::before {
    content: "参数";
  }

  .docs-table td:nth-child(2)::before {
    content: "必填";
  }

  .docs-table td:nth-child(3)::before {
    content: "说明";
  }

  .docs-table td:nth-child(4)::before {
    content: "示例";
  }
}
