.nh-api-explorer {
  font-family: var(--gin-font-family);
  color: var(--gin-color-text);
  display: grid;
  gap: var(--gin-spacing-m);
  padding: var(--gin-spacing-s) 0 var(--gin-spacing-xl);
  background: var(--gin-bg-app);
}

.nh-api-explorer__loading {
  margin: 0;
  color: var(--gin-color-text-light);
}

.nh-api-explorer__intro {
  background: linear-gradient(120deg, var(--gin-color-primary) 0%, var(--gin-color-primary-hover) 100%);
  border: var(--gin-border-s) solid color-mix(in srgb, var(--gin-color-primary) 80%, black 20%);
  border-radius: var(--gin-border-radius-l);
  box-shadow: var(--gin-shadow-m);
  color: var(--gin-color-primary-contrast);
  padding: var(--gin-spacing-m);
}

.nh-api-explorer__intro h2 {
  margin: 0;
  font-size: 1.45rem;
  color: inherit;
}

.nh-api-explorer__intro p {
  margin: var(--gin-spacing-s) 0 0;
  color: color-mix(in srgb, var(--gin-color-primary-contrast) 88%, transparent);
  max-width: 72ch;
}

.nh-api-summary {
  border: var(--gin-border-s) solid var(--gin-border-color-layer);
  border-radius: var(--gin-border-radius-m);
  background: var(--gin-bg-layer);
  box-shadow: var(--gin-shadow-xs);
  padding: var(--gin-spacing-m);
}

.nh-api-summary__title {
  margin: 0 0 var(--gin-spacing-s);
  color: var(--gin-color-title);
  font-size: var(--gin-font-size-s);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.nh-api-summary__list {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.2rem;
}

.nh-api-summary__list li {
  color: var(--gin-color-text-light);
}

.nh-api-workspace {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: var(--gin-spacing-m);
  align-items: start;
  min-height: calc(100vh - 240px);
}

.nh-api-sidebar {
  border: var(--gin-border-s) solid var(--gin-border-color-layer);
  border-radius: var(--gin-border-radius-l);
  background: var(--gin-bg-layer);
  box-shadow: var(--gin-shadow-s);
  padding: var(--gin-spacing-m);
  display: grid;
  gap: var(--gin-spacing-m);
  position: sticky;
  top: var(--gin-spacing-s);
  max-height: calc(100vh - 2rem);
  overflow: auto;
}

.nh-api-sidebar__title {
  margin: 0;
  color: var(--gin-color-title);
  font-size: var(--gin-font-size-s);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nh-api-auth {
  border: var(--gin-border-s) solid var(--gin-border-color-layer);
  border-radius: var(--gin-border-radius-m);
  background: var(--gin-bg-layer-2);
  padding: var(--gin-spacing-s);
  display: grid;
  gap: var(--gin-spacing-s);
}

.nh-api-auth__title {
  margin: 0;
  color: var(--gin-color-title);
  font-size: var(--gin-font-size-s);
}

.nh-api-auth__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gin-spacing-xs);
}

.nh-api-auth__status {
  margin: 0;
  color: var(--gin-color-text-light);
  font-size: var(--gin-font-size-xs);
}

.nh-api-auth__status.is-error {
  color: var(--gin-color-danger);
}

.nh-api-sidebar__group {
  display: grid;
  gap: var(--gin-spacing-xs);
}

