.mc-materials-catalog {
  padding: clamp(14px, 3.5vw, 36px);
  border-radius: 22px;
  background: #eeeee9;
}

.mc-materials-catalog-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 7px 16px;
  margin-bottom: 16px;
}

.mc-materials-catalog-header h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

.mc-materials-catalog-header p {
  color: var(--mc-muted);
  font-size: .875rem;
}

.mc-materials-filter {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.mc-materials-filter > input {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.mc-materials-filter > label {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin: 0 2px 6px 0;
  padding: .375rem .875rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--mc-muted);
  cursor: pointer;
  font-size: .875rem;
  font-weight: 600;
}

.mc-materials-filter > label:hover {
  background: #e5e5df;
}

.mc-materials-filter > input:checked + label {
  border-color: #d8d9d1;
  background: #e0e1d9;
  color: var(--mc-ink);
  font-weight: 700;
}

.mc-materials-filter > input:focus-visible + label {
  outline: 2px solid #6267d9;
  outline-offset: 3px;
}

#materials-images:checked ~ .mc-materials-grid [data-media]:not([data-media="image"]),
#materials-videos:checked ~ .mc-materials-grid [data-media]:not([data-media="video"]),
#materials-audio:checked ~ .mc-materials-grid [data-media]:not([data-media="audio"]) {
  display: none;
}

.mc-materials-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 1.5vw, 16px);
  margin: .5rem 0 0;
  padding: 0;
  list-style: none;
}

.mc-materials-card {
  min-width: 0;
}

.mc-materials-preview {
  display: block;
  width: 100%;
  aspect-ratio: 1.8;
  border-radius: 7px;
}

.mc-materials-preview > .mc-materials-preview-interior { object-position: center 67%; }

.mc-materials-audio {
  display: grid;
  place-items: center;
  background: #e1e9df;
}

.mc-materials-waveform {
  width: 70%;
  height: 42%;
  background: repeating-linear-gradient(90deg, #507765 0 3px, transparent 3px 7px);
  clip-path: polygon(0 47%, 8% 37%, 15% 22%, 23% 42%, 31% 28%, 39% 8%, 47% 39%, 55% 23%, 63% 1%, 71% 38%, 79% 23%, 87% 39%, 94% 33%, 100% 46%, 100% 54%, 94% 67%, 87% 61%, 79% 77%, 71% 62%, 63% 99%, 55% 77%, 47% 61%, 39% 92%, 31% 72%, 23% 58%, 15% 78%, 8% 63%, 0 53%);
}

.mc-materials-audio-alt {
  background: #eae2d6;
}

.mc-materials-audio-alt .mc-materials-waveform {
  height: 32%;
  background: repeating-linear-gradient(90deg, #6e695b 0 2px, transparent 2px 6px);
}

.mc-materials-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 12px;
  padding: 8px 0 3px;
}

.mc-materials-label span {
  color: var(--mc-muted);
  font-size: .8125rem;
}

.mc-materials-plan,
.mc-materials-license {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: center;
}

.mc-materials-plan p,
.mc-materials-license-copy p {
  margin-top: 1rem;
  color: var(--mc-muted);
  line-height: 1.65;
}

.mc-materials-plan-rows {
  margin: 0;
  border-bottom: 1px solid var(--mc-line);
}

.mc-materials-plan-rows div,
.mc-materials-license-sheet dl div {
  display: grid;
  grid-template-columns: minmax(4rem, .35fr) minmax(0, 1fr);
  gap: .5rem 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--mc-line);
}

.mc-materials-plan-rows dt,
.mc-materials-license-sheet dt {
  font-weight: 650;
}

.mc-materials-plan-rows dd,
.mc-materials-license-sheet dd {
  margin: 0;
  color: var(--mc-muted);
  line-height: 1.65;
}

.mc-materials-license {
  padding: clamp(1.25rem, 4vw, 3rem);
  border-radius: 22px;
  background: #eae2d6;
}

.mc-materials-license-sheet {
  padding: clamp(1rem, 3vw, 1.625rem);
  border-radius: 10px;
  background: #fbfaf7;
}

.mc-materials-license-sheet dl {
  margin: 1rem 0 0;
}

.mc-materials-license-sheet dl div:last-child {
  padding-bottom: 0;
}

@media (max-width: 720px) {
  .mc-materials-plan,
  .mc-materials-license {
    grid-template-columns: minmax(0, 1fr);
  }
}

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

  .mc-materials-label {
    display: grid;
  }
}
