:root {
  --api-content-width: 860px;
}

.api-page {
  background: var(--canvas);
}

.api-page a {
  color: inherit;
  text-decoration: none;
}

.api-primary-links {
  margin-top: 14px;
}

.api-section-links {
  display: grid;
  gap: 2px;
  margin-top: 22px;
}

.api-section-links a {
  padding: 7px 11px;
  color: var(--muted);
  font-size: 13px;
  border-radius: 7px;
}

.api-section-links a:hover {
  color: var(--ink);
  background: var(--surface-hover);
}

.api-account {
  text-decoration: none;
}

.api-workspace {
  height: calc(100dvh - var(--topbar-height));
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.api-content {
  width: min(calc(100% - 40px), var(--api-content-width));
  margin: 0 auto;
  padding: 54px 0 70px;
}

.api-hero {
  padding-bottom: 38px;
  border-bottom: 1px solid var(--line);
}

.api-kicker {
  margin-bottom: 9px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.api-hero h1 {
  margin: 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(38px, 6vw, 56px);
  font-weight: 400;
  letter-spacing: -0.035em;
}

.api-hero > p {
  margin: 5px 0 24px;
  color: var(--muted);
  font-size: 16px;
}

.base-url-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  max-width: 660px;
  min-height: 44px;
  padding: 6px 7px 6px 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.base-url-row > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.base-url-row code {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-section {
  padding-top: 46px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 15px;
}

.section-heading h2,
.section-heading p {
  margin: 0;
}

.section-heading h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.section-heading p {
  color: var(--muted);
  font-size: 12px;
}

.example-list {
  display: grid;
  gap: 12px;
}

.example-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.example-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 7px 9px 7px 15px;
  border-bottom: 1px solid #3b3934;
  background: #292825;
}

.example-card > header > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.example-card h3 {
  margin: 0;
  color: #f2f0ea;
  font-size: 13px;
  font-weight: 600;
}

.example-number {
  color: #908d85;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.example-card pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  color: #e8e6df;
  background: #292825;
}

.example-card code {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre;
}

.copy-button {
  min-width: 58px;
  height: 30px;
  padding: 0 10px;
  color: #d8d5cd;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  background: #3a3935;
  border: 1px solid #504e48;
  border-radius: 7px;
}

.copy-button:hover {
  color: white;
  background: #46443f;
}

.copy-button.is-copied {
  color: white;
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.copy-compact {
  color: var(--ink);
  background: var(--surface-soft);
  border-color: var(--line);
}

.copy-compact:hover {
  color: var(--ink);
  background: var(--surface-hover);
}

.endpoint-list {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.endpoint-row {
  display: grid;
  grid-template-columns: 52px minmax(180px, 1fr) minmax(90px, 180px);
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 0 15px;
}

.endpoint-row + .endpoint-row {
  border-top: 1px solid var(--line);
}

.endpoint-row code {
  overflow: hidden;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.endpoint-row > span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.method {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 600;
}

.method.get {
  color: #34765a;
}

.method.post {
  color: var(--accent-dark);
}

.api-footer {
  margin-top: 40px;
  padding-top: 16px;
  color: var(--faint);
  font-size: 11px;
  border-top: 1px solid var(--line);
}

@media (max-width: 760px) {
  .api-content {
    width: min(calc(100% - 28px), var(--api-content-width));
    padding: 32px 0 50px;
  }

  .api-hero {
    padding-bottom: 28px;
  }

  .api-section {
    padding-top: 34px;
  }

  .base-url-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .base-url-row > span {
    display: none;
  }

  .endpoint-row {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 8px;
    padding: 0 12px;
  }

  .endpoint-row > span:last-child {
    display: none;
  }
}

@media (max-width: 440px) {
  .section-heading p {
    display: none;
  }

  .example-card code {
    font-size: 11px;
  }
}
