:root {
  --nsli-green: #042717;
  --nsli-green-soft: #365245;
  --nsli-cream: #fff8e7;
  --nsli-cream-strong: rgba(255, 250, 234, 0.94);
  --nsli-yellow: #f4d88d;
  --nsli-gold: #d99a36;
  --nsli-rose: #b94b4f;
  --nsli-line: rgba(4, 39, 23, 0.18);
  --nsli-shadow: 0 18px 42px rgba(3, 25, 14, 0.14);
  --nsli-radius: 1.35rem;
}

.nsli {
  width: min(1180px, calc(100% - 2rem));
  margin: clamp(1.4rem, 3vw, 3rem) auto;
  color: #1f1d18;
  font-family: inherit;
}

.nsli *,
.nsli *::before,
.nsli *::after {
  box-sizing: border-box;
}

.nsli-card,
.nsli__notice,
.nsli__empty {
  border: 1px solid var(--nsli-line);
  border-radius: var(--nsli-radius);
  background:
    radial-gradient(circle at 100% 0, rgba(255, 255, 255, 0.62), transparent 42%),
    linear-gradient(145deg, rgba(255, 250, 234, 0.96), rgba(255, 247, 221, 0.92));
  box-shadow: var(--nsli-shadow);
}

.nsli-card__category {
  margin: 0 0 0.55rem;
  color: var(--nsli-green-soft);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nsli__filters {
  display: grid;
  grid-template-columns: minmax(260px, 1.45fr) repeat(3, minmax(150px, 0.85fr));
  gap: 0.9rem;
  align-items: end;
  padding: 0;
  margin-bottom: clamp(1rem, 2vw, 1.35rem);
}

.nsli__filter-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(4, 39, 23, 0.12);
  padding-bottom: 0.75rem;
}

.nsli__filter-title strong {
  color: var(--nsli-green);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1;
}

.nsli__filter-title span {
  color: rgba(31, 29, 24, 0.64);
  font-size: 0.92rem;
  line-height: 1.35;
  text-align: right;
}

.nsli__field {
  display: grid;
  gap: 0.38rem;
}

.nsli__field span {
  color: var(--nsli-green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nsli__field input,
.nsli__field select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(4, 39, 23, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: #1f1d18;
  font: inherit;
  padding: 0.72rem 0.95rem;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72) inset;
}

.nsli__badges {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11.75rem, 1fr));
  gap: 0.6rem;
  align-items: stretch;
  padding-top: 0.2rem;
}

.nsli__badges > strong {
  grid-column: 1 / -1;
  color: var(--nsli-green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nsli__badges label {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(4, 39, 23, 0.16);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 250, 234, 0.68));
  color: var(--nsli-green);
  box-shadow: 0 8px 18px rgba(3, 25, 14, 0.08);
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.nsli__badges input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nsli__badges label span {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.42rem;
  width: 100%;
  border-radius: 999px;
  padding: 0.58rem 0.82rem;
  transition: background 0.16s ease, color 0.16s ease;
}

.nsli__badges label em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.55rem;
  min-height: 1.55rem;
  border-radius: 999px;
  background: rgba(4, 39, 23, 0.1);
  color: inherit;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
  padding: 0 0.4rem;
}

.nsli__badges label span::before {
  content: "";
  width: 0.54rem;
  height: 0.54rem;
  border-radius: 999px;
  background: rgba(4, 39, 23, 0.22);
}

.nsli__badges label:hover {
  transform: translateY(-1px);
  border-color: rgba(4, 39, 23, 0.28);
}

.nsli__badges input:checked + span {
  background:
    linear-gradient(135deg, var(--nsli-green), var(--nsli-green-soft));
  color: var(--nsli-yellow);
}

.nsli__badges input:checked + span::before {
  background: var(--nsli-yellow);
}

.nsli__badges input:checked + span em {
  background: rgba(244, 216, 141, 0.18);
}

