.jekyll-linkpreview-wrapper {
  display: flex;
  max-width: 100%;
  min-height: 120px;
  max-height: 168px;
  margin: 1rem 0;
  background-color: var(--card-bg, #ffffff);
  border: 1px solid var(--btn-border-color, #d0d7de);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.jekyll-linkpreview-wrapper:hover {
  border-color: var(--link-color, #0056b2);
}

.jekyll-linkpreview-wrapper:focus-within {
  outline: 2px solid var(--link-color, #0056b2);
  outline-offset: 2px;
}

.jekyll-linkpreview-wrapper-inner {
  padding: 14px 16px;
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: stretch;
}

.jekyll-linkpreview-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}

.jekyll-linkpreview-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  height: 100%;
}

.jekyll-linkpreview-title {
  font-size: 1rem;
  margin: 0;
  line-height: 1.4;
  font-weight: 700;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.jekyll-linkpreview-link {
  color: var(--heading-color, #2a2a2a);
  text-decoration: none;
  border-bottom: none !important;
}

.jekyll-linkpreview-link::after {
  content: '';
  position: absolute;
  inset: 0;
}

.jekyll-linkpreview-link:hover,
.jekyll-linkpreview-link:focus-visible {
  color: var(--link-color, #0056b2);
  text-decoration: underline;
  outline: none;
}

.jekyll-linkpreview-description {
  line-height: 1.45;
  font-size: 0.85rem;
  color: var(--text-muted-color, #595959);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.jekyll-linkpreview-footer {
  font-size: 0.78rem;
  text-align: left;
  color: var(--text-muted-color, #595959);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.jekyll-linkpreview-image {
  flex: 0 0 220px;
  align-self: stretch;
  background-color: var(--btn-border-color, #e9ecef);
  background-size: cover;
  background-position: center;
}

@media (max-width: 576px) {
  .jekyll-linkpreview-wrapper {
    max-height: none;
  }

  .jekyll-linkpreview-image {
    flex: 0 0 110px;
  }
}
