.developer-guide {
  width: min(920px, 100%);
}
.developer-guide .prelaunch {
  margin: 0 0 2rem;
  padding: 1rem 1.2rem;
  border: 1px solid #c6ad72;
  border-radius: 12px;
  background: #fff6da;
  line-height: 1.55;
}
.developer-guide .lead {
  max-width: 70ch;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.65;
}
.guide-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.6rem 0 3rem;
}
.guide-nav a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  text-decoration: none;
  background: #fff;
}
.guide-nav a:hover {
  background: var(--sage);
}
.developer-guide section,
.developer-guide details {
  margin: 2.8rem 0;
  scroll-margin-top: 1.5rem;
}
.developer-guide section h2,
.developer-guide details > summary {
  font-size: 1.6rem;
  letter-spacing: -0.035em;
}
.developer-guide p,
.developer-guide li {
  line-height: 1.7;
}
.developer-guide code {
  overflow-wrap: anywhere;
}
.code-card {
  min-width: 0;
  margin: 1.25rem 0;
  overflow: hidden;
  border: 1px solid #d9d0da;
  border-radius: 14px;
  background: #2d2630;
  color: #f7f1f6;
}
.code-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid #514651;
  color: #e8dfe8;
  font-size: 0.88rem;
}
.code-head button {
  min-width: 4.5rem;
  min-height: 40px;
  padding: 0.4rem 0.7rem;
  border: 1px solid #867887;
  border-radius: 7px;
  background: transparent;
  color: #fff;
}
.code-head button:hover {
  background: #514651;
}
.code-card pre {
  max-width: 100%;
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
  tab-size: 4;
  -webkit-overflow-scrolling: touch;
}
.code-card pre code {
  color: inherit;
  font:
    13px/1.65 ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  white-space: pre;
  overflow-wrap: normal;
}
.closing {
  margin: 3rem 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 600px) {
  .developer-guide {
    padding-inline: 20px;
  }
  .developer-guide h1 {
    font-size: clamp(2rem, 9vw, 2.6rem);
  }
  .guide-nav {
    gap: 0.45rem;
  }
  .guide-nav a {
    padding: 0.48rem 0.65rem;
    font-size: 0.9rem;
  }
  .code-head {
    align-items: flex-start;
  }
  .code-card pre {
    padding: 0.8rem;
  }
}
@media (max-width: 360px) {
  .developer-guide {
    padding-inline: 14px;
  }
  .code-card pre code {
    font-size: 12px;
  }
}

/* The integrations page starts with two paths, then reveals setup on demand. */
.integrations-guide {
  width: min(860px, 100%);
}
.integrations-guide h1 {
  margin: 0.55rem 0 0;
}
.integrations-guide .lead {
  margin: 0.75rem 0 0;
}
.integration-status {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.integration-paths {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.4rem 0 0;
}
.integration-paths a {
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
}
.integration-paths a:hover {
  background: var(--sage);
}
.integration-paths strong {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.integration-paths span {
  color: var(--muted);
  font-size: 0.9rem;
}
.integration-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.integration-settings dt {
  font-weight: 700;
}
.integration-settings dd {
  margin: 0.2rem 0 0;
}
.integrations-guide .integration-key,
.integration-group > details {
  margin: 0;
  border-bottom: 1px solid var(--line);
}
.integration-group > details:first-of-type {
  border-top: 1px solid var(--line);
}
.integrations-guide .integration-key > summary,
.integration-group > details > summary {
  padding: 0.85rem 0;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: normal;
}
#custom-api .code-card pre code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.integrations-guide a:focus-visible,
.integrations-guide summary:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
@media (max-width: 540px) {
  .integrations-guide {
    padding-top: 32px;
  }
  .integrations-guide .lead {
    font-size: 1rem;
    line-height: 1.5;
  }
  .integrations-guide .integration-status {
    line-height: 1.45;
  }
  .integration-paths,
  .integration-settings {
    grid-template-columns: 1fr;
  }
}
