.sds-library {
  display: grid;
  gap: 1.5rem;
  color: #17202b;
}

.sds-library-shell__header {
  display: grid;
  gap: 0;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(116, 138, 163, 0.14);
}

.sds-library__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.sds-library__intro {
  min-width: 0;
}

.sds-library__intro--compact {
  flex: 0 1 auto;
}

.sds-library__title {
  margin: 0;
  font-size: clamp(1.75rem, 2.6vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.sds-library__count {
  margin: 0.5rem 0 0;
  color: #5f6f80;
  font-size: 0.98rem;
}

.sds-library__access-note {
  margin: 0.65rem 0 0;
  color: #5f6f80;
}

.sds-library__controls {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-left: auto;
  justify-content: flex-end;
  flex: 0 1 38rem;
}

.sds-library__control {
  display: grid;
  gap: 0.45rem;
  min-width: min(19rem, 100%);
}

.sds-library__control span {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6f8091;
}

.sds-library__control input,
.sds-library__control select {
  min-height: 3rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(119, 139, 162, 0.22);
  border-radius: 8px;
  background: #fff;
  color: #17202b;
  font: inherit;
  box-shadow: none;
  transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.sds-library__control input:focus,
.sds-library__control select:focus {
  outline: none;
  border-color: rgba(39, 120, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(39, 120, 255, 0.14);
  background: #fff;
}

.sds-library__table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(116, 138, 163, 0.14);
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}

.sds-library__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 860px;
}

.sds-library__table th,
.sds-library__table td {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgba(116, 138, 163, 0.12);
  vertical-align: top;
  text-align: left;
}

.sds-library__table th {
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #718396;
  background: rgba(243, 247, 251, 0.96);
  backdrop-filter: blur(8px);
}

.sds-library__table td a {
  font-weight: 700;
  text-decoration: none;
}

.sds-library__missing,
.sds-library__locked {
  font-size: 0.92rem;
  color: #5f6f80;
}

.sds-library__table tbody tr {
  transition: background-color 140ms ease;
}

.sds-library__table tbody tr:hover {
  background: rgba(39, 120, 255, 0.04);
}

.sds-library__download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 7.5rem;
  padding: 0.58rem 0.85rem;
  border: 1px solid #1f4f82;
  border-radius: 6px;
  background: #285f99;
  color: #fff;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: none;
}

.sds-library__download-link:hover,
.sds-library__download-link:focus {
  color: #fff;
  background: #1f4f82;
  filter: none;
}

.sds-library__empty {
  margin: 0;
  padding: 1.15rem 1.2rem;
  border: 1px solid rgba(116, 138, 163, 0.16);
  border-radius: 10px;
  background: #f8fafc;
  color: #5f6f80;
}

.sds-library__access-note a,
.sds-library__locked a {
  color: #1259d6;
}

@media (max-width: 700px) {
  .sds-library__controls {
    margin-left: 0;
    justify-content: flex-start;
    flex-basis: 100%;
  }

  .sds-library__control {
    min-width: 100%;
  }

  .sds-library__table-wrap {
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .sds-library__table {
    min-width: 0;
  }

  .sds-library__table thead {
    display: none;
  }

  .sds-library__table,
  .sds-library__table tbody,
  .sds-library__table tr,
  .sds-library__table td {
    display: block;
    width: 100%;
  }

  .sds-library__table tr {
    margin-bottom: 0.9rem;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(116, 138, 163, 0.14);
    border-radius: 10px;
    background: #fff;
    box-shadow: none;
  }

  .sds-library__table td {
    border: 0;
    padding: 0.42rem 0;
  }

  .sds-library__table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.24rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #718396;
  }
}
