/* The API page (#356), loaded on that page only, so no other page carries its weight: two boxes on how to get a key, links to the page's parts, then the app's API documentation in
   one column, with black code blocks that scroll sideways on a phone rather than the page. */

.api-page .wrap > * {
  max-width: 760px;
}

.api-keys {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.api-key-box {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 20px;
}

.api-key-box h2 {
  font-size: 1.0625rem;
  margin: 0 0 8px;
}

.api-key-box p {
  margin: 0 0 12px;
}

.api-parts {
  margin: 24px 0 8px;
}

.api-docs h2 {
  font-size: 1.25rem;
  margin: 40px 0 12px;
  scroll-margin-top: 16px;
}

.api-docs h3 {
  font-size: 1rem;
  margin: 24px 0 4px;
}

.api-docs code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.api-code {
  background: var(--ink);
  color: var(--white);
  border-radius: 4px;
  padding: 14px 16px;
  margin: 12px 0 16px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875rem;
  line-height: 1.5;
}

.api-endpoint p {
  margin: 0 0 8px;
}

.api-fields {
  margin: 0 0 16px;
}

.api-fields div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 4px 16px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.api-fields dt {
  font-weight: 700;
}

.api-fields dd {
  margin: 0;
}

@media (max-width: 600px) {
  .api-fields div {
    grid-template-columns: minmax(0, 1fr);
  }
}
