.nv-sidebar {
  position: sticky;
  top: var(--space-md);
  display: grid;
  gap: var(--space-md);
}

.nv-sidecard {
  background: var(--nv-white);
  border: 1px solid color-mix(in srgb, var(--nv-black) 10%, transparent);
  border-radius: var(--border-radius-lg);
  padding: var(--space-sm);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--nv-black) 8%, transparent);
}

.nv-sidecard-title {
  margin: 0 0 var(--space-sm) 0;
}

.nv-postlist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-xs);
}

.nv-postlist-item {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs);
  border: 1px solid color-mix(in srgb, var(--nv-black) 8%, transparent);
  border-radius: var(--border-radius-md);
  background: var(--nv-white);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--nv-black) 6%, transparent);
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.nv-postlist-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--nv-black) 10%, transparent);
  border-color: var(--nv-blue-light);
}

.nv-rank {
  display: inline-grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  background: var(--nv-blue);
  color: var(--nv-white);
}

.nv-thumb {
  width: 4.8rem;
  height: 3.6rem;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  background: color-mix(in srgb, var(--nv-black) 4%, transparent);
}

.nv-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nv-link {
  color: var(--text-color);
  transition: color 0.2s ease;
}
.nv-link:hover {
  color: var(--nv-blue);
}

.nv-sidecard-cta {
  text-align: center;
  padding: var(--space-sm);
}
.nv-sidecard-cta .button-primary {
  width: 100%;
}

/* laptop only: cap height + internal scroll */
@media (min-width: 1025px) and (max-width: 1280px) {
  .nv-sidecard {
    display: flex;
    flex-direction: column;
    max-height: 32vh;
  }
  .nv-sidecard-title {
    margin-bottom: var(--space-xs);
  }
  .nv-postlist {
    flex: 1 1 auto;
    overflow-y: auto;
    padding-right: 0.4rem;
  }
  .nv-postlist-item {
    gap: var(--space-xs);
    padding: 0.6rem;
  }
  .nv-thumb {
    width: 3.8rem;
    height: 2.8rem;
  }
  .nv-rank {
    width: 2rem;
    height: 2rem;
  }
  .nv-link {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* phones: one-item slider with dots (tablet uses desktop styles) */
@media (max-width: 767px) {
  .nv-sidebar {
    position: static;
    top: auto;
  }
  .nv-postlist {
    display: block;
    position: relative;
    min-height: 7.2rem;
    overflow: hidden;
  }
  .nv-postlist .nv-postlist-item {
    display: none;
  }
  .nv-postlist .nv-postlist-item.is-active {
    display: grid;
  }
  .nv-dots {
    display: flex;
    gap: var(--space-xs);
    justify-content: center;
    margin-top: var(--space-xs);
  }
  .nv-dots button {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--nv-black) 20%, transparent);
    border: none;
    padding: 0;
  }
  .nv-dots button.is-active {
    background: var(--nv-blue);
  }
}
