.articles-page-tools {
  width: min(100%, 1080px);
  margin: -8px auto 34px;
  padding: clamp(17px, 2.4vw, 24px);
  border: 2px solid #ef9db6;
  border-radius: 16px;
  background: #fff7fa;
  box-shadow: 5px 5px 0 #f8d5df;
}

.articles-search {
  display: grid;
  grid-template-columns: 1fr auto;
  overflow: hidden;
  border: 2px solid #2d292b;
  border-radius: 999px;
  background: #fff;
}

.articles-search input {
  min-width: 0;
  min-height: 56px;
  padding: 13px 20px;
  border: 0;
  outline: 0;
  font: inherit;
}

.articles-search span {
  display: grid;
  place-items: center;
  min-width: 82px;
  padding: 0 20px;
  background: #2d292b;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.articles-filter {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  overflow-x: auto;
  padding: 2px 1px 7px;
  scrollbar-width: thin;
}

.articles-filter button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid #e6b3c3;
  border-radius: 999px;
  background: #fff;
  color: #5f414b;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.articles-filter button[aria-pressed="true"] {
  border-color: #d95b83;
  background: #e7789a;
  color: #fff;
}

.articles-result {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 3px 0;
  color: #715c63;
  font-size: 13px;
}

.articles-clear-search {
  margin-left: auto;
  padding: 6px 11px;
  border: 1px solid #d95b83;
  border-radius: 999px;
  color: #9d3159;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.articles-clear-search:hover {
  color: #fff;
  background: #d95b83;
}

main .articles {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 22px 18px;
}

main .articles article {
  overflow: hidden;
  min-width: 0;
  padding: 0;
  border: 2px solid #332f31;
  border-radius: 14px;
  box-shadow: 4px 5px 0 #332f31;
  transition: transform .18s ease, box-shadow .18s ease;
}

main .articles article:hover {
  transform: translateY(-3px);
  box-shadow: 5px 8px 0 #332f31;
}

main .articles article[hidden] { display: none; }

main .articles article > a {
  display: flex;
  height: 100%;
  flex-direction: column;
}

main .articles .thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  padding: 0;
  border-radius: 0;
  background: #fff1f5;
}

main .articles .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

main .articles label { margin: 14px 15px 0; align-self: flex-start; }
main .articles h3 { margin: 10px 15px 7px; font-size: 16px; line-height: 1.55; }
main .articles p { margin: 0 15px 17px; font-size: 12px; line-height: 1.75; }

.articles-empty {
  display: none;
  margin: 30px 0;
  padding: 30px;
  border-radius: 14px;
  background: #fff4f7;
  text-align: center;
  font-weight: 800;
}

.articles-empty.is-visible { display: block; }

@media (max-width: 1050px) {
  main .articles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .articles-page-tools { margin-top: 0; padding: 15px; }
  .articles-search span { padding: 0 15px; }
  main .articles { grid-template-columns: 1fr; gap: 18px; }
  main .articles h3 { font-size: 17px; }
}
