.material-library-section {
  padding: 64px 0;
  background: #fff;
  color: #2f3336;
}

.material-library-section.is-soft {
  background: #f4f5f5;
}

.material-library-heading {
  max-width: 780px;
  margin: 0 0 30px;
}

.material-library-heading > span {
  display: block;
  margin-bottom: 8px;
  color: #ff7800;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.material-library-heading h2 {
  margin: 0 0 12px;
  color: #222;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
}

.material-library-heading p,
.material-library-note {
  margin: 0;
  color: #62686c;
  font-size: 14px;
  line-height: 1.75;
}

.material-library-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.material-library-grid.is-five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.material-library-grid.is-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.material-library-banner {
  margin: 0 0 28px;
  overflow: hidden;
  border-radius: 4px;
  background: #e9ebeb;
  aspect-ratio: 16 / 7;
}

.material-library-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.material-library-card {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #dfe2e3;
  border-radius: 4px;
  background: #fff;
}

.material-library-card button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: zoom-in;
}

.material-library-media {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e9ebeb;
}

.material-library-card.is-square .material-library-media {
  aspect-ratio: 1 / 1;
}

.material-library-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.material-library-card.is-diagram .material-library-media img {
  object-fit: contain;
  background: #f0f1f1;
}

.material-library-card:hover .material-library-media img {
  transform: scale(1.025);
}

.material-library-caption {
  min-height: 82px;
  padding: 14px;
}

.material-library-caption span {
  display: block;
  margin-bottom: 5px;
  color: #ff7800;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.material-library-caption h3 {
  margin: 0;
  color: #2f3336;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.material-library-caption p {
  margin: 6px 0 0;
  color: #6c7276;
  font-size: 12px;
  line-height: 1.55;
}

.material-library-group + .material-library-group {
  margin-top: 42px;
  padding-top: 38px;
  border-top: 1px solid #d8dcde;
}

.material-library-group-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.material-library-group-head h3 {
  margin: 0 0 5px;
  color: #222;
  font-size: 21px;
  font-weight: 700;
}

.material-library-group-head p {
  max-width: 720px;
  margin: 0;
  color: #6a7074;
  font-size: 13px;
  line-height: 1.65;
}

.material-library-count {
  flex: 0 0 auto;
  color: #ff7800;
  font-size: 13px;
  font-weight: 700;
}

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

.material-library-video {
  overflow: hidden;
  border: 1px solid #dfe2e3;
  border-radius: 4px;
  background: #fff;
}

.material-library-video video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #151719;
  object-fit: contain;
}

.material-library-video figcaption {
  min-height: 70px;
  padding: 13px 15px;
}

.material-library-video strong,
.material-library-video span {
  display: block;
}

.material-library-video strong {
  color: #2f3336;
  font-size: 14px;
}

.material-library-video span {
  margin-top: 4px;
  color: #7a7f82;
  font-size: 12px;
}

.material-library-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 20px;
}

.material-library-toolbar input,
.material-library-toolbar select {
  min-height: 42px;
  border: 1px solid #cfd3d5;
  border-radius: 3px;
  background: #fff;
  color: #2f3336;
  font-size: 14px;
}

.material-library-toolbar input {
  flex: 1 1 280px;
  padding: 9px 13px;
}

.material-library-toolbar select {
  flex: 0 1 260px;
  padding: 8px 34px 8px 12px;
}

.material-library-table-wrap {
  overflow-x: auto;
  border: 1px solid #d9dddf;
  border-radius: 4px;
  background: #fff;
}

.material-library-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

.material-library-table th,
.material-library-table td {
  padding: 12px 13px;
  border-bottom: 1px solid #e3e5e6;
  border-right: 1px solid #eceeef;
  color: #4c5256;
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
  vertical-align: top;
}

.material-library-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #2f3336;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.material-library-table tr:last-child td {
  border-bottom: 0;
}

.material-library-table tr[hidden],
.material-library-card[hidden] {
  display: none !important;
}

.material-library-details {
  border-top: 1px solid #d9dddf;
}

.material-library-details details {
  border-bottom: 1px solid #d9dddf;
  background: #fff;
}

.material-library-details summary {
  padding: 16px 18px;
  color: #2f3336;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.material-library-details pre {
  max-height: 460px;
  margin: 0;
  overflow: auto;
  padding: 0 18px 18px;
  color: #555c60;
  font: 13px/1.7 Arial, sans-serif;
  white-space: pre-wrap;
}

.material-library-disclosure {
  margin-top: 24px;
  padding: 14px 16px;
  border-left: 3px solid #ff7800;
  background: #f0f1f1;
  color: #646a6e;
  font-size: 12px;
  line-height: 1.65;
}

.material-library-dialog {
  width: min(1000px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  background: #151719;
}

.material-library-dialog::backdrop {
  background: rgba(0, 0, 0, .78);
}

.material-library-dialog img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 92px);
  object-fit: contain;
}

.material-library-dialog button {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #222;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.material-library-empty {
  display: none;
  padding: 16px;
  color: #676d71;
  font-size: 13px;
}

.material-library-empty.is-visible {
  display: block;
}

@media (max-width: 991px) {
  .material-library-grid,
  .material-library-grid.is-five,
  .material-library-grid.is-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .material-library-video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .material-library-section {
    padding: 44px 0;
  }

  .material-library-heading {
    margin-bottom: 22px;
  }

  .material-library-heading h2 {
    font-size: 24px;
  }

  .material-library-grid,
  .material-library-grid.is-five,
  .material-library-grid.is-three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .material-library-banner {
    margin-bottom: 20px;
    aspect-ratio: 16 / 9;
  }

  .material-library-caption {
    min-height: 76px;
    padding: 11px;
  }

  .material-library-caption h3 {
    font-size: 13px;
  }

  .material-library-caption p {
    display: none;
  }

  .material-library-video-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .material-library-group-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .material-library-toolbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .material-library-toolbar input,
  .material-library-toolbar select {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .material-library-grid:not(.is-five) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .material-library-grid.is-five {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
