/* The public API documentation. It speaks the landing's visual language —
   Inter Tight, Google blue, generous whitespace — and takes its colour scale
   from landing.css rather than restating one. */
.docs-page {
  margin: 0;
  background: #fff;
  font-family: "Inter Tight", "Noto Sans SC", -apple-system, sans-serif;
  color: #0a0a0a;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 顶栏 ---------- */
.docs-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 44px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.docs-home {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #202124;
}
.docs-top-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}
.docs-top-nav a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--gray-1);
  transition: color 0.2s;
}
.docs-top-nav a:hover {
  color: #0a0a0a;
}
.docs-cta {
  padding: 9px 20px;
  border-radius: 999px;
  background: #171d1a;
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.docs-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
}

/* ---------- 版面 ---------- */
.docs-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 56px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 52px 44px 100px;
}
.docs-side {
  position: sticky;
  top: 96px;
  align-self: start;
}
.docs-side nav {
  display: grid;
  gap: 2px;
  border-left: 1px solid var(--hairline);
}
.docs-side a {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-1);
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color 0.2s, border-color 0.2s;
}
.docs-side a:hover {
  color: #0a0a0a;
}
.docs-side a.active {
  color: var(--accent);
  border-left-color: var(--accent);
}
.docs-main {
  min-width: 0;
}
.docs-main section {
  padding-bottom: 64px;
  /* Anchored jumps must clear the sticky header. */
  scroll-margin-top: 88px;
}

/* ---------- 排版 ---------- */
.docs-main h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 4.4vw, 50px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: #202124;
}
.docs-main h2 {
  margin: 0 0 16px;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.028em;
  color: #202124;
}
.docs-main h3 {
  margin: 32px 0 10px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #202124;
}
.docs-main p {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.75;
  color: #3c4043;
}
.docs-main a {
  color: var(--accent);
  font-weight: 500;
}
.docs-main a:hover {
  text-decoration: underline;
}
.docs-main code {
  padding: 2px 6px;
  border-radius: 5px;
  background: #f1f3f4;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 0.88em;
  color: #1f2328;
}
.docs-main pre {
  margin: 0 0 18px;
  padding: 18px 20px;
  border-radius: 14px;
  background: #1f2328;
  overflow-x: auto;
}
.docs-main pre code {
  padding: 0;
  background: none;
  color: #e6e8eb;
  font-size: 13px;
  line-height: 1.65;
}

/* ---------- 组件 ---------- */
.docs-endpoint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px !important;
}
.docs-method {
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.docs-table {
  width: 100%;
  margin: 0 0 18px;
  border-collapse: collapse;
  font-size: 14px;
}
.docs-table th,
.docs-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}
.docs-table th {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gray-1);
  border-bottom-color: #d2d5da;
}
.docs-table td {
  color: #3c4043;
  line-height: 1.6;
}
.docs-note,
.docs-warn {
  padding: 13px 16px;
  border-radius: 12px;
  border-left: 3px solid;
  font-size: 14px !important;
  line-height: 1.7 !important;
}
.docs-note {
  background: #f8f9fa;
  border-left-color: var(--gray-2);
  color: var(--gray-1) !important;
}
.docs-warn {
  background: #fef7e0;
  border-left-color: #f0a000;
  color: #5f4600 !important;
}

@media (max-width: 900px) {
  .docs-top {
    padding: 16px 20px;
  }
  .docs-top-nav {
    gap: 18px;
  }
  .docs-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 32px 20px 72px;
  }
  .docs-side {
    display: none;
  }
}


/* A dense list of short fact pairs; two lines of prose become one scannable
   row, which is where most of this page's length used to go. */
.docs-facts {
  display: grid;
  gap: 9px;
  margin: 0 0 16px;
}
.docs-facts div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
  font-size: 14.5px;
  line-height: 1.65;
  color: #3c4043;
}
.docs-facts b {
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 13px;
  font-weight: 600;
  color: #202124;
}

/* Tightened rhythm: the content is reference material, not an essay. */
.docs-main section {
  padding-bottom: 40px;
}
.docs-main h2 {
  margin-bottom: 18px;
}
.docs-main h3 {
  margin: 24px 0 8px;
}
.docs-main pre {
  margin: 0 0 14px;
  padding: 16px 18px;
}
.docs-table th,
.docs-table td {
  padding: 9px 12px;
}

/* A reference page needs a heading, not a hero. */
.docs-main h1 {
  font-size: 32px;
  margin-bottom: 20px;
}
.docs-main section {
  padding-bottom: 32px;
}

/* ---------- 代码块复制按钮 ---------- */
.docs-main pre {
  position: relative;
}
.docs-copy {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: #c9cdd3;
  font: 500 12px/1 "Inter Tight", "Noto Sans SC", sans-serif;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.18s, background 0.18s, color 0.18s;
}
.docs-main pre:hover .docs-copy,
.docs-copy:focus-visible {
  opacity: 1;
}
.docs-copy:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
/* Touch devices have no hover, so the button must simply be there. */
@media (hover: none) {
  .docs-copy {
    opacity: 1;
  }
}
