.doc-container {
  max-width: 980px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.lead {
  font-size: 1.125rem;
  color: var(--color-text-light);
}

.divider {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 2.5rem 0;
}

.info-callout,
.api-block {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.info-callout {
  margin-top: 1.5rem;
}

.api-step h3,
.api-examples h3 {
  margin-bottom: 1rem;
}

.api-step h5,
.api-examples h5 {
  margin: 1.5rem 0 0.75rem;
  font-size: 1rem;
}

.code-container {
  position: relative;
  margin: 1rem 0 1.5rem;
  overflow: hidden;
  border-radius: var(--radius);
  background: #111827;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.14);
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: #1f2937;
  color: #e5e7eb;
}

.code-lang {
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a5b4fc;
}

.code-url {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 0.875rem;
}

.code-container pre {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
  color: #f9fafb;
}

.code-container > .copy-button + pre {
  padding-top: 3.5rem;
}

.code-container code {
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 0.92rem;
  line-height: 1.6;
  white-space: pre;
}

.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #f9fafb;
  padding: 0.4rem 0.7rem;
  font: inherit;
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.code-container > .copy-button {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 1;
}

.copy-button:hover,
.copy-button:focus-visible {
  background: rgba(99, 102, 241, 0.35);
  border-color: rgba(165, 180, 252, 0.8);
  outline: none;
}

.copy-button.copied {
  background: #16a34a;
  border-color: #16a34a;
}

.table-wrapper {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.table th,
.table td {
  padding: 0.85rem;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}

.table th {
  background: #f9fafb;
  font-weight: 700;
}

.api-info-blocks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

@media (max-width: 640px) {
  .code-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .code-header .copy-button {
    align-self: flex-start;
  }

  .copy-button span {
    display: none;
  }
}
