.api-page {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.api-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
}

.api-hero__cta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-start;
}

.api-hero__hint {
  margin: 0;
  font-size: 0.85rem;
  max-width: 240px;
}

.api-scalar {
  min-height: 520px;
  padding: 0;
  overflow: hidden;
}

.api-scalar #api-reference {
  display: block;
  min-height: 520px;
}

.api-modal[hidden] {
  display: none !important;
}

.api-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.api-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.api-modal__panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  padding: 1.5rem;
}

.api-modal__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
}

.api-modal__close:hover {
  opacity: 1;
}

.api-modal__label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

.api-modal__input {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  background: color-mix(in srgb, currentColor 4%, transparent);
  color: inherit;
  margin-bottom: 0.75rem;
}

.api-modal__submit {
  width: 100%;
}

.api-modal__error {
  color: #f87171;
  font-size: 0.85rem;
  margin: 0 0 0.5rem;
}

.api-modal__result {
  margin-top: 1rem;
}

.api-modal__pre {
  white-space: pre-wrap;
  word-break: break-all;
  padding: 0.75rem;
  border-radius: 8px;
  background: color-mix(in srgb, currentColor 6%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 12%, transparent);
  margin: 0.5rem 0;
}
