a.file-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.12rem 0.18rem 0.12rem 0;
  padding: 0.22rem 0.62rem 0.22rem 0.22rem;
  border-radius: 999px;
  background: rgba(28, 57, 110, 0.06);
  box-shadow: inset 0 0 0 1px rgba(28, 57, 110, 0.14);
  color: #1c396e;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  vertical-align: middle;
  overflow-wrap: anywhere;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

a.file-link:hover,
a.file-link:focus {
  background: rgba(0, 79, 127, 0.10);
  box-shadow: inset 0 0 0 1px rgba(0, 79, 127, 0.28);
  color: #004f7f;
  text-decoration: none;
  transform: translateY(-1px);
}

a.file-link:focus-visible {
  outline: 2px solid #008acf;
  outline-offset: 2px;
}

a.file-link::before {
  content: attr(data-file-ext);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 1.7rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffffff;
  background: #1c396e;
  box-sizing: border-box;
  flex-shrink: 0;
}

a.file-link.file-link--pdf::before {
  background: #b42318;
}

a.file-link.file-link--doc::before {
  background: #1062a3;
}

a.file-link.file-link--xls::before {
  background: #1f7a3d;
}

a.file-link.file-link--ppt::before {
  background: #ec6605;
}

a.file-link.file-link--archive::before {
  background: #620c33;
}

a.file-link.file-link--txt::before {
  background: #6b7280;
}

/* Чтобы очень длинные имена файлов не ломали верстку */
.field--name-body a.file-link,
.node__content a.file-link,
.block a.file-link {
  max-width: 100%;
}