/* Rendered API reference page (#2959) - public, unauthenticated surface that
   fetches GET /api/openapi.json client-side and renders it as readable docs.
   Follows the landing page's convention of a minimal, dependency-free
   vanilla stylesheet built on the shared design tokens. */

@import url("./generated/tokens.css");

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 10001;
  transform: translateY(-120%);
  padding: var(--space-2) var(--space-4);
  background: var(--neutral-0);
  color: var(--brand-primary);
  border: 2px solid var(--brand-primary);
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  outline-offset: 2px;
}

.skip-link:focus-visible {
  transform: translateY(12px);
  margin-left: 12px;
}

body.api-ref-body {
  margin: 0;
  background: var(--neutral-25);
  color: var(--neutral-700);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.api-ref-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  background: var(--neutral-0);
  border-bottom: 1px solid var(--neutral-200);
}

.api-ref-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  color: var(--neutral-900);
  text-decoration: none;
}

.api-ref-raw-link {
  color: var(--brand-primary);
  font-weight: 600;
  text-decoration: none;
}

.api-ref-raw-link:hover,
.api-ref-raw-link:focus-visible {
  text-decoration: underline;
}

.api-ref-main {
  max-width: 960px;
  margin: 0 auto;
  padding: var(--space-6);
}

#api-ref-title {
  margin: 0 0 var(--space-4);
  color: var(--neutral-900);
}

.api-ref-caveat {
  margin: 0 0 var(--space-6);
  padding: var(--space-4);
  background: var(--neutral-100);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  color: var(--neutral-700);
}

.api-ref-caveat code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--neutral-0);
  padding: 0 4px;
  border-radius: var(--radius-sm);
}

.api-ref-status[role="status"]:empty {
  display: none;
}

.api-ref-group {
  margin-bottom: var(--space-6);
}

.api-ref-group-title {
  margin: 0 0 var(--space-2);
  color: var(--neutral-900);
  font-size: 16px;
}

.api-ref-endpoint {
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  background: var(--neutral-0);
  padding: var(--space-4);
  margin-bottom: var(--space-2);
}

.api-ref-endpoint-heading {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.api-ref-method {
  display: inline-block;
  min-width: 56px;
  text-align: center;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 12px;
  color: var(--neutral-0);
  background: var(--neutral-700);
}

.api-ref-method-get { background: var(--brand-primary); }
.api-ref-method-post { background: var(--success); }
.api-ref-method-put { background: var(--warning); }
.api-ref-method-patch { background: var(--warning); }
.api-ref-method-delete { background: var(--danger); }

.api-ref-path {
  color: var(--neutral-900);
  font-weight: 600;
}

.api-ref-summary {
  margin: var(--space-2) 0 0;
  color: var(--neutral-700);
}

.api-ref-params-title,
.api-ref-body-title {
  margin: var(--space-2) 0 4px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--neutral-700);
}

.api-ref-params-list {
  margin: 0;
  padding-left: var(--space-4);
}

.api-ref-schema {
  background: var(--neutral-100);
  border-radius: var(--radius-sm);
  padding: var(--space-2);
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}