.nh-api-sidebar__group-title {
  margin: 0;
  color: var(--gin-color-title);
  font-size: var(--gin-font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nh-api-sidebar__group-description {
  margin: 0;
  color: var(--gin-color-text-light);
  font-size: var(--gin-font-size-xs);
}

.nh-api-endpoint-btn {
  border: var(--gin-border-s) solid var(--gin-border-color-item);
  border-radius: var(--gin-border-radius-m);
  background: var(--gin-bg-item);
  width: 100%;
  text-align: left;
  padding: var(--gin-spacing-s);
  display: grid;
  gap: 0.35rem;
  cursor: pointer;
  transition: var(--gin-transition);
}

.nh-api-endpoint-btn:hover {
  background: var(--gin-bg-item-hover);
  border-color: var(--gin-color-primary-light);
}

.nh-api-endpoint-btn.is-active {
  border-color: var(--gin-color-primary);
  background: color-mix(in srgb, var(--gin-color-primary-light) 32%, var(--gin-bg-layer) 68%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gin-color-primary) 35%, transparent);
}

.nh-api-endpoint-btn__top {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.nh-api-endpoint-btn__label {
  font-size: var(--gin-font-size-s);
  font-weight: var(--gin-font-weight-medium);
  color: var(--gin-color-title);
}

.nh-api-endpoint-btn__path {
  font-family: var(--gin-font-family-mono);
  font-size: 0.74rem;
  color: var(--gin-color-text-light);
  overflow-wrap: anywhere;
}

.nh-api-detail {
  min-width: 0;
}

.nh-api-panel {
  display: none;
}

.nh-api-panel.is-active {
  display: grid;
}

.nh-api-card {
  border: var(--gin-border-s) solid var(--gin-border-color-layer);
  border-radius: var(--gin-border-radius-l);
  background: var(--gin-bg-layer);
  box-shadow: var(--gin-shadow-s);
  padding: var(--gin-spacing-m);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: var(--gin-spacing-m);
  row-gap: var(--gin-spacing-s);
  align-items: start;
  min-height: calc(100vh - 280px);
}

.nh-api-card__top {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  grid-column: 1 / -1;
}

.nh-api-card__title {
  margin: 0;
  color: var(--gin-color-title);
  font-size: 1.1rem;
}

.nh-api-card__description {
  margin: 0;
  color: var(--gin-color-text-light);
  grid-column: 1 / -1;
}

.nh-api-card__request,
.nh-api-card__response {
  border: var(--gin-border-s) solid var(--gin-border-color-layer-2);
  border-radius: var(--gin-border-radius-m);
  background: var(--gin-bg-layer-2);
}

.nh-api-card__request {
  display: grid;
  gap: var(--gin-spacing-s);
  padding: var(--gin-spacing-s);
}

.nh-api-card__response {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  min-height: 460px;
}

.nh-api-section-title {
  margin: 0;
  font-size: var(--gin-font-size-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gin-color-title);
}

.nh-api-section-title--response {
  padding: var(--gin-spacing-s);
  border-bottom: var(--gin-border-s) solid var(--gin-border-color-layer-2);
  background: color-mix(in srgb, var(--gin-color-primary-light) 20%, var(--gin-bg-layer-2) 80%);
}

.nh-api-method {
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: var(--gin-font-weight-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.16rem 0.5rem;
  color: var(--gin-color-title);
  border: var(--gin-border-s) solid transparent;
}

.nh-api-method--get {
  background: color-mix(in srgb, var(--gin-color-green-light) 65%, white 35%);
  border-color: color-mix(in srgb, var(--gin-color-green) 30%, transparent);
}

.nh-api-method--post {
  background: color-mix(in srgb, var(--gin-color-primary-light) 70%, white 30%);
  border-color: color-mix(in srgb, var(--gin-color-primary) 22%, transparent);
}

.nh-api-method--put,
.nh-api-method--patch {
  background: color-mix(in srgb, var(--gin-color-yellow-light) 78%, white 22%);
  border-color: color-mix(in srgb, var(--gin-color-warning) 30%, transparent);
}

.nh-api-method--delete {
  background: color-mix(in srgb, var(--gin-color-red-light) 75%, white 25%);
  border-color: color-mix(in srgb, var(--gin-color-danger) 30%, transparent);
}

.nh-api-field {
  display: grid;
  gap: 0.35rem;
}

.nh-api-label {
  color: var(--gin-color-text-light);
  font-size: var(--gin-font-size-xs);
}

.nh-api-input,
.nh-api-select,
.nh-api-textarea {
  width: 100%;
  border: var(--gin-border-s) solid var(--gin-border-color-form-element);
  border-radius: var(--gin-border-radius-s);
  background: var(--gin-bg-input);
  color: var(--gin-color-text);
  font-family: var(--gin-font-family-mono);
  font-size: 0.84rem;
  line-height: var(--gin-line-height-s);
  padding: 0.52rem 0.62rem;
}

.nh-api-textarea {
  resize: vertical;
  min-height: 90px;
}

.nh-api-input:focus,
.nh-api-select:focus,
.nh-api-textarea:focus {
  outline: 0;
  border-color: var(--gin-color-primary);
  box-shadow: 0 0 0 1px var(--gin-color-primary);
}

.nh-api-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gin-spacing-xs);
}

.nh-api-explorer .button {
  border-radius: var(--gin-border-radius-s);
}

.nh-api-btn {
  min-width: 108px;
}

.nh-api-response-shell {
  min-height: 100%;
  background: color-mix(in srgb, var(--gin-bg-layer3) 86%, black 14%);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.nh-api-response-meta {
  padding: 0.45rem 0.65rem;
  color: color-mix(in srgb, var(--gin-color-primary-light-text) 80%, white 20%);
  border-bottom: var(--gin-border-s) solid color-mix(in srgb, var(--gin-color-primary) 22%, transparent);
  font-size: 0.72rem;
  font-family: var(--gin-font-family-mono);
}

.nh-api-response-meta.is-error {
  color: color-mix(in srgb, var(--gin-color-red-light) 70%, white 30%);
  border-bottom-color: color-mix(in srgb, var(--gin-color-danger) 32%, transparent);
}

.nh-api-response {
  margin: 0;
  padding: 0.7rem;
  overflow: auto;
  color: color-mix(in srgb, var(--gin-color-primary-light) 62%, white 38%);
  font-size: 0.8rem;
  line-height: 1.48;
}

.nh-api-response.is-error {
  color: color-mix(in srgb, var(--gin-color-red-light) 68%, white 32%);
}

.nh-api-card__request.htmx-request .button--primary {
  opacity: 0.75;
  pointer-events: none;
}

@media (max-width: 1440px) {
  .nh-api-workspace {
    grid-template-columns: 330px minmax(0, 1fr);
  }
}

@media (max-width: 1240px) {
  .nh-api-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .nh-api-card__response {
    min-height: 360px;
  }
}

@media (max-width: 920px) {
  .nh-api-workspace {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .nh-api-sidebar {
    position: static;
    max-height: none;
  }
}
