.nhgr {
  --nh-bg: #f9f9ff;
  --nh-surface: #ffffff;
  --nh-text: #191b22;
  --nh-muted: #424753;
  --nh-border: #e1e2eb;
  --nh-primary: #0058bd;
  --nh-star: #fbbc06;
  background: var(--nh-bg);
  color: var(--nh-text);
  font-family: Inter, sans-serif;
  padding: 24px 16px;
}

.nhgr-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 24px;
}

.nhgr-header h2 {
  margin: 0 0 8px;
  font-size: 32px;
  line-height: 40px;
}

.nhgr-header p {
  margin: 0;
  color: var(--nh-muted);
  font-size: 16px;
  line-height: 24px;
}

.nhgr-card {
  background: var(--nh-surface);
  border: 1px solid var(--nh-border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 286px;
  max-height: 286px;
  overflow: hidden;
  transition: max-height 0.45s ease;
}

.nhgr-card.nhgr-card-expanded {
  max-height: 3200px;
}

.nhgr-card-head {
  margin-bottom: 12px;
}

.nhgr-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nhgr-author img,
.nhgr-avatar-fallback {
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  flex-shrink: 0;
}

.nhgr-author img {
  object-fit: cover;
}

.nhgr-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: #d8e2ff;
  color: #001a41;
}

.nhgr-author-meta h3 {
  margin: 0;
  font-size: 20px;
  line-height: 26px;
}

.nhgr-author-meta p {
  margin: 2px 0 0;
  color: var(--nh-muted);
  font-size: 12px;
  line-height: 16px;
}

.nhgr-stars {
  display: flex;
  gap: 2px;
  margin-bottom: 10px;
}

.nhgr-star {
  color: #c2c6d5;
  font-size: 17px;
  line-height: 1;
}

.nhgr-star.is-filled {
  color: var(--nh-star);
}

.nhgr-text-block {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 132px;
  overflow: hidden;
  transition: max-height 0.45s ease;
}

.nhgr-card.nhgr-card-expanded .nhgr-text-block {
  max-height: 3000px;
}

.nhgr-text-inner {
  margin: 0;
  color: var(--nh-muted);
  font-size: 14px;
  line-height: 20px;
  white-space: pre-line;
}

.nhgr-read-more {
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--nh-primary);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  align-self: flex-start;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.nhgr-read-more:hover {
  opacity: 0.85;
}

.nhgr-read-more[hidden] {
  display: none !important;
}

.nhgr-carousel {
  position: relative;
}

.nhgr-viewport {
  overflow: hidden;
  touch-action: pan-y;
}

.nhgr-track {
  display: flex;
  transition: transform 0.55s ease;
}

.nhgr-slide {
  min-width: 100%;
  padding: 8px 12px 20px;
}

.nhgr-layout-three-col .nhgr-slide {
  min-width: 100%;
}

.nhgr-layout-four-col .nhgr-slide {
  min-width: 100%;
}

.nhgr-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  background: #ffffff;
  color: #424753;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
  cursor: pointer;
  z-index: 4;
  display: none;
}

.nhgr-prev {
  left: -10px;
}

.nhgr-next {
  right: -10px;
}

.nhgr-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
}

.nhgr-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  border: 0;
  background: #c2c6d5;
  padding: 0;
  cursor: pointer;
}

.nhgr-dot.is-active {
  background: var(--nh-primary);
}

.nhgr-masonry {
  column-count: 1;
  column-gap: 24px;
}

.nhgr-masonry .nhgr-card {
  break-inside: avoid;
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .nhgr {
    padding: 32px 24px;
  }

  .nhgr-header h2 {
    font-size: 38px;
    line-height: 46px;
  }

  .nhgr-layout-three-col .nhgr-slide,
  .nhgr-layout-four-col .nhgr-slide {
    min-width: 50%;
  }

  .nhgr-arrow {
    display: block;
  }

  .nhgr-masonry {
    column-count: 2;
  }
}

@media (min-width: 1024px) {
  .nhgr-layout-three-col .nhgr-slide {
    min-width: 33.3333%;
  }

  .nhgr-layout-four-col .nhgr-slide {
    min-width: 25%;
  }

  .nhgr-masonry {
    column-count: 3;
  }
}
