.articles {
  min-height: 60vh;
  padding: 24px 0 64px;
  background: #f9f9f9;
}

.articles__inner {
  max-width: 1200px;
}

.articles__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.articles__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  color: #1f1f1f;
  background: #fff;
  box-shadow: 0 10px 30px rgb(0 0 0 / 6%);
  cursor: pointer;
}

.articles__back:hover {
  opacity: 0.9;
}

.articles__title {
  margin: 0;
  color: #1f1f1f;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.2;
}

.articles__state {
  margin: 0;
  padding: 24px;
  border-radius: 28px;
  color: #6b6b6b;
  font-size: 15px;
  line-height: 1.4;
  background: #fff;
  box-shadow: 0 10px 30px rgb(0 0 0 / 6%);
}

.articles__state--error {
  color: #c82333;
}

.articles__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.article-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
  background: #fff;
  box-shadow: 0 10px 30px rgb(0 0 0 / 6%);
  transition: box-shadow 150ms ease;
}

.article-card:hover {
  box-shadow: 0 12px 32px rgb(0 0 0 / 12%);
}

.article-card__image {
  height: 200px;
  background: #ececec center / cover no-repeat;
}

.article-card__body {
  padding: 14px 16px 18px;
}

.article-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #6b6b6b;
  font-size: 13px;
  line-height: 1.3;
}

.article-card__category {
  position: relative;
  padding-left: 12px;
}

.article-card__category::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgb(0 0 0 / 25%);
  transform: translateY(-50%);
}

.article-card__title {
  margin: 0;
  color: #1f1f1f;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
}

.articles__more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.articles__state[hidden],
.articles__grid[hidden],
.articles__more-wrap[hidden],
.article-detail[hidden] {
  display: none;
}

.articles__more {
  min-width: 180px;
  min-height: 50px;
  padding: 10px 24px;
  border: 0;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  background: #f7c948;
  cursor: pointer;
}

.articles__more:disabled {
  opacity: 0.7;
  cursor: default;
}

.article-detail {
  color: #1f1f1f;
}

.article-detail__toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}

.article-detail__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  color: #6b6b6b;
  font-size: 14px;
  line-height: 1.3;
}

.article-detail__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.article-detail__title {
  margin: 0 0 16px;
  color: #1f1f1f;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.25;
}

.article-detail__subtitle {
  margin: 0 0 24px;
  color: rgb(0 0 0 / 72%);
  font-size: 18px;
  line-height: 1.5;
}

.article-detail__image {
  width: 100%;
  height: 360px;
  margin-bottom: 32px;
  border-radius: 12px;
  background: #ececec center / cover no-repeat;
}

.article-detail__content {
  color: #1f1f1f;
  font-size: 17px;
  line-height: 1.65;
}

.article-detail__content p {
  margin: 0 0 18px;
}

.article-detail__content p:last-child {
  margin-bottom: 0;
}

.article-detail__content h2,
.article-detail__content h3,
.article-detail__content h4 {
  margin: 28px 0 14px;
  color: #1f1f1f;
  font-weight: 700;
  line-height: 1.3;
}

.article-detail__content h2 {
  font-size: 24px;
}

.article-detail__content h3 {
  font-size: 20px;
}

.article-detail__content ul,
.article-detail__content ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

.article-detail__content li {
  margin-bottom: 8px;
}

.article-detail__vote {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid rgb(0 0 0 / 8%);
}

.article-detail__vote-error {
  flex-basis: 100%;
  margin: 0;
  color: #c82333;
  font-size: 14px;
}

.article-detail__vote-error[hidden] {
  display: none;
}

.article-detail__vote-label {
  color: #1f1f1f;
  font-size: 18px;
  font-weight: 700;
}

.article-detail__vote-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.article-detail__vote-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition:
    opacity 150ms ease,
    box-shadow 150ms ease;
}

.article-detail__vote-btn:disabled {
  opacity: 0.7;
  cursor: default;
}

.article-detail__vote-btn--like.article-detail__vote-btn--active {
  box-shadow: 0 0 0 3px rgb(90 223 105 / 35%);
}

.article-detail__vote-btn--dislike.article-detail__vote-btn--active {
  box-shadow: 0 0 0 3px rgb(127 127 127 / 35%);
}

.article-detail__vote-icon {
  display: block;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.article-detail__vote-count {
  min-width: 28px;
  font-size: 18px;
  font-weight: 700;
}

.article-detail__vote-count--like {
  color: #5adf69;
}

.article-detail__vote-count--dislike {
  color: #7f7f7f;
}

@media (max-width: 900px) {
  .articles {
    padding: 20px 0 48px;
  }

  .articles__title {
    font-size: 24px;
  }

  .articles__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .article-card__image {
    height: 180px;
  }

  .article-detail__toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .article-detail__meta {
    justify-content: flex-start;
  }

  .article-detail__title {
    font-size: 26px;
  }

  .article-detail__subtitle,
  .article-detail__content,
  .article-detail__vote-label {
    font-size: 16px;
  }

  .article-detail__image {
    height: 220px;
    margin-bottom: 24px;
  }
}

@media (min-width: 901px) and (max-width: 1100px) {
  .articles__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