.nsli__filter-note {
  grid-column: 1 / -1;
  margin: -0.1rem 0 0;
  color: rgba(31, 29, 24, 0.68);
  font-size: 0.9rem;
  line-height: 1.45;
}

.nsli__reset {
  grid-column: 1 / -1;
  justify-self: start;
  border: 1px dashed rgba(4, 39, 23, 0.34);
  border-radius: 999px;
  background: transparent;
  color: var(--nsli-green);
  font: inherit;
  font-weight: 800;
  padding: 0.58rem 0.9rem;
  cursor: pointer;
}

.nsli__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem;
  color: rgba(31, 29, 24, 0.78);
  font-size: 0.96rem;
}

.nsli__toolbar strong {
  color: var(--nsli-green);
}

.nsli__grid {
  column-count: 2;
  column-gap: clamp(0.85rem, 1.8vw, 1.15rem);
}

.nsli-card {
  display: inline-grid;
  gap: 1rem;
  width: 100%;
  vertical-align: top;
  margin: 0 0 clamp(0.85rem, 1.8vw, 1.15rem);
  padding: clamp(1rem, 2vw, 1.35rem);
  overflow: hidden;
  break-inside: avoid;
  page-break-inside: avoid;
  font-size: 1rem;
}

.nsli-card[hidden] {
  display: none !important;
}

.nsli-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
}

.nsli-card__head > div {
  min-width: 0;
}

.nsli-card h3 {
  margin: 0;
  color: var(--nsli-green);
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.05;
}

.nsli-card__image {
  flex: 0 0 clamp(3.25rem, 5vw, 4.3rem);
  width: clamp(3.25rem, 5vw, 4.3rem);
  height: clamp(3.25rem, 5vw, 4.3rem);
  margin: 0;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(4, 39, 23, 0.12);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 8px 18px rgba(3, 25, 14, 0.1);
}

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

.nsli-card__section {
  display: grid;
  gap: 0.42rem;
}

.nsli-card__section strong {
  color: var(--nsli-green);
  font-size: 0.98rem;
  line-height: 1.2;
}

.nsli-card__section p,
.nsli-card__note {
  margin: 0;
  font-size: clamp(0.95rem, 0.95vw, 1.04rem);
  line-height: 1.58;
}

.nsli-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.36rem;
  align-items: flex-start;
}

.nsli-tags span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 auto;
  max-width: 100%;
  min-height: 1.95rem;
  border: 1px solid rgba(4, 39, 23, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--nsli-green);
  padding: 0.34rem 0.64rem;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
}

.nsli-tags--alert span {
  justify-content: flex-start;
  border-color: rgba(127, 37, 41, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(185, 75, 79, 0.075));
  color: #7f2529;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset;
}

.nsli-tags--alert span::before {
  content: "";
  flex: 0 0 0.38rem;
  width: 0.38rem;
  height: 0.38rem;
  margin-right: 0.32rem;
  border-radius: 999px;
  background: rgba(185, 75, 79, 0.62);
}

.nsli-card__meta {
  display: grid;
  gap: 0.35rem;
  border-top: 1px solid rgba(4, 39, 23, 0.12);
  padding-top: 0.85rem;
  color: rgba(31, 29, 24, 0.74);
  font-size: 0.92rem;
}

.nsli-card__note {
  border-left: 4px solid rgba(4, 39, 23, 0.22);
  padding-left: 0.8rem;
  color: rgba(31, 29, 24, 0.78);
}

.nsli__empty,
.nsli__notice {
  margin-top: 1rem;
  padding: 1rem 1.15rem;
}

.nsli__notice {
  color: rgba(31, 29, 24, 0.8);
  line-height: 1.6;
}

.nsli__notice strong {
  color: var(--nsli-green);
}

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

  .nsli__field--search {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .nsli {
    width: min(100% - 1rem, 1180px);
  }

  .nsli__filters {
    grid-template-columns: 1fr;
  }

  .nsli__grid {
    column-count: 1;
  }

  .nsli__filter-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .nsli__filter-title span {
    text-align: left;
  }

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

}
